@caspeco/casper-ui-library 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/combobox/combobox-button.d.ts +1 -1
- package/dist/components/combobox/combobox-button.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.js +85 -69
- package/dist/components/combobox/combobox-item.d.ts +2 -1
- package/dist/components/combobox/combobox-item.d.ts.map +1 -1
- package/dist/components/combobox/combobox-item.js +10 -10
- package/dist/components/combobox/combobox-menu.js +68 -69
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +120 -123
- package/dist/components/combobox/types.d.ts +2 -0
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +175 -176
- package/dist/components/date-picker/date-picker-header.js +10 -10
- package/dist/components/date-picker/helper.js +9 -9
- package/dist/components/image-upload/image-cropper.js +112 -113
- package/dist/components/image-upload/image-upload-dropzone.js +35 -36
- package/dist/components/menu/menu-group.js +44 -45
- package/dist/components/segmented-control/segmented-control.js +29 -29
- package/dist/components/table/table-cell.js +25 -26
- package/dist/components/table/table-header-dropdown.js +60 -60
- package/dist/components/table/table-header-row.js +19 -20
- package/dist/components/table/table-toolbar.js +63 -64
- package/dist/components/table/use-controllable-state.js +7 -7
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +41 -41
- package/dist/node_modules/date-fns/addDays.js +7 -7
- package/dist/node_modules/date-fns/addMonths.js +13 -13
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/endOfDay.js +6 -6
- package/dist/node_modules/date-fns/endOfMonth.js +6 -6
- package/dist/node_modules/date-fns/format.js +46 -47
- package/dist/node_modules/date-fns/getDayOfYear.js +8 -8
- package/dist/node_modules/date-fns/getISOWeek.js +9 -9
- package/dist/node_modules/date-fns/getISOWeekYear.js +10 -10
- package/dist/node_modules/date-fns/getWeek.js +9 -9
- package/dist/node_modules/date-fns/getWeekYear.js +13 -14
- package/dist/node_modules/date-fns/isSameDay.js +9 -9
- package/dist/node_modules/date-fns/isSameMonth.js +9 -9
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/isSameYear.js +9 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +6 -6
- package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +17 -17
- package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +47 -47
- package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +11 -11
- package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfMonth.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/date-fns/startOfWeekYear.js +9 -10
- package/dist/node_modules/date-fns/startOfYear.js +5 -5
- package/dist/theme/theme-config/components/modal-theme.js +13 -15
- package/dist/theme/theme-config/components/select-theme.js +15 -19
- package/package.json +3 -3
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { getDefaultOptions as
|
|
2
|
-
import { constructFrom as
|
|
3
|
-
import { startOfWeek as
|
|
4
|
-
import { toDate as
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return +a >= +O ? r + 1 : +a >= +n ? r : r - 1;
|
|
1
|
+
import { getDefaultOptions as k } from "./_lib/defaultOptions.js";
|
|
2
|
+
import { constructFrom as i } from "./constructFrom.js";
|
|
3
|
+
import { startOfWeek as l } from "./startOfWeek.js";
|
|
4
|
+
import { toDate as m } from "./toDate.js";
|
|
5
|
+
function C(r, e) {
|
|
6
|
+
const s = m(r, e?.in), t = s.getFullYear(), o = k(), f = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, a = i(e?.in || r, 0);
|
|
7
|
+
a.setFullYear(t + 1, 0, f), a.setHours(0, 0, 0, 0);
|
|
8
|
+
const c = l(a, e), n = i(e?.in || r, 0);
|
|
9
|
+
n.setFullYear(t, 0, f), n.setHours(0, 0, 0, 0);
|
|
10
|
+
const u = l(n, e);
|
|
11
|
+
return +s >= +c ? t + 1 : +s >= +u ? t : t - 1;
|
|
13
12
|
}
|
|
14
13
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
C as default,
|
|
15
|
+
C as getWeekYear
|
|
17
16
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { normalizeDates as
|
|
1
|
+
import { normalizeDates as f } from "./_lib/normalizeDates.js";
|
|
2
2
|
import { startOfDay as t } from "./startOfDay.js";
|
|
3
|
-
function
|
|
4
|
-
const [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
function s(a, e, r) {
|
|
4
|
+
const [o, i] = f(
|
|
5
|
+
r?.in,
|
|
6
|
+
a,
|
|
7
|
+
e
|
|
8
8
|
);
|
|
9
|
-
return +t(
|
|
9
|
+
return +t(o) == +t(i);
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
s as default,
|
|
13
|
+
s as isSameDay
|
|
14
14
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { normalizeDates as
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { normalizeDates as o } from "./_lib/normalizeDates.js";
|
|
2
|
+
function i(a, r, n) {
|
|
3
|
+
const [e, t] = o(
|
|
4
|
+
n?.in,
|
|
5
|
+
a,
|
|
6
|
+
r
|
|
7
7
|
);
|
|
8
|
-
return
|
|
8
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth();
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
i as default,
|
|
12
|
+
i as isSameMonth
|
|
13
13
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { normalizeDates as
|
|
1
|
+
import { normalizeDates as i } from "./_lib/normalizeDates.js";
|
|
2
2
|
import { startOfWeek as r } from "./startOfWeek.js";
|
|
3
|
-
function
|
|
4
|
-
const [m, f] =
|
|
5
|
-
e
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
function o(t, a, e) {
|
|
4
|
+
const [m, f] = i(
|
|
5
|
+
e?.in,
|
|
6
|
+
t,
|
|
7
|
+
a
|
|
8
8
|
);
|
|
9
9
|
return +r(m, e) == +r(f, e);
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
o as default,
|
|
13
|
+
o as isSameWeek
|
|
14
14
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { normalizeDates as
|
|
2
|
-
function
|
|
3
|
-
const [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { normalizeDates as i } from "./_lib/normalizeDates.js";
|
|
2
|
+
function o(e, a, r) {
|
|
3
|
+
const [t, l] = i(
|
|
4
|
+
r?.in,
|
|
5
|
+
e,
|
|
6
|
+
a
|
|
7
7
|
);
|
|
8
|
-
return
|
|
8
|
+
return t.getFullYear() === l.getFullYear();
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
o as default,
|
|
12
|
+
o as isSameYear
|
|
13
13
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function
|
|
2
|
-
return (
|
|
3
|
-
const
|
|
4
|
-
let
|
|
5
|
-
if (
|
|
6
|
-
const
|
|
7
|
-
|
|
1
|
+
function c(t) {
|
|
2
|
+
return (l, e) => {
|
|
3
|
+
const u = e?.context ? String(e.context) : "standalone";
|
|
4
|
+
let d;
|
|
5
|
+
if (u === "formatting" && t.formattingValues) {
|
|
6
|
+
const n = t.defaultFormattingWidth || t.defaultWidth, i = e?.width ? String(e.width) : n;
|
|
7
|
+
d = t.formattingValues[i] || t.formattingValues[n];
|
|
8
8
|
} else {
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const n = t.defaultWidth, i = e?.width ? String(e.width) : t.defaultWidth;
|
|
10
|
+
d = t.values[i] || t.values[n];
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
return
|
|
12
|
+
const a = t.argumentCallback ? t.argumentCallback(l) : l;
|
|
13
|
+
return d[a];
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as buildLocalizeFn
|
|
18
18
|
};
|
|
@@ -60,11 +60,11 @@ const u = {
|
|
|
60
60
|
one: "næsten 1 år",
|
|
61
61
|
other: "næsten {{count}} år"
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, s = (r, o, t) => {
|
|
64
64
|
let e;
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
65
|
+
const n = u[r];
|
|
66
|
+
return typeof n == "string" ? e = n : o === 1 ? e = n.one : e = n.other.replace("{{count}}", String(o)), t?.addSuffix ? t.comparison && t.comparison > 0 ? "om " + e : e + " siden" : e;
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
s as formatDistance
|
|
70
70
|
};
|
|
@@ -60,10 +60,10 @@ const a = {
|
|
|
60
60
|
one: "almost 1 year",
|
|
61
61
|
other: "almost {{count}} years"
|
|
62
62
|
}
|
|
63
|
-
}, r = (s, n,
|
|
63
|
+
}, r = (s, n, t) => {
|
|
64
64
|
let e;
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
65
|
+
const o = a[s];
|
|
66
|
+
return typeof o == "string" ? e = o : n === 1 ? e = o.one : e = o.other.replace("{{count}}", n.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + e : e + " ago" : e;
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
r as formatDistance
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = {
|
|
2
2
|
lessThanXSeconds: {
|
|
3
3
|
one: "menos de un segundo",
|
|
4
4
|
other: "menos de {{count}} segundos"
|
|
@@ -60,10 +60,10 @@ const t = {
|
|
|
60
60
|
one: "casi 1 año",
|
|
61
61
|
other: "casi {{count}} años"
|
|
62
62
|
}
|
|
63
|
-
}, a = (
|
|
63
|
+
}, a = (t, s, n) => {
|
|
64
64
|
let e;
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
65
|
+
const o = r[t];
|
|
66
|
+
return typeof o == "string" ? e = o : s === 1 ? e = o.one : e = o.other.replace("{{count}}", s.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "en " + e : "hace " + e : e;
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
a as formatDistance
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = {
|
|
2
2
|
lessThanXSeconds: {
|
|
3
3
|
standalone: {
|
|
4
4
|
one: "vähem kui üks sekund",
|
|
@@ -153,11 +153,11 @@ const u = {
|
|
|
153
153
|
other: "peaaegu {{count}} aasta"
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
},
|
|
157
|
-
const
|
|
158
|
-
let
|
|
159
|
-
return typeof
|
|
156
|
+
}, u = (n, a, t) => {
|
|
157
|
+
const o = t?.addSuffix ? s[n].withPreposition : s[n].standalone;
|
|
158
|
+
let e;
|
|
159
|
+
return typeof o == "string" ? e = o : a === 1 ? e = o.one : e = o.other.replace("{{count}}", String(a)), t?.addSuffix ? t.comparison && t.comparison > 0 ? e + " pärast" : e + " eest" : e;
|
|
160
160
|
};
|
|
161
161
|
export {
|
|
162
|
-
|
|
162
|
+
u as formatDistance
|
|
163
163
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function
|
|
1
|
+
function r(e) {
|
|
2
2
|
return e.replace(/sekuntia?/, "sekunnin");
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function s(e) {
|
|
5
5
|
return e.replace(/minuuttia?/, "minuutin");
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function a(e) {
|
|
8
8
|
return e.replace(/tuntia?/, "tunnin");
|
|
9
9
|
}
|
|
10
10
|
function k(e) {
|
|
@@ -16,19 +16,19 @@ function c(e) {
|
|
|
16
16
|
function f(e) {
|
|
17
17
|
return e.replace(/(kuukausi|kuukautta)/, "kuukauden");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function u(e) {
|
|
20
20
|
return e.replace(/(vuosi|vuotta)/, "vuoden");
|
|
21
21
|
}
|
|
22
22
|
const l = {
|
|
23
23
|
lessThanXSeconds: {
|
|
24
24
|
one: "alle sekunti",
|
|
25
25
|
other: "alle {{count}} sekuntia",
|
|
26
|
-
futureTense:
|
|
26
|
+
futureTense: r
|
|
27
27
|
},
|
|
28
28
|
xSeconds: {
|
|
29
29
|
one: "sekunti",
|
|
30
30
|
other: "{{count}} sekuntia",
|
|
31
|
-
futureTense:
|
|
31
|
+
futureTense: r
|
|
32
32
|
},
|
|
33
33
|
halfAMinute: {
|
|
34
34
|
one: "puoli minuuttia",
|
|
@@ -38,22 +38,22 @@ const l = {
|
|
|
38
38
|
lessThanXMinutes: {
|
|
39
39
|
one: "alle minuutti",
|
|
40
40
|
other: "alle {{count}} minuuttia",
|
|
41
|
-
futureTense:
|
|
41
|
+
futureTense: s
|
|
42
42
|
},
|
|
43
43
|
xMinutes: {
|
|
44
44
|
one: "minuutti",
|
|
45
45
|
other: "{{count}} minuuttia",
|
|
46
|
-
futureTense:
|
|
46
|
+
futureTense: s
|
|
47
47
|
},
|
|
48
48
|
aboutXHours: {
|
|
49
49
|
one: "noin tunti",
|
|
50
50
|
other: "noin {{count}} tuntia",
|
|
51
|
-
futureTense:
|
|
51
|
+
futureTense: a
|
|
52
52
|
},
|
|
53
53
|
xHours: {
|
|
54
54
|
one: "tunti",
|
|
55
55
|
other: "{{count}} tuntia",
|
|
56
|
-
futureTense:
|
|
56
|
+
futureTense: a
|
|
57
57
|
},
|
|
58
58
|
xDays: {
|
|
59
59
|
one: "päivä",
|
|
@@ -83,26 +83,26 @@ const l = {
|
|
|
83
83
|
aboutXYears: {
|
|
84
84
|
one: "noin vuosi",
|
|
85
85
|
other: "noin {{count}} vuotta",
|
|
86
|
-
futureTense:
|
|
86
|
+
futureTense: u
|
|
87
87
|
},
|
|
88
88
|
xYears: {
|
|
89
89
|
one: "vuosi",
|
|
90
90
|
other: "{{count}} vuotta",
|
|
91
|
-
futureTense:
|
|
91
|
+
futureTense: u
|
|
92
92
|
},
|
|
93
93
|
overXYears: {
|
|
94
94
|
one: "yli vuosi",
|
|
95
95
|
other: "yli {{count}} vuotta",
|
|
96
|
-
futureTense:
|
|
96
|
+
futureTense: u
|
|
97
97
|
},
|
|
98
98
|
almostXYears: {
|
|
99
99
|
one: "lähes vuosi",
|
|
100
100
|
other: "lähes {{count}} vuotta",
|
|
101
|
-
futureTense:
|
|
101
|
+
futureTense: u
|
|
102
102
|
}
|
|
103
|
-
}, h = (e,
|
|
104
|
-
const n = l[e], o =
|
|
105
|
-
return
|
|
103
|
+
}, h = (e, i, t) => {
|
|
104
|
+
const n = l[e], o = i === 1 ? n.one : n.other.replace("{{count}}", String(i));
|
|
105
|
+
return t?.addSuffix ? t.comparison && t.comparison > 0 ? n.futureTense(o) + " kuluttua" : o + " sitten" : o;
|
|
106
106
|
};
|
|
107
107
|
export {
|
|
108
108
|
h as formatDistance
|
|
@@ -16,97 +16,97 @@ const m = {
|
|
|
16
16
|
over: "daugiau nei",
|
|
17
17
|
almost: "beveik",
|
|
18
18
|
lessthan: "mažiau nei"
|
|
19
|
-
}, h = (s,
|
|
20
|
-
const
|
|
21
|
-
return s === 1 ?
|
|
19
|
+
}, h = (s, a, e, o) => a ? o ? "kelių sekundžių" : "kelias sekundes" : "kelios sekundės", t = (s, a, e, o) => a ? o ? i(e)[1] : i(e)[2] : i(e)[0], n = (s, a, e, o) => {
|
|
20
|
+
const u = s + " ";
|
|
21
|
+
return s === 1 ? u + t(s, a, e, o) : a ? o ? u + i(e)[1] : u + (d(s) ? i(e)[1] : i(e)[2]) : u + (d(s) ? i(e)[1] : i(e)[0]);
|
|
22
22
|
};
|
|
23
23
|
function d(s) {
|
|
24
24
|
return s % 10 === 0 || s > 10 && s < 20;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function i(s) {
|
|
27
27
|
return m[s].split("_");
|
|
28
28
|
}
|
|
29
29
|
const x = {
|
|
30
30
|
lessThanXSeconds: {
|
|
31
31
|
one: h,
|
|
32
|
-
other:
|
|
32
|
+
other: n
|
|
33
33
|
},
|
|
34
34
|
xSeconds: {
|
|
35
35
|
one: h,
|
|
36
|
-
other:
|
|
36
|
+
other: n
|
|
37
37
|
},
|
|
38
38
|
halfAMinute: "pusė minutės",
|
|
39
39
|
lessThanXMinutes: {
|
|
40
|
-
one:
|
|
41
|
-
other:
|
|
40
|
+
one: t,
|
|
41
|
+
other: n
|
|
42
42
|
},
|
|
43
43
|
xMinutes: {
|
|
44
|
-
one:
|
|
45
|
-
other:
|
|
44
|
+
one: t,
|
|
45
|
+
other: n
|
|
46
46
|
},
|
|
47
47
|
aboutXHours: {
|
|
48
|
-
one:
|
|
49
|
-
other:
|
|
48
|
+
one: t,
|
|
49
|
+
other: n
|
|
50
50
|
},
|
|
51
51
|
xHours: {
|
|
52
|
-
one:
|
|
53
|
-
other:
|
|
52
|
+
one: t,
|
|
53
|
+
other: n
|
|
54
54
|
},
|
|
55
55
|
xDays: {
|
|
56
|
-
one:
|
|
57
|
-
other:
|
|
56
|
+
one: t,
|
|
57
|
+
other: n
|
|
58
58
|
},
|
|
59
59
|
aboutXWeeks: {
|
|
60
|
-
one:
|
|
61
|
-
other:
|
|
60
|
+
one: t,
|
|
61
|
+
other: n
|
|
62
62
|
},
|
|
63
63
|
xWeeks: {
|
|
64
|
-
one:
|
|
65
|
-
other:
|
|
64
|
+
one: t,
|
|
65
|
+
other: n
|
|
66
66
|
},
|
|
67
67
|
aboutXMonths: {
|
|
68
|
-
one:
|
|
69
|
-
other:
|
|
68
|
+
one: t,
|
|
69
|
+
other: n
|
|
70
70
|
},
|
|
71
71
|
xMonths: {
|
|
72
|
-
one:
|
|
73
|
-
other:
|
|
72
|
+
one: t,
|
|
73
|
+
other: n
|
|
74
74
|
},
|
|
75
75
|
aboutXYears: {
|
|
76
|
-
one:
|
|
77
|
-
other:
|
|
76
|
+
one: t,
|
|
77
|
+
other: n
|
|
78
78
|
},
|
|
79
79
|
xYears: {
|
|
80
|
-
one:
|
|
81
|
-
other:
|
|
80
|
+
one: t,
|
|
81
|
+
other: n
|
|
82
82
|
},
|
|
83
83
|
overXYears: {
|
|
84
|
-
one:
|
|
85
|
-
other:
|
|
84
|
+
one: t,
|
|
85
|
+
other: n
|
|
86
86
|
},
|
|
87
87
|
almostXYears: {
|
|
88
|
-
one:
|
|
89
|
-
other:
|
|
88
|
+
one: t,
|
|
89
|
+
other: n
|
|
90
90
|
}
|
|
91
|
-
}, f = (s,
|
|
92
|
-
const
|
|
93
|
-
let
|
|
91
|
+
}, f = (s, a, e) => {
|
|
92
|
+
const o = s.match(/about|over|almost|lessthan/i), u = o ? s.replace(o[0], "") : s, l = e?.comparison !== void 0 && e.comparison > 0;
|
|
93
|
+
let r;
|
|
94
94
|
const _ = x[s];
|
|
95
|
-
if (typeof _ == "string" ?
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
if (typeof _ == "string" ? r = _ : a === 1 ? r = _.one(
|
|
96
|
+
a,
|
|
97
|
+
e?.addSuffix === !0,
|
|
98
|
+
u.toLowerCase() + "_one",
|
|
99
99
|
l
|
|
100
|
-
) :
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
) : r = _.other(
|
|
101
|
+
a,
|
|
102
|
+
e?.addSuffix === !0,
|
|
103
|
+
u.toLowerCase() + "_other",
|
|
104
104
|
l
|
|
105
|
-
),
|
|
106
|
-
const c =
|
|
107
|
-
|
|
105
|
+
), o) {
|
|
106
|
+
const c = o[0].toLowerCase();
|
|
107
|
+
r = m[c] + " " + r;
|
|
108
108
|
}
|
|
109
|
-
return e
|
|
109
|
+
return e?.addSuffix ? e.comparison && e.comparison > 0 ? "po " + r : "prieš " + r : r;
|
|
110
110
|
};
|
|
111
111
|
export {
|
|
112
112
|
f as formatDistance
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
function e(n) {
|
|
2
|
-
return (
|
|
3
|
-
if (
|
|
4
|
-
return
|
|
2
|
+
return (t, a) => {
|
|
3
|
+
if (t === 1)
|
|
4
|
+
return a?.addSuffix ? n.one[0].replace("{{time}}", n.one[2]) : n.one[0].replace("{{time}}", n.one[1]);
|
|
5
5
|
{
|
|
6
|
-
const
|
|
7
|
-
return
|
|
6
|
+
const i = t % 10 === 1 && t % 100 !== 11;
|
|
7
|
+
return a?.addSuffix ? n.other[0].replace("{{time}}", i ? n.other[3] : n.other[4]).replace("{{count}}", String(t)) : n.other[0].replace("{{time}}", i ? n.other[1] : n.other[2]).replace("{{count}}", String(t));
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const m = {
|
|
12
12
|
lessThanXSeconds: e({
|
|
13
13
|
one: ["mazāk par {{time}}", "sekundi", "sekundi"],
|
|
14
14
|
other: [
|
|
@@ -29,7 +29,7 @@ const i = {
|
|
|
29
29
|
"sekundēm"
|
|
30
30
|
]
|
|
31
31
|
}),
|
|
32
|
-
halfAMinute: (n,
|
|
32
|
+
halfAMinute: (n, t) => t?.addSuffix ? "pusminūtes" : "pusminūte",
|
|
33
33
|
lessThanXMinutes: e({
|
|
34
34
|
one: ["mazāk par {{time}}", "minūti", "minūti"],
|
|
35
35
|
other: [
|
|
@@ -113,10 +113,10 @@ const i = {
|
|
|
113
113
|
one: ["gandrīz 1 {{time}}", "gads", "gada"],
|
|
114
114
|
other: ["vairāk nekā {{count}} {{time}}", "gads", "gadi", "gada", "gadiem"]
|
|
115
115
|
})
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
return
|
|
116
|
+
}, s = (n, t, a) => {
|
|
117
|
+
const i = m[n](t, a);
|
|
118
|
+
return a?.addSuffix ? a.comparison && a.comparison > 0 ? "pēc " + i : "pirms " + i : i;
|
|
119
119
|
};
|
|
120
120
|
export {
|
|
121
|
-
|
|
121
|
+
s as formatDistance
|
|
122
122
|
};
|
|
@@ -60,10 +60,10 @@ const u = {
|
|
|
60
60
|
one: "nesten ett år",
|
|
61
61
|
other: "nesten {{count}} år"
|
|
62
62
|
}
|
|
63
|
-
}, s = (r, o,
|
|
63
|
+
}, s = (r, o, n) => {
|
|
64
64
|
let e;
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
65
|
+
const t = u[r];
|
|
66
|
+
return typeof t == "string" ? e = t : o === 1 ? e = t.one : e = t.other.replace("{{count}}", String(o)), n?.addSuffix ? n.comparison && n.comparison > 0 ? "om " + e : e + " siden" : e;
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
s as formatDistance
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
lessThanXSeconds: {
|
|
3
3
|
one: "minder dan een seconde",
|
|
4
4
|
other: "minder dan {{count}} seconden"
|
|
@@ -60,10 +60,10 @@ const t = {
|
|
|
60
60
|
one: "bijna 1 jaar",
|
|
61
61
|
other: "bijna {{count}} jaar"
|
|
62
62
|
}
|
|
63
|
-
}, u = (
|
|
63
|
+
}, u = (t, r, o) => {
|
|
64
64
|
let e;
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
65
|
+
const n = a[t];
|
|
66
|
+
return typeof n == "string" ? e = n : r === 1 ? e = n.one : e = n.other.replace("{{count}}", String(r)), o?.addSuffix ? o.comparison && o.comparison > 0 ? "over " + e : e + " geleden" : e;
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
u as formatDistance
|
|
@@ -74,13 +74,13 @@ const u = {
|
|
|
74
74
|
"tio",
|
|
75
75
|
"elva",
|
|
76
76
|
"tolv"
|
|
77
|
-
], s = (
|
|
77
|
+
], s = (r, n, o) => {
|
|
78
78
|
let e;
|
|
79
|
-
const
|
|
80
|
-
return typeof
|
|
79
|
+
const t = u[r];
|
|
80
|
+
return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace(
|
|
81
81
|
"{{count}}",
|
|
82
|
-
|
|
83
|
-
),
|
|
82
|
+
n < 13 ? a[n] : String(n)
|
|
83
|
+
), o?.addSuffix ? o.comparison && o.comparison > 0 ? "om " + e : e + " sedan" : e;
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
86
86
|
s as formatDistance
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { toDate as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { toDate as a } from "./toDate.js";
|
|
2
|
+
function n(o, r) {
|
|
3
|
+
const t = a(o, r?.in);
|
|
4
|
+
return t.setHours(0, 0, 0, 0), t;
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
n as default,
|
|
8
|
+
n as startOfDay
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { toDate as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { toDate as r } from "./toDate.js";
|
|
2
|
+
function n(e, o) {
|
|
3
|
+
const t = r(e, o?.in);
|
|
4
|
+
return t.setDate(1), t.setHours(0, 0, 0, 0), t;
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
n as default,
|
|
8
|
+
n as startOfMonth
|
|
9
9
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { getDefaultOptions as
|
|
2
|
-
import { toDate as
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return t.setDate(t.getDate() - d), t.setHours(0, 0, 0, 0), t;
|
|
1
|
+
import { getDefaultOptions as f } from "./_lib/defaultOptions.js";
|
|
2
|
+
import { toDate as c } from "./toDate.js";
|
|
3
|
+
function l(n, e) {
|
|
4
|
+
const a = f(), o = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(n, e?.in), s = t.getDay(), r = (s < o ? 7 : 0) + s - o;
|
|
5
|
+
return t.setDate(t.getDate() - r), t.setHours(0, 0, 0, 0), t;
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
l as default,
|
|
9
|
+
l as startOfWeek
|
|
11
10
|
};
|