@poni/adjutant-ui 0.0.113 → 0.0.115
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/adjutant-ui.css +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1353 -225
- package/dist/plugin/components.d.ts +7 -2
- package/dist/plugin/types.d.ts +5 -12
- package/package.json +1 -5
- package/dist/AdjUploadFile-9ryecxoi.cjs +0 -1
- package/dist/AdjUploadFile-Bp5vEN-C.js +0 -743
- package/dist/components/constructor/AdjBlocks/AdjBlocks.mock.d.ts +0 -2
- package/dist/components/constructor/AdjBlocks/AdjBlocks.stories.d.ts +0 -6
- package/dist/components/constructor/AdjBlocks/AdjBlocks.vue.d.ts +0 -21
- package/dist/components/constructor/AdjBlocks/IAdjBlocksItem.d.ts +0 -14
- package/dist/components/constructor/AdjLaminates/AdjLaminates.mock.d.ts +0 -2
- package/dist/components/constructor/AdjLaminates/AdjLaminates.stories.d.ts +0 -6
- package/dist/components/constructor/AdjLaminates/AdjLaminates.vue.d.ts +0 -17
- package/dist/components/constructor/AdjLaminates/IAdjLaminatesItem.d.ts +0 -8
- package/dist/components/constructor/AdjMaterials/AdjMaterials.mock.d.ts +0 -2
- package/dist/components/constructor/AdjMaterials/AdjMaterials.stories.d.ts +0 -6
- package/dist/components/constructor/AdjMaterials/AdjMaterials.vue.d.ts +0 -19
- package/dist/components/constructor/AdjMaterials/IAdjMaterialsItem.d.ts +0 -18
- package/dist/components/constructor/AdjModels/AdjModels.mock.d.ts +0 -2
- package/dist/components/constructor/AdjModels/AdjModels.stories.d.ts +0 -6
- package/dist/components/constructor/AdjModels/AdjModels.vue.d.ts +0 -20
- package/dist/components/constructor/AdjNavigator/AdjNavigator.mock.d.ts +0 -6
- package/dist/components/constructor/AdjNavigator/AdjNavigator.stories.d.ts +0 -10
- package/dist/components/constructor/AdjNavigator/AdjNavigator.vue.d.ts +0 -17
- package/dist/components/constructor/AdjNavigator/IAdjNavigatorItem.d.ts +0 -7
- package/dist/components/constructor/AdjPersonalizationConfigurator/AdjPersonalizationConfigurator.mock.d.ts +0 -2
- package/dist/components/constructor/AdjPersonalizationConfigurator/AdjPersonalizationConfigurator.stories.d.ts +0 -6
- package/dist/components/constructor/AdjPersonalizationConfigurator/AdjPersonalizationConfigurator.vue.d.ts +0 -47
- package/dist/components/constructor/AdjPersonalizations/AdjPersonalizations.mock.d.ts +0 -2
- package/dist/components/constructor/AdjPersonalizations/AdjPersonalizations.stories.d.ts +0 -6
- package/dist/components/constructor/AdjPersonalizations/AdjPersonalizations.vue.d.ts +0 -26
- package/dist/components/constructor/AdjPersonalizations/IAdjPersonalizationsItem.d.ts +0 -16
- package/dist/components/constructor/AdjPricebar/AdjPricebar.mock.d.ts +0 -2
- package/dist/components/constructor/AdjPricebar/AdjPricebar.stories.d.ts +0 -6
- package/dist/components/constructor/AdjPricebar/AdjPricebar.vue.d.ts +0 -38
- package/dist/components/constructor/AdjProducts/AdjProducts.mock.d.ts +0 -3
- package/dist/components/constructor/AdjProducts/AdjProducts.stories.d.ts +0 -7
- package/dist/components/constructor/AdjProducts/AdjProducts.vue.d.ts +0 -18
- package/dist/components/constructor/AdjProducts/IAdjProductsItem.d.ts +0 -10
- package/dist/components/constructor/AdjStitchings/AdjStitchings.mock.d.ts +0 -2
- package/dist/components/constructor/AdjStitchings/AdjStitchings.stories.d.ts +0 -6
- package/dist/components/constructor/AdjStitchings/AdjStitchings.vue.d.ts +0 -18
- package/dist/components/constructor/AdjStitchings/IAdjStitchingsGroup.d.ts +0 -9
- package/dist/components/constructor/AdjStitchings/IAdjStitchingsItem.d.ts +0 -8
- package/dist/components/constructor/elements/AdjCoverGroupItem/AdjCoverGroupItem.mock.d.ts +0 -3
- package/dist/components/constructor/elements/AdjCoverGroupItem/AdjCoverGroupItem.stories.d.ts +0 -7
- package/dist/components/constructor/elements/AdjCoverGroupItem/AdjCoverGroupItem.vue.d.ts +0 -20
- package/dist/components/constructor/elements/AdjCoverItem/AdjCoverItem.mock.d.ts +0 -3
- package/dist/components/constructor/elements/AdjCoverItem/AdjCoverItem.stories.d.ts +0 -8
- package/dist/components/constructor/elements/AdjCoverItem/AdjCoverItem.vue.d.ts +0 -41
- package/dist/components/constructor/elements/AdjCoverItem/IAdjCoverItem.d.ts +0 -12
- package/dist/components/constructor/elements/AdjImageItem/AdjImageItem.mock.d.ts +0 -5
- package/dist/components/constructor/elements/AdjImageItem/AdjImageItem.stories.d.ts +0 -13
- package/dist/components/constructor/elements/AdjImageItem/AdjImageItem.vue.d.ts +0 -71
- package/dist/components/constructor/elements/AdjNavigatorItem/AdjNavigatorItem.mock.d.ts +0 -3
- package/dist/components/constructor/elements/AdjNavigatorItem/AdjNavigatorItem.stories.d.ts +0 -7
- package/dist/components/constructor/elements/AdjNavigatorItem/AdjNavigatorItem.vue.d.ts +0 -14
- package/dist/components/constructor/elements/AdjNavigatorItem/IAdjNavigatorPassive.d.ts +0 -20
- package/dist/components/constructor/elements/AdjNavigatorWrapper/AdjNavigatorWrapper.mock.d.ts +0 -6
- package/dist/components/constructor/elements/AdjNavigatorWrapper/AdjNavigatorWrapper.stories.d.ts +0 -10
- package/dist/components/constructor/elements/AdjNavigatorWrapper/AdjNavigatorWrapper.vue.d.ts +0 -18
- package/dist/components/constructor/elements/AdjNavigatorWrapper/IAdjNavigatorWrapperActive.d.ts +0 -4
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/AdjPersonalizationConfiguratorElements.mock.d.ts +0 -6
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/AdjPersonalizationConfiguratorElements.stories.d.ts +0 -6
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/AdjPersonalizationConfiguratorElements.vue.d.ts +0 -20
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/IAdjPersonalizationConfiguratorElementsItem.d.ts +0 -18
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/IAdjPersonalizationConfiguratorElementsModel.d.ts +0 -4
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/IAdjPersonalizationConfiguratorElementsNumber.d.ts +0 -5
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/IAdjPersonalizationConfiguratorElementsTexture.d.ts +0 -14
- package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/TAdjPersonalizationConfiguratorElementsValue.d.ts +0 -9
- package/dist/components/constructor/elements/AdjPricebarWrapper/AdjPricebarWrapper.mock.d.ts +0 -2
- package/dist/components/constructor/elements/AdjPricebarWrapper/AdjPricebarWrapper.stories.d.ts +0 -6
- package/dist/components/constructor/elements/AdjPricebarWrapper/AdjPricebarWrapper.vue.d.ts +0 -12
- package/dist/components/constructor/elements/AdjPricebarWrapper/IAdjPricebaritem.d.ts +0 -9
- package/dist/constructor.cjs +0 -3
- package/dist/constructor.d.ts +0 -2
- package/dist/constructor.js +0 -1472
- package/dist/plugin/constructor.d.ts +0 -11
|
@@ -1,743 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, openBlock as i, createElementBlock as n, normalizeClass as v, createCommentVNode as H, createElementVNode as o, toDisplayString as $, withDirectives as O, vShow as N, normalizeStyle as F, renderSlot as ee, useTemplateRef as S, ref as _, createVNode as M, Transition as x, withCtx as R, Fragment as D, renderList as U, withModifiers as A, useCssVars as q, computed as te, onMounted as de, watchEffect as ue, createBlock as re } from "vue";
|
|
2
|
-
import { onClickOutside as ie, useWindowSize as se, useMouseInElement as Q, useWindowScroll as ce } from "@vueuse/core";
|
|
3
|
-
const fe = /* @__PURE__ */ k({
|
|
4
|
-
__name: "AdjButton",
|
|
5
|
-
props: {
|
|
6
|
-
title: {},
|
|
7
|
-
flex: { type: Boolean, default: !1 },
|
|
8
|
-
size: { default: "medium" },
|
|
9
|
-
design: { default: "primary" },
|
|
10
|
-
disabled: { type: Boolean, default: !1 },
|
|
11
|
-
round: { type: Boolean, default: !1 },
|
|
12
|
-
iconLeft: { default: "" },
|
|
13
|
-
iconRight: { default: "" }
|
|
14
|
-
},
|
|
15
|
-
emits: ["click"],
|
|
16
|
-
setup(r) {
|
|
17
|
-
return (e, t) => (i(), n("button", {
|
|
18
|
-
class: v(["adj-button", {
|
|
19
|
-
[`adj-button_${e.size}`]: !0,
|
|
20
|
-
[`adj-button_${e.design}`]: !0,
|
|
21
|
-
"adj-button_disabled": e.disabled,
|
|
22
|
-
"adj-button_flex": e.flex,
|
|
23
|
-
"adj-button_round": e.round
|
|
24
|
-
}]),
|
|
25
|
-
onClick: t[0] || (t[0] = (a) => e.disabled ? 0 : e.$emit("click"))
|
|
26
|
-
}, [
|
|
27
|
-
e.iconLeft ? (i(), n("i", {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: v(e.iconLeft)
|
|
30
|
-
}, null, 2)) : H("", !0),
|
|
31
|
-
o("div", null, $(e.title), 1),
|
|
32
|
-
e.iconRight ? (i(), n("i", {
|
|
33
|
-
key: 1,
|
|
34
|
-
class: v(e.iconRight)
|
|
35
|
-
}, null, 2)) : H("", !0)
|
|
36
|
-
], 2));
|
|
37
|
-
}
|
|
38
|
-
}), g = (r, e) => {
|
|
39
|
-
const t = r.__vccOpts || r;
|
|
40
|
-
for (const [a, u] of e)
|
|
41
|
-
t[a] = u;
|
|
42
|
-
return t;
|
|
43
|
-
}, mt = /* @__PURE__ */ g(fe, [["__scopeId", "data-v-d4a39f57"]]), pe = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "adj-text-13"
|
|
46
|
-
}, me = { class: "adj-checkbox__handle" }, ve = {
|
|
47
|
-
width: "16",
|
|
48
|
-
height: "16",
|
|
49
|
-
viewBox: "0 0 16 16",
|
|
50
|
-
fill: "none",
|
|
51
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
52
|
-
}, he = {
|
|
53
|
-
key: 1,
|
|
54
|
-
class: "adj-text-13"
|
|
55
|
-
}, _e = /* @__PURE__ */ k({
|
|
56
|
-
__name: "AdjCheckbox",
|
|
57
|
-
props: {
|
|
58
|
-
title: { default: "" },
|
|
59
|
-
titlePosition: { default: "right" },
|
|
60
|
-
items: {},
|
|
61
|
-
modelValue: { default: () => ({ checked: !1 }) },
|
|
62
|
-
disabled: { type: Boolean, default: !1 }
|
|
63
|
-
},
|
|
64
|
-
emits: ["update:modelValue"],
|
|
65
|
-
setup(r, { emit: e }) {
|
|
66
|
-
const t = r, a = e;
|
|
67
|
-
function u() {
|
|
68
|
-
t.modelValue.checked === t.items[0].checked ? a("update:modelValue", t.items[1]) : a("update:modelValue", t.items[0]);
|
|
69
|
-
}
|
|
70
|
-
return (l, c) => (i(), n("div", {
|
|
71
|
-
class: v(["adj-checkbox", { disabled: l.disabled }]),
|
|
72
|
-
onClick: c[0] || (c[0] = (f) => u())
|
|
73
|
-
}, [
|
|
74
|
-
l.title && l.titlePosition === "left" ? (i(), n("span", pe, $(l.title), 1)) : H("", !0),
|
|
75
|
-
o("div", me, [
|
|
76
|
-
O((i(), n("svg", ve, c[1] || (c[1] = [
|
|
77
|
-
o("rect", {
|
|
78
|
-
width: "16",
|
|
79
|
-
height: "16",
|
|
80
|
-
rx: "4"
|
|
81
|
-
}, null, -1),
|
|
82
|
-
o("path", { d: "M12.7423 4.27169C12.3993 3.90944 11.842 3.90944 11.4993 4.27169L6.31133 9.75632L4.50067 7.84213C4.169 7.4915 3.58867 7.49185 3.258 7.84178C3.09167 8.01691 3 8.25055 3 8.49899C3 8.74742 3.09167 8.98106 3.25767 9.1562L5.69 11.7276C5.856 11.9034 6.07667 12 6.31167 12C6.54667 12 6.76767 11.9031 6.93333 11.7276L12.7423 5.58647C12.9083 5.41098 13 5.17734 13 4.9289C13 4.68047 12.9087 4.44719 12.7423 4.27169Z" }, null, -1)
|
|
83
|
-
]), 512)), [
|
|
84
|
-
[N, l.modelValue.checked]
|
|
85
|
-
])
|
|
86
|
-
]),
|
|
87
|
-
l.title && l.titlePosition === "right" ? (i(), n("span", he, $(l.title), 1)) : H("", !0)
|
|
88
|
-
], 2));
|
|
89
|
-
}
|
|
90
|
-
}), vt = /* @__PURE__ */ g(_e, [["__scopeId", "data-v-97fdba75"]]), je = /* @__PURE__ */ k({
|
|
91
|
-
__name: "AdjScroll",
|
|
92
|
-
props: {
|
|
93
|
-
maxHeight: { default: "unset" },
|
|
94
|
-
white: { type: Boolean, default: !1 }
|
|
95
|
-
},
|
|
96
|
-
setup(r) {
|
|
97
|
-
const e = r;
|
|
98
|
-
return (t, a) => (i(), n("div", {
|
|
99
|
-
class: v(["adj-scroll", { "adj-scroll_white": t.white }]),
|
|
100
|
-
style: F({ maxHeight: `${e.maxHeight}` })
|
|
101
|
-
}, [
|
|
102
|
-
ee(t.$slots, "default", {}, void 0, !0)
|
|
103
|
-
], 6));
|
|
104
|
-
}
|
|
105
|
-
}), ne = /* @__PURE__ */ g(je, [["__scopeId", "data-v-47993da5"]]), ge = {
|
|
106
|
-
key: 0,
|
|
107
|
-
class: "icon-close"
|
|
108
|
-
}, ke = {
|
|
109
|
-
key: 1,
|
|
110
|
-
class: "icon-arrow-down"
|
|
111
|
-
}, be = {
|
|
112
|
-
key: 0,
|
|
113
|
-
class: "adj-filter-select__items adj-effect-overlay-big"
|
|
114
|
-
}, we = ["onClick"], $e = /* @__PURE__ */ k({
|
|
115
|
-
__name: "AdjFilterSelect",
|
|
116
|
-
props: {
|
|
117
|
-
title: {},
|
|
118
|
-
position: { default: "right" },
|
|
119
|
-
items: {},
|
|
120
|
-
modelValue: {}
|
|
121
|
-
},
|
|
122
|
-
emits: ["update:modelValue"],
|
|
123
|
-
setup(r, { emit: e }) {
|
|
124
|
-
const t = r, a = e, u = S("refElement");
|
|
125
|
-
ie(u, () => l.value = !1);
|
|
126
|
-
const l = _(!1);
|
|
127
|
-
function c(d) {
|
|
128
|
-
"disabled" in d && d.disabled || ("id" in d && d.id && (l.value = !1), a("update:modelValue", d));
|
|
129
|
-
}
|
|
130
|
-
function f() {
|
|
131
|
-
"id" in t.modelValue ? c({}) : l.value = !l.value;
|
|
132
|
-
}
|
|
133
|
-
return (d, b) => (i(), n("div", {
|
|
134
|
-
ref: "refElement",
|
|
135
|
-
class: v(["adj-filter-select", [{ show: l.value, active: "id" in d.modelValue && d.modelValue.id }, d.position]])
|
|
136
|
-
}, [
|
|
137
|
-
o("div", {
|
|
138
|
-
class: "adj-filter-select__name adj-text-14",
|
|
139
|
-
onClick: b[0] || (b[0] = (s) => f())
|
|
140
|
-
}, [
|
|
141
|
-
o("span", null, $("id" in d.modelValue && d.modelValue.id ? d.modelValue.name : d.title), 1),
|
|
142
|
-
"id" in d.modelValue && d.modelValue.id ? (i(), n("i", ge)) : (i(), n("i", ke)),
|
|
143
|
-
M(x, { name: "adj-fade" }, {
|
|
144
|
-
default: R(() => [
|
|
145
|
-
l.value ? (i(), n("div", be, [
|
|
146
|
-
M(ne, { maxHeight: "384px" }, {
|
|
147
|
-
default: R(() => [
|
|
148
|
-
o("div", null, [
|
|
149
|
-
(i(!0), n(D, null, U(d.items, (s) => (i(), n("div", {
|
|
150
|
-
key: s.id,
|
|
151
|
-
class: v(["adj-filter-select__item adj-text-14", { "adj-filter-select__item_disabled": s.disabled }]),
|
|
152
|
-
onClick: A((p) => c(s), ["stop"])
|
|
153
|
-
}, [
|
|
154
|
-
o("span", null, $(s.name), 1)
|
|
155
|
-
], 10, we))), 128))
|
|
156
|
-
])
|
|
157
|
-
]),
|
|
158
|
-
_: 1
|
|
159
|
-
})
|
|
160
|
-
])) : H("", !0)
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
], 2));
|
|
166
|
-
}
|
|
167
|
-
}), ht = /* @__PURE__ */ g($e, [["__scopeId", "data-v-5481dc68"]]), Ce = ["innerHTML"], ye = /* @__PURE__ */ k({
|
|
168
|
-
__name: "AdjHintDesktop",
|
|
169
|
-
props: {
|
|
170
|
-
html: { default: "" },
|
|
171
|
-
horizontalPosition: { default: "left" },
|
|
172
|
-
verticalPosition: { default: "top" },
|
|
173
|
-
dark: { type: Boolean, default: !1 },
|
|
174
|
-
width: { default: "200px" }
|
|
175
|
-
},
|
|
176
|
-
setup(r) {
|
|
177
|
-
return q((e) => ({
|
|
178
|
-
"19fa0a1c": e.width
|
|
179
|
-
})), (e, t) => (i(), n("div", {
|
|
180
|
-
class: v([
|
|
181
|
-
"adj-hint-desktop",
|
|
182
|
-
{ "adj-hint-desktop_dark": e.dark },
|
|
183
|
-
`adj-hint-desktop_${e.verticalPosition}`,
|
|
184
|
-
`adj-hint-desktop_${e.horizontalPosition}`
|
|
185
|
-
])
|
|
186
|
-
}, [
|
|
187
|
-
o("div", {
|
|
188
|
-
class: "adj-hint-desktop__text",
|
|
189
|
-
innerHTML: e.html
|
|
190
|
-
}, null, 8, Ce),
|
|
191
|
-
t[0] || (t[0] = o("svg", {
|
|
192
|
-
class: "adj-hint-desktop__triangle",
|
|
193
|
-
width: "14",
|
|
194
|
-
height: "14",
|
|
195
|
-
viewBox: "0 0 14 14",
|
|
196
|
-
fill: "none",
|
|
197
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
198
|
-
}, [
|
|
199
|
-
o("path", {
|
|
200
|
-
class: "adj-hint-desktop__triangle_inner",
|
|
201
|
-
d: "M13 13L7 2L1 13H13Z"
|
|
202
|
-
}),
|
|
203
|
-
o("path", {
|
|
204
|
-
class: "adj-hint-desktop__triangle_border",
|
|
205
|
-
d: "M13 13L7 2L1 13"
|
|
206
|
-
})
|
|
207
|
-
], -1))
|
|
208
|
-
], 2));
|
|
209
|
-
}
|
|
210
|
-
}), Pe = /* @__PURE__ */ g(ye, [["__scopeId", "data-v-56d69439"]]), Ve = { class: "adj-modal" }, Ie = { class: "adj-modal_wrapper" }, Ae = /* @__PURE__ */ k({
|
|
211
|
-
__name: "AdjModal",
|
|
212
|
-
props: {
|
|
213
|
-
show: { type: Boolean },
|
|
214
|
-
width: { default: "100%" },
|
|
215
|
-
hideClose: { type: Boolean, default: !1 }
|
|
216
|
-
},
|
|
217
|
-
emits: ["update:show"],
|
|
218
|
-
setup(r, { emit: e }) {
|
|
219
|
-
q((u) => ({
|
|
220
|
-
"5f2379a6": u.width
|
|
221
|
-
}));
|
|
222
|
-
const t = e;
|
|
223
|
-
function a() {
|
|
224
|
-
t("update:show", !1);
|
|
225
|
-
}
|
|
226
|
-
return (u, l) => (i(), n("div", Ve, [
|
|
227
|
-
M(x, { name: "adj-fade" }, {
|
|
228
|
-
default: R(() => [
|
|
229
|
-
O(o("div", Ie, l[1] || (l[1] = [
|
|
230
|
-
o("div", { class: "adj-modal__background" }, null, -1)
|
|
231
|
-
]), 512), [
|
|
232
|
-
[N, u.show]
|
|
233
|
-
])
|
|
234
|
-
]),
|
|
235
|
-
_: 1
|
|
236
|
-
}),
|
|
237
|
-
M(x, { name: "adj-popup-bottom" }, {
|
|
238
|
-
default: R(() => [
|
|
239
|
-
O(o("div", {
|
|
240
|
-
class: "adj-modal_wrapper",
|
|
241
|
-
onClick: A(a, ["stop"])
|
|
242
|
-
}, [
|
|
243
|
-
o("div", {
|
|
244
|
-
class: "adj-modal__window",
|
|
245
|
-
onClick: l[0] || (l[0] = A(() => {
|
|
246
|
-
}, ["stop"]))
|
|
247
|
-
}, [
|
|
248
|
-
u.hideClose ? H("", !0) : (i(), n("div", {
|
|
249
|
-
key: 0,
|
|
250
|
-
class: "adj-modal__close icon-close",
|
|
251
|
-
onClick: A(a, ["stop"])
|
|
252
|
-
})),
|
|
253
|
-
ee(u.$slots, "default", {}, void 0, !0)
|
|
254
|
-
])
|
|
255
|
-
], 512), [
|
|
256
|
-
[N, u.show]
|
|
257
|
-
])
|
|
258
|
-
]),
|
|
259
|
-
_: 3
|
|
260
|
-
})
|
|
261
|
-
]));
|
|
262
|
-
}
|
|
263
|
-
}), He = /* @__PURE__ */ g(Ae, [["__scopeId", "data-v-b1b32775"]]), ze = { class: "adj-hint" }, Be = ["innerHTML"], J = 14, K = 14, Me = /* @__PURE__ */ k({
|
|
264
|
-
__name: "AdjHint",
|
|
265
|
-
props: {
|
|
266
|
-
html: { default: "" },
|
|
267
|
-
horizontalPosition: { default: "left" },
|
|
268
|
-
verticalPosition: { default: "bottom" },
|
|
269
|
-
dark: { type: Boolean, default: !0 },
|
|
270
|
-
modalMode: { type: Boolean, default: !1 }
|
|
271
|
-
},
|
|
272
|
-
setup(r) {
|
|
273
|
-
const e = r, t = _(!1), a = _(!1), { width: u, height: l } = se(), c = S("refSlot"), f = S("refHint"), d = _(0), b = _(0), { elementWidth: s, elementHeight: p } = Q(c), m = _(0), h = _(80), { elementWidth: w, elementHeight: y } = Q(f), P = _(e.horizontalPosition), C = _(e.verticalPosition);
|
|
274
|
-
let V = 10 + K / 2;
|
|
275
|
-
function T() {
|
|
276
|
-
(!e.modalMode || u.value >= 1200) && (L(), Z(), X(), t.value = !0);
|
|
277
|
-
}
|
|
278
|
-
function W() {
|
|
279
|
-
(!e.modalMode || u.value >= 1200) && (t.value = !1);
|
|
280
|
-
}
|
|
281
|
-
function B() {
|
|
282
|
-
e.modalMode && u.value < 1200 && (a.value = !0);
|
|
283
|
-
}
|
|
284
|
-
function L() {
|
|
285
|
-
if (c.value !== null) {
|
|
286
|
-
const I = c.value.getBoundingClientRect();
|
|
287
|
-
d.value = I.left, b.value = I.top;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
function Z() {
|
|
291
|
-
e.dark && (V = 15 + K / 2), P.value = e.horizontalPosition, C.value = e.verticalPosition, e.horizontalPosition === "left" && d.value + s.value / 2 + V - w.value < 0 ? P.value = "right" : e.horizontalPosition === "right" && d.value + s.value / 2 - V + w.value > u.value && (P.value = "left"), e.verticalPosition === "top" && b.value - J - y.value < 0 ? C.value = "bottom" : e.verticalPosition === "bottom" && b.value + p.value + J + y.value > l.value && (C.value = "top");
|
|
292
|
-
}
|
|
293
|
-
function X() {
|
|
294
|
-
e.dark && (V = 15 + K / 2), P.value === "left" ? m.value = d.value + s.value / 2 + V - w.value : P.value === "center" ? m.value = d.value + s.value / 2 - K / 2 - w.value / 2 : P.value === "right" && (m.value = d.value + s.value / 2 - V), C.value == "top" ? h.value = b.value - J - y.value : C.value == "bottom" && (h.value = b.value + p.value + J);
|
|
295
|
-
}
|
|
296
|
-
return (I, G) => (i(), n("div", ze, [
|
|
297
|
-
o("div", {
|
|
298
|
-
class: "adj-hint__slot",
|
|
299
|
-
onMouseenter: A(T, ["stop"]),
|
|
300
|
-
onMouseleave: A(W, ["stop"]),
|
|
301
|
-
onClick: A(B, ["stop"]),
|
|
302
|
-
ref: "refSlot"
|
|
303
|
-
}, [
|
|
304
|
-
ee(I.$slots, "default", {}, void 0, !0)
|
|
305
|
-
], 544),
|
|
306
|
-
o("div", {
|
|
307
|
-
class: "adj-hint__hint",
|
|
308
|
-
style: F({
|
|
309
|
-
left: m.value + "px",
|
|
310
|
-
top: h.value + "px",
|
|
311
|
-
visibility: t.value ? "visible" : "hidden"
|
|
312
|
-
}),
|
|
313
|
-
ref: "refHint"
|
|
314
|
-
}, [
|
|
315
|
-
O(M(Pe, {
|
|
316
|
-
html: I.html,
|
|
317
|
-
horizontalPosition: P.value,
|
|
318
|
-
verticalPosition: C.value,
|
|
319
|
-
dark: I.dark,
|
|
320
|
-
width: "252px"
|
|
321
|
-
}, null, 8, ["html", "horizontalPosition", "verticalPosition", "dark"]), [
|
|
322
|
-
[N, I.html !== ""]
|
|
323
|
-
])
|
|
324
|
-
], 4),
|
|
325
|
-
M(He, {
|
|
326
|
-
show: a.value,
|
|
327
|
-
"onUpdate:show": G[0] || (G[0] = (Y) => a.value = Y),
|
|
328
|
-
width: "430px"
|
|
329
|
-
}, {
|
|
330
|
-
default: R(() => [
|
|
331
|
-
o("div", {
|
|
332
|
-
class: "adj-hint__modal",
|
|
333
|
-
innerHTML: I.html
|
|
334
|
-
}, null, 8, Be)
|
|
335
|
-
]),
|
|
336
|
-
_: 1
|
|
337
|
-
}, 8, ["show"])
|
|
338
|
-
]));
|
|
339
|
-
}
|
|
340
|
-
}), Le = /* @__PURE__ */ g(Me, [["__scopeId", "data-v-2537eb61"]]), Se = /* @__PURE__ */ k({
|
|
341
|
-
__name: "AdjIcon",
|
|
342
|
-
props: {
|
|
343
|
-
iconName: {},
|
|
344
|
-
size: { default: 24 },
|
|
345
|
-
design: { default: "contrast" },
|
|
346
|
-
tooltip: { default: "" },
|
|
347
|
-
disabled: { type: Boolean, default: !1 },
|
|
348
|
-
tooltipPosition: { default: "left" }
|
|
349
|
-
},
|
|
350
|
-
emits: ["click"],
|
|
351
|
-
setup(r) {
|
|
352
|
-
q((a) => ({
|
|
353
|
-
a6dfad46: t.value
|
|
354
|
-
}));
|
|
355
|
-
const e = r, t = te(() => e.size + "px");
|
|
356
|
-
return (a, u) => (i(), n("div", {
|
|
357
|
-
class: v(["adj-icon", {
|
|
358
|
-
[`adj-icon_${a.design}`]: !0,
|
|
359
|
-
"adj-icon_disabled": a.disabled
|
|
360
|
-
}])
|
|
361
|
-
}, [
|
|
362
|
-
M(Le, {
|
|
363
|
-
dark: !1,
|
|
364
|
-
html: a.disabled ? "" : a.tooltip,
|
|
365
|
-
horizontalPosition: a.tooltipPosition
|
|
366
|
-
}, {
|
|
367
|
-
default: R(() => [
|
|
368
|
-
o("i", {
|
|
369
|
-
class: v([a.iconName]),
|
|
370
|
-
onClick: u[0] || (u[0] = (l) => a.$emit("click"))
|
|
371
|
-
}, null, 2)
|
|
372
|
-
]),
|
|
373
|
-
_: 1
|
|
374
|
-
}, 8, ["html", "horizontalPosition"])
|
|
375
|
-
], 2));
|
|
376
|
-
}
|
|
377
|
-
}), _t = /* @__PURE__ */ g(Se, [["__scopeId", "data-v-27ccd948"]]), Re = {
|
|
378
|
-
key: 0,
|
|
379
|
-
class: "adj-icon-button__qty adj-text-12"
|
|
380
|
-
}, Te = /* @__PURE__ */ k({
|
|
381
|
-
__name: "AdjIconButton",
|
|
382
|
-
props: {
|
|
383
|
-
iconName: {},
|
|
384
|
-
qty: { default: 0 },
|
|
385
|
-
size: { default: "medium" },
|
|
386
|
-
design: { default: "white-back" },
|
|
387
|
-
disabled: { type: Boolean, default: !1 }
|
|
388
|
-
},
|
|
389
|
-
emits: ["click"],
|
|
390
|
-
setup(r) {
|
|
391
|
-
return (e, t) => (i(), n("div", {
|
|
392
|
-
class: v(["adj-icon-button", {
|
|
393
|
-
[`adj-icon-button_${e.size}`]: !0,
|
|
394
|
-
[`adj-icon-button_${e.design}`]: !0,
|
|
395
|
-
"adj-icon-button_disabled": e.disabled
|
|
396
|
-
}]),
|
|
397
|
-
onClick: t[0] || (t[0] = (a) => e.$emit("click"))
|
|
398
|
-
}, [
|
|
399
|
-
o("i", {
|
|
400
|
-
class: v(["adj-icon-button__icon", e.iconName])
|
|
401
|
-
}, null, 2),
|
|
402
|
-
e.qty > 0 ? (i(), n("div", Re, $(e.qty), 1)) : H("", !0)
|
|
403
|
-
], 2));
|
|
404
|
-
}
|
|
405
|
-
}), jt = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-b636fa8d"]]), We = ["onClick"], Ee = { class: "adj-radio__item_name adj-text-13" }, Fe = /* @__PURE__ */ k({
|
|
406
|
-
__name: "AdjRadio",
|
|
407
|
-
props: {
|
|
408
|
-
namePosition: { default: "right" },
|
|
409
|
-
items: { default: () => [] },
|
|
410
|
-
modelValue: {},
|
|
411
|
-
disabled: { type: Boolean, default: !1 }
|
|
412
|
-
},
|
|
413
|
-
emits: ["update:modelValue"],
|
|
414
|
-
setup(r, { emit: e }) {
|
|
415
|
-
const t = r, a = e;
|
|
416
|
-
function u(l) {
|
|
417
|
-
var c;
|
|
418
|
-
l.id !== ((c = t.modelValue) == null ? void 0 : c.id) && a("update:modelValue", l);
|
|
419
|
-
}
|
|
420
|
-
return (l, c) => (i(), n("div", {
|
|
421
|
-
class: v(["adj-radio", { "adj-radio_disabled": l.disabled }])
|
|
422
|
-
}, [
|
|
423
|
-
(i(!0), n(D, null, U(l.items, (f) => {
|
|
424
|
-
var d;
|
|
425
|
-
return i(), n("div", {
|
|
426
|
-
key: f.id,
|
|
427
|
-
class: v(["adj-radio__item", {
|
|
428
|
-
active: ((d = l.modelValue) == null ? void 0 : d.id) === f.id,
|
|
429
|
-
[`adj-radio__item_${l.namePosition}`]: !0
|
|
430
|
-
}]),
|
|
431
|
-
onClick: (b) => u(f)
|
|
432
|
-
}, [
|
|
433
|
-
o("div", {
|
|
434
|
-
class: v(["adj-radio__item_button", { "adj-effect-overlay-small": !l.disabled }])
|
|
435
|
-
}, null, 2),
|
|
436
|
-
o("span", Ee, $(f.name), 1)
|
|
437
|
-
], 10, We);
|
|
438
|
-
}), 128))
|
|
439
|
-
], 2));
|
|
440
|
-
}
|
|
441
|
-
}), gt = /* @__PURE__ */ g(Fe, [["__scopeId", "data-v-354e1b34"]]), Oe = {
|
|
442
|
-
key: 0,
|
|
443
|
-
class: "adj-input__image"
|
|
444
|
-
}, Ne = ["src"], De = { class: "adj-input__text" }, Ue = ["onClick"], qe = {
|
|
445
|
-
key: 0,
|
|
446
|
-
class: "adj-select-modern__item-image"
|
|
447
|
-
}, Ze = ["src"], Ge = { class: "adj-select-modern__item-text" }, Je = /* @__PURE__ */ k({
|
|
448
|
-
__name: "AdjSelectModern",
|
|
449
|
-
props: {
|
|
450
|
-
design: { default: "text" },
|
|
451
|
-
horizontalPosition: { default: "right" },
|
|
452
|
-
verticalPosition: { default: "bottom" },
|
|
453
|
-
items: { default: () => [] },
|
|
454
|
-
modelValue: {}
|
|
455
|
-
},
|
|
456
|
-
emits: ["update:modelValue"],
|
|
457
|
-
setup(r, { emit: e }) {
|
|
458
|
-
const t = r, a = e, { x: u, y: l } = ce(), { width: c, height: f } = se();
|
|
459
|
-
de(() => {
|
|
460
|
-
ue(() => {
|
|
461
|
-
u.value >= 0 && l.value >= 0 && c.value >= 0 && Z();
|
|
462
|
-
});
|
|
463
|
-
});
|
|
464
|
-
const d = S("refElement");
|
|
465
|
-
ie(d, () => s.value = !1);
|
|
466
|
-
function b(j) {
|
|
467
|
-
var z;
|
|
468
|
-
s.value = !1, j.id != ((z = t.modelValue) == null ? void 0 : z.id) && a("update:modelValue", j);
|
|
469
|
-
}
|
|
470
|
-
const s = _(!1), p = S("refInput"), m = S("refItems"), h = _(0), w = _(0), { elementWidth: y, elementHeight: P } = Q(p), C = _(0), V = _(80), { elementWidth: T, elementHeight: W } = Q(m), B = _(t.horizontalPosition), L = _(t.verticalPosition);
|
|
471
|
-
function Z() {
|
|
472
|
-
s.value && (I(), G(), Y());
|
|
473
|
-
}
|
|
474
|
-
function X() {
|
|
475
|
-
s.value = !s.value, Z();
|
|
476
|
-
}
|
|
477
|
-
function I() {
|
|
478
|
-
if (p.value !== null) {
|
|
479
|
-
const j = p.value.getBoundingClientRect();
|
|
480
|
-
h.value = j.left, w.value = j.top;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
function G() {
|
|
484
|
-
B.value = t.horizontalPosition, L.value = t.verticalPosition, t.horizontalPosition === "left" && h.value + y.value < T.value ? B.value = "right" : t.horizontalPosition === "right" && T.value > c.value - h.value && (B.value = "left"), t.verticalPosition === "top" && w.value - W.value < 0 ? L.value = "bottom" : t.verticalPosition === "bottom" && w.value + P.value + W.value > f.value && (L.value = "top");
|
|
485
|
-
}
|
|
486
|
-
function Y() {
|
|
487
|
-
B.value === "left" ? C.value = h.value + y.value - T.value : B.value === "center" ? C.value = h.value + y.value / 2 - T.value / 2 : B.value === "right" && (C.value = h.value), L.value == "top" ? V.value = w.value - W.value : L.value == "bottom" && (V.value = w.value + P.value);
|
|
488
|
-
}
|
|
489
|
-
return (j, z) => {
|
|
490
|
-
var le, ae, oe;
|
|
491
|
-
return i(), n("div", {
|
|
492
|
-
ref: "refElement",
|
|
493
|
-
class: v([
|
|
494
|
-
"adj-select-modern",
|
|
495
|
-
"adj-text-14",
|
|
496
|
-
j.horizontalPosition,
|
|
497
|
-
`adj-select-modern_${j.design}`,
|
|
498
|
-
{ showItems: s.value }
|
|
499
|
-
])
|
|
500
|
-
}, [
|
|
501
|
-
o("div", {
|
|
502
|
-
ref: "refInput",
|
|
503
|
-
class: "adj-input adj-text-14",
|
|
504
|
-
onClick: A(X, ["stop"])
|
|
505
|
-
}, [
|
|
506
|
-
j.design === "image" ? (i(), n("div", Oe, [
|
|
507
|
-
o("img", {
|
|
508
|
-
src: (le = j.modelValue) == null ? void 0 : le.image,
|
|
509
|
-
alt: ""
|
|
510
|
-
}, null, 8, Ne),
|
|
511
|
-
z[0] || (z[0] = o("div", { class: "adj-input__border" }, null, -1))
|
|
512
|
-
])) : j.design === "background" ? (i(), n("div", {
|
|
513
|
-
key: 1,
|
|
514
|
-
class: "adj-input__image",
|
|
515
|
-
style: F({ background: (ae = j.modelValue) == null ? void 0 : ae.background })
|
|
516
|
-
}, null, 4)) : H("", !0),
|
|
517
|
-
o("span", De, $((oe = j.modelValue) == null ? void 0 : oe.name), 1),
|
|
518
|
-
z[1] || (z[1] = o("i", { class: "adj-input__icon icon-arrow-down" }, null, -1))
|
|
519
|
-
], 512),
|
|
520
|
-
o("div", {
|
|
521
|
-
class: "adj-select-modern__items adj-effect-overlay-big",
|
|
522
|
-
style: F({
|
|
523
|
-
left: C.value + "px",
|
|
524
|
-
top: V.value + "px",
|
|
525
|
-
visibility: s.value ? "visible" : "hidden"
|
|
526
|
-
}),
|
|
527
|
-
ref: "refItems"
|
|
528
|
-
}, [
|
|
529
|
-
M(ne, { maxHeight: "384px" }, {
|
|
530
|
-
default: R(() => [
|
|
531
|
-
o("div", null, [
|
|
532
|
-
(i(!0), n(D, null, U(j.items, (E) => (i(), n("div", {
|
|
533
|
-
key: E.id,
|
|
534
|
-
class: "adj-select-modern__item adj-text-14",
|
|
535
|
-
onClick: A((ct) => b(E), ["stop"])
|
|
536
|
-
}, [
|
|
537
|
-
j.design === "image" ? (i(), n("div", qe, [
|
|
538
|
-
o("img", {
|
|
539
|
-
src: E.image,
|
|
540
|
-
alt: ""
|
|
541
|
-
}, null, 8, Ze),
|
|
542
|
-
z[2] || (z[2] = o("div", { class: "adj-select-modern__item-border" }, null, -1))
|
|
543
|
-
])) : j.design === "background" ? (i(), n("div", {
|
|
544
|
-
key: 1,
|
|
545
|
-
class: "adj-select-modern__item-image",
|
|
546
|
-
style: F({ background: E.background })
|
|
547
|
-
}, null, 4)) : H("", !0),
|
|
548
|
-
o("span", Ge, $(E.name), 1)
|
|
549
|
-
], 8, Ue))), 128))
|
|
550
|
-
])
|
|
551
|
-
]),
|
|
552
|
-
_: 1
|
|
553
|
-
})
|
|
554
|
-
], 4)
|
|
555
|
-
], 2);
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
}), kt = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-da4b80ef"]]), Ke = { class: "adj-skeleton-item" }, Qe = /* @__PURE__ */ k({
|
|
559
|
-
__name: "AdjSkeletonItem",
|
|
560
|
-
props: {
|
|
561
|
-
width: { default: "100%" },
|
|
562
|
-
height: { default: "unset" },
|
|
563
|
-
aspectRatio: { default: "unset" },
|
|
564
|
-
marginTop: { default: "0px" }
|
|
565
|
-
},
|
|
566
|
-
setup(r) {
|
|
567
|
-
q((a) => ({
|
|
568
|
-
"6c6a62eb": a.width,
|
|
569
|
-
"5e4cd76c": a.marginTop,
|
|
570
|
-
"3288b325": t.value,
|
|
571
|
-
"071300a2": a.height
|
|
572
|
-
}));
|
|
573
|
-
const e = r, t = te(() => e.height !== "unset" ? "unset" : e.aspectRatio);
|
|
574
|
-
return (a, u) => (i(), n("div", Ke));
|
|
575
|
-
}
|
|
576
|
-
}), Xe = /* @__PURE__ */ g(Qe, [["__scopeId", "data-v-a8496a75"]]), Ye = { class: "adj-skeleton" }, xe = /* @__PURE__ */ k({
|
|
577
|
-
__name: "AdjSkeleton",
|
|
578
|
-
props: {
|
|
579
|
-
loaders: { default: () => [] },
|
|
580
|
-
width: { default: "100%" },
|
|
581
|
-
centered: { type: Boolean, default: !1 }
|
|
582
|
-
},
|
|
583
|
-
setup(r) {
|
|
584
|
-
q((a) => ({
|
|
585
|
-
da5aeae0: t.value,
|
|
586
|
-
"0deb2ec4": a.width
|
|
587
|
-
}));
|
|
588
|
-
const e = r, t = te(() => e.centered ? "center" : "unset");
|
|
589
|
-
return (a, u) => (i(), n("div", Ye, [
|
|
590
|
-
(i(!0), n(D, null, U(a.loaders, (l, c) => (i(), re(Xe, {
|
|
591
|
-
key: c,
|
|
592
|
-
width: l.width,
|
|
593
|
-
height: l.height,
|
|
594
|
-
"aspect-ratio": l.aspectRatio,
|
|
595
|
-
"margin-top": l.marginTop
|
|
596
|
-
}, null, 8, ["width", "height", "aspect-ratio", "margin-top"]))), 128))
|
|
597
|
-
]));
|
|
598
|
-
}
|
|
599
|
-
}), bt = /* @__PURE__ */ g(xe, [["__scopeId", "data-v-14f324dd"]]), et = {}, tt = {
|
|
600
|
-
viewBox: "0 0 34 34",
|
|
601
|
-
fill: "none",
|
|
602
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
603
|
-
};
|
|
604
|
-
function lt(r, e) {
|
|
605
|
-
return i(), n("svg", tt, e[0] || (e[0] = [
|
|
606
|
-
o("circle", {
|
|
607
|
-
cx: "17",
|
|
608
|
-
cy: "17",
|
|
609
|
-
r: "16.5"
|
|
610
|
-
}, null, -1),
|
|
611
|
-
o("path", { d: "M22.7034 12.9285C22.6244 12.8488 22.5304 12.7856 22.4268 12.7424C22.3232 12.6993 22.2121 12.6771 22.0999 12.6771C21.9877 12.6771 21.8766 12.6993 21.773 12.7424C21.6694 12.7856 21.5754 12.8488 21.4964 12.9285L15.1639 19.2695L12.5034 16.6005C12.4213 16.5212 12.3245 16.4589 12.2184 16.4171C12.1122 16.3753 11.9989 16.3548 11.8849 16.3567C11.7708 16.3587 11.6583 16.3831 11.5536 16.4286C11.449 16.4741 11.3544 16.5397 11.2751 16.6217C11.1959 16.7038 11.1336 16.8006 11.0917 16.9068C11.0499 17.0129 11.0294 17.1262 11.0314 17.2403C11.0334 17.3543 11.0578 17.4669 11.1032 17.5715C11.1487 17.6761 11.2143 17.7707 11.2964 17.85L14.5604 21.114C14.6394 21.1937 14.7334 21.2569 14.837 21.3C14.9406 21.3432 15.0517 21.3654 15.1639 21.3654C15.2761 21.3654 15.3872 21.3432 15.4908 21.3C15.5944 21.2569 15.6884 21.1937 15.7674 21.114L22.7034 14.178C22.7897 14.0984 22.8585 14.0018 22.9056 13.8943C22.9527 13.7867 22.977 13.6706 22.977 13.5532C22.977 13.4359 22.9527 13.3197 22.9056 13.2122C22.8585 13.1047 22.7897 13.0081 22.7034 12.9285Z" }, null, -1)
|
|
612
|
-
]));
|
|
613
|
-
}
|
|
614
|
-
const wt = /* @__PURE__ */ g(et, [["render", lt], ["__scopeId", "data-v-ef9285fe"]]), at = { class: "adj-tabs" }, ot = { class: "adj-tabs-wrapper" }, it = ["onClick"], st = { key: 0 }, nt = /* @__PURE__ */ k({
|
|
615
|
-
__name: "AdjTabs",
|
|
616
|
-
props: {
|
|
617
|
-
items: { default: () => [] },
|
|
618
|
-
modelValue: {}
|
|
619
|
-
},
|
|
620
|
-
emits: ["update:modelValue"],
|
|
621
|
-
setup(r, { emit: e }) {
|
|
622
|
-
const t = r, a = e;
|
|
623
|
-
function u(l) {
|
|
624
|
-
var c;
|
|
625
|
-
!l.disabled && l.id !== ((c = t.modelValue) == null ? void 0 : c.id) && a("update:modelValue", l);
|
|
626
|
-
}
|
|
627
|
-
return (l, c) => (i(), n("div", at, [
|
|
628
|
-
o("div", ot, [
|
|
629
|
-
(i(!0), n(D, null, U(l.items, (f) => {
|
|
630
|
-
var d;
|
|
631
|
-
return i(), n("div", {
|
|
632
|
-
key: f.name,
|
|
633
|
-
class: v(["adj-tabs__item", { active: f.id == ((d = l.modelValue) == null ? void 0 : d.id), disabled: f.disabled }]),
|
|
634
|
-
onClick: (b) => u(f)
|
|
635
|
-
}, [
|
|
636
|
-
o("p", null, $(f.name), 1),
|
|
637
|
-
f.number ? (i(), n("span", st, $(f.number), 1)) : H("", !0)
|
|
638
|
-
], 10, it);
|
|
639
|
-
}), 128))
|
|
640
|
-
])
|
|
641
|
-
]));
|
|
642
|
-
}
|
|
643
|
-
}), $t = /* @__PURE__ */ g(nt, [["__scopeId", "data-v-8456a19d"]]), dt = { class: "adj-upload-file__main" }, ut = { class: "adj-text-14" }, rt = /* @__PURE__ */ k({
|
|
644
|
-
__name: "AdjUploadFile",
|
|
645
|
-
props: {
|
|
646
|
-
text: {},
|
|
647
|
-
modelValue: {},
|
|
648
|
-
width: { default: 500 },
|
|
649
|
-
height: { default: 430 }
|
|
650
|
-
},
|
|
651
|
-
emits: ["update:modelValue"],
|
|
652
|
-
setup(r, { emit: e }) {
|
|
653
|
-
const t = r, a = e, u = S("refFileInput"), l = _(!1);
|
|
654
|
-
function c() {
|
|
655
|
-
var s;
|
|
656
|
-
l.value || (s = u.value) == null || s.click();
|
|
657
|
-
}
|
|
658
|
-
async function f(s) {
|
|
659
|
-
return new Promise((p, m) => {
|
|
660
|
-
const h = new FileReader();
|
|
661
|
-
h.readAsDataURL(s), h.onload = () => p(h.result), h.onerror = (w) => m(w);
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
async function d(s) {
|
|
665
|
-
if (!s)
|
|
666
|
-
return {
|
|
667
|
-
url: ""
|
|
668
|
-
};
|
|
669
|
-
const m = await (await fetch("https://api.adjutant.ru/constructor-new/upload-image", {
|
|
670
|
-
method: "POST",
|
|
671
|
-
headers: { "Content-Type": "application/json;charset=utf-8" },
|
|
672
|
-
body: JSON.stringify({
|
|
673
|
-
id: Date.now(),
|
|
674
|
-
key: "fvk34lkjf03fd93j9dfsaf0d",
|
|
675
|
-
lang: "ru",
|
|
676
|
-
testMode: !0,
|
|
677
|
-
params: s
|
|
678
|
-
})
|
|
679
|
-
})).json();
|
|
680
|
-
return {
|
|
681
|
-
url: `${m == null ? void 0 : m.result}`
|
|
682
|
-
// urlFull: `https://api.adjutant.ru/tmp/upload/constructorzakaz/${responseJson?.result}`,
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
async function b(s) {
|
|
686
|
-
var y;
|
|
687
|
-
if (!(s.files && ((y = s == null ? void 0 : s.files) == null ? void 0 : y.length) > 0))
|
|
688
|
-
return;
|
|
689
|
-
l.value = !0;
|
|
690
|
-
const p = s == null ? void 0 : s.files[0];
|
|
691
|
-
let m = p.type;
|
|
692
|
-
m === "image/svg+xml" && (m = "image/svg");
|
|
693
|
-
const h = await f(p), w = await d({
|
|
694
|
-
type: m,
|
|
695
|
-
data: h,
|
|
696
|
-
width: t.width,
|
|
697
|
-
height: t.height
|
|
698
|
-
});
|
|
699
|
-
a("update:modelValue", { ...t.modelValue, ...w }), l.value = !1;
|
|
700
|
-
}
|
|
701
|
-
return (s, p) => (i(), n("div", {
|
|
702
|
-
class: v(["adj-upload-file", { "adj-upload-file_loading": l.value }]),
|
|
703
|
-
onClick: c
|
|
704
|
-
}, [
|
|
705
|
-
o("div", dt, [
|
|
706
|
-
p[2] || (p[2] = o("i", { class: "icon-arrow-circle-up" }, null, -1)),
|
|
707
|
-
o("span", ut, $(s.modelValue.url || s.text), 1)
|
|
708
|
-
]),
|
|
709
|
-
O(o("i", {
|
|
710
|
-
class: "icon-close",
|
|
711
|
-
onClick: p[0] || (p[0] = A((m) => s.$emit("update:modelValue", { url: "" }), ["stop"]))
|
|
712
|
-
}, null, 512), [
|
|
713
|
-
[N, s.modelValue.url]
|
|
714
|
-
]),
|
|
715
|
-
o("input", {
|
|
716
|
-
id: "file",
|
|
717
|
-
ref: "refFileInput",
|
|
718
|
-
type: "file",
|
|
719
|
-
hidden: "hidden",
|
|
720
|
-
onInput: p[1] || (p[1] = (m) => b(m.target))
|
|
721
|
-
}, null, 544)
|
|
722
|
-
], 2));
|
|
723
|
-
}
|
|
724
|
-
}), Ct = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-378788cf"]]);
|
|
725
|
-
export {
|
|
726
|
-
Pe as A,
|
|
727
|
-
g as _,
|
|
728
|
-
ne as a,
|
|
729
|
-
mt as b,
|
|
730
|
-
vt as c,
|
|
731
|
-
ht as d,
|
|
732
|
-
Le as e,
|
|
733
|
-
_t as f,
|
|
734
|
-
jt as g,
|
|
735
|
-
He as h,
|
|
736
|
-
gt as i,
|
|
737
|
-
kt as j,
|
|
738
|
-
bt as k,
|
|
739
|
-
Xe as l,
|
|
740
|
-
wt as m,
|
|
741
|
-
$t as n,
|
|
742
|
-
Ct as o
|
|
743
|
-
};
|