@poni/adjutant-ui 0.0.105 → 0.0.107
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/AdjUploadFile-BNk0Ibab.js +748 -0
- package/dist/AdjUploadFile-Ddv4QCCr.cjs +1 -0
- package/dist/components/AdjFilterSelect/AdjFilterSelect.vue.d.ts +0 -1
- package/dist/components/AdjSelectModern/AdjSelectModern.vue.d.ts +13 -6
- package/dist/components.cjs +1 -1
- package/dist/components.js +6 -6
- package/dist/constructor.cjs +1 -1
- package/dist/constructor.js +365 -353
- package/dist/style.css +1 -1
- package/package.json +19 -19
- package/dist/AdjUploadFile-34R1a94_.cjs +0 -1
- package/dist/AdjUploadFile-CsU9FOzc.js +0 -705
- /package/dist/components/constructor/elements/AdjPersonalizationConfiguratorElements/{AdjPersonalizationConfiguratorElements.d.ts → AdjPersonalizationConfiguratorElements.stories.d.ts} +0 -0
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
import { defineComponent as k, openBlock as o, createElementBlock as n, normalizeClass as m, createCommentVNode as y, createElementVNode as s, toDisplayString as $, withDirectives as O, vShow as N, normalizeStyle as F, renderSlot as ee, useTemplateRef as R, ref as _, createVNode as B, Transition as Q, withCtx as L, Fragment as D, renderList as U, withModifiers as H, 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 X, 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) => (o(), n("button", {
|
|
18
|
+
class: m(["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 ? (o(), n("i", {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: m(e.iconLeft)
|
|
30
|
+
}, null, 2)) : y("", !0),
|
|
31
|
+
s("div", null, $(e.title), 1),
|
|
32
|
+
e.iconRight ? (o(), n("i", {
|
|
33
|
+
key: 1,
|
|
34
|
+
class: m(e.iconRight)
|
|
35
|
+
}, null, 2)) : y("", !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
|
+
}, vt = /* @__PURE__ */ g(fe, [["__scopeId", "data-v-602b5e80"]]), pe = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "adj-text-13"
|
|
46
|
+
}, ve = { class: "adj-checkbox__handle" }, me = {
|
|
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) => (o(), n("div", {
|
|
71
|
+
class: m(["adj-checkbox", { disabled: l.disabled }]),
|
|
72
|
+
onClick: c[0] || (c[0] = (f) => u())
|
|
73
|
+
}, [
|
|
74
|
+
l.title && l.titlePosition === "left" ? (o(), n("span", pe, $(l.title), 1)) : y("", !0),
|
|
75
|
+
s("div", ve, [
|
|
76
|
+
O((o(), n("svg", me, c[1] || (c[1] = [
|
|
77
|
+
s("rect", {
|
|
78
|
+
width: "16",
|
|
79
|
+
height: "16",
|
|
80
|
+
rx: "4"
|
|
81
|
+
}, null, -1),
|
|
82
|
+
s("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" ? (o(), n("span", he, $(l.title), 1)) : y("", !0)
|
|
88
|
+
], 2));
|
|
89
|
+
}
|
|
90
|
+
}), mt = /* @__PURE__ */ g(_e, [["__scopeId", "data-v-f8f6e87a"]]), 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) => (o(), n("div", {
|
|
99
|
+
class: m(["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-ab6451fe"]]), 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 = R("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) => (o(), n("div", {
|
|
134
|
+
ref: "refElement",
|
|
135
|
+
class: m(["adj-filter-select", [{ show: l.value, active: "id" in d.modelValue && d.modelValue.id }, d.position]])
|
|
136
|
+
}, [
|
|
137
|
+
s("div", {
|
|
138
|
+
class: "adj-filter-select__name adj-text-14",
|
|
139
|
+
onClick: b[0] || (b[0] = (i) => f())
|
|
140
|
+
}, [
|
|
141
|
+
s("span", null, $("id" in d.modelValue && d.modelValue.id ? d.modelValue.name : d.title), 1),
|
|
142
|
+
"id" in d.modelValue && d.modelValue.id ? (o(), n("i", ge)) : (o(), n("i", ke)),
|
|
143
|
+
B(Q, { name: "adj-fade" }, {
|
|
144
|
+
default: L(() => [
|
|
145
|
+
l.value ? (o(), n("div", be, [
|
|
146
|
+
B(ne, { maxHeight: "384px" }, {
|
|
147
|
+
default: L(() => [
|
|
148
|
+
s("div", null, [
|
|
149
|
+
(o(!0), n(D, null, U(d.items, (i) => (o(), n("div", {
|
|
150
|
+
key: i.id,
|
|
151
|
+
class: m(["adj-filter-select__item adj-text-14", { "adj-filter-select__item_disabled": i.disabled }]),
|
|
152
|
+
onClick: H((p) => c(i), ["stop"])
|
|
153
|
+
}, [
|
|
154
|
+
s("span", null, $(i.name), 1)
|
|
155
|
+
], 10, we))), 128))
|
|
156
|
+
])
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
})
|
|
160
|
+
])) : y("", !0)
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
})
|
|
164
|
+
])
|
|
165
|
+
], 2));
|
|
166
|
+
}
|
|
167
|
+
}), ht = /* @__PURE__ */ g($e, [["__scopeId", "data-v-6c5a9e71"]]), 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
|
+
"7aca7e46": e.width
|
|
179
|
+
})), (e, t) => (o(), n("div", {
|
|
180
|
+
class: m([
|
|
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
|
+
s("div", {
|
|
188
|
+
class: "adj-hint-desktop__text",
|
|
189
|
+
innerHTML: e.html
|
|
190
|
+
}, null, 8, Ce),
|
|
191
|
+
t[0] || (t[0] = s("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
|
+
s("path", {
|
|
200
|
+
class: "adj-hint-desktop__triangle_inner",
|
|
201
|
+
d: "M13 13L7 2L1 13H13Z"
|
|
202
|
+
}),
|
|
203
|
+
s("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-c37cada5"]]), 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
|
+
65069964: u.width
|
|
221
|
+
}));
|
|
222
|
+
const t = e;
|
|
223
|
+
function a() {
|
|
224
|
+
t("update:show", !1);
|
|
225
|
+
}
|
|
226
|
+
return (u, l) => (o(), n("div", Ve, [
|
|
227
|
+
B(Q, { name: "adj-fade" }, {
|
|
228
|
+
default: L(() => [
|
|
229
|
+
O(s("div", Ie, l[1] || (l[1] = [
|
|
230
|
+
s("div", { class: "adj-modal__background" }, null, -1)
|
|
231
|
+
]), 512), [
|
|
232
|
+
[N, u.show]
|
|
233
|
+
])
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}),
|
|
237
|
+
B(Q, { name: "adj-popup-bottom" }, {
|
|
238
|
+
default: L(() => [
|
|
239
|
+
O(s("div", {
|
|
240
|
+
class: "adj-modal_wrapper",
|
|
241
|
+
onClick: H(a, ["stop"])
|
|
242
|
+
}, [
|
|
243
|
+
s("div", {
|
|
244
|
+
class: "adj-modal__window",
|
|
245
|
+
onClick: l[0] || (l[0] = H(() => {
|
|
246
|
+
}, ["stop"]))
|
|
247
|
+
}, [
|
|
248
|
+
u.hideClose ? y("", !0) : (o(), n("div", {
|
|
249
|
+
key: 0,
|
|
250
|
+
class: "adj-modal__close icon-close",
|
|
251
|
+
onClick: H(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-921de616"]]), 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 = R("refSlot"), f = R("refHint"), d = _(0), b = _(0), { elementWidth: i, elementHeight: p } = X(c), v = _(0), h = _(80), { elementWidth: w, elementHeight: P } = X(f), V = _(e.horizontalPosition), C = _(e.verticalPosition);
|
|
274
|
+
let I = 10 + K / 2;
|
|
275
|
+
function T() {
|
|
276
|
+
(!e.modalMode || u.value >= 1200) && (S(), Z(), Y(), t.value = !0);
|
|
277
|
+
}
|
|
278
|
+
function W() {
|
|
279
|
+
(!e.modalMode || u.value >= 1200) && (t.value = !1);
|
|
280
|
+
}
|
|
281
|
+
function M() {
|
|
282
|
+
e.modalMode && u.value < 1200 && (a.value = !0);
|
|
283
|
+
}
|
|
284
|
+
function S() {
|
|
285
|
+
if (c.value !== null) {
|
|
286
|
+
const A = c.value.getBoundingClientRect();
|
|
287
|
+
d.value = A.left, b.value = A.top;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function Z() {
|
|
291
|
+
e.dark && (I = 15 + K / 2), V.value = e.horizontalPosition, C.value = e.verticalPosition, e.horizontalPosition === "left" && d.value + i.value / 2 + I - w.value < 0 ? V.value = "right" : e.horizontalPosition === "right" && d.value + i.value / 2 - I + w.value > u.value && (V.value = "left"), e.verticalPosition === "top" && b.value - J - P.value < 0 ? C.value = "bottom" : e.verticalPosition === "bottom" && b.value + p.value + J + P.value > l.value && (C.value = "top");
|
|
292
|
+
}
|
|
293
|
+
function Y() {
|
|
294
|
+
e.dark && (I = 15 + K / 2), V.value === "left" ? v.value = d.value + i.value / 2 + I - w.value : V.value === "center" ? v.value = d.value + i.value / 2 - K / 2 - w.value / 2 : V.value === "right" && (v.value = d.value + i.value / 2 - I), C.value == "top" ? h.value = b.value - J - P.value : C.value == "bottom" && (h.value = b.value + p.value + J);
|
|
295
|
+
}
|
|
296
|
+
return (A, G) => (o(), n("div", ze, [
|
|
297
|
+
s("div", {
|
|
298
|
+
class: "adj-hint__slot",
|
|
299
|
+
onMouseenter: H(T, ["stop"]),
|
|
300
|
+
onMouseleave: H(W, ["stop"]),
|
|
301
|
+
onClick: H(M, ["stop"]),
|
|
302
|
+
ref: "refSlot"
|
|
303
|
+
}, [
|
|
304
|
+
ee(A.$slots, "default", {}, void 0, !0)
|
|
305
|
+
], 544),
|
|
306
|
+
s("div", {
|
|
307
|
+
class: "adj-hint__hint",
|
|
308
|
+
style: F({
|
|
309
|
+
left: v.value + "px",
|
|
310
|
+
top: h.value + "px",
|
|
311
|
+
visibility: t.value ? "visible" : "hidden"
|
|
312
|
+
}),
|
|
313
|
+
ref: "refHint"
|
|
314
|
+
}, [
|
|
315
|
+
O(B(Pe, {
|
|
316
|
+
html: A.html,
|
|
317
|
+
horizontalPosition: V.value,
|
|
318
|
+
verticalPosition: C.value,
|
|
319
|
+
dark: A.dark,
|
|
320
|
+
width: "252px"
|
|
321
|
+
}, null, 8, ["html", "horizontalPosition", "verticalPosition", "dark"]), [
|
|
322
|
+
[N, A.html !== ""]
|
|
323
|
+
])
|
|
324
|
+
], 4),
|
|
325
|
+
B(He, {
|
|
326
|
+
show: a.value,
|
|
327
|
+
"onUpdate:show": G[0] || (G[0] = (x) => a.value = x),
|
|
328
|
+
width: "430px"
|
|
329
|
+
}, {
|
|
330
|
+
default: L(() => [
|
|
331
|
+
s("div", {
|
|
332
|
+
class: "adj-hint__modal",
|
|
333
|
+
innerHTML: A.html
|
|
334
|
+
}, null, 8, Be)
|
|
335
|
+
]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 8, ["show"])
|
|
338
|
+
]));
|
|
339
|
+
}
|
|
340
|
+
}), Le = /* @__PURE__ */ g(Me, [["__scopeId", "data-v-be48db98"]]), 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
|
+
"7fb84d06": t.value
|
|
354
|
+
}));
|
|
355
|
+
const e = r, t = te(() => e.size + "px");
|
|
356
|
+
return (a, u) => (o(), n("div", {
|
|
357
|
+
class: m(["adj-icon", {
|
|
358
|
+
[`adj-icon_${a.design}`]: !0,
|
|
359
|
+
"adj-icon_disabled": a.disabled
|
|
360
|
+
}])
|
|
361
|
+
}, [
|
|
362
|
+
B(Le, {
|
|
363
|
+
dark: !1,
|
|
364
|
+
html: a.disabled ? "" : a.tooltip,
|
|
365
|
+
horizontalPosition: a.tooltipPosition
|
|
366
|
+
}, {
|
|
367
|
+
default: L(() => [
|
|
368
|
+
s("i", {
|
|
369
|
+
class: m([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-5524b1e2"]]), 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) => (o(), n("div", {
|
|
392
|
+
class: m(["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
|
+
s("i", {
|
|
400
|
+
class: m(["adj-icon-button__icon", e.iconName])
|
|
401
|
+
}, null, 2),
|
|
402
|
+
e.qty > 0 ? (o(), n("div", Re, $(e.qty), 1)) : y("", !0)
|
|
403
|
+
], 2));
|
|
404
|
+
}
|
|
405
|
+
}), jt = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-bd9a4816"]]), 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) => (o(), n("div", {
|
|
421
|
+
class: m(["adj-radio", { "adj-radio_disabled": l.disabled }])
|
|
422
|
+
}, [
|
|
423
|
+
(o(!0), n(D, null, U(l.items, (f) => {
|
|
424
|
+
var d;
|
|
425
|
+
return o(), n("div", {
|
|
426
|
+
key: f.id,
|
|
427
|
+
class: m(["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
|
+
s("div", {
|
|
434
|
+
class: m(["adj-radio__item_button", { "adj-effect-overlay-small": !l.disabled }])
|
|
435
|
+
}, null, 2),
|
|
436
|
+
s("span", Ee, $(f.name), 1)
|
|
437
|
+
], 10, We);
|
|
438
|
+
}), 128))
|
|
439
|
+
], 2));
|
|
440
|
+
}
|
|
441
|
+
}), gt = /* @__PURE__ */ g(Fe, [["__scopeId", "data-v-1291569e"]]), 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: "left" },
|
|
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 = R("refElement");
|
|
465
|
+
ie(d, () => i.value = !1);
|
|
466
|
+
function b(j) {
|
|
467
|
+
var z;
|
|
468
|
+
i.value = !1, j.id != ((z = t.modelValue) == null ? void 0 : z.id) && a("update:modelValue", j);
|
|
469
|
+
}
|
|
470
|
+
const i = _(!1), p = R("refInput"), v = R("refItems"), h = _(0), w = _(0), { elementWidth: P, elementHeight: V } = X(p), C = _(0), I = _(80), { elementWidth: T, elementHeight: W } = X(v), M = _(t.horizontalPosition), S = _(t.verticalPosition);
|
|
471
|
+
function Z() {
|
|
472
|
+
i.value && (A(), G(), x());
|
|
473
|
+
}
|
|
474
|
+
function Y() {
|
|
475
|
+
i.value = !i.value, Z();
|
|
476
|
+
}
|
|
477
|
+
function A() {
|
|
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
|
+
M.value = t.horizontalPosition, S.value = t.verticalPosition, t.horizontalPosition === "left" && h.value + P.value < T.value ? M.value = "right" : t.horizontalPosition === "right" && T.value > c.value - h.value && (M.value = "left"), t.verticalPosition === "top" && w.value - W.value < 0 ? S.value = "bottom" : t.verticalPosition === "bottom" && w.value + V.value + W.value > f.value && (S.value = "top");
|
|
485
|
+
}
|
|
486
|
+
function x() {
|
|
487
|
+
M.value === "left" ? C.value = h.value + P.value - T.value : M.value === "center" ? C.value = h.value + P.value / 2 - T.value / 2 : M.value === "right" && (C.value = h.value), S.value == "top" ? I.value = w.value - W.value : S.value == "bottom" && (I.value = w.value + V.value);
|
|
488
|
+
}
|
|
489
|
+
return (j, z) => {
|
|
490
|
+
var le, ae, oe;
|
|
491
|
+
return o(), n("div", {
|
|
492
|
+
ref: "refElement",
|
|
493
|
+
class: m([
|
|
494
|
+
"adj-select-modern",
|
|
495
|
+
"adj-text-14",
|
|
496
|
+
j.horizontalPosition,
|
|
497
|
+
`adj-select-modern_${j.design}`,
|
|
498
|
+
{ showItems: i.value }
|
|
499
|
+
])
|
|
500
|
+
}, [
|
|
501
|
+
s("div", {
|
|
502
|
+
ref: "refInput",
|
|
503
|
+
class: "adj-input adj-text-14",
|
|
504
|
+
onClick: H(Y, ["stop"])
|
|
505
|
+
}, [
|
|
506
|
+
j.design === "image" ? (o(), n("div", Oe, [
|
|
507
|
+
s("img", {
|
|
508
|
+
src: (le = j.modelValue) == null ? void 0 : le.image,
|
|
509
|
+
alt: ""
|
|
510
|
+
}, null, 8, Ne),
|
|
511
|
+
z[0] || (z[0] = s("div", { class: "adj-input__border" }, null, -1))
|
|
512
|
+
])) : j.design === "background" ? (o(), 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)) : y("", !0),
|
|
517
|
+
s("span", De, $((oe = j.modelValue) == null ? void 0 : oe.name), 1),
|
|
518
|
+
z[1] || (z[1] = s("i", { class: "adj-input__icon icon-arrow-down" }, null, -1))
|
|
519
|
+
], 512),
|
|
520
|
+
B(Q, { name: "adj-fade" }, {
|
|
521
|
+
default: L(() => [
|
|
522
|
+
i.value ? (o(), n("div", {
|
|
523
|
+
key: 0,
|
|
524
|
+
class: "adj-select-modern__items adj-effect-overlay-big",
|
|
525
|
+
style: F({
|
|
526
|
+
left: C.value + "px",
|
|
527
|
+
top: I.value + "px",
|
|
528
|
+
visibility: i.value ? "visible" : "hidden"
|
|
529
|
+
}),
|
|
530
|
+
ref: "refItems"
|
|
531
|
+
}, [
|
|
532
|
+
B(ne, { maxHeight: "384px" }, {
|
|
533
|
+
default: L(() => [
|
|
534
|
+
s("div", null, [
|
|
535
|
+
(o(!0), n(D, null, U(j.items, (E) => (o(), n("div", {
|
|
536
|
+
key: E.id,
|
|
537
|
+
class: "adj-select-modern__item adj-text-14",
|
|
538
|
+
onClick: H((ct) => b(E), ["stop"])
|
|
539
|
+
}, [
|
|
540
|
+
j.design === "image" ? (o(), n("div", qe, [
|
|
541
|
+
s("img", {
|
|
542
|
+
src: E.image,
|
|
543
|
+
alt: ""
|
|
544
|
+
}, null, 8, Ze),
|
|
545
|
+
z[2] || (z[2] = s("div", { class: "adj-select-modern__item-border" }, null, -1))
|
|
546
|
+
])) : j.design === "background" ? (o(), n("div", {
|
|
547
|
+
key: 1,
|
|
548
|
+
class: "adj-select-modern__item-image",
|
|
549
|
+
style: F({ background: E.background })
|
|
550
|
+
}, null, 4)) : y("", !0),
|
|
551
|
+
s("span", Ge, $(E.name), 1)
|
|
552
|
+
], 8, Ue))), 128))
|
|
553
|
+
])
|
|
554
|
+
]),
|
|
555
|
+
_: 1
|
|
556
|
+
})
|
|
557
|
+
], 4)) : y("", !0)
|
|
558
|
+
]),
|
|
559
|
+
_: 1
|
|
560
|
+
})
|
|
561
|
+
], 2);
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
}), kt = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-a7ad985a"]]), Ke = { class: "adj-skeleton-item" }, Qe = /* @__PURE__ */ k({
|
|
565
|
+
__name: "AdjSkeletonItem",
|
|
566
|
+
props: {
|
|
567
|
+
width: { default: "100%" },
|
|
568
|
+
height: { default: "unset" },
|
|
569
|
+
aspectRatio: { default: "unset" },
|
|
570
|
+
marginTop: { default: "0px" }
|
|
571
|
+
},
|
|
572
|
+
setup(r) {
|
|
573
|
+
q((a) => ({
|
|
574
|
+
"73b36252": a.width,
|
|
575
|
+
"5f18ed58": a.marginTop,
|
|
576
|
+
ac595bde: t.value,
|
|
577
|
+
"3656db94": a.height
|
|
578
|
+
}));
|
|
579
|
+
const e = r, t = te(() => e.height !== "unset" ? "unset" : e.aspectRatio);
|
|
580
|
+
return (a, u) => (o(), n("div", Ke));
|
|
581
|
+
}
|
|
582
|
+
}), Xe = /* @__PURE__ */ g(Qe, [["__scopeId", "data-v-c6820958"]]), Ye = { class: "adj-skeleton" }, xe = /* @__PURE__ */ k({
|
|
583
|
+
__name: "AdjSkeleton",
|
|
584
|
+
props: {
|
|
585
|
+
loaders: { default: () => [] },
|
|
586
|
+
width: { default: "100%" },
|
|
587
|
+
centered: { type: Boolean, default: !1 }
|
|
588
|
+
},
|
|
589
|
+
setup(r) {
|
|
590
|
+
q((a) => ({
|
|
591
|
+
c2e40cd4: t.value,
|
|
592
|
+
"019b6ab8": a.width
|
|
593
|
+
}));
|
|
594
|
+
const e = r, t = te(() => e.centered ? "center" : "unset");
|
|
595
|
+
return (a, u) => (o(), n("div", Ye, [
|
|
596
|
+
(o(!0), n(D, null, U(a.loaders, (l) => (o(), re(Xe, {
|
|
597
|
+
width: l.width,
|
|
598
|
+
height: l.height,
|
|
599
|
+
"aspect-ratio": l.aspectRatio,
|
|
600
|
+
"margin-top": l.marginTop
|
|
601
|
+
}, null, 8, ["width", "height", "aspect-ratio", "margin-top"]))), 256))
|
|
602
|
+
]));
|
|
603
|
+
}
|
|
604
|
+
}), bt = /* @__PURE__ */ g(xe, [["__scopeId", "data-v-080d9f14"]]), et = {}, tt = {
|
|
605
|
+
viewBox: "0 0 34 34",
|
|
606
|
+
fill: "none",
|
|
607
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
608
|
+
};
|
|
609
|
+
function lt(r, e) {
|
|
610
|
+
return o(), n("svg", tt, e[0] || (e[0] = [
|
|
611
|
+
s("circle", {
|
|
612
|
+
cx: "17",
|
|
613
|
+
cy: "17",
|
|
614
|
+
r: "16.5"
|
|
615
|
+
}, null, -1),
|
|
616
|
+
s("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)
|
|
617
|
+
]));
|
|
618
|
+
}
|
|
619
|
+
const wt = /* @__PURE__ */ g(et, [["render", lt], ["__scopeId", "data-v-f04662e9"]]), at = { class: "adj-tabs" }, ot = { class: "adj-tabs-wrapper" }, it = ["onClick"], st = { key: 0 }, nt = /* @__PURE__ */ k({
|
|
620
|
+
__name: "AdjTabs",
|
|
621
|
+
props: {
|
|
622
|
+
items: { default: () => [] },
|
|
623
|
+
modelValue: {}
|
|
624
|
+
},
|
|
625
|
+
emits: ["update:modelValue"],
|
|
626
|
+
setup(r, { emit: e }) {
|
|
627
|
+
const t = r, a = e;
|
|
628
|
+
function u(l) {
|
|
629
|
+
var c;
|
|
630
|
+
!l.disabled && l.id !== ((c = t.modelValue) == null ? void 0 : c.id) && a("update:modelValue", l);
|
|
631
|
+
}
|
|
632
|
+
return (l, c) => (o(), n("div", at, [
|
|
633
|
+
s("div", ot, [
|
|
634
|
+
(o(!0), n(D, null, U(l.items, (f) => {
|
|
635
|
+
var d;
|
|
636
|
+
return o(), n("div", {
|
|
637
|
+
key: f.name,
|
|
638
|
+
class: m(["adj-tabs__item", { active: f.id == ((d = l.modelValue) == null ? void 0 : d.id), disabled: f.disabled }]),
|
|
639
|
+
onClick: (b) => u(f)
|
|
640
|
+
}, [
|
|
641
|
+
s("p", null, $(f.name), 1),
|
|
642
|
+
f.number ? (o(), n("span", st, $(f.number), 1)) : y("", !0)
|
|
643
|
+
], 10, it);
|
|
644
|
+
}), 128))
|
|
645
|
+
])
|
|
646
|
+
]));
|
|
647
|
+
}
|
|
648
|
+
}), $t = /* @__PURE__ */ g(nt, [["__scopeId", "data-v-fcf34a9c"]]), dt = { class: "adj-upload-file__main" }, ut = { class: "adj-text-14" }, rt = /* @__PURE__ */ k({
|
|
649
|
+
__name: "AdjUploadFile",
|
|
650
|
+
props: {
|
|
651
|
+
text: {},
|
|
652
|
+
modelValue: {},
|
|
653
|
+
width: { default: 500 },
|
|
654
|
+
height: { default: 430 }
|
|
655
|
+
},
|
|
656
|
+
emits: ["update:modelValue"],
|
|
657
|
+
setup(r, { emit: e }) {
|
|
658
|
+
const t = r, a = e, u = R("refFileInput"), l = _(!1);
|
|
659
|
+
function c() {
|
|
660
|
+
var i;
|
|
661
|
+
l.value || (i = u.value) == null || i.click();
|
|
662
|
+
}
|
|
663
|
+
async function f(i) {
|
|
664
|
+
return new Promise((p, v) => {
|
|
665
|
+
const h = new FileReader();
|
|
666
|
+
h.readAsDataURL(i), h.onload = () => p(h.result), h.onerror = (w) => v(w);
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
async function d(i) {
|
|
670
|
+
if (!i)
|
|
671
|
+
return {
|
|
672
|
+
url: ""
|
|
673
|
+
};
|
|
674
|
+
const v = await (await fetch("https://api.adjutant.ru/constructor-new/upload-image", {
|
|
675
|
+
method: "POST",
|
|
676
|
+
headers: { "Content-Type": "application/json;charset=utf-8" },
|
|
677
|
+
body: JSON.stringify({
|
|
678
|
+
id: Date.now(),
|
|
679
|
+
key: "fvk34lkjf03fd93j9dfsaf0d",
|
|
680
|
+
lang: "ru",
|
|
681
|
+
testMode: !0,
|
|
682
|
+
params: i
|
|
683
|
+
})
|
|
684
|
+
})).json();
|
|
685
|
+
return {
|
|
686
|
+
url: `${v == null ? void 0 : v.result}`
|
|
687
|
+
// urlFull: `https://api.adjutant.ru/tmp/upload/constructorzakaz/${responseJson?.result}`,
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
async function b(i) {
|
|
691
|
+
var P;
|
|
692
|
+
if (!(i.files && ((P = i == null ? void 0 : i.files) == null ? void 0 : P.length) > 0))
|
|
693
|
+
return;
|
|
694
|
+
l.value = !0;
|
|
695
|
+
const p = i == null ? void 0 : i.files[0];
|
|
696
|
+
let v = p.type;
|
|
697
|
+
v === "image/svg+xml" && (v = "image/svg");
|
|
698
|
+
const h = await f(p), w = await d({
|
|
699
|
+
type: v,
|
|
700
|
+
data: h,
|
|
701
|
+
width: t.width,
|
|
702
|
+
height: t.height
|
|
703
|
+
});
|
|
704
|
+
a("update:modelValue", { ...t.modelValue, ...w }), l.value = !1;
|
|
705
|
+
}
|
|
706
|
+
return (i, p) => (o(), n("div", {
|
|
707
|
+
class: m(["adj-upload-file", { "adj-upload-file_loading": l.value }]),
|
|
708
|
+
onClick: c
|
|
709
|
+
}, [
|
|
710
|
+
s("div", dt, [
|
|
711
|
+
p[2] || (p[2] = s("i", { class: "icon-arrow-circle-up" }, null, -1)),
|
|
712
|
+
s("span", ut, $(i.modelValue.url || i.text), 1)
|
|
713
|
+
]),
|
|
714
|
+
O(s("i", {
|
|
715
|
+
class: "icon-close",
|
|
716
|
+
onClick: p[0] || (p[0] = H((v) => i.$emit("update:modelValue", { url: "" }), ["stop"]))
|
|
717
|
+
}, null, 512), [
|
|
718
|
+
[N, i.modelValue.url]
|
|
719
|
+
]),
|
|
720
|
+
s("input", {
|
|
721
|
+
id: "file",
|
|
722
|
+
ref: "refFileInput",
|
|
723
|
+
type: "file",
|
|
724
|
+
hidden: "hidden",
|
|
725
|
+
onInput: p[1] || (p[1] = (v) => b(v.target))
|
|
726
|
+
}, null, 544)
|
|
727
|
+
], 2));
|
|
728
|
+
}
|
|
729
|
+
}), Ct = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-a4227077"]]);
|
|
730
|
+
export {
|
|
731
|
+
Pe as A,
|
|
732
|
+
g as _,
|
|
733
|
+
ne as a,
|
|
734
|
+
vt as b,
|
|
735
|
+
mt as c,
|
|
736
|
+
ht as d,
|
|
737
|
+
Le as e,
|
|
738
|
+
_t as f,
|
|
739
|
+
jt as g,
|
|
740
|
+
He as h,
|
|
741
|
+
gt as i,
|
|
742
|
+
kt as j,
|
|
743
|
+
bt as k,
|
|
744
|
+
Xe as l,
|
|
745
|
+
wt as m,
|
|
746
|
+
$t as n,
|
|
747
|
+
Ct as o
|
|
748
|
+
};
|