@ironsource/shared-ui 2.2.0-test.4 → 2.2.0-test.6
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/AppHeader.vue_vue_type_style_index_0_scoped_18bc6c0d_lang.css +1 -0
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css +1 -0
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css +1 -0
- package/ChartHeader.vue_vue_type_style_index_0_scoped_3a061c08_lang.css +1 -0
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_d59af062_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_0967498f_lang.css +1 -0
- package/DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css +1 -0
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_f8826716_lang.css +1 -0
- package/IconV4.vue_vue_type_style_index_0_scoped_6683c5b5_lang.css +1 -0
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_65877e48_lang.css +1 -0
- package/SwitchV4.vue_vue_type_style_index_0_scoped_b71a806e_lang.css +1 -0
- package/components/appHeader/AppHeader.vue.js +3 -3
- package/components/appHeader/AppHeader.vue2.js +43 -44
- package/components/button/v4/IconButtonV4.vue2.js +46 -1
- package/components/button/v4/ToggleButtonGroupAB.vue2.js +1 -1
- package/components/chart/ChartHeader.vue.js +2 -2
- package/components/chart/ChartHeader.vue2.js +2 -2
- package/components/chip/v4/ChipV4.vue2.js +1 -1
- package/components/columnConfigurator/SectionDropdown.vue.js +3 -3
- package/components/columnConfigurator/SectionDropdown.vue2.js +6 -7
- package/components/columnPicker/ColumnPicker.vue.d.ts +2 -0
- package/components/columnPicker/ColumnPicker.vue.js +3 -3
- package/components/columnPicker/ColumnPicker.vue2.js +173 -153
- package/components/columnPicker/index.d.ts +7 -1
- package/components/dateRange/common/CalendarMonth.common.js +46 -41
- package/components/dateRange/common/DateRange.common.d.ts +1 -0
- package/components/dateRange/common/DateRange.common.js +39 -38
- package/components/dateRange/v3/CalendarMonth.vue.d.ts +5 -0
- package/components/dateRange/v3/CalendarMonth.vue.js +3 -3
- package/components/dateRange/v3/CalendarMonth.vue2.js +6 -5
- package/components/dateRange/v3/DateRange.vue.d.ts +5 -0
- package/components/dateRange/v3/DateRange.vue.js +2 -2
- package/components/dateRange/v3/DateRange.vue2.js +2 -1
- package/components/dateRange/v3/index.d.ts +20 -1
- package/components/dateRange/v4/CalendarMonthV4.vue.d.ts +5 -0
- package/components/dateRange/v4/CalendarMonthV4.vue.js +4 -4
- package/components/dateRange/v4/CalendarMonthV4.vue2.js +12 -11
- package/components/dateRange/v4/DateRangeV4.vue.d.ts +5 -0
- package/components/dateRange/v4/DateRangeV4.vue.js +3 -3
- package/components/dateRange/v4/DateRangeV4.vue2.js +104 -101
- package/components/dateRange/v4/index.d.ts +20 -1
- package/components/icon/v4/IconV4.vue.d.ts +5 -0
- package/components/icon/v4/IconV4.vue.js +2 -2
- package/components/icon/v4/IconV4.vue2.js +27 -26
- package/components/icon/v4/index.d.ts +20 -1
- package/components/popover/v3/Popover.vue2.js +38 -1
- package/components/radioButton/v3/RadioButton.vue2.js +82 -1
- package/components/radioButton/v3/RadioGroup.vue2.js +29 -1
- package/components/radioButton/v4/RadioButtonV4.vue2.js +80 -1
- package/components/radioButton/v4/RadioGroupV4.vue2.js +29 -1
- package/components/switch/v4/SwitchV4.vue.d.ts +5 -0
- package/components/switch/v4/SwitchV4.vue.js +4 -4
- package/components/switch/v4/SwitchV4.vue2.js +14 -13
- package/components/switch/v4/index.d.ts +9 -0
- package/components/table/v4/DataGrid.vue.d.ts +2 -0
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +126 -124
- package/components/table/v4/index.d.ts +7 -1
- package/components/table-cells/v4/EditableV4.vue2.js +57 -1
- package/index.d.ts +112 -6
- package/index.js +1 -1
- package/package.json +1 -1
- package/AppHeader.vue_vue_type_style_index_0_scoped_4c813f30_lang.css +0 -1
- package/CalendarMonth.vue_vue_type_style_index_0_scoped_acd3440c_lang.css +0 -1
- package/CalendarMonthV4.vue_vue_type_style_index_0_scoped_b0d3ea50_lang.css +0 -1
- package/ChartHeader.vue_vue_type_style_index_0_scoped_9a603520_lang.css +0 -1
- package/ColumnPicker.vue_vue_type_style_index_0_scoped_01c4e08f_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_3673e156_lang.css +0 -1
- package/DateRange.vue_vue_type_style_index_0_scoped_70e316e9_lang.css +0 -1
- package/DateRangeV4.vue_vue_type_style_index_0_scoped_a849128a_lang.css +0 -1
- package/IconV4.vue_vue_type_style_index_0_scoped_dc433d48_lang.css +0 -1
- package/SectionDropdown.vue_vue_type_style_index_0_scoped_cfad60a8_lang.css +0 -1
- package/SwitchV4.vue_vue_type_style_index_0_scoped_0a80c49f_lang.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ref as
|
|
1
|
+
import i from "./DateServices.common.js";
|
|
2
|
+
import { ref as D, computed as k, watch as s, onMounted as x } from "vue";
|
|
3
3
|
import { isBefore as C, isAfter as J, isSameDay as F } from "date-fns";
|
|
4
4
|
const j = (t, M) => {
|
|
5
5
|
const E = [
|
|
@@ -15,23 +15,23 @@ const j = (t, M) => {
|
|
|
15
15
|
"October",
|
|
16
16
|
"November",
|
|
17
17
|
"December"
|
|
18
|
-
], b = ["S", "M", "T", "W", "T", "F", "S"], l =
|
|
18
|
+
], b = ["S", "M", "T", "W", "T", "F", "S"], l = D([]), f = D({}), m = D({}), Y = k(() => E[t.month]), w = (e) => {
|
|
19
19
|
e.value !== 0 && M("selectionChanged", e, t.month, t.year);
|
|
20
|
-
},
|
|
20
|
+
}, A = (e) => {
|
|
21
21
|
M("navigation", e);
|
|
22
22
|
}, S = () => {
|
|
23
23
|
if (!t.range.fromStart || !t.range.toEnd)
|
|
24
24
|
return !1;
|
|
25
25
|
const e = t.range.fromStart.getMonth(), n = t.range.fromStart.getFullYear(), r = t.range.toEnd.getMonth(), a = t.range.toEnd.getFullYear();
|
|
26
26
|
return t.year < n || t.year > a ? !1 : !(t.year === n && t.month < e || t.year === a && t.month > r);
|
|
27
|
-
},
|
|
27
|
+
}, y = (e, n) => e.getMonth() < n.month && e.getFullYear() === n.year || e.getFullYear() < n.year ? 1 : e.getMonth() === n.month && e.getFullYear() === n.year ? e.getDate() : i.daysInMonth(n.month, n.year), h = (e, n) => e.getMonth() > n.month && e.getFullYear() === n.year || e.getFullYear() > n.year ? i.daysInMonth(n.month, n.year) : e.getMonth() === n.month && e.getFullYear() === n.year ? e.getDate() : 1, v = () => {
|
|
28
28
|
if (t.allowedDays) {
|
|
29
|
-
const e =
|
|
29
|
+
const e = i.getCurrentTimeUTC();
|
|
30
30
|
e.setDate(e.getDate() - t.allowedDays + 1);
|
|
31
31
|
let n = e;
|
|
32
32
|
switch (t.type) {
|
|
33
33
|
case "week":
|
|
34
|
-
n =
|
|
34
|
+
n = i.getFirstDayOfWeek(e);
|
|
35
35
|
break;
|
|
36
36
|
case "month":
|
|
37
37
|
n.setDate(1);
|
|
@@ -40,90 +40,95 @@ const j = (t, M) => {
|
|
|
40
40
|
return n.setHours(0, 0, 0, 0), n;
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
|
-
},
|
|
44
|
-
const e = v(), n = t.maxAllowedDate;
|
|
43
|
+
}, u = () => {
|
|
44
|
+
const e = t.minAllowedDate ?? v(), n = t.maxAllowedDate;
|
|
45
45
|
Object.keys(t.days).forEach((r) => {
|
|
46
46
|
const a = t.days[r];
|
|
47
47
|
e && C(a.date, e) || n && J(a.date, n) ? a.disabled = !0 : delete a.disabled;
|
|
48
48
|
});
|
|
49
|
-
},
|
|
50
|
-
t.year === e.getFullYear() && t.month === e.getMonth() && n >= r && n <= a && (
|
|
51
|
-
},
|
|
49
|
+
}, c = (e, n, r, a) => {
|
|
50
|
+
t.year === e.getFullYear() && t.month === e.getMonth() && n >= r && n <= a && (f.value[n] = !0);
|
|
51
|
+
}, g = () => {
|
|
52
52
|
for (let e = 0; e < l.value.length; e++) {
|
|
53
53
|
const n = l.value[e];
|
|
54
|
-
delete
|
|
54
|
+
delete f.value[n.value], delete m.value[n.value];
|
|
55
55
|
}
|
|
56
56
|
if (l.value = [], S()) {
|
|
57
|
-
const e = { month: t.month, year: t.year }, n =
|
|
57
|
+
const e = { month: t.month, year: t.year }, n = y(
|
|
58
58
|
t.range.fromStart,
|
|
59
59
|
e
|
|
60
|
-
), r =
|
|
60
|
+
), r = h(
|
|
61
61
|
t.range.fromEnd,
|
|
62
62
|
e
|
|
63
|
-
), a =
|
|
63
|
+
), a = y(
|
|
64
64
|
t.range.toStart,
|
|
65
65
|
e
|
|
66
|
-
),
|
|
66
|
+
), d = h(
|
|
67
67
|
t.range.toEnd,
|
|
68
68
|
e
|
|
69
69
|
);
|
|
70
|
-
for (let o = n; o <=
|
|
71
|
-
|
|
70
|
+
for (let o = n; o <= d; o++)
|
|
71
|
+
m.value[o] = !0, c(
|
|
72
72
|
t.range.fromStart,
|
|
73
73
|
o,
|
|
74
74
|
n,
|
|
75
75
|
r
|
|
76
|
-
),
|
|
76
|
+
), c(
|
|
77
77
|
t.range.fromEnd,
|
|
78
78
|
o,
|
|
79
79
|
n,
|
|
80
80
|
r
|
|
81
|
-
),
|
|
81
|
+
), c(
|
|
82
82
|
t.range.toStart,
|
|
83
83
|
o,
|
|
84
84
|
a,
|
|
85
|
-
|
|
86
|
-
),
|
|
85
|
+
d
|
|
86
|
+
), c(
|
|
87
87
|
t.range.toEnd,
|
|
88
88
|
o,
|
|
89
89
|
a,
|
|
90
|
-
|
|
90
|
+
d
|
|
91
91
|
), l.value.push(t.days[o]);
|
|
92
92
|
}
|
|
93
|
-
},
|
|
94
|
-
return
|
|
93
|
+
}, I = (e) => e.value === 0 ? !1 : F(e.date, t.range.fromStart), T = (e) => e.value === 0 ? !1 : F(e.date, t.range.toEnd);
|
|
94
|
+
return s(
|
|
95
95
|
() => t.month,
|
|
96
96
|
() => {
|
|
97
|
-
|
|
97
|
+
g();
|
|
98
98
|
}
|
|
99
|
-
),
|
|
99
|
+
), s(
|
|
100
100
|
() => t.range,
|
|
101
101
|
(e, n) => {
|
|
102
|
-
e && e !== n &&
|
|
102
|
+
e && e !== n && g();
|
|
103
103
|
}
|
|
104
|
-
),
|
|
104
|
+
), s(
|
|
105
105
|
() => t.maxAllowedDate,
|
|
106
106
|
() => {
|
|
107
|
-
|
|
107
|
+
u();
|
|
108
|
+
}
|
|
109
|
+
), s(
|
|
110
|
+
() => t.minAllowedDate,
|
|
111
|
+
() => {
|
|
112
|
+
u();
|
|
108
113
|
}
|
|
109
114
|
), x(() => {
|
|
110
|
-
|
|
115
|
+
u(), g();
|
|
111
116
|
}), {
|
|
112
|
-
isEndDay:
|
|
113
|
-
isStartDay:
|
|
114
|
-
updateSelection:
|
|
115
|
-
refreshDisabledDays:
|
|
117
|
+
isEndDay: T,
|
|
118
|
+
isStartDay: I,
|
|
119
|
+
updateSelection: g,
|
|
120
|
+
refreshDisabledDays: u,
|
|
116
121
|
getMinDateInMonth: v,
|
|
117
|
-
getLastDayInRangeForMonth:
|
|
118
|
-
getFirstDayInRangeForMonth:
|
|
122
|
+
getLastDayInRangeForMonth: h,
|
|
123
|
+
getFirstDayInRangeForMonth: y,
|
|
119
124
|
isMonthInRange: S,
|
|
120
|
-
navigate:
|
|
125
|
+
navigate: A,
|
|
121
126
|
selectDay: w,
|
|
122
127
|
monthName: Y,
|
|
123
128
|
dayNames: b,
|
|
124
129
|
selectedDays: l,
|
|
125
|
-
selectedDaysMap:
|
|
126
|
-
inBetweenMap:
|
|
130
|
+
selectedDaysMap: f,
|
|
131
|
+
inBetweenMap: m
|
|
127
132
|
};
|
|
128
133
|
};
|
|
129
134
|
export {
|
|
@@ -2,6 +2,7 @@ export declare const dateRangeCommon: (props: any, emit: any) => {
|
|
|
2
2
|
datePicker: import("vue").Ref<HTMLDivElement>;
|
|
3
3
|
datePickerId: import("vue").ComputedRef<string>;
|
|
4
4
|
getMaxAllowedDate: import("vue").ComputedRef<Date>;
|
|
5
|
+
getMinAllowedDate: import("vue").ComputedRef<any>;
|
|
5
6
|
selectedPresetName: import("vue").ComputedRef<any>;
|
|
6
7
|
selectedPreset: import("vue").Ref<{}>;
|
|
7
8
|
displayError: import("vue").Ref<boolean>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { onClickOutside as
|
|
2
|
-
import { useToggle as
|
|
3
|
-
import { ref as r, computed as
|
|
4
|
-
import { min as
|
|
5
|
-
import { presetsList as
|
|
1
|
+
import { onClickOutside as fe } from "@vueuse/core";
|
|
2
|
+
import { useToggle as de } from "../../../composables/useToggle.js";
|
|
3
|
+
import { ref as r, computed as w, onMounted as ce, onBeforeMount as ve, onUnmounted as me, watch as Q } from "vue";
|
|
4
|
+
import { min as ge, addDays as he, format as X } from "date-fns";
|
|
5
|
+
import { presetsList as De, formatError as Me, mandatoryValuesError as ye, navigatePrev as Z, navigateNext as V } from "./consts.common.js";
|
|
6
6
|
import d from "./DateServices.common.js";
|
|
7
7
|
const pe = (o, y) => {
|
|
8
|
-
const N = r(null), c = r({ started: !1, date: null }), x = r(!1), _ = 2, T = r({ from: null, to: null }), u = r({}), g = r([]), k = r(null), i = r({}), p = r({}), E = r(!1),
|
|
9
|
-
|
|
8
|
+
const N = r(null), c = r({ started: !1, date: null }), x = r(!1), _ = 2, T = r({ from: null, to: null }), u = r({}), g = r([]), k = r(null), i = r({}), p = r({}), E = r(!1), P = r(null), s = r(null), j = r("left"), O = r(null), F = r(null), C = r([]), K = r(null), [D] = de({ initialValue: !1 }), q = r(null);
|
|
9
|
+
fe(q, () => {
|
|
10
10
|
D.value = !1;
|
|
11
11
|
});
|
|
12
12
|
const U = (e, t) => {
|
|
@@ -21,11 +21,11 @@ const pe = (o, y) => {
|
|
|
21
21
|
let m = 1;
|
|
22
22
|
const f = d.getCurrentTimeUTC();
|
|
23
23
|
f.setHours(0, 0, 0, 0);
|
|
24
|
-
const
|
|
24
|
+
const ie = d.daysInMonth(e, t);
|
|
25
25
|
for (let I = 0; I < 6; I++) {
|
|
26
26
|
l = [];
|
|
27
27
|
for (let H = 0; H < 7; H++)
|
|
28
|
-
n = {}, I === 0 && v > 0 && H < v && (n.value = 0), m >
|
|
28
|
+
n = {}, I === 0 && v > 0 && H < v && (n.value = 0), m > ie && (n.value = 0), !n.value && n.value !== 0 && (n.value = m, m += 1, a.days[n.value] = n, n.date = new Date(t, e, n.value), f < n.date ? n.isFuture = !0 : n.date.getTime() === f.getTime() && (n.isToday = !0, o.includeToday || (n.disabled = !0))), l.push(n);
|
|
29
29
|
a.weeks.push(l);
|
|
30
30
|
}
|
|
31
31
|
return a;
|
|
@@ -47,31 +47,31 @@ const pe = (o, y) => {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}, z = (e, t) => {
|
|
50
|
-
|
|
50
|
+
P.value = e;
|
|
51
51
|
let a = e;
|
|
52
|
-
e === "date" && (a = o.datePresetList), C.value =
|
|
52
|
+
e === "date" && (a = o.datePresetList), C.value = De[a], t && (s.value = {
|
|
53
53
|
fromStart: null,
|
|
54
54
|
fromEnd: null,
|
|
55
55
|
toStart: null,
|
|
56
56
|
toEnd: null
|
|
57
|
-
}, T.value.from = "", T.value.to = "", c.value = { started: !1, date: null }, i.value = "custom"), y("rangeTypeChanged",
|
|
57
|
+
}, T.value.from = "", T.value.to = "", c.value = { started: !1, date: null }, i.value = "custom"), y("rangeTypeChanged", P.value);
|
|
58
58
|
}, ee = (e) => {
|
|
59
59
|
i.value = e.id, M(k.value[e.id].dates()), S();
|
|
60
60
|
}, M = (e, t = !1) => {
|
|
61
61
|
let a = e;
|
|
62
|
-
return !e.from && !e.to && e.preset ? a = k.value[e.preset]?.dates() : (!e || !e.from && !e.to) && (a = k.value[C.value[0]]), o.maxDaysInRange && (K.value = t ?
|
|
62
|
+
return !e.from && !e.to && e.preset ? a = k.value[e.preset]?.dates() : (!e || !e.from && !e.to) && (a = k.value[C.value[0]]), o.maxDaysInRange && (K.value = t ? he(a.from, o.maxDaysInRange) : null), E.value = !1, !a.from || !a.to || !(a.from instanceof Date) || !(a.to instanceof Date) ? (F.value = Me, E.value = !0, !1) : a.from > a.to ? (F.value = `"From" date can't be bigger than "To" date`, E.value = !0, !1) : (s.value = A(a), T.value.from = X(
|
|
63
63
|
s.value.fromStart,
|
|
64
64
|
o.dateFormat
|
|
65
65
|
), T.value.to = X(s.value.toEnd, o.dateFormat), !0);
|
|
66
|
-
},
|
|
67
|
-
i.value === "custom" ?
|
|
66
|
+
}, b = () => {
|
|
67
|
+
i.value === "custom" ? O.value = d.getDateRangeString(s.value) : O.value = J.value, y("currentDateChanged", O.value);
|
|
68
68
|
}, te = () => {
|
|
69
69
|
if (s.value.fromStart == null || s.value.toEnd == null) {
|
|
70
|
-
E.value = !0,
|
|
70
|
+
E.value = !0, F.value = ye;
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
const e = d.getCurrentTimeUTC();
|
|
74
|
-
s.value.toEnd > e && (s.value.toEnd = e),
|
|
74
|
+
s.value.toEnd > e && (s.value.toEnd = e), b(), p.value = i.value, y("rangeChanged", {
|
|
75
75
|
from: s.value.fromStart,
|
|
76
76
|
to: s.value.toEnd,
|
|
77
77
|
preset: p.value
|
|
@@ -106,9 +106,9 @@ const pe = (o, y) => {
|
|
|
106
106
|
}, g.value.unshift(l);
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
109
|
-
},
|
|
109
|
+
}, A = (e) => {
|
|
110
110
|
let t;
|
|
111
|
-
switch (
|
|
111
|
+
switch (P.value) {
|
|
112
112
|
case "week":
|
|
113
113
|
t = {
|
|
114
114
|
fromStart: d.getFirstDayOfWeek(e.from),
|
|
@@ -150,7 +150,7 @@ const pe = (o, y) => {
|
|
|
150
150
|
const l = C.value.find(
|
|
151
151
|
(h) => h.id === e.preset
|
|
152
152
|
);
|
|
153
|
-
i.value = l
|
|
153
|
+
i.value = l?.id, t = !!l;
|
|
154
154
|
}
|
|
155
155
|
const a = {
|
|
156
156
|
from: new Date(e.from),
|
|
@@ -172,7 +172,7 @@ const pe = (o, y) => {
|
|
|
172
172
|
} else
|
|
173
173
|
y("dateRangePresetNameChanged", null), i.value = "custom";
|
|
174
174
|
p.value = i.value;
|
|
175
|
-
},
|
|
175
|
+
}, R = (e, t, a) => {
|
|
176
176
|
if (!c.value.started)
|
|
177
177
|
i.value = "custom", c.value.started = !0, c.value.date = new Date(a, t, e.value), M(
|
|
178
178
|
{ from: c.value.date, to: c.value.date },
|
|
@@ -180,7 +180,7 @@ const pe = (o, y) => {
|
|
|
180
180
|
);
|
|
181
181
|
else {
|
|
182
182
|
const n = new Date(a, t, e.value), l = c.value.date;
|
|
183
|
-
c.value.started = !1, c.value.date = null, n < l ?
|
|
183
|
+
c.value.started = !1, c.value.date = null, n < l ? R(e, t, a) : M({ from: l, to: n });
|
|
184
184
|
}
|
|
185
185
|
}, B = () => {
|
|
186
186
|
const e = N.value.offsetLeft;
|
|
@@ -193,52 +193,53 @@ const pe = (o, y) => {
|
|
|
193
193
|
k.value = d.getPresetsFunctions(o.includeToday), k.value.custom = {
|
|
194
194
|
dates: () => o.range
|
|
195
195
|
};
|
|
196
|
-
}, oe =
|
|
196
|
+
}, oe = w(() => (g.value || []).reduce((e, t) => {
|
|
197
197
|
const n = u.value[t].parsedMonth.weeks[u.value[t].parsedMonth.weeks.length - 1].filter(
|
|
198
198
|
(l) => l.value !== 0
|
|
199
199
|
).length;
|
|
200
200
|
return e && !n;
|
|
201
201
|
}, !0)), Y = () => {
|
|
202
|
-
o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), S(),
|
|
202
|
+
o.range && (x.value = !0, z(o.initialType || o.types[0]), le(), $(o.range), M(o.range), S(), b());
|
|
203
203
|
};
|
|
204
|
-
|
|
204
|
+
ce(() => {
|
|
205
205
|
Y();
|
|
206
|
-
}),
|
|
206
|
+
}), ve(() => {
|
|
207
207
|
const e = (t) => {
|
|
208
208
|
t.key === "Escape" && D.value && G();
|
|
209
209
|
};
|
|
210
|
-
document.addEventListener("keyup", e),
|
|
210
|
+
document.addEventListener("keyup", e), me(() => {
|
|
211
211
|
document.removeEventListener("keyup", e);
|
|
212
212
|
});
|
|
213
213
|
}), Q(
|
|
214
214
|
() => o.range,
|
|
215
215
|
(e, t) => {
|
|
216
|
-
e && e !== t && (x.value ? ($(e), M(e),
|
|
216
|
+
e && e !== t && (x.value ? ($(e), M(e), b()) : Y());
|
|
217
217
|
}
|
|
218
218
|
), Q(D, (e) => {
|
|
219
219
|
e || (c.value.started = !1);
|
|
220
220
|
});
|
|
221
|
-
const J =
|
|
221
|
+
const J = w(() => {
|
|
222
222
|
const e = C.value.find(
|
|
223
223
|
(t) => t.id === i.value
|
|
224
224
|
);
|
|
225
225
|
return e ? e.name : "";
|
|
226
|
-
}), re =
|
|
226
|
+
}), re = w(() => `datepicker${o.uniqueId}`), se = w(() => {
|
|
227
227
|
const e = [o.maxDate, K.value].filter((t) => t);
|
|
228
|
-
return e.length ?
|
|
229
|
-
});
|
|
228
|
+
return e.length ? ge(e) : null;
|
|
229
|
+
}), ue = w(() => o.minDate);
|
|
230
230
|
return {
|
|
231
231
|
datePicker: N,
|
|
232
232
|
datePickerId: re,
|
|
233
233
|
getMaxAllowedDate: se,
|
|
234
|
+
getMinAllowedDate: ue,
|
|
234
235
|
selectedPresetName: J,
|
|
235
236
|
selectedPreset: i,
|
|
236
237
|
displayError: E,
|
|
237
|
-
rangeType:
|
|
238
|
+
rangeType: P,
|
|
238
239
|
selectedRange: s,
|
|
239
240
|
placement: j,
|
|
240
|
-
currentDate:
|
|
241
|
-
error:
|
|
241
|
+
currentDate: O,
|
|
242
|
+
error: F,
|
|
242
243
|
presets: C,
|
|
243
244
|
isOpen: D,
|
|
244
245
|
popup: q,
|
|
@@ -251,14 +252,14 @@ const pe = (o, y) => {
|
|
|
251
252
|
changeType: z,
|
|
252
253
|
presetChanged: ee,
|
|
253
254
|
initRange: M,
|
|
254
|
-
setCurrentDate:
|
|
255
|
+
setCurrentDate: b,
|
|
255
256
|
apply: te,
|
|
256
257
|
getNavigation: ae,
|
|
257
258
|
navigationCallback: ne,
|
|
258
|
-
getSelectedRangeByType:
|
|
259
|
+
getSelectedRangeByType: A,
|
|
259
260
|
compareDates: L,
|
|
260
261
|
determinePreset: $,
|
|
261
|
-
selectionChanged:
|
|
262
|
+
selectionChanged: R,
|
|
262
263
|
checkPlacement: B,
|
|
263
264
|
toggle: W,
|
|
264
265
|
closeDatePicker: G,
|
|
@@ -15,11 +15,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
id?: string | number;
|
|
16
16
|
allowedDays?: number;
|
|
17
17
|
maxAllowedDate?: Date;
|
|
18
|
+
minAllowedDate?: Date;
|
|
18
19
|
testId?: string;
|
|
19
20
|
}>, {
|
|
20
21
|
id: number;
|
|
21
22
|
allowedDays: any;
|
|
22
23
|
maxAllowedDate: any;
|
|
24
|
+
minAllowedDate: any;
|
|
23
25
|
testId: string;
|
|
24
26
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
27
|
navigation: (...args: any[]) => void;
|
|
@@ -40,11 +42,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
40
42
|
id?: string | number;
|
|
41
43
|
allowedDays?: number;
|
|
42
44
|
maxAllowedDate?: Date;
|
|
45
|
+
minAllowedDate?: Date;
|
|
43
46
|
testId?: string;
|
|
44
47
|
}>, {
|
|
45
48
|
id: number;
|
|
46
49
|
allowedDays: any;
|
|
47
50
|
maxAllowedDate: any;
|
|
51
|
+
minAllowedDate: any;
|
|
48
52
|
testId: string;
|
|
49
53
|
}>>> & {
|
|
50
54
|
onNavigation?: (...args: any[]) => any;
|
|
@@ -54,6 +58,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
54
58
|
id: string | number;
|
|
55
59
|
allowedDays: number;
|
|
56
60
|
maxAllowedDate: Date;
|
|
61
|
+
minAllowedDate: Date;
|
|
57
62
|
}>;
|
|
58
63
|
export default _default;
|
|
59
64
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CalendarMonth.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../CalendarMonth.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a44769fd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../CalendarMonth.
|
|
1
|
+
import "../../../CalendarMonth.vue_vue_type_style_index_0_scoped_a44769fd_lang.css"; import { defineComponent as z, openBlock as d, createElementBlock as s, unref as t, createElementVNode as o, createBlock as m, withCtx as l, createVNode as r, createCommentVNode as y, createTextVNode as v, toDisplayString as c, Fragment as $, renderList as g, normalizeClass as B } from "vue";
|
|
2
2
|
import { navigatePrev as D, navigateNext as E } from "../common/consts.common.js";
|
|
3
3
|
import S from "../../typography/Heading.vue.js";
|
|
4
4
|
import h from "../../typography/Text.vue.js";
|
|
@@ -23,12 +23,13 @@ const Y = ["id", "data-testid"], L = ["data-testid"], W = ["data-testid"], X = [
|
|
|
23
23
|
id: { default: Date.now() },
|
|
24
24
|
allowedDays: { default: null },
|
|
25
25
|
maxAllowedDate: { default: null },
|
|
26
|
+
minAllowedDate: { default: null },
|
|
26
27
|
testId: { default: "" }
|
|
27
28
|
},
|
|
28
29
|
emits: ["selectionChanged", "navigation"],
|
|
29
30
|
setup(e, { emit: A }) {
|
|
30
|
-
const
|
|
31
|
-
isEndDay:
|
|
31
|
+
const w = e, {
|
|
32
|
+
isEndDay: N,
|
|
32
33
|
isStartDay: x,
|
|
33
34
|
navigate: k,
|
|
34
35
|
selectDay: R,
|
|
@@ -36,7 +37,7 @@ const Y = ["id", "data-testid"], L = ["data-testid"], W = ["data-testid"], X = [
|
|
|
36
37
|
dayNames: M,
|
|
37
38
|
selectedDaysMap: b,
|
|
38
39
|
inBetweenMap: H
|
|
39
|
-
} = V(
|
|
40
|
+
} = V(w, A);
|
|
40
41
|
return (U, u) => (d(), s("div", {
|
|
41
42
|
id: "datepickerCalendar" + e.id,
|
|
42
43
|
class: "calendar-month",
|
|
@@ -126,7 +127,7 @@ const Y = ["id", "data-testid"], L = ["data-testid"], W = ["data-testid"], X = [
|
|
|
126
127
|
"disabled-day": a.isFuture || a.disabled,
|
|
127
128
|
"non-day": a.value === 0,
|
|
128
129
|
"start-day": t(x)(a),
|
|
129
|
-
"end-day": t(
|
|
130
|
+
"end-day": t(N)(a)
|
|
130
131
|
}]),
|
|
131
132
|
size: "sm",
|
|
132
133
|
"data-testid": `${e.testId}-${t(n).DAY}-${a.value}`,
|
|
@@ -16,6 +16,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
16
16
|
openOnTop: boolean;
|
|
17
17
|
showPresets: boolean;
|
|
18
18
|
maxDate?: Date;
|
|
19
|
+
minDate?: Date;
|
|
19
20
|
testId?: string;
|
|
20
21
|
}>, {
|
|
21
22
|
types: () => string[];
|
|
@@ -31,6 +32,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
31
32
|
openOnTop: boolean;
|
|
32
33
|
showPresets: boolean;
|
|
33
34
|
maxDate: any;
|
|
35
|
+
minDate: any;
|
|
34
36
|
testId: string;
|
|
35
37
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
38
|
opened: (...args: any[]) => void;
|
|
@@ -57,6 +59,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
57
59
|
openOnTop: boolean;
|
|
58
60
|
showPresets: boolean;
|
|
59
61
|
maxDate?: Date;
|
|
62
|
+
minDate?: Date;
|
|
60
63
|
testId?: string;
|
|
61
64
|
}>, {
|
|
62
65
|
types: () => string[];
|
|
@@ -72,6 +75,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
72
75
|
openOnTop: boolean;
|
|
73
76
|
showPresets: boolean;
|
|
74
77
|
maxDate: any;
|
|
78
|
+
minDate: any;
|
|
75
79
|
testId: string;
|
|
76
80
|
}>>> & {
|
|
77
81
|
onOpened?: (...args: any[]) => any;
|
|
@@ -95,6 +99,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
95
99
|
openOnTop: boolean;
|
|
96
100
|
showPresets: boolean;
|
|
97
101
|
maxDate: Date;
|
|
102
|
+
minDate: Date;
|
|
98
103
|
}>, {
|
|
99
104
|
field?(_: {
|
|
100
105
|
currentDate: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./DateRange.vue2.js";
|
|
2
2
|
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DateRange.
|
|
4
|
-
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-25d03907"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../DateRange.
|
|
1
|
+
import "../../../DateRange.vue_vue_type_style_index_0_scoped_25d03907_lang.css"; import { defineComponent as J, openBlock as s, createElementBlock as n, unref as e, normalizeClass as o, createElementVNode as d, renderSlot as P, toDisplayString as u, setBlockTracking as p, withDirectives as h, Fragment as v, renderList as k, createVNode as c, withCtx as g, createTextVNode as y, createCommentVNode as b, vShow as C, normalizeStyle as Q } from "vue";
|
|
2
2
|
import X from "./CalendarMonth.vue.js";
|
|
3
3
|
import { typeToName as Z, messagePerType as _ } from "../common/consts.common.js";
|
|
4
4
|
import x from "../../button/v3/Button.vue.js";
|
|
@@ -28,6 +28,7 @@ const te = ["id", "data-testid"], ae = ["data-testid"], de = ["id", "data-testid
|
|
|
28
28
|
openOnTop: { type: Boolean, default: !1 },
|
|
29
29
|
showPresets: { type: Boolean, default: !0 },
|
|
30
30
|
maxDate: { default: null },
|
|
31
|
+
minDate: { default: null },
|
|
31
32
|
testId: { default: "" }
|
|
32
33
|
},
|
|
33
34
|
emits: [
|
|
@@ -17,6 +17,7 @@ declare const DateRangeTypes: () => ({
|
|
|
17
17
|
openOnTop: boolean;
|
|
18
18
|
showPresets: boolean;
|
|
19
19
|
maxDate: Date;
|
|
20
|
+
minDate: Date;
|
|
20
21
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
21
22
|
testId: {
|
|
22
23
|
type: import("vue").PropType<string>;
|
|
@@ -84,6 +85,10 @@ declare const DateRangeTypes: () => ({
|
|
|
84
85
|
type: import("vue").PropType<Date>;
|
|
85
86
|
default: any;
|
|
86
87
|
};
|
|
88
|
+
minDate: {
|
|
89
|
+
type: import("vue").PropType<Date>;
|
|
90
|
+
default: any;
|
|
91
|
+
};
|
|
87
92
|
}>> & {
|
|
88
93
|
onOpened?: (...args: any[]) => any;
|
|
89
94
|
onRangeTypeChanged?: (...args: any[]) => any;
|
|
@@ -91,7 +96,7 @@ declare const DateRangeTypes: () => ({
|
|
|
91
96
|
onRangeChanged?: (...args: any[]) => any;
|
|
92
97
|
onDateRangePresetNameChanged?: (...args: any[]) => any;
|
|
93
98
|
onDismissed?: (...args: any[]) => any;
|
|
94
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "testId" | "disabled" | "allowedDays" | "uniqueId" | "includeToday" | "dateFormat" | "types" | "maxDaysInRange" | "datePresetList" | "regex" | "initialType" | "openOnTop" | "showPresets" | "maxDate">;
|
|
99
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "testId" | "disabled" | "allowedDays" | "uniqueId" | "includeToday" | "dateFormat" | "types" | "maxDaysInRange" | "datePresetList" | "regex" | "initialType" | "openOnTop" | "showPresets" | "maxDate" | "minDate">;
|
|
95
100
|
$attrs: {
|
|
96
101
|
[x: string]: unknown;
|
|
97
102
|
};
|
|
@@ -172,6 +177,10 @@ declare const DateRangeTypes: () => ({
|
|
|
172
177
|
type: import("vue").PropType<Date>;
|
|
173
178
|
default: any;
|
|
174
179
|
};
|
|
180
|
+
minDate: {
|
|
181
|
+
type: import("vue").PropType<Date>;
|
|
182
|
+
default: any;
|
|
183
|
+
};
|
|
175
184
|
}>> & {
|
|
176
185
|
onOpened?: (...args: any[]) => any;
|
|
177
186
|
onRangeTypeChanged?: (...args: any[]) => any;
|
|
@@ -201,6 +210,7 @@ declare const DateRangeTypes: () => ({
|
|
|
201
210
|
openOnTop: boolean;
|
|
202
211
|
showPresets: boolean;
|
|
203
212
|
maxDate: Date;
|
|
213
|
+
minDate: Date;
|
|
204
214
|
}, {}, string> & {
|
|
205
215
|
beforeCreate?: (() => void) | (() => void)[];
|
|
206
216
|
created?: (() => void) | (() => void)[];
|
|
@@ -288,6 +298,10 @@ declare const DateRangeTypes: () => ({
|
|
|
288
298
|
type: import("vue").PropType<Date>;
|
|
289
299
|
default: any;
|
|
290
300
|
};
|
|
301
|
+
minDate: {
|
|
302
|
+
type: import("vue").PropType<Date>;
|
|
303
|
+
default: any;
|
|
304
|
+
};
|
|
291
305
|
}>> & {
|
|
292
306
|
onOpened?: (...args: any[]) => any;
|
|
293
307
|
onRangeTypeChanged?: (...args: any[]) => any;
|
|
@@ -366,6 +380,10 @@ declare const DateRangeTypes: () => ({
|
|
|
366
380
|
type: import("vue").PropType<Date>;
|
|
367
381
|
default: any;
|
|
368
382
|
};
|
|
383
|
+
minDate: {
|
|
384
|
+
type: import("vue").PropType<Date>;
|
|
385
|
+
default: any;
|
|
386
|
+
};
|
|
369
387
|
}>> & {
|
|
370
388
|
onOpened?: (...args: any[]) => any;
|
|
371
389
|
onRangeTypeChanged?: (...args: any[]) => any;
|
|
@@ -395,6 +413,7 @@ declare const DateRangeTypes: () => ({
|
|
|
395
413
|
openOnTop: boolean;
|
|
396
414
|
showPresets: boolean;
|
|
397
415
|
maxDate: Date;
|
|
416
|
+
minDate: Date;
|
|
398
417
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
399
418
|
$slots: {
|
|
400
419
|
field?(_: {
|
|
@@ -15,11 +15,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
15
15
|
id?: string | number;
|
|
16
16
|
allowedDays?: number;
|
|
17
17
|
maxAllowedDate?: Date;
|
|
18
|
+
minAllowedDate?: Date;
|
|
18
19
|
testId?: string;
|
|
19
20
|
}>, {
|
|
20
21
|
id: number;
|
|
21
22
|
allowedDays: any;
|
|
22
23
|
maxAllowedDate: any;
|
|
24
|
+
minAllowedDate: any;
|
|
23
25
|
testId: string;
|
|
24
26
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
27
|
navigation: (...args: any[]) => void;
|
|
@@ -40,11 +42,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
40
42
|
id?: string | number;
|
|
41
43
|
allowedDays?: number;
|
|
42
44
|
maxAllowedDate?: Date;
|
|
45
|
+
minAllowedDate?: Date;
|
|
43
46
|
testId?: string;
|
|
44
47
|
}>, {
|
|
45
48
|
id: number;
|
|
46
49
|
allowedDays: any;
|
|
47
50
|
maxAllowedDate: any;
|
|
51
|
+
minAllowedDate: any;
|
|
48
52
|
testId: string;
|
|
49
53
|
}>>> & {
|
|
50
54
|
onNavigation?: (...args: any[]) => any;
|
|
@@ -54,6 +58,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
54
58
|
id: string | number;
|
|
55
59
|
allowedDays: number;
|
|
56
60
|
maxAllowedDate: Date;
|
|
61
|
+
minAllowedDate: Date;
|
|
57
62
|
}>;
|
|
58
63
|
export default _default;
|
|
59
64
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../CalendarMonthV4.
|
|
4
|
-
const s = /* @__PURE__ */ e
|
|
1
|
+
import e from "./CalendarMonthV4.vue2.js";
|
|
2
|
+
/* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../CalendarMonthV4.vue_vue_type_style_index_0_scoped_6eae923a_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-6eae923a"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|