@wikicasa-dev/components 2.0.32 → 2.0.34
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/LineChart.js +1 -1
- package/dist/chart/LineChart.vue.d.ts +15 -3
- package/dist/chunks/{BaseTabView.vue_vue_type_script_setup_true_lang.CmOknk6T.js → BaseTabView.vue_vue_type_script_setup_true_lang.DTPN9Rg-.js} +30 -30
- package/dist/chunks/LineChart.vue_vue_type_script_setup_true_lang.Cdyh3UKT.js +42 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/LineChart.vue_vue_type_script_setup_true_lang.CNkvmtfq.js +0 -37
package/dist/BaseTabView.js
CHANGED
package/dist/LineChart.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import { ChartOptions, ChartData } from 'chart.js';
|
|
1
|
+
import { ChartOptions, ChartData, Chart } from 'chart.js';
|
|
2
|
+
import { Optional } from '@wikicasa-dev/types';
|
|
2
3
|
declare const _default: import('vue').DefineComponent<{
|
|
3
4
|
options: ChartOptions<"line">;
|
|
4
5
|
data: ChartData<"line">;
|
|
5
|
-
}, {
|
|
6
|
+
}, {
|
|
7
|
+
charInstance: import('vue').ComputedRef<Optional<Chart<"line", (number | import('chart.js').Point | null)[], unknown>>>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
6
9
|
options: ChartOptions<"line">;
|
|
7
10
|
data: ChartData<"line">;
|
|
8
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
12
|
+
chart: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<Omit<import('vue-chartjs').ChartProps<"line", (number | import('chart.js').Point | null)[], unknown>, "type">>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
13
|
+
P: {};
|
|
14
|
+
B: {};
|
|
15
|
+
D: {};
|
|
16
|
+
C: {};
|
|
17
|
+
M: {};
|
|
18
|
+
Defaults: {};
|
|
19
|
+
}, Readonly<Omit<import('vue-chartjs').ChartProps<"line", (number | import('chart.js').Point | null)[], unknown>, "type">>, {}, {}, import('vue').ComputedOptions, import('vue').MethodOptions, {}> | null;
|
|
20
|
+
}, any>;
|
|
9
21
|
export default _default;
|
|
@@ -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)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as m, onBeforeMount as u, useTemplateRef as f, computed as d, unref as t, openBlock as h, createBlock as C, createCommentVNode as g } from "vue";
|
|
2
|
+
import { Line as L } from "vue-chartjs";
|
|
3
|
+
import { Chart as _, LineController as k, LineElement as x, Filler as y, PointElement as B, CategoryScale as E, LinearScale as v } from "chart.js";
|
|
4
|
+
import { useChartJsModules as M } from "../useChartjsModules.js";
|
|
5
|
+
const A = /* @__PURE__ */ m({
|
|
6
|
+
__name: "LineChart",
|
|
7
|
+
props: {
|
|
8
|
+
options: {},
|
|
9
|
+
data: {}
|
|
10
|
+
},
|
|
11
|
+
setup(o, { expose: r }) {
|
|
12
|
+
_.register(
|
|
13
|
+
k,
|
|
14
|
+
x,
|
|
15
|
+
y,
|
|
16
|
+
B,
|
|
17
|
+
E,
|
|
18
|
+
v
|
|
19
|
+
);
|
|
20
|
+
const n = o, {
|
|
21
|
+
registerPlugins: a,
|
|
22
|
+
registerTimeCartesianAxis: s,
|
|
23
|
+
executeRegistration: i,
|
|
24
|
+
resolved: c
|
|
25
|
+
} = M(n.options);
|
|
26
|
+
u(async () => {
|
|
27
|
+
await i(a, s);
|
|
28
|
+
});
|
|
29
|
+
const p = f("chart"), l = d(
|
|
30
|
+
() => p.value?.chart
|
|
31
|
+
);
|
|
32
|
+
return r({ charInstance: l }), (e, P) => t(c) ? (h(), C(t(L), {
|
|
33
|
+
key: 0,
|
|
34
|
+
ref: "chart",
|
|
35
|
+
options: e.options,
|
|
36
|
+
data: e.data
|
|
37
|
+
}, null, 8, ["options", "data"])) : g("", !0);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
A as _
|
|
42
|
+
};
|
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";
|
|
@@ -33,7 +33,7 @@ import { default as le } from "./StaticSpinner.js";
|
|
|
33
33
|
import { default as de } from "./BaseShimmerLoader.js";
|
|
34
34
|
import { _ as ue } from "./chunks/ShimmerMultiLine.vue_vue_type_script_setup_true_lang.DuLXZx8X.js";
|
|
35
35
|
import { _ as _e } from "./chunks/DoughnutChart.vue_vue_type_script_setup_true_lang.C4QPaUsI.js";
|
|
36
|
-
import { _ as Se } from "./chunks/LineChart.vue_vue_type_script_setup_true_lang.
|
|
36
|
+
import { _ as Se } from "./chunks/LineChart.vue_vue_type_script_setup_true_lang.Cdyh3UKT.js";
|
|
37
37
|
import { default as ge } from "./SimpleSlider.js";
|
|
38
38
|
import { _ as he } from "./chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BBMxY-re.js";
|
|
39
39
|
import { _ as Ie } from "./chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.CQHjzQc3.js";
|
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, onBeforeMount as m, unref as o, openBlock as l, createBlock as c, createCommentVNode as u } from "vue";
|
|
2
|
-
import { Line as d } from "vue-chartjs";
|
|
3
|
-
import { Chart as f, LineController as C, LineElement as g, Filler as L, PointElement as _, CategoryScale as h, LinearScale as k } from "chart.js";
|
|
4
|
-
import { useChartJsModules as y } from "../useChartjsModules.js";
|
|
5
|
-
const S = /* @__PURE__ */ p({
|
|
6
|
-
__name: "LineChart",
|
|
7
|
-
props: {
|
|
8
|
-
options: {},
|
|
9
|
-
data: {}
|
|
10
|
-
},
|
|
11
|
-
setup(t) {
|
|
12
|
-
f.register(
|
|
13
|
-
C,
|
|
14
|
-
g,
|
|
15
|
-
L,
|
|
16
|
-
_,
|
|
17
|
-
h,
|
|
18
|
-
k
|
|
19
|
-
);
|
|
20
|
-
const r = t, {
|
|
21
|
-
registerPlugins: n,
|
|
22
|
-
registerTimeCartesianAxis: i,
|
|
23
|
-
executeRegistration: a,
|
|
24
|
-
resolved: s
|
|
25
|
-
} = y(r.options);
|
|
26
|
-
return m(async () => {
|
|
27
|
-
await a(n, i);
|
|
28
|
-
}), (e, B) => o(s) ? (l(), c(o(d), {
|
|
29
|
-
key: 0,
|
|
30
|
-
options: e.options,
|
|
31
|
-
data: e.data
|
|
32
|
-
}, null, 8, ["options", "data"])) : u("", !0);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
S as _
|
|
37
|
-
};
|