@studio-west/employees 0.6.54 → 0.6.55
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/SwButton-85-tKHA7-BpZ2q9aj.cjs +1 -0
- package/dist/SwButton-85-tKHA7-D0loTJgt.js +33 -0
- package/dist/SwCollapse-CuN3EbT6-1y2PMRQ8.cjs +1 -0
- package/dist/SwCollapse-CuN3EbT6-Bp57Ya_9.js +33 -0
- package/dist/SwDatePicker-C-UmCyTm-CTOiwZL1.cjs +1 -0
- package/dist/SwDatePicker-C-UmCyTm-Co9VaGQR.js +369 -0
- package/dist/SwDropdown-DQGTnnKw-BltvlnsL.cjs +1 -0
- package/dist/SwDropdown-DQGTnnKw-CJPDuCfV.js +111 -0
- package/dist/SwDropdownItem-Db2TXRVI-BcLri1T3.js +31 -0
- package/dist/SwDropdownItem-Db2TXRVI-DHp91ADz.cjs +1 -0
- package/dist/SwDropdownNew-CYfjZFd2-DIv6p-6i.cjs +1 -0
- package/dist/SwDropdownNew-CYfjZFd2-nlDq08DL.js +107 -0
- package/dist/SwFormItem-CaA4jsoa-6C3zw4iZ.js +24 -0
- package/dist/SwFormItem-CaA4jsoa-MFTEfPiY.cjs +1 -0
- package/dist/SwGide-Bv05X9FW-BTqybd7p.cjs +1 -0
- package/dist/SwGide-Bv05X9FW-XUYykhog.js +145 -0
- package/dist/SwInput-B1hD3QYw-DaqUVUBC.cjs +1 -0
- package/dist/SwInput-B1hD3QYw-zCu7Xl3k.js +91 -0
- package/dist/SwMessage-D24ZbJyd-B0sGfA92.js +60 -0
- package/dist/SwMessage-D24ZbJyd-hmjlb3jg.cjs +1 -0
- package/dist/SwSection-D8ooQ21I-DkmOwvIl.js +37 -0
- package/dist/SwSection-D8ooQ21I-Nsa_5V1p.cjs +1 -0
- package/dist/SwSelect-C2RKinez-BD70YvFF.js +71 -0
- package/dist/SwSelect-C2RKinez-KweWYzRe.cjs +1 -0
- package/dist/SwSkeleton-B7ysp8L9-DnocmEnE.js +26 -0
- package/dist/SwSkeleton-B7ysp8L9-RJwRbv_K.cjs +1 -0
- package/dist/SwSkeletonItem-CU7LvihY-BJmW7U8Z.cjs +1 -0
- package/dist/SwSkeletonItem-CU7LvihY-DdKyY6kY.js +29 -0
- package/dist/SwSlider-B8ah3WJf-DFs0WIbH.js +160 -0
- package/dist/SwSlider-B8ah3WJf-eotQC_I3.cjs +1 -0
- package/dist/SwSwitch-6rl1IT4p-BQTT__wH.cjs +1 -0
- package/dist/SwSwitch-6rl1IT4p-Cq2vi3fZ.js +47 -0
- package/dist/SwTable-BKZ5idCi-BMDZ1otG.cjs +1 -0
- package/dist/SwTable-BKZ5idCi-DEX2rFo2.js +152 -0
- package/dist/SwTableColumn-BLF5bPuJ-CHI10OyO.js +28 -0
- package/dist/SwTableColumn-BLF5bPuJ-CbuAoznO.cjs +1 -0
- package/dist/SwTabs-DkSI4oAh-By6KQ_XO.cjs +1 -0
- package/dist/SwTabs-DkSI4oAh-VaIFmFrU.js +38 -0
- package/dist/SwTabsPane-Dwtj8g7T-BUCrffEQ.cjs +1 -0
- package/dist/SwTabsPane-Dwtj8g7T-Dpg9j8nR.js +38 -0
- package/dist/VacationTable-3jJUSDHf.cjs +1 -0
- package/dist/VacationTable-GeJlpGuk.js +839 -0
- package/dist/VacationTable.cjs +1 -1
- package/dist/VacationTable.js +9 -726
- package/dist/employees.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { mergeModels as T, useModel as V, ref as m, computed as _, watchEffect as N, createElementBlock as E, onMounted as O, onUnmounted as H, openBlock as f, withModifiers as y, normalizeClass as M, renderSlot as L, createBlock as q, Teleport as D, createCommentVNode as F, normalizeStyle as U, unref as X } from "vue";
|
|
2
|
+
const Y = ["id"], A = {
|
|
3
|
+
__name: "SwDropdownNew",
|
|
4
|
+
props: /* @__PURE__ */ T({
|
|
5
|
+
class: { type: String, default: "" },
|
|
6
|
+
type: { type: String, default: "" },
|
|
7
|
+
trigger: { type: String, default: "click" },
|
|
8
|
+
placement: { type: String, default: "bottom-left" },
|
|
9
|
+
maxWidth: { type: Number, default: 0 }
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(g, { expose: S }) {
|
|
16
|
+
const a = g, r = V(g, "modelValue"), v = m(null), p = m(null), b = m({}), z = Math.ceil(Math.random() * 1e3), u = m(0), W = _(
|
|
17
|
+
() => {
|
|
18
|
+
let d = ["sw-dropdown"];
|
|
19
|
+
return a.type.length > 0 && d.push("sw-" + a.type), d;
|
|
20
|
+
}
|
|
21
|
+
), k = new ResizeObserver(() => {
|
|
22
|
+
r.value && u.value++, u.value > 99 && (u.value = 1);
|
|
23
|
+
});
|
|
24
|
+
N(
|
|
25
|
+
() => {
|
|
26
|
+
if (!r.value || !p.value || !v.value)
|
|
27
|
+
return;
|
|
28
|
+
u.value < 2 && k.observe(p.value);
|
|
29
|
+
let d = window.pageYOffset || document.documentElement.scrollTop, n = window.pageXOffset || document.documentElement.scrollLeft;
|
|
30
|
+
document.body.style.position = "fixed", document.body.style.top = `-${d}px`, document.body.style.left = `-${n}px`, document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.documentElement.scrollTop = d, document.documentElement.scrollLeft = n;
|
|
31
|
+
const o = v.value.getBoundingClientRect();
|
|
32
|
+
let w = window.innerWidth, R = window.innerHeight, i = p.value.offsetHeight, l = p.value.offsetWidth, e = o.left + o.width / 2 + n, t = o.top + o.height / 2 + d, s = o.height / 2 + 8;
|
|
33
|
+
const [B, h] = a.placement.split("-", 2);
|
|
34
|
+
switch (B) {
|
|
35
|
+
case "bottom":
|
|
36
|
+
t = d + R - i - s - 8 < t ? t - s - i : t + s, h === void 0 && (e -= l / 2);
|
|
37
|
+
break;
|
|
38
|
+
case "top":
|
|
39
|
+
t = d + i + s + 8 > t ? t + s : t - s - i, h === void 0 && (e -= l / 2);
|
|
40
|
+
break;
|
|
41
|
+
case "left":
|
|
42
|
+
e - l - o.width / 2 - 8 < 0 ? e + o.width / 2 + 8 + l < w ? (e = e + o.width / 2 + 8, t = t - i / 2) : (t = d + i + s + 8 > t ? t + s : t - s - i, e = e + o.width / 2 < w ? e + o.width / 2 - l : e - l / 2) : (e = e - l - o.width / 2 - 8, t = t - i / 2);
|
|
43
|
+
break;
|
|
44
|
+
case "right":
|
|
45
|
+
e + o.width / 2 + 8 + l > w ? e - l - o.width / 2 - 8 > 0 ? (e = e - l - o.width / 2 - 8, t = t - i / 2) : (t = d + i + s + 8 > t ? t + s : t - s - i, e = e - o.width / 2) : (e = e + o.width / 2 + 8, t = t - i / 2);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
switch (h) {
|
|
49
|
+
case "left":
|
|
50
|
+
e = n + w - 8 > e - o.width / 2 + l ? e - o.width / 2 : e - l + o.width / 2;
|
|
51
|
+
break;
|
|
52
|
+
case "right":
|
|
53
|
+
e = 8 < e + o.width / 2 - l ? e - l + o.width / 2 : e - o.width / 2;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
e < 0 && (e = 0), t < 0 && (t = 0), b.value = {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: `${t}px`,
|
|
59
|
+
left: `${e}px`,
|
|
60
|
+
maxWidth: a.maxWidth > 0 ? `${a.maxWidth}px` : ""
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
{ flush: "post" }
|
|
64
|
+
);
|
|
65
|
+
const $ = () => {
|
|
66
|
+
a.trigger === "click" && (r.value = !r.value);
|
|
67
|
+
}, x = () => {
|
|
68
|
+
a.trigger === "hover" && (r.value = !r.value);
|
|
69
|
+
}, C = () => {
|
|
70
|
+
a.trigger === "context" && (r.value = !r.value);
|
|
71
|
+
}, c = () => {
|
|
72
|
+
r.value && u.value++, u.value > 99 && (u.value = 1);
|
|
73
|
+
};
|
|
74
|
+
return S({ handleResize: c }), O(() => {
|
|
75
|
+
window.addEventListener("resize", c), window.onscrollend !== void 0 ? window.addEventListener("scrollend", c) : window.addEventListener("scroll", c);
|
|
76
|
+
}), H(() => {
|
|
77
|
+
k.disconnect(), window.removeEventListener("resize", c), window.onscrollend !== void 0 ? window.removeEventListener("scrollend", c) : window.removeEventListener("scroll", c);
|
|
78
|
+
}), (d, n) => (f(), E("div", {
|
|
79
|
+
class: M(W.value),
|
|
80
|
+
onClick: n[0] || (n[0] = (o) => $()),
|
|
81
|
+
onMouseover: n[1] || (n[1] = y((o) => x(), ["stop"])),
|
|
82
|
+
onMouseleave: n[2] || (n[2] = y((o) => x(), ["stop"])),
|
|
83
|
+
onContextmenu: n[3] || (n[3] = y((o) => C(), ["stop"])),
|
|
84
|
+
ref_key: "dropdownRef",
|
|
85
|
+
ref: v
|
|
86
|
+
}, [
|
|
87
|
+
L(d.$slots, "default"),
|
|
88
|
+
(f(), q(D, { to: "body" }, [
|
|
89
|
+
r.value ? (f(), E("ul", {
|
|
90
|
+
key: 0,
|
|
91
|
+
popover: "",
|
|
92
|
+
ref_key: "popupRef",
|
|
93
|
+
ref: p,
|
|
94
|
+
id: X(z),
|
|
95
|
+
class: M(["sw-dropdown-popup", a.class]),
|
|
96
|
+
style: U(b.value),
|
|
97
|
+
tabindex: "-1"
|
|
98
|
+
}, [
|
|
99
|
+
L(d.$slots, "dropdown")
|
|
100
|
+
], 14, Y)) : F("", !0)
|
|
101
|
+
]))
|
|
102
|
+
], 34));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
A as default
|
|
107
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { computed as r, createElementBlock as o, openBlock as a, normalizeClass as p, renderSlot as n } from "vue";
|
|
2
|
+
const u = {
|
|
3
|
+
__name: "SwFormItem",
|
|
4
|
+
props: {
|
|
5
|
+
class: { type: String, default: "" },
|
|
6
|
+
type: { type: String, default: "" }
|
|
7
|
+
},
|
|
8
|
+
setup(s) {
|
|
9
|
+
const t = s, l = r(
|
|
10
|
+
() => {
|
|
11
|
+
let e = ["sw-form-item"];
|
|
12
|
+
return t.type.length > 0 && e.push("sw-" + t.type), t.class.length > 0 && e.push(t.class), e;
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
return (e, c) => (a(), o("div", {
|
|
16
|
+
class: p(l.value)
|
|
17
|
+
}, [
|
|
18
|
+
n(e.$slots, "default")
|
|
19
|
+
], 2));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
u as default
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o={__name:"SwFormItem",props:{class:{type:String,default:""},type:{type:String,default:""}},setup(s){const l=s,r=t.computed(()=>{let e=["sw-form-item"];return l.type.length>0&&e.push("sw-"+l.type),l.class.length>0&&e.push(l.class),e});return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.value)},[t.renderSlot(e.$slots,"default")],2))}};exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./SwDropdown-DQGTnnKw-BltvlnsL.cjs"),c=require("./SwButton-85-tKHA7-BpZ2q9aj.cjs"),x=require("./VacationTable-3jJUSDHf.cjs"),E=["src"],N={__name:"SwGide",props:e.mergeModels({steps:{type:Array,default:()=>[]},iconClose:{type:String,default:""},maxWidth:{type:Number,default:250}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(i,{emit:g}){const s=e.ref(null),m=e.ref(!0),a=e.ref(null),n=e.useModel(i,"modelValue"),y=g,r=i,p=()=>y("close"),v=l=>{const t=n.value+l;t<0?n.value=0:t>=r.steps.length?p():n.value=t};let d=!1;const h=l=>{const t=l.getBoundingClientRect(),o=window.innerHeight;t.top<5?(d=!0,document.documentElement.scrollTop+=t.top-5):t.bottom>o-5&&(d=!0,document.documentElement.scrollTop+=t.bottom-o+5)},u=()=>{if(!a.value||!s.value)return;const l=a.value.getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft;s.value.style.gridTemplateRows=`${l.top+t-5}px ${l.height+10}px 1fr`,s.value.style.gridTemplateColumns=`${l.left+o-5}px ${l.width+10}px 1fr`,s.value.style.height=document.documentElement.scrollHeight+"px"};return e.watchEffect(l=>{var w;if(!s.value)return;const t=(w=r.steps[n.value])==null?void 0:w.tag;if(!t||!t.trim()){s.value.style.gridTemplateRows="40% 0 1fr",s.value.style.gridTemplateColumns="1fr 0 1fr",s.value.style.height=document.documentElement.scrollHeight+"px";return}if(a.value=document.querySelector(t),!a.value){console.warn(`[SwGuide] Элемент не найден: ${t}`);return}h(a.value);const o=()=>{if(d){d=!1;return}u()};u();const f=new ResizeObserver(u);f.observe(a.value),window.addEventListener("resize",o),window.addEventListener("scroll",o,{passive:!0}),l(()=>{f.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("scroll",o)})}),e.onMounted(()=>window.onload=()=>{var l;return a.value=document.querySelector((l=r.steps[n.value])==null?void 0:l.tag)}),(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:"sw-gide",ref_key:"swGide",ref:s},[t[6]||(t[6]=e.createElementVNode("div",{class:"overlay0"},null,-1)),t[7]||(t[7]=e.createElementVNode("div",{class:"overlay1"},null,-1)),e.createVNode(V.default,{class:"gide",trigger:"none",placement:r.steps[n.value].placement,modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=o=>m.value=o),maxWidth:r.maxWidth},{dropdown:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(l.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(r.steps[n.value].header)+" ",1),e.createVNode(c.default,{type:"primary",link:"",onClick:p},{default:e.withCtx(()=>[e.createVNode(x.g,{"icon-class":r.iconClose},null,8,["icon-class"])]),_:1})])]),e.renderSlot(l.$slots,"default",{},()=>{var o;return[e.createElementVNode("div",null,e.toDisplayString(r.steps[n.value].text),1),e.createElementVNode("img",{class:e.normalizeClass(/left/.test((o=r.steps[n.value])==null?void 0:o.placement)?"reflect":null),src:r.steps[n.value].img},null,10,E)]}),e.createElementVNode("footer",null,[e.renderSlot(l.$slots,"footer",{},()=>[e.createVNode(c.default,{type:n.value===0?"info":"warning",text:"",link:"",onClick:t[0]||(t[0]=o=>v(-1))},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[3]||(t[3]=e.createTextVNode("‹",-1))])]),_:3},8,["type"]),e.createVNode(c.default,{type:"success",onClick:t[1]||(t[1]=o=>v(1)),text:"",link:"",class:"sw-revers"},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[4]||(t[4]=e.createTextVNode("‹",-1))])]),_:3})])])]),default:e.withCtx(()=>[t[5]||(t[5]=e.createElementVNode("div",{class:"hole"},null,-1))]),_:3},8,["placement","modelValue","maxWidth"]),t[8]||(t[8]=e.createElementVNode("div",{class:"overlay2"},null,-1)),t[9]||(t[9]=e.createElementVNode("div",{class:"overlay3"},null,-1))],512))}};exports.default=N;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { mergeModels as $, ref as p, useModel as S, createElementBlock as _, watchEffect as b, onMounted as B, openBlock as L, createElementVNode as r, createVNode as u, withCtx as i, renderSlot as d, createTextVNode as v, toDisplayString as C, normalizeClass as N } from "vue";
|
|
2
|
+
import R from "./SwDropdown-DQGTnnKw-CJPDuCfV.js";
|
|
3
|
+
import f from "./SwButton-85-tKHA7-D0loTJgt.js";
|
|
4
|
+
import { g as z } from "./VacationTable-GeJlpGuk.js";
|
|
5
|
+
const G = ["src"], O = {
|
|
6
|
+
__name: "SwGide",
|
|
7
|
+
props: /* @__PURE__ */ $({
|
|
8
|
+
steps: { type: Array, default: () => [] },
|
|
9
|
+
iconClose: { type: String, default: "" },
|
|
10
|
+
maxWidth: { type: Number, default: 250 }
|
|
11
|
+
}, {
|
|
12
|
+
modelValue: { type: Number, default: 0 },
|
|
13
|
+
modelModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: /* @__PURE__ */ $(["close"], ["update:modelValue"]),
|
|
16
|
+
setup(g, { emit: k }) {
|
|
17
|
+
const n = p(null), w = p(!0), a = p(null), o = S(g, "modelValue"), T = k, s = g, y = () => T("close"), h = (l) => {
|
|
18
|
+
const e = o.value + l;
|
|
19
|
+
e < 0 ? o.value = 0 : e >= s.steps.length ? y() : o.value = e;
|
|
20
|
+
};
|
|
21
|
+
let c = !1;
|
|
22
|
+
const V = (l) => {
|
|
23
|
+
const e = l.getBoundingClientRect(), t = window.innerHeight;
|
|
24
|
+
e.top < 5 ? (c = !0, document.documentElement.scrollTop += e.top - 5) : e.bottom > t - 5 && (c = !0, document.documentElement.scrollTop += e.bottom - t + 5);
|
|
25
|
+
}, m = () => {
|
|
26
|
+
if (!a.value || !n.value) return;
|
|
27
|
+
const l = a.value.getBoundingClientRect(), e = window.pageYOffset || document.documentElement.scrollTop, t = window.pageXOffset || document.documentElement.scrollLeft;
|
|
28
|
+
n.value.style.gridTemplateRows = `${l.top + e - 5}px ${l.height + 10}px 1fr`, n.value.style.gridTemplateColumns = `${l.left + t - 5}px ${l.width + 10}px 1fr`, n.value.style.height = document.documentElement.scrollHeight + "px";
|
|
29
|
+
};
|
|
30
|
+
return b((l) => {
|
|
31
|
+
var E;
|
|
32
|
+
if (!n.value) return;
|
|
33
|
+
const e = (E = s.steps[o.value]) == null ? void 0 : E.tag;
|
|
34
|
+
if (!e || !e.trim()) {
|
|
35
|
+
n.value.style.gridTemplateRows = "40% 0 1fr", n.value.style.gridTemplateColumns = "1fr 0 1fr", n.value.style.height = document.documentElement.scrollHeight + "px";
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (a.value = document.querySelector(e), !a.value) {
|
|
39
|
+
console.warn(`[SwGuide] Элемент не найден: ${e}`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
V(a.value);
|
|
43
|
+
const t = () => {
|
|
44
|
+
if (c) {
|
|
45
|
+
c = !1;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
m();
|
|
49
|
+
};
|
|
50
|
+
m();
|
|
51
|
+
const x = new ResizeObserver(m);
|
|
52
|
+
x.observe(a.value), window.addEventListener("resize", t), window.addEventListener("scroll", t, { passive: !0 }), l(() => {
|
|
53
|
+
x.disconnect(), window.removeEventListener("resize", t), window.removeEventListener("scroll", t);
|
|
54
|
+
});
|
|
55
|
+
}), B(() => window.onload = () => {
|
|
56
|
+
var l;
|
|
57
|
+
return a.value = document.querySelector((l = s.steps[o.value]) == null ? void 0 : l.tag);
|
|
58
|
+
}), (l, e) => (L(), _("div", {
|
|
59
|
+
class: "sw-gide",
|
|
60
|
+
ref_key: "swGide",
|
|
61
|
+
ref: n
|
|
62
|
+
}, [
|
|
63
|
+
e[6] || (e[6] = r("div", { class: "overlay0" }, null, -1)),
|
|
64
|
+
e[7] || (e[7] = r("div", { class: "overlay1" }, null, -1)),
|
|
65
|
+
u(R, {
|
|
66
|
+
class: "gide",
|
|
67
|
+
trigger: "none",
|
|
68
|
+
placement: s.steps[o.value].placement,
|
|
69
|
+
modelValue: w.value,
|
|
70
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => w.value = t),
|
|
71
|
+
maxWidth: s.maxWidth
|
|
72
|
+
}, {
|
|
73
|
+
dropdown: i(() => [
|
|
74
|
+
r("header", null, [
|
|
75
|
+
d(l.$slots, "header", {}, () => [
|
|
76
|
+
v(C(s.steps[o.value].header) + " ", 1),
|
|
77
|
+
u(f, {
|
|
78
|
+
type: "primary",
|
|
79
|
+
link: "",
|
|
80
|
+
onClick: y
|
|
81
|
+
}, {
|
|
82
|
+
default: i(() => [
|
|
83
|
+
u(z, {
|
|
84
|
+
"icon-class": s.iconClose
|
|
85
|
+
}, null, 8, ["icon-class"])
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
})
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
d(l.$slots, "default", {}, () => {
|
|
92
|
+
var t;
|
|
93
|
+
return [
|
|
94
|
+
r("div", null, C(s.steps[o.value].text), 1),
|
|
95
|
+
r("img", {
|
|
96
|
+
class: N(/left/.test((t = s.steps[o.value]) == null ? void 0 : t.placement) ? "reflect" : null),
|
|
97
|
+
src: s.steps[o.value].img
|
|
98
|
+
}, null, 10, G)
|
|
99
|
+
];
|
|
100
|
+
}),
|
|
101
|
+
r("footer", null, [
|
|
102
|
+
d(l.$slots, "footer", {}, () => [
|
|
103
|
+
u(f, {
|
|
104
|
+
type: o.value === 0 ? "info" : "warning",
|
|
105
|
+
text: "",
|
|
106
|
+
link: "",
|
|
107
|
+
onClick: e[0] || (e[0] = (t) => h(-1))
|
|
108
|
+
}, {
|
|
109
|
+
default: i(() => [
|
|
110
|
+
d(l.$slots, "arrow", {}, () => [
|
|
111
|
+
e[3] || (e[3] = v("‹", -1))
|
|
112
|
+
])
|
|
113
|
+
]),
|
|
114
|
+
_: 3
|
|
115
|
+
}, 8, ["type"]),
|
|
116
|
+
u(f, {
|
|
117
|
+
type: "success",
|
|
118
|
+
onClick: e[1] || (e[1] = (t) => h(1)),
|
|
119
|
+
text: "",
|
|
120
|
+
link: "",
|
|
121
|
+
class: "sw-revers"
|
|
122
|
+
}, {
|
|
123
|
+
default: i(() => [
|
|
124
|
+
d(l.$slots, "arrow", {}, () => [
|
|
125
|
+
e[4] || (e[4] = v("‹", -1))
|
|
126
|
+
])
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
})
|
|
130
|
+
])
|
|
131
|
+
])
|
|
132
|
+
]),
|
|
133
|
+
default: i(() => [
|
|
134
|
+
e[5] || (e[5] = r("div", { class: "hole" }, null, -1))
|
|
135
|
+
]),
|
|
136
|
+
_: 3
|
|
137
|
+
}, 8, ["placement", "modelValue", "maxWidth"]),
|
|
138
|
+
e[8] || (e[8] = r("div", { class: "overlay2" }, null, -1)),
|
|
139
|
+
e[9] || (e[9] = r("div", { class: "overlay3" }, null, -1))
|
|
140
|
+
], 512));
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
export {
|
|
144
|
+
O as default
|
|
145
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./VacationTable-3jJUSDHf.cjs"),h=["for"],v={key:0,title:"Это поле обязательно для заполнения."},k=["required","placeholder","type","id","name","size","maxlength","minlength","autofocus"],S={__name:"SwInput",props:e.mergeModels({before:{type:String,default:""},after:{type:String,default:""},placeholder:{type:String,default:""},label:{type:String,default:""},name:{type:String,required:!0},class:{type:String,default:""},size:{type:String,default:""},type:{type:String,default:"text"},inputMode:{type:String,default:"text"},required:{type:Boolean,default:!1},maxlength:{type:Number,default:128},minlength:{type:Number,default:1},inputSize:{type:Number,default:60}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["suffix","prefix","focusInput"],["update:modelValue"]),setup(i,{emit:c}){var s;const a=e.useModel(i,"modelValue"),t=i,n=e.ref(null),r=c,p=l=>{r("focusInput"),l.target.setSelectionRange(a.value.length,a.value.length),n.value!==null&&(n.value.style.top="-.6em")},d=l=>{var u;((u=a.value)==null?void 0:u.length)===0&&n.value!==null&&n.value.removeAttribute("style")};((s=a.value)==null?void 0:s.length)>0&&n.value!==null&&(n.value.style.top="-.6em");const m=()=>{r("suffix")},f=()=>{r("prefix")},g=e.computed(()=>{let l=["sw-input"];return t.size.length>0&&l.push("sw-"+t.size),t.class.length>0&&l.push(t.class),l});return e.watch(a,(l,u)=>{t.type==="phone"&&(a.value=o.V(l,u))}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(g.value)},[t.before.length>0?(e.openBlock(),e.createBlock(o.g,{key:0,"icon-class":t.before,onClick:f},null,8,["icon-class"])):e.renderSlot(l.$slots,"prefix",{key:1}),t.label.length>0?(e.openBlock(),e.createElementBlock("label",{key:2,for:t.name,ref_key:"lab",ref:n},[e.createTextVNode(e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("span",v,"*")):e.createCommentVNode("",!0)],8,h)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":u[0]||(u[0]=y=>a.value=y),required:t.required,placeholder:t.required&&t.label.length===0?t.placeholder+"*":t.placeholder,type:t.type,id:t.name,name:t.name,size:t.inputSize,onFocus:p,onBlur:d,maxlength:t.maxlength,minlength:t.minlength,autofocus:t.autofocus},l.$attrs),null,16,k),[[e.vModelDynamic,a.value]]),t.after.length>0?(e.openBlock(),e.createBlock(o.g,{key:3,"icon-class":t.after,onClick:m},null,8,["icon-class"])):e.renderSlot(l.$slots,"suffix",{key:4})],2))}};exports.default=S;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { mergeModels as p, useModel as k, ref as z, computed as V, createElementBlock as o, watch as q, openBlock as n, normalizeClass as N, createBlock as d, renderSlot as f, createCommentVNode as c, withDirectives as w, createTextVNode as B, toDisplayString as M, createElementVNode as C, mergeProps as D, vModelDynamic as I } from "vue";
|
|
2
|
+
import { V as $, g as m } from "./VacationTable-GeJlpGuk.js";
|
|
3
|
+
const E = ["for"], _ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
title: "Это поле обязательно для заполнения."
|
|
6
|
+
}, F = ["required", "placeholder", "type", "id", "name", "size", "maxlength", "minlength", "autofocus"], R = {
|
|
7
|
+
__name: "SwInput",
|
|
8
|
+
props: /* @__PURE__ */ p({
|
|
9
|
+
before: { type: String, default: "" },
|
|
10
|
+
after: { type: String, default: "" },
|
|
11
|
+
placeholder: { type: String, default: "" },
|
|
12
|
+
label: { type: String, default: "" },
|
|
13
|
+
name: { type: String, required: !0 },
|
|
14
|
+
class: { type: String, default: "" },
|
|
15
|
+
size: { type: String, default: "" },
|
|
16
|
+
type: { type: String, default: "text" },
|
|
17
|
+
inputMode: { type: String, default: "text" },
|
|
18
|
+
required: { type: Boolean, default: !1 },
|
|
19
|
+
maxlength: { type: Number, default: 128 },
|
|
20
|
+
minlength: { type: Number, default: 1 },
|
|
21
|
+
inputSize: { type: Number, default: 60 }
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: {},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: /* @__PURE__ */ p(["suffix", "prefix", "focusInput"], ["update:modelValue"]),
|
|
27
|
+
setup(i, { emit: g }) {
|
|
28
|
+
var s;
|
|
29
|
+
const l = k(i, "modelValue"), e = i, a = z(null), r = g, y = (t) => {
|
|
30
|
+
r("focusInput"), t.target.setSelectionRange(l.value.length, l.value.length), a.value !== null && (a.value.style.top = "-.6em");
|
|
31
|
+
}, h = (t) => {
|
|
32
|
+
var u;
|
|
33
|
+
((u = l.value) == null ? void 0 : u.length) === 0 && a.value !== null && a.value.removeAttribute("style");
|
|
34
|
+
};
|
|
35
|
+
((s = l.value) == null ? void 0 : s.length) > 0 && a.value !== null && (a.value.style.top = "-.6em");
|
|
36
|
+
const v = () => {
|
|
37
|
+
r("suffix");
|
|
38
|
+
}, S = () => {
|
|
39
|
+
r("prefix");
|
|
40
|
+
}, b = V(
|
|
41
|
+
() => {
|
|
42
|
+
let t = ["sw-input"];
|
|
43
|
+
return e.size.length > 0 && t.push("sw-" + e.size), e.class.length > 0 && t.push(e.class), t;
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
return q(l, (t, u) => {
|
|
47
|
+
e.type === "phone" && (l.value = $(t, u));
|
|
48
|
+
}), (t, u) => (n(), o("div", {
|
|
49
|
+
class: N(b.value)
|
|
50
|
+
}, [
|
|
51
|
+
e.before.length > 0 ? (n(), d(m, {
|
|
52
|
+
key: 0,
|
|
53
|
+
"icon-class": e.before,
|
|
54
|
+
onClick: S
|
|
55
|
+
}, null, 8, ["icon-class"])) : f(t.$slots, "prefix", { key: 1 }),
|
|
56
|
+
e.label.length > 0 ? (n(), o("label", {
|
|
57
|
+
key: 2,
|
|
58
|
+
for: e.name,
|
|
59
|
+
ref_key: "lab",
|
|
60
|
+
ref: a
|
|
61
|
+
}, [
|
|
62
|
+
B(M(e.label), 1),
|
|
63
|
+
e.required ? (n(), o("span", _, "*")) : c("", !0)
|
|
64
|
+
], 8, E)) : c("", !0),
|
|
65
|
+
w(C("input", D({
|
|
66
|
+
"onUpdate:modelValue": u[0] || (u[0] = (x) => l.value = x),
|
|
67
|
+
required: e.required,
|
|
68
|
+
placeholder: e.required && e.label.length === 0 ? e.placeholder + "*" : e.placeholder,
|
|
69
|
+
type: e.type,
|
|
70
|
+
id: e.name,
|
|
71
|
+
name: e.name,
|
|
72
|
+
size: e.inputSize,
|
|
73
|
+
onFocus: y,
|
|
74
|
+
onBlur: h,
|
|
75
|
+
maxlength: e.maxlength,
|
|
76
|
+
minlength: e.minlength,
|
|
77
|
+
autofocus: e.autofocus
|
|
78
|
+
}, t.$attrs), null, 16, F), [
|
|
79
|
+
[I, l.value]
|
|
80
|
+
]),
|
|
81
|
+
e.after.length > 0 ? (n(), d(m, {
|
|
82
|
+
key: 3,
|
|
83
|
+
"icon-class": e.after,
|
|
84
|
+
onClick: v
|
|
85
|
+
}, null, 8, ["icon-class"])) : f(t.$slots, "suffix", { key: 4 })
|
|
86
|
+
], 2));
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
R as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { mergeModels as f, useModel as g, ref as p, useSlots as v, createElementBlock as c, watch as w, nextTick as k, onUnmounted as h, openBlock as d, normalizeClass as y, createCommentVNode as S, renderSlot as r, createElementVNode as V, unref as x, createTextVNode as C, createVNode as u, toDisplayString as E, withCtx as M } from "vue";
|
|
2
|
+
import N from "./SwButton-85-tKHA7-D0loTJgt.js";
|
|
3
|
+
import { g as _ } from "./VacationTable-GeJlpGuk.js";
|
|
4
|
+
const B = { key: 0 }, T = {
|
|
5
|
+
__name: "SwMessage",
|
|
6
|
+
props: /* @__PURE__ */ f({
|
|
7
|
+
name: { type: String, default: "" },
|
|
8
|
+
class: { type: String, default: "" },
|
|
9
|
+
iconAfter: { type: String, default: "" }
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(s) {
|
|
16
|
+
const o = g(s, "modelValue"), a = s, l = p(null), m = v(), n = (e) => {
|
|
17
|
+
if (console.log("target - ", e.target), l.value && o.value) {
|
|
18
|
+
const t = l.value.getBoundingClientRect();
|
|
19
|
+
e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (o.value = !1);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return w(() => o.value, (e) => {
|
|
23
|
+
e ? (l.value.showModal(), k(), window.addEventListener("click", n, !0)) : (l.value.close(), window.removeEventListener("click", n));
|
|
24
|
+
}), h(() => {
|
|
25
|
+
window.removeEventListener("click", n);
|
|
26
|
+
}), (e, t) => {
|
|
27
|
+
var i;
|
|
28
|
+
return d(), c("dialog", {
|
|
29
|
+
class: y("sw-message " + a.class),
|
|
30
|
+
ref_key: "messageRef",
|
|
31
|
+
ref: l
|
|
32
|
+
}, [
|
|
33
|
+
a.name.length > 0 || (i = x(m)) != null && i.header ? (d(), c("header", B, [
|
|
34
|
+
r(e.$slots, "header", {}, () => [
|
|
35
|
+
C(E(a.name) + " ", 1),
|
|
36
|
+
u(N, {
|
|
37
|
+
link: "",
|
|
38
|
+
type: "primary",
|
|
39
|
+
onClick: t[0] || (t[0] = (L) => o.value = !1)
|
|
40
|
+
}, {
|
|
41
|
+
default: M(() => [
|
|
42
|
+
u(_, {
|
|
43
|
+
"icon-class": a.iconAfter
|
|
44
|
+
}, null, 8, ["icon-class"])
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
})
|
|
48
|
+
])
|
|
49
|
+
])) : S("", !0),
|
|
50
|
+
r(e.$slots, "default"),
|
|
51
|
+
V("footer", null, [
|
|
52
|
+
r(e.$slots, "footer")
|
|
53
|
+
])
|
|
54
|
+
], 2);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
T as default
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./SwButton-85-tKHA7-BpZ2q9aj.cjs"),d=require("./VacationTable-3jJUSDHf.cjs"),m={key:0},f={__name:"SwMessage",props:e.mergeModels({name:{type:String,default:""},class:{type:String,default:""},iconAfter:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const n=e.useModel(s,"modelValue"),a=s,o=e.ref(null),i=e.useSlots(),r=t=>{if(console.log("target - ",t.target),o.value&&n.value){const l=o.value.getBoundingClientRect();t.clientX>=l.left&&t.clientX<=l.right&&t.clientY>=l.top&&t.clientY<=l.bottom||(n.value=!1)}};return e.watch(()=>n.value,t=>{t?(o.value.showModal(),e.nextTick(),window.addEventListener("click",r,!0)):(o.value.close(),window.removeEventListener("click",r))}),e.onUnmounted(()=>{window.removeEventListener("click",r)}),(t,l)=>{var c;return e.openBlock(),e.createElementBlock("dialog",{class:e.normalizeClass("sw-message "+a.class),ref_key:"messageRef",ref:o},[a.name.length>0||(c=e.unref(i))!=null&&c.header?(e.openBlock(),e.createElementBlock("header",m,[e.renderSlot(t.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.name)+" ",1),e.createVNode(u.default,{link:"",type:"primary",onClick:l[0]||(l[0]=g=>n.value=!1)},{default:e.withCtx(()=>[e.createVNode(d.g,{"icon-class":a.iconAfter},null,8,["icon-class"])]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default"),e.createElementVNode("footer",null,[e.renderSlot(t.$slots,"footer")])],2)}}};exports.default=f;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { resolveComponent as i, createElementBlock as d, openBlock as m, normalizeClass as p, createElementVNode as s, renderSlot as o, createTextVNode as f, createVNode as u, toDisplayString as S } from "vue";
|
|
2
|
+
const y = {
|
|
3
|
+
__name: "SwSection",
|
|
4
|
+
props: {
|
|
5
|
+
name: { type: String, default: "" },
|
|
6
|
+
class: { type: String, default: "" },
|
|
7
|
+
iconAfter: { type: String, default: "" }
|
|
8
|
+
},
|
|
9
|
+
emits: ["header"],
|
|
10
|
+
setup(n, { emit: l }) {
|
|
11
|
+
const e = n, r = l, a = () => {
|
|
12
|
+
r("header");
|
|
13
|
+
};
|
|
14
|
+
return (t, g) => {
|
|
15
|
+
const c = i("svg-icon");
|
|
16
|
+
return m(), d("section", {
|
|
17
|
+
class: p("sw-section " + e.class)
|
|
18
|
+
}, [
|
|
19
|
+
s("header", { onClick: a }, [
|
|
20
|
+
o(t.$slots, "header", {}, () => [
|
|
21
|
+
f(S(e.name) + " ", 1),
|
|
22
|
+
u(c, {
|
|
23
|
+
"icon-class": e.iconAfter
|
|
24
|
+
}, null, 8, ["icon-class"])
|
|
25
|
+
])
|
|
26
|
+
]),
|
|
27
|
+
o(t.$slots, "default"),
|
|
28
|
+
s("footer", null, [
|
|
29
|
+
o(t.$slots, "footer")
|
|
30
|
+
])
|
|
31
|
+
], 2);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
y as default
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c={__name:"SwSection",props:{name:{type:String,default:""},class:{type:String,default:""},iconAfter:{type:String,default:""}},emits:["header"],setup(n,{emit:r}){const t=n,l=r,s=()=>{l("header")};return(o,i)=>{const a=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass("sw-section "+t.class)},[e.createElementVNode("header",{onClick:s},[e.renderSlot(o.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(t.name)+" ",1),e.createVNode(a,{"icon-class":t.iconAfter},null,8,["icon-class"])])]),e.renderSlot(o.$slots,"default"),e.createElementVNode("footer",null,[e.renderSlot(o.$slots,"footer")])],2)}}};exports.default=c;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { mergeModels as x, ref as n, useModel as T, watch as g, resolveComponent as k, createElementBlock as r, openBlock as d, createVNode as y, withDirectives as S, createElementVNode as v, Fragment as V, renderList as w, toDisplayString as z, vShow as C } from "vue";
|
|
2
|
+
const N = { class: "popup" }, _ = { class: "wrapper" }, b = { class: "scrollbar" }, M = ["onClick"], j = {
|
|
3
|
+
__name: "SwSelect",
|
|
4
|
+
props: /* @__PURE__ */ x({
|
|
5
|
+
class: { type: String, default: "" },
|
|
6
|
+
size: { type: String, default: "large" },
|
|
7
|
+
// 'large', 'small'
|
|
8
|
+
placeholder: { type: String, default: "" },
|
|
9
|
+
token: { type: String, default: "" }
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(s) {
|
|
16
|
+
const t = n({ fullText: "" }), u = n(!1), a = n([]), i = T(s, "modelValue"), c = s;
|
|
17
|
+
g(i.text, (e) => {
|
|
18
|
+
e.length > 3 && (t.value.fullText = e);
|
|
19
|
+
}), g(t.value.fullText, (e, l) => {
|
|
20
|
+
u.value = e.length > 3 && e.length > l.length, e.length > 3 && f();
|
|
21
|
+
});
|
|
22
|
+
const f = () => {
|
|
23
|
+
console.log(t.value.fullText), axios.post(
|
|
24
|
+
"https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address",
|
|
25
|
+
{
|
|
26
|
+
query: t.value.fullText
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
headers: {
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
Accept: "application/json",
|
|
32
|
+
Authorization: "Token " + c.token
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
).then((l) => {
|
|
36
|
+
console.log(l.data.suggestions), a.value = l.data.suggestions, a.value.length === 1 && p(a.value[0]);
|
|
37
|
+
}).catch((l) => {
|
|
38
|
+
console.log(l);
|
|
39
|
+
});
|
|
40
|
+
}, p = (e) => {
|
|
41
|
+
t.value.fullText = e.value, u.value = !1;
|
|
42
|
+
const l = {};
|
|
43
|
+
l.text = e.value, l.coords = [Number(e.data.geo_lat), Number(e.data.geo_lon)], l.suggestion = e.data, i.value = l;
|
|
44
|
+
};
|
|
45
|
+
return (e, l) => {
|
|
46
|
+
const h = k("sw-input");
|
|
47
|
+
return d(), r("div", N, [
|
|
48
|
+
y(h, {
|
|
49
|
+
size: c.size,
|
|
50
|
+
modelValue: t.value.fullText,
|
|
51
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value.fullText = o),
|
|
52
|
+
placeholder: s.placeholder
|
|
53
|
+
}, null, 8, ["size", "modelValue", "placeholder"]),
|
|
54
|
+
S(v("div", _, [
|
|
55
|
+
v("ul", b, [
|
|
56
|
+
(d(!0), r(V, null, w(a.value, (o, m) => (d(), r("li", {
|
|
57
|
+
tabindex: "1",
|
|
58
|
+
key: m,
|
|
59
|
+
onClick: (A) => p(o)
|
|
60
|
+
}, z(o.value), 9, M))), 128))
|
|
61
|
+
])
|
|
62
|
+
], 512), [
|
|
63
|
+
[C, u.value]
|
|
64
|
+
])
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
j as default
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v={class:"popup"},f={class:"wrapper"},h={class:"scrollbar"},m=["onClick"],k={__name:"SwSelect",props:e.mergeModels({class:{type:String,default:""},size:{type:String,default:"large"},placeholder:{type:String,default:""},token:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const a=e.ref({fullText:""}),s=e.ref(!1),o=e.ref([]),r=e.useModel(n,"modelValue"),c=n;e.watch(r.text,l=>{l.length>3&&(a.value.fullText=l)}),e.watch(a.value.fullText,(l,t)=>{s.value=l.length>3&&l.length>t.length,l.length>3&&i()});const i=()=>{console.log(a.value.fullText),axios.post("https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address",{query:a.value.fullText},{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Token "+c.token}}).then(t=>{console.log(t.data.suggestions),o.value=t.data.suggestions,o.value.length===1&&d(o.value[0])}).catch(t=>{console.log(t)})},d=l=>{a.value.fullText=l.value,s.value=!1;const t={};t.text=l.value,t.coords=[Number(l.data.geo_lat),Number(l.data.geo_lon)],t.suggestion=l.data,r.value=t};return(l,t)=>{const g=e.resolveComponent("sw-input");return e.openBlock(),e.createElementBlock("div",v,[e.createVNode(g,{size:c.size,modelValue:a.value.fullText,"onUpdate:modelValue":t[0]||(t[0]=u=>a.value.fullText=u),placeholder:n.placeholder},null,8,["size","modelValue","placeholder"]),e.withDirectives(e.createElementVNode("div",f,[e.createElementVNode("ul",h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(u,p)=>(e.openBlock(),e.createElementBlock("li",{tabindex:"1",key:p,onClick:x=>d(u)},e.toDisplayString(u.value),9,m))),128))])],512),[[e.vShow,s.value]])])}}};exports.default=k;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { renderSlot as s, createElementBlock as o, openBlock as a, normalizeClass as n, createVNode as r } from "vue";
|
|
2
|
+
import i from "./SwSkeletonItem-CU7LvihY-DdKyY6kY.js";
|
|
3
|
+
const p = {
|
|
4
|
+
__name: "SwSkeleton",
|
|
5
|
+
props: {
|
|
6
|
+
class: { type: String, default: "" },
|
|
7
|
+
visual: { type: Boolean, default: !1 }
|
|
8
|
+
},
|
|
9
|
+
setup(t) {
|
|
10
|
+
const e = t;
|
|
11
|
+
return (l, c) => e.visual ? s(l.$slots, "default", { key: 0 }) : (a(), o("div", {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: n(["sw-skeleton", e.class])
|
|
14
|
+
}, [
|
|
15
|
+
s(l.$slots, "skeleton", {}, () => [
|
|
16
|
+
r(i, {
|
|
17
|
+
animate: "",
|
|
18
|
+
size: "small"
|
|
19
|
+
})
|
|
20
|
+
])
|
|
21
|
+
], 2));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
p as default
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./SwSkeletonItem-CU7LvihY-BJmW7U8Z.cjs"),a={__name:"SwSkeleton",props:{class:{type:String,default:""},visual:{type:Boolean,default:!1}},setup(s){const t=s;return(l,n)=>t.visual?e.renderSlot(l.$slots,"default",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["sw-skeleton",t.class])},[e.renderSlot(l.$slots,"skeleton",{},()=>[e.createVNode(o.default,{animate:"",size:"small"})])],2))}};exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o={key:0},i={__name:"SwSkeletonItem",props:{width:{type:String,default:"100"},class:{type:String,default:""},animate:{type:Boolean,default:!1},size:{type:String,default:""}},setup(a){const t=a,s=e.computed(()=>{let l=["sw-skeleton-item"];return t.size.length>0&&l.push("sw-"+t.size),t.animate&&l.push("sw-animate"),t.class.length>0&&l.push(t.class),l}),n=e.computed(()=>({width:t.width+"%"}));return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),style:e.normalizeStyle(n.value)},[t.animate?(e.openBlock(),e.createElementBlock("div",o)):e.createCommentVNode("",!0)],6))}};exports.default=i;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { computed as a, createElementBlock as s, openBlock as l, normalizeStyle as m, normalizeClass as r, createCommentVNode as p } from "vue";
|
|
2
|
+
const u = { key: 0 }, f = {
|
|
3
|
+
__name: "SwSkeletonItem",
|
|
4
|
+
props: {
|
|
5
|
+
width: { type: String, default: "100" },
|
|
6
|
+
class: { type: String, default: "" },
|
|
7
|
+
animate: { type: Boolean, default: !1 },
|
|
8
|
+
size: { type: String, default: "" }
|
|
9
|
+
},
|
|
10
|
+
setup(n) {
|
|
11
|
+
const e = n, i = a(
|
|
12
|
+
() => {
|
|
13
|
+
let t = ["sw-skeleton-item"];
|
|
14
|
+
return e.size.length > 0 && t.push("sw-" + e.size), e.animate && t.push("sw-animate"), e.class.length > 0 && t.push(e.class), t;
|
|
15
|
+
}
|
|
16
|
+
), o = a(() => ({
|
|
17
|
+
width: e.width + "%"
|
|
18
|
+
}));
|
|
19
|
+
return (t, d) => (l(), s("div", {
|
|
20
|
+
class: r(i.value),
|
|
21
|
+
style: m(o.value)
|
|
22
|
+
}, [
|
|
23
|
+
e.animate ? (l(), s("div", u)) : p("", !0)
|
|
24
|
+
], 6));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
f as default
|
|
29
|
+
};
|