@wikicasa-dev/components 2.4.1-alpha.16 → 2.4.1-alpha.18
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/index.js +5 -0
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/Swiper/zoom.js +5 -0
- 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/assets/SwiperCarousel2.css +1 -1
- package/dist/components/IntersectionObserver/IntersectionObserver.d.ts +1 -1
- package/dist/components/carousel/SwiperCarousel.d.ts +5 -6
- package/dist/components/carousel/SwiperCarousel.js +2 -2
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +14 -18
- package/dist/packages/components/lib/chart/LineChart.vue.js +19 -29
- package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +130 -131
- 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/chart/composables/useChartjsModules.d.ts +0 -14
- package/dist/chart/composables/useChartjsModules.js +0 -72
- /package/dist/assets/{swiper-controller.css → swiper-keyboard.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 +1 @@
|
|
|
1
|
-
.no-transition[data-v-
|
|
1
|
+
.no-transition[data-v-705dfad0]{transition-duration:0ms!important}.disable-select[data-v-705dfad0]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-705dfad0]{pointer-events:auto!important}
|
|
@@ -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,6 +1,5 @@
|
|
|
1
1
|
import { Image } from '@wikicasa-dev/types';
|
|
2
|
-
import { Swiper } from 'swiper';
|
|
3
|
-
import { SwiperOptions } from 'swiper/types';
|
|
2
|
+
import { Swiper, SwiperOptions } from 'swiper/types';
|
|
4
3
|
type SwiperCarouselProps = {
|
|
5
4
|
id?: string;
|
|
6
5
|
swiperOptions: SwiperOptions;
|
|
@@ -21,8 +20,8 @@ declare function __VLS_template(): {
|
|
|
21
20
|
last_slide?(_: {}): any;
|
|
22
21
|
};
|
|
23
22
|
refs: {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
rootRef: HTMLDivElement;
|
|
24
|
+
swiperWrapperRef: HTMLDivElement;
|
|
26
25
|
};
|
|
27
26
|
rootEl: any;
|
|
28
27
|
};
|
|
@@ -2365,8 +2364,8 @@ declare const __VLS_component: import('vue').DefineComponent<SwiperCarouselProps
|
|
|
2365
2364
|
onFirstSlideLoaded?: (() => any) | undefined;
|
|
2366
2365
|
onInit?: (() => any) | undefined;
|
|
2367
2366
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
2368
|
-
|
|
2369
|
-
|
|
2367
|
+
rootRef: HTMLDivElement;
|
|
2368
|
+
swiperWrapperRef: HTMLDivElement;
|
|
2370
2369
|
}, any>;
|
|
2371
2370
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2372
2371
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import o from "../../packages/components/lib/components/carousel/SwiperCarousel.
|
|
|
2
2
|
import '../../assets/SwiperCarousel2.css';import '../../assets/SwiperCarousel.css';/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-705dfad0"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -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
|
};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { defineComponent as Q, reactive as U,
|
|
2
|
-
import { Swiper as T } from "swiper";
|
|
3
|
-
import { Zoom as _ } from "swiper/modules";
|
|
4
|
-
import '../../../../../assets/swiper-zoom.css';import '../../../../../assets/swiper-swiper.css';/* empty css */
|
|
5
|
-
/* empty css */
|
|
1
|
+
import { defineComponent as Q, reactive as U, useTemplateRef as z, shallowRef as X, useId as Y, computed as v, onMounted as x, watch as _, nextTick as L, createElementBlock as u, openBlock as p, normalizeClass as d, createElementVNode as g, createCommentVNode as P, renderSlot as V, Fragment as k, renderList as M, mergeProps as T, withModifiers as O } from "vue";
|
|
6
2
|
import { shallowCopyObjectTo as ee } from "@wikicasa-dev/utilities";
|
|
7
|
-
const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "height", "onLoad"], ae = ["id"], re = ["alt"],
|
|
3
|
+
const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "height", "onLoad"], ae = ["id"], re = ["alt"], ue = /* @__PURE__ */ Q({
|
|
8
4
|
inheritAttrs: !1,
|
|
9
5
|
__name: "SwiperCarousel",
|
|
10
6
|
props: {
|
|
@@ -18,229 +14,232 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
18
14
|
shiftFirstImage: { type: Boolean, default: !1 }
|
|
19
15
|
},
|
|
20
16
|
emits: ["moved", "click", "firstSlideLoaded", "init"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
swiperParams: { modules: [
|
|
17
|
+
setup(t, { expose: R, emit: E }) {
|
|
18
|
+
const $ = E, a = U({
|
|
19
|
+
swiperParams: { modules: [] },
|
|
24
20
|
swiper: null,
|
|
25
21
|
initCarousel: !1
|
|
26
|
-
}),
|
|
27
|
-
() =>
|
|
28
|
-
),
|
|
29
|
-
|
|
30
|
-
},
|
|
22
|
+
}), F = z("rootRef"), B = z("swiperWrapperRef"), D = X(!1), j = Y(), w = v(() => t.id ?? j), A = v(() => a.swiper), h = v(() => t.swiperOptions?.slidesPerView || 1), N = v(() => !!t.swiperOptions?.keyboard), S = v(() => !!t.swiperOptions.navigation), C = v(() => !!t.swiperOptions.pagination), W = v(() => !!t.swiperOptions.autoplay), q = v(
|
|
23
|
+
() => t.swiperOptions?.effect || "slider"
|
|
24
|
+
), K = () => {
|
|
25
|
+
t.swiperOptions && ee(t.swiperOptions, a.swiperParams);
|
|
26
|
+
}, I = (e, s = -1, i = !1) => {
|
|
31
27
|
if (!e.images)
|
|
32
28
|
return { src: e.src || "" };
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
for (const
|
|
36
|
-
const { mq:
|
|
37
|
-
|
|
29
|
+
let o = "", r = "", n = "";
|
|
30
|
+
if (t.artDirection) {
|
|
31
|
+
for (const l in t.artDirection) {
|
|
32
|
+
const { mq: c, width: m } = t.artDirection[l];
|
|
33
|
+
m && (n += n ? `,${c} ${parseInt(m)}px` : `${c} ${parseInt(m)}px`);
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
return !
|
|
42
|
-
}, ""),
|
|
35
|
+
r = e.images.reduce((l, c, m) => {
|
|
36
|
+
const f = Object.values(t.artDirection)[m];
|
|
37
|
+
return !f || !f.width || (l += l ? `, ${c.storagePath} ${f.width}` : `${c.storagePath} ${f.width}`), l;
|
|
38
|
+
}, ""), o = e.images[0].storagePath;
|
|
43
39
|
} else {
|
|
44
|
-
let
|
|
45
|
-
e.images.length > 3 ?
|
|
40
|
+
let l = e.images;
|
|
41
|
+
e.images.length > 3 ? l = e.images.slice(2, 5) : t.shiftFirstImage && (l[0] = l[1]), r = l.reduce((c, m, f) => (f === 0 && (o = `${m.storagePath}`), f > 0 && (c += ", "), `${c}${m.storagePath} ${f + 1}x`), "");
|
|
46
42
|
}
|
|
47
|
-
const
|
|
48
|
-
return typeof
|
|
49
|
-
src:
|
|
50
|
-
srcset:
|
|
51
|
-
sizes:
|
|
43
|
+
const y = o, J = r;
|
|
44
|
+
return typeof h.value == "number" && s > h.value ? (o = "", r = "", { sizes: n, "data-src": y, "data-srcset": J }) : i ? {
|
|
45
|
+
src: o,
|
|
46
|
+
srcset: r,
|
|
47
|
+
sizes: n,
|
|
52
48
|
loading: "lazy",
|
|
53
49
|
fetchpriority: "low"
|
|
54
50
|
} : {
|
|
55
|
-
src:
|
|
56
|
-
srcset:
|
|
57
|
-
sizes:
|
|
58
|
-
loading:
|
|
59
|
-
fetchpriority: !
|
|
51
|
+
src: o,
|
|
52
|
+
srcset: r,
|
|
53
|
+
sizes: n,
|
|
54
|
+
loading: t.lazyLoadImages || s >= h.value ? "lazy" : void 0,
|
|
55
|
+
fetchpriority: !t.lazyLoadImages && s === 0 ? "high" : "low"
|
|
60
56
|
};
|
|
61
|
-
},
|
|
62
|
-
if (typeof
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
57
|
+
}, b = [], Z = (e) => {
|
|
58
|
+
if (typeof h.value == "string") return;
|
|
59
|
+
const s = b[e];
|
|
60
|
+
if (s && !s.src && (s.src = s.dataset.src || "", s.srcset = s.dataset.srcset || ""), e < h.value || e + 1 >= (t.images ?? []).length)
|
|
65
61
|
return;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
e === 0 &&
|
|
70
|
-
|
|
62
|
+
const i = b[e + 1];
|
|
63
|
+
i && !i.src && (i.src = i?.dataset.src || "", i.srcset = i?.dataset.srcset || "");
|
|
64
|
+
}, G = (e) => {
|
|
65
|
+
e === 0 && b && b[e] && L(() => {
|
|
66
|
+
F.value?.setAttribute("data-first-slide-loaded", "true"), $("firstSlideLoaded");
|
|
71
67
|
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
}, H = async () => {
|
|
69
|
+
K();
|
|
70
|
+
const [{ Swiper: e }, { Zoom: s }] = await Promise.all([
|
|
71
|
+
import("../../../../../Swiper/index.js"),
|
|
72
|
+
import("../../../../../Swiper/zoom.js")
|
|
73
|
+
]);
|
|
74
|
+
if (a.swiperParams.modules?.push(s), N.value) {
|
|
75
|
+
const { Keyboard: r } = await import("../../../../../Swiper/keyboard.js");
|
|
76
|
+
a.swiperParams.modules?.push(r), a.swiperParams.keyboard = t.swiperOptions.keyboard;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
79
|
-
const { Pagination:
|
|
80
|
-
a.swiperParams.modules?.push(
|
|
78
|
+
if (C.value) {
|
|
79
|
+
const { Pagination: r } = await import("../../../../../Swiper/pagination.js");
|
|
80
|
+
a.swiperParams.modules?.push(r), a.swiperParams.pagination = {
|
|
81
81
|
el: ".swiper-pagination",
|
|
82
|
-
renderFraction: (
|
|
83
|
-
<span data-cy="swiper-pagination-current" class="${
|
|
82
|
+
renderFraction: (n, y) => `<div class="uikit-rounded-xs uikit-border-w-black uikit-border uikit-border-solid uikit-px-3 uikit-bg-white uikit-pt-[3px] uikit-pb-[3px]">
|
|
83
|
+
<span data-cy="swiper-pagination-current" class="${n}"></span>
|
|
84
84
|
/
|
|
85
|
-
<span data-cy="swiper-pagination-total" class="${
|
|
85
|
+
<span data-cy="swiper-pagination-total" class="${y}"></span>
|
|
86
86
|
</div>`,
|
|
87
87
|
...typeof a.swiperParams.pagination == "boolean" ? {} : a.swiperParams.pagination
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
if (
|
|
91
|
-
const { Navigation:
|
|
92
|
-
a.swiperParams.modules?.push(
|
|
93
|
-
const
|
|
94
|
-
...
|
|
90
|
+
if (S.value) {
|
|
91
|
+
const { Navigation: r } = await import("../../../../../Swiper/navigation.js");
|
|
92
|
+
a.swiperParams.modules?.push(r);
|
|
93
|
+
const n = {
|
|
94
|
+
...t.swiperOptions.navigation.nextEl ?? {
|
|
95
95
|
nextEl: ".swiper-button-next"
|
|
96
96
|
},
|
|
97
|
-
...
|
|
97
|
+
...t.swiperOptions.navigation.prevEl ?? {
|
|
98
98
|
prevEl: ".swiper-button-prev"
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
a.swiperParams.navigation = {
|
|
102
|
-
...typeof
|
|
103
|
-
...
|
|
102
|
+
...typeof t.swiperOptions.navigation == "object" ? t.swiperOptions.navigation : {},
|
|
103
|
+
...n
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
if (
|
|
107
|
-
const { Autoplay:
|
|
108
|
-
a.swiperParams.modules?.push(
|
|
106
|
+
if (W.value) {
|
|
107
|
+
const { Autoplay: r } = await import("../../../../../Swiper/autoplay.js");
|
|
108
|
+
a.swiperParams.modules?.push(r), a.swiperParams.autoplay = t.swiperOptions.autoplay;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const i = {
|
|
111
111
|
...a.swiperParams,
|
|
112
112
|
on: {
|
|
113
113
|
init: () => {
|
|
114
|
-
|
|
114
|
+
D.value = !0, $("init");
|
|
115
115
|
},
|
|
116
|
-
slideChange: (
|
|
117
|
-
Z(
|
|
116
|
+
slideChange: (r) => {
|
|
117
|
+
Z(r.activeIndex), $("moved", { activeIndex: r.activeIndex });
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
123
|
-
const [
|
|
121
|
+
let o = null;
|
|
122
|
+
if (t.thumbSwiperOptions) {
|
|
123
|
+
const [r, n, y] = await Promise.all([
|
|
124
124
|
import("../../../../../Swiper/thumbs.js"),
|
|
125
125
|
import("../../../../../Swiper/free-mode.js"),
|
|
126
126
|
import("../../../../../Swiper/controller.js")
|
|
127
127
|
]);
|
|
128
|
-
a.swiperParams.modules?.push(
|
|
129
|
-
...
|
|
130
|
-
modules: [
|
|
131
|
-
}),
|
|
132
|
-
swiper:
|
|
128
|
+
a.swiperParams.modules?.push(r.Thumbs), a.swiperParams.modules?.push(y.Controller), o = new e(`#thumb_${w.value}`, {
|
|
129
|
+
...t.thumbSwiperOptions,
|
|
130
|
+
modules: [n.FreeMode]
|
|
131
|
+
}), i.thumbs = {
|
|
132
|
+
swiper: o
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
135
|
+
i.lazyPreloadPrevNext = 1, a.swiper = new e(`#${w.value}`, i), B.value?.classList.remove("uikit-hidden");
|
|
136
|
+
};
|
|
137
|
+
return x(() => setTimeout(H)), _(
|
|
138
|
+
() => t.images,
|
|
138
139
|
() => {
|
|
139
|
-
|
|
140
|
+
L(() => {
|
|
140
141
|
a.swiper?.update();
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
|
-
),
|
|
144
|
-
swiper:
|
|
145
|
-
moveTo(e,
|
|
146
|
-
a.swiper?.slideTo(e,
|
|
144
|
+
), R({
|
|
145
|
+
swiper: A,
|
|
146
|
+
moveTo(e, s = 0, i = !0) {
|
|
147
|
+
a.swiper?.slideTo(e, s, i);
|
|
147
148
|
},
|
|
148
149
|
updateSlidesPerView: (e) => {
|
|
149
150
|
!a.swiper || a.swiper.params.slidesPerView === e || (a.swiper.params.slidesPerView = e, a.swiper.update());
|
|
150
151
|
}
|
|
151
|
-
}), (e,
|
|
152
|
-
id: `root-${
|
|
153
|
-
|
|
154
|
-
ref: L,
|
|
152
|
+
}), (e, s) => (p(), u("div", {
|
|
153
|
+
id: `root-${w.value}`,
|
|
154
|
+
ref: "rootRef",
|
|
155
155
|
class: d(["swiper-carousel-root", e.$attrs["root-classes"]])
|
|
156
156
|
}, [
|
|
157
|
-
|
|
158
|
-
id:
|
|
157
|
+
g("div", {
|
|
158
|
+
id: w.value,
|
|
159
159
|
"data-cy": e.$attrs["data-cy"],
|
|
160
160
|
class: d(["swiper", e.$attrs["swiper-classes"]])
|
|
161
161
|
}, [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
ref: S,
|
|
162
|
+
g("div", {
|
|
163
|
+
ref: "swiperWrapperRef",
|
|
165
164
|
class: d(["swiper-wrapper", [
|
|
166
165
|
e.$attrs["swiper-wrapper-classes"],
|
|
167
|
-
|
|
166
|
+
q.value === "none" && "no-transition"
|
|
168
167
|
]]),
|
|
169
|
-
onClick:
|
|
168
|
+
onClick: s[0] || (s[0] = (i) => $("click"))
|
|
170
169
|
}, [
|
|
171
|
-
|
|
172
|
-
(
|
|
173
|
-
key: `swiper_${
|
|
170
|
+
V(e.$slots, "default", {}, () => [
|
|
171
|
+
(p(!0), u(k, null, M(t.images, (i, o) => (p(), u("div", {
|
|
172
|
+
key: `swiper_${w.value}_${o}`,
|
|
174
173
|
class: d(["swiper-slide", e.$attrs["swiper-slide-classes"]])
|
|
175
174
|
}, [
|
|
176
|
-
|
|
175
|
+
g("div", {
|
|
177
176
|
class: d(["swiper-zoom-container", e.$attrs["swiper-zoom-container-classes"]])
|
|
178
177
|
}, [
|
|
179
|
-
|
|
178
|
+
t.backgroundImage ? P("", !0) : (p(), u("img", T({
|
|
180
179
|
key: 0,
|
|
181
180
|
ref_for: !0,
|
|
182
|
-
ref: (
|
|
183
|
-
|
|
181
|
+
ref: (r) => {
|
|
182
|
+
b.push(r);
|
|
184
183
|
},
|
|
185
|
-
class: ["disable-select", [e.$attrs["slide-img-classes"] ||
|
|
186
|
-
"data-idx": `${
|
|
187
|
-
}, { ref_for: !0 },
|
|
188
|
-
alt:
|
|
184
|
+
class: ["disable-select", [e.$attrs["slide-img-classes"] || i.classes]],
|
|
185
|
+
"data-idx": `${w.value}-slide-img-${o}`
|
|
186
|
+
}, { ref_for: !0 }, I(i, o), {
|
|
187
|
+
alt: i.alt,
|
|
189
188
|
itemprop: "image",
|
|
190
|
-
width:
|
|
191
|
-
height:
|
|
192
|
-
onLoad: (
|
|
189
|
+
width: i.width,
|
|
190
|
+
height: i.height,
|
|
191
|
+
onLoad: (r) => G(o)
|
|
193
192
|
}), null, 16, ie))
|
|
194
193
|
], 2)
|
|
195
194
|
], 2))), 128)),
|
|
196
|
-
|
|
195
|
+
V(e.$slots, "last_slide", {}, void 0, !0)
|
|
197
196
|
], !0)
|
|
198
197
|
], 2),
|
|
199
|
-
|
|
198
|
+
C.value ? (p(), u("div", {
|
|
200
199
|
key: 0,
|
|
201
200
|
class: d([e.$attrs["swiper-pagination-classes"], "swiper-pagination [&.swiper-pagination-fraction]:uikit-flex [&.swiper-pagination-fraction]:uikit-justify-center"]),
|
|
202
|
-
onClick:
|
|
201
|
+
onClick: s[1] || (s[1] = O(() => {
|
|
203
202
|
}, ["stop"]))
|
|
204
|
-
}, null, 2)) :
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
}, null, 2)) : P("", !0),
|
|
204
|
+
S.value ? (p(), u(k, { key: 1 }, [
|
|
205
|
+
g("div", {
|
|
207
206
|
class: "swiper-button-prev",
|
|
208
207
|
"data-cy": "swiper-button-prev",
|
|
209
|
-
onClick:
|
|
208
|
+
onClick: s[2] || (s[2] = O(() => {
|
|
210
209
|
}, ["stop"]))
|
|
211
210
|
}),
|
|
212
|
-
|
|
211
|
+
g("div", {
|
|
213
212
|
class: "swiper-button-next",
|
|
214
213
|
"data-cy": "swiper-button-next",
|
|
215
|
-
onClick:
|
|
214
|
+
onClick: s[3] || (s[3] = O(() => {
|
|
216
215
|
}, ["stop"]))
|
|
217
216
|
})
|
|
218
|
-
], 64)) :
|
|
217
|
+
], 64)) : P("", !0)
|
|
219
218
|
], 10, se),
|
|
220
|
-
|
|
219
|
+
t.thumbSwiperOptions ? (p(), u("div", {
|
|
221
220
|
key: 0,
|
|
222
|
-
id: `thumb_${
|
|
221
|
+
id: `thumb_${w.value}`,
|
|
223
222
|
thumbsSlider: "",
|
|
224
223
|
class: d(["swiper", e.$attrs["thumb-swiper-classes"]])
|
|
225
224
|
}, [
|
|
226
|
-
|
|
225
|
+
g("div", {
|
|
227
226
|
class: d(["swiper-wrapper", e.$attrs["thumb-swiper-wrapper-classes"]])
|
|
228
227
|
}, [
|
|
229
|
-
(
|
|
230
|
-
key: `thumb_${
|
|
228
|
+
(p(!0), u(k, null, M(t.images, (i, o) => (p(), u("div", {
|
|
229
|
+
key: `thumb_${w.value}_${o}`,
|
|
231
230
|
class: d(["swiper-slide", e.$attrs["thumb-img-wrapper-classes"]])
|
|
232
231
|
}, [
|
|
233
|
-
|
|
232
|
+
g("img", T({
|
|
234
233
|
class: e.$attrs["thumb-img-classes"]
|
|
235
|
-
}, { ref_for: !0 },
|
|
236
|
-
alt:
|
|
234
|
+
}, { ref_for: !0 }, I(i, -1, !1), {
|
|
235
|
+
alt: i.alt
|
|
237
236
|
}), null, 16, re)
|
|
238
237
|
], 2))), 128))
|
|
239
238
|
], 2)
|
|
240
|
-
], 10, ae)) :
|
|
239
|
+
], 10, ae)) : P("", !0)
|
|
241
240
|
], 10, te));
|
|
242
241
|
}
|
|
243
242
|
});
|
|
244
243
|
export {
|
|
245
|
-
|
|
244
|
+
ue as default
|
|
246
245
|
};
|
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
|
@@ -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 +0,0 @@
|
|
|
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
|
-
};
|
|
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
|
-
};
|
|
File without changes
|