@wikicasa-dev/components 2.0.33 → 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/LineChart.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/LineChart.vue_vue_type_script_setup_true_lang.CNkvmtfq.js";
1
+ import { _ as f } from "./chunks/LineChart.vue_vue_type_script_setup_true_lang.Cdyh3UKT.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -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
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
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, {}, any>;
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;
@@ -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
@@ -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.CNkvmtfq.js";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.33",
3
+ "version": "2.0.34",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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
- };