@wikicasa-dev/components 2.1.23 → 2.1.24-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.
- package/dist/UIKit/AccessibleSelect.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordion.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionBtn.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionContent.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionItem.js +1 -1
- package/dist/UIKit/BaseAlert.js +2 -2
- package/dist/UIKit/BaseAutocomplete.js +1 -1
- package/dist/UIKit/BaseBadge.js +2 -2
- package/dist/UIKit/BaseBreadcrumb.js +1 -1
- package/dist/UIKit/BaseButton.js +1 -1
- package/dist/UIKit/BaseCard.js +2 -2
- package/dist/UIKit/BaseComplexToggle.js +2 -2
- package/dist/UIKit/BaseDropDown.js +1 -1
- package/dist/UIKit/BaseFloatingLabel.js +2 -2
- package/dist/UIKit/BaseIcon.js +2 -2
- package/dist/UIKit/BaseInput.js +2 -2
- package/dist/UIKit/BaseModal.js +2 -2
- package/dist/UIKit/BasePagination.js +1 -1
- package/dist/UIKit/BasePaper.js +2 -2
- package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
- package/dist/UIKit/BaseSlider.js +2 -2
- package/dist/UIKit/BaseSnackbar.d.ts +39 -20
- package/dist/UIKit/BaseSnackbar.js +3 -5
- package/dist/UIKit/BaseTextarea.js +2 -2
- package/dist/UIKit/BaseToggle.js +2 -2
- package/dist/UIKit/BaseTooltip.js +2 -2
- package/dist/UIKit/BaseUploadFile.js +1 -1
- package/dist/UIKit/Checkbox/CheckboxBtn.js +2 -2
- package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
- package/dist/UIKit/Radio/RadioButton.js +1 -1
- package/dist/UIKit/Radio/RadioGroup.js +1 -1
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +2 -2
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
- package/dist/UIKit/Slider/SimpleSlider.js +2 -2
- package/dist/UIKit/StaticSpinner.js +2 -2
- package/dist/UIKit/Tab/BaseTab.js +1 -1
- package/dist/UIKit/Tab/BaseTabList.js +1 -1
- package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
- package/dist/UIKit/Tab/BaseTabView.js +1 -1
- package/dist/_virtual/polyline.js +1 -1
- package/dist/assets/{packages/components/lib → lib}/UIKit/BaseBadge.css +1 -1
- package/dist/assets/lib/UIKit/BaseCard.css +1 -0
- package/dist/assets/lib/UIKit/BaseComplexToggle.css +1 -0
- package/dist/assets/lib/UIKit/BaseModal.css +1 -0
- package/dist/assets/lib/UIKit/BaseSnackbar.css +1 -0
- package/dist/assets/lib/UIKit/Slider/SimpleSlider.css +1 -0
- package/dist/assets/node_modules/swiper/modules/keyboard.css +0 -0
- package/dist/assets/node_modules/swiper/modules/navigation.css +1 -0
- package/dist/assets/node_modules/swiper/swiper.css +1 -0
- package/dist/assets/src/tailwind.css +1 -0
- package/dist/chart/DoughnutChart.js +1 -1
- package/dist/chart/LineChart.js +1 -1
- package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
- package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
- package/dist/components/carousel/SwiperCarousel.d.ts +11 -4
- package/dist/components/carousel/SwiperCarousel.js +3 -3
- package/dist/index.js +89 -88
- package/dist/lazyModules/Swiper/autoplay.js +5 -0
- package/dist/lazyModules/Swiper/controller.js +5 -0
- package/dist/lazyModules/Swiper/free-mode.js +5 -0
- package/dist/lazyModules/Swiper/keyboard.js +5 -0
- package/dist/lazyModules/Swiper/navigation.js +5 -0
- package/dist/lazyModules/Swiper/pagination.js +5 -0
- package/dist/lazyModules/Swiper/thumbs.js +5 -0
- package/dist/lib/UIKit/AccessibleSelect.vue.js +211 -0
- package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordion.vue.js +3 -3
- package/dist/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +60 -0
- package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionContent.vue.js +10 -10
- package/dist/{packages/components/lib → lib}/UIKit/Accordion/BaseAccordionItem.vue.js +54 -54
- package/dist/lib/UIKit/BaseAlert.vue.js +19 -0
- package/dist/lib/UIKit/BaseAutocomplete.vue.js +192 -0
- package/dist/lib/UIKit/BaseBadge.vue.js +19 -0
- package/dist/lib/UIKit/BaseBreadcrumb.vue.js +58 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseButton.vue.js +18 -18
- package/dist/lib/UIKit/BaseCard.vue.js +37 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseComplexToggle.vue.js +29 -29
- package/dist/lib/UIKit/BaseDropDown.vue.js +135 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.vue.js +14 -14
- package/dist/lib/UIKit/BaseIcon.vue.js +27 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseInput.vue.js +86 -86
- package/dist/{packages/components/lib → lib}/UIKit/BaseModal.vue.js +61 -61
- package/dist/{packages/components/lib → lib}/UIKit/BasePagination.vue.js +93 -95
- package/dist/lib/UIKit/BaseSelect/SelectItem.vue.js +41 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseSlider.vue.js +45 -45
- package/dist/lib/UIKit/BaseSnackbar.vue.js +119 -0
- package/dist/{packages/components/lib → lib}/UIKit/BaseTextarea.vue.js +57 -57
- package/dist/{packages/components/lib → lib}/UIKit/BaseToggle.vue.js +15 -15
- package/dist/lib/UIKit/BaseTooltip.vue.js +41 -0
- package/dist/lib/UIKit/BaseUploadFile.vue.js +71 -0
- package/dist/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.vue.js +26 -26
- package/dist/lib/UIKit/Checkbox/CheckboxGroup.vue.js +112 -0
- package/dist/lib/UIKit/Radio/RadioButton.vue.js +58 -0
- package/dist/lib/UIKit/Radio/RadioGroup.vue.js +60 -0
- package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +7 -7
- package/dist/{packages/components/lib → lib}/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +8 -8
- package/dist/{packages/components/lib → lib}/UIKit/Slider/SimpleSlider.vue.js +7 -7
- package/dist/{packages/components/lib → lib}/UIKit/StaticSpinner.vue.js +3 -3
- package/dist/lib/UIKit/Tab/BaseTabList.vue.js +45 -0
- package/dist/lib/UIKit/Tab/BaseTabPanel.vue.js +25 -0
- package/dist/lib/UIKit/Tab/BaseTabView.vue.js +107 -0
- package/dist/lib/chart/DoughnutChart.vue.js +27 -0
- package/dist/lib/chart/LineChart.vue.js +42 -0
- package/dist/lib/components/IntersectionObserver/IntersectionObservable.vue.js +24 -0
- package/dist/{packages/components/lib → lib}/components/carousel/SwiperCarousel.vue.js +26 -27
- package/dist/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +41 -0
- package/dist/node_modules/{.pnpm/js-cookie@3.0.5/node_modules/js-cookie → js-cookie}/dist/js.cookie.js +0 -1
- package/dist/node_modules/swiper/modules/autoplay.js +128 -0
- package/dist/node_modules/swiper/modules/controller.js +100 -0
- package/dist/node_modules/swiper/modules/free-mode.js +123 -0
- package/dist/node_modules/swiper/modules/keyboard.js +66 -0
- package/dist/node_modules/swiper/modules/navigation.js +136 -0
- package/dist/node_modules/swiper/modules/pagination.js +226 -0
- package/dist/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/modules/thumbs.js +33 -34
- package/dist/node_modules/swiper/modules/zoom.js +309 -0
- package/dist/node_modules/swiper/shared/classes-to-selector.js +6 -0
- package/dist/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/shared/ssr-window.esm.js +9 -10
- package/dist/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/shared/utils.js +42 -39
- package/package.json +34 -30
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/navigation.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/swiper.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseCard.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseComplexToggle.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseModal.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseSnackbar.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/Slider/SimpleSlider.css +0 -1
- package/dist/assets/packages/components/src/tailwind.css +0 -1
- package/dist/node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -41
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/autoplay.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/autoplay.js +0 -129
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/controller.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/controller.js +0 -101
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/free-mode.js +0 -125
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/keyboard.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/keyboard.js +0 -67
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/navigation.js +0 -127
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/pagination.js +0 -227
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/thumbs.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/zoom.js +0 -310
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/shared/classes-to-selector.js +0 -6
- package/dist/packages/components/lazyModules/Swiper/autoplay.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/controller.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/free-mode.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/keyboard.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/navigation.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/pagination.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/thumbs.js +0 -5
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +0 -213
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +0 -60
- package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +0 -19
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +0 -192
- package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +0 -19
- package/dist/packages/components/lib/UIKit/BaseBreadcrumb.vue.js +0 -58
- package/dist/packages/components/lib/UIKit/BaseCard.vue.js +0 -37
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +0 -137
- package/dist/packages/components/lib/UIKit/BaseIcon.vue.js +0 -27
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +0 -41
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +0 -81
- package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +0 -41
- package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +0 -71
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +0 -114
- package/dist/packages/components/lib/UIKit/Radio/RadioButton.vue.js +0 -58
- package/dist/packages/components/lib/UIKit/Radio/RadioGroup.vue.js +0 -62
- package/dist/packages/components/lib/UIKit/Tab/BaseTabList.vue.js +0 -45
- package/dist/packages/components/lib/UIKit/Tab/BaseTabPanel.vue.js +0 -25
- package/dist/packages/components/lib/UIKit/Tab/BaseTabView.vue.js +0 -107
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +0 -27
- package/dist/packages/components/lib/chart/LineChart.vue.js +0 -42
- package/dist/packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js +0 -24
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseAlert.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseFloatingLabel.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseIcon.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseInput.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BasePaper.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseSlider.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTextarea.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseToggle.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/BaseTooltip.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/Checkbox/CheckboxBtn.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/ShimmerLoader/BaseShimmerLoader.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/UIKit/StaticSpinner.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel.css +0 -0
- /package/dist/assets/{packages/components/lib → lib}/components/carousel/SwiperCarousel2.css +0 -0
- /package/dist/assets/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/modules/free-mode.css +0 -0
- /package/dist/assets/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/modules/pagination.css +0 -0
- /package/dist/assets/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/modules/zoom.css +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/BasePaper.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/UIKit/Tab/BaseTab.vue.js +0 -0
- /package/dist/{packages/components/lib → lib}/components/IntersectionObserver/IntersectionObserver.vue.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev → @wikicasa-dev}/svg-icons/dist/ArrowIcon.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev → @wikicasa-dev}/svg-icons/dist/CloseIcon.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev → @wikicasa-dev}/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev → @wikicasa-dev}/svg-icons/dist/PharmacyIcon.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev → @wikicasa-dev}/svg-icons/dist/WarningIconRounded.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/ArrayUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/DeviceDetectionUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/FunctionUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/GenericUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/ObjectUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev → @wikicasa-dev}/utilities/dist/utils/StringUtils.js +0 -0
- /package/dist/node_modules/{.pnpm/google-polyline@1.0.3/node_modules/google-polyline → google-polyline}/lib/decode.js +0 -0
- /package/dist/node_modules/{.pnpm/google-polyline@1.0.3/node_modules/google-polyline → google-polyline}/lib/encode.js +0 -0
- /package/dist/node_modules/{.pnpm/google-polyline@1.0.3/node_modules/google-polyline → google-polyline}/lib/polyline.js +0 -0
- /package/dist/node_modules/{.pnpm/swiper@11.2.6/node_modules/swiper → swiper}/shared/create-element-if-not-defined.js +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as z, mergeModels as k, useModel as j, ref as v, useId as q, useSlots as G, computed as H, provide as f, watch as x, createElementBlock as m, openBlock as i, normalizeClass as I, createElementVNode as J, createBlock as o, createCommentVNode as u, unref as y, toDisplayString as K, Fragment as g, renderList as O, withCtx as Q, resolveDynamicComponent as R } from "vue";
|
|
2
|
+
import U from "./BaseTabPanel.vue.js";
|
|
3
|
+
import P from "./BaseTabList.vue.js";
|
|
4
|
+
const W = ["data-cy"], X = ["id"], te = /* @__PURE__ */ z({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "BaseTabView",
|
|
7
|
+
props: /* @__PURE__ */ k({
|
|
8
|
+
tabsPosition: { default: "top" },
|
|
9
|
+
tabViewDescription: {},
|
|
10
|
+
tabListClasses: {},
|
|
11
|
+
dataCy: {}
|
|
12
|
+
}, {
|
|
13
|
+
activeIdx: { default: 0 },
|
|
14
|
+
activeIdxModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: /* @__PURE__ */ k(["tabClicked"], ["update:activeIdx"]),
|
|
17
|
+
setup(s, { emit: $ }) {
|
|
18
|
+
const B = $, c = j(s, "activeIdx"), A = v(""), b = v(null), F = v(null), d = q(), h = G(), r = (e) => e.props ?? null, p = (e) => e.type.__name === "BaseTab", C = (e, a) => ({
|
|
19
|
+
renderFn: e,
|
|
20
|
+
tabId: T(a),
|
|
21
|
+
"active-tab-panel-idx": r(e)?.["active-tab-panel-idx"] ?? a,
|
|
22
|
+
"header-title": r(e)?.["header-title"] || "",
|
|
23
|
+
class: r(e)?.class || "",
|
|
24
|
+
"tab-panel-classes": r(e)?.["tab-panel-classes"] || "",
|
|
25
|
+
"data-cy": r(e)?.["data-cy"] || ""
|
|
26
|
+
}), l = H(() => h.default ? h.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
27
|
+
p(t) && e.push(C(t, e.length));
|
|
28
|
+
}) : p(a) && e.push(C(a, e.length)), e), []) : []);
|
|
29
|
+
f("tabs", l), f("isTabActive", (e) => c.value === e);
|
|
30
|
+
const V = (e = -1) => b.value === e, T = (e) => `base-tab-${e}-${d}`, w = (e = -1) => `base-tab-panel-${e}-${d}`, D = (e = -1) => {
|
|
31
|
+
const a = l.value.reduce(
|
|
32
|
+
(t, n, S) => (n["active-tab-panel-idx"] !== e || t.push({ tab: n, idx: S }), t),
|
|
33
|
+
[]
|
|
34
|
+
);
|
|
35
|
+
return a && a.length === 1 ? a[0].tab.tabId : a.find((t) => t.idx === c.value)?.tab.tabId;
|
|
36
|
+
}, L = (e) => {
|
|
37
|
+
A.value = T(e);
|
|
38
|
+
}, E = (e) => {
|
|
39
|
+
const a = l.value.at(e ?? -1);
|
|
40
|
+
b.value = a?.["active-tab-panel-idx"] ?? null;
|
|
41
|
+
};
|
|
42
|
+
f("handleClick", (e, a) => {
|
|
43
|
+
L(e), c.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
44
|
+
}), x(
|
|
45
|
+
c,
|
|
46
|
+
(e) => {
|
|
47
|
+
E(e ?? -1);
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
immediate: !0
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
const M = (e, a) => {
|
|
54
|
+
for (let t = 0; t < e.length; t++)
|
|
55
|
+
if (e[t] !== a[t]) return t;
|
|
56
|
+
return null;
|
|
57
|
+
}, N = (e = -1) => l.value.find((a) => a["active-tab-panel-idx"] === e);
|
|
58
|
+
return x(
|
|
59
|
+
() => l.value.map((e) => e["active-tab-panel-idx"]),
|
|
60
|
+
(e, a) => {
|
|
61
|
+
const t = M(e, a);
|
|
62
|
+
if (t === null) return;
|
|
63
|
+
const n = l.value[t]["active-tab-panel-idx"];
|
|
64
|
+
c.value !== t || n === void 0 || (b.value = n);
|
|
65
|
+
}
|
|
66
|
+
), (e, a) => (i(), m("div", {
|
|
67
|
+
ref_key: "root",
|
|
68
|
+
ref: F,
|
|
69
|
+
class: I(e.$attrs.class),
|
|
70
|
+
"data-cy": s.dataCy
|
|
71
|
+
}, [
|
|
72
|
+
J("span", {
|
|
73
|
+
id: `tablist-${y(d)}`,
|
|
74
|
+
class: "uikit-sr-only"
|
|
75
|
+
}, K(s.tabViewDescription), 9, X),
|
|
76
|
+
s.tabsPosition === "top" ? (i(), o(P, {
|
|
77
|
+
key: 0,
|
|
78
|
+
uid: y(d),
|
|
79
|
+
"tab-list-classes": s.tabListClasses,
|
|
80
|
+
"data-cy": s.dataCy ? `${s.dataCy}-tab-list` : ""
|
|
81
|
+
}, null, 8, ["uid", "tab-list-classes", "data-cy"])) : u("", !0),
|
|
82
|
+
(i(!0), m(g, null, O(l.value, (t, n) => (i(), m(g, { key: n }, [
|
|
83
|
+
N(n) ? (i(), o(U, {
|
|
84
|
+
key: 0,
|
|
85
|
+
id: w(t["active-tab-panel-idx"]),
|
|
86
|
+
"labelled-by": D(n) ?? "",
|
|
87
|
+
active: V(n),
|
|
88
|
+
class: I(t["tab-panel-classes"])
|
|
89
|
+
}, {
|
|
90
|
+
default: Q(() => [
|
|
91
|
+
t.renderFn.children && t.renderFn.children.default ? (i(), o(R(t.renderFn.children.default), { key: 0 })) : u("", !0)
|
|
92
|
+
]),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, ["id", "labelled-by", "active", "class"])) : u("", !0)
|
|
95
|
+
], 64))), 128)),
|
|
96
|
+
s.tabsPosition === "bottom" ? (i(), o(P, {
|
|
97
|
+
key: 1,
|
|
98
|
+
uid: y(d),
|
|
99
|
+
"tab-list-classes": s.tabListClasses,
|
|
100
|
+
"data-cy": s.dataCy ? `${s.dataCy}-tab-list` : ""
|
|
101
|
+
}, null, 8, ["uid", "tab-list-classes", "data-cy"])) : u("", !0)
|
|
102
|
+
], 10, W));
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
te as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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({
|
|
6
|
+
__name: "DoughnutChart",
|
|
7
|
+
props: {
|
|
8
|
+
options: {},
|
|
9
|
+
data: {}
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
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,
|
|
20
|
+
options: t.options,
|
|
21
|
+
data: t.data
|
|
22
|
+
}, null, 8, ["options", "data"])) : c("", !0);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
y as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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({
|
|
6
|
+
__name: "LineChart",
|
|
7
|
+
props: {
|
|
8
|
+
options: {},
|
|
9
|
+
data: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e, { expose: o }) {
|
|
12
|
+
x.register(
|
|
13
|
+
L,
|
|
14
|
+
k,
|
|
15
|
+
B,
|
|
16
|
+
E,
|
|
17
|
+
v,
|
|
18
|
+
y
|
|
19
|
+
);
|
|
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,
|
|
34
|
+
ref: "chart",
|
|
35
|
+
options: e.options,
|
|
36
|
+
data: e.data
|
|
37
|
+
}, null, 8, ["options", "data"])) : h("", !0);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
F as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as l, ref as n, onMounted as a, createElementBlock as u, renderSlot as t, openBlock as f, normalizeClass as i } from "vue";
|
|
2
|
+
const b = /* @__PURE__ */ l({
|
|
3
|
+
__name: "IntersectionObservable",
|
|
4
|
+
props: {
|
|
5
|
+
observer: { default: null },
|
|
6
|
+
isVisible: { type: Boolean, default: !1 }
|
|
7
|
+
},
|
|
8
|
+
setup(r) {
|
|
9
|
+
const s = r, e = n(null);
|
|
10
|
+
return a(() => {
|
|
11
|
+
!s.observer || !e.value || s.observer.observe(e.value);
|
|
12
|
+
}), (o, c) => r.isVisible ? t(o.$slots, "default", { key: 1 }) : (f(), u("div", {
|
|
13
|
+
key: 0,
|
|
14
|
+
ref_key: "root",
|
|
15
|
+
ref: e,
|
|
16
|
+
class: i(o.$attrs["root-classes"])
|
|
17
|
+
}, [
|
|
18
|
+
t(o.$slots, "default")
|
|
19
|
+
], 2));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
b as default
|
|
24
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
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
|
|
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
2
|
import { Swiper as T } from "swiper";
|
|
3
|
-
import _ from "
|
|
4
|
-
import '
|
|
5
|
-
/* empty css
|
|
6
|
-
import "
|
|
7
|
-
import { shallowCopyObjectTo as ee } from "
|
|
8
|
-
import "
|
|
3
|
+
import _ from "../../../node_modules/swiper/modules/zoom.js";
|
|
4
|
+
import '../../../assets/node_modules/swiper/modules/zoom.css';import '../../../assets/node_modules/swiper/swiper.css';/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import "../../../node_modules/js-cookie/dist/js.cookie.js";
|
|
7
|
+
import { shallowCopyObjectTo as ee } from "../../../node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js";
|
|
8
|
+
import "../../../_virtual/polyline.js";
|
|
9
9
|
const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "height", "onLoad"], ae = ["id"], re = ["alt"], fe = /* @__PURE__ */ Q({
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "SwiperCarousel",
|
|
@@ -25,7 +25,7 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
25
25
|
swiperParams: { modules: [_] },
|
|
26
26
|
swiper: null,
|
|
27
27
|
initCarousel: !1
|
|
28
|
-
}), S = k(), j = k(!1), A = X(),
|
|
28
|
+
}), 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(
|
|
29
29
|
() => s.swiperOptions?.effect || "slider"
|
|
30
30
|
), R = () => {
|
|
31
31
|
s.swiperOptions && ee(s.swiperOptions, a.swiperParams);
|
|
@@ -127,14 +127,14 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
127
127
|
import("../../../lazyModules/Swiper/free-mode.js"),
|
|
128
128
|
import("../../../lazyModules/Swiper/controller.js")
|
|
129
129
|
]);
|
|
130
|
-
a.swiperParams.modules?.push(t.Thumbs), a.swiperParams.modules?.push(o.Controller), i = new T(`#thumb_${
|
|
130
|
+
a.swiperParams.modules?.push(t.Thumbs), a.swiperParams.modules?.push(o.Controller), i = new T(`#thumb_${p.value}`, {
|
|
131
131
|
...s.thumbSwiperOptions,
|
|
132
132
|
modules: [r.FreeMode]
|
|
133
133
|
}), e.thumbs = {
|
|
134
134
|
swiper: i
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
e.lazyPreloadPrevNext = 1, a.swiper = new T(`#${
|
|
137
|
+
e.lazyPreloadPrevNext = 1, a.swiper = new T(`#${p.value}`, e), S.value?.classList.remove("uikit-hidden");
|
|
138
138
|
}), x(
|
|
139
139
|
() => s.images,
|
|
140
140
|
() => {
|
|
@@ -150,14 +150,14 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
150
150
|
updateSlidesPerView: (e) => {
|
|
151
151
|
!a.swiper || a.swiper.params.slidesPerView === e || (a.swiper.params.slidesPerView = e, a.swiper.update());
|
|
152
152
|
}
|
|
153
|
-
}), (e, i) => (
|
|
154
|
-
id: `root-${
|
|
153
|
+
}), (e, i) => (u(), l("div", {
|
|
154
|
+
id: `root-${p.value}`,
|
|
155
155
|
ref_key: "root",
|
|
156
156
|
ref: L,
|
|
157
157
|
class: d(["swiper-carousel-root", e.$attrs["root-classes"]])
|
|
158
158
|
}, [
|
|
159
159
|
v("div", {
|
|
160
|
-
id:
|
|
160
|
+
id: p.value,
|
|
161
161
|
"data-cy": e.$attrs["data-cy"],
|
|
162
162
|
class: d(["swiper", e.$attrs["swiper-classes"]])
|
|
163
163
|
}, [
|
|
@@ -171,22 +171,22 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
171
171
|
onClick: i[0] || (i[0] = (t) => y("click"))
|
|
172
172
|
}, [
|
|
173
173
|
M(e.$slots, "default", {}, () => [
|
|
174
|
-
(
|
|
175
|
-
key: `swiper_${
|
|
174
|
+
(u(!0), l(P, null, E(s.images, (t, r) => (u(), l("div", {
|
|
175
|
+
key: `swiper_${p.value}_${r}`,
|
|
176
176
|
class: d(["swiper-slide", e.$attrs["swiper-slide-classes"]])
|
|
177
177
|
}, [
|
|
178
178
|
v("div", {
|
|
179
179
|
class: d(["swiper-zoom-container", e.$attrs["swiper-zoom-container-classes"]])
|
|
180
180
|
}, [
|
|
181
|
-
|
|
181
|
+
s.backgroundImage ? $("", !0) : (u(), l("img", F({
|
|
182
182
|
key: 0,
|
|
183
183
|
ref_for: !0,
|
|
184
184
|
ref: (o) => {
|
|
185
185
|
h.push(o);
|
|
186
186
|
},
|
|
187
187
|
class: ["disable-select", [e.$attrs["slide-img-classes"] || t.classes]],
|
|
188
|
-
"data-idx": `${
|
|
189
|
-
}, z(t, r), {
|
|
188
|
+
"data-idx": `${p.value}-slide-img-${r}`
|
|
189
|
+
}, { ref_for: !0 }, z(t, r), {
|
|
190
190
|
alt: t.alt,
|
|
191
191
|
itemprop: "image",
|
|
192
192
|
width: t.width,
|
|
@@ -198,13 +198,13 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
198
198
|
M(e.$slots, "last_slide", {}, void 0, !0)
|
|
199
199
|
], !0)
|
|
200
200
|
], 2),
|
|
201
|
-
I.value ? (
|
|
201
|
+
I.value ? (u(), l("div", {
|
|
202
202
|
key: 0,
|
|
203
203
|
class: d([e.$attrs["swiper-pagination-classes"], "swiper-pagination [&.swiper-pagination-fraction]:uikit-flex [&.swiper-pagination-fraction]:uikit-justify-center"]),
|
|
204
204
|
onClick: i[1] || (i[1] = O(() => {
|
|
205
205
|
}, ["stop"]))
|
|
206
206
|
}, null, 2)) : $("", !0),
|
|
207
|
-
C.value ? (
|
|
207
|
+
C.value ? (u(), l(P, { key: 1 }, [
|
|
208
208
|
v("div", {
|
|
209
209
|
class: "swiper-button-prev",
|
|
210
210
|
"data-cy": "swiper-button-prev",
|
|
@@ -219,23 +219,22 @@ const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "he
|
|
|
219
219
|
})
|
|
220
220
|
], 64)) : $("", !0)
|
|
221
221
|
], 10, se),
|
|
222
|
-
|
|
222
|
+
s.thumbSwiperOptions ? (u(), l("div", {
|
|
223
223
|
key: 0,
|
|
224
|
-
id: `thumb_${
|
|
224
|
+
id: `thumb_${p.value}`,
|
|
225
225
|
thumbsSlider: "",
|
|
226
226
|
class: d(["swiper", e.$attrs["thumb-swiper-classes"]])
|
|
227
227
|
}, [
|
|
228
228
|
v("div", {
|
|
229
229
|
class: d(["swiper-wrapper", e.$attrs["thumb-swiper-wrapper-classes"]])
|
|
230
230
|
}, [
|
|
231
|
-
(
|
|
232
|
-
key: `thumb_${
|
|
231
|
+
(u(!0), l(P, null, E(s.images, (t, r) => (u(), l("div", {
|
|
232
|
+
key: `thumb_${p.value}_${r}`,
|
|
233
233
|
class: d(["swiper-slide", e.$attrs["thumb-img-wrapper-classes"]])
|
|
234
234
|
}, [
|
|
235
235
|
v("img", F({
|
|
236
|
-
class: e.$attrs["thumb-img-classes"]
|
|
237
|
-
|
|
238
|
-
}, z(t, -1, !1), {
|
|
236
|
+
class: e.$attrs["thumb-img-classes"]
|
|
237
|
+
}, { ref_for: !0 }, z(t, -1, !1), {
|
|
239
238
|
alt: t.alt
|
|
240
239
|
}), null, 16, re)
|
|
241
240
|
], 2))), 128))
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ref as f, onMounted as p, onUnmounted as m, unref as w } from "vue";
|
|
2
|
+
const D = (o) => {
|
|
3
|
+
const { isDropdownOpen: t, disableSpaceHandler: k } = o, n = f(-1), a = f(-1);
|
|
4
|
+
if (!(o.activate === void 0 || o.activate)) return { activeIdx: n, selectedIdx: a };
|
|
5
|
+
const r = (e) => {
|
|
6
|
+
const u = "ArrowUp", d = "ArrowDown", v = "Enter", s = "Escape", i = "PageUp", c = "Home", y = "PageDown";
|
|
7
|
+
if (!t.value || ![
|
|
8
|
+
u,
|
|
9
|
+
d,
|
|
10
|
+
v,
|
|
11
|
+
s,
|
|
12
|
+
" ",
|
|
13
|
+
i,
|
|
14
|
+
c,
|
|
15
|
+
y,
|
|
16
|
+
"End"
|
|
17
|
+
].includes(e.key))
|
|
18
|
+
return;
|
|
19
|
+
const l = w(o.optionsLength);
|
|
20
|
+
if (e.key === u)
|
|
21
|
+
n.value = n.value === 0 ? l - 1 : n.value - 1;
|
|
22
|
+
else if (e.key === d)
|
|
23
|
+
n.value = (n.value + 1) % l;
|
|
24
|
+
else if (e.key === v || e.key === " ") {
|
|
25
|
+
if (e.key === " " && k) return;
|
|
26
|
+
a.value = n.value, t.value = !1;
|
|
27
|
+
} else e.key === s ? (n.value = a.value, t.value = !1) : e.key === i || e.key === c ? n.value = 0 : (e.key === y || e.key === "End") && (n.value = l - 1);
|
|
28
|
+
e.stopPropagation(), e.preventDefault();
|
|
29
|
+
};
|
|
30
|
+
return p(() => {
|
|
31
|
+
document && document.addEventListener("keydown", r);
|
|
32
|
+
}), m(() => {
|
|
33
|
+
document && document.removeEventListener("keydown", r);
|
|
34
|
+
}), {
|
|
35
|
+
activeIdx: n,
|
|
36
|
+
selectedIdx: a
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
D as useKeyboardController
|
|
41
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { g as h } from "../shared/ssr-window.esm.js";
|
|
2
|
+
function k({
|
|
3
|
+
swiper: e,
|
|
4
|
+
extendParams: C,
|
|
5
|
+
on: u,
|
|
6
|
+
emit: o,
|
|
7
|
+
params: d
|
|
8
|
+
}) {
|
|
9
|
+
e.autoplay = {
|
|
10
|
+
running: !1,
|
|
11
|
+
paused: !1,
|
|
12
|
+
timeLeft: 0
|
|
13
|
+
}, C({
|
|
14
|
+
autoplay: {
|
|
15
|
+
enabled: !1,
|
|
16
|
+
delay: 3e3,
|
|
17
|
+
waitForTransition: !0,
|
|
18
|
+
disableOnInteraction: !1,
|
|
19
|
+
stopOnLastSlide: !1,
|
|
20
|
+
reverseDirection: !1,
|
|
21
|
+
pauseOnMouseEnter: !1
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
let f, E, b = d && d.autoplay ? d.autoplay.delay : 3e3, g = d && d.autoplay ? d.autoplay.delay : 3e3, n, c = (/* @__PURE__ */ new Date()).getTime(), L, v, s, M, D, r, S;
|
|
25
|
+
function O(t) {
|
|
26
|
+
!e || e.destroyed || !e.wrapperEl || t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", O), !(S || t.detail && t.detail.bySwiperTouchMove) && i());
|
|
27
|
+
}
|
|
28
|
+
const I = () => {
|
|
29
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
30
|
+
e.autoplay.paused ? L = !0 : L && (g = n, L = !1);
|
|
31
|
+
const t = e.autoplay.paused ? n : c + g - (/* @__PURE__ */ new Date()).getTime();
|
|
32
|
+
e.autoplay.timeLeft = t, o("autoplayTimeLeft", t, t / b), E = requestAnimationFrame(() => {
|
|
33
|
+
I();
|
|
34
|
+
});
|
|
35
|
+
}, q = () => {
|
|
36
|
+
let t;
|
|
37
|
+
return e.virtual && e.params.virtual.enabled ? t = e.slides.find((a) => a.classList.contains("swiper-slide-active")) : t = e.slides[e.activeIndex], t ? parseInt(t.getAttribute("data-swiper-autoplay"), 10) : void 0;
|
|
38
|
+
}, T = (t) => {
|
|
39
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
40
|
+
cancelAnimationFrame(E), I();
|
|
41
|
+
let l = typeof t > "u" ? e.params.autoplay.delay : t;
|
|
42
|
+
b = e.params.autoplay.delay, g = e.params.autoplay.delay;
|
|
43
|
+
const a = q();
|
|
44
|
+
!Number.isNaN(a) && a > 0 && typeof t > "u" && (l = a, b = a, g = a), n = l;
|
|
45
|
+
const p = e.params.speed, B = () => {
|
|
46
|
+
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(p, !0, !0), o("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, p, !0, !0), o("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(p, !0, !0), o("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, p, !0, !0), o("autoplay")), e.params.cssMode && (c = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
|
|
47
|
+
T();
|
|
48
|
+
})));
|
|
49
|
+
};
|
|
50
|
+
return l > 0 ? (clearTimeout(f), f = setTimeout(() => {
|
|
51
|
+
B();
|
|
52
|
+
}, l)) : requestAnimationFrame(() => {
|
|
53
|
+
B();
|
|
54
|
+
}), l;
|
|
55
|
+
}, A = () => {
|
|
56
|
+
c = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, T(), o("autoplayStart");
|
|
57
|
+
}, m = () => {
|
|
58
|
+
e.autoplay.running = !1, clearTimeout(f), cancelAnimationFrame(E), o("autoplayStop");
|
|
59
|
+
}, y = (t, l) => {
|
|
60
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
61
|
+
clearTimeout(f), t || (r = !0);
|
|
62
|
+
const a = () => {
|
|
63
|
+
o("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", O) : i();
|
|
64
|
+
};
|
|
65
|
+
if (e.autoplay.paused = !0, l) {
|
|
66
|
+
D && (n = e.params.autoplay.delay), D = !1, a();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
n = (n || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - c), !(e.isEnd && n < 0 && !e.params.loop) && (n < 0 && (n = 0), a());
|
|
70
|
+
}, i = () => {
|
|
71
|
+
e.isEnd && n < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (c = (/* @__PURE__ */ new Date()).getTime(), r ? (r = !1, T(n)) : T(), e.autoplay.paused = !1, o("autoplayResume"));
|
|
72
|
+
}, F = () => {
|
|
73
|
+
if (e.destroyed || !e.autoplay.running) return;
|
|
74
|
+
const t = h();
|
|
75
|
+
t.visibilityState === "hidden" && (r = !0, y(!0)), t.visibilityState === "visible" && i();
|
|
76
|
+
}, P = (t) => {
|
|
77
|
+
t.pointerType === "mouse" && (r = !0, S = !0, !(e.animating || e.autoplay.paused) && y(!0));
|
|
78
|
+
}, N = (t) => {
|
|
79
|
+
t.pointerType === "mouse" && (S = !1, e.autoplay.paused && i());
|
|
80
|
+
}, x = () => {
|
|
81
|
+
e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", P), e.el.addEventListener("pointerleave", N));
|
|
82
|
+
}, R = () => {
|
|
83
|
+
e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", P), e.el.removeEventListener("pointerleave", N));
|
|
84
|
+
}, _ = () => {
|
|
85
|
+
h().addEventListener("visibilitychange", F);
|
|
86
|
+
}, j = () => {
|
|
87
|
+
h().removeEventListener("visibilitychange", F);
|
|
88
|
+
};
|
|
89
|
+
u("init", () => {
|
|
90
|
+
e.params.autoplay.enabled && (x(), _(), A());
|
|
91
|
+
}), u("destroy", () => {
|
|
92
|
+
R(), j(), e.autoplay.running && m();
|
|
93
|
+
}), u("_freeModeStaticRelease", () => {
|
|
94
|
+
(s || r) && i();
|
|
95
|
+
}), u("_freeModeNoMomentumRelease", () => {
|
|
96
|
+
e.params.autoplay.disableOnInteraction ? m() : y(!0, !0);
|
|
97
|
+
}), u("beforeTransitionStart", (t, l, a) => {
|
|
98
|
+
e.destroyed || !e.autoplay.running || (a || !e.params.autoplay.disableOnInteraction ? y(!0, !0) : m());
|
|
99
|
+
}), u("sliderFirstMove", () => {
|
|
100
|
+
if (!(e.destroyed || !e.autoplay.running)) {
|
|
101
|
+
if (e.params.autoplay.disableOnInteraction) {
|
|
102
|
+
m();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
v = !0, s = !1, r = !1, M = setTimeout(() => {
|
|
106
|
+
r = !0, s = !0, y(!0);
|
|
107
|
+
}, 200);
|
|
108
|
+
}
|
|
109
|
+
}), u("touchEnd", () => {
|
|
110
|
+
if (!(e.destroyed || !e.autoplay.running || !v)) {
|
|
111
|
+
if (clearTimeout(M), clearTimeout(f), e.params.autoplay.disableOnInteraction) {
|
|
112
|
+
s = !1, v = !1;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
s && e.params.cssMode && i(), s = !1, v = !1;
|
|
116
|
+
}
|
|
117
|
+
}), u("slideChange", () => {
|
|
118
|
+
e.destroyed || !e.autoplay.running || (D = !0);
|
|
119
|
+
}), Object.assign(e.autoplay, {
|
|
120
|
+
start: A,
|
|
121
|
+
stop: m,
|
|
122
|
+
pause: y,
|
|
123
|
+
resume: i
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
k as default
|
|
128
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { n as v, o as S } from "../shared/utils.js";
|
|
2
|
+
function A({
|
|
3
|
+
swiper: t,
|
|
4
|
+
extendParams: h,
|
|
5
|
+
on: f
|
|
6
|
+
}) {
|
|
7
|
+
h({
|
|
8
|
+
controller: {
|
|
9
|
+
control: void 0,
|
|
10
|
+
inverse: !1,
|
|
11
|
+
by: "slide"
|
|
12
|
+
// or 'container'
|
|
13
|
+
}
|
|
14
|
+
}), t.controller = {
|
|
15
|
+
control: void 0
|
|
16
|
+
};
|
|
17
|
+
function u(i, a) {
|
|
18
|
+
const r = /* @__PURE__ */ (function() {
|
|
19
|
+
let l, o, c;
|
|
20
|
+
return (m, g) => {
|
|
21
|
+
for (o = -1, l = m.length; l - o > 1; )
|
|
22
|
+
c = l + o >> 1, m[c] <= g ? o = c : l = c;
|
|
23
|
+
return l;
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
this.x = i, this.y = a, this.lastIndex = i.length - 1;
|
|
27
|
+
let n, e;
|
|
28
|
+
return this.interpolate = function(l) {
|
|
29
|
+
return l ? (e = r(this.x, l), n = e - 1, (l - this.x[n]) * (this.y[e] - this.y[n]) / (this.x[e] - this.x[n]) + this.y[n]) : 0;
|
|
30
|
+
}, this;
|
|
31
|
+
}
|
|
32
|
+
function T(i) {
|
|
33
|
+
t.controller.spline = t.params.loop ? new u(t.slidesGrid, i.slidesGrid) : new u(t.snapGrid, i.snapGrid);
|
|
34
|
+
}
|
|
35
|
+
function y(i, a) {
|
|
36
|
+
const r = t.controller.control;
|
|
37
|
+
let n, e;
|
|
38
|
+
const s = t.constructor;
|
|
39
|
+
function l(o) {
|
|
40
|
+
if (o.destroyed) return;
|
|
41
|
+
const c = t.rtlTranslate ? -t.translate : t.translate;
|
|
42
|
+
t.params.controller.by === "slide" && (T(o), e = -t.controller.spline.interpolate(-c)), (!e || t.params.controller.by === "container") && (n = (o.maxTranslate() - o.minTranslate()) / (t.maxTranslate() - t.minTranslate()), (Number.isNaN(n) || !Number.isFinite(n)) && (n = 1), e = (c - t.minTranslate()) * n + o.minTranslate()), t.params.controller.inverse && (e = o.maxTranslate() - e), o.updateProgress(e), o.setTranslate(e, t), o.updateActiveIndex(), o.updateSlidesClasses();
|
|
43
|
+
}
|
|
44
|
+
if (Array.isArray(r))
|
|
45
|
+
for (let o = 0; o < r.length; o += 1)
|
|
46
|
+
r[o] !== a && r[o] instanceof s && l(r[o]);
|
|
47
|
+
else r instanceof s && a !== r && l(r);
|
|
48
|
+
}
|
|
49
|
+
function x(i, a) {
|
|
50
|
+
const r = t.constructor, n = t.controller.control;
|
|
51
|
+
let e;
|
|
52
|
+
function s(l) {
|
|
53
|
+
l.destroyed || (l.setTransition(i, t), i !== 0 && (l.transitionStart(), l.params.autoHeight && v(() => {
|
|
54
|
+
l.updateAutoHeight();
|
|
55
|
+
}), S(l.wrapperEl, () => {
|
|
56
|
+
n && l.transitionEnd();
|
|
57
|
+
})));
|
|
58
|
+
}
|
|
59
|
+
if (Array.isArray(n))
|
|
60
|
+
for (e = 0; e < n.length; e += 1)
|
|
61
|
+
n[e] !== a && n[e] instanceof r && s(n[e]);
|
|
62
|
+
else n instanceof r && a !== n && s(n);
|
|
63
|
+
}
|
|
64
|
+
function d() {
|
|
65
|
+
t.controller.control && t.controller.spline && (t.controller.spline = void 0, delete t.controller.spline);
|
|
66
|
+
}
|
|
67
|
+
f("beforeInit", () => {
|
|
68
|
+
if (typeof window < "u" && // eslint-disable-line
|
|
69
|
+
(typeof t.params.controller.control == "string" || t.params.controller.control instanceof HTMLElement)) {
|
|
70
|
+
(typeof t.params.controller.control == "string" ? [...document.querySelectorAll(t.params.controller.control)] : [t.params.controller.control]).forEach((a) => {
|
|
71
|
+
if (t.controller.control || (t.controller.control = []), a && a.swiper)
|
|
72
|
+
t.controller.control.push(a.swiper);
|
|
73
|
+
else if (a) {
|
|
74
|
+
const r = `${t.params.eventsPrefix}init`, n = (e) => {
|
|
75
|
+
t.controller.control.push(e.detail[0]), t.update(), a.removeEventListener(r, n);
|
|
76
|
+
};
|
|
77
|
+
a.addEventListener(r, n);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
t.controller.control = t.params.controller.control;
|
|
83
|
+
}), f("update", () => {
|
|
84
|
+
d();
|
|
85
|
+
}), f("resize", () => {
|
|
86
|
+
d();
|
|
87
|
+
}), f("observerUpdate", () => {
|
|
88
|
+
d();
|
|
89
|
+
}), f("setTranslate", (i, a, r) => {
|
|
90
|
+
!t.controller.control || t.controller.control.destroyed || t.controller.setTranslate(a, r);
|
|
91
|
+
}), f("setTransition", (i, a, r) => {
|
|
92
|
+
!t.controller.control || t.controller.control.destroyed || t.controller.setTransition(a, r);
|
|
93
|
+
}), Object.assign(t.controller, {
|
|
94
|
+
setTranslate: y,
|
|
95
|
+
setTransition: x
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
A as default
|
|
100
|
+
};
|