@wikicasa-dev/components 2.0.32 → 2.0.33
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
CHANGED
|
@@ -15,32 +15,32 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
|
|
|
15
15
|
}),
|
|
16
16
|
emits: /* @__PURE__ */ C(["tabClicked"], ["update:activeIdx"]),
|
|
17
17
|
setup(P, { emit: x }) {
|
|
18
|
-
const B = x, l = z(P, "activeIdx"), $ = b(""), u = b(null), A = b(null), r = j(), m = q(), c = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", y = (e,
|
|
18
|
+
const B = x, l = z(P, "activeIdx"), $ = b(""), u = b(null), A = b(null), r = j(), m = q(), c = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", y = (e, a) => ({
|
|
19
19
|
renderFn: e,
|
|
20
|
-
tabId: T(
|
|
21
|
-
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ??
|
|
20
|
+
tabId: T(a),
|
|
21
|
+
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
|
|
22
22
|
"header-title": c(e)?.["header-title"] || "",
|
|
23
23
|
class: c(e)?.class || "",
|
|
24
24
|
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
25
25
|
"data-cy": c(e)?.["data-cy"] || ""
|
|
26
|
-
}), n = G(() => m.default ? m.default().reduce((e,
|
|
27
|
-
h(
|
|
28
|
-
}) : h(
|
|
26
|
+
}), n = G(() => m.default ? m.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
27
|
+
h(t) && e.push(y(t, e.length));
|
|
28
|
+
}) : h(a) && e.push(y(a, e.length)), e), []) : []);
|
|
29
29
|
v("tabs", n), v("isTabActive", (e) => l.value === e);
|
|
30
|
-
const F = (e = -1) => u.value === e, T = (e) => `base-tab-${e}-${r}`, V = (e) => `base-tab-panel-${e}-${r}`, w = (e = -1) => {
|
|
31
|
-
const
|
|
32
|
-
(
|
|
30
|
+
const F = (e = -1) => u.value === e, T = (e) => `base-tab-${e}-${r}`, V = (e = -1) => `base-tab-panel-${e}-${r}`, w = (e = -1) => {
|
|
31
|
+
const a = n.value.reduce(
|
|
32
|
+
(t, s, N) => (s["active-tab-panel-idx"] !== e || t.push({ tab: s, idx: N }), t),
|
|
33
33
|
[]
|
|
34
34
|
);
|
|
35
|
-
return
|
|
35
|
+
return a && a.length === 1 ? a[0].tab.tabId : a.find((t) => t.idx === l.value)?.tab.tabId;
|
|
36
36
|
}, D = (e) => {
|
|
37
37
|
$.value = T(e);
|
|
38
38
|
}, L = (e) => {
|
|
39
|
-
const
|
|
40
|
-
u.value =
|
|
39
|
+
const a = n.value.at(e ?? -1);
|
|
40
|
+
u.value = a?.["active-tab-panel-idx"] ?? null;
|
|
41
41
|
};
|
|
42
|
-
v("handleClick", (e,
|
|
43
|
-
D(e), l.value = e, B("tabClicked", { tabIdx: e, tabElement:
|
|
42
|
+
v("handleClick", (e, a) => {
|
|
43
|
+
D(e), l.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
44
44
|
}), k(
|
|
45
45
|
l,
|
|
46
46
|
(e) => {
|
|
@@ -50,20 +50,20 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
|
|
|
50
50
|
immediate: !0
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
const E = (e,
|
|
54
|
-
for (let
|
|
55
|
-
if (e[
|
|
53
|
+
const E = (e, a) => {
|
|
54
|
+
for (let t = 0; t < e.length; t++)
|
|
55
|
+
if (e[t] !== a[t]) return t;
|
|
56
56
|
return null;
|
|
57
|
-
}, M = (e) => n.value.find((
|
|
57
|
+
}, M = (e = -1) => n.value.find((a) => a["active-tab-panel-idx"] === e);
|
|
58
58
|
return k(
|
|
59
59
|
() => n.value.map((e) => e["active-tab-panel-idx"]),
|
|
60
|
-
(e,
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
const s = n.value[
|
|
64
|
-
l.value !==
|
|
60
|
+
(e, a) => {
|
|
61
|
+
const t = E(e, a);
|
|
62
|
+
if (t === null) return;
|
|
63
|
+
const s = n.value[t]["active-tab-panel-idx"];
|
|
64
|
+
l.value !== t || s === void 0 || (u.value = s);
|
|
65
65
|
}
|
|
66
|
-
), (e,
|
|
66
|
+
), (e, a) => (i(), p("div", {
|
|
67
67
|
ref_key: "root",
|
|
68
68
|
ref: A,
|
|
69
69
|
class: I(e.$attrs.class),
|
|
@@ -78,16 +78,16 @@ const U = ["data-cy"], W = ["id"], te = /* @__PURE__ */ S({
|
|
|
78
78
|
uid: f(r),
|
|
79
79
|
"tab-list-classes": e.tabListClasses
|
|
80
80
|
}, null, 8, ["uid", "tab-list-classes"])) : o("", !0),
|
|
81
|
-
(i(!0), p(_, null, K(n.value, (
|
|
81
|
+
(i(!0), p(_, null, K(n.value, (t, s) => (i(), p(_, { key: s }, [
|
|
82
82
|
M(s) ? (i(), d(R, {
|
|
83
83
|
key: 0,
|
|
84
|
-
id: V(
|
|
85
|
-
"labelled-by": w(
|
|
86
|
-
active: F(
|
|
87
|
-
class: I(
|
|
84
|
+
id: V(t["active-tab-panel-idx"]),
|
|
85
|
+
"labelled-by": w(s) ?? "",
|
|
86
|
+
active: F(s),
|
|
87
|
+
class: I(t["tab-panel-classes"])
|
|
88
88
|
}, {
|
|
89
89
|
default: O(() => [
|
|
90
|
-
|
|
90
|
+
t.renderFn.children && t.renderFn.children.default ? (i(), d(Q(t.renderFn.children.default), { key: 0 })) : o("", !0)
|
|
91
91
|
]),
|
|
92
92
|
_: 2
|
|
93
93
|
}, 1032, ["id", "labelled-by", "active", "class"])) : o("", !0)
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.
|
|
|
6
6
|
import { default as d } from "./CheckboxBtn.js";
|
|
7
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.DTPN9Rg-.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";
|