@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.
package/dist/BaseAutocomplete.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as S, useModel as H, ref as
|
|
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,
|
|
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
|
-
|
|
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 (
|
|
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,
|
|
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(
|
|
99
|
-
|
|
100
|
-
|
|
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":
|
|
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.
|
|
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";
|