@studio-west/component-sw 0.10.6 → 0.10.8
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/LICENSE +1 -1
- package/README.md +47 -15
- package/dist/{SwDatePicker-DzzctRA-.js → SwDatePicker-DPL2xnfr.js} +81 -84
- package/dist/{SwDropdownItem-kXL4N2up.js → SwDropdownItem-CKexOhlx.js} +1 -1
- package/dist/{SwGide-B5DT5KKs.js → SwGide-D0cE663C.js} +3 -3
- package/dist/SwInput-DW08IfrK.js +91 -0
- package/dist/{SwMessage-CFnGji1k.js → SwMessage-DGaPcMYb.js} +1 -1
- package/dist/{SwSlider-CKlxgVUe.js → SwSlider-t6njKr4X.js} +48 -51
- package/dist/component-sw.css +1 -1
- package/dist/index-C4bjIOWO.js +190 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -3
- package/dist/SwInput-DthSMerW.js +0 -107
- package/dist/index-DFzVt9LC.js +0 -165
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ const darkMode = () => {
|
|
|
85
85
|
```
|
|
86
86
|
## SwAlert
|
|
87
87
|
|
|
88
|
-
Функция / Компонент `SwAlert`
|
|
88
|
+
Функция / Компонент `SwAlert` система всплывающих сообщений. Сообщения могут быть с разным типом и временем показа. Могут иметь футер с кнопками.
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
### Свойства / Properties
|
|
@@ -206,11 +206,12 @@ input - событие выбора с данными {dateStart: "11.11.2011",
|
|
|
206
206
|
### Пример использования / Example Usage
|
|
207
207
|
|
|
208
208
|
```html
|
|
209
|
+
<script>const addDateStart = (date) => {console.log(date)}</script>
|
|
209
210
|
<sw-date-picker
|
|
210
211
|
:data="{startDate: '11.11.2011' endDate: '14-12-2011'}"
|
|
211
212
|
limitation=" [{endDate: '14-04-2025', startDate:'30-03-2025'}]"
|
|
212
213
|
range="range"
|
|
213
|
-
@
|
|
214
|
+
@input="addDateStart"
|
|
214
215
|
>
|
|
215
216
|
<template #double-arrow>«</template>
|
|
216
217
|
<template #arrow>‹</template>
|
|
@@ -239,6 +240,10 @@ Default - текст описания или модуль / модули
|
|
|
239
240
|
|
|
240
241
|
#dropdown - контент всплывающего окна
|
|
241
242
|
|
|
243
|
+
### Модель / Model
|
|
244
|
+
|
|
245
|
+
model - состояние меню, булевое значение открыто - true
|
|
246
|
+
|
|
242
247
|
### Пример использования / Example Usage
|
|
243
248
|
|
|
244
249
|
```html
|
|
@@ -313,6 +318,9 @@ Default - текст сообщения с картинкой
|
|
|
313
318
|
|
|
314
319
|
#arrow - слот для стрелок
|
|
315
320
|
|
|
321
|
+
### Модель / Model
|
|
322
|
+
|
|
323
|
+
model - массив обьектов шагов обучения
|
|
316
324
|
|
|
317
325
|
### Пример использования / Example Usage
|
|
318
326
|
|
|
@@ -365,6 +373,10 @@ Default - текст сообщения с картинкой
|
|
|
365
373
|
|
|
366
374
|
#suffix - вставка при отсутствии after не обязательно / Insertion when after is not used (optional).
|
|
367
375
|
|
|
376
|
+
### Модель / Model
|
|
377
|
+
|
|
378
|
+
model - значение поля ввода
|
|
379
|
+
|
|
368
380
|
### События / Events
|
|
369
381
|
|
|
370
382
|
prefix - клик иконке before
|
|
@@ -410,6 +422,10 @@ focusInput - focus на поле ввода
|
|
|
410
422
|
|
|
411
423
|
#footer - слот для подвала.
|
|
412
424
|
|
|
425
|
+
### Модель / Model
|
|
426
|
+
|
|
427
|
+
model - состояние компонента булевое значение, при true - окно открыто, при false - закрыто.
|
|
428
|
+
|
|
413
429
|
### Пример использования / Example Usage
|
|
414
430
|
|
|
415
431
|
```html
|
|
@@ -476,6 +492,9 @@ header - клик по всему Header
|
|
|
476
492
|
| `placeholder` | `String` | `` | Добавляет в placeholder описание. |
|
|
477
493
|
| `token` | `String` | `` | API-ключ для DADATA. |
|
|
478
494
|
|
|
495
|
+
### Модель / Model
|
|
496
|
+
|
|
497
|
+
model - текст ввода или выбора из списка
|
|
479
498
|
|
|
480
499
|
### Пример использования / Example Usage
|
|
481
500
|
|
|
@@ -535,22 +554,22 @@ Default - Содержимое
|
|
|
535
554
|
### Пример использования / Example Usage
|
|
536
555
|
|
|
537
556
|
```html
|
|
538
|
-
<sw-skeleton-item
|
|
539
|
-
|
|
540
|
-
name="switch"
|
|
557
|
+
<sw-skeleton-item
|
|
558
|
+
animate
|
|
541
559
|
class="custom-class"
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
>
|
|
546
|
-
<p>Описание / Description</p>
|
|
547
|
-
</sw-skeleton-item>
|
|
560
|
+
size="small"
|
|
561
|
+
width="60"
|
|
562
|
+
/>
|
|
548
563
|
```
|
|
549
564
|
---
|
|
550
565
|
|
|
551
566
|
## SwSlider
|
|
552
567
|
|
|
553
568
|
Компонент `SwSlider` представляет собой Мультислайдер с возможностью настройки внешнего вида ползунка. Количество ползунков зависит от входных данных 1 - число. n - массив из n чисел.
|
|
569
|
+
- отображения значений в виде всплывающих подсказок при наведении на бегунки:
|
|
570
|
+
- Поддержка как горизонтальной, так и вертикальной ориентации
|
|
571
|
+
- Адаптивное позиционирование подсказок в зависимости от доступного пространства
|
|
572
|
+
- Поддержка сенсорных устройств (touch events)
|
|
554
573
|
|
|
555
574
|
### Свойства / Properties
|
|
556
575
|
|
|
@@ -568,6 +587,10 @@ Default - Содержимое
|
|
|
568
587
|
|
|
569
588
|
Default - текст, картинка, svg - содержимое бегунка.
|
|
570
589
|
|
|
590
|
+
### Модель / Model
|
|
591
|
+
|
|
592
|
+
model - значение слайдера (число, массив чисел)
|
|
593
|
+
|
|
571
594
|
### Пример использования / Example Usage
|
|
572
595
|
|
|
573
596
|
```html
|
|
@@ -607,6 +630,10 @@ Default - текст, картинка, svg - содержимое бегунк
|
|
|
607
630
|
|
|
608
631
|
Default - текст описания
|
|
609
632
|
|
|
633
|
+
### Модель / Model
|
|
634
|
+
|
|
635
|
+
model - состояние чекбокса (checked ) булевое значение
|
|
636
|
+
|
|
610
637
|
### Пример использования / Example Usage
|
|
611
638
|
|
|
612
639
|
```html
|
|
@@ -635,7 +662,7 @@ Default - текст описания
|
|
|
635
662
|
|
|
636
663
|
### Слоты / Slots
|
|
637
664
|
|
|
638
|
-
|
|
665
|
+
#`<name>` - пре определение шаблона столбца
|
|
639
666
|
|
|
640
667
|
### Пример использования / Example Usage
|
|
641
668
|
|
|
@@ -669,9 +696,14 @@ Default - текст описания
|
|
|
669
696
|
|
|
670
697
|
Default - для компонентов SwTabsPane
|
|
671
698
|
|
|
699
|
+
### Модель / Model
|
|
700
|
+
|
|
701
|
+
model - индекс активной вкладки (по порядку в коде с 0)
|
|
702
|
+
|
|
672
703
|
### Пример использования / Example Usage
|
|
673
704
|
|
|
674
705
|
```html
|
|
706
|
+
<script>let activeTabId = 0 </script>
|
|
675
707
|
<sw-tabs
|
|
676
708
|
v-model="activeTabId"
|
|
677
709
|
class="custom-class"
|
|
@@ -710,10 +742,10 @@ Default - для вкладок
|
|
|
710
742
|
|
|
711
743
|
### Лицензия / License
|
|
712
744
|
|
|
713
|
-
Этот проект распространяется под лицензией MIT. Подробности см. в файле LICENSE . /
|
|
714
|
-
This project is distributed under the MIT License. For details, see the LICENSE file.
|
|
745
|
+
Этот проект распространяется под лицензией MIT. Подробности см. в файле [LICENSE](./LICENSE) . /
|
|
746
|
+
This project is distributed under the MIT License. For details, see the [LICENSE](./LICENSE) file.
|
|
715
747
|
|
|
716
748
|
---
|
|
717
749
|
|
|
718
750
|
Если у вас есть вопросы или предложения, пожалуйста, создайте issue на почту info@studiowest.ru. /
|
|
719
|
-
If you have any questions or suggestions, please create an issue to E-mail info@studiowest.ru.
|
|
751
|
+
If you have any questions or suggestions, please create an issue to E-mail info@studiowest.ru.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { p as
|
|
1
|
+
import { ref as D, computed as K, createElementBlock as r, openBlock as v, createElementVNode as o, createCommentVNode as j, withModifiers as c, renderSlot as w, createTextVNode as k, toDisplayString as f, unref as S, Fragment as b, renderList as Y, normalizeClass as A } from "vue";
|
|
2
|
+
import { p as $, a as B } from "./index-C4bjIOWO.js";
|
|
3
3
|
const oe = { class: "sw-data-picker" }, ue = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "month_year"
|
|
@@ -15,7 +15,7 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
15
15
|
}, ge = ["onClick"], pe = {
|
|
16
16
|
key: 4,
|
|
17
17
|
class: "year"
|
|
18
|
-
},
|
|
18
|
+
}, fe = ["onClick"], De = {
|
|
19
19
|
key: 5,
|
|
20
20
|
class: "month"
|
|
21
21
|
}, me = ["onClick"], we = { key: 0 }, ke = {
|
|
@@ -33,10 +33,10 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
33
33
|
}, Me = ["onClick"], Fe = {
|
|
34
34
|
key: 4,
|
|
35
35
|
class: "year"
|
|
36
|
-
},
|
|
36
|
+
}, Se = ["onClick"], Ye = {
|
|
37
37
|
key: 5,
|
|
38
38
|
class: "month"
|
|
39
|
-
},
|
|
39
|
+
}, Te = ["onClick"], Ne = {
|
|
40
40
|
__name: "SwDatePicker",
|
|
41
41
|
props: {
|
|
42
42
|
data: Object,
|
|
@@ -52,22 +52,19 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
52
52
|
emits: ["input"],
|
|
53
53
|
setup(ee, { emit: te }) {
|
|
54
54
|
var U, X, Z, _;
|
|
55
|
-
const s = ee, L = te, d =
|
|
55
|
+
const s = ee, L = te, d = D(5), C = D(/* @__PURE__ */ new Date()), z = D(/* @__PURE__ */ new Date()), u = D((/* @__PURE__ */ new Date()).getFullYear()), n = D((/* @__PURE__ */ new Date()).getMonth()), q = D((/* @__PURE__ */ new Date()).getFullYear()), x = D((/* @__PURE__ */ new Date()).getMonth()), O = D(new Date(u.value, n.value + 1, 1).getMonth()), i = D([]), V = D(0), m = D(-1), F = D(-1), G = D(navigator.language || "ru"), E = /en|zh|ja|he/.test(G.value) ? 0 : 1, H = K(() => Array.from({ length: 12 }, (a, e) => {
|
|
56
56
|
const t = new Date(2024, e);
|
|
57
57
|
return new Intl.DateTimeFormat(G.value, { month: "long" }).format(t);
|
|
58
|
-
})),
|
|
59
|
-
|
|
60
|
-
return e[0].length > 2 ? e.join("-") + "T00:00:01" : e.reverse().join("-") + "T00:00:01";
|
|
61
|
-
};
|
|
62
|
-
(U = s.data) != null && U.startDate && (C.value = new Date(h(s.data.startDate)), u.value = C.value.getFullYear(), n.value = C.value.getMonth()), (X = s.data) != null && X.endDate && s.range === "range" && (z.value = new Date(h(s.data.endDate)), q.value = z.value.getFullYear(), x.value = z.value.getMonth());
|
|
58
|
+
})), T = D(Math.floor(u.value / 10) * 10), I = K(() => Array.from({ length: 12 }, (a, e) => T.value + e - 1));
|
|
59
|
+
(U = s.data) != null && U.startDate && (C.value = new Date($(s.data.startDate)), u.value = C.value.getFullYear(), n.value = C.value.getMonth()), (X = s.data) != null && X.endDate && s.range === "range" && (z.value = new Date($(s.data.endDate)), q.value = z.value.getFullYear(), x.value = z.value.getMonth());
|
|
63
60
|
const J = () => {
|
|
64
|
-
i.value = [],
|
|
61
|
+
i.value = [], V.value = 0;
|
|
65
62
|
const a = new Date(u.value, n.value, 0);
|
|
66
63
|
for (let t = a.getDate() - a.getDay() + E; t <= a.getDate(); t++)
|
|
67
|
-
a.getDay() !== 6 + E && (i.value.push({ day: t, month: a.getMonth(), year: a.getFullYear(), class: [] }),
|
|
64
|
+
a.getDay() !== 6 + E && (i.value.push({ day: t, month: a.getMonth(), year: a.getFullYear(), class: [] }), V.value++);
|
|
68
65
|
const e = new Date(u.value, n.value + 1, 0).getDate();
|
|
69
66
|
for (let t = 1; t <= e; t++)
|
|
70
|
-
i.value.push({ day: t, month: n.value, year: u.value, class: [] }),
|
|
67
|
+
i.value.push({ day: t, month: n.value, year: u.value, class: [] }), V.value++;
|
|
71
68
|
if (s.range === "range") {
|
|
72
69
|
const t = new Date(u.value, n.value + 1, 1), l = new Date(u.value, n.value + 2, 0).getDate();
|
|
73
70
|
for (let g = 1; g <= l; g++)
|
|
@@ -79,19 +76,19 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
79
76
|
if (!((e = s.data) != null && e.holiday)) return;
|
|
80
77
|
const a = (t, l) => {
|
|
81
78
|
t.forEach((g) => {
|
|
82
|
-
const [
|
|
83
|
-
|
|
79
|
+
const [h, y, M] = g.split("-").map(Number), N = i.value.findIndex((W) => W.year === h && W.month + 1 === y && W.day === M);
|
|
80
|
+
N !== -1 && (i.value[N].class[0] = l);
|
|
84
81
|
});
|
|
85
82
|
};
|
|
86
83
|
a(s.data.holiday.preholidays, "preholiday"), a(s.data.holiday.holidays, "weekend"), a(s.data.holiday.holiday, "holiday"), a(s.data.holiday.nowork, "nowork");
|
|
87
84
|
}, le = () => {
|
|
88
85
|
if (!s.limitation || s.limitation.length < 2) return !1;
|
|
89
86
|
const a = [...s.limitation].sort(
|
|
90
|
-
(e, t) => new Date(
|
|
87
|
+
(e, t) => new Date($(e.startDate)).getTime() - new Date($(t.startDate)).getTime()
|
|
91
88
|
);
|
|
92
89
|
for (let e = 1; e < a.length; e++) {
|
|
93
|
-
const t = new Date(
|
|
94
|
-
if (new Date(
|
|
90
|
+
const t = new Date($(a[e - 1].endDate));
|
|
91
|
+
if (new Date($(a[e].startDate)) <= t)
|
|
95
92
|
return console.warn("Warning: Диапазоны пересекаются:", a[e - 1], a[e]), !0;
|
|
96
93
|
}
|
|
97
94
|
return !1;
|
|
@@ -99,30 +96,30 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
99
96
|
if (!s.limitation || s.limitation.length === 0) return !0;
|
|
100
97
|
const l = new Date(a, e, t).getTime();
|
|
101
98
|
for (let g of s.limitation) {
|
|
102
|
-
const { startDate:
|
|
103
|
-
if (!
|
|
104
|
-
const M = new Date(
|
|
99
|
+
const { startDate: h, endDate: y } = g;
|
|
100
|
+
if (!h && y) {
|
|
101
|
+
const M = new Date($(y)).getTime();
|
|
105
102
|
if (l <= M) return !1;
|
|
106
103
|
}
|
|
107
|
-
if (
|
|
108
|
-
const M = new Date(h
|
|
104
|
+
if (h && !y) {
|
|
105
|
+
const M = new Date($(h)).getTime();
|
|
109
106
|
if (l >= M) return !1;
|
|
110
107
|
}
|
|
111
|
-
if (
|
|
112
|
-
const M = new Date(h
|
|
113
|
-
if (M <=
|
|
114
|
-
if (l >= M && l <=
|
|
115
|
-
} else if (l >= M || l <=
|
|
108
|
+
if (h && y) {
|
|
109
|
+
const M = new Date($(h)).getTime(), N = new Date($(y)).getTime();
|
|
110
|
+
if (M <= N) {
|
|
111
|
+
if (l >= M && l <= N) return !1;
|
|
112
|
+
} else if (l >= M || l <= N) return !1;
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
return !0;
|
|
119
116
|
}, R = (a, e) => {
|
|
120
|
-
const t =
|
|
117
|
+
const t = B(new Date(a.year, a.month, a.day), "{dd}.{m}.{Y}");
|
|
121
118
|
s.range === "range" ? F.value !== -1 ? (ne(), m.value = e, i.value[e].class[1] = "active") : m.value !== -1 ? (F.value = e, se(m.value, F.value, t)) : (m.value = e, i.value[e].class[1] = "active") : (m.value !== -1 && (i.value[m.value].class[1] = ""), m.value = e, i.value[e].class[1] = "active", L("input", { dateStart: t, count: 1 }));
|
|
122
119
|
}, ne = () => {
|
|
123
120
|
i.value.forEach((a) => a.class[1] = ""), m.value = -1, F.value = -1;
|
|
124
121
|
}, se = (a, e, t) => {
|
|
125
|
-
let l =
|
|
122
|
+
let l = B(new Date(i.value[a].year, i.value[a].month, i.value[a].day), "{dd}.{m}.{Y}");
|
|
126
123
|
if (e >= a) {
|
|
127
124
|
for (let g = a + 1; g < e; g++)
|
|
128
125
|
i.value[g].class[1] = "select";
|
|
@@ -134,10 +131,10 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
134
131
|
}
|
|
135
132
|
i.value[e].class[1] = "active";
|
|
136
133
|
}, Q = (a, e) => {
|
|
137
|
-
var
|
|
134
|
+
var h;
|
|
138
135
|
let t = Math.abs(a - e) + 1, [l, g] = [Math.min(a, e), Math.max(a, e)];
|
|
139
136
|
for (let y = l; y <= g; y++)
|
|
140
|
-
((
|
|
137
|
+
((h = i.value[y]) == null ? void 0 : h.class[0]) === "holiday" && t--;
|
|
141
138
|
return t;
|
|
142
139
|
}, p = (a, e) => {
|
|
143
140
|
P(a, e) && (C.value = new Date(a, e, 1), u.value = C.value.getFullYear(), n.value = C.value.getMonth(), O.value = new Date(a, e + 1, 1).getMonth(), (s.range === "year" || s.range === "decades") && d.value === 0 ? R({ year: a, month: e, day: 1 }, 8) : J());
|
|
@@ -153,24 +150,24 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
153
150
|
o("span", null, [
|
|
154
151
|
o("button", {
|
|
155
152
|
onClick: e[0] || (e[0] = c((t) => {
|
|
156
|
-
|
|
153
|
+
T.value -= 10, p(u.value, n.value);
|
|
157
154
|
}, ["prevent"]))
|
|
158
155
|
}, [
|
|
159
156
|
w(a.$slots, "double-arrow", {}, () => [
|
|
160
|
-
e[16] || (e[16] = k("«"))
|
|
157
|
+
e[16] || (e[16] = k("«", -1))
|
|
161
158
|
])
|
|
162
159
|
])
|
|
163
160
|
]),
|
|
164
|
-
o("span", re,
|
|
161
|
+
o("span", re, f(I.value[0]) + " - " + f(I.value[11]), 1),
|
|
165
162
|
o("span", null, [
|
|
166
163
|
o("button", {
|
|
167
164
|
class: "sw-revers",
|
|
168
165
|
onClick: e[1] || (e[1] = c((t) => {
|
|
169
|
-
|
|
166
|
+
T.value += 10, p(u.value, n.value);
|
|
170
167
|
}, ["prevent"]))
|
|
171
168
|
}, [
|
|
172
169
|
w(a.$slots, "double-arrow", {}, () => [
|
|
173
|
-
e[17] || (e[17] = k("«"))
|
|
170
|
+
e[17] || (e[17] = k("«", -1))
|
|
174
171
|
])
|
|
175
172
|
])
|
|
176
173
|
])
|
|
@@ -180,7 +177,7 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
180
177
|
onClick: e[2] || (e[2] = c((t) => p(u.value - 1, n.value), ["prevent"]))
|
|
181
178
|
}, [
|
|
182
179
|
w(a.$slots, "double-arrow", {}, () => [
|
|
183
|
-
e[18] || (e[18] = k("«"))
|
|
180
|
+
e[18] || (e[18] = k("«", -1))
|
|
184
181
|
])
|
|
185
182
|
]),
|
|
186
183
|
o("button", {
|
|
@@ -189,17 +186,17 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
189
186
|
}, ["prevent"]))
|
|
190
187
|
}, [
|
|
191
188
|
w(a.$slots, "arrow", {}, () => [
|
|
192
|
-
e[19] || (e[19] = k("‹"))
|
|
189
|
+
e[19] || (e[19] = k("‹", -1))
|
|
193
190
|
])
|
|
194
191
|
])
|
|
195
192
|
]),
|
|
196
193
|
o("span", ie, [
|
|
197
194
|
o("button", {
|
|
198
195
|
onClick: e[4] || (e[4] = c((t) => d.value = 3, ["prevent"]))
|
|
199
|
-
},
|
|
196
|
+
}, f(u.value), 1),
|
|
200
197
|
o("button", {
|
|
201
198
|
onClick: e[5] || (e[5] = c((t) => d.value = 1, ["prevent"]))
|
|
202
|
-
},
|
|
199
|
+
}, f(S(B)(C.value.setMonth(n.value), "{F}")), 1)
|
|
203
200
|
]),
|
|
204
201
|
o("span", null, [
|
|
205
202
|
o("button", {
|
|
@@ -209,7 +206,7 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
209
206
|
}, ["prevent"]))
|
|
210
207
|
}, [
|
|
211
208
|
w(a.$slots, "arrow", {}, () => [
|
|
212
|
-
e[20] || (e[20] = k("‹"))
|
|
209
|
+
e[20] || (e[20] = k("‹", -1))
|
|
213
210
|
])
|
|
214
211
|
]),
|
|
215
212
|
o("button", {
|
|
@@ -217,42 +214,42 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
217
214
|
onClick: e[7] || (e[7] = c((t) => p(u.value + 1, n.value), ["prevent"]))
|
|
218
215
|
}, [
|
|
219
216
|
w(a.$slots, "double-arrow", {}, () => [
|
|
220
|
-
e[21] || (e[21] = k("«"))
|
|
217
|
+
e[21] || (e[21] = k("«", -1))
|
|
221
218
|
])
|
|
222
219
|
])
|
|
223
220
|
])
|
|
224
221
|
])),
|
|
225
|
-
s.range === "year" || s.range === "decades" || d.value === 1 || d.value === 3 ?
|
|
226
|
-
(v(), r(
|
|
222
|
+
s.range === "year" || s.range === "decades" || d.value === 1 || d.value === 3 ? j("", !0) : (v(), r("div", de, [
|
|
223
|
+
(v(), r(b, null, Y(7, (t, l) => o("button", {
|
|
227
224
|
key: l,
|
|
228
225
|
class: "disabled"
|
|
229
|
-
},
|
|
226
|
+
}, f(S(B)(new Date(1970, 1, t + S(E)), "{D}")), 1)), 64))
|
|
230
227
|
])),
|
|
231
228
|
d.value !== 3 && s.range === "year" || d.value === 1 ? (v(), r("div", ce, [
|
|
232
|
-
(v(!0), r(
|
|
229
|
+
(v(!0), r(b, null, Y(H.value, (t, l) => (v(), r("button", {
|
|
233
230
|
key: l,
|
|
234
231
|
onClick: c((g) => {
|
|
235
232
|
d.value = 0, p(u.value, l);
|
|
236
233
|
}, ["prevent"]),
|
|
237
|
-
class:
|
|
238
|
-
},
|
|
234
|
+
class: A(l === n.value ? "active" : "")
|
|
235
|
+
}, f(t), 11, ge))), 128))
|
|
239
236
|
])) : s.range === "decades" || d.value === 3 ? (v(), r("div", pe, [
|
|
240
|
-
(v(!0), r(
|
|
237
|
+
(v(!0), r(b, null, Y(I.value, (t, l) => (v(), r("button", {
|
|
241
238
|
key: l,
|
|
242
239
|
onClick: c((g) => {
|
|
243
240
|
d.value = s.range === "year" ? 1 : 0, p(t, n.value);
|
|
244
241
|
}, ["prevent"]),
|
|
245
|
-
class:
|
|
246
|
-
},
|
|
247
|
-
])) : (v(), r("div",
|
|
248
|
-
(v(!0), r(
|
|
249
|
-
l <
|
|
242
|
+
class: A(T.value + l - 1 === u.value ? "active" : "")
|
|
243
|
+
}, f(t), 11, fe))), 128))
|
|
244
|
+
])) : (v(), r("div", De, [
|
|
245
|
+
(v(!0), r(b, null, Y(i.value, (t, l) => (v(), r(b, { key: l }, [
|
|
246
|
+
l < V.value + (7 - new Date(u.value, n.value + 1, 1).getDay() + S(E)) % 7 ? (v(), r("button", {
|
|
250
247
|
key: 0,
|
|
251
|
-
class:
|
|
248
|
+
class: A(t.month === n.value && P(t.year, t.month, t.day) ? t.class : "disabled"),
|
|
252
249
|
onClick: c(() => {
|
|
253
250
|
t.month === n.value && R(t, l);
|
|
254
251
|
}, ["prevent"])
|
|
255
|
-
},
|
|
252
|
+
}, f(t.day), 11, me)) : j("", !0)
|
|
256
253
|
], 64))), 128))
|
|
257
254
|
]))
|
|
258
255
|
]),
|
|
@@ -261,24 +258,24 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
261
258
|
o("span", null, [
|
|
262
259
|
o("button", {
|
|
263
260
|
onClick: e[8] || (e[8] = c((t) => {
|
|
264
|
-
|
|
261
|
+
T.value -= 10, p(u.value, n.value);
|
|
265
262
|
}, ["prevent"]))
|
|
266
263
|
}, [
|
|
267
264
|
w(a.$slots, "double-arrow", {}, () => [
|
|
268
|
-
e[22] || (e[22] = k("«"))
|
|
265
|
+
e[22] || (e[22] = k("«", -1))
|
|
269
266
|
])
|
|
270
267
|
])
|
|
271
268
|
]),
|
|
272
|
-
o("span", ye,
|
|
269
|
+
o("span", ye, f(I.value[0]) + " - " + f(I.value[11]), 1),
|
|
273
270
|
o("span", null, [
|
|
274
271
|
o("button", {
|
|
275
272
|
class: "sw-revers",
|
|
276
273
|
onClick: e[9] || (e[9] = c((t) => {
|
|
277
|
-
|
|
274
|
+
T.value += 10, p(u.value, n.value);
|
|
278
275
|
}, ["prevent"]))
|
|
279
276
|
}, [
|
|
280
277
|
w(a.$slots, "double-arrow", {}, () => [
|
|
281
|
-
e[23] || (e[23] = k("«"))
|
|
278
|
+
e[23] || (e[23] = k("«", -1))
|
|
282
279
|
])
|
|
283
280
|
])
|
|
284
281
|
])
|
|
@@ -288,7 +285,7 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
288
285
|
onClick: e[10] || (e[10] = c((t) => p(u.value - 1, n.value), ["prevent"]))
|
|
289
286
|
}, [
|
|
290
287
|
w(a.$slots, "double-arrow", {}, () => [
|
|
291
|
-
e[24] || (e[24] = k("«"))
|
|
288
|
+
e[24] || (e[24] = k("«", -1))
|
|
292
289
|
])
|
|
293
290
|
]),
|
|
294
291
|
o("button", {
|
|
@@ -297,17 +294,17 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
297
294
|
}, ["prevent"]))
|
|
298
295
|
}, [
|
|
299
296
|
w(a.$slots, "arrow", {}, () => [
|
|
300
|
-
e[25] || (e[25] = k("‹"))
|
|
297
|
+
e[25] || (e[25] = k("‹", -1))
|
|
301
298
|
])
|
|
302
299
|
])
|
|
303
300
|
]),
|
|
304
301
|
o("span", be, [
|
|
305
302
|
o("button", {
|
|
306
303
|
onClick: e[12] || (e[12] = c((t) => d.value = 4, ["prevent"]))
|
|
307
|
-
},
|
|
304
|
+
}, f(new Date(u.value, n.value + 1).getFullYear()), 1),
|
|
308
305
|
o("button", {
|
|
309
306
|
onClick: e[13] || (e[13] = c((t) => d.value = 2, ["prevent"]))
|
|
310
|
-
},
|
|
307
|
+
}, f(S(B)(C.value.setMonth(n.value + 1), "{F}")), 1)
|
|
311
308
|
]),
|
|
312
309
|
o("span", null, [
|
|
313
310
|
o("button", {
|
|
@@ -317,7 +314,7 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
317
314
|
}, ["prevent"]))
|
|
318
315
|
}, [
|
|
319
316
|
w(a.$slots, "arrow", {}, () => [
|
|
320
|
-
e[26] || (e[26] = k("‹"))
|
|
317
|
+
e[26] || (e[26] = k("‹", -1))
|
|
321
318
|
])
|
|
322
319
|
]),
|
|
323
320
|
o("button", {
|
|
@@ -325,48 +322,48 @@ const oe = { class: "sw-data-picker" }, ue = {
|
|
|
325
322
|
onClick: e[15] || (e[15] = c((t) => p(u.value + 1, n.value), ["prevent"]))
|
|
326
323
|
}, [
|
|
327
324
|
w(a.$slots, "double-arrow", {}, () => [
|
|
328
|
-
e[27] || (e[27] = k("«"))
|
|
325
|
+
e[27] || (e[27] = k("«", -1))
|
|
329
326
|
])
|
|
330
327
|
])
|
|
331
328
|
])
|
|
332
329
|
])),
|
|
333
|
-
d.value === 2 || d.value === 4 ?
|
|
334
|
-
(v(), r(
|
|
330
|
+
d.value === 2 || d.value === 4 ? j("", !0) : (v(), r("div", $e, [
|
|
331
|
+
(v(), r(b, null, Y(7, (t, l) => o("button", {
|
|
335
332
|
key: l,
|
|
336
333
|
class: "disabled"
|
|
337
|
-
},
|
|
334
|
+
}, f(S(B)(new Date(1970, 1, t + S(E)), "{D}")), 1)), 64))
|
|
338
335
|
])),
|
|
339
336
|
d.value === 2 ? (v(), r("div", Ce, [
|
|
340
|
-
(v(!0), r(
|
|
337
|
+
(v(!0), r(b, null, Y(H.value, (t, l) => (v(), r("button", {
|
|
341
338
|
key: l,
|
|
342
339
|
onClick: c((g) => {
|
|
343
340
|
d.value = 0, p(u.value, l - 1);
|
|
344
341
|
}, ["prevent"]),
|
|
345
|
-
class:
|
|
346
|
-
},
|
|
342
|
+
class: A(l === (n.value + 1) % 12 ? "active" : "")
|
|
343
|
+
}, f(t), 11, Me))), 128))
|
|
347
344
|
])) : d.value === 4 ? (v(), r("div", Fe, [
|
|
348
|
-
(v(!0), r(
|
|
345
|
+
(v(!0), r(b, null, Y(I.value, (t, l) => (v(), r("button", {
|
|
349
346
|
key: l,
|
|
350
347
|
onClick: c((g) => {
|
|
351
348
|
d.value = 0, p(t, n.value);
|
|
352
349
|
}, ["prevent"]),
|
|
353
|
-
class:
|
|
354
|
-
},
|
|
350
|
+
class: A(T.value + l - 1 === u.value ? "active" : "")
|
|
351
|
+
}, f(t), 11, Se))), 128))
|
|
355
352
|
])) : (v(), r("div", Ye, [
|
|
356
|
-
(v(!0), r(
|
|
357
|
-
l >=
|
|
353
|
+
(v(!0), r(b, null, Y(i.value, (t, l) => (v(), r(b, { key: l }, [
|
|
354
|
+
l >= V.value - (7 + new Date(u.value, n.value + 1, 1).getDay() - S(E)) % 7 ? (v(), r("button", {
|
|
358
355
|
key: 0,
|
|
359
|
-
class:
|
|
356
|
+
class: A(t.month === O.value && P(t.year, t.month, t.day) ? t.class : "disabled"),
|
|
360
357
|
onClick: c(() => {
|
|
361
358
|
t.month === O.value && R(t, l);
|
|
362
359
|
}, ["prevent"])
|
|
363
|
-
},
|
|
360
|
+
}, f(t.day), 11, Te)) : j("", !0)
|
|
364
361
|
], 64))), 128))
|
|
365
362
|
]))
|
|
366
|
-
])) :
|
|
363
|
+
])) : j("", !0)
|
|
367
364
|
]));
|
|
368
365
|
}
|
|
369
366
|
};
|
|
370
367
|
export {
|
|
371
|
-
|
|
368
|
+
Ne as default
|
|
372
369
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as o, createElementBlock as r, openBlock as l, normalizeClass as c, createBlock as a, createCommentVNode as i, renderSlot as p } from "vue";
|
|
2
|
-
import { _ as u } from "./index-
|
|
2
|
+
import { _ as u } from "./index-C4bjIOWO.js";
|
|
3
3
|
const y = {
|
|
4
4
|
__name: "SwDropdownItem",
|
|
5
5
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeModels as k, ref as c, useModel as b, watchEffect as L, onMounted as N, createElementBlock as R, openBlock as z, createElementVNode as r, createVNode as u, withCtx as a, renderSlot as d, createTextVNode as v, toDisplayString as C, normalizeClass as M } from "vue";
|
|
2
2
|
import h from "./SwDropdown-DQGTnnKw.js";
|
|
3
3
|
import f from "./SwButton-85-tKHA7.js";
|
|
4
|
-
import { _ as B } from "./index-
|
|
4
|
+
import { _ as B } from "./index-C4bjIOWO.js";
|
|
5
5
|
const G = ["src"], A = {
|
|
6
6
|
__name: "SwGide",
|
|
7
7
|
props: /* @__PURE__ */ k({
|
|
@@ -108,7 +108,7 @@ const G = ["src"], A = {
|
|
|
108
108
|
}, {
|
|
109
109
|
default: a(() => [
|
|
110
110
|
d(t.$slots, "arrow", {}, () => [
|
|
111
|
-
e[3] || (e[3] = v("‹"))
|
|
111
|
+
e[3] || (e[3] = v("‹", -1))
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
114
114
|
_: 3
|
|
@@ -122,7 +122,7 @@ const G = ["src"], A = {
|
|
|
122
122
|
}, {
|
|
123
123
|
default: a(() => [
|
|
124
124
|
d(t.$slots, "arrow", {}, () => [
|
|
125
|
-
e[4] || (e[4] = v("‹"))
|
|
125
|
+
e[4] || (e[4] = v("‹", -1))
|
|
126
126
|
])
|
|
127
127
|
]),
|
|
128
128
|
_: 3
|