@agrotools1/at-components 0.6.36 → 0.6.38
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/Dropdown/Dropdown.core.vue.js +2 -2
- package/dist/Dropdown/Dropdown.core.vue2.js +25 -23
- package/dist/Dropdown/Dropdown.core.vue3.js +2 -2
- package/dist/Search/Search.vue.js +5 -5
- package/dist/Search/Search.vue2.js +22 -22
- package/dist/Upload/UploaderInput/UploaderInput.vue.js +1 -1
- package/dist/agrotools-theme.css +1 -1
- package/dist/agrotools-theme.css.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ function _(e, t, k, y, w, E) {
|
|
|
35
35
|
], 2)
|
|
36
36
|
]);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const b = /* @__PURE__ */ $(a, [["render", _], ["__scopeId", "data-v-9dad5b18"]]);
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
b as default
|
|
41
41
|
};
|
|
@@ -25,23 +25,23 @@ const M = q({
|
|
|
25
25
|
setup(r, { emit: f }) {
|
|
26
26
|
const u = l(!1);
|
|
27
27
|
u.value = r.isOpen;
|
|
28
|
-
const i = l(), a = l(), s = l(), h = l(0), n = l(), v = l(),
|
|
29
|
-
var w, x, O, S, C, b,
|
|
28
|
+
const i = l(), a = l(), s = l(), h = l(0), n = l(), v = l(), d = () => {
|
|
29
|
+
var w, x, O, S, z, C, b, D, W, $, I, P;
|
|
30
30
|
h.value = window.scrollY;
|
|
31
31
|
const o = (x = (w = a.value) == null ? void 0 : w.children[0]) == null ? void 0 : x.querySelector(
|
|
32
32
|
".AT-INPUT_error-message"
|
|
33
33
|
), e = 1 / (Number.parseFloat((O = window.getComputedStyle(document.body)) == null ? void 0 : O.zoom) || 1);
|
|
34
34
|
n.value = (S = a.value) == null ? void 0 : S.getBoundingClientRect();
|
|
35
|
-
const
|
|
35
|
+
const E = {
|
|
36
36
|
y: h.value * e
|
|
37
37
|
}, t = {
|
|
38
|
-
top: (((
|
|
39
|
-
right: (((
|
|
40
|
-
bottom: (((
|
|
38
|
+
top: (((z = n.value) == null ? void 0 : z.top) ?? 0) * e,
|
|
39
|
+
right: (((C = n.value) == null ? void 0 : C.right) ?? 0) * e,
|
|
40
|
+
bottom: (((b = n.value) == null ? void 0 : b.bottom) ?? 0) * e,
|
|
41
41
|
left: (((D = n.value) == null ? void 0 : D.left) ?? 0) * e,
|
|
42
42
|
width: (((W = n.value) == null ? void 0 : W.width) ?? 0) * e,
|
|
43
43
|
height: ((($ = n.value) == null ? void 0 : $.height) ?? 0) * e
|
|
44
|
-
}, y = ((t == null ? void 0 : t.bottom) ?? 0) + ((o == null ? void 0 : o.clientHeight) ?? 0) + 8 +
|
|
44
|
+
}, y = ((t == null ? void 0 : t.bottom) ?? 0) + ((o == null ? void 0 : o.clientHeight) ?? 0) + 8 + E.y, L = {
|
|
45
45
|
left: () => {
|
|
46
46
|
var c, p;
|
|
47
47
|
s.value = {
|
|
@@ -49,44 +49,46 @@ const M = q({
|
|
|
49
49
|
y
|
|
50
50
|
}, v.value = {
|
|
51
51
|
top: `${((c = s.value) == null ? void 0 : c.y) || 0}px`,
|
|
52
|
-
left: `${((p = s.value) == null ? void 0 : p.x) || 0}px
|
|
52
|
+
left: `${((p = s.value) == null ? void 0 : p.x) || 0}px`,
|
|
53
|
+
zIndex: "2147483647"
|
|
53
54
|
};
|
|
54
55
|
},
|
|
55
56
|
right: () => {
|
|
56
|
-
var c, p,
|
|
57
|
+
var c, p, B, T;
|
|
57
58
|
s.value = {
|
|
58
59
|
x: ((t == null ? void 0 : t.left) ?? 0) - ((((c = i.value) == null ? void 0 : c.clientWidth) ?? 0) - (((p = a.value) == null ? void 0 : p.clientWidth) ?? 0)),
|
|
59
60
|
y
|
|
60
61
|
}, v.value = {
|
|
61
|
-
top: `${((
|
|
62
|
-
left: `${((
|
|
62
|
+
top: `${((B = s.value) == null ? void 0 : B.y) || 0}px`,
|
|
63
|
+
left: `${((T = s.value) == null ? void 0 : T.x) || 0}px`,
|
|
64
|
+
zIndex: "2147483647"
|
|
63
65
|
};
|
|
64
66
|
}
|
|
65
|
-
}, N = window.innerWidth - ((t == null ? void 0 : t.right) ?? 0) <= (((
|
|
66
|
-
L[N](), r.fullSize && (v.value.width = `${((
|
|
67
|
+
}, N = window.innerWidth - ((t == null ? void 0 : t.right) ?? 0) <= (((I = i.value) == null ? void 0 : I.offsetWidth) ?? 0) ? "right" : r.position;
|
|
68
|
+
L[N](), r.fullSize && (v.value.width = `${((P = a.value) == null ? void 0 : P.clientWidth) ?? 0}px`);
|
|
67
69
|
};
|
|
68
70
|
F(
|
|
69
71
|
() => r.isOpen,
|
|
70
72
|
(o) => {
|
|
71
|
-
u.value = o, o && setTimeout(() =>
|
|
73
|
+
u.value = o, o && setTimeout(() => d(), 10);
|
|
72
74
|
}
|
|
73
75
|
);
|
|
74
|
-
const
|
|
75
|
-
var
|
|
76
|
-
u.value && !((
|
|
77
|
-
},
|
|
76
|
+
const Y = async () => f("update:isOpen", !0), m = async () => f("update:isOpen", !1), _ = (o) => {
|
|
77
|
+
var g, e;
|
|
78
|
+
u.value && !((g = i == null ? void 0 : i.value) != null && g.contains(o.target)) && !((e = a.value) != null && e.contains(o.target)) && m();
|
|
79
|
+
}, k = () => f("update:isOpen", !u.value);
|
|
78
80
|
H(() => {
|
|
79
|
-
document.addEventListener("click",
|
|
81
|
+
document.addEventListener("click", _), window.addEventListener("resize", d), d();
|
|
80
82
|
});
|
|
81
|
-
const
|
|
83
|
+
const A = U(() => ["dialog"]);
|
|
82
84
|
return {
|
|
83
85
|
dialogIsOpen: u,
|
|
84
|
-
getDialogClass:
|
|
86
|
+
getDialogClass: A,
|
|
85
87
|
dialogElem: i,
|
|
86
88
|
triggerElem: a,
|
|
87
89
|
dialogStyle: v,
|
|
88
|
-
toggleDialog:
|
|
89
|
-
openDialog:
|
|
90
|
+
toggleDialog: k,
|
|
91
|
+
openDialog: Y,
|
|
90
92
|
closeDialog: m
|
|
91
93
|
};
|
|
92
94
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import l from "./Search.vue2.js";
|
|
2
|
-
import { resolveComponent as o, openBlock as s, createElementBlock as t, normalizeClass as u, createVNode as n, withCtx as
|
|
2
|
+
import { resolveComponent as o, openBlock as s, createElementBlock as t, normalizeClass as u, createVNode as n, withCtx as d, mergeProps as i, createCommentVNode as p } from "vue";
|
|
3
3
|
import "./Search.vue3.js";
|
|
4
4
|
import m from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const c = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "spinner"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function f(e, h, b, g, I, C) {
|
|
10
10
|
const r = o("AtInput"), a = o("AtLista");
|
|
11
11
|
return s(), t("section", {
|
|
12
12
|
ref: "atSearch",
|
|
@@ -22,8 +22,8 @@ function h(e, f, b, g, I, C) {
|
|
|
22
22
|
style: { "max-height": "200px" },
|
|
23
23
|
onOnSave: e.handleSelectedItem
|
|
24
24
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
n(r,
|
|
25
|
+
default: d(() => [
|
|
26
|
+
n(r, i({
|
|
27
27
|
id: e.label,
|
|
28
28
|
label: e.label,
|
|
29
29
|
"model-value": e.modelValue,
|
|
@@ -46,7 +46,7 @@ function h(e, f, b, g, I, C) {
|
|
|
46
46
|
}, 8, ["id", "drop-down-list", "is-open", "show-no-result-message", "msg-no-result", "onOnSave"])
|
|
47
47
|
], 2);
|
|
48
48
|
}
|
|
49
|
-
const V = /* @__PURE__ */ m(l, [["render",
|
|
49
|
+
const V = /* @__PURE__ */ m(l, [["render", f], ["__scopeId", "data-v-efb32df0"]]);
|
|
50
50
|
export {
|
|
51
51
|
V as default
|
|
52
52
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as s, computed as
|
|
1
|
+
import { defineComponent as B, ref as s, computed as n } from "vue";
|
|
2
2
|
import { AtCircleXMarkSolidIcon as O } from "../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtCircleXMarkSolidIcon/index.js";
|
|
3
3
|
import { AtSearchIcon as b } from "../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtSearchIcon/index.js";
|
|
4
4
|
import { AtInput as x } from "../Input/index.js";
|
|
@@ -73,21 +73,21 @@ const F = {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
emits: ["update:modelValue", "onSelectedItem", "onClear"],
|
|
76
|
-
setup(t, { emit:
|
|
77
|
-
const r = s([]), c = s(!1), u = s(null), v =
|
|
76
|
+
setup(t, { emit: a }) {
|
|
77
|
+
const r = s([]), c = s(!1), u = s(null), v = n(
|
|
78
78
|
() => {
|
|
79
79
|
var e;
|
|
80
80
|
return c.value && t.hasAutoComplete && (!!t.modelValue || t.hasFilterOption) && !(!((e = p.value) != null && e.length) && I.value);
|
|
81
81
|
}
|
|
82
82
|
), m = (e = "false") => {
|
|
83
|
-
var
|
|
83
|
+
var l;
|
|
84
84
|
if (t.arrowIcon) {
|
|
85
|
-
const d = (
|
|
85
|
+
const d = (l = u.value) == null ? void 0 : l.querySelector(".AT_INPUT_icon_slot");
|
|
86
86
|
if (!(d instanceof HTMLElement))
|
|
87
87
|
return;
|
|
88
88
|
d.setAttribute("data-rotate", e);
|
|
89
89
|
}
|
|
90
|
-
}, S =
|
|
90
|
+
}, S = n(
|
|
91
91
|
() => t.arrowIcon ? { name: "AtAngleDownSolidIcon" } : { name: "AtSearchIcon" }
|
|
92
92
|
), y = () => {
|
|
93
93
|
var e;
|
|
@@ -97,37 +97,37 @@ const F = {
|
|
|
97
97
|
setTimeout(() => {
|
|
98
98
|
c.value = !1;
|
|
99
99
|
}, 200), (e = u.value) == null || e.classList.remove("focused"), m();
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
}, p =
|
|
100
|
+
}, o = s(!1), A = async (e) => {
|
|
101
|
+
a("update:modelValue", e), t.searchEndpoint && (o.value = !0, r.value = await t.searchEndpoint(e), o.value = !1);
|
|
102
|
+
}, p = n(() => {
|
|
103
103
|
var e;
|
|
104
104
|
if (t.hasFilterOption) {
|
|
105
|
-
const
|
|
105
|
+
const l = (f, h) => f.text.toUpperCase().includes(h.toUpperCase());
|
|
106
106
|
return t.autoCompleteList.filter(
|
|
107
|
-
(f) =>
|
|
107
|
+
(f) => l(f, t.modelValue)
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
return (e = r.value) != null && e.length ? r.value : t.autoCompleteList;
|
|
111
111
|
}), i = s(), L = (e) => {
|
|
112
|
-
const
|
|
113
|
-
i.value = e,
|
|
112
|
+
const l = e.text;
|
|
113
|
+
i.value = e, a("onSelectedItem", e), a("update:modelValue", l);
|
|
114
114
|
}, C = () => {
|
|
115
|
-
|
|
116
|
-
}, I =
|
|
117
|
-
() => t.withIcon &&
|
|
118
|
-
),
|
|
115
|
+
a("onSelectedItem", null), a("onClear"), a("update:modelValue", ""), o.value = !1, i.value = null;
|
|
116
|
+
}, I = n(
|
|
117
|
+
() => t.withIcon && o.value && !i.value || t.isLoading
|
|
118
|
+
), V = n(
|
|
119
119
|
() => t.isDisabled ? "var(--at-medium-grey)" : ""
|
|
120
|
-
),
|
|
121
|
-
() => !!t.modelValue && !
|
|
120
|
+
), w = n(
|
|
121
|
+
() => !!t.modelValue && !o.value
|
|
122
122
|
);
|
|
123
123
|
return {
|
|
124
124
|
atSearch: u,
|
|
125
125
|
autocompleteListIsOpen: v,
|
|
126
126
|
autoCompleteListFiltered: p,
|
|
127
|
-
isLoading:
|
|
127
|
+
isLoading: o,
|
|
128
128
|
showSearchIcon: I,
|
|
129
|
-
getShowNoResultMessage:
|
|
130
|
-
getSearchIconColor:
|
|
129
|
+
getShowNoResultMessage: w,
|
|
130
|
+
getSearchIconColor: V,
|
|
131
131
|
getInputIcon: S,
|
|
132
132
|
clear: C,
|
|
133
133
|
openList: y,
|