@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.
Files changed (32) hide show
  1. package/dist/DataTable/Column/Column.vue.js +5 -5
  2. package/dist/DataTable/Column/Column.vue2.js +57 -36
  3. package/dist/DatePicker/DatePicker.d.ts +31 -0
  4. package/dist/DatePicker/DatePicker.helper.d.ts +6 -0
  5. package/dist/DatePicker/DatePicker.vue.js +111 -100
  6. package/dist/DatePicker/DatePicker.vue2.js +82 -64
  7. package/dist/Dropdown/Dropdown.core.vue.js +28 -22
  8. package/dist/Dropdown/Dropdown.core.vue2.js +48 -42
  9. package/dist/Dropdown/DropdownContent/DropdownContent.d.ts +2 -0
  10. package/dist/Dropdown/DropdownContent/DropdownContent.vue.js +12 -0
  11. package/dist/Dropdown/DropdownContent/DropdownContent.vue2.js +9 -0
  12. package/dist/Search/Search.d.ts +16 -0
  13. package/dist/Search/Search.vue.js +4 -3
  14. package/dist/Search/Search.vue2.js +24 -19
  15. package/dist/Select/Multiple/Select.multiple.d.ts +9 -0
  16. package/dist/Select/Multiple/Select.multiple.vue.js +4 -4
  17. package/dist/Select/Multiple/Select.multiple.vue2.js +19 -12
  18. package/dist/Select/Select.core.d.ts +4 -0
  19. package/dist/Select/Select.core.vue.js +5 -4
  20. package/dist/Select/Select.core.vue2.js +13 -10
  21. package/dist/Select/Single/Select.single.d.ts +9 -0
  22. package/dist/Select/Single/Select.single.vue.js +7 -7
  23. package/dist/Select/Single/Select.single.vue2.js +33 -26
  24. package/dist/Select/index.d.ts +18 -0
  25. package/dist/Tabs/Tabs.vue.js +5 -5
  26. package/dist/Upload/MultipleUpload/MultipleUpload.vue.js +2 -2
  27. package/dist/Upload/SingleUpload/SingleUpload.vue.js +1 -1
  28. package/dist/Upload/UploaderInput/UploaderInput.d.ts +4 -1
  29. package/dist/Upload/UploaderInput/UploaderInput.vue.js +24 -25
  30. package/dist/Upload/UploaderInput/UploaderInput.vue2.js +11 -8
  31. package/dist/style.css +1 -1
  32. package/package.json +1 -1
@@ -1,20 +1,22 @@
1
- import { defineComponent as j, ref as l, computed as o, watch as g } from "vue";
2
- import _ from "../Button/Button.vue.js";
3
- import U from "../Input/Input.core.vue.js";
4
- import { monthTranslationObj as h, weekInitialsObject as L, cancelTranslation as E, saveTranslation as z, placeholderTranslation as b, isUsing12HourFormat as G } from "./DatePicker.helper.js";
5
- import J from "./DatePickerCalendar/DatePickerCalendar.vue.js";
6
- import K from "./DatePickerHeader/DatePickerHeader.vue.js";
7
- import Q from "./DatePickerListSelector/DatePickerListSelector.vue.js";
8
- import W from "./DatePickerTime/DatePickerTime.vue.js";
9
- const ue = j({
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: U,
14
- AtDatePickerHeader: K,
15
- AtDatePickerCalendar: J,
16
- AtDatePickerTime: W,
17
- AtDatePickerListSelector: Q
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, T) {
85
- const F = /* @__PURE__ */ new Date(), s = l({ ...e.value }), i = l(e.forceFocus), r = l(/* @__PURE__ */ new Date()), m = l("calendar"), I = o(() => r.value.getMonth() + 1), D = o(() => r.value.getFullYear()), k = l(""), v = l(-1), c = l(D.value), q = l(null), f = l(!1), M = l(!1), y = o(() => h && e.setLanguage in h ? h[e.setLanguage] : []), H = o(
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: `${c.value}-${a + 1}`
103
+ value: `${d.value}-${a + 1}`
89
104
  }))
90
- ), P = l(
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
- ), w = o(() => L && e.setLanguage in L ? L[e.setLanguage] : []), R = o(() => ({
98
- cancel: E[e.setLanguage],
99
- save: z[e.setLanguage]
100
- })), A = o(() => {
101
- const t = e.useRange ? b[e.setLanguage].dateStart : b[e.setLanguage].date;
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 || i.value || e.value.startDate) {
104
- const n = e.useConfirmBox ? s.value : e.value;
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() : b[e.setLanguage].dateEnd;
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(() => G() || e.force12HourTime), Y = (t, a = !1) => {
111
- const n = new Date(r.value);
112
- m.value === "calendar" ? a ? n.setMonth(n.getMonth() + t) : n.setMonth(t - 1) : m.value === "monthSelector" ? a ? c.value += t : c.value = t : a ? v.value += t : v.value = t, r.value = n;
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(r.value);
117
- n.setFullYear(a[0]), a.length > 1 && n.setMonth(a[1] - 1), r.value = n;
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
- }, $ = (t) => t >= 1 && t <= y.value.length ? y.value[t - 1] : String(t), d = (t, a = !1) => {
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, T.emit("update:value", n), (!e.useTimeInput && n.endDate || a) && (i.value = !1);
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
- s.value = { ...t };
125
- }, S = (t) => {
126
- e.disabled || (i.value = t, t || (s.value = { ...e.value }, e.useRange && !e.value.endDate && B()));
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 || S(!1);
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
- d(
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, s.value = { ...u }, d(u, !0);
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
- i.value = !1;
174
+ r.value = !1;
158
175
  }
159
176
  ), g(
160
177
  () => e.forceFocus,
161
178
  (t) => {
162
- i.value = t;
179
+ r.value = t;
163
180
  }
164
181
  ), g(D, (t) => {
165
- c.value = t;
182
+ d.value = t;
166
183
  }), {
167
- displayModal: i,
168
- auxValue: s,
184
+ displayModal: r,
185
+ auxValue: i,
169
186
  datePickerMode: m,
170
- confirmInput: V,
187
+ confirmInput: N,
171
188
  currentMonth: I,
172
189
  currentYear: D,
173
190
  currentYearRange: k,
174
191
  currentYearPageIndex: v,
175
- selectedMonthYear: c,
176
- monthList: H,
177
- yearList: P,
178
- clickedOnModal: f,
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: A,
183
- currentMenuDate: r,
184
- getMonthName: $,
185
- weekInitials: w,
186
- updateValue: d,
187
- updateFocus: S,
188
- buttonNames: R,
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: N,
191
- keepFocus: O,
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
- ue as default
216
+ se as default
199
217
  };
@@ -1,35 +1,41 @@
1
- import d from "./Dropdown.core.vue2.js";
2
- import { openBlock as o, createElementBlock as r, createElementVNode as i, normalizeClass as l, renderSlot as s, createCommentVNode as n, createBlock as g, Teleport as m, normalizeStyle as p } from "vue";
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 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
- i("div", {
9
- class: l(e.getDialogClass)
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] = (...a) => e.toggleDialog && e.toggleDialog(...a))
16
+ onClick: t[0] || (t[0] = (...d) => e.toggleDialog && e.toggleDialog(...d))
16
17
  }, [
17
- s(e.$slots, "trigger", {}, void 0, !0)
18
- ], 512)) : n("", !0),
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.dialogStyle)
25
- }, [
26
- s(e.$slots, "default", {}, void 0, !0)
27
- ], 14, u)
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 _ = /* @__PURE__ */ c(d, [["render", $], ["__scopeId", "data-v-635b3523"]]);
38
+ const h = /* @__PURE__ */ $(a, [["render", _], ["__scopeId", "data-v-0a851f51"]]);
33
39
  export {
34
- _ as default
40
+ h as default
35
41
  };
@@ -1,6 +1,8 @@
1
- import { defineComponent as Y, ref as t, watch as k, onMounted as E, computed as L } from "vue";
2
- const b = Y({
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(d, { emit: r }) {
24
- const o = t(!1);
25
- o.value = d.isOpen;
26
- const l = t(), a = t(), n = t(), h = t(0), i = t(), p = t(), g = () => {
27
- var x, O, w, m, C, D;
28
- h.value = window.scrollY, i.value = (x = a.value) == null ? void 0 : x.getBoundingClientRect();
29
- const e = (((O = i.value) == null ? void 0 : O.y) ?? 0) + (((w = i.value) == null ? void 0 : w.height) ?? 0) + 8 + h.value, v = {
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 s, u, c;
32
- n.value = {
33
- x: ((s = i.value) == null ? void 0 : s.left) ?? 0,
34
- y: e
35
- }, p.value = {
36
- top: `${((u = n.value) == null ? void 0 : u.y) || 0}px`,
37
- left: `${((c = n.value) == null ? void 0 : c.x) || 0}px`
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 s, u, c, S, W;
42
- n.value = {
43
- x: (((s = i.value) == null ? void 0 : s.left) ?? 0) - ((((u = l.value) == null ? void 0 : u.clientWidth) ?? 0) - (((c = a.value) == null ? void 0 : c.clientWidth) ?? 0)),
44
- y: e
45
- }, p.value = {
46
- top: `${((S = n.value) == null ? void 0 : S.y) || 0}px`,
47
- left: `${((W = n.value) == null ? void 0 : W.x) || 0}px`
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
- }, f = window.innerWidth - (((m = i.value) == null ? void 0 : m.right) ?? 0) <= (((C = l.value) == null ? void 0 : C.offsetWidth) ?? 0) ? "right" : d.position;
51
- v[f](), d.fullSize && (p.value.width = `${((D = a.value) == null ? void 0 : D.clientWidth) ?? 0}px`);
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
- k(
54
- () => d.isOpen,
59
+ E(
60
+ () => p.isOpen,
55
61
  (e) => {
56
- o.value = e, e && g();
62
+ i.value = e, e && setTimeout(() => g(), 10);
57
63
  }
58
64
  );
59
- const $ = async () => r("update:isOpen", !0), y = async () => r("update:isOpen", !1), z = (e) => {
60
- var v, f;
61
- o.value && !((v = l == null ? void 0 : l.value) != null && v.contains(e.target)) && !((f = a.value) != null && f.contains(e.target)) && y();
62
- }, B = () => r("update:isOpen", !o.value);
63
- E(() => {
64
- document.addEventListener("click", z), window.addEventListener("resize", g), g();
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 P = L(() => ["dialog"]);
72
+ const _ = I(() => ["dialog"]);
67
73
  return {
68
- dialogIsOpen: o,
69
- getDialogClass: P,
74
+ dialogIsOpen: i,
75
+ getDialogClass: _,
70
76
  dialogElem: l,
71
- triggerElem: a,
72
- dialogStyle: p,
73
- toggleDialog: B,
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
- b as default
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
+ };
@@ -0,0 +1,9 @@
1
+ import { defineComponent as n } from "vue";
2
+ const e = n({
3
+ name: "DropdownContent",
4
+ setup() {
5
+ }
6
+ });
7
+ export {
8
+ e as default
9
+ };
@@ -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-7882f79d"]]);
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 w } from "../node_modules/.pnpm/agrotools-icons@0.2.6/node_modules/agrotools-icons/dist/AtSearchIcon/index.js";
4
- import { AtInput as x } from "../Input/index.js";
5
- import F from "../List/components/List.vue.js";
6
- const O = {
7
- AtSearchIcon: w,
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: x.Text,
13
- AtLista: F,
14
- ...O
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 r = (d, m) => d.text.toUpperCase().includes(m.toUpperCase());
76
+ const i = (d, m) => d.text.toUpperCase().includes(m.toUpperCase());
72
77
  return t.autoCompleteList.filter(
73
- (d) => r(d, t.modelValue)
78
+ (d) => i(d, t.modelValue)
74
79
  );
75
80
  }
76
81
  return (e = s.value) != null && e.length ? s.value : t.autoCompleteList;
77
- }), i = l(), S = (e) => {
78
- const r = e.text;
79
- i.value = e, n("onSelectedItem", e), n("update:modelValue", r);
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, i.value = null;
82
- }, C = o(
83
- () => t.withIcon && a.value && !i.value
84
- ), y = o(
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: C,
99
+ showSearchIcon: y,
95
100
  getShowNoResultMessage: A,
96
- getSearchIconColor: y,
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 f, createCommentVNode as b } from "vue";
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(), f(d, {
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
- ])) : b("", !0)
52
+ ])) : f("", !0)
53
53
  ], 8, h);
54
54
  }
55
- const q = /* @__PURE__ */ C(u, [["render", g], ["__scopeId", "data-v-310fcfe8"]]);
55
+ const q = /* @__PURE__ */ C(u, [["render", g], ["__scopeId", "data-v-caf79e23"]]);
56
56
  export {
57
57
  q as default
58
58
  };