@wikicasa-dev/components 2.0.29 → 2.0.31
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 +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/UIKit/BaseDropDown.vue.d.ts +1 -1
- package/dist/UIKit/types.d.ts +1 -0
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.o0AMunVa.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.DI5YPfeQ.js} +7 -7
- package/dist/chunks/{CheckboxGroup.vue_vue_type_script_setup_true_lang.C1NwpE7V.js → CheckboxGroup.vue_vue_type_script_setup_true_lang.Cf8YnCGf.js} +22 -22
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/BaseAutocomplete.js
CHANGED
package/dist/CheckboxGroup.js
CHANGED
|
@@ -57,8 +57,8 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
57
57
|
onClick?: (() => any) | undefined;
|
|
58
58
|
"onUpdate:dropdownState"?: ((args_0: boolean) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
|
-
arrowWidth: number;
|
|
61
60
|
dataCy: string;
|
|
61
|
+
arrowWidth: number;
|
|
62
62
|
btnClasses: string;
|
|
63
63
|
labelClasses: ClassType;
|
|
64
64
|
dropdownClasses: ClassType;
|
package/dist/UIKit/types.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type CheckboxButtonType<T = string | number, T1 = string | number, T2 = u
|
|
|
31
31
|
checked?: boolean;
|
|
32
32
|
reset?: boolean;
|
|
33
33
|
payload?: T2;
|
|
34
|
+
dataCy?: string;
|
|
34
35
|
};
|
|
35
36
|
export type CheckboxButtonTypeObj = Omit<CheckboxButtonType, "checked"> & {
|
|
36
37
|
checked: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as T, mergeModels as
|
|
1
|
+
import { defineComponent as T, mergeModels as $, useModel as L, ref as r, computed as k, onBeforeMount as F, watch as f, openBlock as C, createBlock as S, normalizeClass as H, withCtx as s, createVNode as z, renderSlot as V, createElementBlock as A, Fragment as K, renderList as N, unref as U, createElementVNode as W } from "vue";
|
|
2
2
|
import j from "../BaseInput.js";
|
|
3
3
|
import { _ as q } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.BscSQ5bW.js";
|
|
4
4
|
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
@@ -18,7 +18,7 @@ function Q(t, p) {
|
|
|
18
18
|
}
|
|
19
19
|
const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
20
20
|
__name: "BaseAutocomplete",
|
|
21
|
-
props: /* @__PURE__ */
|
|
21
|
+
props: /* @__PURE__ */ $({
|
|
22
22
|
isValid: { default: null },
|
|
23
23
|
theme: { default: "" },
|
|
24
24
|
label: { default: "" },
|
|
@@ -40,7 +40,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
40
40
|
},
|
|
41
41
|
modelModifiers: {}
|
|
42
42
|
}),
|
|
43
|
-
emits: /* @__PURE__ */
|
|
43
|
+
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
44
44
|
setup(t, { expose: p, emit: v }) {
|
|
45
45
|
const d = L(
|
|
46
46
|
t,
|
|
@@ -95,7 +95,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
95
95
|
}
|
|
96
96
|
t.disableCb || (n.value = await m.value(e), o.value = !!n.value.length);
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, g = (e, l) => {
|
|
99
99
|
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (n.value = []), c.value = !0, i.value = e.label, d.value = e, o.value = !1, w.value = l;
|
|
100
100
|
}, D = () => {
|
|
101
101
|
n.value.length && t.keepState !== "closed" && (o.value = !0);
|
|
@@ -109,7 +109,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
109
109
|
), f(w, (e) => {
|
|
110
110
|
if (e === -1 || !n.value.length) return;
|
|
111
111
|
const l = n.value[e];
|
|
112
|
-
c.value && l.label === d.value?.label ||
|
|
112
|
+
c.value && l.label === d.value?.label || g(l, e);
|
|
113
113
|
}), f(
|
|
114
114
|
() => t.keepState,
|
|
115
115
|
(e) => {
|
|
@@ -123,7 +123,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
123
123
|
}
|
|
124
124
|
}), (e, l) => (C(), S(q, {
|
|
125
125
|
class: H(e.$attrs["root-classes"]),
|
|
126
|
-
"data-cy": e.dataCy ?
|
|
126
|
+
"data-cy": e.dataCy ? e.dataCy : `ac_${e.$attrs.id}`,
|
|
127
127
|
"dropdown-element": "ul",
|
|
128
128
|
"dropdown-classes": [
|
|
129
129
|
{ "bordered-dropdown": e.theme === "bordered" },
|
|
@@ -182,7 +182,7 @@ const R = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
182
182
|
key: b,
|
|
183
183
|
active: U(h) === b,
|
|
184
184
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
185
|
-
onClick: (E) =>
|
|
185
|
+
onClick: (E) => g(a, b),
|
|
186
186
|
onMouseover: (E) => h.value = b
|
|
187
187
|
}, {
|
|
188
188
|
default: s(() => [
|
|
@@ -21,12 +21,12 @@ const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(
|
|
|
21
21
|
dataCy: { default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
24
|
-
setup(a, { emit:
|
|
25
|
-
const
|
|
26
|
-
for (const e of
|
|
24
|
+
setup(a, { emit: C }) {
|
|
25
|
+
const c = a, s = C, l = x(/* @__PURE__ */ new Map()), r = i(() => {
|
|
26
|
+
for (const e of c.checkboxData)
|
|
27
27
|
if (e.reset) return e;
|
|
28
28
|
return null;
|
|
29
|
-
}),
|
|
29
|
+
}), g = i(() => c.checkboxData.length), f = i(() => {
|
|
30
30
|
let e = 0;
|
|
31
31
|
return l.value.forEach((t) => {
|
|
32
32
|
t.checked && e++;
|
|
@@ -34,7 +34,7 @@ const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(
|
|
|
34
34
|
});
|
|
35
35
|
(() => {
|
|
36
36
|
const e = [];
|
|
37
|
-
for (const t of
|
|
37
|
+
for (const t of c.checkboxData)
|
|
38
38
|
t.checked = !!t.checked, l.value.set(
|
|
39
39
|
`${t.id}`,
|
|
40
40
|
t
|
|
@@ -42,13 +42,13 @@ const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(
|
|
|
42
42
|
s("update:modelValue", e);
|
|
43
43
|
})();
|
|
44
44
|
const u = (e, t) => {
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const o = l.value.get(e);
|
|
46
|
+
if (o) {
|
|
47
47
|
if (t) {
|
|
48
|
-
l.value.set(e, { ...
|
|
48
|
+
l.value.set(e, { ...o, ...t });
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
l.value.set(e, { ...
|
|
51
|
+
l.value.set(e, { ...o, checked: !o.checked });
|
|
52
52
|
}
|
|
53
53
|
}, k = () => {
|
|
54
54
|
l.value.forEach((e) => {
|
|
@@ -56,19 +56,19 @@ const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(
|
|
|
56
56
|
});
|
|
57
57
|
}, p = () => {
|
|
58
58
|
k(), s("update:modelValue", []), s("resetted");
|
|
59
|
-
}, d = (e) => l.value.get(
|
|
60
|
-
if (w(
|
|
59
|
+
}, d = (e) => l.value.get(c.getKey(e))?.checked ?? !1, h = (e) => {
|
|
60
|
+
if (w(c.checkboxData)) return;
|
|
61
61
|
const t = l.value.get(e.id);
|
|
62
|
-
t?.reset && e.checked ? k() : r.value && !t?.reset && u(
|
|
62
|
+
t?.reset && e.checked ? k() : r.value && !t?.reset && u(c.getKey(r.value), { checked: !1 }), u(`${e.id}`), c.autoCheckResetAll && r.value && f.value === g.value - 1 && l.value.forEach((n) => {
|
|
63
63
|
n.checked = !!n.reset;
|
|
64
|
-
}),
|
|
65
|
-
const
|
|
64
|
+
}), c.autoCheckResetEmpty && r.value && !f.value && (!c.manualToggleResetButton || !t?.reset) && u(c.getKey(r.value), { checked: !0 });
|
|
65
|
+
const o = [];
|
|
66
66
|
l.value.forEach((n) => {
|
|
67
|
-
n.checked &&
|
|
68
|
-
}), s("update:modelValue",
|
|
67
|
+
n.checked && o.push(n);
|
|
68
|
+
}), s("update:modelValue", o), s("checkedGroup", c.groupId);
|
|
69
69
|
};
|
|
70
70
|
return D(
|
|
71
|
-
() =>
|
|
71
|
+
() => c.reset,
|
|
72
72
|
(e) => {
|
|
73
73
|
e && p();
|
|
74
74
|
}
|
|
@@ -88,13 +88,13 @@ const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(
|
|
|
88
88
|
checkboxesData: e.checkboxData,
|
|
89
89
|
reset: p
|
|
90
90
|
}, () => [
|
|
91
|
-
e.checkboxData ? (b(!0), B(I, { key: 0 }, R(e.checkboxData, (
|
|
92
|
-
id: e.getKey(
|
|
91
|
+
e.checkboxData ? (b(!0), B(I, { key: 0 }, R(e.checkboxData, (o, n, y) => (b(), A(V, {
|
|
92
|
+
id: e.getKey(o),
|
|
93
93
|
key: y,
|
|
94
|
-
"data-cy": `checkbox_${K(G)(`${
|
|
95
|
-
label:
|
|
94
|
+
"data-cy": o.dataCy ?? `checkbox_${K(G)(`${o.label}`)}`,
|
|
95
|
+
label: o.label,
|
|
96
96
|
inline: e.formCheckInline,
|
|
97
|
-
"model-value": d(
|
|
97
|
+
"model-value": d(o),
|
|
98
98
|
"container-class": [
|
|
99
99
|
e.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
|
|
100
100
|
e.checkboxContainerClasses
|
package/dist/index.js
CHANGED
|
@@ -4,14 +4,14 @@ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_
|
|
|
4
4
|
import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.Caagpb9M.js";
|
|
5
5
|
import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.GPFf7fjA.js";
|
|
6
6
|
import { default as d } from "./CheckboxBtn.js";
|
|
7
|
-
import { _ as u } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.
|
|
7
|
+
import { _ as u } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.Cf8YnCGf.js";
|
|
8
8
|
import { _ } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js";
|
|
9
9
|
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.DjAQCt5a.js";
|
|
10
10
|
import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js";
|
|
11
11
|
import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DdmSUyxZ.js";
|
|
12
12
|
import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.ClV6kObA.js";
|
|
13
13
|
import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
|
|
14
|
-
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.
|
|
14
|
+
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.DI5YPfeQ.js";
|
|
15
15
|
import { _ as v } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
|
|
16
16
|
import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
17
17
|
import { default as O } from "./BaseCard.js";
|