@wikicasa-dev/components 2.0.28 → 2.0.30
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/BaseTabView.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/UIKit/BaseDropDown.vue.d.ts +1 -1
- package/dist/UIKit/Tab/BaseTabView.vue.d.ts +2 -4
- package/dist/UIKit/types.d.ts +1 -0
- package/dist/chunks/{BaseTabView.vue_vue_type_script_setup_true_lang.Ar2KNVYH.js → BaseTabView.vue_vue_type_script_setup_true_lang.DjAQCt5a.js} +31 -29
- 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/BaseTabView.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;
|
|
@@ -4,6 +4,7 @@ declare let __VLS_typeProps: {
|
|
|
4
4
|
tabsPosition?: "top" | "bottom";
|
|
5
5
|
tabViewDescription: string;
|
|
6
6
|
tabListClasses?: ClassType;
|
|
7
|
+
dataCy?: string;
|
|
7
8
|
};
|
|
8
9
|
type __VLS_PublicProps = {
|
|
9
10
|
"activeIdx"?: number | undefined;
|
|
@@ -20,8 +21,5 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
20
21
|
tabElement: TabType;
|
|
21
22
|
}) => any) | undefined;
|
|
22
23
|
"onUpdate:activeIdx"?: ((activeIdx: number | undefined) => any) | undefined;
|
|
23
|
-
}>, {
|
|
24
|
-
tabListClasses: ClassType;
|
|
25
|
-
tabsPosition: "top" | "bottom";
|
|
26
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
25
|
export default _default;
|
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,40 +1,41 @@
|
|
|
1
|
-
import { defineComponent as E, mergeModels as
|
|
1
|
+
import { defineComponent as E, mergeModels as T, useModel as M, ref as u, useId as N, useSlots as S, computed as z, provide as b, watch as C, openBlock as l, createElementBlock as k, normalizeClass as _, createElementVNode as j, unref as p, toDisplayString as q, createBlock as o, createCommentVNode as v, Fragment as G, renderList as H, withCtx as J, resolveDynamicComponent as K } from "vue";
|
|
2
2
|
import { _ as O } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
-
import { _ } from "./BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js";
|
|
4
|
-
const Q = ["id"],
|
|
3
|
+
import { _ as I } from "./BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js";
|
|
4
|
+
const Q = ["data-cy"], R = ["id"], ee = /* @__PURE__ */ E({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "BaseTabView",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ T({
|
|
8
8
|
tabsPosition: { default: "top" },
|
|
9
9
|
tabViewDescription: {},
|
|
10
|
-
tabListClasses: {
|
|
10
|
+
tabListClasses: {},
|
|
11
|
+
dataCy: {}
|
|
11
12
|
}, {
|
|
12
13
|
activeIdx: { default: 0 },
|
|
13
14
|
activeIdxModifiers: {}
|
|
14
15
|
}),
|
|
15
|
-
emits: /* @__PURE__ */
|
|
16
|
+
emits: /* @__PURE__ */ T(["tabClicked"], ["update:activeIdx"]),
|
|
16
17
|
setup(g, { emit: P }) {
|
|
17
|
-
const B = P, r = M(g, "activeIdx"), $ = u(""), d = u(null),
|
|
18
|
+
const B = P, r = M(g, "activeIdx"), $ = u(""), d = u(null), A = u(null), i = N(), f = S(), c = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", h = (e, a) => ({
|
|
18
19
|
renderFn: e,
|
|
19
|
-
tabId:
|
|
20
|
+
tabId: y(a),
|
|
20
21
|
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
|
|
21
22
|
"header-title": c(e)?.["header-title"] || "",
|
|
22
23
|
class: c(e)?.class || "",
|
|
23
24
|
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
24
25
|
"data-cy": c(e)?.["data-cy"] || ""
|
|
25
|
-
}),
|
|
26
|
+
}), n = z(() => f.default ? f.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
26
27
|
m(t) && e.push(h(t, e.length));
|
|
27
28
|
}) : m(a) && e.push(h(a, e.length)), e), []) : []);
|
|
28
|
-
b("tabs",
|
|
29
|
-
const
|
|
30
|
-
$.value =
|
|
29
|
+
b("tabs", n), b("isTabActive", (e) => r.value === e);
|
|
30
|
+
const x = (e) => d.value === e, y = (e) => `base-tab-${e}-${i}`, F = (e) => `base-tab-panel-${e}-${i}`, V = (e) => n.value.find((a) => a["active-tab-panel-idx"] === e)?.tabId, w = (e) => {
|
|
31
|
+
$.value = y(e);
|
|
31
32
|
}, D = (e) => {
|
|
32
|
-
const a =
|
|
33
|
+
const a = n.value.at(e ?? -1);
|
|
33
34
|
d.value = a?.["active-tab-panel-idx"] ?? null;
|
|
34
35
|
};
|
|
35
36
|
b("handleClick", (e, a) => {
|
|
36
37
|
w(e), r.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
37
|
-
}),
|
|
38
|
+
}), C(
|
|
38
39
|
r,
|
|
39
40
|
(e) => {
|
|
40
41
|
D(e ?? -1);
|
|
@@ -48,48 +49,49 @@ const Q = ["id"], Z = /* @__PURE__ */ E({
|
|
|
48
49
|
if (e[t] !== a[t]) return t;
|
|
49
50
|
return null;
|
|
50
51
|
};
|
|
51
|
-
return
|
|
52
|
-
() =>
|
|
52
|
+
return C(
|
|
53
|
+
() => n.value.map((e) => e["active-tab-panel-idx"]),
|
|
53
54
|
(e, a) => {
|
|
54
55
|
const t = L(e, a);
|
|
55
56
|
if (t === null) return;
|
|
56
|
-
const s =
|
|
57
|
+
const s = n.value[t]["active-tab-panel-idx"];
|
|
57
58
|
r.value !== t || s === void 0 || (d.value = s);
|
|
58
59
|
}
|
|
59
|
-
), (e, a) => (
|
|
60
|
+
), (e, a) => (l(), k("div", {
|
|
60
61
|
ref_key: "root",
|
|
61
|
-
ref:
|
|
62
|
-
class:
|
|
62
|
+
ref: A,
|
|
63
|
+
class: _(e.$attrs.class),
|
|
64
|
+
"data-cy": e.dataCy
|
|
63
65
|
}, [
|
|
64
66
|
j("span", {
|
|
65
67
|
id: `tablist-${p(i)}`,
|
|
66
68
|
class: "uikit-sr-only"
|
|
67
|
-
}, q(e.tabViewDescription), 9,
|
|
68
|
-
e.tabsPosition === "top" ? (
|
|
69
|
+
}, q(e.tabViewDescription), 9, R),
|
|
70
|
+
e.tabsPosition === "top" ? (l(), o(I, {
|
|
69
71
|
key: 0,
|
|
70
72
|
uid: p(i),
|
|
71
73
|
"tab-list-classes": e.tabListClasses
|
|
72
74
|
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0),
|
|
73
|
-
(
|
|
75
|
+
(l(!0), k(G, null, H(n.value, (t, s) => (l(), o(O, {
|
|
74
76
|
id: F(s),
|
|
75
77
|
key: s,
|
|
76
78
|
"labelled-by": V(s) || "",
|
|
77
|
-
active:
|
|
78
|
-
class:
|
|
79
|
+
active: x(s),
|
|
80
|
+
class: _(t["tab-panel-classes"])
|
|
79
81
|
}, {
|
|
80
82
|
default: J(() => [
|
|
81
|
-
t.renderFn.children && t.renderFn.children.default ? (
|
|
83
|
+
t.renderFn.children && t.renderFn.children.default ? (l(), o(K(t.renderFn.children.default), { key: 0 })) : v("", !0)
|
|
82
84
|
]),
|
|
83
85
|
_: 2
|
|
84
86
|
}, 1032, ["id", "labelled-by", "active", "class"]))), 128)),
|
|
85
|
-
e.tabsPosition === "bottom" ? (
|
|
87
|
+
e.tabsPosition === "bottom" ? (l(), o(I, {
|
|
86
88
|
key: 1,
|
|
87
89
|
uid: p(i),
|
|
88
90
|
"tab-list-classes": e.tabListClasses
|
|
89
91
|
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0)
|
|
90
|
-
],
|
|
92
|
+
], 10, Q));
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
export {
|
|
94
|
-
|
|
96
|
+
ee as _
|
|
95
97
|
};
|
|
@@ -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,9 +4,9 @@ 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
|
-
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.
|
|
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";
|