@wikicasa-dev/components 1.7.24 → 1.7.25

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.
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.qS_LdstC.js";
1
+ import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CVffB0Ai.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as L, mergeModels as S, useModel as H, ref as s, computed as k, onBeforeMount as K, watch as f, openBlock as y, createBlock as V, normalizeClass as z, withCtx as c, createVNode as N, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as W, createElementVNode as j } from "vue";
1
+ import { defineComponent as L, mergeModels as S, useModel as H, ref as u, computed as k, onBeforeMount as K, watch as f, openBlock as y, createBlock as V, normalizeClass as z, withCtx as c, createVNode as N, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as W, createElementVNode as j } from "vue";
2
2
  import q from "../BaseInput.js";
3
3
  import { _ as G } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.BRcL69nu.js";
4
4
  import "./js.cookie.BQua9eWh.js";
@@ -40,9 +40,9 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
40
40
  }),
41
41
  emits: /* @__PURE__ */ S(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
42
42
  setup(i, { expose: v, emit: m }) {
43
- const l = i, d = H(i, "modelValue"), a = m, u = s(""), n = s([]), h = s(null), p = s(!1), o = s(!1), g = s(null), O = k(() => n.value.length);
43
+ const l = i, d = H(i, "modelValue"), a = m, s = u(""), n = u([]), h = u(null), p = u(!1), o = u(!1), g = u(null), O = k(() => n.value.length);
44
44
  K(() => {
45
- u.value = d.value?.label || "", h.value = R({ delay: 300 }, l.onInputChangeCb);
45
+ h.value = R({ delay: 300 }, l.onInputChangeCb);
46
46
  });
47
47
  const { activeIdx: w, selectedIdx: C } = Q({
48
48
  optionsLength: O,
@@ -83,7 +83,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
83
83
  return "";
84
84
  }
85
85
  }), D = async (e) => {
86
- if (u.value !== e && (a("changedValue", e), u.value = e, !!l.onInputChangeCb)) {
86
+ if (s.value !== e && (a("changedValue", e), s.value = e, !!l.onInputChangeCb)) {
87
87
  if (!e || p.value) {
88
88
  n.value = [], p.value = !1, C.value = -1, w.value = -1, d.value && (d.value.label = ""), o.value = !1, await h.value(null);
89
89
  return;
@@ -91,13 +91,17 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
91
91
  l.disableCb || (n.value = await h.value(e), o.value = !!n.value.length);
92
92
  }
93
93
  }, $ = (e, t) => {
94
- l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (n.value = []), p.value = !0, u.value = e.label, d.value = e, o.value = !1, C.value = t;
94
+ l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (n.value = []), p.value = !0, s.value = e.label, d.value = e, o.value = !1, C.value = t;
95
95
  }, E = () => {
96
96
  n.value.length && l.keepState !== "closed" && (o.value = !0);
97
97
  };
98
- return f(d, (e, t) => {
99
- e !== t && (u.value = e?.label || "");
100
- }), f(C, (e) => {
98
+ return f(
99
+ d,
100
+ (e, t) => {
101
+ e !== t && (s.value = e?.label || "");
102
+ },
103
+ { immediate: !0 }
104
+ ), f(C, (e) => {
101
105
  if (e === -1 || !n.value.length)
102
106
  return;
103
107
  const t = n.value[e];
@@ -143,7 +147,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
143
147
  ref: g,
144
148
  "data-cy": `ac_input_${e.$attrs.id}`,
145
149
  "label-text": e.label,
146
- "model-value": u.value,
150
+ "model-value": s.value,
147
151
  "is-valid": e.isValid,
148
152
  disabled: e.$attrs.disabled,
149
153
  placeholder: e.$attrs.placeholder,
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { _ as C } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang
12
12
  import { _ as I } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DTUA_Q5e.js";
13
13
  import { _ as T } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.5pqk7vlZ.js";
14
14
  import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
15
- import { _ as v } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.qS_LdstC.js";
15
+ import { _ as v } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CVffB0Ai.js";
16
16
  import { _ as F } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
17
17
  import { _ as L } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BwONsejV.js";
18
18
  import { _ as P } from "./chunks/BaseCard.vue_vue_type_style_index_0_lang.w5aEohzG.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.7.24",
3
+ "version": "1.7.25",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",