@wikicasa-dev/components 2.4.1-alpha.16 → 2.4.1-alpha.17
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/DoughnutChart/core.js +6 -0
- package/dist/ChartJs/LineChart/cartesian.js +6 -0
- package/dist/ChartJs/LineChart/core.js +6 -0
- package/dist/ChartJs/Plugins/Legend.js +2 -4
- package/dist/ChartJs/Plugins/TimeScale.js +2 -4
- package/dist/ChartJs/Plugins/Title.js +2 -4
- package/dist/ChartJs/Plugins/Tooltip.js +2 -4
- 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/factory.js +12 -0
- package/dist/VueChartJs/Doughnut/index.js +4 -0
- package/dist/VueChartJs/Line/factory.js +14 -0
- package/dist/VueChartJs/Line/index.js +4 -0
- package/dist/chart/composables/useChartjsModules.d.ts +0 -14
- package/dist/chart/composables/useChartjsModules.js +1 -72
- package/dist/components/IntersectionObserver/IntersectionObserver.d.ts +1 -1
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +14 -18
- package/dist/packages/components/lib/chart/LineChart.vue.js +19 -29
- package/package.json +1 -1
- package/dist/ChartJs/DoughnutChart/index.js +0 -5
- package/dist/ChartJs/LineChart/index.js +0 -9
- package/dist/VueChartJs/Doughnut.js +0 -4
- package/dist/VueChartJs/Line.js +0 -4
- /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const e = async (i) => {
|
|
2
|
+
const t = [
|
|
3
|
+
import("../../ChartJs/DoughnutChart/core.js")
|
|
4
|
+
// always needed
|
|
5
|
+
];
|
|
6
|
+
i.timeAxis && t.push(import("../../ChartJs/Plugins/TimeScale.js")), i.tooltip && t.push(import("../../ChartJs/Plugins/Tooltip.js")), i.legend && t.push(import("../../ChartJs/Plugins/Legend.js")), i.title && t.push(import("../../ChartJs/Plugins/Title.js")), await Promise.all(t);
|
|
7
|
+
const { Doughnut: r } = await import("./index.js");
|
|
8
|
+
return r;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
e as createDoughnutChart
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const e = async (i) => {
|
|
2
|
+
const t = [
|
|
3
|
+
import("../../ChartJs/LineChart/core.js"),
|
|
4
|
+
// always needed
|
|
5
|
+
import("../../ChartJs/LineChart/cartesian.js")
|
|
6
|
+
// always needed
|
|
7
|
+
];
|
|
8
|
+
i.timeAxis && t.push(import("../../ChartJs/Plugins/TimeScale.js")), i.tooltip && t.push(import("../../ChartJs/Plugins/Tooltip.js")), i.legend && t.push(import("../../ChartJs/Plugins/Legend.js")), i.title && t.push(import("../../ChartJs/Plugins/Title.js")), await Promise.all(t);
|
|
9
|
+
const { Line: r } = await import("./index.js");
|
|
10
|
+
return r;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as createLineChart
|
|
14
|
+
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ChartOptions, ChartType, Chart as _Chart } from 'chart.js';
|
|
2
|
-
type Chart = typeof _Chart;
|
|
3
|
-
export declare const useChartJsModules: <T extends ChartType = ChartType>(options: ChartOptions<T>) => {
|
|
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>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
|
|
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
|
-
};
|
|
27
|
-
return {
|
|
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
|
-
);
|
|
62
|
-
},
|
|
63
|
-
registerDoughnutChart: async (e) => {
|
|
64
|
-
const { DoughnutController: t, ArcElement: i } = await import("../../ChartJs/DoughnutChart/index.js");
|
|
65
|
-
e.register(t, i);
|
|
66
|
-
},
|
|
67
|
-
resolved: n
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
P as useChartJsModules
|
|
72
|
-
};
|
|
1
|
+
|
|
@@ -42,9 +42,9 @@ declare const __VLS_component: import('vue').DefineComponent<IntersectionObserve
|
|
|
42
42
|
}, string, import('vue').PublicProps, Readonly<IntersectionObserverProps> & Readonly<{
|
|
43
43
|
onIntersection?: (() => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
|
-
threshold: number;
|
|
46
45
|
observeOnce: boolean;
|
|
47
46
|
skip: boolean;
|
|
47
|
+
threshold: number;
|
|
48
48
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
49
49
|
root: HTMLDivElement;
|
|
50
50
|
}, any>;
|
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as o, defineAsyncComponent as e, hydrateOnIdle as a, createBlock as i, openBlock as l, unref as r } from "vue";
|
|
2
|
+
import { createDoughnutChart as u } from "../../../../VueChartJs/Doughnut/factory.js";
|
|
3
|
+
const h = /* @__PURE__ */ o({
|
|
4
4
|
__name: "DoughnutChart",
|
|
5
5
|
props: {
|
|
6
6
|
options: {},
|
|
7
7
|
data: {}
|
|
8
8
|
},
|
|
9
9
|
setup(t) {
|
|
10
|
-
const
|
|
11
|
-
loader: () =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return p(() => {
|
|
20
|
-
u(r, a);
|
|
21
|
-
}), (g, C) => e(s) ? (l(), m(e(n), {
|
|
22
|
-
key: 0,
|
|
10
|
+
const n = e({
|
|
11
|
+
loader: () => u({
|
|
12
|
+
tooltip: !!t.options.plugins?.tooltip,
|
|
13
|
+
legend: !!t.options.plugins?.legend,
|
|
14
|
+
title: !!t.options.plugins?.title
|
|
15
|
+
}),
|
|
16
|
+
hydrate: a()
|
|
17
|
+
});
|
|
18
|
+
return (s, d) => (l(), i(r(n), {
|
|
23
19
|
options: t.options,
|
|
24
20
|
data: t.data
|
|
25
|
-
}, null, 8, ["options", "data"]))
|
|
21
|
+
}, null, 8, ["options", "data"]));
|
|
26
22
|
}
|
|
27
23
|
});
|
|
28
24
|
export {
|
|
29
|
-
|
|
25
|
+
h as default
|
|
30
26
|
};
|
|
@@ -1,40 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as i, defineAsyncComponent as c, hydrateOnIdle as s, useTemplateRef as l, computed as r, createBlock as p, openBlock as d, unref as m } from "vue";
|
|
2
|
+
import { createLineChart as u } from "../../../../VueChartJs/Line/factory.js";
|
|
3
|
+
const y = /* @__PURE__ */ i({
|
|
4
4
|
__name: "LineChart",
|
|
5
5
|
props: {
|
|
6
6
|
options: {},
|
|
7
7
|
data: {}
|
|
8
8
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const n =
|
|
11
|
-
loader: () =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
f(() => {
|
|
21
|
-
i(
|
|
22
|
-
a,
|
|
23
|
-
s,
|
|
24
|
-
c
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
const p = C("chart"), u = g(
|
|
28
|
-
() => p.value?.chart
|
|
9
|
+
setup(t, { expose: e }) {
|
|
10
|
+
const n = c({
|
|
11
|
+
loader: () => u({
|
|
12
|
+
timeAxis: t.options.scales?.x?.type === "time",
|
|
13
|
+
tooltip: !!t.options.plugins?.tooltip,
|
|
14
|
+
legend: !!t.options.plugins?.legend,
|
|
15
|
+
title: !!t.options.plugins?.title
|
|
16
|
+
}),
|
|
17
|
+
hydrate: s()
|
|
18
|
+
}), o = l("chart"), a = r(
|
|
19
|
+
() => o.value?.chart
|
|
29
20
|
);
|
|
30
|
-
return
|
|
31
|
-
key: 0,
|
|
21
|
+
return e({ chartInstance: a }), (h, f) => (d(), p(m(n), {
|
|
32
22
|
ref: "chart",
|
|
33
|
-
options:
|
|
34
|
-
data:
|
|
35
|
-
}, null, 8, ["options", "data"]))
|
|
23
|
+
options: t.options,
|
|
24
|
+
data: t.data
|
|
25
|
+
}, null, 8, ["options", "data"]));
|
|
36
26
|
}
|
|
37
27
|
});
|
|
38
28
|
export {
|
|
39
|
-
|
|
29
|
+
y as default
|
|
40
30
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
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/VueChartJs/Line.js
DELETED
|
File without changes
|