@react-stately/calendar 3.9.2 → 3.10.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/import.mjs +3 -3
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +4 -0
- package/package.json +17 -16
- package/src/index.ts +4 -5
- package/dist/types.d.ts +0 -165
- package/dist/types.d.ts.map +0 -1
- package/dist/useCalendarState.main.js +0 -300
- package/dist/useCalendarState.main.js.map +0 -1
- package/dist/useCalendarState.mjs +0 -295
- package/dist/useCalendarState.module.js +0 -295
- package/dist/useCalendarState.module.js.map +0 -1
- package/dist/useRangeCalendarState.main.js +0 -182
- package/dist/useRangeCalendarState.main.js.map +0 -1
- package/dist/useRangeCalendarState.mjs +0 -177
- package/dist/useRangeCalendarState.module.js +0 -177
- package/dist/useRangeCalendarState.module.js.map +0 -1
- package/dist/utils.main.js +0 -90
- package/dist/utils.main.js.map +0 -1
- package/dist/utils.mjs +0 -79
- package/dist/utils.module.js +0 -79
- package/dist/utils.module.js.map +0 -1
- package/src/types.ts +0 -126
- package/src/useCalendarState.ts +0 -373
- package/src/useRangeCalendarState.ts +0 -236
- package/src/utils.ts +0 -134
package/dist/utils.main.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var $i2P57$internationalizeddate = require("@internationalized/date");
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
function $parcel$export(e, n, v, s) {
|
|
5
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
$parcel$export(module.exports, "isInvalid", () => $4301262d71f567b9$export$eac50920cf2fd59a);
|
|
9
|
-
$parcel$export(module.exports, "alignCenter", () => $4301262d71f567b9$export$f4a51ff076cc9a09);
|
|
10
|
-
$parcel$export(module.exports, "alignStart", () => $4301262d71f567b9$export$144a00ba6044eb9);
|
|
11
|
-
$parcel$export(module.exports, "constrainStart", () => $4301262d71f567b9$export$5bb865b12696a77d);
|
|
12
|
-
$parcel$export(module.exports, "alignEnd", () => $4301262d71f567b9$export$530edbfc915b2b04);
|
|
13
|
-
$parcel$export(module.exports, "constrainValue", () => $4301262d71f567b9$export$4f5203c0d889109e);
|
|
14
|
-
$parcel$export(module.exports, "previousAvailableDate", () => $4301262d71f567b9$export$a1d3911297b952d7);
|
|
15
|
-
/*
|
|
16
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
17
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
18
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
19
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
20
|
-
*
|
|
21
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
22
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
23
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
24
|
-
* governing permissions and limitations under the License.
|
|
25
|
-
*/
|
|
26
|
-
function $4301262d71f567b9$export$eac50920cf2fd59a(date, minValue, maxValue) {
|
|
27
|
-
return minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
28
|
-
}
|
|
29
|
-
function $4301262d71f567b9$export$f4a51ff076cc9a09(date, duration, locale, minValue, maxValue) {
|
|
30
|
-
let halfDuration = {};
|
|
31
|
-
for(let key in duration){
|
|
32
|
-
halfDuration[key] = Math.floor(duration[key] / 2);
|
|
33
|
-
if (halfDuration[key] > 0 && duration[key] % 2 === 0) halfDuration[key]--;
|
|
34
|
-
}
|
|
35
|
-
let aligned = $4301262d71f567b9$export$144a00ba6044eb9(date, duration, locale).subtract(halfDuration);
|
|
36
|
-
return $4301262d71f567b9$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
37
|
-
}
|
|
38
|
-
function $4301262d71f567b9$export$144a00ba6044eb9(date, duration, locale, minValue, maxValue) {
|
|
39
|
-
// align to the start of the largest unit
|
|
40
|
-
let aligned = date;
|
|
41
|
-
if (duration.years) aligned = (0, $i2P57$internationalizeddate.startOfYear)(date);
|
|
42
|
-
else if (duration.months) aligned = (0, $i2P57$internationalizeddate.startOfMonth)(date);
|
|
43
|
-
else if (duration.weeks) aligned = (0, $i2P57$internationalizeddate.startOfWeek)(date, locale);
|
|
44
|
-
return $4301262d71f567b9$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
45
|
-
}
|
|
46
|
-
function $4301262d71f567b9$export$530edbfc915b2b04(date, duration, locale, minValue, maxValue) {
|
|
47
|
-
let d = {
|
|
48
|
-
...duration
|
|
49
|
-
};
|
|
50
|
-
// subtract 1 from the smallest unit
|
|
51
|
-
if (d.days) d.days--;
|
|
52
|
-
else if (d.weeks) d.weeks--;
|
|
53
|
-
else if (d.months) d.months--;
|
|
54
|
-
else if (d.years) d.years--;
|
|
55
|
-
let aligned = $4301262d71f567b9$export$144a00ba6044eb9(date, duration, locale).subtract(d);
|
|
56
|
-
return $4301262d71f567b9$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
57
|
-
}
|
|
58
|
-
function $4301262d71f567b9$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue) {
|
|
59
|
-
if (minValue && date.compare(minValue) >= 0) {
|
|
60
|
-
let newDate = (0, $i2P57$internationalizeddate.maxDate)(aligned, $4301262d71f567b9$export$144a00ba6044eb9((0, $i2P57$internationalizeddate.toCalendarDate)(minValue), duration, locale));
|
|
61
|
-
if (newDate) aligned = newDate;
|
|
62
|
-
}
|
|
63
|
-
if (maxValue && date.compare(maxValue) <= 0) {
|
|
64
|
-
let newDate = (0, $i2P57$internationalizeddate.minDate)(aligned, $4301262d71f567b9$export$530edbfc915b2b04((0, $i2P57$internationalizeddate.toCalendarDate)(maxValue), duration, locale));
|
|
65
|
-
if (newDate) aligned = newDate;
|
|
66
|
-
}
|
|
67
|
-
return aligned;
|
|
68
|
-
}
|
|
69
|
-
function $4301262d71f567b9$export$4f5203c0d889109e(date, minValue, maxValue) {
|
|
70
|
-
if (minValue) {
|
|
71
|
-
let newDate = (0, $i2P57$internationalizeddate.maxDate)(date, (0, $i2P57$internationalizeddate.toCalendarDate)(minValue));
|
|
72
|
-
if (newDate) date = newDate;
|
|
73
|
-
}
|
|
74
|
-
if (maxValue) {
|
|
75
|
-
let newDate = (0, $i2P57$internationalizeddate.minDate)(date, (0, $i2P57$internationalizeddate.toCalendarDate)(maxValue));
|
|
76
|
-
if (newDate) date = newDate;
|
|
77
|
-
}
|
|
78
|
-
return date;
|
|
79
|
-
}
|
|
80
|
-
function $4301262d71f567b9$export$a1d3911297b952d7(date, minValue, isDateUnavailable) {
|
|
81
|
-
if (!isDateUnavailable) return date;
|
|
82
|
-
while(date.compare(minValue) >= 0 && isDateUnavailable(date))date = date.subtract({
|
|
83
|
-
days: 1
|
|
84
|
-
});
|
|
85
|
-
if (date.compare(minValue) >= 0) return date;
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=utils.main.js.map
|
package/dist/utils.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"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","sources":["packages/@react-stately/calendar/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n CalendarDate,\n DateDuration,\n maxDate,\n minDate,\n startOfMonth,\n startOfWeek,\n startOfYear,\n toCalendarDate\n} from '@internationalized/date';\nimport {DateValue} from '@react-types/calendar';\n\nexport function isInvalid(date: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean {\n return (minValue != null && date.compare(minValue) < 0) ||\n (maxValue != null && date.compare(maxValue) > 0);\n}\n\nexport function alignCenter(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n let halfDuration: DateDuration = {};\n for (let key in duration) {\n halfDuration[key] = Math.floor(duration[key] / 2);\n if (halfDuration[key] > 0 && duration[key] % 2 === 0) {\n halfDuration[key]--;\n }\n }\n\n let aligned = alignStart(date, duration, locale).subtract(halfDuration);\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function alignStart(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n // align to the start of the largest unit\n let aligned = date;\n if (duration.years) {\n aligned = startOfYear(date);\n } else if (duration.months) {\n aligned = startOfMonth(date);\n } else if (duration.weeks) {\n aligned = startOfWeek(date, locale);\n }\n\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function alignEnd(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n let d = {...duration};\n // subtract 1 from the smallest unit\n if (d.days) {\n d.days--;\n } else if (d.weeks) {\n d.weeks--;\n } else if (d.months) {\n d.months--;\n } else if (d.years) {\n d.years--;\n }\n\n let aligned = alignStart(date, duration, locale).subtract(d);\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function constrainStart(\n date: CalendarDate,\n aligned: CalendarDate,\n duration: DateDuration,\n locale: string,\n minValue?: DateValue | null,\n maxValue?: DateValue | null): CalendarDate {\n if (minValue && date.compare(minValue) >= 0) {\n let newDate = maxDate(\n aligned,\n alignStart(toCalendarDate(minValue), duration, locale)\n );\n if (newDate) {\n aligned = newDate;\n }\n }\n\n if (maxValue && date.compare(maxValue) <= 0) {\n let newDate = minDate(\n aligned,\n alignEnd(toCalendarDate(maxValue), duration, locale)\n );\n if (newDate) {\n aligned = newDate;\n }\n }\n\n return aligned;\n}\n\nexport function constrainValue(date: CalendarDate, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n if (minValue) {\n let newDate = maxDate(date, toCalendarDate(minValue));\n if (newDate) {\n date = newDate;\n }\n }\n\n if (maxValue) {\n let newDate = minDate(date, toCalendarDate(maxValue));\n if (newDate) {\n date = newDate;\n }\n }\n\n return date;\n}\n\nexport function previousAvailableDate(date: CalendarDate, minValue: DateValue, isDateUnavailable?: (date: CalendarDate) => boolean): CalendarDate | null {\n if (!isDateUnavailable) {\n return date;\n }\n\n while (date.compare(minValue) >= 0 && isDateUnavailable(date)) {\n date = date.subtract({days: 1});\n }\n\n if (date.compare(minValue) >= 0) {\n return date;\n }\n return null;\n}\n"],"names":[],"version":3,"file":"utils.main.js.map"}
|
package/dist/utils.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import {startOfYear as $k1D4u$startOfYear, startOfMonth as $k1D4u$startOfMonth, startOfWeek as $k1D4u$startOfWeek, maxDate as $k1D4u$maxDate, toCalendarDate as $k1D4u$toCalendarDate, minDate as $k1D4u$minDate} from "@internationalized/date";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
*
|
|
9
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
-
* governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
function $f62d864046160412$export$eac50920cf2fd59a(date, minValue, maxValue) {
|
|
15
|
-
return minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
16
|
-
}
|
|
17
|
-
function $f62d864046160412$export$f4a51ff076cc9a09(date, duration, locale, minValue, maxValue) {
|
|
18
|
-
let halfDuration = {};
|
|
19
|
-
for(let key in duration){
|
|
20
|
-
halfDuration[key] = Math.floor(duration[key] / 2);
|
|
21
|
-
if (halfDuration[key] > 0 && duration[key] % 2 === 0) halfDuration[key]--;
|
|
22
|
-
}
|
|
23
|
-
let aligned = $f62d864046160412$export$144a00ba6044eb9(date, duration, locale).subtract(halfDuration);
|
|
24
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
25
|
-
}
|
|
26
|
-
function $f62d864046160412$export$144a00ba6044eb9(date, duration, locale, minValue, maxValue) {
|
|
27
|
-
// align to the start of the largest unit
|
|
28
|
-
let aligned = date;
|
|
29
|
-
if (duration.years) aligned = (0, $k1D4u$startOfYear)(date);
|
|
30
|
-
else if (duration.months) aligned = (0, $k1D4u$startOfMonth)(date);
|
|
31
|
-
else if (duration.weeks) aligned = (0, $k1D4u$startOfWeek)(date, locale);
|
|
32
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
33
|
-
}
|
|
34
|
-
function $f62d864046160412$export$530edbfc915b2b04(date, duration, locale, minValue, maxValue) {
|
|
35
|
-
let d = {
|
|
36
|
-
...duration
|
|
37
|
-
};
|
|
38
|
-
// subtract 1 from the smallest unit
|
|
39
|
-
if (d.days) d.days--;
|
|
40
|
-
else if (d.weeks) d.weeks--;
|
|
41
|
-
else if (d.months) d.months--;
|
|
42
|
-
else if (d.years) d.years--;
|
|
43
|
-
let aligned = $f62d864046160412$export$144a00ba6044eb9(date, duration, locale).subtract(d);
|
|
44
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
45
|
-
}
|
|
46
|
-
function $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue) {
|
|
47
|
-
if (minValue && date.compare(minValue) >= 0) {
|
|
48
|
-
let newDate = (0, $k1D4u$maxDate)(aligned, $f62d864046160412$export$144a00ba6044eb9((0, $k1D4u$toCalendarDate)(minValue), duration, locale));
|
|
49
|
-
if (newDate) aligned = newDate;
|
|
50
|
-
}
|
|
51
|
-
if (maxValue && date.compare(maxValue) <= 0) {
|
|
52
|
-
let newDate = (0, $k1D4u$minDate)(aligned, $f62d864046160412$export$530edbfc915b2b04((0, $k1D4u$toCalendarDate)(maxValue), duration, locale));
|
|
53
|
-
if (newDate) aligned = newDate;
|
|
54
|
-
}
|
|
55
|
-
return aligned;
|
|
56
|
-
}
|
|
57
|
-
function $f62d864046160412$export$4f5203c0d889109e(date, minValue, maxValue) {
|
|
58
|
-
if (minValue) {
|
|
59
|
-
let newDate = (0, $k1D4u$maxDate)(date, (0, $k1D4u$toCalendarDate)(minValue));
|
|
60
|
-
if (newDate) date = newDate;
|
|
61
|
-
}
|
|
62
|
-
if (maxValue) {
|
|
63
|
-
let newDate = (0, $k1D4u$minDate)(date, (0, $k1D4u$toCalendarDate)(maxValue));
|
|
64
|
-
if (newDate) date = newDate;
|
|
65
|
-
}
|
|
66
|
-
return date;
|
|
67
|
-
}
|
|
68
|
-
function $f62d864046160412$export$a1d3911297b952d7(date, minValue, isDateUnavailable) {
|
|
69
|
-
if (!isDateUnavailable) return date;
|
|
70
|
-
while(date.compare(minValue) >= 0 && isDateUnavailable(date))date = date.subtract({
|
|
71
|
-
days: 1
|
|
72
|
-
});
|
|
73
|
-
if (date.compare(minValue) >= 0) return date;
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
export {$f62d864046160412$export$eac50920cf2fd59a as isInvalid, $f62d864046160412$export$f4a51ff076cc9a09 as alignCenter, $f62d864046160412$export$144a00ba6044eb9 as alignStart, $f62d864046160412$export$5bb865b12696a77d as constrainStart, $f62d864046160412$export$530edbfc915b2b04 as alignEnd, $f62d864046160412$export$4f5203c0d889109e as constrainValue, $f62d864046160412$export$a1d3911297b952d7 as previousAvailableDate};
|
|
79
|
-
//# sourceMappingURL=utils.module.js.map
|
package/dist/utils.module.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import {startOfYear as $k1D4u$startOfYear, startOfMonth as $k1D4u$startOfMonth, startOfWeek as $k1D4u$startOfWeek, maxDate as $k1D4u$maxDate, toCalendarDate as $k1D4u$toCalendarDate, minDate as $k1D4u$minDate} from "@internationalized/date";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
*
|
|
9
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
-
* governing permissions and limitations under the License.
|
|
13
|
-
*/
|
|
14
|
-
function $f62d864046160412$export$eac50920cf2fd59a(date, minValue, maxValue) {
|
|
15
|
-
return minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
16
|
-
}
|
|
17
|
-
function $f62d864046160412$export$f4a51ff076cc9a09(date, duration, locale, minValue, maxValue) {
|
|
18
|
-
let halfDuration = {};
|
|
19
|
-
for(let key in duration){
|
|
20
|
-
halfDuration[key] = Math.floor(duration[key] / 2);
|
|
21
|
-
if (halfDuration[key] > 0 && duration[key] % 2 === 0) halfDuration[key]--;
|
|
22
|
-
}
|
|
23
|
-
let aligned = $f62d864046160412$export$144a00ba6044eb9(date, duration, locale).subtract(halfDuration);
|
|
24
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
25
|
-
}
|
|
26
|
-
function $f62d864046160412$export$144a00ba6044eb9(date, duration, locale, minValue, maxValue) {
|
|
27
|
-
// align to the start of the largest unit
|
|
28
|
-
let aligned = date;
|
|
29
|
-
if (duration.years) aligned = (0, $k1D4u$startOfYear)(date);
|
|
30
|
-
else if (duration.months) aligned = (0, $k1D4u$startOfMonth)(date);
|
|
31
|
-
else if (duration.weeks) aligned = (0, $k1D4u$startOfWeek)(date, locale);
|
|
32
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
33
|
-
}
|
|
34
|
-
function $f62d864046160412$export$530edbfc915b2b04(date, duration, locale, minValue, maxValue) {
|
|
35
|
-
let d = {
|
|
36
|
-
...duration
|
|
37
|
-
};
|
|
38
|
-
// subtract 1 from the smallest unit
|
|
39
|
-
if (d.days) d.days--;
|
|
40
|
-
else if (d.weeks) d.weeks--;
|
|
41
|
-
else if (d.months) d.months--;
|
|
42
|
-
else if (d.years) d.years--;
|
|
43
|
-
let aligned = $f62d864046160412$export$144a00ba6044eb9(date, duration, locale).subtract(d);
|
|
44
|
-
return $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue);
|
|
45
|
-
}
|
|
46
|
-
function $f62d864046160412$export$5bb865b12696a77d(date, aligned, duration, locale, minValue, maxValue) {
|
|
47
|
-
if (minValue && date.compare(minValue) >= 0) {
|
|
48
|
-
let newDate = (0, $k1D4u$maxDate)(aligned, $f62d864046160412$export$144a00ba6044eb9((0, $k1D4u$toCalendarDate)(minValue), duration, locale));
|
|
49
|
-
if (newDate) aligned = newDate;
|
|
50
|
-
}
|
|
51
|
-
if (maxValue && date.compare(maxValue) <= 0) {
|
|
52
|
-
let newDate = (0, $k1D4u$minDate)(aligned, $f62d864046160412$export$530edbfc915b2b04((0, $k1D4u$toCalendarDate)(maxValue), duration, locale));
|
|
53
|
-
if (newDate) aligned = newDate;
|
|
54
|
-
}
|
|
55
|
-
return aligned;
|
|
56
|
-
}
|
|
57
|
-
function $f62d864046160412$export$4f5203c0d889109e(date, minValue, maxValue) {
|
|
58
|
-
if (minValue) {
|
|
59
|
-
let newDate = (0, $k1D4u$maxDate)(date, (0, $k1D4u$toCalendarDate)(minValue));
|
|
60
|
-
if (newDate) date = newDate;
|
|
61
|
-
}
|
|
62
|
-
if (maxValue) {
|
|
63
|
-
let newDate = (0, $k1D4u$minDate)(date, (0, $k1D4u$toCalendarDate)(maxValue));
|
|
64
|
-
if (newDate) date = newDate;
|
|
65
|
-
}
|
|
66
|
-
return date;
|
|
67
|
-
}
|
|
68
|
-
function $f62d864046160412$export$a1d3911297b952d7(date, minValue, isDateUnavailable) {
|
|
69
|
-
if (!isDateUnavailable) return date;
|
|
70
|
-
while(date.compare(minValue) >= 0 && isDateUnavailable(date))date = date.subtract({
|
|
71
|
-
days: 1
|
|
72
|
-
});
|
|
73
|
-
if (date.compare(minValue) >= 0) return date;
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
export {$f62d864046160412$export$eac50920cf2fd59a as isInvalid, $f62d864046160412$export$f4a51ff076cc9a09 as alignCenter, $f62d864046160412$export$144a00ba6044eb9 as alignStart, $f62d864046160412$export$5bb865b12696a77d as constrainStart, $f62d864046160412$export$530edbfc915b2b04 as alignEnd, $f62d864046160412$export$4f5203c0d889109e as constrainValue, $f62d864046160412$export$a1d3911297b952d7 as previousAvailableDate};
|
|
79
|
-
//# sourceMappingURL=utils.module.js.map
|
package/dist/utils.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"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","sources":["packages/@react-stately/calendar/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n CalendarDate,\n DateDuration,\n maxDate,\n minDate,\n startOfMonth,\n startOfWeek,\n startOfYear,\n toCalendarDate\n} from '@internationalized/date';\nimport {DateValue} from '@react-types/calendar';\n\nexport function isInvalid(date: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean {\n return (minValue != null && date.compare(minValue) < 0) ||\n (maxValue != null && date.compare(maxValue) > 0);\n}\n\nexport function alignCenter(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n let halfDuration: DateDuration = {};\n for (let key in duration) {\n halfDuration[key] = Math.floor(duration[key] / 2);\n if (halfDuration[key] > 0 && duration[key] % 2 === 0) {\n halfDuration[key]--;\n }\n }\n\n let aligned = alignStart(date, duration, locale).subtract(halfDuration);\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function alignStart(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n // align to the start of the largest unit\n let aligned = date;\n if (duration.years) {\n aligned = startOfYear(date);\n } else if (duration.months) {\n aligned = startOfMonth(date);\n } else if (duration.weeks) {\n aligned = startOfWeek(date, locale);\n }\n\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function alignEnd(date: CalendarDate, duration: DateDuration, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n let d = {...duration};\n // subtract 1 from the smallest unit\n if (d.days) {\n d.days--;\n } else if (d.weeks) {\n d.weeks--;\n } else if (d.months) {\n d.months--;\n } else if (d.years) {\n d.years--;\n }\n\n let aligned = alignStart(date, duration, locale).subtract(d);\n return constrainStart(date, aligned, duration, locale, minValue, maxValue);\n}\n\nexport function constrainStart(\n date: CalendarDate,\n aligned: CalendarDate,\n duration: DateDuration,\n locale: string,\n minValue?: DateValue | null,\n maxValue?: DateValue | null): CalendarDate {\n if (minValue && date.compare(minValue) >= 0) {\n let newDate = maxDate(\n aligned,\n alignStart(toCalendarDate(minValue), duration, locale)\n );\n if (newDate) {\n aligned = newDate;\n }\n }\n\n if (maxValue && date.compare(maxValue) <= 0) {\n let newDate = minDate(\n aligned,\n alignEnd(toCalendarDate(maxValue), duration, locale)\n );\n if (newDate) {\n aligned = newDate;\n }\n }\n\n return aligned;\n}\n\nexport function constrainValue(date: CalendarDate, minValue?: DateValue | null, maxValue?: DateValue | null): CalendarDate {\n if (minValue) {\n let newDate = maxDate(date, toCalendarDate(minValue));\n if (newDate) {\n date = newDate;\n }\n }\n\n if (maxValue) {\n let newDate = minDate(date, toCalendarDate(maxValue));\n if (newDate) {\n date = newDate;\n }\n }\n\n return date;\n}\n\nexport function previousAvailableDate(date: CalendarDate, minValue: DateValue, isDateUnavailable?: (date: CalendarDate) => boolean): CalendarDate | null {\n if (!isDateUnavailable) {\n return date;\n }\n\n while (date.compare(minValue) >= 0 && isDateUnavailable(date)) {\n date = date.subtract({days: 1});\n }\n\n if (date.compare(minValue) >= 0) {\n return date;\n }\n return null;\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
|
package/src/types.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import {CalendarDate} from '@internationalized/date';
|
|
14
|
-
import {DateValue} from '@react-types/calendar';
|
|
15
|
-
import {RangeValue, ValidationState} from '@react-types/shared';
|
|
16
|
-
|
|
17
|
-
interface CalendarStateBase {
|
|
18
|
-
/** Whether the calendar is disabled. */
|
|
19
|
-
readonly isDisabled: boolean,
|
|
20
|
-
/** Whether the calendar is in a read only state. */
|
|
21
|
-
readonly isReadOnly: boolean,
|
|
22
|
-
/** The date range that is currently visible in the calendar. */
|
|
23
|
-
readonly visibleRange: RangeValue<CalendarDate>,
|
|
24
|
-
/** The minimum allowed date that a user may select. */
|
|
25
|
-
readonly minValue?: DateValue | null,
|
|
26
|
-
/** The maximum allowed date that a user may select. */
|
|
27
|
-
readonly maxValue?: DateValue | null,
|
|
28
|
-
/** The time zone of the dates currently being displayed. */
|
|
29
|
-
readonly timeZone: string,
|
|
30
|
-
/**
|
|
31
|
-
* The current validation state of the selected value.
|
|
32
|
-
* @deprecated Use `isValueInvalid` instead.
|
|
33
|
-
*/
|
|
34
|
-
readonly validationState: ValidationState | null,
|
|
35
|
-
/** Whether the calendar is invalid. */
|
|
36
|
-
readonly isValueInvalid: boolean,
|
|
37
|
-
/** The currently focused date. */
|
|
38
|
-
readonly focusedDate: CalendarDate,
|
|
39
|
-
/** Sets the focused date. */
|
|
40
|
-
setFocusedDate(value: CalendarDate): void,
|
|
41
|
-
/** Moves focus to the next calendar date. */
|
|
42
|
-
focusNextDay(): void,
|
|
43
|
-
/** Moves focus to the previous calendar date. */
|
|
44
|
-
focusPreviousDay(): void,
|
|
45
|
-
/** Moves focus to the next row of dates, e.g. the next week. */
|
|
46
|
-
focusNextRow(): void,
|
|
47
|
-
/** Moves focus to the previous row of dates, e.g. the previous work. */
|
|
48
|
-
focusPreviousRow(): void,
|
|
49
|
-
/** Moves focus to the next page of dates, e.g. the next month if one month is visible. */
|
|
50
|
-
focusNextPage(): void,
|
|
51
|
-
/** Moves focus to the previous page of dates, e.g. the previous month if one month is visible. */
|
|
52
|
-
focusPreviousPage(): void,
|
|
53
|
-
/** Moves focus to the start of the current section of dates, e.g. the start of the current month. */
|
|
54
|
-
focusSectionStart(): void,
|
|
55
|
-
/** Moves focus to the end of the current section of dates, e.g. the end of the current month month. */
|
|
56
|
-
focusSectionEnd(): void,
|
|
57
|
-
/**
|
|
58
|
-
* Moves focus to the next section of dates based on what is currently displayed.
|
|
59
|
-
* By default, focus is moved by one of the currently displayed unit. For example, if
|
|
60
|
-
* one or more months are displayed, then focus is moved forward by one month.
|
|
61
|
-
* If the `larger` option is `true`, the focus is moved by the next larger unit than
|
|
62
|
-
* the one displayed. For example, if months are displayed, then focus moves to the next year.
|
|
63
|
-
*/
|
|
64
|
-
focusNextSection(larger?: boolean): void,
|
|
65
|
-
/**
|
|
66
|
-
* Moves focus to the previous section of dates based on what is currently displayed.
|
|
67
|
-
* By default, focus is moved by one of the currently displayed unit. For example, if
|
|
68
|
-
* one or more months are displayed, then focus is moved backward by one month.
|
|
69
|
-
* If the `larger` option is `true`, the focus is moved by the next larger unit than
|
|
70
|
-
* the one displayed. For example, if months are displayed, then focus moves to the previous year.
|
|
71
|
-
*/
|
|
72
|
-
focusPreviousSection(larger?: boolean): void,
|
|
73
|
-
/** Selects the currently focused date. */
|
|
74
|
-
selectFocusedDate(): void,
|
|
75
|
-
/** Selects the given date. */
|
|
76
|
-
selectDate(date: CalendarDate): void,
|
|
77
|
-
/** Whether focus is currently within the calendar. */
|
|
78
|
-
readonly isFocused: boolean,
|
|
79
|
-
/** Sets whether focus is currently within the calendar. */
|
|
80
|
-
setFocused(value: boolean): void,
|
|
81
|
-
/** Returns whether the given date is invalid according to the `minValue` and `maxValue` props. */
|
|
82
|
-
isInvalid(date: CalendarDate): boolean,
|
|
83
|
-
/** Returns whether the given date is currently selected. */
|
|
84
|
-
isSelected(date: CalendarDate): boolean,
|
|
85
|
-
/** Returns whether the given date is currently focused. */
|
|
86
|
-
isCellFocused(date: CalendarDate): boolean,
|
|
87
|
-
/** Returns whether the given date is disabled according to the `minValue, `maxValue`, and `isDisabled` props. */
|
|
88
|
-
isCellDisabled(date: CalendarDate): boolean,
|
|
89
|
-
/** Returns whether the given date is unavailable according to the `isDateUnavailable` prop. */
|
|
90
|
-
isCellUnavailable(date: CalendarDate): boolean,
|
|
91
|
-
/** Returns whether the previous visible date range is allowed to be selected according to the `minValue` prop. */
|
|
92
|
-
isPreviousVisibleRangeInvalid(): boolean,
|
|
93
|
-
/** Returns whether the next visible date range is allowed to be selected according to the `maxValue` prop. */
|
|
94
|
-
isNextVisibleRangeInvalid(): boolean,
|
|
95
|
-
/**
|
|
96
|
-
* Returns an array of dates in the week index counted from the provided start date, or the first visible date if not given.
|
|
97
|
-
* The returned array always has 7 elements, but may include null if the date does not exist according to the calendar system.
|
|
98
|
-
*/
|
|
99
|
-
getDatesInWeek(weekIndex: number, startDate?: CalendarDate): Array<CalendarDate | null>
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface CalendarState extends CalendarStateBase {
|
|
103
|
-
/** The currently selected date. */
|
|
104
|
-
readonly value: CalendarDate | null,
|
|
105
|
-
/** Sets the currently selected date. */
|
|
106
|
-
setValue(value: CalendarDate | null): void
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface RangeCalendarState<T extends DateValue = DateValue> extends CalendarStateBase {
|
|
110
|
-
/** The currently selected date range. */
|
|
111
|
-
readonly value: RangeValue<T> | null,
|
|
112
|
-
/** Sets the currently selected date range. */
|
|
113
|
-
setValue(value: RangeValue<T> | null): void,
|
|
114
|
-
/** Highlights the given date during selection, e.g. by hovering or dragging. */
|
|
115
|
-
highlightDate(date: CalendarDate): void,
|
|
116
|
-
/** The current anchor date that the user clicked on to begin range selection. */
|
|
117
|
-
readonly anchorDate: CalendarDate | null,
|
|
118
|
-
/** Sets the anchor date that the user clicked on to begin range selection. */
|
|
119
|
-
setAnchorDate(date: CalendarDate | null): void,
|
|
120
|
-
/** The currently highlighted date range. */
|
|
121
|
-
readonly highlightedRange: RangeValue<CalendarDate> | null,
|
|
122
|
-
/** Whether the user is currently dragging over the calendar. */
|
|
123
|
-
readonly isDragging: boolean,
|
|
124
|
-
/** Sets whether the user is dragging over the calendar. */
|
|
125
|
-
setDragging(isDragging: boolean): void
|
|
126
|
-
}
|