@wikicasa-dev/components 2.1.5-alpha.3 → 2.1.5
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/BasePagination.d.ts +6 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/controller.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.js +9 -9
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/pagination.js +17 -17
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/zoom.js +13 -13
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/utils.js +32 -26
- package/dist/packages/components/lazyModules/Swiper/autoplay.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/controller.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/free-mode.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/keyboard.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/navigation.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/pagination.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/thumbs.js +2 -2
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +4 -4
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +9 -10
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +4 -5
- package/dist/packages/components/lib/UIKit/BaseBreadcrumb.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +3 -3
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +12 -13
- package/dist/packages/components/lib/UIKit/BasePagination.vue.js +153 -94
- package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +45 -45
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +11 -12
- package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +25 -27
- package/package.json +15 -8
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.2/node_modules/@wikicasa-dev/utilities/dist/utils/NumberUtils.js +0 -18
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/navigation.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/pagination.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/zoom.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/swiper.css +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12-alpha.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12-alpha.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12-alpha.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12-alpha.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12-alpha.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.22-alpha.2 → @wikicasa-dev_utilities@1.1.21}/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_vue-composables@0.0.24-alpha.3 → @wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3}/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/controller.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/classes-to-selector.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as L, mergeModels as b, useId as M, useModel as E, ref as h, computed as O, useTemplateRef as W, watch as n, onBeforeMount as $, onMounted as H, onUnmounted as K, createElementBlock as N, openBlock as u, withModifiers as C, normalizeClass as i, renderSlot as g, createBlock as y, createVNode as T, unref as l, withCtx as D, createElementVNode as V, createCommentVNode as q, resolveDynamicComponent as z } from "vue";
|
|
2
2
|
import R from "./BaseButton.vue.js";
|
|
3
|
-
import { ArrowIcon as U } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
4
|
-
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
5
|
-
import { useKeyboardController as j } from "../../../../node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.
|
|
3
|
+
import { ArrowIcon as U } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
4
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
5
|
+
import { useKeyboardController as j } from "../../../../node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js";
|
|
6
6
|
const F = ["innerHTML"], Z = /* @__PURE__ */ L({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "BaseDropDown",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineComponent as T, ref as n, useTemplateRef as z, onUnmounted as H, watch as I, createBlock as O, openBlock as k, Teleport as $, createElementVNode as s, normalizeClass as o, withModifiers as v, createElementBlock as y, createCommentVNode as h, renderSlot as d, createVNode as D, unref as K, nextTick as N } from "vue";
|
|
2
2
|
import "../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js";
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import { awaitableSetTimeout as S } from "../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.2/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js";
|
|
3
|
+
import { isWindows as w } from "../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js";
|
|
4
|
+
import { awaitableSetTimeout as S } from "../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js";
|
|
6
5
|
import "../../../../_virtual/polyline.js";
|
|
7
|
-
import { CloseIcon as V } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
8
|
-
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
9
|
-
const F = ["id", "data-cy"], U = ["innerHTML"],
|
|
6
|
+
import { CloseIcon as V } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js";
|
|
7
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
8
|
+
const F = ["id", "data-cy"], U = ["innerHTML"], J = /* @__PURE__ */ T({
|
|
10
9
|
__name: "BaseModal",
|
|
11
10
|
props: {
|
|
12
11
|
id: { default: "base-bt-modal" },
|
|
@@ -29,12 +28,12 @@ const F = ["id", "data-cy"], U = ["innerHTML"], Q = /* @__PURE__ */ T({
|
|
|
29
28
|
},
|
|
30
29
|
emits: ["closed", "opened", "dialogClick"],
|
|
31
30
|
setup(l, { emit: C }) {
|
|
32
|
-
const r = C, t = n(!1), m = n(null), a = z("modalDialog"), c = n(!1), u = n(!1),
|
|
31
|
+
const r = C, t = n(!1), m = n(null), a = z("modalDialog"), c = n(!1), u = n(!1), f = ({ key: e }) => {
|
|
33
32
|
e === "Escape" && i();
|
|
34
33
|
}, g = () => {
|
|
35
|
-
document?.body.addEventListener("keydown",
|
|
36
|
-
},
|
|
37
|
-
document?.body.removeEventListener("keydown",
|
|
34
|
+
document?.body.addEventListener("keydown", f);
|
|
35
|
+
}, p = () => {
|
|
36
|
+
document?.body.removeEventListener("keydown", f);
|
|
38
37
|
}, M = async () => {
|
|
39
38
|
t.value = !0, N(() => {
|
|
40
39
|
g(), w() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
|
|
@@ -54,12 +53,12 @@ const F = ["id", "data-cy"], U = ["innerHTML"], Q = /* @__PURE__ */ T({
|
|
|
54
53
|
await i();
|
|
55
54
|
}
|
|
56
55
|
}, i = async () => {
|
|
57
|
-
t.value = !1,
|
|
56
|
+
t.value = !1, p(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await S(() => {
|
|
58
57
|
m.value?.classList.add("uikit-hidden"), r("closed");
|
|
59
58
|
}, 250);
|
|
60
59
|
};
|
|
61
60
|
return H(() => {
|
|
62
|
-
|
|
61
|
+
p(), document?.documentElement.classList.remove("uikit-no-scrolling"), w() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
|
|
63
62
|
}), I(
|
|
64
63
|
() => l.showModal,
|
|
65
64
|
async (e) => {
|
|
@@ -143,5 +142,5 @@ const F = ["id", "data-cy"], U = ["innerHTML"], Q = /* @__PURE__ */ T({
|
|
|
143
142
|
}
|
|
144
143
|
});
|
|
145
144
|
export {
|
|
146
|
-
|
|
145
|
+
J as default
|
|
147
146
|
};
|
|
@@ -1,31 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import "../../../../node_modules/.pnpm
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
import "../../../../_virtual/polyline.js";
|
|
6
|
-
import { ArrowIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12-alpha.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
7
|
-
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12-alpha.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
8
|
-
const D = {
|
|
1
|
+
import { defineComponent as B, mergeModels as U, useModel as F, computed as k, createElementBlock as a, openBlock as r, createCommentVNode as s, createElementVNode as b, normalizeClass as w, createVNode as M, unref as P, toDisplayString as c, Fragment as g, createBlock as h, resolveDynamicComponent as f, withCtx as d, createTextVNode as p, renderList as L } from "vue";
|
|
2
|
+
import { ArrowIcon as j } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
3
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
4
|
+
const O = {
|
|
9
5
|
"aria-label": "Page navigation",
|
|
10
6
|
class: "uikit-overflow-auto"
|
|
11
|
-
},
|
|
7
|
+
}, T = {
|
|
12
8
|
key: 0,
|
|
13
9
|
class: "uikit-text-14 uikit-m-0 uikit-flex uikit-list-none uikit-content-center uikit-gap-4 uikit-p-0 uikit-pl-0 uikit-font-semibold sm:uikit-gap-5"
|
|
14
|
-
},
|
|
10
|
+
}, V = ["data-cy"], A = {
|
|
15
11
|
key: 0,
|
|
16
12
|
class: "uikit-mx-10px uikit-select-none"
|
|
17
|
-
},
|
|
13
|
+
}, E = {
|
|
18
14
|
key: 1,
|
|
19
15
|
class: "font-weight-bold uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
20
|
-
},
|
|
16
|
+
}, Q = ["onClick"], z = ["onClick"], R = {
|
|
21
17
|
key: 0,
|
|
22
18
|
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
23
|
-
},
|
|
19
|
+
}, q = ["data-cy"], G = {
|
|
24
20
|
key: 0,
|
|
25
21
|
class: "uikit-mx-10px uikit-select-none"
|
|
26
|
-
},
|
|
22
|
+
}, W = /* @__PURE__ */ B({
|
|
27
23
|
__name: "BasePagination",
|
|
28
|
-
props: /* @__PURE__ */
|
|
24
|
+
props: /* @__PURE__ */ U({
|
|
29
25
|
count: { default: 0 },
|
|
30
26
|
limit: { default: 25 },
|
|
31
27
|
siblings: { default: 3 },
|
|
@@ -35,119 +31,182 @@ const D = {
|
|
|
35
31
|
prevLabel: { default: "" },
|
|
36
32
|
nextLabel: { default: "" },
|
|
37
33
|
prevDataCy: {},
|
|
38
|
-
nextDataCy: {}
|
|
34
|
+
nextDataCy: {},
|
|
35
|
+
linkTag: { type: [Object, Function, String], default: "a" },
|
|
36
|
+
baseUrl: {},
|
|
37
|
+
pageQueryParameter: { default: "p" },
|
|
38
|
+
formatter: { type: Function }
|
|
39
39
|
}, {
|
|
40
40
|
pageNumber: { default: 1 },
|
|
41
41
|
pageNumberModifiers: {}
|
|
42
42
|
}),
|
|
43
43
|
emits: ["update:pageNumber"],
|
|
44
|
-
setup(
|
|
45
|
-
const u =
|
|
46
|
-
() => (u.value || 0) <
|
|
47
|
-
),
|
|
48
|
-
let
|
|
49
|
-
for (;
|
|
50
|
-
|
|
44
|
+
setup(n) {
|
|
45
|
+
const u = F(n, "pageNumber"), m = k(() => n.baseUrl ? n.linkTag : "span"), l = k(() => Math.ceil((n.count + n.additionalCount) / n.limit)), y = k(() => (u.value || 0) > n.siblings + 2), x = k(
|
|
46
|
+
() => (u.value || 0) < l.value - n.siblings - 1
|
|
47
|
+
), C = k(() => {
|
|
48
|
+
let i = u.value || 0, t = 0;
|
|
49
|
+
for (; i > 2 && t < n.siblings; )
|
|
50
|
+
i--, t++;
|
|
51
51
|
return t;
|
|
52
|
-
}),
|
|
53
|
-
let
|
|
54
|
-
for (;
|
|
55
|
-
|
|
52
|
+
}), N = k(() => {
|
|
53
|
+
let i = u.value || 0, t = 0;
|
|
54
|
+
for (; i < l.value - 1 && t < n.siblings; )
|
|
55
|
+
i++, t++;
|
|
56
56
|
return t;
|
|
57
|
-
}),
|
|
58
|
-
const
|
|
59
|
-
Math.abs(
|
|
60
|
-
new Number(!
|
|
61
|
-
new Number(u.value ===
|
|
62
|
-
let
|
|
57
|
+
}), S = k(() => {
|
|
58
|
+
const e = C.value + /* Filling with the remaining right siblings */
|
|
59
|
+
Math.abs(N.value - n.siblings) + /* If there is no suspension points on the right, let's fill it */
|
|
60
|
+
new Number(!x.value).valueOf() + /* If the pageNumber is the same of the last, let's fill it */
|
|
61
|
+
new Number(u.value === l.value).valueOf();
|
|
62
|
+
let i = Math.max((u.value || 0) - e, 2);
|
|
63
63
|
const t = [];
|
|
64
|
-
for (
|
|
64
|
+
for (i; i < (u.value || 0); i++) t.push(i);
|
|
65
65
|
return t;
|
|
66
|
-
}),
|
|
67
|
-
const
|
|
68
|
-
Math.abs(
|
|
69
|
-
new Number(!
|
|
66
|
+
}), D = k(() => {
|
|
67
|
+
const e = N.value + /* Filling with the remaining left siblings */
|
|
68
|
+
Math.abs(C.value - n.siblings) + /* If there is no suspension points on the left, let's fill it */
|
|
69
|
+
new Number(!y.value).valueOf() + /* If the pageNumber is the same of the firstPage, let's fill it */
|
|
70
70
|
new Number(u.value === 1).valueOf();
|
|
71
|
-
let
|
|
71
|
+
let i = Math.min(u.value || 0, l.value - 1);
|
|
72
72
|
const t = [];
|
|
73
|
-
for (
|
|
74
|
-
t.push(
|
|
73
|
+
for (i; i < Math.min((u.value || 0) + e, l.value - 1); i++)
|
|
74
|
+
t.push(i + 1);
|
|
75
75
|
return t;
|
|
76
|
-
}),
|
|
77
|
-
let
|
|
78
|
-
|
|
76
|
+
}), v = (e) => {
|
|
77
|
+
let i = e;
|
|
78
|
+
e < 1 ? i = 1 : e > l.value && (i = l.value), u.value = i;
|
|
79
|
+
}, o = (e = 1) => {
|
|
80
|
+
if (n.baseUrl)
|
|
81
|
+
try {
|
|
82
|
+
const i = new URL(n.baseUrl);
|
|
83
|
+
return e === 1 || i.searchParams.set(n.pageQueryParameter, `${e}`), i.toString();
|
|
84
|
+
} catch (i) {
|
|
85
|
+
console.error(i);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
79
88
|
};
|
|
80
|
-
return (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class:
|
|
89
|
+
return (e, i) => (r(), a("nav", O, [
|
|
90
|
+
e.count > 0 ? (r(), a("ul", T, [
|
|
91
|
+
b("li", {
|
|
92
|
+
class: w(["arrow-button prev-page uikit-h-30x uikit-flex uikit-min-w-[30px] uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px", {
|
|
84
93
|
"uikit-cursor-pointer hover:uikit-bg-w-primary [&_>_svg]:hover:uikit-brightness-0 [&_>_svg]:hover:uikit-invert": u.value !== 1,
|
|
85
|
-
"hover:uikit-text-white":
|
|
86
|
-
"uikit-rounded-xs":
|
|
94
|
+
"hover:uikit-text-white": e.small && u.value !== 1,
|
|
95
|
+
"uikit-rounded-xs": e.small && e.prevLabel
|
|
87
96
|
}]),
|
|
88
|
-
"data-cy":
|
|
89
|
-
onClick:
|
|
97
|
+
"data-cy": e.prevDataCy,
|
|
98
|
+
onClick: i[0] || (i[0] = (t) => v((u.value || 0) - 1))
|
|
90
99
|
}, [
|
|
91
|
-
|
|
100
|
+
M(P(j), {
|
|
92
101
|
width: 20,
|
|
93
102
|
height: 11,
|
|
94
|
-
"stroke-color": u.value === 1 ? "#8996A9" :
|
|
103
|
+
"stroke-color": u.value === 1 ? "#8996A9" : e.arrowColor,
|
|
95
104
|
class: "uikit-inline-block uikit-rotate-90"
|
|
96
105
|
}, null, 8, ["stroke-color"]),
|
|
97
|
-
|
|
98
|
-
], 10,
|
|
99
|
-
|
|
100
|
-
(u.value || 0) > 1 ? (r(),
|
|
106
|
+
e.small && e.prevLabel ? (r(), a("span", A, c(e.prevLabel), 1)) : s("", !0)
|
|
107
|
+
], 10, V),
|
|
108
|
+
e.small ? s("", !0) : (r(), a(g, { key: 0 }, [
|
|
109
|
+
(u.value || 0) > 1 ? (r(), a("li", {
|
|
101
110
|
key: 0,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
111
|
+
onClick: i[1] || (i[1] = (t) => v(0))
|
|
112
|
+
}, [
|
|
113
|
+
(r(), h(f(m.value), {
|
|
114
|
+
href: o(1),
|
|
115
|
+
to: o(1),
|
|
116
|
+
class: "page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px uikit-no-underline hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
117
|
+
}, {
|
|
118
|
+
default: d(() => i[4] || (i[4] = [
|
|
119
|
+
p(" 1 ")
|
|
120
|
+
])),
|
|
121
|
+
_: 1,
|
|
122
|
+
__: [4]
|
|
123
|
+
}, 8, ["href", "to"]))
|
|
124
|
+
])) : s("", !0),
|
|
125
|
+
y.value ? (r(), a("li", E, " ... ")) : s("", !0),
|
|
126
|
+
(r(!0), a(g, null, L(S.value, (t) => (r(), a("li", {
|
|
107
127
|
key: t,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
128
|
+
onClick: ($) => v(t)
|
|
129
|
+
}, [
|
|
130
|
+
(r(), h(f(m.value), {
|
|
131
|
+
href: o(t),
|
|
132
|
+
to: o(t),
|
|
133
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px uikit-no-underline hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
134
|
+
}, {
|
|
135
|
+
default: d(() => [
|
|
136
|
+
p(c(e.formatter ? e.formatter(t) : t), 1)
|
|
137
|
+
]),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1032, ["href", "to"]))
|
|
140
|
+
], 8, Q))), 128))
|
|
111
141
|
], 64)),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
142
|
+
b("li", null, [
|
|
143
|
+
(r(), h(f(m.value), {
|
|
144
|
+
href: o(u.value),
|
|
145
|
+
to: o(u.value),
|
|
146
|
+
class: w(["selected uikit-pointer-events-none uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px uikit-no-underline", {
|
|
147
|
+
"uikit-bg-w-primary uikit-text-white hover:uikit-bg-w-primary hover:uikit-text-white": !e.small
|
|
148
|
+
}])
|
|
149
|
+
}, {
|
|
150
|
+
default: d(() => [
|
|
151
|
+
p(c(e.formatter ? e.formatter(u.value) : u.value), 1)
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["href", "to", "class"]))
|
|
155
|
+
]),
|
|
156
|
+
e.small ? s("", !0) : (r(), a(g, { key: 1 }, [
|
|
157
|
+
(r(!0), a(g, null, L(D.value, (t) => (r(), a("li", {
|
|
119
158
|
key: t,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
159
|
+
onClick: ($) => v(t)
|
|
160
|
+
}, [
|
|
161
|
+
(r(), h(f(m.value), {
|
|
162
|
+
href: o(t),
|
|
163
|
+
to: o(t),
|
|
164
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px uikit-no-underline hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
165
|
+
}, {
|
|
166
|
+
default: d(() => [
|
|
167
|
+
p(c(e.formatter ? e.formatter(t) : t), 1)
|
|
168
|
+
]),
|
|
169
|
+
_: 2
|
|
170
|
+
}, 1032, ["href", "to"]))
|
|
171
|
+
], 8, z))), 128)),
|
|
172
|
+
x.value ? (r(), a("li", R, " ... ")) : s("", !0),
|
|
173
|
+
(u.value || 0) < l.value ? (r(), a("li", {
|
|
125
174
|
key: 1,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
175
|
+
onClick: i[2] || (i[2] = (t) => v(l.value))
|
|
176
|
+
}, [
|
|
177
|
+
(r(), h(f(m.value), {
|
|
178
|
+
href: o(l.value),
|
|
179
|
+
to: o(l.value),
|
|
180
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px uikit-no-underline hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
181
|
+
}, {
|
|
182
|
+
default: d(() => [
|
|
183
|
+
p(c(e.formatter ? e.formatter(l.value) : l.value), 1)
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["href", "to"]))
|
|
187
|
+
])) : s("", !0)
|
|
129
188
|
], 64)),
|
|
130
|
-
|
|
131
|
-
class:
|
|
132
|
-
"uikit-cursor-pointer hover:uikit-bg-w-primary [&_>_svg]:hover:uikit-brightness-0 [&_>_svg]:hover:uikit-invert": (u.value || 0) <
|
|
133
|
-
"hover:uikit-text-white":
|
|
134
|
-
"uikit-rounded-xs":
|
|
189
|
+
b("li", {
|
|
190
|
+
class: w(["arrow-button next-page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px", {
|
|
191
|
+
"uikit-cursor-pointer hover:uikit-bg-w-primary [&_>_svg]:hover:uikit-brightness-0 [&_>_svg]:hover:uikit-invert": (u.value || 0) < l.value,
|
|
192
|
+
"hover:uikit-text-white": e.small && (u.value || 0) < l.value,
|
|
193
|
+
"uikit-rounded-xs": e.small && e.nextLabel
|
|
135
194
|
}]),
|
|
136
|
-
"data-cy":
|
|
137
|
-
onClick:
|
|
195
|
+
"data-cy": e.nextDataCy,
|
|
196
|
+
onClick: i[3] || (i[3] = (t) => v((u.value || 0) + 1))
|
|
138
197
|
}, [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"stroke-color": (u.value || 0) ===
|
|
198
|
+
e.small && e.nextLabel ? (r(), a("span", G, c(e.nextLabel), 1)) : s("", !0),
|
|
199
|
+
M(P(j), {
|
|
200
|
+
"stroke-color": (u.value || 0) === l.value ? "#8996A9" : e.arrowColor,
|
|
142
201
|
width: 20,
|
|
143
202
|
height: 11,
|
|
144
203
|
class: "uikit-inline-block -uikit-rotate-90"
|
|
145
204
|
}, null, 8, ["stroke-color"])
|
|
146
|
-
], 10,
|
|
147
|
-
])) :
|
|
205
|
+
], 10, q)
|
|
206
|
+
])) : s("", !0)
|
|
148
207
|
]));
|
|
149
208
|
}
|
|
150
209
|
});
|
|
151
210
|
export {
|
|
152
|
-
|
|
211
|
+
W as default
|
|
153
212
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as R, mergeModels as _, useModel as w, ref as p, useTemplateRef as D, useAttrs as j, onMounted as q, createElementBlock as G, openBlock as H, createElementVNode as x, withModifiers as T, createVNode as k } from "vue";
|
|
2
|
+
import C from "../../../../UIKit/BaseInput.js";
|
|
3
|
+
const J = { class: "range_container" }, K = { class: "sliders_control" }, O = ["value", "min", "max", "step"], Q = ["value", "min", "max", "step"], W = { class: "form_control row" }, X = { class: "pb-15 pb-sm-0 col-sm-6 col-xl-4" }, Y = { class: "col-sm-6 col-xl-4" }, ae = /* @__PURE__ */ R({
|
|
4
4
|
__name: "BaseSlider",
|
|
5
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ _({
|
|
6
6
|
type: { default: "linear" },
|
|
7
7
|
min: { default: 0 },
|
|
8
8
|
max: { default: 100 }
|
|
@@ -14,11 +14,11 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
14
14
|
}),
|
|
15
15
|
emits: ["update:minValue", "update:maxValue"],
|
|
16
16
|
setup(m) {
|
|
17
|
-
function
|
|
17
|
+
function B(e, l) {
|
|
18
18
|
const a = parseInt(e.value, 10), t = parseInt(l.value, 10);
|
|
19
19
|
return [a, t];
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const E = (e) => e.minPos + (Math.log(e.value) - e.minlval) / e.scale, L = (e) => Math.exp(
|
|
22
22
|
(e.position - e.minPos) * e.scale + e.minlval
|
|
23
23
|
);
|
|
24
24
|
function V(e, l, a, t, v) {
|
|
@@ -32,39 +32,39 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
32
32
|
${a} ${$ / s * 100}%,
|
|
33
33
|
${a} 100%)`;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function h(e, l) {
|
|
36
36
|
e <= 0 ? l.style.zIndex = "2" : l.style.zIndex = "0";
|
|
37
37
|
}
|
|
38
|
-
const r =
|
|
38
|
+
const r = w(m, "minValue"), o = w(m, "maxValue"), n = p(0), u = p(100), c = p(10), d = p(40), F = p(0), M = p(0), y = p(0), g = D("fromSlider"), i = D("toSlider"), P = (e, l) => {
|
|
39
39
|
if (!g.value || !i.value) return;
|
|
40
40
|
l || (l = "0");
|
|
41
41
|
const a = parseInt(l, 10);
|
|
42
42
|
if (e == "min-input") {
|
|
43
43
|
if (a >= o.value) return;
|
|
44
|
-
r.value = a,
|
|
44
|
+
r.value = a, z(i.value, a, o.value);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
a < r.value || (o.value = a,
|
|
47
|
+
a < r.value || (o.value = a, A(i.value, i.value, r.value, a));
|
|
48
48
|
}, I = (e) => {
|
|
49
49
|
if (m.type === "logarithmic")
|
|
50
50
|
return e = e || 1, parseInt(
|
|
51
|
-
|
|
51
|
+
E({
|
|
52
52
|
value: e,
|
|
53
53
|
minPos: n.value,
|
|
54
54
|
minlval: F.value,
|
|
55
|
-
scale:
|
|
55
|
+
scale: y.value
|
|
56
56
|
}).toFixed(0),
|
|
57
57
|
10
|
|
58
58
|
);
|
|
59
59
|
if (m.type === "linear")
|
|
60
60
|
return e;
|
|
61
61
|
throw new Error("The slider type has not been implemented");
|
|
62
|
-
},
|
|
62
|
+
}, S = (e) => {
|
|
63
63
|
if (m.type === "logarithmic")
|
|
64
64
|
return e = e || 1, parseInt(
|
|
65
|
-
|
|
65
|
+
L({
|
|
66
66
|
position: e,
|
|
67
|
-
scale:
|
|
67
|
+
scale: y.value,
|
|
68
68
|
minlval: F.value,
|
|
69
69
|
minPos: n.value
|
|
70
70
|
}).toFixed(0),
|
|
@@ -73,7 +73,7 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
73
73
|
if (m.type === "linear")
|
|
74
74
|
return e;
|
|
75
75
|
throw new Error("The slider type has not been implemented");
|
|
76
|
-
},
|
|
76
|
+
}, z = (e, l, a) => {
|
|
77
77
|
const t = I(l), v = I(a);
|
|
78
78
|
V(
|
|
79
79
|
t,
|
|
@@ -88,7 +88,7 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
88
88
|
);
|
|
89
89
|
const s = t, f = o.value;
|
|
90
90
|
s > f ? c.value = f : c.value = s;
|
|
91
|
-
},
|
|
91
|
+
}, A = (e, l, a, t) => {
|
|
92
92
|
const v = I(a), s = I(t);
|
|
93
93
|
V(
|
|
94
94
|
v,
|
|
@@ -102,10 +102,10 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
102
102
|
l
|
|
103
103
|
);
|
|
104
104
|
const f = r.value, $ = s;
|
|
105
|
-
|
|
106
|
-
},
|
|
105
|
+
h(o.value, e), f <= $ ? d.value = $ : d.value = f;
|
|
106
|
+
}, N = (e, l) => {
|
|
107
107
|
if (!l.value) return;
|
|
108
|
-
const [a, t] =
|
|
108
|
+
const [a, t] = B(e, l), v = S(a);
|
|
109
109
|
V(
|
|
110
110
|
a,
|
|
111
111
|
{
|
|
@@ -117,9 +117,9 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
117
117
|
"#2B5DFF",
|
|
118
118
|
l
|
|
119
119
|
), a > t ? (e.value = `${t}`, c.value = t, r.value = t) : (c.value = a, r.value = v);
|
|
120
|
-
},
|
|
120
|
+
}, U = (e, l) => {
|
|
121
121
|
if (!l.value) return;
|
|
122
|
-
const [a, t] =
|
|
122
|
+
const [a, t] = B(e, l), v = S(t);
|
|
123
123
|
V(
|
|
124
124
|
c.value,
|
|
125
125
|
{
|
|
@@ -130,11 +130,11 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
130
130
|
"#B4C2F0",
|
|
131
131
|
"#2B5DFF",
|
|
132
132
|
l
|
|
133
|
-
),
|
|
134
|
-
},
|
|
133
|
+
), h(parseInt(l.value, 10), l), a <= t ? (d.value = t, o.value = v) : (l.value = `${a}`, d.value = a, o.value = a);
|
|
134
|
+
}, b = j();
|
|
135
135
|
return (() => {
|
|
136
|
-
n.value = parseInt(`${m.min || 0}`, 10), u.value = parseInt(`${m.max || 100}`, 10), c.value = n.value, d.value = u.value, r.value = parseInt(`${
|
|
137
|
-
})(),
|
|
136
|
+
n.value = parseInt(`${m.min || 0}`, 10), u.value = parseInt(`${m.max || 100}`, 10), c.value = n.value, d.value = u.value, r.value = parseInt(`${b.minValue || n.value}`, 10), o.value = parseInt(`${b.maxValue || u.value}`, 10), F.value = Math.log(r.value || 1), M.value = Math.log(o.value), y.value = (M.value - F.value) / (u.value - n.value);
|
|
137
|
+
})(), q(() => {
|
|
138
138
|
!g.value || !i.value || (V(
|
|
139
139
|
c.value,
|
|
140
140
|
{
|
|
@@ -145,9 +145,9 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
145
145
|
"#B4C2F0",
|
|
146
146
|
"#2B5DFF",
|
|
147
147
|
i.value
|
|
148
|
-
),
|
|
149
|
-
}), (e, l) => (
|
|
150
|
-
x("div",
|
|
148
|
+
), h(d.value, i.value));
|
|
149
|
+
}), (e, l) => (H(), G("div", J, [
|
|
150
|
+
x("div", K, [
|
|
151
151
|
x("input", {
|
|
152
152
|
ref_key: "fromSlider",
|
|
153
153
|
ref: g,
|
|
@@ -157,11 +157,11 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
157
157
|
min: n.value,
|
|
158
158
|
max: u.value,
|
|
159
159
|
step: e.$attrs.step,
|
|
160
|
-
onInput: l[0] || (l[0] =
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
onInput: l[0] || (l[0] = T((a) => N(
|
|
161
|
+
g.value,
|
|
162
|
+
i.value
|
|
163
163
|
), ["stop"]))
|
|
164
|
-
}, null, 40,
|
|
164
|
+
}, null, 40, O),
|
|
165
165
|
x("input", {
|
|
166
166
|
ref_key: "toSlider",
|
|
167
167
|
ref: i,
|
|
@@ -171,31 +171,31 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
171
171
|
min: n.value,
|
|
172
172
|
max: u.value,
|
|
173
173
|
step: e.$attrs.step,
|
|
174
|
-
onInput: l[1] || (l[1] =
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
onInput: l[1] || (l[1] = T((a) => U(
|
|
175
|
+
g.value,
|
|
176
|
+
i.value
|
|
177
177
|
), ["stop"]))
|
|
178
|
-
}, null, 40,
|
|
178
|
+
}, null, 40, Q)
|
|
179
179
|
]),
|
|
180
|
-
x("div",
|
|
181
|
-
x("div",
|
|
182
|
-
C
|
|
180
|
+
x("div", W, [
|
|
181
|
+
x("div", X, [
|
|
182
|
+
k(C, {
|
|
183
183
|
"label-text": "Min",
|
|
184
184
|
type: "text",
|
|
185
185
|
pattern: "[0-9]*",
|
|
186
186
|
inputmode: "numeric",
|
|
187
187
|
"model-value": r.value,
|
|
188
|
-
"onUpdate:modelValue": l[2] || (l[2] = (a) =>
|
|
188
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => P("min-input", `${a || ""}`))
|
|
189
189
|
}, null, 8, ["model-value"])
|
|
190
190
|
]),
|
|
191
|
-
x("div",
|
|
192
|
-
C
|
|
191
|
+
x("div", Y, [
|
|
192
|
+
k(C, {
|
|
193
193
|
"label-text": "Max",
|
|
194
194
|
type: "text",
|
|
195
195
|
pattern: "[0-9]*",
|
|
196
196
|
inputmode: "numeric",
|
|
197
197
|
"model-value": o.value,
|
|
198
|
-
"onUpdate:modelValue": l[3] || (l[3] = (a) =>
|
|
198
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => P("max-input", `${a || ""}`))
|
|
199
199
|
}, null, 8, ["model-value"])
|
|
200
200
|
])
|
|
201
201
|
])
|
|
@@ -203,5 +203,5 @@ const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["
|
|
|
203
203
|
}
|
|
204
204
|
});
|
|
205
205
|
export {
|
|
206
|
-
|
|
206
|
+
ae as default
|
|
207
207
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as b, ref as u, onBeforeMount as f, createBlock as h, openBlock as i, Teleport as y, createElementVNode as e, withModifiers as l, normalizeClass as x, createElementBlock as a, createCommentVNode as s, createVNode as v, unref as _ } from "vue";
|
|
2
|
-
import { CloseIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
3
|
-
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
2
|
+
import { CloseIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js";
|
|
3
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
4
4
|
const g = { class: "snackbar-container uikit-fixed uikit-bottom-10px uikit-left-10px uikit-z-[2000] max-sm:uikit-left-0 max-sm:uikit-w-full" }, T = ["data-cy"], w = ["src", "alt"], L = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "snackbar-type-icon uikit-bg-contain uikit-bg-no-repeat"
|