@agrotools1/at-components 0.5.6 → 0.5.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/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/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/Tabs/Tabs.vue.js +5 -5
- 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/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[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import u from "./Select.multiple.vue2.js";
|
|
2
|
-
import { resolveComponent as i, openBlock as o, createElementBlock as l, createVNode as p, Fragment as m, renderList as k, createBlock as
|
|
2
|
+
import { resolveComponent as i, openBlock as o, createElementBlock as l, createVNode as p, Fragment as m, renderList as k, createBlock as b, createCommentVNode as f } from "vue";
|
|
3
3
|
import "./Select.multiple.vue3.js";
|
|
4
4
|
import C from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const h = ["aria-disabled"], v = {
|
|
@@ -31,7 +31,7 @@ function g(e, n, I, S, y, A) {
|
|
|
31
31
|
"is-multiple": !0
|
|
32
32
|
}, null, 8, ["selected-items", "label", "on-selected-item-click", "items", "disabled", "separator", "required"]),
|
|
33
33
|
e.isOpen ? (o(), l("div", v, [
|
|
34
|
-
(o(!0), l(m, null, k(e.myItems, (t) => (o(),
|
|
34
|
+
(o(!0), l(m, null, k(e.myItems, (t) => (o(), b(d, {
|
|
35
35
|
key: t.value,
|
|
36
36
|
text: t.text,
|
|
37
37
|
value: t.value,
|
|
@@ -49,10 +49,10 @@ function g(e, n, I, S, y, A) {
|
|
|
49
49
|
(s = t.onCheckboxChange) == null || s.call(t, { ...a, item: t }), await e.onSelectedValueChange({ ...t }, r), r ? t.isSelected = !0 : t.isSelected = !1, e.$emit("update:items", e.myItems), e.isInternalChange = !1;
|
|
50
50
|
}
|
|
51
51
|
}, null, 8, ["text", "value", "icon", "data-text", "checkbox-value", "on-click", "on-checkbox-change"]))), 128))
|
|
52
|
-
])) :
|
|
52
|
+
])) : f("", !0)
|
|
53
53
|
], 8, h);
|
|
54
54
|
}
|
|
55
|
-
const q = /* @__PURE__ */ C(u, [["render", g], ["__scopeId", "data-v-
|
|
55
|
+
const q = /* @__PURE__ */ C(u, [["render", g], ["__scopeId", "data-v-caf79e23"]]);
|
|
56
56
|
export {
|
|
57
57
|
q as default
|
|
58
58
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as g, ref as r,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as g, ref as r, provide as A, computed as h, watch as S, onMounted as w, onUnmounted as C } from "vue";
|
|
2
|
+
import _ from "../Item/Item.vue.js";
|
|
3
|
+
import b from "../Select.core.vue.js";
|
|
4
|
+
import k from "../imgs/indicator.svg.js";
|
|
5
|
+
const j = g({
|
|
6
6
|
name: "AtMultipleSelect",
|
|
7
7
|
components: {
|
|
8
|
-
AtSingleCore:
|
|
9
|
-
AtItem:
|
|
8
|
+
AtSingleCore: b,
|
|
9
|
+
AtItem: _
|
|
10
10
|
},
|
|
11
11
|
props: {
|
|
12
12
|
label: {
|
|
@@ -38,11 +38,18 @@ const T = g({
|
|
|
38
38
|
separator: {
|
|
39
39
|
type: String,
|
|
40
40
|
default: ","
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => {
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
47
|
},
|
|
43
48
|
emits: ["update:items", "update:selectedItems", "update:modelValue"],
|
|
44
49
|
setup(n, i) {
|
|
45
|
-
const c = r(!1), f = r(null), u = r(n.items), d = r(!1)
|
|
50
|
+
const c = r(!1), f = r(null), u = r(n.items), d = r(!1);
|
|
51
|
+
A("error", n.error);
|
|
52
|
+
const o = r([]), I = h(
|
|
46
53
|
() => [...o.value].map((e) => e.value).join(n.separator)
|
|
47
54
|
), m = (e, a) => {
|
|
48
55
|
const l = u.value.find(
|
|
@@ -94,9 +101,9 @@ const T = g({
|
|
|
94
101
|
S(
|
|
95
102
|
() => n.modelValue,
|
|
96
103
|
(e) => y(e)
|
|
97
|
-
),
|
|
104
|
+
), w(() => {
|
|
98
105
|
y(n.modelValue), window.addEventListener("click", p);
|
|
99
|
-
}),
|
|
106
|
+
}), C(() => {
|
|
100
107
|
window.removeEventListener("click", p), u.value.map((e) => e.isSelected = !1);
|
|
101
108
|
});
|
|
102
109
|
const v = () => {
|
|
@@ -120,11 +127,11 @@ const T = g({
|
|
|
120
127
|
isOpen: c,
|
|
121
128
|
containerRef: f,
|
|
122
129
|
icons: {
|
|
123
|
-
indicatorSvg:
|
|
130
|
+
indicatorSvg: k
|
|
124
131
|
}
|
|
125
132
|
};
|
|
126
133
|
}
|
|
127
134
|
});
|
|
128
135
|
export {
|
|
129
|
-
|
|
136
|
+
j as default
|
|
130
137
|
};
|
|
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
}, {
|
|
49
49
|
id: string;
|
|
50
50
|
handleValue: () => string;
|
|
51
|
+
getError: import("vue").ComputedRef<{
|
|
52
|
+
message: string;
|
|
53
|
+
value: boolean;
|
|
54
|
+
} | undefined>;
|
|
51
55
|
atInput: import("vue").Ref<null>;
|
|
52
56
|
inputModelValue: import("vue").Ref<string>;
|
|
53
57
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -2,11 +2,11 @@ import t from "./Select.core.vue2.js";
|
|
|
2
2
|
import { resolveComponent as a, openBlock as n, createBlock as i, mergeProps as s } from "vue";
|
|
3
3
|
import p from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
function d(e, o, u, m, c, b) {
|
|
5
|
-
const
|
|
6
|
-
return n(), i(
|
|
5
|
+
const r = a("AtInput");
|
|
6
|
+
return n(), i(r, s(e.$props, {
|
|
7
7
|
ref: "atInput",
|
|
8
8
|
modelValue: e.inputModelValue,
|
|
9
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
9
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.inputModelValue = l),
|
|
10
10
|
type: "button",
|
|
11
11
|
role: "combobox",
|
|
12
12
|
cursor: "pointer",
|
|
@@ -19,10 +19,11 @@ function d(e, o, u, m, c, b) {
|
|
|
19
19
|
separator: e.separator,
|
|
20
20
|
required: e.required,
|
|
21
21
|
disabled: e.disabled,
|
|
22
|
+
error: e.getError,
|
|
22
23
|
icon: { name: "AtAngleDownSolidIcon" },
|
|
23
24
|
"aria-autocomplete": "none",
|
|
24
25
|
class: "AT-SELECT_container"
|
|
25
|
-
}), null, 16, ["modelValue", "on-selected-item-click", "selected-items", "label", "aria-controls", "aria-label", "separator", "required", "disabled"]);
|
|
26
|
+
}), null, 16, ["modelValue", "on-selected-item-click", "selected-items", "label", "aria-controls", "aria-label", "separator", "required", "disabled", "error"]);
|
|
26
27
|
}
|
|
27
28
|
const k = /* @__PURE__ */ p(t, [["render", d]]);
|
|
28
29
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { AtInput as
|
|
1
|
+
import { defineComponent as f, ref as r, computed as i, watch as c, inject as p } from "vue";
|
|
2
|
+
import { AtInput as m } from "../Input/index.js";
|
|
3
3
|
import "./Item/Item.vue2.js";
|
|
4
4
|
import "./Item/Item.vue3.js";
|
|
5
|
-
const
|
|
5
|
+
const S = f({
|
|
6
6
|
name: "AtSelect",
|
|
7
7
|
components: {
|
|
8
|
-
AtInput:
|
|
8
|
+
AtInput: m.Text
|
|
9
9
|
},
|
|
10
10
|
props: {
|
|
11
11
|
value: {
|
|
@@ -46,7 +46,7 @@ const I = d({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
setup(e) {
|
|
49
|
-
const
|
|
49
|
+
const o = r(null), l = r(""), u = i(() => {
|
|
50
50
|
var t;
|
|
51
51
|
return typeof e.value == "string" ? e.value : (t = e.value) == null ? void 0 : t.value;
|
|
52
52
|
}), a = () => {
|
|
@@ -54,25 +54,28 @@ const I = d({
|
|
|
54
54
|
if (e.isMultiple)
|
|
55
55
|
return "";
|
|
56
56
|
const t = (n = e.items) == null ? void 0 : n.find(
|
|
57
|
-
(
|
|
57
|
+
(d) => d.value === u.value
|
|
58
58
|
);
|
|
59
59
|
return t ? t.text : (console.warn(
|
|
60
60
|
`The default value "${u.value}" is not included in the items array.`
|
|
61
61
|
), "");
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
c(
|
|
64
64
|
() => e.value,
|
|
65
65
|
() => {
|
|
66
66
|
l.value = a() || "";
|
|
67
67
|
}
|
|
68
|
-
), l.value = a() || ""
|
|
68
|
+
), l.value = a() || "";
|
|
69
|
+
const s = i(() => p("error"));
|
|
70
|
+
return {
|
|
69
71
|
id: `at-select-${Math.random().toString(36).substr(2, 9)}`,
|
|
70
72
|
handleValue: a,
|
|
71
|
-
|
|
73
|
+
getError: s,
|
|
74
|
+
atInput: o,
|
|
72
75
|
inputModelValue: l
|
|
73
76
|
};
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
79
|
export {
|
|
77
|
-
|
|
80
|
+
S as default
|
|
78
81
|
};
|
|
@@ -27,6 +27,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
type: BooleanConstructor;
|
|
28
28
|
default: boolean;
|
|
29
29
|
};
|
|
30
|
+
error: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
default: () => void;
|
|
33
|
+
};
|
|
30
34
|
}, {
|
|
31
35
|
onSelectedValueChange: (item: SelectItemProps) => void;
|
|
32
36
|
selectedValue: import("vue").Ref<string | {
|
|
@@ -68,11 +72,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
72
|
type: BooleanConstructor;
|
|
69
73
|
default: boolean;
|
|
70
74
|
};
|
|
75
|
+
error: {
|
|
76
|
+
type: ObjectConstructor;
|
|
77
|
+
default: () => void;
|
|
78
|
+
};
|
|
71
79
|
}>> & {
|
|
72
80
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
73
81
|
}, {
|
|
74
82
|
required: boolean;
|
|
75
83
|
label: string;
|
|
84
|
+
error: Record<string, any>;
|
|
76
85
|
modelValue: string | SelectItemProps;
|
|
77
86
|
items: SelectItemProps[];
|
|
78
87
|
emitValue: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as l, openBlock as t, createElementBlock as r, createVNode as
|
|
1
|
+
import p from "./Select.single.vue2.js";
|
|
2
|
+
import { resolveComponent as l, openBlock as t, createElementBlock as r, createVNode as u, withModifiers as c, Fragment as v, renderList as f, createBlock as C, createCommentVNode as k } from "vue";
|
|
3
3
|
import "./Select.single.vue3.js";
|
|
4
4
|
import m from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
function g(e, o, A, I, S, y) {
|
|
@@ -11,7 +11,7 @@ function g(e, o, A, I, S, y) {
|
|
|
11
11
|
e.open = !e.open, e.rotateIcon();
|
|
12
12
|
})
|
|
13
13
|
}, [
|
|
14
|
-
|
|
14
|
+
u(i, {
|
|
15
15
|
value: e.selectedValue,
|
|
16
16
|
required: e.required,
|
|
17
17
|
label: e.label,
|
|
@@ -27,7 +27,7 @@ function g(e, o, A, I, S, y) {
|
|
|
27
27
|
e.open = !1, e.rotateIcon();
|
|
28
28
|
}, ["stop"]))
|
|
29
29
|
}, [
|
|
30
|
-
(t(!0), r(
|
|
30
|
+
(t(!0), r(v, null, f(e.items, (n) => (t(), C(s, {
|
|
31
31
|
key: n.value,
|
|
32
32
|
text: n.text,
|
|
33
33
|
value: n.value,
|
|
@@ -35,15 +35,15 @@ function g(e, o, A, I, S, y) {
|
|
|
35
35
|
icon: n.icon,
|
|
36
36
|
"aria-selected": n.value === e.valueOfModel,
|
|
37
37
|
"data-text": n.text,
|
|
38
|
-
"on-click": async (
|
|
38
|
+
"on-click": async (d) => {
|
|
39
39
|
var a;
|
|
40
|
-
e.isInternalChange = !0, await e.onSelectedValueChange(n), (a = n.onClick) == null || a.call(n,
|
|
40
|
+
e.isInternalChange = !0, await e.onSelectedValueChange(n), (a = n.onClick) == null || a.call(n, d), e.isInternalChange = !1;
|
|
41
41
|
}
|
|
42
42
|
}, null, 8, ["text", "value", "type", "icon", "aria-selected", "data-text", "on-click"]))), 128))
|
|
43
43
|
])) : k("", !0)
|
|
44
44
|
], 512);
|
|
45
45
|
}
|
|
46
|
-
const V = /* @__PURE__ */ m(
|
|
46
|
+
const V = /* @__PURE__ */ m(p, [["render", g], ["__scopeId", "data-v-95a0dded"]]);
|
|
47
47
|
export {
|
|
48
48
|
V as default
|
|
49
49
|
};
|