@milaboratories/uikit 2.2.72 → 2.2.73

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @milaboratories/uikit
2
2
 
3
+ ## 2.2.73
4
+
5
+ ### Patch Changes
6
+
7
+ - 959fe5c: update autocomplete behavior
8
+
3
9
  ## 2.2.72
4
10
 
5
11
  ### Patch Changes
package/dist/pl-uikit.js CHANGED
@@ -7374,7 +7374,7 @@ const Up = ue.object({
7374
7374
  label: ue.string()
7375
7375
  });
7376
7376
  ue.array(Up);
7377
- const qp = "1.30.3";
7377
+ const qp = "1.30.11";
7378
7378
  function it() {
7379
7379
  return Zp({ sdkVersion: qp });
7380
7380
  }
@@ -7861,12 +7861,7 @@ const Sm = ["tabindex"], Am = { class: "pl-autocomplete__container" }, Em = { cl
7861
7861
  }), u = () => Ht(
7862
7862
  m.value.findIndex((D) => _e(D.value, e.value)),
7863
7863
  (D) => D < 0 ? 0 : D
7864
- ), d = () => a.activeIndex = u(), c = H([]), p = H(), m = b(() => e.value && !l.value ? p.value ? [{
7865
- ...p.value,
7866
- index: 0,
7867
- isSelected: !0,
7868
- isActive: !0
7869
- }] : [] : lt(c.value).map((D, Z) => ({
7864
+ ), d = () => a.activeIndex = u(), c = H([]), p = H(), m = b(() => lt(c.value).map((D, Z) => ({
7870
7865
  ...D,
7871
7866
  index: Z,
7872
7867
  isSelected: Z === O.value,
@@ -7890,8 +7885,12 @@ const Sm = ["tabindex"], Am = { class: "pl-autocomplete__container" }, Em = { cl
7890
7885
  var D;
7891
7886
  return (D = s.value) == null ? void 0 : D.focus();
7892
7887
  }, V = () => {
7893
- a.open = !a.open, a.open || (l.value = null), a.open && (l.value = "");
7894
- }, E = () => {
7888
+ a.open = !a.open;
7889
+ };
7890
+ oe(() => a.open, (D) => {
7891
+ l.value = D ? "" : null;
7892
+ });
7893
+ const E = () => {
7895
7894
  a.open = !0;
7896
7895
  }, B = (D) => {
7897
7896
  var le, be, Me;
@@ -7926,7 +7925,7 @@ const Sm = ["tabindex"], Am = { class: "pl-autocomplete__container" }, Em = { cl
7926
7925
  var D;
7927
7926
  l.value, a.activeIndex >= 0 && a.open && ((D = i.value) == null || D.scrollIntoActive());
7928
7927
  });
7929
- const T = Af(l, 500, { maxWait: 1e3 }), z = Wr(() => T.value, async (D) => D !== null && !(D === "" && e.value) ? n.optionsSearch(D) : []), j = Wr(() => e.value, async (D) => {
7928
+ const T = Af(l, 300, { maxWait: 1e3 }), z = Wr(() => T.value, async (D) => D !== null ? n.optionsSearch(D) : []), j = Wr(() => e.value, async (D) => {
7930
7929
  var Z, le;
7931
7930
  return D && !_e((Z = p.value) == null ? void 0 : Z.value, D) ? n.modelSearch ? n.modelSearch(D) : (le = await n.optionsSearch(String(D))) == null ? void 0 : le[0] : p.value;
7932
7931
  });