@ozdao/prometheus-framework 0.2.65 → 0.2.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +2 -2
- package/dist/events.server.js +3 -3
- package/dist/events.server.mjs +2 -2
- package/dist/main-BDrW8oeL.mjs +13755 -0
- package/dist/main-CNIKtifM.js +91 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-BLGSCSmy.mjs +55 -0
- package/dist/metadata.schema-DWR97jhW.js +54 -0
- package/dist/ownership.schema-CGqscZIi.js +159 -0
- package/dist/ownership.schema-DtT2IgqC.mjs +160 -0
- package/dist/products.server.js +50 -15
- package/dist/products.server.mjs +50 -15
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -225
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +225 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +40 -39
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -83
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -46
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +46 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +10 -9
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +60 -46
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +5 -5
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +86 -56
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +82 -67
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +5 -5
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +25 -24
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-6-zYDWMA.js +1 -0
- package/dist/web-TZtLKurO.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +17 -18
- package/src/components/Field/Field.vue +1 -0
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/modules/globals/components/blocks/CardHeader.vue +6 -3
- package/src/modules/globals/controllers/utils/queryProcessor.js +2 -1
- package/src/modules/globals/store/globals.js +3 -4
- package/src/modules/products/components/blocks/CardLeftover.vue +47 -27
- package/src/modules/products/components/pages/EditLeftover.vue +13 -0
- package/src/modules/products/components/pages/Leftovers.vue +3 -3
- package/src/modules/products/controllers/leftovers.controller.js +55 -19
- package/src/modules/products/models/leftover.model.js +4 -0
- package/src/modules/products/routes/leftovers.routes.js +1 -1
- package/src/modules/products/store/leftovers.js +1 -1
- package/src/styles/config.scss +2 -2
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
1
|
+
import { ref as l, watch as B, onMounted as M, openBlock as r, createElementBlock as g, Fragment as b, createVNode as y, TransitionGroup as k, withCtx as p, createBlock as d, createCommentVNode as o, unref as m, renderList as j, Transition as w, normalizeClass as C, renderSlot as O } from "vue";
|
2
|
+
import $ from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
import "../Loader/Loader.vue.js";
|
4
|
-
import
|
4
|
+
import z from "../EmptyState/EmptyState.vue.js";
|
5
5
|
import "vue-i18n";
|
6
|
-
import
|
7
|
-
const
|
6
|
+
import E from "../../modules/globals/components/blocks/BlockSearch.vue.js";
|
7
|
+
const x = {
|
8
8
|
__name: "Feed",
|
9
9
|
props: {
|
10
10
|
search: {
|
@@ -46,86 +46,87 @@ const q = {
|
|
46
46
|
})
|
47
47
|
}
|
48
48
|
},
|
49
|
-
setup(
|
50
|
-
const t =
|
51
|
-
let
|
52
|
-
|
49
|
+
setup(u) {
|
50
|
+
const t = u, i = l([]), s = l(!1);
|
51
|
+
let c = l(!0), f = l(t.options.skip ? t.options.skip : 0), n = l(t.options.limit ? t.options.limit : 10), h = l("");
|
52
|
+
function S(e) {
|
53
|
+
h.value = e, v();
|
54
|
+
}
|
55
|
+
const L = async () => {
|
53
56
|
if (s.value) {
|
54
|
-
f.value +=
|
57
|
+
f.value += n.value;
|
55
58
|
const e = await t.store.read({
|
56
59
|
skip: f.value,
|
57
|
-
limit:
|
60
|
+
limit: n.value,
|
61
|
+
search: h.value,
|
58
62
|
...t.options
|
59
63
|
});
|
60
|
-
e.length === 0 || e.length <
|
64
|
+
e.length === 0 || e.length < n.value ? s.value = !1 : s.value = !0, i.value = [...i.value, ...e];
|
61
65
|
}
|
62
|
-
},
|
66
|
+
}, v = async () => {
|
63
67
|
const e = await t.store.read({
|
64
68
|
skip: f.value,
|
65
|
-
limit:
|
69
|
+
limit: n.value,
|
70
|
+
search: h.value,
|
66
71
|
...t.options
|
67
72
|
});
|
68
|
-
e.length === 0 || e.length <
|
73
|
+
e.length === 0 || e.length < n.value ? s.value = !1 : s.value = !0, i.value = e, c.value = !1;
|
69
74
|
};
|
70
|
-
|
71
|
-
(e.organization !== a.organization || e.categories !== a.categories || e.prices !== a.prices || e.delivery !== a.delivery || e.search !== a.search || e.status !== a.status || e.hidden !== a.hidden || e.type !== a.type) &&
|
72
|
-
}, { deep: !0 })
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
return B(async () => {
|
77
|
-
await g();
|
78
|
-
}), (e, a) => (n(), h(k, null, [
|
79
|
-
v(y, {
|
75
|
+
return B(() => t.options, (e, a) => {
|
76
|
+
(e.organization !== a.organization || e.categories !== a.categories || e.prices !== a.prices || e.delivery !== a.delivery || e.search !== a.search || e.status !== a.status || e.hidden !== a.hidden || e.type !== a.type) && v();
|
77
|
+
}, { deep: !0 }), M(async () => {
|
78
|
+
await v();
|
79
|
+
}), (e, a) => (r(), g(b, null, [
|
80
|
+
y(k, {
|
80
81
|
tag: "ul",
|
81
82
|
name: "scaleTransition"
|
82
83
|
}, {
|
83
84
|
default: p(() => [
|
84
|
-
|
85
|
+
u.search ? (r(), d(E, {
|
85
86
|
key: 0,
|
86
|
-
onSearch:
|
87
|
+
onSearch: S,
|
87
88
|
placeholder: "Enter product name",
|
88
89
|
class: "bg-white mn-b-thin"
|
89
90
|
})) : o("", !0)
|
90
91
|
]),
|
91
92
|
_: 1
|
92
93
|
}),
|
93
|
-
m(
|
94
|
+
m(c) ? (r(), d(k, {
|
94
95
|
key: 0,
|
95
96
|
tag: "ul",
|
96
97
|
name: "scaleTransition",
|
97
98
|
class: "o-hidden bg-grey radius-big"
|
98
99
|
}, {
|
99
100
|
default: p(() => [
|
100
|
-
m(
|
101
|
+
m(c) ? (r(!0), g(b, { key: 0 }, j(m(n), (T) => (r(), d($, { key: T }))), 128)) : o("", !0)
|
101
102
|
]),
|
102
103
|
_: 1
|
103
104
|
})) : o("", !0),
|
104
|
-
|
105
|
+
y(w, { name: "scaleTransition" }, {
|
105
106
|
default: p(() => [
|
106
|
-
!m(
|
107
|
+
!m(c) && i.value.length < 1 ? (r(), d(z, {
|
107
108
|
key: 0,
|
108
|
-
title:
|
109
|
-
description:
|
109
|
+
title: u.states.empty.title,
|
110
|
+
description: u.states.empty.description,
|
110
111
|
class: "pd-medium mn-b-thin bg-grey radius-big"
|
111
112
|
}, null, 8, ["title", "description"])) : o("", !0)
|
112
113
|
]),
|
113
114
|
_: 1
|
114
115
|
}),
|
115
|
-
|
116
|
+
y(k, {
|
116
117
|
tag: "ul",
|
117
118
|
name: "scaleTransition",
|
118
|
-
class:
|
119
|
+
class: C(e.$attrs.class)
|
119
120
|
}, {
|
120
121
|
default: p(() => [
|
121
|
-
!m(
|
122
|
+
!m(c) && i.value.length > 0 ? O(e.$slots, "default", {
|
122
123
|
key: 0,
|
123
124
|
items: i.value,
|
124
125
|
user: e.user
|
125
126
|
}) : o("", !0),
|
126
|
-
|
127
|
+
u.showLoadMore && s.value && i.value.length > 0 ? (r(), g("button", {
|
127
128
|
key: 1,
|
128
|
-
onClick:
|
129
|
+
onClick: L,
|
129
130
|
class: "col-w-100 w-100 bg-main button"
|
130
131
|
}, " Load more ")) : o("", !0)
|
131
132
|
]),
|
@@ -135,5 +136,5 @@ const q = {
|
|
135
136
|
}
|
136
137
|
};
|
137
138
|
export {
|
138
|
-
|
139
|
+
x as default
|
139
140
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,83 +1 @@
|
|
1
|
-
|
2
|
-
import "./Field.vue2.js";
|
3
|
-
import g from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
const w = {
|
5
|
-
key: 0,
|
6
|
-
class: "t-transp mn-r-small"
|
7
|
-
}, F = { class: "w-100" }, B = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], C = {
|
8
|
-
key: 1,
|
9
|
-
class: "t-transp mn-l-small"
|
10
|
-
}, E = {
|
11
|
-
key: 0,
|
12
|
-
class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
|
13
|
-
}, I = {
|
14
|
-
__name: "Field",
|
15
|
-
props: {
|
16
|
-
label: null,
|
17
|
-
symbol: null,
|
18
|
-
type: "text",
|
19
|
-
placeholder: "Enter something here",
|
20
|
-
field: null,
|
21
|
-
value: null,
|
22
|
-
validation: !1,
|
23
|
-
disabled: null,
|
24
|
-
tabindex: -1
|
25
|
-
},
|
26
|
-
emits: ["update:field", "focus", "blur"],
|
27
|
-
setup(e, { emit: f }) {
|
28
|
-
const a = f, s = e;
|
29
|
-
s.value && a("update:field", s.value);
|
30
|
-
const r = b(s.field);
|
31
|
-
return (m, l) => (n(), d(v, null, [
|
32
|
-
i("div", {
|
33
|
-
class: c([[
|
34
|
-
m.$attrs.class,
|
35
|
-
{
|
36
|
-
"bg-fourth-nano": e.validation
|
37
|
-
}
|
38
|
-
], "flex-center flex-nowrap flex"])
|
39
|
-
}, [
|
40
|
-
e.label ? (n(), d("div", w, [
|
41
|
-
i("span", null, o(e.label), 1)
|
42
|
-
])) : u("", !0),
|
43
|
-
i("div", F, [
|
44
|
-
e.type !== "textarea" ? (n(), d("input", {
|
45
|
-
key: 0,
|
46
|
-
onInput: l[0] || (l[0] = (t) => r.value = a("update:field", t.target.value)),
|
47
|
-
onFocus: l[1] || (l[1] = (t) => a("focus", t)),
|
48
|
-
onBlur: l[2] || (l[2] = (t) => a("blur", t)),
|
49
|
-
type: e.type,
|
50
|
-
class: "w-100",
|
51
|
-
value: e.field,
|
52
|
-
placeholder: e.placeholder,
|
53
|
-
tabindex: e.tabindex,
|
54
|
-
disabled: e.disabled
|
55
|
-
}, null, 40, B)) : (n(), d("textarea", {
|
56
|
-
key: 1,
|
57
|
-
onInput: l[3] || (l[3] = (t) => r.value = a("update:field", t.target.value)),
|
58
|
-
onFocus: l[4] || (l[4] = (t) => a("focus", t)),
|
59
|
-
onBlur: l[5] || (l[5] = (t) => a("blur", t)),
|
60
|
-
class: "w-100",
|
61
|
-
value: e.field,
|
62
|
-
placeholder: e.placeholder,
|
63
|
-
tabindex: e.tabindex,
|
64
|
-
disabled: e.disabled
|
65
|
-
}, null, 40, p))
|
66
|
-
]),
|
67
|
-
x(m.$slots, "default", {}, void 0, !0),
|
68
|
-
e.symbol ? (n(), d("div", C, [
|
69
|
-
i("span", null, o(e.symbol), 1)
|
70
|
-
])) : u("", !0)
|
71
|
-
], 2),
|
72
|
-
y(h, { name: "fade" }, {
|
73
|
-
default: k(() => [
|
74
|
-
e.validation ? (n(), d("div", E, " * " + o(e.validation.message), 1)) : u("", !0)
|
75
|
-
]),
|
76
|
-
_: 1
|
77
|
-
})
|
78
|
-
], 64));
|
79
|
-
}
|
80
|
-
}, $ = /* @__PURE__ */ g(I, [["__scopeId", "data-v-38ec9074"]]);
|
81
|
-
export {
|
82
|
-
$ as default
|
83
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Field.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),r={key:0,class:"t-transp mn-r-small"},c={class:"w-100"},m=["type","value","placeholder","tabindex","disabled"],b=["value","placeholder","tabindex","disabled"],f={key:1,class:"t-transp mn-l-small"},v={key:0,class:"mn-t-thin mn-b-thin mn-b-thin invalid-feedback"},k={__name:"Field",props:{label:null,symbol:null,type:"text",placeholder:"Enter something here",field:null,value:null,validation:!1,disabled:null,tabindex:-1},emits:["update:field","focus","blur"],setup(l,{emit:s}){const a=s,d=l;d.value&&a("update:field",d.value);const i=e.ref(d.field);return(o,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([[o.$attrs.class,{"bg-fourth-nano":l.validation}],"flex-center flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",c,[l.type!=="textarea"?(e.openBlock(),e.createElementBlock("input",{key:0,onInput:t[0]||(t[0]=n=>i.value=a("update:field",n.target.value)),onFocus:t[1]||(t[1]=n=>a("focus",n)),onBlur:t[2]||(t[2]=n=>a("blur",n)),type:l.type,class:"w-100",value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,m)):(e.openBlock(),e.createElementBlock("textarea",{key:1,onInput:t[3]||(t[3]=n=>i.value=a("update:field",n.target.value)),onFocus:t[4]||(t[4]=n=>a("focus",n)),onBlur:t[5]||(t[5]=n=>a("blur",n)),class:"w-100",style:{resize:"vertical"},value:l.field,placeholder:l.placeholder,tabindex:l.tabindex,disabled:l.disabled},null,40,b))]),e.renderSlot(o.$slots,"default",{},void 0,!0),l.symbol?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("span",null,e.toDisplayString(l.symbol),1)])):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64))}},y=u.default(k,[["__scopeId","data-v-47c78b3c"]]);exports.default=y;
|
@@ -1 +1,84 @@
|
|
1
|
-
|
1
|
+
import { ref as f, openBlock as n, createElementBlock as d, Fragment as v, createElementVNode as i, normalizeClass as c, toDisplayString as o, createCommentVNode as u, renderSlot as x, createVNode as y, Transition as h, withCtx as k } from "vue";
|
2
|
+
import "./Field.vue.js";
|
3
|
+
import g from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
+
const w = {
|
5
|
+
key: 0,
|
6
|
+
class: "t-transp mn-r-small"
|
7
|
+
}, F = { class: "w-100" }, B = ["type", "value", "placeholder", "tabindex", "disabled"], p = ["value", "placeholder", "tabindex", "disabled"], C = {
|
8
|
+
key: 1,
|
9
|
+
class: "t-transp mn-l-small"
|
10
|
+
}, E = {
|
11
|
+
key: 0,
|
12
|
+
class: "mn-t-thin mn-b-thin mn-b-thin invalid-feedback"
|
13
|
+
}, I = {
|
14
|
+
__name: "Field",
|
15
|
+
props: {
|
16
|
+
label: null,
|
17
|
+
symbol: null,
|
18
|
+
type: "text",
|
19
|
+
placeholder: "Enter something here",
|
20
|
+
field: null,
|
21
|
+
value: null,
|
22
|
+
validation: !1,
|
23
|
+
disabled: null,
|
24
|
+
tabindex: -1
|
25
|
+
},
|
26
|
+
emits: ["update:field", "focus", "blur"],
|
27
|
+
setup(e, { emit: b }) {
|
28
|
+
const a = b, s = e;
|
29
|
+
s.value && a("update:field", s.value);
|
30
|
+
const r = f(s.field);
|
31
|
+
return (m, l) => (n(), d(v, null, [
|
32
|
+
i("div", {
|
33
|
+
class: c([[
|
34
|
+
m.$attrs.class,
|
35
|
+
{
|
36
|
+
"bg-fourth-nano": e.validation
|
37
|
+
}
|
38
|
+
], "flex-center flex-nowrap flex"])
|
39
|
+
}, [
|
40
|
+
e.label ? (n(), d("div", w, [
|
41
|
+
i("span", null, o(e.label), 1)
|
42
|
+
])) : u("", !0),
|
43
|
+
i("div", F, [
|
44
|
+
e.type !== "textarea" ? (n(), d("input", {
|
45
|
+
key: 0,
|
46
|
+
onInput: l[0] || (l[0] = (t) => r.value = a("update:field", t.target.value)),
|
47
|
+
onFocus: l[1] || (l[1] = (t) => a("focus", t)),
|
48
|
+
onBlur: l[2] || (l[2] = (t) => a("blur", t)),
|
49
|
+
type: e.type,
|
50
|
+
class: "w-100",
|
51
|
+
value: e.field,
|
52
|
+
placeholder: e.placeholder,
|
53
|
+
tabindex: e.tabindex,
|
54
|
+
disabled: e.disabled
|
55
|
+
}, null, 40, B)) : (n(), d("textarea", {
|
56
|
+
key: 1,
|
57
|
+
onInput: l[3] || (l[3] = (t) => r.value = a("update:field", t.target.value)),
|
58
|
+
onFocus: l[4] || (l[4] = (t) => a("focus", t)),
|
59
|
+
onBlur: l[5] || (l[5] = (t) => a("blur", t)),
|
60
|
+
class: "w-100",
|
61
|
+
style: { resize: "vertical" },
|
62
|
+
value: e.field,
|
63
|
+
placeholder: e.placeholder,
|
64
|
+
tabindex: e.tabindex,
|
65
|
+
disabled: e.disabled
|
66
|
+
}, null, 40, p))
|
67
|
+
]),
|
68
|
+
x(m.$slots, "default", {}, void 0, !0),
|
69
|
+
e.symbol ? (n(), d("div", C, [
|
70
|
+
i("span", null, o(e.symbol), 1)
|
71
|
+
])) : u("", !0)
|
72
|
+
], 2),
|
73
|
+
y(h, { name: "fade" }, {
|
74
|
+
default: k(() => [
|
75
|
+
e.validation ? (n(), d("div", E, " * " + o(e.validation.message), 1)) : u("", !0)
|
76
|
+
]),
|
77
|
+
_: 1
|
78
|
+
})
|
79
|
+
], 64));
|
80
|
+
}
|
81
|
+
}, S = /* @__PURE__ */ g(I, [["__scopeId", "data-v-47c78b3c"]]);
|
82
|
+
export {
|
83
|
+
S as default
|
84
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../Field/Field.vue2.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},w=["innerHTML"],_={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:F,locale:c}=B.useI18n();let r=e.ref(0),n=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const g=y;function b(){g("action")}function T(a){g("update:input",a),f.value=a}function m(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(n.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let a=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(n.value=n.value.slice(0,-1),n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l--):(n.value=a.substring(0,l)+(o.value&&l%2?"|":""),l++),l>a.length&&t.loopTyping&&setTimeout(()=>{u=!0,n.value=a.substring(0,l)},333),l===0&&u&&(u=!1,m(),a=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(a,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(k.default,{field:e.unref(n),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(n)?n.value=u:n=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:m,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-medium radius-big uppercase cursor-pointer pd-l-semi pd-r-semi w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main",innerHTML:s.action},null,8,w)):e.createCommentVNode("",!0)]))}};exports.default=_;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as i, onMounted as S, watchEffect as F, openBlock as T, createElementBlock as b, createVNode as C, unref as v, isRef as H, createCommentVNode as _ } from "vue";
|
2
|
-
import L from "../Field/Field.
|
2
|
+
import L from "../Field/Field.vue2.js";
|
3
3
|
import { useI18n as M } from "vue-i18n";
|
4
4
|
const N = { class: "pd-thin radius-extra flex-nowrap flex" }, V = ["innerHTML"], P = {
|
5
5
|
__name: "FieldBig",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,72 +1 @@
|
|
1
|
-
|
2
|
-
import { useRoute as O, useRouter as T } from "vue-router";
|
3
|
-
import { useI18n as b } from "vue-i18n";
|
4
|
-
import g from "../../modules/icons/navigation/IconCross.vue.js";
|
5
|
-
import "./Popup.vue2.js";
|
6
|
-
const z = {
|
7
|
-
key: "popup-content",
|
8
|
-
class: "pd-small popup-wrapper"
|
9
|
-
}, I = {
|
10
|
-
__name: "Popup",
|
11
|
-
props: {
|
12
|
-
isPopupOpen: {
|
13
|
-
type: Boolean,
|
14
|
-
default: !1
|
15
|
-
},
|
16
|
-
style: String
|
17
|
-
},
|
18
|
-
emits: ["close-popup"],
|
19
|
-
setup(e, { emit: u }) {
|
20
|
-
const m = e, c = u;
|
21
|
-
function p() {
|
22
|
-
c("close-popup");
|
23
|
-
}
|
24
|
-
return f(() => m.isPopupOpen, (o) => {
|
25
|
-
o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
|
26
|
-
}), O(), T(), b({
|
27
|
-
messages: {
|
28
|
-
en: {},
|
29
|
-
ru: {}
|
30
|
-
}
|
31
|
-
}), (o, t) => e.isPopupOpen ? (s(), v(y, {
|
32
|
-
key: 0,
|
33
|
-
to: "body"
|
34
|
-
}, [
|
35
|
-
n(l, {
|
36
|
-
name: "TransitionTranslateY",
|
37
|
-
appear: ""
|
38
|
-
}, {
|
39
|
-
default: i(() => [
|
40
|
-
e.isPopupOpen ? (s(), a("div", z, [
|
41
|
-
n(l, {
|
42
|
-
name: "TransitionTranslateY",
|
43
|
-
mode: "out-in"
|
44
|
-
}, {
|
45
|
-
default: i(() => [
|
46
|
-
e.isPopupOpen ? (s(), a("section", P({
|
47
|
-
key: 0,
|
48
|
-
class: "pos-relative z-index-4"
|
49
|
-
}, o.$attrs), [
|
50
|
-
n(g, {
|
51
|
-
onClick: t[0] || (t[0] = (d) => p()),
|
52
|
-
class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
|
53
|
-
}),
|
54
|
-
k(o.$slots, "default")
|
55
|
-
], 16)) : r("", !0)
|
56
|
-
]),
|
57
|
-
_: 3
|
58
|
-
}),
|
59
|
-
x("div", {
|
60
|
-
onClick: t[1] || (t[1] = (d) => p()),
|
61
|
-
class: C([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
|
62
|
-
}, null, 2)
|
63
|
-
])) : r("", !0)
|
64
|
-
]),
|
65
|
-
_: 3
|
66
|
-
})
|
67
|
-
])) : r("", !0);
|
68
|
-
}
|
69
|
-
};
|
70
|
-
export {
|
71
|
-
I as default
|
72
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(o,{emit:l}){const u=o,a=l;function n(){a("close-popup")}e.watch(()=>u.isPopupOpen,t=>{t?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const i={messages:{en:{},ru:{}}};return c.useI18n(i),(t,s)=>o.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[o.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},t.$attrs),[e.createVNode(d.default,{onClick:s[0]||(s[0]=p=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(t.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=p=>n()),class:e.normalizeClass([{active:o.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
|
@@ -1 +1,72 @@
|
|
1
|
-
|
1
|
+
import { watch as f, openBlock as s, createBlock as v, Teleport as y, createVNode as n, Transition as l, withCtx as i, createElementBlock as a, mergeProps as P, renderSlot as k, createCommentVNode as r, createElementVNode as x, normalizeClass as C } from "vue";
|
2
|
+
import { useRoute as O, useRouter as T } from "vue-router";
|
3
|
+
import { useI18n as b } from "vue-i18n";
|
4
|
+
import g from "../../modules/icons/navigation/IconCross.vue.js";
|
5
|
+
import "./Popup.vue.js";
|
6
|
+
const z = {
|
7
|
+
key: "popup-content",
|
8
|
+
class: "pd-small popup-wrapper"
|
9
|
+
}, I = {
|
10
|
+
__name: "Popup",
|
11
|
+
props: {
|
12
|
+
isPopupOpen: {
|
13
|
+
type: Boolean,
|
14
|
+
default: !1
|
15
|
+
},
|
16
|
+
style: String
|
17
|
+
},
|
18
|
+
emits: ["close-popup"],
|
19
|
+
setup(e, { emit: u }) {
|
20
|
+
const m = e, c = u;
|
21
|
+
function p() {
|
22
|
+
c("close-popup");
|
23
|
+
}
|
24
|
+
return f(() => m.isPopupOpen, (o) => {
|
25
|
+
o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
|
26
|
+
}), O(), T(), b({
|
27
|
+
messages: {
|
28
|
+
en: {},
|
29
|
+
ru: {}
|
30
|
+
}
|
31
|
+
}), (o, t) => e.isPopupOpen ? (s(), v(y, {
|
32
|
+
key: 0,
|
33
|
+
to: "body"
|
34
|
+
}, [
|
35
|
+
n(l, {
|
36
|
+
name: "TransitionTranslateY",
|
37
|
+
appear: ""
|
38
|
+
}, {
|
39
|
+
default: i(() => [
|
40
|
+
e.isPopupOpen ? (s(), a("div", z, [
|
41
|
+
n(l, {
|
42
|
+
name: "TransitionTranslateY",
|
43
|
+
mode: "out-in"
|
44
|
+
}, {
|
45
|
+
default: i(() => [
|
46
|
+
e.isPopupOpen ? (s(), a("section", P({
|
47
|
+
key: 0,
|
48
|
+
class: "pos-relative z-index-4"
|
49
|
+
}, o.$attrs), [
|
50
|
+
n(g, {
|
51
|
+
onClick: t[0] || (t[0] = (d) => p()),
|
52
|
+
class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
|
53
|
+
}),
|
54
|
+
k(o.$slots, "default")
|
55
|
+
], 16)) : r("", !0)
|
56
|
+
]),
|
57
|
+
_: 3
|
58
|
+
}),
|
59
|
+
x("div", {
|
60
|
+
onClick: t[1] || (t[1] = (d) => p()),
|
61
|
+
class: C([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
|
62
|
+
}, null, 2)
|
63
|
+
])) : r("", !0)
|
64
|
+
]),
|
65
|
+
_: 3
|
66
|
+
})
|
67
|
+
])) : r("", !0);
|
68
|
+
}
|
69
|
+
};
|
70
|
+
export {
|
71
|
+
I as default
|
72
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,46 +1 @@
|
|
1
|
-
|
2
|
-
import "./Tab.vue2.js";
|
3
|
-
const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex pos-relative" }, w = ["onClick"], W = {
|
4
|
-
__name: "Tab",
|
5
|
-
props: {
|
6
|
-
tabs: Array,
|
7
|
-
selected: String,
|
8
|
-
callback: Function
|
9
|
-
},
|
10
|
-
emits: ["update:selected"],
|
11
|
-
setup(o, { emit: d }) {
|
12
|
-
const u = d, t = o, a = v(0);
|
13
|
-
if (t.selected) {
|
14
|
-
const e = t.tabs.findIndex((l) => l.value === t.selected);
|
15
|
-
e !== -1 && (a.value = e);
|
16
|
-
}
|
17
|
-
function f(e, l) {
|
18
|
-
a.value = e, u("update:selected", l.value), t.callback && t.callback();
|
19
|
-
}
|
20
|
-
function b(e) {
|
21
|
-
return `${100 / t.tabs.length * e}%`;
|
22
|
-
}
|
23
|
-
function m() {
|
24
|
-
return `${100 / t.tabs.length}%`;
|
25
|
-
}
|
26
|
-
const p = h(() => ({ left: b(a.value), width: m() }));
|
27
|
-
return (e, l) => (c(), s("div", S, [
|
28
|
-
r("div", T, [
|
29
|
-
(c(!0), s(_, null, g(o.tabs, (i, n) => (c(), s("div", {
|
30
|
-
key: n,
|
31
|
-
onClick: (z) => f(n, i),
|
32
|
-
class: k([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
|
33
|
-
}, [
|
34
|
-
r("label", null, x(i.name), 1)
|
35
|
-
], 10, w))), 128)),
|
36
|
-
r("div", {
|
37
|
-
style: y(p.value),
|
38
|
-
class: "radius-extra bg-main t-white tab-selector"
|
39
|
-
}, null, 4)
|
40
|
-
])
|
41
|
-
]));
|
42
|
-
}
|
43
|
-
};
|
44
|
-
export {
|
45
|
-
W as default
|
46
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Tab.vue.cjs");const m={class:""},v={class:"flex-nowrap flex-v-center flex pos-relative"},p=["onClick"],k={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const i=o,l=s,c=e.ref(0);if(l.selected){const t=l.tabs.findIndex(a=>a.value===l.selected);t!==-1&&(c.value=t)}function u(t,a){c.value=t,i("update:selected",a.value),l.callback&&l.callback()}function d(t){return`${100/l.tabs.length*t}%`}function f(){return`${100/l.tabs.length}%`}const b=e.computed(()=>({left:d(c.value),width:f()}));return(t,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:_=>u(n,r),class:e.normalizeClass([{"t-transp":n!==c.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,p))),128)),e.createElementVNode("div",{style:e.normalizeStyle(b.value),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports.default=k;
|
@@ -1 +1,46 @@
|
|
1
|
-
|
1
|
+
import { ref as v, computed as h, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as _, renderList as g, normalizeClass as k, toDisplayString as x, normalizeStyle as y } from "vue";
|
2
|
+
import "./Tab.vue.js";
|
3
|
+
const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex pos-relative" }, w = ["onClick"], W = {
|
4
|
+
__name: "Tab",
|
5
|
+
props: {
|
6
|
+
tabs: Array,
|
7
|
+
selected: String,
|
8
|
+
callback: Function
|
9
|
+
},
|
10
|
+
emits: ["update:selected"],
|
11
|
+
setup(o, { emit: d }) {
|
12
|
+
const u = d, t = o, a = v(0);
|
13
|
+
if (t.selected) {
|
14
|
+
const e = t.tabs.findIndex((l) => l.value === t.selected);
|
15
|
+
e !== -1 && (a.value = e);
|
16
|
+
}
|
17
|
+
function f(e, l) {
|
18
|
+
a.value = e, u("update:selected", l.value), t.callback && t.callback();
|
19
|
+
}
|
20
|
+
function b(e) {
|
21
|
+
return `${100 / t.tabs.length * e}%`;
|
22
|
+
}
|
23
|
+
function m() {
|
24
|
+
return `${100 / t.tabs.length}%`;
|
25
|
+
}
|
26
|
+
const p = h(() => ({ left: b(a.value), width: m() }));
|
27
|
+
return (e, l) => (c(), s("div", S, [
|
28
|
+
r("div", T, [
|
29
|
+
(c(!0), s(_, null, g(o.tabs, (i, n) => (c(), s("div", {
|
30
|
+
key: n,
|
31
|
+
onClick: (z) => f(n, i),
|
32
|
+
class: k([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
|
33
|
+
}, [
|
34
|
+
r("label", null, x(i.name), 1)
|
35
|
+
], 10, w))), 128)),
|
36
|
+
r("div", {
|
37
|
+
style: y(p.value),
|
38
|
+
class: "radius-extra bg-main t-white tab-selector"
|
39
|
+
}, null, 4)
|
40
|
+
])
|
41
|
+
]));
|
42
|
+
}
|
43
|
+
};
|
44
|
+
export {
|
45
|
+
W as default
|
46
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|