@wikicasa-dev/components 2.4.1-alpha.9 → 2.4.2-alpha.0

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