@wikicasa-dev/components 2.4.1-alpha.13 → 2.4.1-alpha.15
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/ChartJs/Chart.js +4 -0
- package/dist/ChartJs/DoughnutChart/index.js +5 -0
- package/dist/ChartJs/LineChart/index.js +9 -0
- package/dist/ChartJs/Plugins/Legend.js +4 -0
- package/dist/ChartJs/Plugins/TimeScale.js +5 -0
- package/dist/ChartJs/Plugins/Title.js +4 -0
- package/dist/ChartJs/Plugins/Tooltip.js +4 -0
- package/dist/Swiper/autoplay.js +1 -1
- package/dist/Swiper/controller.js +1 -1
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/VueChartJs/Doughnut.js +4 -0
- package/dist/VueChartJs/Line.js +4 -0
- package/dist/chart/composables/useChartjsModules.d.ts +12 -8
- package/dist/chart/composables/useChartjsModules.js +65 -30
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +16 -14
- package/dist/packages/components/lib/chart/LineChart.vue.js +22 -25
- package/package.json +1 -1
- /package/dist/assets/{swiper-autoplay.css → swiper-controller.css} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CategoryScale as n, Filler as r, LineController as o, LineElement as t, LinearScale as i, PointElement as a } from "chart.js";
|
|
2
|
+
export {
|
|
3
|
+
n as CategoryScale,
|
|
4
|
+
r as Filler,
|
|
5
|
+
o as LineController,
|
|
6
|
+
t as LineElement,
|
|
7
|
+
i as LinearScale,
|
|
8
|
+
a as PointElement
|
|
9
|
+
};
|
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { ChartOptions, ChartType } from 'chart.js';
|
|
1
|
+
import { ChartOptions, ChartType, Chart as _Chart } from 'chart.js';
|
|
2
|
+
type Chart = typeof _Chart;
|
|
2
3
|
export declare const useChartJsModules: <T extends ChartType = ChartType>(options: ChartOptions<T>) => {
|
|
3
|
-
registerTitle: () => Promise<void>;
|
|
4
|
-
registerLegend: () => Promise<void>;
|
|
5
|
-
registerTooltip: () => Promise<void>;
|
|
6
|
-
registerTimeCartesianAxis: () => Promise<void>;
|
|
7
|
-
executeRegistration: (...args: (() => Promise<unknown>)[]) =>
|
|
8
|
-
registerPlugins: () => Promise<void>;
|
|
9
|
-
|
|
4
|
+
registerTitle: (ChartJs: Chart) => Promise<void>;
|
|
5
|
+
registerLegend: (ChartJs: Chart) => Promise<void>;
|
|
6
|
+
registerTooltip: (ChartJs: Chart) => Promise<void>;
|
|
7
|
+
registerTimeCartesianAxis: (ChartJs: Chart) => Promise<void>;
|
|
8
|
+
executeRegistration: (...args: ((c: Chart) => Promise<unknown>)[]) => void;
|
|
9
|
+
registerPlugins: (ChartJs: Chart) => Promise<void>;
|
|
10
|
+
registerLineChart: (ChartJs: Chart) => Promise<void>;
|
|
11
|
+
registerDoughnutChart: (ChartJs: Chart) => Promise<void>;
|
|
12
|
+
resolved: import('vue').ShallowRef<boolean, boolean>;
|
|
10
13
|
};
|
|
14
|
+
export {};
|
|
@@ -1,37 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
() =>
|
|
8
|
-
),
|
|
9
|
-
() =>
|
|
10
|
-
),
|
|
11
|
-
()
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
u.value
|
|
20
|
-
|
|
1
|
+
import { shallowRef as d, computed as s } from "vue";
|
|
2
|
+
const P = (r) => {
|
|
3
|
+
if (!r) throw Error("Options must be defined");
|
|
4
|
+
const n = d(!1), c = s(
|
|
5
|
+
() => !!r.plugins?.tooltip
|
|
6
|
+
), g = s(
|
|
7
|
+
() => r.scales?.x?.type === "time"
|
|
8
|
+
), u = s(() => !!r.plugins?.title), m = s(
|
|
9
|
+
() => !!r.plugins?.legend
|
|
10
|
+
), a = async (e) => {
|
|
11
|
+
if (!c.value) return;
|
|
12
|
+
const { Tooltip: t } = await import("../../ChartJs/Plugins/Tooltip.js");
|
|
13
|
+
e.register(t);
|
|
14
|
+
}, p = async (e) => {
|
|
15
|
+
if (!g.value) return;
|
|
16
|
+
const { TimeScale: t } = await import("../../ChartJs/Plugins/TimeScale.js");
|
|
17
|
+
e.register(t);
|
|
18
|
+
}, o = async (e) => {
|
|
19
|
+
if (!u.value) return;
|
|
20
|
+
const { Title: t } = await import("../../ChartJs/Plugins/Title.js");
|
|
21
|
+
e.register(t);
|
|
22
|
+
}, l = async (e) => {
|
|
23
|
+
if (!m.value) return;
|
|
24
|
+
const { Legend: t } = await import("../../ChartJs/Plugins/Legend.js");
|
|
25
|
+
e.register(t);
|
|
26
|
+
};
|
|
21
27
|
return {
|
|
22
|
-
registerTitle:
|
|
23
|
-
registerLegend:
|
|
24
|
-
registerTooltip:
|
|
25
|
-
registerTimeCartesianAxis:
|
|
26
|
-
executeRegistration:
|
|
27
|
-
|
|
28
|
+
registerTitle: o,
|
|
29
|
+
registerLegend: l,
|
|
30
|
+
registerTooltip: a,
|
|
31
|
+
registerTimeCartesianAxis: p,
|
|
32
|
+
executeRegistration: (...e) => {
|
|
33
|
+
setTimeout(async () => {
|
|
34
|
+
const { Chart: t } = await import("../../ChartJs/Chart.js");
|
|
35
|
+
await Promise.all(e.map((i) => i(t))), n.value = !0;
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
registerPlugins: async (e) => {
|
|
39
|
+
await Promise.all([
|
|
40
|
+
a(e),
|
|
41
|
+
o(e),
|
|
42
|
+
l(e)
|
|
43
|
+
]);
|
|
44
|
+
},
|
|
45
|
+
registerLineChart: async (e) => {
|
|
46
|
+
const {
|
|
47
|
+
LineController: t,
|
|
48
|
+
LineElement: i,
|
|
49
|
+
PointElement: w,
|
|
50
|
+
CategoryScale: h,
|
|
51
|
+
LinearScale: y,
|
|
52
|
+
Filler: T
|
|
53
|
+
} = await import("../../ChartJs/LineChart/index.js");
|
|
54
|
+
e.register(
|
|
55
|
+
t,
|
|
56
|
+
i,
|
|
57
|
+
w,
|
|
58
|
+
h,
|
|
59
|
+
y,
|
|
60
|
+
T
|
|
61
|
+
);
|
|
28
62
|
},
|
|
29
|
-
|
|
30
|
-
|
|
63
|
+
registerDoughnutChart: async (e) => {
|
|
64
|
+
const { DoughnutController: t, ArcElement: i } = await import("../../ChartJs/DoughnutChart/index.js");
|
|
65
|
+
e.register(t, i);
|
|
31
66
|
},
|
|
32
|
-
resolved:
|
|
67
|
+
resolved: n
|
|
33
68
|
};
|
|
34
69
|
};
|
|
35
70
|
export {
|
|
36
|
-
|
|
71
|
+
P as useChartJsModules
|
|
37
72
|
};
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useChartJsModules as g } from "../../../../chart/composables/useChartjsModules.js";
|
|
5
|
-
const y = /* @__PURE__ */ s({
|
|
1
|
+
import { defineComponent as i, defineAsyncComponent as c, onMounted as p, createBlock as d, createCommentVNode as m, unref as o, openBlock as h } from "vue";
|
|
2
|
+
import { useChartJsModules as l } from "../../../../chart/composables/useChartjsModules.js";
|
|
3
|
+
const x = /* @__PURE__ */ i({
|
|
6
4
|
__name: "DoughnutChart",
|
|
7
5
|
props: {
|
|
8
6
|
options: {},
|
|
9
7
|
data: {}
|
|
10
8
|
},
|
|
11
9
|
setup(t) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const e = t, n = c(
|
|
11
|
+
() => import("../../../../VueChartJs/Doughnut.js")
|
|
12
|
+
), {
|
|
13
|
+
registerDoughnutChart: r,
|
|
14
|
+
registerPlugins: s,
|
|
15
|
+
resolved: a,
|
|
16
|
+
executeRegistration: u
|
|
17
|
+
} = l(e.options);
|
|
18
|
+
return p(() => {
|
|
19
|
+
u(r, s);
|
|
20
|
+
}), (f, g) => o(a) ? (h(), d(o(n), {
|
|
19
21
|
key: 0,
|
|
20
22
|
options: t.options,
|
|
21
23
|
data: t.data
|
|
22
|
-
}, null, 8, ["options", "data"])) :
|
|
24
|
+
}, null, 8, ["options", "data"])) : m("", !0);
|
|
23
25
|
}
|
|
24
26
|
});
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
x as default
|
|
27
29
|
};
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useChartJsModules as M } from "../../../../chart/composables/useChartjsModules.js";
|
|
5
|
-
const F = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as d, defineAsyncComponent as l, onMounted as h, useTemplateRef as f, computed as C, createBlock as g, createCommentVNode as x, unref as t, openBlock as k } from "vue";
|
|
2
|
+
import { useChartJsModules as y } from "../../../../chart/composables/useChartjsModules.js";
|
|
3
|
+
const M = /* @__PURE__ */ d({
|
|
6
4
|
__name: "LineChart",
|
|
7
5
|
props: {
|
|
8
6
|
options: {},
|
|
9
7
|
data: {}
|
|
10
8
|
},
|
|
11
9
|
setup(e, { expose: o }) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
y
|
|
19
|
-
);
|
|
20
|
-
const r = e, {
|
|
21
|
-
registerPlugins: n,
|
|
22
|
-
registerTimeCartesianAxis: a,
|
|
10
|
+
const n = e, r = l(
|
|
11
|
+
() => import("../../../../VueChartJs/Line.js")
|
|
12
|
+
), {
|
|
13
|
+
registerLineChart: a,
|
|
14
|
+
registerPlugins: s,
|
|
15
|
+
registerTimeCartesianAxis: c,
|
|
23
16
|
executeRegistration: i,
|
|
24
|
-
resolved:
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
i(
|
|
17
|
+
resolved: p
|
|
18
|
+
} = y(n.options);
|
|
19
|
+
h(() => {
|
|
20
|
+
i(
|
|
21
|
+
a,
|
|
22
|
+
s,
|
|
23
|
+
c
|
|
24
|
+
);
|
|
28
25
|
});
|
|
29
|
-
const
|
|
30
|
-
() =>
|
|
26
|
+
const u = f("chart"), m = C(
|
|
27
|
+
() => u.value?.chart
|
|
31
28
|
);
|
|
32
|
-
return o({ chartInstance:
|
|
29
|
+
return o({ chartInstance: m }), (A, L) => t(p) ? (k(), g(t(r), {
|
|
33
30
|
key: 0,
|
|
34
31
|
ref: "chart",
|
|
35
32
|
options: e.options,
|
|
36
33
|
data: e.data
|
|
37
|
-
}, null, 8, ["options", "data"])) :
|
|
34
|
+
}, null, 8, ["options", "data"])) : x("", !0);
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
37
|
export {
|
|
41
|
-
|
|
38
|
+
M as default
|
|
42
39
|
};
|
package/package.json
CHANGED
|
File without changes
|