@wikicasa-dev/components 2.4.1-alpha.17 → 2.4.1-alpha.2
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/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/UIKit/BaseModal.d.ts +3 -7
- package/dist/chart/composables/useChartjsModules.d.ts +10 -0
- package/dist/chart/composables/useChartjsModules.js +37 -1
- package/dist/components/IntersectionObserver/IntersectionObserver.d.ts +1 -1
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +85 -84
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +15 -14
- package/dist/packages/components/lib/chart/LineChart.vue.js +31 -19
- package/package.json +1 -1
- package/dist/ChartJs/Chart.js +0 -4
- package/dist/ChartJs/DoughnutChart/core.js +0 -6
- package/dist/ChartJs/LineChart/cartesian.js +0 -6
- package/dist/ChartJs/LineChart/core.js +0 -6
- package/dist/ChartJs/Plugins/Legend.js +0 -2
- package/dist/ChartJs/Plugins/TimeScale.js +0 -3
- package/dist/ChartJs/Plugins/Title.js +0 -2
- package/dist/ChartJs/Plugins/Tooltip.js +0 -2
- package/dist/VueChartJs/Doughnut/factory.js +0 -12
- package/dist/VueChartJs/Doughnut/index.js +0 -4
- package/dist/VueChartJs/Line/factory.js +0 -14
- package/dist/VueChartJs/Line/index.js +0 -4
- /package/dist/assets/{swiper-thumbs.css → swiper-keyboard.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -12,6 +12,7 @@ type __VLS_Props = {
|
|
|
12
12
|
classes?: ClassTypeProp;
|
|
13
13
|
}>;
|
|
14
14
|
withCloseIcon?: boolean;
|
|
15
|
+
showModal?: boolean;
|
|
15
16
|
headerTitle?: string;
|
|
16
17
|
autoClose?: number;
|
|
17
18
|
fullHeight?: boolean;
|
|
@@ -24,9 +25,6 @@ type __VLS_Props = {
|
|
|
24
25
|
closeIconBtnClasses?: ClassTypeProp;
|
|
25
26
|
titleClasses?: ClassTypeProp;
|
|
26
27
|
};
|
|
27
|
-
type __VLS_PublicProps = {
|
|
28
|
-
"showModal"?: boolean;
|
|
29
|
-
} & __VLS_Props;
|
|
30
28
|
declare function __VLS_template(): {
|
|
31
29
|
attrs: Partial<{}>;
|
|
32
30
|
slots: {
|
|
@@ -48,16 +46,14 @@ declare function __VLS_template(): {
|
|
|
48
46
|
rootEl: any;
|
|
49
47
|
};
|
|
50
48
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
51
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
49
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
52
50
|
opened: () => any;
|
|
53
51
|
closed: () => any;
|
|
54
52
|
dialogClick: (args_0: MouseEvent) => any;
|
|
55
|
-
|
|
56
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
53
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
57
54
|
onOpened?: (() => any) | undefined;
|
|
58
55
|
onClosed?: (() => any) | undefined;
|
|
59
56
|
onDialogClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
60
|
-
"onUpdate:showModal"?: ((value: boolean) => any) | undefined;
|
|
61
57
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
62
58
|
backdrop: HTMLDivElement;
|
|
63
59
|
modalDialog: HTMLDialogElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartOptions, ChartType } from 'chart.js';
|
|
2
|
+
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>)[]) => Promise<void>;
|
|
8
|
+
registerPlugins: () => Promise<void>;
|
|
9
|
+
resolved: import('vue').Ref<boolean, boolean>;
|
|
10
|
+
};
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { computed as t, ref as f } from "vue";
|
|
2
|
+
import { Chart as r, TimeScale as d, Tooltip as T, Legend as h, Title as w } from "chart.js";
|
|
3
|
+
import "chartjs-adapter-date-fns";
|
|
4
|
+
const L = (e) => {
|
|
5
|
+
if (!e) throw Error("Options must be defined");
|
|
6
|
+
const l = t(
|
|
7
|
+
() => !!e.plugins?.tooltip
|
|
8
|
+
), o = t(
|
|
9
|
+
() => e.scales?.x?.type === "time"
|
|
10
|
+
), c = t(() => !!e.plugins?.title), u = t(
|
|
11
|
+
() => !!e.plugins?.legend
|
|
12
|
+
), i = async () => {
|
|
13
|
+
l.value && r.register(T);
|
|
14
|
+
}, g = async () => {
|
|
15
|
+
o.value && r.register(d);
|
|
16
|
+
}, s = async () => {
|
|
17
|
+
c.value && r.register(w);
|
|
18
|
+
}, n = async () => {
|
|
19
|
+
u.value && r.register(h);
|
|
20
|
+
}, a = f(!1);
|
|
21
|
+
return {
|
|
22
|
+
registerTitle: s,
|
|
23
|
+
registerLegend: n,
|
|
24
|
+
registerTooltip: i,
|
|
25
|
+
registerTimeCartesianAxis: g,
|
|
26
|
+
executeRegistration: async (...m) => {
|
|
27
|
+
await Promise.all(m.map((p) => p())), a.value = !0;
|
|
28
|
+
},
|
|
29
|
+
registerPlugins: async () => {
|
|
30
|
+
await Promise.all([i(), s(), n()]);
|
|
31
|
+
},
|
|
32
|
+
resolved: a
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
L as useChartJsModules
|
|
37
|
+
};
|
|
@@ -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;
|
|
45
46
|
observeOnce: boolean;
|
|
46
47
|
skip: boolean;
|
|
47
|
-
threshold: number;
|
|
48
48
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
49
49
|
root: HTMLDivElement;
|
|
50
50
|
}, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CloseIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as $, shallowRef as h, useTemplateRef as v, onUnmounted as H, watch as O, createBlock as F, openBlock as r, Teleport as S, createVNode as y, Transition as K, unref as w, withCtx as N, withDirectives as U, createElementVNode as l, normalizeClass as i, createElementBlock as C, createCommentVNode as x, renderSlot as d, withModifiers as V, vShow as A } from "vue";
|
|
2
|
+
import { CloseIcon as P } from "@wikicasa-dev/svg-icons";
|
|
3
|
+
const R = ["id", "data-cy"], G = ["innerHTML"], J = /* @__PURE__ */ $({
|
|
4
4
|
__name: "BaseModal",
|
|
5
|
-
props:
|
|
5
|
+
props: {
|
|
6
6
|
id: { default: "base-bt-modal" },
|
|
7
7
|
size: { default: "modal-md" },
|
|
8
8
|
customBackdropClasses: {},
|
|
@@ -12,6 +12,7 @@ const G = ["id", "data-cy"], J = ["innerHTML"], X = /* @__PURE__ */ A({
|
|
|
12
12
|
customModalFooterClasses: {},
|
|
13
13
|
closeIcon: {},
|
|
14
14
|
withCloseIcon: { type: Boolean, default: !0 },
|
|
15
|
+
showModal: { type: Boolean, default: !0 },
|
|
15
16
|
headerTitle: { default: "" },
|
|
16
17
|
autoClose: {},
|
|
17
18
|
fullHeight: { type: Boolean, default: !1 },
|
|
@@ -20,44 +21,39 @@ const G = ["id", "data-cy"], J = ["innerHTML"], X = /* @__PURE__ */ A({
|
|
|
20
21
|
dataCy: {},
|
|
21
22
|
closeIconBtnClasses: {},
|
|
22
23
|
titleClasses: {}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
document?.body.removeEventListener("keydown", f);
|
|
35
|
-
}, I = () => {
|
|
36
|
-
c.value || (E(), document?.body.classList.add(
|
|
24
|
+
},
|
|
25
|
+
emits: ["closed", "opened", "dialogClick"],
|
|
26
|
+
setup(t, { emit: g }) {
|
|
27
|
+
const c = g, o = h(!1), k = v("backdrop"), a = v("modalDialog"), u = h(!1), p = t.showModal, m = ({ key: e }) => {
|
|
28
|
+
e === "Escape" && s();
|
|
29
|
+
}, M = () => {
|
|
30
|
+
document?.body.addEventListener("keydown", m);
|
|
31
|
+
}, f = () => {
|
|
32
|
+
document?.body.removeEventListener("keydown", m);
|
|
33
|
+
}, B = () => {
|
|
34
|
+
console.log("DEBUG:onBeforeEnter called"), M(), document?.body.classList.add(
|
|
37
35
|
"sm:uikit-pr-15px",
|
|
38
36
|
"sm:uikit-mr-0",
|
|
39
37
|
"uikit-overflow-hidden"
|
|
40
|
-
)
|
|
41
|
-
},
|
|
42
|
-
|
|
38
|
+
);
|
|
39
|
+
}, E = () => {
|
|
40
|
+
c("opened"), t.autoClose !== void 0 && setTimeout(() => {
|
|
43
41
|
s();
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
document?.body.classList.remove(
|
|
42
|
+
}, t.autoClose);
|
|
43
|
+
}, I = () => {
|
|
44
|
+
f(), document?.body.classList.remove(
|
|
47
45
|
"sm:uikit-pr-15px",
|
|
48
46
|
"sm:uikit-mr-0",
|
|
49
47
|
"uikit-overflow-hidden"
|
|
50
|
-
);
|
|
51
|
-
}, T = () => {
|
|
52
|
-
b(), c.value = !1, r("closed");
|
|
48
|
+
), c("closed");
|
|
53
49
|
}, s = () => {
|
|
54
50
|
o.value = !1;
|
|
55
|
-
},
|
|
56
|
-
a.value && a.value.contains(
|
|
57
|
-
},
|
|
58
|
-
a.value && a.value.contains(
|
|
59
|
-
},
|
|
60
|
-
if (!(
|
|
51
|
+
}, L = (e) => {
|
|
52
|
+
a.value && a.value.contains(e.target) && (u.value = !0);
|
|
53
|
+
}, z = (e) => {
|
|
54
|
+
a.value && a.value.contains(e.target) && (u.value = !1);
|
|
55
|
+
}, T = async (e) => {
|
|
56
|
+
if (!(e.target !== k.value && k.value?.contains(e.target)) && t.closeOnClickOut) {
|
|
61
57
|
if (u.value) {
|
|
62
58
|
u.value = !1;
|
|
63
59
|
return;
|
|
@@ -65,98 +61,103 @@ const G = ["id", "data-cy"], J = ["innerHTML"], X = /* @__PURE__ */ A({
|
|
|
65
61
|
s();
|
|
66
62
|
}
|
|
67
63
|
};
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
H(() => {
|
|
65
|
+
f(), document?.body.classList.remove(
|
|
70
66
|
"sm:uikit-pr-15px",
|
|
71
67
|
"sm:uikit-mr-0",
|
|
72
68
|
"uikit-overflow-hidden"
|
|
73
69
|
);
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
}), O(
|
|
71
|
+
() => t.showModal,
|
|
72
|
+
async (e) => {
|
|
73
|
+
o.value = e;
|
|
74
|
+
},
|
|
75
|
+
{ immediate: !0 }
|
|
76
|
+
);
|
|
77
|
+
const D = (e) => {
|
|
78
|
+
a.value === e.target && e.stopPropagation();
|
|
77
79
|
};
|
|
78
|
-
return (
|
|
79
|
-
|
|
80
|
-
appear: p
|
|
80
|
+
return (e, n) => (r(), F(S, { to: "body" }, [
|
|
81
|
+
y(K, {
|
|
82
|
+
appear: w(p),
|
|
81
83
|
name: "modal-transition",
|
|
82
84
|
duration: { enter: 500, leave: 250 },
|
|
83
|
-
onBeforeEnter:
|
|
84
|
-
onAfterEnter:
|
|
85
|
-
|
|
86
|
-
onAfterLeave: T
|
|
85
|
+
onBeforeEnter: B,
|
|
86
|
+
onAfterEnter: E,
|
|
87
|
+
onAfterLeave: I
|
|
87
88
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
89
|
+
default: N(() => [
|
|
90
|
+
U(l("div", {
|
|
90
91
|
ref: "backdrop",
|
|
91
92
|
class: i(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-z-50 uikit-h-full uikit-w-full", [
|
|
92
|
-
|
|
93
|
+
t.customBackdropClasses,
|
|
93
94
|
{
|
|
94
95
|
"uikit-bg-w-secondary/70": o.value
|
|
95
96
|
},
|
|
96
97
|
{ "uikit-bg-transparent": !o.value },
|
|
97
|
-
{ "sm:uikit-pt-[30px]": !
|
|
98
|
+
{ "sm:uikit-pt-[30px]": !t.centered }
|
|
98
99
|
]]),
|
|
99
|
-
onClick:
|
|
100
|
-
onMousedown:
|
|
101
|
-
onMouseup:
|
|
100
|
+
onClick: T,
|
|
101
|
+
onMousedown: L,
|
|
102
|
+
onMouseup: z
|
|
102
103
|
}, [
|
|
103
104
|
l("dialog", {
|
|
104
|
-
id:
|
|
105
|
+
id: t.id,
|
|
105
106
|
ref: "modalDialog",
|
|
106
|
-
"data-cy":
|
|
107
|
+
"data-cy": t.dataCy,
|
|
107
108
|
class: i(["uikit-modal-dialog uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
|
|
108
|
-
|
|
109
|
+
t.customModalDialogClasses,
|
|
109
110
|
{
|
|
110
|
-
"centered sm:uikit-absolute sm:uikit-top-1/2 sm:-uikit-translate-y-1/2":
|
|
111
|
+
"centered sm:uikit-absolute sm:uikit-top-1/2 sm:-uikit-translate-y-1/2": t.centered
|
|
111
112
|
},
|
|
112
|
-
{ "uikit-static": !
|
|
113
|
-
`base-${
|
|
114
|
-
|
|
113
|
+
{ "uikit-static": !t.centered },
|
|
114
|
+
`base-${t.size}`,
|
|
115
|
+
t.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
115
116
|
]]),
|
|
116
117
|
tabindex: "-1",
|
|
117
|
-
onClick: n[1] || (n[1] = (
|
|
118
|
-
onFocusin:
|
|
118
|
+
onClick: n[1] || (n[1] = (b) => c("dialogClick", b)),
|
|
119
|
+
onFocusin: D
|
|
119
120
|
}, [
|
|
120
121
|
l("div", {
|
|
121
|
-
class: i(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [
|
|
122
|
+
class: i(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [t.customModalHeaderClasses]])
|
|
122
123
|
}, [
|
|
123
|
-
|
|
124
|
+
t.withCloseIcon ? (r(), C("button", {
|
|
124
125
|
key: 0,
|
|
125
126
|
id: "close-icon-btn",
|
|
126
127
|
"data-cy": "bbt-default-close-icon-btn",
|
|
127
|
-
class: i(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px",
|
|
128
|
+
class: i(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", t.closeIconBtnClasses]),
|
|
128
129
|
type: "button",
|
|
129
130
|
"aria-label": "Close",
|
|
130
|
-
onClick: n[0] || (n[0] =
|
|
131
|
+
onClick: n[0] || (n[0] = V((b) => o.value = !1, ["prevent", "stop"]))
|
|
131
132
|
}, [
|
|
132
|
-
w(
|
|
133
|
-
class: i(["bbt-close-icon uikit-box-border",
|
|
134
|
-
width:
|
|
135
|
-
height:
|
|
133
|
+
y(w(P), {
|
|
134
|
+
class: i(["bbt-close-icon uikit-box-border", t.closeIcon?.classes]),
|
|
135
|
+
width: t.closeIcon?.size || 20,
|
|
136
|
+
height: t.closeIcon?.size || 20
|
|
136
137
|
}, null, 8, ["class", "width", "height"])
|
|
137
|
-
], 2)) :
|
|
138
|
-
d(
|
|
138
|
+
], 2)) : x("", !0),
|
|
139
|
+
d(e.$slots, "header", { closeModal: s }, () => [
|
|
139
140
|
l("span", {
|
|
140
|
-
class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22",
|
|
141
|
-
innerHTML:
|
|
142
|
-
}, null, 10,
|
|
141
|
+
class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", t.titleClasses]),
|
|
142
|
+
innerHTML: t.headerTitle
|
|
143
|
+
}, null, 10, G)
|
|
143
144
|
])
|
|
144
145
|
], 2),
|
|
145
146
|
l("div", {
|
|
146
|
-
class: i(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [
|
|
147
|
+
class: i(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [t.customModalBodyClasses]])
|
|
147
148
|
}, [
|
|
148
|
-
d(
|
|
149
|
+
d(e.$slots, "body", { closeModal: s })
|
|
149
150
|
], 2),
|
|
150
|
-
|
|
151
|
+
e.$slots.footer ? (r(), C("div", {
|
|
151
152
|
key: 0,
|
|
152
|
-
class: i(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6",
|
|
153
|
+
class: i(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", t.customModalFooterClasses])
|
|
153
154
|
}, [
|
|
154
|
-
d(
|
|
155
|
-
], 2)) :
|
|
156
|
-
d(
|
|
157
|
-
], 42,
|
|
155
|
+
d(e.$slots, "footer", { closeModal: s })
|
|
156
|
+
], 2)) : x("", !0),
|
|
157
|
+
d(e.$slots, "fixed-bottom")
|
|
158
|
+
], 42, R)
|
|
158
159
|
], 34), [
|
|
159
|
-
[
|
|
160
|
+
[A, o.value]
|
|
160
161
|
])
|
|
161
162
|
]),
|
|
162
163
|
_: 3
|
|
@@ -165,5 +166,5 @@ const G = ["id", "data-cy"], J = ["innerHTML"], X = /* @__PURE__ */ A({
|
|
|
165
166
|
}
|
|
166
167
|
});
|
|
167
168
|
export {
|
|
168
|
-
|
|
169
|
+
J as default
|
|
169
170
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineComponent as s, onBeforeMount as u, createBlock as i, createCommentVNode as c, unref as o, openBlock as m } from "vue";
|
|
2
|
+
import { Doughnut as p } from "vue-chartjs";
|
|
3
|
+
import { Chart as l, DoughnutController as d, ArcElement as f } from "chart.js";
|
|
4
|
+
import { useChartJsModules as g } from "../../../../chart/composables/useChartjsModules.js";
|
|
5
|
+
const y = /* @__PURE__ */ s({
|
|
4
6
|
__name: "DoughnutChart",
|
|
5
7
|
props: {
|
|
6
8
|
options: {},
|
|
7
9
|
data: {}
|
|
8
10
|
},
|
|
9
11
|
setup(t) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return (s, d) => (l(), i(r(n), {
|
|
12
|
+
l.register(d, f);
|
|
13
|
+
const e = t, { registerPlugins: r, resolved: n, executeRegistration: a } = g(
|
|
14
|
+
e.options
|
|
15
|
+
);
|
|
16
|
+
return u(async () => {
|
|
17
|
+
await a(r);
|
|
18
|
+
}), (h, C) => o(n) ? (m(), i(o(p), {
|
|
19
|
+
key: 0,
|
|
19
20
|
options: t.options,
|
|
20
21
|
data: t.data
|
|
21
|
-
}, null, 8, ["options", "data"]));
|
|
22
|
+
}, null, 8, ["options", "data"])) : c("", !0);
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
y as default
|
|
26
27
|
};
|
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineComponent as m, onBeforeMount as p, useTemplateRef as u, computed as f, createBlock as d, createCommentVNode as h, unref as t, openBlock as C } from "vue";
|
|
2
|
+
import { Line as g } from "vue-chartjs";
|
|
3
|
+
import { Chart as x, LineController as L, LineElement as k, Filler as B, PointElement as E, CategoryScale as v, LinearScale as y } from "chart.js";
|
|
4
|
+
import { useChartJsModules as M } from "../../../../chart/composables/useChartjsModules.js";
|
|
5
|
+
const F = /* @__PURE__ */ m({
|
|
4
6
|
__name: "LineChart",
|
|
5
7
|
props: {
|
|
6
8
|
options: {},
|
|
7
9
|
data: {}
|
|
8
10
|
},
|
|
9
|
-
setup(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hydrate: s()
|
|
18
|
-
}), o = l("chart"), a = r(
|
|
19
|
-
() => o.value?.chart
|
|
11
|
+
setup(e, { expose: o }) {
|
|
12
|
+
x.register(
|
|
13
|
+
L,
|
|
14
|
+
k,
|
|
15
|
+
B,
|
|
16
|
+
E,
|
|
17
|
+
v,
|
|
18
|
+
y
|
|
20
19
|
);
|
|
21
|
-
|
|
20
|
+
const r = e, {
|
|
21
|
+
registerPlugins: n,
|
|
22
|
+
registerTimeCartesianAxis: a,
|
|
23
|
+
executeRegistration: i,
|
|
24
|
+
resolved: s
|
|
25
|
+
} = M(r.options);
|
|
26
|
+
p(() => {
|
|
27
|
+
i(n, a);
|
|
28
|
+
});
|
|
29
|
+
const c = u("chart"), l = f(
|
|
30
|
+
() => c.value?.chart
|
|
31
|
+
);
|
|
32
|
+
return o({ chartInstance: l }), (P, R) => t(s) ? (C(), d(t(g), {
|
|
33
|
+
key: 0,
|
|
22
34
|
ref: "chart",
|
|
23
|
-
options:
|
|
24
|
-
data:
|
|
25
|
-
}, null, 8, ["options", "data"]));
|
|
35
|
+
options: e.options,
|
|
36
|
+
data: e.data
|
|
37
|
+
}, null, 8, ["options", "data"])) : h("", !0);
|
|
26
38
|
}
|
|
27
39
|
});
|
|
28
40
|
export {
|
|
29
|
-
|
|
41
|
+
F as default
|
|
30
42
|
};
|
package/package.json
CHANGED
package/dist/ChartJs/Chart.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
File without changes
|