@agrotools1/at-components 0.5.6 → 0.5.8
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/DatePicker/DatePicker.d.ts +31 -0
- package/dist/DatePicker/DatePicker.helper.d.ts +6 -0
- package/dist/DatePicker/DatePicker.vue.js +111 -100
- package/dist/DatePicker/DatePicker.vue2.js +82 -64
- package/dist/Dropdown/Dropdown.core.vue.js +28 -22
- package/dist/Dropdown/Dropdown.core.vue2.js +48 -42
- package/dist/Dropdown/DropdownContent/DropdownContent.d.ts +2 -0
- package/dist/Dropdown/DropdownContent/DropdownContent.vue.js +12 -0
- package/dist/Dropdown/DropdownContent/DropdownContent.vue2.js +9 -0
- package/dist/Modal/Modal.d.ts +17 -3
- package/dist/Modal/Modal.vue.js +82 -56
- package/dist/Modal/Modal.vue2.js +26 -13
- package/dist/Search/Search.d.ts +16 -0
- package/dist/Search/Search.vue.js +4 -3
- package/dist/Search/Search.vue2.js +24 -19
- package/dist/Select/Multiple/Select.multiple.d.ts +9 -0
- package/dist/Select/Multiple/Select.multiple.vue.js +4 -4
- package/dist/Select/Multiple/Select.multiple.vue2.js +19 -12
- package/dist/Select/Select.core.d.ts +4 -0
- package/dist/Select/Select.core.vue.js +5 -4
- package/dist/Select/Select.core.vue2.js +13 -10
- package/dist/Select/Single/Select.single.d.ts +9 -0
- package/dist/Select/Single/Select.single.vue.js +7 -7
- package/dist/Select/Single/Select.single.vue2.js +33 -26
- package/dist/Select/index.d.ts +18 -0
- package/dist/Stepper/Stepper.vue.js +11 -11
- package/dist/Tabs/Tabs.vue.js +6 -6
- package/dist/Tabs/Tabs.vue3.js +2 -2
- package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +2 -2
- package/dist/Upload/SingleUpload/SingleUpload.vue.js +1 -1
- package/dist/Upload/UploaderInput/UploaderInput.d.ts +4 -1
- package/dist/Upload/UploaderInput/UploaderInput.vue.js +24 -25
- package/dist/Upload/UploaderInput/UploaderInput.vue2.js +11 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as A, ref as n, watch as E, onMounted as H, computed as I } from "vue";
|
|
2
|
+
import L from "./DropdownContent/DropdownContent.vue.js";
|
|
3
|
+
const q = A({
|
|
3
4
|
name: "AtDropdown",
|
|
5
|
+
components: { DropdownContent: L },
|
|
4
6
|
props: {
|
|
5
7
|
isOpen: {
|
|
6
8
|
type: Boolean,
|
|
@@ -20,62 +22,66 @@ const b = Y({
|
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
emits: ["update:isOpen"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const l =
|
|
27
|
-
var x, O, w,
|
|
28
|
-
h.value = window.scrollY
|
|
29
|
-
const e = ((
|
|
25
|
+
setup(p, { emit: f }) {
|
|
26
|
+
const i = n(!1);
|
|
27
|
+
i.value = p.isOpen;
|
|
28
|
+
const l = n(), t = n(), o = n(), h = n(0), a = n(), r = n(), g = () => {
|
|
29
|
+
var m, x, O, w, C, D, S, W, $;
|
|
30
|
+
h.value = window.scrollY;
|
|
31
|
+
const e = (x = (m = t.value) == null ? void 0 : m.children[0]) == null ? void 0 : x.querySelector(
|
|
32
|
+
".AT-INPUT_error-message"
|
|
33
|
+
);
|
|
34
|
+
a.value = (O = t.value) == null ? void 0 : O.getBoundingClientRect();
|
|
35
|
+
const s = (((w = a.value) == null ? void 0 : w.y) ?? 0) + (((D = (C = t.value) == null ? void 0 : C.children[0]) == null ? void 0 : D.clientHeight) ?? 0) - ((e == null ? void 0 : e.clientHeight) ?? 0) + 8 + h.value, v = {
|
|
30
36
|
left: () => {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
x: ((
|
|
34
|
-
y:
|
|
35
|
-
},
|
|
36
|
-
top: `${((
|
|
37
|
-
left: `${((
|
|
37
|
+
var u, c, d;
|
|
38
|
+
o.value = {
|
|
39
|
+
x: ((u = a.value) == null ? void 0 : u.left) ?? 0,
|
|
40
|
+
y: s
|
|
41
|
+
}, r.value = {
|
|
42
|
+
top: `${((c = o.value) == null ? void 0 : c.y) || 0}px`,
|
|
43
|
+
left: `${((d = o.value) == null ? void 0 : d.x) || 0}px`
|
|
38
44
|
};
|
|
39
45
|
},
|
|
40
46
|
right: () => {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
x: (((
|
|
44
|
-
y:
|
|
45
|
-
},
|
|
46
|
-
top: `${((
|
|
47
|
-
left: `${((
|
|
47
|
+
var u, c, d, P, z;
|
|
48
|
+
o.value = {
|
|
49
|
+
x: (((u = a.value) == null ? void 0 : u.left) ?? 0) - ((((c = l.value) == null ? void 0 : c.clientWidth) ?? 0) - (((d = t.value) == null ? void 0 : d.clientWidth) ?? 0)),
|
|
50
|
+
y: s
|
|
51
|
+
}, r.value = {
|
|
52
|
+
top: `${((P = o.value) == null ? void 0 : P.y) || 0}px`,
|
|
53
|
+
left: `${((z = o.value) == null ? void 0 : z.x) || 0}px`
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
|
-
},
|
|
51
|
-
v[
|
|
56
|
+
}, k = window.innerWidth - (((S = a.value) == null ? void 0 : S.right) ?? 0) <= (((W = l.value) == null ? void 0 : W.offsetWidth) ?? 0) ? "right" : p.position;
|
|
57
|
+
v[k](), p.fullSize && (r.value.width = `${(($ = t.value) == null ? void 0 : $.clientWidth) ?? 0}px`);
|
|
52
58
|
};
|
|
53
|
-
|
|
54
|
-
() =>
|
|
59
|
+
E(
|
|
60
|
+
() => p.isOpen,
|
|
55
61
|
(e) => {
|
|
56
|
-
|
|
62
|
+
i.value = e, e && setTimeout(() => g(), 10);
|
|
57
63
|
}
|
|
58
64
|
);
|
|
59
|
-
const
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
document.addEventListener("click",
|
|
65
|
+
const B = async () => f("update:isOpen", !0), y = async () => f("update:isOpen", !1), T = (e) => {
|
|
66
|
+
var s, v;
|
|
67
|
+
i.value && !((s = l == null ? void 0 : l.value) != null && s.contains(e.target)) && !((v = t.value) != null && v.contains(e.target)) && y();
|
|
68
|
+
}, Y = () => f("update:isOpen", !i.value);
|
|
69
|
+
H(() => {
|
|
70
|
+
document.addEventListener("click", T), window.addEventListener("resize", g), g();
|
|
65
71
|
});
|
|
66
|
-
const
|
|
72
|
+
const _ = I(() => ["dialog"]);
|
|
67
73
|
return {
|
|
68
|
-
dialogIsOpen:
|
|
69
|
-
getDialogClass:
|
|
74
|
+
dialogIsOpen: i,
|
|
75
|
+
getDialogClass: _,
|
|
70
76
|
dialogElem: l,
|
|
71
|
-
triggerElem:
|
|
72
|
-
dialogStyle:
|
|
73
|
-
toggleDialog:
|
|
74
|
-
openDialog:
|
|
77
|
+
triggerElem: t,
|
|
78
|
+
dialogStyle: r,
|
|
79
|
+
toggleDialog: Y,
|
|
80
|
+
openDialog: B,
|
|
75
81
|
closeDialog: y
|
|
76
82
|
};
|
|
77
83
|
}
|
|
78
84
|
});
|
|
79
85
|
export {
|
|
80
|
-
|
|
86
|
+
q as default
|
|
81
87
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./DropdownContent.vue2.js";
|
|
2
|
+
import { openBlock as r, createElementBlock as t, renderSlot as n } from "vue";
|
|
3
|
+
import p from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function c(o, s, f, l, a, d) {
|
|
5
|
+
return r(), t("div", null, [
|
|
6
|
+
n(o.$slots, "default")
|
|
7
|
+
]);
|
|
8
|
+
}
|
|
9
|
+
const u = /* @__PURE__ */ p(e, [["render", c]]);
|
|
10
|
+
export {
|
|
11
|
+
u as default
|
|
12
|
+
};
|
package/dist/Modal/Modal.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface ModalProps {
|
|
|
17
17
|
title: string;
|
|
18
18
|
buttons: IModalButtons[];
|
|
19
19
|
dontShowOption: IDontShowOption;
|
|
20
|
+
hideCloseButton: boolean;
|
|
20
21
|
}
|
|
21
22
|
declare const _default: import("vue").DefineComponent<{
|
|
22
23
|
isOpen: {
|
|
@@ -52,13 +53,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
52
53
|
type: PropType<IModalButtons[]>;
|
|
53
54
|
default: undefined;
|
|
54
55
|
};
|
|
56
|
+
hideCloseButton: {
|
|
57
|
+
required: false;
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
55
61
|
}, {
|
|
56
|
-
|
|
62
|
+
dontShowAgain: import("vue").Ref<boolean>;
|
|
63
|
+
firstButton: import("vue").ComputedRef<IModalButtons | undefined>;
|
|
64
|
+
hasSlotFooter: import("vue").ComputedRef<boolean>;
|
|
57
65
|
icons: {
|
|
58
66
|
close: string;
|
|
59
67
|
};
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
remainingButtons: import("vue").ComputedRef<IModalButtons[] | undefined>;
|
|
69
|
+
target: import("vue").Ref<null>;
|
|
62
70
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
63
71
|
isOpen: {
|
|
64
72
|
required: true;
|
|
@@ -93,6 +101,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
101
|
type: PropType<IModalButtons[]>;
|
|
94
102
|
default: undefined;
|
|
95
103
|
};
|
|
104
|
+
hideCloseButton: {
|
|
105
|
+
required: false;
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
96
109
|
}>> & {
|
|
97
110
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
98
111
|
}, {
|
|
@@ -102,5 +115,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
102
115
|
isOpen: boolean;
|
|
103
116
|
dontShowOption: IDontShowOption;
|
|
104
117
|
buttons: IModalButtons[];
|
|
118
|
+
hideCloseButton: boolean;
|
|
105
119
|
}, {}>;
|
|
106
120
|
export default _default;
|
package/dist/Modal/Modal.vue.js
CHANGED
|
@@ -1,96 +1,122 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import S from "./Modal.vue2.js";
|
|
2
|
+
import { resolveComponent as k, openBlock as e, createBlock as m, Transition as $, withCtx as p, createElementBlock as s, createElementVNode as n, normalizeClass as y, toDisplayString as r, createCommentVNode as i, renderSlot as c, normalizeStyle as d, createVNode as b, createTextVNode as B, Fragment as A, renderList as O } from "vue";
|
|
3
3
|
import "./Modal.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import F from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "at-modal-mask"
|
|
8
|
-
},
|
|
8
|
+
}, N = {
|
|
9
9
|
ref: "target",
|
|
10
10
|
class: "at-modal-container"
|
|
11
|
-
},
|
|
11
|
+
}, V = { class: "at-modal-header" }, E = { class: "at-modal-title" }, T = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "at-modal-exit-button"
|
|
14
|
+
}, j = ["src"], D = { class: "at-modal-body" }, I = {
|
|
12
15
|
key: 0,
|
|
13
16
|
class: "at-modal-footer-left"
|
|
17
|
+
}, L = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "at-modal-remainingButtonsContainer"
|
|
14
20
|
};
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return
|
|
18
|
-
default:
|
|
19
|
-
var
|
|
21
|
+
function M(o, a, q, G, H, J) {
|
|
22
|
+
const w = k("AtCheckbox"), u = k("AtButton");
|
|
23
|
+
return e(), m($, { name: "at-modal-transition" }, {
|
|
24
|
+
default: p(() => {
|
|
25
|
+
var h, g, v;
|
|
20
26
|
return [
|
|
21
|
-
o.isOpen ? (
|
|
22
|
-
|
|
23
|
-
class:
|
|
27
|
+
o.isOpen ? (e(), s("div", z, [
|
|
28
|
+
n("div", {
|
|
29
|
+
class: y(["at-modal", [`at-modal-${o.$props.size}`]])
|
|
24
30
|
}, [
|
|
25
|
-
|
|
26
|
-
class:
|
|
31
|
+
n("div", {
|
|
32
|
+
class: y(["at-modal-badge", [`at-modal-${o.$props.type}`]])
|
|
27
33
|
}, null, 2),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
n("div", N, [
|
|
35
|
+
n("div", V, [
|
|
36
|
+
n("span", E, r(o.title), 1),
|
|
37
|
+
o.hideCloseButton ? i("", !0) : (e(), s("span", T, [
|
|
38
|
+
n("img", {
|
|
33
39
|
src: o.icons.close,
|
|
34
40
|
alt: "Fechar modal",
|
|
35
|
-
onClick: a[0] || (a[0] = (
|
|
36
|
-
}, null, 8,
|
|
37
|
-
])
|
|
41
|
+
onClick: a[0] || (a[0] = (t) => o.$emit("close"))
|
|
42
|
+
}, null, 8, j)
|
|
43
|
+
]))
|
|
38
44
|
]),
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
n("div", D, [
|
|
46
|
+
c(o.$slots, "default", {}, void 0, !0)
|
|
41
47
|
]),
|
|
42
|
-
|
|
48
|
+
n("div", {
|
|
43
49
|
class: "at-modal-footer",
|
|
44
|
-
style:
|
|
50
|
+
style: d({
|
|
45
51
|
"grid-template-columns": o.hasSlotFooter || !o.dontShowOption.show ? "1fr" : void 0
|
|
46
52
|
})
|
|
47
53
|
}, [
|
|
48
|
-
!o.hasSlotFooter && o.dontShowOption.show ? (
|
|
49
|
-
|
|
54
|
+
!o.hasSlotFooter && o.dontShowOption.show ? (e(), s("div", I, [
|
|
55
|
+
b(w, {
|
|
50
56
|
size: "20",
|
|
51
57
|
class: "at-modal-dont-show-btn",
|
|
52
58
|
style: { "margin-right": "8px" },
|
|
53
|
-
onClick: a[1] || (a[1] = (
|
|
59
|
+
onClick: a[1] || (a[1] = (t) => o.dontShowAgain = !o.dontShowAgain)
|
|
54
60
|
}),
|
|
55
|
-
|
|
56
|
-
])) :
|
|
57
|
-
o.hasSlotFooter ?
|
|
61
|
+
n("span", null, r((h = o.$props.dontShowOption) == null ? void 0 : h.text), 1)
|
|
62
|
+
])) : i("", !0),
|
|
63
|
+
o.hasSlotFooter ? i("", !0) : (e(), s("div", {
|
|
58
64
|
key: 1,
|
|
59
65
|
class: "at-modal-footer-right",
|
|
60
|
-
style:
|
|
66
|
+
style: d({
|
|
61
67
|
width: o.dontShowOption.show ? void 0 : "100%",
|
|
62
68
|
justifyContent: o.dontShowOption.show ? void 0 : "space-between"
|
|
63
69
|
})
|
|
64
70
|
}, [
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
o.firstButton ? (e(), m(u, {
|
|
72
|
+
key: 0,
|
|
73
|
+
variant: o.firstButton.variant,
|
|
74
|
+
style: d({
|
|
75
|
+
"margin-left": o.remainingButtons && ((g = o.remainingButtons) == null ? void 0 : g.length) > 0 ? void 0 : "auto",
|
|
76
|
+
"margin-right": ((v = o.$props.buttons) == null ? void 0 : v.length) === 1 ? void 0 : "16px"
|
|
77
|
+
}),
|
|
78
|
+
disabled: o.firstButton.disabled,
|
|
79
|
+
onClick: a[2] || (a[2] = (t) => {
|
|
80
|
+
var l;
|
|
81
|
+
return (l = o.firstButton) == null ? void 0 : l.onClick(t, o.dontShowAgain);
|
|
82
|
+
})
|
|
83
|
+
}, {
|
|
84
|
+
default: p(() => [
|
|
85
|
+
B(r(o.firstButton.label), 1)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["variant", "style", "disabled"])) : i("", !0),
|
|
89
|
+
o.remainingButtons && o.remainingButtons.length > 0 ? (e(), s("div", L, [
|
|
90
|
+
(e(!0), s(A, null, O(o.remainingButtons, (t, l) => {
|
|
91
|
+
var f;
|
|
92
|
+
return e(), m(u, {
|
|
93
|
+
key: t.key,
|
|
94
|
+
variant: t.variant,
|
|
95
|
+
style: d({
|
|
96
|
+
"margin-right": l + 1 === ((f = o.remainingButtons) == null ? void 0 : f.length) ? void 0 : "16px"
|
|
97
|
+
}),
|
|
98
|
+
disabled: t.disabled,
|
|
99
|
+
onClick: (C) => t.onClick(C, o.dontShowAgain)
|
|
100
|
+
}, {
|
|
101
|
+
default: p(() => [
|
|
102
|
+
B(r(t.label), 1)
|
|
103
|
+
]),
|
|
104
|
+
_: 2
|
|
105
|
+
}, 1032, ["variant", "style", "disabled", "onClick"]);
|
|
106
|
+
}), 128))
|
|
107
|
+
])) : i("", !0)
|
|
82
108
|
], 4)),
|
|
83
|
-
|
|
109
|
+
c(o.$slots, "footer", {}, void 0, !0)
|
|
84
110
|
], 4)
|
|
85
111
|
], 512)
|
|
86
112
|
], 2)
|
|
87
|
-
])) :
|
|
113
|
+
])) : i("", !0)
|
|
88
114
|
];
|
|
89
115
|
}),
|
|
90
116
|
_: 3
|
|
91
117
|
});
|
|
92
118
|
}
|
|
93
|
-
const
|
|
119
|
+
const U = /* @__PURE__ */ F(S, [["render", M], ["__scopeId", "data-v-dc3b76a4"]]);
|
|
94
120
|
export {
|
|
95
|
-
|
|
121
|
+
U as default
|
|
96
122
|
};
|
package/dist/Modal/Modal.vue2.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import e from "./images/cross.svg.js";
|
|
1
|
+
import { defineComponent as a, ref as i, computed as o } from "vue";
|
|
3
2
|
import "../Accordion/Accordion.vue2.js";
|
|
4
3
|
import "../Accordion/Accordion.vue3.js";
|
|
5
4
|
import "../Avatar/Avatar.vue2.js";
|
|
6
5
|
import "../Avatar/Avatar.vue3.js";
|
|
7
|
-
import
|
|
6
|
+
import l from "../Button/Button.vue.js";
|
|
8
7
|
import "../CardWithInsights/CardWithInsights.vue2.js";
|
|
9
8
|
import "../CardWithInsights/CardWithInsights.vue3.js";
|
|
10
9
|
import "../CardWithInsights/CardWithInsights.vue4.js";
|
|
11
|
-
import
|
|
10
|
+
import u from "../Checkbox/Checkbox.vue.js";
|
|
12
11
|
import "../ColorPicker/ColorPicker.vue2.js";
|
|
13
12
|
import "../ColorPicker/ColorPicker.vue3.js";
|
|
14
13
|
import "../DataTable/DataTable.vue2.js";
|
|
@@ -68,9 +67,10 @@ import "../Tooltip/Tooltip.vue2.js";
|
|
|
68
67
|
import "../Tooltip/Tooltip.vue3.js";
|
|
69
68
|
import "../Upload/Upload.vue2.js";
|
|
70
69
|
import "../Upload/Upload.vue3.js";
|
|
71
|
-
|
|
70
|
+
import f from "./images/cross.svg.js";
|
|
71
|
+
const jt = a({
|
|
72
72
|
name: "AtModal",
|
|
73
|
-
components: { AtButton:
|
|
73
|
+
components: { AtButton: l, AtCheckbox: u },
|
|
74
74
|
props: {
|
|
75
75
|
isOpen: {
|
|
76
76
|
required: !0,
|
|
@@ -101,21 +101,34 @@ const Bt = p({
|
|
|
101
101
|
required: !1,
|
|
102
102
|
type: Array,
|
|
103
103
|
default: void 0
|
|
104
|
+
},
|
|
105
|
+
hideCloseButton: {
|
|
106
|
+
required: !1,
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: !1
|
|
104
109
|
}
|
|
105
110
|
},
|
|
106
111
|
emits: ["close"],
|
|
107
|
-
setup(
|
|
108
|
-
const
|
|
112
|
+
setup(r, { slots: p }) {
|
|
113
|
+
const m = i(null), e = i(!1), n = o(() => {
|
|
114
|
+
var t;
|
|
115
|
+
return (t = r.buttons) == null ? void 0 : t.at(0);
|
|
116
|
+
}), s = o(() => {
|
|
117
|
+
var t;
|
|
118
|
+
return (t = r.buttons) == null ? void 0 : t.slice(1);
|
|
119
|
+
});
|
|
109
120
|
return {
|
|
110
|
-
|
|
121
|
+
dontShowAgain: e,
|
|
122
|
+
firstButton: n,
|
|
123
|
+
hasSlotFooter: o(() => !!p.footer),
|
|
111
124
|
icons: {
|
|
112
|
-
close:
|
|
125
|
+
close: f
|
|
113
126
|
},
|
|
114
|
-
|
|
115
|
-
|
|
127
|
+
remainingButtons: s,
|
|
128
|
+
target: m
|
|
116
129
|
};
|
|
117
130
|
}
|
|
118
131
|
});
|
|
119
132
|
export {
|
|
120
|
-
|
|
133
|
+
jt as default
|
|
121
134
|
};
|
package/dist/Search/Search.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface SearchProps {
|
|
|
8
8
|
hasAutoComplete?: boolean | true;
|
|
9
9
|
hasFilterOption?: boolean | true;
|
|
10
10
|
isDisabled?: boolean | false;
|
|
11
|
+
error?: {
|
|
12
|
+
value: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
11
15
|
}
|
|
12
16
|
declare const _default: import("vue").DefineComponent<{
|
|
13
17
|
label: {
|
|
@@ -42,6 +46,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
46
|
type: PropType<boolean | undefined>;
|
|
43
47
|
default: boolean;
|
|
44
48
|
};
|
|
49
|
+
error: {
|
|
50
|
+
type: () => SearchProps["error"];
|
|
51
|
+
default: () => void;
|
|
52
|
+
};
|
|
45
53
|
id: {
|
|
46
54
|
type: StringConstructor;
|
|
47
55
|
required: false;
|
|
@@ -92,6 +100,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
100
|
type: PropType<boolean | undefined>;
|
|
93
101
|
default: boolean;
|
|
94
102
|
};
|
|
103
|
+
error: {
|
|
104
|
+
type: () => SearchProps["error"];
|
|
105
|
+
default: () => void;
|
|
106
|
+
};
|
|
95
107
|
id: {
|
|
96
108
|
type: StringConstructor;
|
|
97
109
|
required: false;
|
|
@@ -101,6 +113,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
113
|
onOnSelectedItem?: ((...args: any[]) => any) | undefined;
|
|
102
114
|
}, {
|
|
103
115
|
label: string;
|
|
116
|
+
error: {
|
|
117
|
+
value: boolean;
|
|
118
|
+
message: string;
|
|
119
|
+
} | undefined;
|
|
104
120
|
withIcon: boolean;
|
|
105
121
|
modelValue: string;
|
|
106
122
|
autoCompleteList: DropdownListItem[];
|
|
@@ -29,20 +29,21 @@ function h(e, f, b, I, S, C) {
|
|
|
29
29
|
autocomplete: "off",
|
|
30
30
|
disabled: e.isDisabled,
|
|
31
31
|
"use-clear-button": !0,
|
|
32
|
-
icon: { name: "AtSearchIcon" }
|
|
32
|
+
icon: { name: "AtSearchIcon" },
|
|
33
|
+
error: e.error
|
|
33
34
|
}, e.$attrs, {
|
|
34
35
|
"onUpdate:modelValue": e.handleChangeValue,
|
|
35
36
|
onFocus: e.openList,
|
|
36
37
|
onFocusout: e.closeList,
|
|
37
38
|
onClearInput: e.clear
|
|
38
|
-
}), null, 16, ["id", "label", "model-value", "disabled", "onUpdate:modelValue", "onFocus", "onFocusout", "onClearInput"]),
|
|
39
|
+
}), null, 16, ["id", "label", "model-value", "disabled", "error", "onUpdate:modelValue", "onFocus", "onFocusout", "onClearInput"]),
|
|
39
40
|
e.showSearchIcon ? (s(), a("span", c)) : u("", !0)
|
|
40
41
|
]),
|
|
41
42
|
_: 1
|
|
42
43
|
}, 8, ["id", "drop-down-list", "is-open", "show-no-result-message", "onOnSave"])
|
|
43
44
|
], 2);
|
|
44
45
|
}
|
|
45
|
-
const V = /* @__PURE__ */ m(r, [["render", h], ["__scopeId", "data-v-
|
|
46
|
+
const V = /* @__PURE__ */ m(r, [["render", h], ["__scopeId", "data-v-3933bd5b"]]);
|
|
46
47
|
export {
|
|
47
48
|
V as default
|
|
48
49
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as g, ref as l, computed as o } from "vue";
|
|
2
2
|
import { AtCircleXMarkSolidIcon as V } from "../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtCircleXMarkSolidIcon/index.js";
|
|
3
|
-
import { AtSearchIcon as
|
|
4
|
-
import { AtInput as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
AtSearchIcon:
|
|
3
|
+
import { AtSearchIcon as O } from "../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtSearchIcon/index.js";
|
|
4
|
+
import { AtInput as w } from "../Input/index.js";
|
|
5
|
+
import x from "../List/components/List.vue.js";
|
|
6
|
+
const F = {
|
|
7
|
+
AtSearchIcon: O,
|
|
8
8
|
AtCircleXMarkSolidIcon: V
|
|
9
9
|
}, D = g({
|
|
10
10
|
name: "AtSearch",
|
|
11
11
|
components: {
|
|
12
|
-
AtInput:
|
|
13
|
-
AtLista:
|
|
14
|
-
...
|
|
12
|
+
AtInput: w.Text,
|
|
13
|
+
AtLista: x,
|
|
14
|
+
...F
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
label: {
|
|
@@ -46,6 +46,11 @@ const O = {
|
|
|
46
46
|
type: Boolean,
|
|
47
47
|
default: !1
|
|
48
48
|
},
|
|
49
|
+
error: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: () => {
|
|
52
|
+
}
|
|
53
|
+
},
|
|
49
54
|
id: {
|
|
50
55
|
type: String,
|
|
51
56
|
required: !1
|
|
@@ -68,20 +73,20 @@ const O = {
|
|
|
68
73
|
}, I = o(() => {
|
|
69
74
|
var e;
|
|
70
75
|
if (t.hasFilterOption) {
|
|
71
|
-
const
|
|
76
|
+
const i = (d, m) => d.text.toUpperCase().includes(m.toUpperCase());
|
|
72
77
|
return t.autoCompleteList.filter(
|
|
73
|
-
(d) =>
|
|
78
|
+
(d) => i(d, t.modelValue)
|
|
74
79
|
);
|
|
75
80
|
}
|
|
76
81
|
return (e = s.value) != null && e.length ? s.value : t.autoCompleteList;
|
|
77
|
-
}),
|
|
78
|
-
const
|
|
79
|
-
|
|
82
|
+
}), r = l(), S = (e) => {
|
|
83
|
+
const i = e.text;
|
|
84
|
+
r.value = e, n("onSelectedItem", e), n("update:modelValue", i);
|
|
80
85
|
}, L = () => {
|
|
81
|
-
n("onSelectedItem", null), a.value = !1,
|
|
82
|
-
},
|
|
83
|
-
() => t.withIcon && a.value && !
|
|
84
|
-
),
|
|
86
|
+
n("onSelectedItem", null), a.value = !1, r.value = null;
|
|
87
|
+
}, y = o(
|
|
88
|
+
() => t.withIcon && a.value && !r.value
|
|
89
|
+
), C = o(
|
|
85
90
|
() => t.isDisabled ? "var(--at-medium-grey)" : ""
|
|
86
91
|
), A = o(
|
|
87
92
|
() => !!t.modelValue && !a.value
|
|
@@ -91,9 +96,9 @@ const O = {
|
|
|
91
96
|
autocompleteListIsOpen: f,
|
|
92
97
|
autoCompleteListFiltered: I,
|
|
93
98
|
isLoading: a,
|
|
94
|
-
showSearchIcon:
|
|
99
|
+
showSearchIcon: y,
|
|
95
100
|
getShowNoResultMessage: A,
|
|
96
|
-
getSearchIconColor:
|
|
101
|
+
getSearchIconColor: C,
|
|
97
102
|
clear: L,
|
|
98
103
|
openList: p,
|
|
99
104
|
closeList: h,
|
|
@@ -34,6 +34,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
type: StringConstructor;
|
|
35
35
|
default: string;
|
|
36
36
|
};
|
|
37
|
+
error: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
default: () => void;
|
|
40
|
+
};
|
|
37
41
|
}, {
|
|
38
42
|
onSelectedValueChange: (item: SelectItemProps, isChecked: boolean) => void;
|
|
39
43
|
onSelectedItemClick: (selectedValue: string, isOpen?: boolean) => void;
|
|
@@ -96,6 +100,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
100
|
type: StringConstructor;
|
|
97
101
|
default: string;
|
|
98
102
|
};
|
|
103
|
+
error: {
|
|
104
|
+
type: ObjectConstructor;
|
|
105
|
+
default: () => void;
|
|
106
|
+
};
|
|
99
107
|
}>> & {
|
|
100
108
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
101
109
|
"onUpdate:items"?: ((...args: any[]) => any) | undefined;
|
|
@@ -103,6 +111,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
111
|
}, {
|
|
104
112
|
required: boolean;
|
|
105
113
|
label: string;
|
|
114
|
+
error: Record<string, any>;
|
|
106
115
|
disabled: boolean;
|
|
107
116
|
modelValue: string[] | SelectItemProps[];
|
|
108
117
|
items: SelectItemProps[];
|