@agrotools1/at-components 0.6.36 → 0.6.38

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