@topvisor/ui 0.0.43 → 0.9.2
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/.chunks/datepicker-32bc8bd9.es.js +275 -0
- package/.chunks/datepicker-32bc8bd9.es.js.map +1 -0
- package/.chunks/datepicker-8a42d8a6.amd.js +234 -0
- package/.chunks/datepicker-8a42d8a6.amd.js.map +1 -0
- package/.chunks/forms-30d68077.amd.js +3 -0
- package/.chunks/forms-30d68077.amd.js.map +1 -0
- package/.chunks/forms-64632f73.es.js +1091 -0
- package/.chunks/forms-64632f73.es.js.map +1 -0
- package/.chunks/{popup-de28e508.amd.js → popup-14ca85cf.amd.js} +378 -377
- package/.chunks/popup-14ca85cf.amd.js.map +1 -0
- package/.chunks/{popup-a622fe31.es.js → popup-b2fe3094.es.js} +439 -429
- package/.chunks/popup-b2fe3094.es.js.map +1 -0
- package/README.md +80 -80
- package/assets/core.css +1 -1
- package/assets/forms.css +1 -1
- package/assets/tabsView.css +1 -0
- package/core/core.amd.js +1 -1
- package/core/core.d.ts +2 -2
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +8 -8
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +1 -1
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +19 -19
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -1
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +13 -10
- package/popup/worker.js.map +1 -1
- package/src/components/tabsView/tabsView/_MenuItem.stories.d.ts +361 -0
- package/src/components/tabsView/tabsView/_MenuTitle.stories.d.ts +280 -0
- package/src/components/tabsView/tabsView/content.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menu.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -0
- package/src/components/tabsView/tabsView/menuItem.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +19 -0
- package/src/components/tabsView/tabsView/state.d.ts +14 -0
- package/src/components/tabsView/tabsView/tabsView.d.ts +69 -0
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +529 -0
- package/src/components/tabsView/tabsView/tabsView.vue.d.ts +38 -0
- package/src/components/tabsView/tabsView.d.ts +4 -0
- package/src/core/utils/date.d.ts +25 -27
- package/src/core/utils/device.d.ts +10 -13
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +1 -1
- package/tabsView/tabsView.amd.js +2 -0
- package/tabsView/tabsView.amd.js.map +1 -0
- package/tabsView/tabsView.d.ts +1 -0
- package/tabsView/tabsView.js +271 -0
- package/tabsView/tabsView.js.map +1 -0
- package/utils/date.amd.js +1 -1
- package/utils/date.d.ts +0 -2
- package/utils/date.js +5 -2
- package/utils/device.amd.js +1 -1
- package/utils/device.d.ts +0 -2
- package/utils/device.js +7 -2
- package/utils/dom.amd.js +1 -1
- package/utils/dom.d.ts +2 -2
- package/utils/dom.js +1 -1
- package/.chunks/datepicker-92744062.es.js +0 -275
- package/.chunks/datepicker-92744062.es.js.map +0 -1
- package/.chunks/datepicker-a9226b0f.amd.js +0 -234
- package/.chunks/datepicker-a9226b0f.amd.js.map +0 -1
- package/.chunks/forms-727cc6aa.es.js +0 -1112
- package/.chunks/forms-727cc6aa.es.js.map +0 -1
- package/.chunks/forms-771091d4.amd.js +0 -3
- package/.chunks/forms-771091d4.amd.js.map +0 -1
- package/.chunks/popup-a622fe31.es.js.map +0 -1
- package/.chunks/popup-de28e508.amd.js.map +0 -1
- package/build/cssModules.d.ts +0 -13
- package/build/plugin/amdFix.d.ts +0 -8
- package/build/plugin/autoloadCSS.d.ts +0 -19
- package/build/rollup.config.d.ts +0 -15
- package/src/components/component.d.ts +0 -25
- package/src/components/helpersStories.d.ts +0 -28
- package/src/core/base/Colors.stories.d.ts +0 -19
- package/src/core/base/Layout.stories.d.ts +0 -19
- package/src/core/base/Properties.stories.d.ts +0 -19
- package/src/core/directives/tooltip.d.ts +0 -7
- package/src/core/theme/Colors.stories.d.ts +0 -19
- package/src/core/theme/Properties.stories.d.ts +0 -19
- package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.d.ts" +0 -6
- package/src/d.d.ts +0 -4
- package/src/resources/styles/core/core.d.ts +0 -0
- package/src/resources/styles/themes/dark.d.ts +0 -0
- package/src/resources/styles/themes/light.d.ts +0 -0
- package/src/storybook/components/icomoon.d.ts +0 -2
|
@@ -1,1112 +0,0 @@
|
|
|
1
|
-
import { reactive as H, defineComponent as g, useCssVars as X, computed as b, openBlock as u, createElementBlock as m, createElementVNode as w, createCommentVNode as v, createBlock as k, resolveDynamicComponent as x, normalizeClass as h, withCtx as B, renderSlot as $, createTextVNode as ee, toDisplayString as _, withDirectives as M, vModelCheckbox as J, mergeProps as D, withKeys as te, withModifiers as I, vModelText as Z, ref as oe, unref as S, onUnmounted as ae, vModelRadio as se, resolveDirective as ne, watch as ie, toRef as le, Fragment as F, renderList as N, vModelSelect as re } from "vue";
|
|
2
|
-
import("../core/core.js").then((s) => {
|
|
3
|
-
const e = ["../assets/forms.css"].map((a) => import.meta.resolve(a));
|
|
4
|
-
s.default.Page.addCss(e);
|
|
5
|
-
});
|
|
6
|
-
class T {
|
|
7
|
-
static isRetina() {
|
|
8
|
-
return "devicePixelRatio" in window && window.devicePixelRatio > 1;
|
|
9
|
-
}
|
|
10
|
-
// определить, является ли устройство мобильным
|
|
11
|
-
static isMobile() {
|
|
12
|
-
return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
|
|
13
|
-
}
|
|
14
|
-
// определить, открыт ли сайт в приложении
|
|
15
|
-
static isApp() {
|
|
16
|
-
return navigator.userAgent.indexOf("Topvisor_App") != -1;
|
|
17
|
-
}
|
|
18
|
-
// определить, является ли OS пользователя macOS
|
|
19
|
-
static isMacOS() {
|
|
20
|
-
return navigator.userAgent.indexOf("Mac OS X") !== -1;
|
|
21
|
-
}
|
|
22
|
-
// определить, является ли текущий браузер пользователя Safari
|
|
23
|
-
static isSafari() {
|
|
24
|
-
const e = /Chrome|Android/.test(navigator.userAgent);
|
|
25
|
-
let a = /Safari/.test(navigator.userAgent);
|
|
26
|
-
return e && a && (a = !1), a;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Вернуть текст для обозначения клавиши Ctrl / Command в зависимости от OS
|
|
30
|
-
* @returns {'Ctrl'|'⌘'}
|
|
31
|
-
*/
|
|
32
|
-
static getCommandKeyLabel() {
|
|
33
|
-
return this.isMacOS() ? "⌘" : "Ctrl";
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function de(s, e, ...a) {
|
|
37
|
-
const n = document.createElement(s);
|
|
38
|
-
for (const o in e)
|
|
39
|
-
o.indexOf("on") === 0 ? n[o] = e[o] : n.setAttribute(o, e[o]);
|
|
40
|
-
return a.forEach((o) => {
|
|
41
|
-
typeof o == "string" ? n.insertAdjacentHTML("beforeend", o) : n.append(o);
|
|
42
|
-
}), n;
|
|
43
|
-
}
|
|
44
|
-
function C(s) {
|
|
45
|
-
if (!s)
|
|
46
|
-
return !1;
|
|
47
|
-
const e = s.getBoundingClientRect();
|
|
48
|
-
return !!(e.width || e.height);
|
|
49
|
-
}
|
|
50
|
-
function pe(s) {
|
|
51
|
-
const e = s.getBoundingClientRect();
|
|
52
|
-
return {
|
|
53
|
-
top: e.top + window.scrollY,
|
|
54
|
-
left: e.left + window.scrollX
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function ue(s, e) {
|
|
58
|
-
return window.getComputedStyle(s).getPropertyValue(e);
|
|
59
|
-
}
|
|
60
|
-
function ce(s, e) {
|
|
61
|
-
const a = document.createElement(e);
|
|
62
|
-
return s.after(a), a.append(s), a;
|
|
63
|
-
}
|
|
64
|
-
function me(s, e) {
|
|
65
|
-
return R(s, e).find(C) || null;
|
|
66
|
-
}
|
|
67
|
-
function fe(s, e) {
|
|
68
|
-
return R(s, e).findLast(C) || null;
|
|
69
|
-
}
|
|
70
|
-
function be(s, e) {
|
|
71
|
-
return R(s, e).filter(C);
|
|
72
|
-
}
|
|
73
|
-
function R(s, e) {
|
|
74
|
-
return s ? [...s.querySelectorAll(e)] : [];
|
|
75
|
-
}
|
|
76
|
-
function he(s, e = "common", a = void 0) {
|
|
77
|
-
if (s)
|
|
78
|
-
return s.topData || (s.topData = {}), a && (s.topData[e] = a), a === null && delete s.topData[e], s.topData[e];
|
|
79
|
-
}
|
|
80
|
-
function ve(s) {
|
|
81
|
-
s && delete s.topData;
|
|
82
|
-
}
|
|
83
|
-
const ge = {
|
|
84
|
-
genEl: de,
|
|
85
|
-
isVisible: C,
|
|
86
|
-
offset: pe,
|
|
87
|
-
css: ue,
|
|
88
|
-
wrap: ce,
|
|
89
|
-
querySelectorVisible: me,
|
|
90
|
-
querySelectorVisibleLast: fe,
|
|
91
|
-
querySelectorAllVisible: be,
|
|
92
|
-
querySelectorAllArray: R,
|
|
93
|
-
storage: he,
|
|
94
|
-
storageClear: ve
|
|
95
|
-
};
|
|
96
|
-
class P {
|
|
97
|
-
/**
|
|
98
|
-
* Вставить css стили на страницу с автоматическим определением media
|
|
99
|
-
* @param fileNames - список ссылок на css файлы
|
|
100
|
-
* @param props - атрибуты <link>
|
|
101
|
-
*/
|
|
102
|
-
static addCss(e, a = {}) {
|
|
103
|
-
const n = /* @__PURE__ */ new Map();
|
|
104
|
-
n.set("::", []), e.forEach((o) => {
|
|
105
|
-
let t = !1, r = !1;
|
|
106
|
-
o.match(/\.m\./) && (t = !0), o.match(/\.pc\./) && (r = !0);
|
|
107
|
-
const i = `${t}:${r}`;
|
|
108
|
-
n.has(i) || n.set(`${t}:${r}`, []), n.get(`${t}:${r}`).push(o);
|
|
109
|
-
}), n.forEach((o, t) => {
|
|
110
|
-
if (!o.length)
|
|
111
|
-
return;
|
|
112
|
-
const [r, i] = t.split(":").map((d) => d === "true");
|
|
113
|
-
let l = "all";
|
|
114
|
-
r && (l = "(max-width: 900px)"), i && (l = "(min-width: 900px)"), a.media = l, P._addCss(o, a);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
static _addCss(e, a) {
|
|
118
|
-
e.forEach((n) => {
|
|
119
|
-
if (a.id ??= "topCSSLink-" + n.replace(/\W/g, "-"), window[a.id])
|
|
120
|
-
return;
|
|
121
|
-
a.rel = "stylesheet", a.href = n;
|
|
122
|
-
const o = ge.genEl("link", a);
|
|
123
|
-
document.head.append(o);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
const ye = 100;
|
|
128
|
-
let j;
|
|
129
|
-
const W = /* @__PURE__ */ new Map(), L = {
|
|
130
|
-
width: window.innerWidth,
|
|
131
|
-
height: window.innerHeight
|
|
132
|
-
};
|
|
133
|
-
function we(s) {
|
|
134
|
-
W.set(s, s);
|
|
135
|
-
}
|
|
136
|
-
function $e(s) {
|
|
137
|
-
W.delete(s);
|
|
138
|
-
}
|
|
139
|
-
function _e(s) {
|
|
140
|
-
clearTimeout(j), j = setTimeout(function() {
|
|
141
|
-
s.topEvent = {
|
|
142
|
-
widthDiff: L.width - window.innerWidth,
|
|
143
|
-
hightDiff: L.height - window.innerHeight
|
|
144
|
-
}, L.width = window.innerWidth, L.height = window.innerHeight, W.forEach((e) => e(s));
|
|
145
|
-
}, ye);
|
|
146
|
-
}
|
|
147
|
-
window.addEventListener("resize", _e);
|
|
148
|
-
const ke = {
|
|
149
|
-
addOnReize: we,
|
|
150
|
-
removeOnResize: $e
|
|
151
|
-
};
|
|
152
|
-
var K;
|
|
153
|
-
const Me = {
|
|
154
|
-
widthForMobile: 900,
|
|
155
|
-
dateFormat: "Y-m-d",
|
|
156
|
-
/**
|
|
157
|
-
* Для Москвы: +0300
|
|
158
|
-
*/
|
|
159
|
-
gmt: (K = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : K[1]
|
|
160
|
-
};
|
|
161
|
-
var Q;
|
|
162
|
-
const Se = {
|
|
163
|
-
/**
|
|
164
|
-
* Device by size
|
|
165
|
-
* @see widthForMobile
|
|
166
|
-
*/
|
|
167
|
-
isMobile: !1,
|
|
168
|
-
/**
|
|
169
|
-
* Device by user agent
|
|
170
|
-
*/
|
|
171
|
-
isMobileUA: !1,
|
|
172
|
-
/**
|
|
173
|
-
* true, если плотность пикселей экрана больше 1
|
|
174
|
-
*/
|
|
175
|
-
isRetina: !1,
|
|
176
|
-
/**
|
|
177
|
-
* true, елси это приложение
|
|
178
|
-
*/
|
|
179
|
-
isApp: !1,
|
|
180
|
-
/**
|
|
181
|
-
* true при горизонтальном расположении устройства
|
|
182
|
-
*/
|
|
183
|
-
isLandscape: !0,
|
|
184
|
-
/**
|
|
185
|
-
* true при вертикальном расположении устройства
|
|
186
|
-
*/
|
|
187
|
-
isPortrait: !1,
|
|
188
|
-
size: 0,
|
|
189
|
-
// См. core.options
|
|
190
|
-
dateFormat: "Y-m-d",
|
|
191
|
-
// См. core.options
|
|
192
|
-
gmt: (Q = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : Q[1]
|
|
193
|
-
}, z = window, A = (s) => {
|
|
194
|
-
var e, a;
|
|
195
|
-
if (!((a = (e = z == null ? void 0 : z.jQuery) == null ? void 0 : e.ui) != null && a.tooltip)) {
|
|
196
|
-
console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
return z.jQuery(s);
|
|
200
|
-
}, Y = (s, e) => {
|
|
201
|
-
var n;
|
|
202
|
-
const a = s.value ?? {};
|
|
203
|
-
return a.content ??= (n = e.props) == null ? void 0 : n.title, a.content = String(a.content).replace(/\r\n|\r|\n/g, "<br>"), a.position ??= {
|
|
204
|
-
my: "bottom-18px",
|
|
205
|
-
at: "top center"
|
|
206
|
-
}, a;
|
|
207
|
-
}, Ve = {
|
|
208
|
-
mounted(s, e, a) {
|
|
209
|
-
var n;
|
|
210
|
-
(n = A(s)) == null || n.tooltip(Y(e, a));
|
|
211
|
-
},
|
|
212
|
-
updated(s, e, a, n) {
|
|
213
|
-
var r;
|
|
214
|
-
const o = Y(e, a), t = (r = A(s)) == null ? void 0 : r.tooltip("instance");
|
|
215
|
-
t && (t.options = {
|
|
216
|
-
...t.options,
|
|
217
|
-
...o
|
|
218
|
-
});
|
|
219
|
-
},
|
|
220
|
-
unmounted(s, e, a) {
|
|
221
|
-
var n;
|
|
222
|
-
(n = A(s)) == null || n.tooltip("destroy");
|
|
223
|
-
}
|
|
224
|
-
}, O = window;
|
|
225
|
-
class p {
|
|
226
|
-
/**
|
|
227
|
-
* Настройки словаря
|
|
228
|
-
*/
|
|
229
|
-
static L = H({
|
|
230
|
-
Not_date: "Not date"
|
|
231
|
-
});
|
|
232
|
-
static page = (O == null ? void 0 : O.page) || {};
|
|
233
|
-
static Page = P;
|
|
234
|
-
static options = Me;
|
|
235
|
-
static state = H({ ...Se });
|
|
236
|
-
static matchMediaIsMobile;
|
|
237
|
-
/**
|
|
238
|
-
* Добавить на страницу стили, используется для загрузки стилей из js
|
|
239
|
-
*
|
|
240
|
-
* Условная загрузка стилей m и pc отключена в пользу производительсности, стили грузятся всегда, но применяются по условию
|
|
241
|
-
* @param style - css стили в строке
|
|
242
|
-
* @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.options.widthForMobile
|
|
243
|
-
*/
|
|
244
|
-
static appendStyle(e, a = "") {
|
|
245
|
-
let n = "all";
|
|
246
|
-
a === "m" && (n = "(max-width: " + this.options.widthForMobile + "px)"), a === "pc" && (n = "(min-width: " + this.options.widthForMobile + "px)");
|
|
247
|
-
const o = document.createElement("style");
|
|
248
|
-
o.innerHTML = e, o.media = n, document.head.append(o);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Установить как плагин в прилоежнии Vue
|
|
252
|
-
* Core.state является общим для всех приложений Vue на странице
|
|
253
|
-
* Core.options является общим для всех приложений Vue на странице
|
|
254
|
-
* @param app - Vue App
|
|
255
|
-
* @param {typeof options} options - параметры UI
|
|
256
|
-
*/
|
|
257
|
-
static install(e, a) {
|
|
258
|
-
p.defineOptions(a), e.provide("top-core", p), this.installDirectives(e);
|
|
259
|
-
}
|
|
260
|
-
static installDirectives(e) {
|
|
261
|
-
e.directive("top-tooltip", Ve);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Установить конфигурацию UI
|
|
265
|
-
* @param {typeof options} options
|
|
266
|
-
*/
|
|
267
|
-
static defineOptions(e) {
|
|
268
|
-
e != null && e.widthForMobile && (this.options.widthForMobile = e.widthForMobile), e != null && e.dateFormat && (this.options.dateFormat = e.dateFormat), e != null && e.gmt && (this.options.gmt = e.gmt), p.setState();
|
|
269
|
-
}
|
|
270
|
-
static setState() {
|
|
271
|
-
p.matchMediaIsMobile = window.matchMedia(`(max-width: ${p.options.widthForMobile}px)`), p.state.isMobileUA = T.isMobile(), p.state.isRetina = T.isRetina(), p.state.isApp = T.isApp(), p.state.dateFormat = this.options.dateFormat, p.state.gmt = this.options.gmt, p.setStateByWindowSize(), ke.addOnReize(p.onResize), p.onResize(), p.saveToCookie();
|
|
272
|
-
}
|
|
273
|
-
static onResize() {
|
|
274
|
-
p.setStateByWindowSize(), document.documentElement.style.setProperty("--100vh", window.innerHeight + "px");
|
|
275
|
-
}
|
|
276
|
-
static setStateByWindowSize() {
|
|
277
|
-
var e;
|
|
278
|
-
p.state.isMobile = !!((e = p.matchMediaIsMobile) != null && e.matches), p.state.isLandscape = window.innerWidth > window.innerHeight, p.state.isPortrait = !p.state.isLandscape, p.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, p.saveToCookie();
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Сохранить информацию об устройстве в cookie
|
|
282
|
-
*/
|
|
283
|
-
static saveToCookie() {
|
|
284
|
-
const e = [
|
|
285
|
-
1,
|
|
286
|
-
window.innerWidth,
|
|
287
|
-
window.innerHeight,
|
|
288
|
-
window.devicePixelRatio,
|
|
289
|
-
Number(p.state.isMobile),
|
|
290
|
-
Number(p.state.isRetina)
|
|
291
|
-
];
|
|
292
|
-
document.cookie = "device=" + e.join(",") + "; path=/;";
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
class V {
|
|
296
|
-
/**
|
|
297
|
-
* Получить объект Date из строки
|
|
298
|
-
* @param date - строка с датой
|
|
299
|
-
*/
|
|
300
|
-
static stringToDate(e) {
|
|
301
|
-
return e.indexOf("T") === -1 && (e.length == 10 && (e += " 00:00:00"), e = e.replace(" ", "T") + p.state.gmt), new Date(e);
|
|
302
|
-
}
|
|
303
|
-
// Перевод миллисекунд (UTC) в дату-строку (время локальное)
|
|
304
|
-
/**
|
|
305
|
-
* Перевод миллисекунд (UTC) в дату-строку (время локальное)
|
|
306
|
-
* @param {?number} ms
|
|
307
|
-
* @param {?boolean} useFormat
|
|
308
|
-
*/
|
|
309
|
-
static ms2Date(e, a = !0) {
|
|
310
|
-
let n;
|
|
311
|
-
e != null ? n = new Date(e) : n = /* @__PURE__ */ new Date();
|
|
312
|
-
const o = n.getDate().toString().padStart(2, "0"), t = String(n.getMonth() + 1).padStart(2, "0"), r = n.getFullYear(), i = n.getHours().toString().padStart(2, "0"), l = n.getMinutes().toString().padStart(2, "0"), d = n.getSeconds().toString().padStart(2, "0");
|
|
313
|
-
return n = r + "-" + t + "-" + o + " " + i + ":" + l + ":" + d, a && (n = this.dateFormat(n)), n;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Перевод даты в формат пользователя
|
|
317
|
-
* @param {string} date - строка в формате Y-m-d H:i:s
|
|
318
|
-
* @param {0|1|2|3} time - 0: только дата, 1: дата и часы, 2: дата и часы с минутами, 3: дата и часы с минутами и секундами
|
|
319
|
-
* @param {string} emptyValue - значение, которое надо вернуть, если дата не указана
|
|
320
|
-
*/
|
|
321
|
-
static dateFormat(e, a = 2, n = p.L.Not_date) {
|
|
322
|
-
if ((!e || e.substring(0, 10) === "0000-00-00") && n && n !== "0000-00-00")
|
|
323
|
-
return n;
|
|
324
|
-
const o = p.state.dateFormat.toLowerCase();
|
|
325
|
-
let t = e.substring(0, 10);
|
|
326
|
-
t.length === 7 && (t += "-01"), t += " 00:00", t = t.replace(/-/g, "/");
|
|
327
|
-
const r = new Date(t);
|
|
328
|
-
if (isNaN(Number(r)))
|
|
329
|
-
return n;
|
|
330
|
-
let i = o.replace("y", String(r.getFullYear()).padStart(2, "0")).replace("m", String(r.getMonth() + 1).padStart(2, "0")).replace("d", String(r.getDate()).padStart(2, "0"));
|
|
331
|
-
if (e.length > 10)
|
|
332
|
-
switch (a) {
|
|
333
|
-
case 1:
|
|
334
|
-
i += " " + e.substring(11, 13);
|
|
335
|
-
break;
|
|
336
|
-
case 2:
|
|
337
|
-
i += " " + e.substring(11, 16);
|
|
338
|
-
break;
|
|
339
|
-
case 3:
|
|
340
|
-
i += " " + e.substring(11, 19);
|
|
341
|
-
break;
|
|
342
|
-
}
|
|
343
|
-
return i;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Перевод даты из формата пользователя в системный формат
|
|
347
|
-
* @param {string} date - строка в формате Y-m-d H:i:s
|
|
348
|
-
* @param {string} emptyValue - значение, которое надо вернуть, если дата не указана
|
|
349
|
-
*/
|
|
350
|
-
static dateUnformat(e, a = p.L.Not_date) {
|
|
351
|
-
if (!e)
|
|
352
|
-
return a;
|
|
353
|
-
if (e.match(/\d\d\d\d-\d\d-\d\d/))
|
|
354
|
-
return e;
|
|
355
|
-
const n = p.state.dateFormat.toLowerCase(), o = e.split(/\W/), t = n.split(/\W/);
|
|
356
|
-
let r = "", i = "", l = "";
|
|
357
|
-
t.forEach((f, c) => {
|
|
358
|
-
switch (f) {
|
|
359
|
-
case "d":
|
|
360
|
-
r = o[c];
|
|
361
|
-
break;
|
|
362
|
-
case "m":
|
|
363
|
-
i = o[c];
|
|
364
|
-
break;
|
|
365
|
-
case "y":
|
|
366
|
-
l = o[c];
|
|
367
|
-
break;
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
let d = l + "-" + i + "-" + r;
|
|
371
|
-
return d.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + d), d = this.ms2Date((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), d;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
const Be = { class: "top-avatar" }, Ee = ["src", "title"], Le = ["title"], ze = /* @__PURE__ */ g({
|
|
375
|
-
__name: "avatar",
|
|
376
|
-
props: {
|
|
377
|
-
size: { default: 64 },
|
|
378
|
-
image: {},
|
|
379
|
-
nickname: {},
|
|
380
|
-
isOnline: { type: Boolean },
|
|
381
|
-
lastActiveTime: {}
|
|
382
|
-
},
|
|
383
|
-
setup(s) {
|
|
384
|
-
X((o) => ({
|
|
385
|
-
"4ca8e42a": o.size + "px"
|
|
386
|
-
}));
|
|
387
|
-
const e = s, a = {
|
|
388
|
-
user: {
|
|
389
|
-
Online: "Онлайн",
|
|
390
|
-
LastSeen: "Заходил(а)"
|
|
391
|
-
}
|
|
392
|
-
}, n = b(() => {
|
|
393
|
-
if (e.isOnline)
|
|
394
|
-
return a.user.Online;
|
|
395
|
-
if (e.lastActiveTime)
|
|
396
|
-
return a.user.LastSeen + ": " + V.dateFormat(e.lastActiveTime, 2);
|
|
397
|
-
});
|
|
398
|
-
return (o, t) => (u(), m("div", Be, [
|
|
399
|
-
w("img", {
|
|
400
|
-
class: "top-avatar_image",
|
|
401
|
-
src: o.image,
|
|
402
|
-
title: e.nickname + (n.value ? `
|
|
403
|
-
${n.value}` : ""),
|
|
404
|
-
alt: ""
|
|
405
|
-
}, null, 8, Ee),
|
|
406
|
-
o.isOnline ? (u(), m("div", {
|
|
407
|
-
key: 0,
|
|
408
|
-
class: "top-avatar_status",
|
|
409
|
-
title: n.value
|
|
410
|
-
}, null, 8, Le)) : v("", !0)
|
|
411
|
-
]));
|
|
412
|
-
}
|
|
413
|
-
}), De = {
|
|
414
|
-
"top-avatar": "top-avatar",
|
|
415
|
-
"top-avatar_image": "top-avatar_image",
|
|
416
|
-
"top-avatar_status": "top-avatar_status"
|
|
417
|
-
}, y = (s, e) => {
|
|
418
|
-
const a = s.__vccOpts || s;
|
|
419
|
-
for (const [n, o] of e)
|
|
420
|
-
a[n] = o;
|
|
421
|
-
return a;
|
|
422
|
-
}, Ce = {
|
|
423
|
-
$style: De
|
|
424
|
-
}, Pt = /* @__PURE__ */ y(ze, [["__cssModules", Ce]]), Re = {
|
|
425
|
-
key: 0,
|
|
426
|
-
class: "top-ellipsis"
|
|
427
|
-
}, Fe = /* @__PURE__ */ g({
|
|
428
|
-
__name: "button",
|
|
429
|
-
props: {
|
|
430
|
-
color: { default: "blue" },
|
|
431
|
-
styling: { default: "" },
|
|
432
|
-
size: { default: "s" },
|
|
433
|
-
name: {},
|
|
434
|
-
title: {},
|
|
435
|
-
icon: {},
|
|
436
|
-
icon2: {},
|
|
437
|
-
href: {},
|
|
438
|
-
disabled: { type: Boolean },
|
|
439
|
-
isSubmit: { type: Boolean },
|
|
440
|
-
isActive: { type: Boolean },
|
|
441
|
-
isProgress: { type: Boolean }
|
|
442
|
-
},
|
|
443
|
-
setup(s) {
|
|
444
|
-
const e = s, a = b(() => e.href ? "a" : "button"), n = b(() => e.isSubmit ? "submit" : void 0);
|
|
445
|
-
return (o, t) => (u(), k(x(a.value), {
|
|
446
|
-
class: h({
|
|
447
|
-
"top-active": o.isActive,
|
|
448
|
-
"top-disabled": o.disabled,
|
|
449
|
-
"top-forms-focusable": !o.disabled,
|
|
450
|
-
"top-button": !0,
|
|
451
|
-
"top-button-progress": o.isProgress,
|
|
452
|
-
[`top-size_${o.size}`]: !!o.size,
|
|
453
|
-
[`top-color_${o.color}`]: !0,
|
|
454
|
-
[`top-style_${o.styling}`]: !!o.styling
|
|
455
|
-
}),
|
|
456
|
-
name: o.name,
|
|
457
|
-
title: o.title,
|
|
458
|
-
href: o.href,
|
|
459
|
-
type: n.value,
|
|
460
|
-
"data-top-icon": o.icon || void 0,
|
|
461
|
-
"data-top-icon2": o.icon2 || void 0,
|
|
462
|
-
disabled: o.disabled || void 0,
|
|
463
|
-
inProgress: o.isProgress
|
|
464
|
-
}, {
|
|
465
|
-
default: B(() => [
|
|
466
|
-
o.$slots.default ? (u(), m("span", Re, [
|
|
467
|
-
$(o.$slots, "default", {}, () => [
|
|
468
|
-
ee(_(o.icon ? "" : "Button"), 1)
|
|
469
|
-
])
|
|
470
|
-
])) : v("", !0)
|
|
471
|
-
]),
|
|
472
|
-
_: 3
|
|
473
|
-
}, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
|
|
474
|
-
}
|
|
475
|
-
}), Te = "_progress_1f1nw_1", Ae = {
|
|
476
|
-
"top-button": "top-button",
|
|
477
|
-
"top-active": "top-active",
|
|
478
|
-
"top-button-progress": "top-button-progress",
|
|
479
|
-
progress: Te,
|
|
480
|
-
"top-color_blue": "top-color_blue",
|
|
481
|
-
"top-color_green": "top-color_green",
|
|
482
|
-
"top-color_orange": "top-color_orange",
|
|
483
|
-
"top-color_red": "top-color_red",
|
|
484
|
-
"top-color_pink": "top-color_pink",
|
|
485
|
-
"top-color_theme": "top-color_theme",
|
|
486
|
-
"top-style_outline": "top-style_outline",
|
|
487
|
-
"top-style_soft": "top-style_soft",
|
|
488
|
-
"top-style_transparent": "top-style_transparent",
|
|
489
|
-
"top-size_l": "top-size_l",
|
|
490
|
-
"top-size_xl": "top-size_xl"
|
|
491
|
-
}, Oe = {
|
|
492
|
-
$style: Ae
|
|
493
|
-
}, Wt = /* @__PURE__ */ y(Fe, [["__cssModules", Oe]]), Pe = { class: "top-forms-optionLabel" }, We = /* @__PURE__ */ g({
|
|
494
|
-
__name: "controlLabel",
|
|
495
|
-
props: {
|
|
496
|
-
description: {},
|
|
497
|
-
disabled: { type: Boolean }
|
|
498
|
-
},
|
|
499
|
-
setup(s) {
|
|
500
|
-
return (e, a) => (u(), m("div", Pe, [
|
|
501
|
-
w("div", {
|
|
502
|
-
class: h({
|
|
503
|
-
"top-forms-optionLabel_title": !0,
|
|
504
|
-
"top-forms-optionLabel_title-disabled": e.disabled
|
|
505
|
-
})
|
|
506
|
-
}, [
|
|
507
|
-
$(e.$slots, "default")
|
|
508
|
-
], 2),
|
|
509
|
-
e.description ? (u(), m("div", {
|
|
510
|
-
key: 0,
|
|
511
|
-
class: h(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": e.disabled }])
|
|
512
|
-
}, _(e.description), 3)) : v("", !0)
|
|
513
|
-
]));
|
|
514
|
-
}
|
|
515
|
-
}), Ue = {
|
|
516
|
-
"top-forms-optionLabel": "top-forms-optionLabel",
|
|
517
|
-
"top-forms-optionLabel_title": "top-forms-optionLabel_title",
|
|
518
|
-
"top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
|
|
519
|
-
"top-forms-optionLabel_description": "top-forms-optionLabel_description",
|
|
520
|
-
"top-forms-optionLabel_description-disabled": "top-forms-optionLabel_description-disabled"
|
|
521
|
-
}, He = {
|
|
522
|
-
$style: Ue
|
|
523
|
-
}, U = /* @__PURE__ */ y(We, [["__cssModules", He]]), Ie = ["name", "value", "indeterminate", "disabled"], Ne = /* @__PURE__ */ g({
|
|
524
|
-
__name: "checkbox",
|
|
525
|
-
props: {
|
|
526
|
-
modelValue: { type: [Boolean, Array, Set] },
|
|
527
|
-
name: {},
|
|
528
|
-
value: {},
|
|
529
|
-
description: {},
|
|
530
|
-
disabled: { type: Boolean },
|
|
531
|
-
indeterminate: { type: Boolean },
|
|
532
|
-
isError: { type: Boolean }
|
|
533
|
-
},
|
|
534
|
-
emits: ["update:modelValue"],
|
|
535
|
-
setup(s, { emit: e }) {
|
|
536
|
-
const a = s, n = e, o = b({
|
|
537
|
-
get() {
|
|
538
|
-
return a.modelValue;
|
|
539
|
-
},
|
|
540
|
-
set(t) {
|
|
541
|
-
n("update:modelValue", t);
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
return (t, r) => (u(), m("label", {
|
|
545
|
-
class: h({
|
|
546
|
-
"top-forms-optionWrapper": !0,
|
|
547
|
-
"top-checkbox": !0,
|
|
548
|
-
["top-checkbox_" + t.name]: t.name !== "",
|
|
549
|
-
"top-disabled": t.disabled,
|
|
550
|
-
"top-error": t.isError && !t.disabled
|
|
551
|
-
})
|
|
552
|
-
}, [
|
|
553
|
-
M(w("input", {
|
|
554
|
-
type: "checkbox",
|
|
555
|
-
class: h({
|
|
556
|
-
"top-forms-focusable": !t.disabled,
|
|
557
|
-
"top-forms-option": !0,
|
|
558
|
-
"top-checkbox_input": !0,
|
|
559
|
-
"top-error": t.isError && !t.disabled
|
|
560
|
-
}),
|
|
561
|
-
name: t.name,
|
|
562
|
-
"onUpdate:modelValue": r[0] || (r[0] = (i) => o.value = i),
|
|
563
|
-
value: t.value,
|
|
564
|
-
indeterminate: t.indeterminate,
|
|
565
|
-
disabled: t.disabled
|
|
566
|
-
}, null, 10, Ie), [
|
|
567
|
-
[J, o.value]
|
|
568
|
-
]),
|
|
569
|
-
t.$slots.default ? (u(), k(U, {
|
|
570
|
-
key: 0,
|
|
571
|
-
description: t.description,
|
|
572
|
-
disabled: t.disabled
|
|
573
|
-
}, {
|
|
574
|
-
default: B(() => [
|
|
575
|
-
$(t.$slots, "default")
|
|
576
|
-
]),
|
|
577
|
-
_: 3
|
|
578
|
-
}, 8, ["description", "disabled"])) : v("", !0)
|
|
579
|
-
], 2));
|
|
580
|
-
}
|
|
581
|
-
}), je = {
|
|
582
|
-
"top-checkbox": "top-checkbox",
|
|
583
|
-
"top-checkbox_input": "top-checkbox_input",
|
|
584
|
-
"top-error": "top-error"
|
|
585
|
-
}, Ye = {
|
|
586
|
-
$style: je
|
|
587
|
-
}, Ut = /* @__PURE__ */ y(Ne, [["__cssModules", Ye]]), qe = ["title"], Ge = /* @__PURE__ */ g({
|
|
588
|
-
__name: "hint",
|
|
589
|
-
props: {
|
|
590
|
-
hint: {}
|
|
591
|
-
},
|
|
592
|
-
setup(s) {
|
|
593
|
-
return (e, a) => (u(), m("span", {
|
|
594
|
-
class: "top-hint",
|
|
595
|
-
"data-top-icon": "",
|
|
596
|
-
title: e.hint
|
|
597
|
-
}, null, 8, qe));
|
|
598
|
-
}
|
|
599
|
-
}), Ke = {
|
|
600
|
-
"top-hint": "top-hint"
|
|
601
|
-
}, Qe = {
|
|
602
|
-
$style: Ke
|
|
603
|
-
}, Xe = /* @__PURE__ */ y(Ge, [["__cssModules", Qe]]), Je = ["data-top-icon", "data-top-icon2"], Ze = ["name", "title", "placeholder", "disabled", "readonly"], xe = ["onClick"], et = {
|
|
604
|
-
key: 1,
|
|
605
|
-
class: "top-formsCaption"
|
|
606
|
-
}, tt = /* @__PURE__ */ g({
|
|
607
|
-
inheritAttrs: !1,
|
|
608
|
-
__name: "input",
|
|
609
|
-
props: {
|
|
610
|
-
modelValue: {},
|
|
611
|
-
name: {},
|
|
612
|
-
disabled: { type: Boolean },
|
|
613
|
-
readonly: { type: Boolean },
|
|
614
|
-
title: {},
|
|
615
|
-
captionType: { default: "" },
|
|
616
|
-
size: { default: "s" },
|
|
617
|
-
icon: {},
|
|
618
|
-
icon2: {},
|
|
619
|
-
addCleaner: { type: Boolean },
|
|
620
|
-
isError: { type: Boolean },
|
|
621
|
-
modificator: {}
|
|
622
|
-
},
|
|
623
|
-
emits: ["update:modelValue"],
|
|
624
|
-
setup(s, { emit: e }) {
|
|
625
|
-
const a = s, n = e, o = b({
|
|
626
|
-
get() {
|
|
627
|
-
return a.modelValue;
|
|
628
|
-
},
|
|
629
|
-
set(i) {
|
|
630
|
-
n("update:modelValue", i);
|
|
631
|
-
}
|
|
632
|
-
}), t = b(() => a.addCleaner && !a.title || a.captionType !== "" ? "" : a.title), r = () => {
|
|
633
|
-
n("update:modelValue", "");
|
|
634
|
-
};
|
|
635
|
-
return (i, l) => (u(), m("label", {
|
|
636
|
-
class: h({
|
|
637
|
-
"top-input": !0,
|
|
638
|
-
["top-size_" + i.size]: !0,
|
|
639
|
-
"top-disabled": i.disabled,
|
|
640
|
-
["top-input-" + i.modificator]: !!i.modificator,
|
|
641
|
-
"top-input-withCleaner": i.addCleaner && o.value && o.value !== "0000-00-00",
|
|
642
|
-
"top-formsCaptionWrapper": i.captionType !== "",
|
|
643
|
-
"top-formsCaptionWrapper-always": i.captionType === "top"
|
|
644
|
-
}),
|
|
645
|
-
"data-top-icon": i.icon,
|
|
646
|
-
"data-top-icon2": i.icon2
|
|
647
|
-
}, [
|
|
648
|
-
M(w("input", D({
|
|
649
|
-
type: "text",
|
|
650
|
-
class: {
|
|
651
|
-
"top-input_input": !0,
|
|
652
|
-
["top-input_input-" + i.modificator]: !!i.modificator,
|
|
653
|
-
"top-forms-focusable": !i.disabled,
|
|
654
|
-
"top-error": i.isError
|
|
655
|
-
},
|
|
656
|
-
autocomplete: "off_always",
|
|
657
|
-
name: i.name,
|
|
658
|
-
"onUpdate:modelValue": l[0] || (l[0] = (d) => o.value = d),
|
|
659
|
-
title: i.title,
|
|
660
|
-
placeholder: t.value,
|
|
661
|
-
disabled: i.disabled,
|
|
662
|
-
readonly: i.readonly,
|
|
663
|
-
onKeydown: l[1] || (l[1] = te(I(() => (i.addCleaner || !!i.$slots.btn) && r(), ["stop"]), ["esc"]))
|
|
664
|
-
}, i.$attrs), null, 16, Ze), [
|
|
665
|
-
[Z, o.value]
|
|
666
|
-
]),
|
|
667
|
-
i.addCleaner && o.value && o.value !== "0000-00-00" ? (u(), m("span", {
|
|
668
|
-
key: 0,
|
|
669
|
-
class: "top-input_cleaner",
|
|
670
|
-
"data-top-icon": "",
|
|
671
|
-
onClick: I(r, ["prevent"])
|
|
672
|
-
}, null, 8, xe)) : v("", !0),
|
|
673
|
-
i.captionType !== "" ? (u(), m("span", et, _(i.title), 1)) : v("", !0),
|
|
674
|
-
$(i.$slots, "default")
|
|
675
|
-
], 10, Je));
|
|
676
|
-
}
|
|
677
|
-
}), ot = {
|
|
678
|
-
"top-input": "top-input",
|
|
679
|
-
"top-input_input": "top-input_input",
|
|
680
|
-
"top-input-withCleaner": "top-input-withCleaner",
|
|
681
|
-
"top-input_cleaner": "top-input_cleaner"
|
|
682
|
-
}, at = {
|
|
683
|
-
$style: ot
|
|
684
|
-
}, q = /* @__PURE__ */ y(tt, [["__cssModules", at]]), st = ["modelValue"], nt = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
|
|
685
|
-
let G = (s) => {
|
|
686
|
-
};
|
|
687
|
-
const it = /* @__PURE__ */ g({
|
|
688
|
-
__name: "inputDate",
|
|
689
|
-
props: {
|
|
690
|
-
modelValue: {},
|
|
691
|
-
name: {},
|
|
692
|
-
disabled: { type: Boolean },
|
|
693
|
-
readonly: { type: Boolean },
|
|
694
|
-
title: {},
|
|
695
|
-
captionType: {},
|
|
696
|
-
size: {},
|
|
697
|
-
icon: {},
|
|
698
|
-
icon2: { default: "" },
|
|
699
|
-
addCleaner: { type: Boolean },
|
|
700
|
-
isError: { type: Boolean },
|
|
701
|
-
modificator: {}
|
|
702
|
-
},
|
|
703
|
-
emits: ["update:modelValue"],
|
|
704
|
-
setup(s, { emit: e }) {
|
|
705
|
-
const a = s, n = e, o = oe(), t = b({
|
|
706
|
-
get() {
|
|
707
|
-
return V.dateFormat(a.modelValue, 2, "0000-00-00");
|
|
708
|
-
},
|
|
709
|
-
set(d) {
|
|
710
|
-
d = V.dateUnformat(d, "0000-00-00"), n("update:modelValue", d);
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
let r = (d) => {
|
|
714
|
-
G(d);
|
|
715
|
-
}, i = (d) => {
|
|
716
|
-
const f = V.dateUnformat(d.target.value), c = V.dateFormat(f);
|
|
717
|
-
if (!c || c === p.L.Not_date || d.target.value !== c) {
|
|
718
|
-
d.target.value = t.value;
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
t.value = d.target.value;
|
|
722
|
-
};
|
|
723
|
-
async function l(d) {
|
|
724
|
-
const f = await import("./datepicker-92744062.es.js");
|
|
725
|
-
G = f.oninput;
|
|
726
|
-
const c = f.connectDatepicker(d.target, {
|
|
727
|
-
onSelect: () => i(d)
|
|
728
|
-
});
|
|
729
|
-
c && (c.datepicker("show"), ae(() => c.datepicker("destroy")));
|
|
730
|
-
}
|
|
731
|
-
return (d, f) => S(nt) ? (u(), k(S(q), D({ key: 0 }, d.$props, {
|
|
732
|
-
modelValue: t.value,
|
|
733
|
-
readonly: "",
|
|
734
|
-
onClick: f[1] || (f[1] = (c) => o.value.showPicker())
|
|
735
|
-
}), {
|
|
736
|
-
default: B(() => [
|
|
737
|
-
w("input", {
|
|
738
|
-
ref_key: "el",
|
|
739
|
-
ref: o,
|
|
740
|
-
type: "date",
|
|
741
|
-
class: "top-input_input-date",
|
|
742
|
-
modelValue: d.modelValue,
|
|
743
|
-
onChange: f[0] || (f[0] = (c) => t.value = c.target.value),
|
|
744
|
-
tabindex: "-1"
|
|
745
|
-
}, null, 40, st)
|
|
746
|
-
]),
|
|
747
|
-
_: 1
|
|
748
|
-
}, 16, ["modelValue"])) : (u(), k(S(q), D({ key: 1 }, d.$props, {
|
|
749
|
-
modelValue: t.value,
|
|
750
|
-
"onUpdate:modelValue": f[2] || (f[2] = (c) => c === "" ? t.value = "" : ""),
|
|
751
|
-
onInput: S(r),
|
|
752
|
-
onFocusOnce: l,
|
|
753
|
-
onChange: S(i),
|
|
754
|
-
modificator: "datepicker"
|
|
755
|
-
}), null, 16, ["modelValue", "onInput", "onChange"]));
|
|
756
|
-
}
|
|
757
|
-
}), lt = {
|
|
758
|
-
"top-input-datepicker": "top-input-datepicker",
|
|
759
|
-
"top-input_input-date": "top-input_input-date"
|
|
760
|
-
}, rt = {
|
|
761
|
-
$style: lt
|
|
762
|
-
}, Ht = /* @__PURE__ */ y(it, [["__cssModules", rt]]), dt = { class: "top-inputRange" }, pt = /* @__PURE__ */ w("span", { class: "top-inputRange_dash" }, " — ", -1), ut = /* @__PURE__ */ g({
|
|
763
|
-
__name: "inputRange",
|
|
764
|
-
setup(s) {
|
|
765
|
-
return (e, a) => (u(), m("div", dt, [
|
|
766
|
-
$(e.$slots, "from"),
|
|
767
|
-
pt,
|
|
768
|
-
$(e.$slots, "to")
|
|
769
|
-
]));
|
|
770
|
-
}
|
|
771
|
-
}), ct = {
|
|
772
|
-
"top-inputRange": "top-inputRange",
|
|
773
|
-
"top-inputRange_dash": "top-inputRange_dash",
|
|
774
|
-
"top-input": "top-input"
|
|
775
|
-
}, mt = {
|
|
776
|
-
$style: ct
|
|
777
|
-
}, It = /* @__PURE__ */ y(ut, [["__cssModules", mt]]), ft = ["name", "value", "disabled"], bt = /* @__PURE__ */ g({
|
|
778
|
-
__name: "radio",
|
|
779
|
-
props: {
|
|
780
|
-
modelValue: {},
|
|
781
|
-
value: {},
|
|
782
|
-
name: {},
|
|
783
|
-
description: {},
|
|
784
|
-
disabled: { type: Boolean },
|
|
785
|
-
isError: { type: Boolean }
|
|
786
|
-
},
|
|
787
|
-
emits: ["update:modelValue"],
|
|
788
|
-
setup(s, { emit: e }) {
|
|
789
|
-
const a = s, n = e, o = b({
|
|
790
|
-
get() {
|
|
791
|
-
return a.modelValue;
|
|
792
|
-
},
|
|
793
|
-
set(t) {
|
|
794
|
-
n("update:modelValue", t);
|
|
795
|
-
}
|
|
796
|
-
});
|
|
797
|
-
return (t, r) => (u(), m("label", {
|
|
798
|
-
class: h({
|
|
799
|
-
"top-forms-optionWrapper": !0,
|
|
800
|
-
"top-radio": !0,
|
|
801
|
-
["top-radio_" + t.name]: t.name !== "",
|
|
802
|
-
"top-disabled": t.disabled,
|
|
803
|
-
"top-error": t.isError && !t.disabled
|
|
804
|
-
})
|
|
805
|
-
}, [
|
|
806
|
-
M(w("input", {
|
|
807
|
-
type: "radio",
|
|
808
|
-
class: h({
|
|
809
|
-
"top-forms-focusable": !t.disabled,
|
|
810
|
-
"top-forms-option": !0,
|
|
811
|
-
"top-radio_input": !0,
|
|
812
|
-
"top-error": t.isError && !t.disabled
|
|
813
|
-
}),
|
|
814
|
-
"onUpdate:modelValue": r[0] || (r[0] = (i) => o.value = i),
|
|
815
|
-
name: t.name,
|
|
816
|
-
value: t.value,
|
|
817
|
-
disabled: t.disabled
|
|
818
|
-
}, null, 10, ft), [
|
|
819
|
-
[se, o.value]
|
|
820
|
-
]),
|
|
821
|
-
t.$slots.default ? (u(), k(U, {
|
|
822
|
-
key: 0,
|
|
823
|
-
description: t.description,
|
|
824
|
-
disabled: t.disabled
|
|
825
|
-
}, {
|
|
826
|
-
default: B(() => [
|
|
827
|
-
$(t.$slots, "default")
|
|
828
|
-
]),
|
|
829
|
-
_: 3
|
|
830
|
-
}, 8, ["description", "disabled"])) : v("", !0)
|
|
831
|
-
], 2));
|
|
832
|
-
}
|
|
833
|
-
}), ht = {
|
|
834
|
-
"top-radio": "top-radio",
|
|
835
|
-
"top-radio_input": "top-radio_input",
|
|
836
|
-
"top-error": "top-error"
|
|
837
|
-
}, vt = {
|
|
838
|
-
$style: ht
|
|
839
|
-
}, Nt = /* @__PURE__ */ y(bt, [["__cssModules", vt]]), gt = ["name", "value", "disabled"], yt = /* @__PURE__ */ g({
|
|
840
|
-
__name: "switcher",
|
|
841
|
-
props: {
|
|
842
|
-
modelValue: { type: [Boolean, Array, Set] },
|
|
843
|
-
name: {},
|
|
844
|
-
value: {},
|
|
845
|
-
description: {},
|
|
846
|
-
disabled: { type: Boolean },
|
|
847
|
-
isError: { type: Boolean }
|
|
848
|
-
},
|
|
849
|
-
emits: ["update:modelValue"],
|
|
850
|
-
setup(s, { emit: e }) {
|
|
851
|
-
const a = s, n = e, o = b({
|
|
852
|
-
get() {
|
|
853
|
-
return a.modelValue;
|
|
854
|
-
},
|
|
855
|
-
set(t) {
|
|
856
|
-
n("update:modelValue", t);
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
return (t, r) => (u(), m("label", {
|
|
860
|
-
class: h({
|
|
861
|
-
"top-forms-optionWrapper": !0,
|
|
862
|
-
"top-checkboxSwitcher": !0,
|
|
863
|
-
"top-disabled": t.disabled,
|
|
864
|
-
"top-error": t.isError && !t.disabled
|
|
865
|
-
})
|
|
866
|
-
}, [
|
|
867
|
-
M(w("input", {
|
|
868
|
-
type: "checkbox",
|
|
869
|
-
class: h({
|
|
870
|
-
"top-forms-focusable": !t.disabled,
|
|
871
|
-
"top-forms-option": !0,
|
|
872
|
-
"top-checkboxSwitcher_input": !0,
|
|
873
|
-
"top-error": t.isError && !t.disabled
|
|
874
|
-
}),
|
|
875
|
-
"onUpdate:modelValue": r[0] || (r[0] = (i) => o.value = i),
|
|
876
|
-
name: t.name,
|
|
877
|
-
value: t.value,
|
|
878
|
-
disabled: t.disabled
|
|
879
|
-
}, null, 10, gt), [
|
|
880
|
-
[J, o.value]
|
|
881
|
-
]),
|
|
882
|
-
t.$slots.default ? (u(), k(U, {
|
|
883
|
-
key: 0,
|
|
884
|
-
description: t.description,
|
|
885
|
-
disabled: t.disabled
|
|
886
|
-
}, {
|
|
887
|
-
default: B(() => [
|
|
888
|
-
$(t.$slots, "default")
|
|
889
|
-
]),
|
|
890
|
-
_: 3
|
|
891
|
-
}, 8, ["description", "disabled"])) : v("", !0)
|
|
892
|
-
], 2));
|
|
893
|
-
}
|
|
894
|
-
}), wt = {
|
|
895
|
-
"top-checkboxSwitcher": "top-checkboxSwitcher",
|
|
896
|
-
"top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
|
|
897
|
-
"top-error": "top-error"
|
|
898
|
-
}, $t = {
|
|
899
|
-
$style: wt
|
|
900
|
-
}, jt = /* @__PURE__ */ y(yt, [["__cssModules", $t]]), _t = ["name", "placeholder", "disabled", "readonly", "rows"], kt = {
|
|
901
|
-
key: 0,
|
|
902
|
-
class: "top-textarea_pseudoContent"
|
|
903
|
-
}, Mt = /* @__PURE__ */ g({
|
|
904
|
-
inheritAttrs: !1,
|
|
905
|
-
__name: "textarea",
|
|
906
|
-
props: {
|
|
907
|
-
modelValue: {},
|
|
908
|
-
name: {},
|
|
909
|
-
placeholder: {},
|
|
910
|
-
rows: { default: 5 },
|
|
911
|
-
minHeight: { default: 120 },
|
|
912
|
-
expandable: { type: Boolean },
|
|
913
|
-
disabled: { type: Boolean },
|
|
914
|
-
readonly: { type: Boolean },
|
|
915
|
-
isError: { type: Boolean },
|
|
916
|
-
hint: {}
|
|
917
|
-
},
|
|
918
|
-
emits: ["update:modelValue"],
|
|
919
|
-
setup(s, { emit: e }) {
|
|
920
|
-
X((t) => ({
|
|
921
|
-
c838a038: t.minHeight + "px"
|
|
922
|
-
}));
|
|
923
|
-
const a = s, n = e, o = b({
|
|
924
|
-
get() {
|
|
925
|
-
return a.modelValue;
|
|
926
|
-
},
|
|
927
|
-
set(t) {
|
|
928
|
-
n("update:modelValue", t);
|
|
929
|
-
}
|
|
930
|
-
});
|
|
931
|
-
return (t, r) => {
|
|
932
|
-
const i = ne("top-tooltip");
|
|
933
|
-
return u(), m("label", {
|
|
934
|
-
class: h({
|
|
935
|
-
"top-textarea": !0,
|
|
936
|
-
["top-textarea-" + t.name]: t.name,
|
|
937
|
-
"top-disabled": t.disabled
|
|
938
|
-
})
|
|
939
|
-
}, [
|
|
940
|
-
M(w("textarea", D({
|
|
941
|
-
type: "text",
|
|
942
|
-
class: {
|
|
943
|
-
"top-forms-focusable": !t.disabled,
|
|
944
|
-
"top-textarea_textarea": !0,
|
|
945
|
-
"top-textarea_textarea-expandable": t.expandable,
|
|
946
|
-
"top-error": t.isError
|
|
947
|
-
},
|
|
948
|
-
autocomplete: "off_always",
|
|
949
|
-
name: t.name,
|
|
950
|
-
placeholder: t.placeholder,
|
|
951
|
-
disabled: t.disabled,
|
|
952
|
-
readonly: t.readonly,
|
|
953
|
-
rows: t.expandable ? void 0 : t.rows
|
|
954
|
-
}, t.$attrs, {
|
|
955
|
-
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l)
|
|
956
|
-
}), null, 16, _t), [
|
|
957
|
-
[Z, o.value]
|
|
958
|
-
]),
|
|
959
|
-
t.expandable ? (u(), m("div", kt, _(o.value + " "), 1)) : v("", !0),
|
|
960
|
-
t.hint ? M((u(), k(Xe, {
|
|
961
|
-
key: 1,
|
|
962
|
-
class: "top-textarea_hint",
|
|
963
|
-
hint: t.hint
|
|
964
|
-
}, null, 8, ["hint"])), [
|
|
965
|
-
[i]
|
|
966
|
-
]) : v("", !0)
|
|
967
|
-
], 2);
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
}), St = {
|
|
971
|
-
"top-textarea": "top-textarea",
|
|
972
|
-
"top-textarea_textarea": "top-textarea_textarea",
|
|
973
|
-
"top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
|
|
974
|
-
"top-textarea_pseudoContent": "top-textarea_pseudoContent",
|
|
975
|
-
"top-textarea_hint": "top-textarea_hint"
|
|
976
|
-
}, Vt = {
|
|
977
|
-
$style: St
|
|
978
|
-
}, Yt = /* @__PURE__ */ y(Mt, [["__cssModules", Vt]]), Bt = ["data-value", "data-top-icon", "data-top-icon2"], Et = ["name", "disabled"], Lt = ["label", "disabled"], zt = ["value", "selected", "disabled"], Dt = ["value", "selected", "disabled"], Ct = {
|
|
979
|
-
key: 1,
|
|
980
|
-
class: "top-formsCaption"
|
|
981
|
-
}, Rt = /* @__PURE__ */ g({
|
|
982
|
-
__name: "select",
|
|
983
|
-
props: {
|
|
984
|
-
modelValue: {},
|
|
985
|
-
options: {},
|
|
986
|
-
name: {},
|
|
987
|
-
disabled: { type: Boolean },
|
|
988
|
-
icon: {},
|
|
989
|
-
size: { default: "s" },
|
|
990
|
-
addChanger: { type: Boolean },
|
|
991
|
-
title: {},
|
|
992
|
-
isError: { type: Boolean }
|
|
993
|
-
},
|
|
994
|
-
emits: ["update:modelValue"],
|
|
995
|
-
setup(s, { emit: e }) {
|
|
996
|
-
const a = s, n = e, o = b({
|
|
997
|
-
get() {
|
|
998
|
-
return a.modelValue;
|
|
999
|
-
},
|
|
1000
|
-
set(l) {
|
|
1001
|
-
n("update:modelValue", l);
|
|
1002
|
-
}
|
|
1003
|
-
}), t = b(() => {
|
|
1004
|
-
var l;
|
|
1005
|
-
return (l = r.value.get(o.value)) == null ? void 0 : l.icon;
|
|
1006
|
-
}), r = b(() => {
|
|
1007
|
-
const l = /* @__PURE__ */ new Map();
|
|
1008
|
-
return a.options.forEach((d) => {
|
|
1009
|
-
if (!d.disabled) {
|
|
1010
|
-
if (d.children) {
|
|
1011
|
-
d.children.forEach((f) => {
|
|
1012
|
-
f.disabled || l.set(f.value, f);
|
|
1013
|
-
});
|
|
1014
|
-
return;
|
|
1015
|
-
}
|
|
1016
|
-
l.set(d.value, d);
|
|
1017
|
-
}
|
|
1018
|
-
}), l;
|
|
1019
|
-
});
|
|
1020
|
-
ie([
|
|
1021
|
-
le(a.modelValue),
|
|
1022
|
-
r
|
|
1023
|
-
], () => {
|
|
1024
|
-
(o.value === null || o.value === void 0) && r.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), o.value = r.value.keys().next().value);
|
|
1025
|
-
}, { immediate: !0 });
|
|
1026
|
-
const i = () => {
|
|
1027
|
-
const l = [...r.value.keys()], f = (l.indexOf(o.value) + 1) % l.length;
|
|
1028
|
-
o.value = l[f];
|
|
1029
|
-
};
|
|
1030
|
-
return (l, d) => (u(), m("label", {
|
|
1031
|
-
class: h({
|
|
1032
|
-
"top-select": !0,
|
|
1033
|
-
["top-select-" + l.name]: l.name,
|
|
1034
|
-
["top-size_" + l.size]: !0,
|
|
1035
|
-
"top-formsCaptionWrapper": !!l.title,
|
|
1036
|
-
"top-select-error": l.isError,
|
|
1037
|
-
"top-disabled": l.disabled
|
|
1038
|
-
}),
|
|
1039
|
-
"data-value": o.value,
|
|
1040
|
-
"data-top-icon": l.icon,
|
|
1041
|
-
"data-top-icon2": t.value
|
|
1042
|
-
}, [
|
|
1043
|
-
M(w("select", {
|
|
1044
|
-
class: h({
|
|
1045
|
-
"top-forms-focusable": !l.disabled,
|
|
1046
|
-
"top-select_select": !0,
|
|
1047
|
-
"top-select_arrow": !0,
|
|
1048
|
-
"top-error": l.isError
|
|
1049
|
-
}),
|
|
1050
|
-
name: l.name,
|
|
1051
|
-
disabled: l.disabled,
|
|
1052
|
-
"onUpdate:modelValue": d[0] || (d[0] = (f) => o.value = f)
|
|
1053
|
-
}, [
|
|
1054
|
-
(u(!0), m(F, null, N(l.options.entries(), ([f, c]) => (u(), m(F, null, [
|
|
1055
|
-
c.children ? (u(), m("optgroup", {
|
|
1056
|
-
key: "group_" + c.value,
|
|
1057
|
-
label: c.title,
|
|
1058
|
-
disabled: c.disabled
|
|
1059
|
-
}, [
|
|
1060
|
-
(u(!0), m(F, null, N(c.children.entries(), ([At, E]) => (u(), m("option", {
|
|
1061
|
-
key: c.value,
|
|
1062
|
-
value: E.value,
|
|
1063
|
-
selected: E.value === o.value,
|
|
1064
|
-
disabled: E.disabled
|
|
1065
|
-
}, _(E.title), 9, zt))), 128))
|
|
1066
|
-
], 8, Lt)) : (u(), m("option", {
|
|
1067
|
-
key: c.value,
|
|
1068
|
-
value: c.value,
|
|
1069
|
-
selected: c.value === o.value,
|
|
1070
|
-
disabled: c.disabled
|
|
1071
|
-
}, _(c.title), 9, Dt))
|
|
1072
|
-
], 64))), 256))
|
|
1073
|
-
], 10, Et), [
|
|
1074
|
-
[re, o.value]
|
|
1075
|
-
]),
|
|
1076
|
-
l.addChanger && r.value.size && !l.disabled ? (u(), m("span", {
|
|
1077
|
-
key: 0,
|
|
1078
|
-
class: "top-changer",
|
|
1079
|
-
onClick: i
|
|
1080
|
-
})) : v("", !0),
|
|
1081
|
-
l.title ? (u(), m("span", Ct, _(l.title), 1)) : v("", !0)
|
|
1082
|
-
], 10, Bt));
|
|
1083
|
-
}
|
|
1084
|
-
}), Ft = {
|
|
1085
|
-
"top-select": "top-select",
|
|
1086
|
-
"top-select-error": "top-select-error",
|
|
1087
|
-
"top-select_select": "top-select_select",
|
|
1088
|
-
"top-changer": "top-changer"
|
|
1089
|
-
}, Tt = {
|
|
1090
|
-
$style: Ft
|
|
1091
|
-
}, qt = /* @__PURE__ */ y(Rt, [["__cssModules", Tt]]);
|
|
1092
|
-
export {
|
|
1093
|
-
Wt as B,
|
|
1094
|
-
p as C,
|
|
1095
|
-
ge as D,
|
|
1096
|
-
ke as E,
|
|
1097
|
-
Xe as H,
|
|
1098
|
-
q as I,
|
|
1099
|
-
Yt as T,
|
|
1100
|
-
V as U,
|
|
1101
|
-
y as _,
|
|
1102
|
-
T as a,
|
|
1103
|
-
Pt as b,
|
|
1104
|
-
Ut as c,
|
|
1105
|
-
U as d,
|
|
1106
|
-
It as e,
|
|
1107
|
-
qt as f,
|
|
1108
|
-
Ht as i,
|
|
1109
|
-
Nt as r,
|
|
1110
|
-
jt as s
|
|
1111
|
-
};
|
|
1112
|
-
//# sourceMappingURL=forms-727cc6aa.es.js.map
|