@agrotools1/at-components 0.5.5 → 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/DataTable/Column/Column.vue.js +5 -5
- package/dist/DataTable/Column/Column.vue2.js +57 -36
- 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,20 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { monthTranslationObj as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as _, ref as l, computed as o, watch as g } from "vue";
|
|
2
|
+
import U from "../Button/Button.vue.js";
|
|
3
|
+
import E from "../Input/Input.core.vue.js";
|
|
4
|
+
import { monthTranslationObj as b, weekInitialsObject as h, cancelTranslation as z, saveTranslation as G, placeholderTranslation as L, isUsing12HourFormat as J } from "./DatePicker.helper.js";
|
|
5
|
+
import K from "../Dropdown/Dropdown.core.vue.js";
|
|
6
|
+
import Q from "./DatePickerCalendar/DatePickerCalendar.vue.js";
|
|
7
|
+
import W from "./DatePickerHeader/DatePickerHeader.vue.js";
|
|
8
|
+
import X from "./DatePickerListSelector/DatePickerListSelector.vue.js";
|
|
9
|
+
import Z from "./DatePickerTime/DatePickerTime.vue.js";
|
|
10
|
+
const se = _({
|
|
10
11
|
name: "AtDatePicker",
|
|
11
12
|
components: {
|
|
12
|
-
AtButton:
|
|
13
|
-
AtCoreInput:
|
|
14
|
-
AtDatePickerHeader:
|
|
15
|
-
AtDatePickerCalendar:
|
|
16
|
-
AtDatePickerTime:
|
|
17
|
-
AtDatePickerListSelector:
|
|
13
|
+
AtButton: U,
|
|
14
|
+
AtCoreInput: E,
|
|
15
|
+
AtDatePickerHeader: W,
|
|
16
|
+
AtDatePickerCalendar: Q,
|
|
17
|
+
AtDatePickerTime: Z,
|
|
18
|
+
AtDatePickerListSelector: X,
|
|
19
|
+
AtDropdown: K
|
|
18
20
|
},
|
|
19
21
|
props: {
|
|
20
22
|
value: {
|
|
@@ -78,66 +80,81 @@ const ue = j({
|
|
|
78
80
|
type: Boolean,
|
|
79
81
|
default: !1,
|
|
80
82
|
validator: (e) => typeof e == "boolean"
|
|
83
|
+
},
|
|
84
|
+
position: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "left"
|
|
87
|
+
},
|
|
88
|
+
id: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: ""
|
|
91
|
+
},
|
|
92
|
+
error: {
|
|
93
|
+
type: Object,
|
|
94
|
+
default: () => {
|
|
95
|
+
}
|
|
81
96
|
}
|
|
82
97
|
},
|
|
83
98
|
emits: ["update:value", "confirmBoxConfirmed"],
|
|
84
|
-
setup(e,
|
|
85
|
-
const F = /* @__PURE__ */ new Date(),
|
|
99
|
+
setup(e, S) {
|
|
100
|
+
const F = /* @__PURE__ */ new Date(), i = l({ ...e.value }), r = l(e.forceFocus), s = l(/* @__PURE__ */ new Date()), m = l("calendar"), I = o(() => s.value.getMonth() + 1), D = o(() => s.value.getFullYear()), k = l(""), v = l(-1), d = l(D.value), q = l(null), c = l(!1), M = l(!1), y = o(() => b && e.setLanguage in b ? b[e.setLanguage] : []), w = o(
|
|
86
101
|
() => y.value.map((t, a) => ({
|
|
87
102
|
name: t.slice(0, 3),
|
|
88
|
-
value: `${
|
|
103
|
+
value: `${d.value}-${a + 1}`
|
|
89
104
|
}))
|
|
90
|
-
),
|
|
105
|
+
), H = l(
|
|
91
106
|
Array.from({ length: 101 }, () => F.getFullYear() - 50).map(
|
|
92
107
|
(t, a) => ({
|
|
93
108
|
name: String(t + a),
|
|
94
109
|
value: String(t + a)
|
|
95
110
|
})
|
|
96
111
|
)
|
|
97
|
-
),
|
|
98
|
-
cancel:
|
|
99
|
-
save:
|
|
100
|
-
})),
|
|
101
|
-
const t = e.useRange ?
|
|
112
|
+
), P = o(() => h && e.setLanguage in h ? h[e.setLanguage] : []), A = o(() => ({
|
|
113
|
+
cancel: z[e.setLanguage],
|
|
114
|
+
save: G[e.setLanguage]
|
|
115
|
+
})), R = o(() => {
|
|
116
|
+
const t = e.useRange ? L[e.setLanguage].dateStart : L[e.setLanguage].date;
|
|
102
117
|
let a = "";
|
|
103
|
-
if (M.value ||
|
|
104
|
-
const n = e.useConfirmBox ?
|
|
118
|
+
if (M.value || r.value || e.value.startDate) {
|
|
119
|
+
const n = e.useConfirmBox ? i.value : e.value;
|
|
105
120
|
n.startDate ? (a = n.startDate.toLocaleDateString(), e.useTimeInput && !e.useRange && (e.force12HourTime ? a += ` ${n.startDate.toLocaleTimeString("en-us")}` : a += ` ${n.startDate.toLocaleTimeString()}`)) : a = t;
|
|
106
|
-
const u = n.endDate ? n.endDate.toLocaleDateString() :
|
|
121
|
+
const u = n.endDate ? n.endDate.toLocaleDateString() : L[e.setLanguage].dateEnd;
|
|
107
122
|
return e.useRange ? `${a} - ${u}` : a;
|
|
108
123
|
}
|
|
109
124
|
return "";
|
|
110
|
-
}), C = o(() =>
|
|
111
|
-
const n = new Date(
|
|
112
|
-
m.value === "calendar" ? a ? n.setMonth(n.getMonth() + t) : n.setMonth(t - 1) : m.value === "monthSelector" ? a ?
|
|
125
|
+
}), C = o(() => J() || e.force12HourTime), Y = (t, a = !1) => {
|
|
126
|
+
const n = new Date(s.value);
|
|
127
|
+
m.value === "calendar" ? a ? n.setMonth(n.getMonth() + t) : n.setMonth(t - 1) : m.value === "monthSelector" ? a ? d.value += t : d.value = t : a ? v.value += t : v.value = t, s.value = n;
|
|
113
128
|
}, x = (t) => {
|
|
114
129
|
const a = t.split("-").map((n) => Number.parseInt(n));
|
|
115
130
|
if (a.length > 0) {
|
|
116
|
-
const n = new Date(
|
|
117
|
-
n.setFullYear(a[0]), a.length > 1 && n.setMonth(a[1] - 1),
|
|
131
|
+
const n = new Date(s.value);
|
|
132
|
+
n.setFullYear(a[0]), a.length > 1 && n.setMonth(a[1] - 1), s.value = n;
|
|
118
133
|
}
|
|
119
|
-
},
|
|
134
|
+
}, O = (t) => t >= 1 && t <= y.value.length ? y.value[t - 1] : String(t), f = (t, a = !1) => {
|
|
120
135
|
if (a || !e.useConfirmBox) {
|
|
121
136
|
const n = e.value;
|
|
122
|
-
n.startDate = t.startDate, n.endDate = t.endDate,
|
|
137
|
+
n.startDate = t.startDate, n.endDate = t.endDate, S.emit("update:value", n), (!e.useTimeInput && n.endDate || a) && (r.value = !1);
|
|
123
138
|
}
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
e.disabled || (
|
|
139
|
+
i.value = { ...t };
|
|
140
|
+
}, T = (t) => {
|
|
141
|
+
e.disabled || (r.value = t, t || (i.value = { ...e.value }, e.useRange && !e.value.endDate && B()));
|
|
142
|
+
}, $ = () => {
|
|
143
|
+
c.value || T(!1);
|
|
144
|
+
}, j = () => {
|
|
145
|
+
c.value = !0, setTimeout(() => c.value = !1, 100);
|
|
127
146
|
}, N = () => {
|
|
128
|
-
f.value
|
|
129
|
-
}, O = () => {
|
|
130
|
-
f.value = !0, setTimeout(() => f.value = !1, 100);
|
|
131
|
-
}, V = () => {
|
|
132
|
-
d(s.value, !0), T.emit("confirmBoxConfirmed");
|
|
147
|
+
f(i.value, !0), S.emit("confirmBoxConfirmed");
|
|
133
148
|
}, B = () => {
|
|
134
|
-
|
|
149
|
+
f(
|
|
135
150
|
{
|
|
136
151
|
startDate: null,
|
|
137
152
|
endDate: null
|
|
138
153
|
},
|
|
139
154
|
!0
|
|
140
155
|
);
|
|
156
|
+
}, V = (t) => {
|
|
157
|
+
e.disabled || (r.value = t);
|
|
141
158
|
};
|
|
142
159
|
return g(
|
|
143
160
|
() => e.useRange,
|
|
@@ -148,52 +165,53 @@ const ue = j({
|
|
|
148
165
|
startDate: new Date(e.value.startDate),
|
|
149
166
|
endDate: new Date(e.value.endDate)
|
|
150
167
|
};
|
|
151
|
-
(a = u.startDate) == null || a.setHours(0), (n = u.startDate) == null || n.setMinutes(0), u.endDate = t ? null : u.startDate,
|
|
168
|
+
(a = u.startDate) == null || a.setHours(0), (n = u.startDate) == null || n.setMinutes(0), u.endDate = t ? null : u.startDate, i.value = { ...u }, f(u, !0);
|
|
152
169
|
}
|
|
153
170
|
}
|
|
154
171
|
), g(
|
|
155
172
|
() => e.disabled,
|
|
156
173
|
() => {
|
|
157
|
-
|
|
174
|
+
r.value = !1;
|
|
158
175
|
}
|
|
159
176
|
), g(
|
|
160
177
|
() => e.forceFocus,
|
|
161
178
|
(t) => {
|
|
162
|
-
|
|
179
|
+
r.value = t;
|
|
163
180
|
}
|
|
164
181
|
), g(D, (t) => {
|
|
165
|
-
|
|
182
|
+
d.value = t;
|
|
166
183
|
}), {
|
|
167
|
-
displayModal:
|
|
168
|
-
auxValue:
|
|
184
|
+
displayModal: r,
|
|
185
|
+
auxValue: i,
|
|
169
186
|
datePickerMode: m,
|
|
170
|
-
confirmInput:
|
|
187
|
+
confirmInput: N,
|
|
171
188
|
currentMonth: I,
|
|
172
189
|
currentYear: D,
|
|
173
190
|
currentYearRange: k,
|
|
174
191
|
currentYearPageIndex: v,
|
|
175
|
-
selectedMonthYear:
|
|
176
|
-
monthList:
|
|
177
|
-
yearList:
|
|
178
|
-
clickedOnModal:
|
|
192
|
+
selectedMonthYear: d,
|
|
193
|
+
monthList: w,
|
|
194
|
+
yearList: H,
|
|
195
|
+
clickedOnModal: c,
|
|
179
196
|
display12HourFormat: C,
|
|
180
197
|
updateDatePeriod: Y,
|
|
181
198
|
updateMonthYear: x,
|
|
182
|
-
displayValue:
|
|
183
|
-
currentMenuDate:
|
|
184
|
-
getMonthName:
|
|
185
|
-
weekInitials:
|
|
186
|
-
updateValue:
|
|
187
|
-
updateFocus:
|
|
188
|
-
buttonNames:
|
|
199
|
+
displayValue: R,
|
|
200
|
+
currentMenuDate: s,
|
|
201
|
+
getMonthName: O,
|
|
202
|
+
weekInitials: P,
|
|
203
|
+
updateValue: f,
|
|
204
|
+
updateFocus: T,
|
|
205
|
+
buttonNames: A,
|
|
189
206
|
coreInput: q,
|
|
190
|
-
checkUnFocus:
|
|
191
|
-
keepFocus:
|
|
207
|
+
checkUnFocus: $,
|
|
208
|
+
keepFocus: j,
|
|
192
209
|
clearValue: B,
|
|
210
|
+
onOpenedModal: V,
|
|
193
211
|
isInputHovered: M
|
|
194
212
|
};
|
|
195
213
|
}
|
|
196
214
|
});
|
|
197
215
|
export {
|
|
198
|
-
|
|
216
|
+
se as default
|
|
199
217
|
};
|
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as o, createElementBlock as r, createElementVNode as
|
|
1
|
+
import a from "./Dropdown.core.vue2.js";
|
|
2
|
+
import { resolveComponent as g, openBlock as o, createElementBlock as r, createElementVNode as l, normalizeClass as n, renderSlot as i, createCommentVNode as p, createBlock as m, Teleport as c, createVNode as f, withCtx as u, normalizeStyle as C } from "vue";
|
|
3
3
|
import "./Dropdown.core.vue3.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import $ from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const v = { class: "container-dialog" }, D = ["id"];
|
|
6
|
+
function _(e, t, k, y, w, E) {
|
|
7
|
+
const s = g("DropdownContent");
|
|
8
|
+
return o(), r("section", v, [
|
|
9
|
+
l("div", {
|
|
10
|
+
class: n(e.getDialogClass)
|
|
10
11
|
}, [
|
|
11
12
|
e.$slots.trigger ? (o(), r("section", {
|
|
12
13
|
key: 0,
|
|
13
14
|
id: "trigger",
|
|
14
15
|
ref: "triggerElem",
|
|
15
|
-
onClick: t[0] || (t[0] = (...
|
|
16
|
+
onClick: t[0] || (t[0] = (...d) => e.toggleDialog && e.toggleDialog(...d))
|
|
16
17
|
}, [
|
|
17
|
-
|
|
18
|
-
], 512)) :
|
|
19
|
-
(o(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
i(e.$slots, "trigger", {}, void 0, !0)
|
|
19
|
+
], 512)) : p("", !0),
|
|
20
|
+
(o(), m(c, { to: "body" }, [
|
|
21
|
+
f(s, null, {
|
|
22
|
+
default: u(() => [
|
|
23
|
+
l("div", {
|
|
24
|
+
id: e.id,
|
|
25
|
+
ref: "dialogElem",
|
|
26
|
+
class: n([{ isOpen: e.dialogIsOpen }, "dialog-content"]),
|
|
27
|
+
style: C(e.dialogStyle)
|
|
28
|
+
}, [
|
|
29
|
+
i(e.$slots, "default", {}, void 0, !0)
|
|
30
|
+
], 14, D)
|
|
31
|
+
]),
|
|
32
|
+
_: 3
|
|
33
|
+
})
|
|
28
34
|
]))
|
|
29
35
|
], 2)
|
|
30
36
|
]);
|
|
31
37
|
}
|
|
32
|
-
const
|
|
38
|
+
const h = /* @__PURE__ */ $(a, [["render", _], ["__scopeId", "data-v-0a851f51"]]);
|
|
33
39
|
export {
|
|
34
|
-
|
|
40
|
+
h as default
|
|
35
41
|
};
|
|
@@ -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
|
};
|