@fluentui/react-calendar-compat 0.0.0-nightly-20231018-0416.1 → 0.0.1
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/CHANGELOG.json +16 -40
- package/CHANGELOG.md +9 -13
- package/dist/index.d.ts +1376 -0
- package/lib/Calendar.js +1 -0
- package/lib/Calendar.js.map +1 -0
- package/lib/CalendarDay.js +1 -0
- package/lib/CalendarDay.js.map +1 -0
- package/lib/CalendarDayGrid.js +1 -0
- package/lib/CalendarDayGrid.js.map +1 -0
- package/lib/CalendarMonth.js +1 -0
- package/lib/CalendarMonth.js.map +1 -0
- package/lib/CalendarPicker.js +1 -0
- package/lib/CalendarPicker.js.map +1 -0
- package/lib/CalendarYear.js +1 -0
- package/lib/CalendarYear.js.map +1 -0
- package/lib/components/Calendar/Calendar.js +302 -0
- package/lib/components/Calendar/Calendar.js.map +1 -0
- package/lib/components/Calendar/Calendar.types.js +10 -0
- package/lib/components/Calendar/Calendar.types.js.map +1 -0
- package/lib/components/Calendar/defaults.js +2 -0
- package/lib/components/Calendar/defaults.js.map +1 -0
- package/lib/components/Calendar/index.js +4 -0
- package/lib/components/Calendar/index.js.map +1 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js +167 -0
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.js +111 -0
- package/lib/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib/components/CalendarDay/CalendarDay.types.js +1 -0
- package/lib/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib/components/CalendarDay/index.js +3 -0
- package/lib/components/CalendarDay/index.js.map +1 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +180 -0
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js +168 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js +1 -0
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +164 -0
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js +26 -0
- package/lib/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js +36 -0
- package/lib/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib/components/CalendarDayGrid/index.js +4 -0
- package/lib/components/CalendarDayGrid/index.js.map +1 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +437 -0
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js +98 -0
- package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib/components/CalendarDayGrid/useWeeks.js +45 -0
- package/lib/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.js +263 -0
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js +1 -0
- package/lib/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib/components/CalendarMonth/index.js +3 -0
- package/lib/components/CalendarMonth/index.js.map +1 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js +8 -0
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js +1 -0
- package/lib/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib/components/CalendarPicker/index.js +2 -0
- package/lib/components/CalendarPicker/index.js.map +1 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +371 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.js +298 -0
- package/lib/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib/components/CalendarYear/CalendarYear.types.js +1 -0
- package/lib/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib/components/CalendarYear/index.js +3 -0
- package/lib/components/CalendarYear/index.js.map +1 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js +10 -0
- package/lib/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/animations.js +97 -0
- package/lib/utils/animations.js.map +1 -0
- package/lib/utils/constants.js +62 -0
- package/lib/utils/constants.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js +95 -0
- package/lib/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js +1 -0
- package/lib/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib/utils/dateFormatting/index.js +2 -0
- package/lib/utils/dateFormatting/index.js.map +1 -0
- package/lib/utils/dateGrid/dateGrid.types.js +1 -0
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib/utils/dateGrid/findAvailableDate.js +22 -0
- package/lib/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js +18 -0
- package/lib/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js +16 -0
- package/lib/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib/utils/dateGrid/getDayGrid.js +71 -0
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib/utils/dateGrid/index.js +5 -0
- package/lib/utils/dateGrid/index.js.map +1 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js +9 -0
- package/lib/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js +9 -0
- package/lib/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib/utils/dateGrid/isContiguous.js +18 -0
- package/lib/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib/utils/dateGrid/isRestrictedDate.js +15 -0
- package/lib/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib/utils/dateMath/dateMath.js +339 -0
- package/lib/utils/dateMath/dateMath.js.map +1 -0
- package/lib/utils/dateMath/index.js +1 -0
- package/lib/utils/dateMath/index.js.map +1 -0
- package/lib/utils/dom.js +8 -0
- package/lib/utils/dom.js.map +1 -0
- package/lib/utils/focus.js +26 -0
- package/lib/utils/focus.js.map +1 -0
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -0
- package/lib-commonjs/Calendar.js +6 -0
- package/lib-commonjs/Calendar.js.map +1 -0
- package/lib-commonjs/CalendarDay.js +6 -0
- package/lib-commonjs/CalendarDay.js.map +1 -0
- package/lib-commonjs/CalendarDayGrid.js +6 -0
- package/lib-commonjs/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/CalendarMonth.js +6 -0
- package/lib-commonjs/CalendarMonth.js.map +1 -0
- package/lib-commonjs/CalendarPicker.js +6 -0
- package/lib-commonjs/CalendarPicker.js.map +1 -0
- package/lib-commonjs/CalendarYear.js +6 -0
- package/lib-commonjs/CalendarYear.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.js +311 -0
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js +21 -0
- package/lib-commonjs/components/Calendar/Calendar.types.js.map +1 -0
- package/lib-commonjs/components/Calendar/defaults.js +12 -0
- package/lib-commonjs/components/Calendar/defaults.js.map +1 -0
- package/lib-commonjs/components/Calendar/index.js +15 -0
- package/lib-commonjs/components/Calendar/index.js.map +1 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +339 -0
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js +120 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js +6 -0
- package/lib-commonjs/components/CalendarDay/CalendarDay.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/index.js +8 -0
- package/lib-commonjs/components/CalendarDay/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +357 -0
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js +179 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js +6 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +173 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js +35 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js +45 -0
- package/lib-commonjs/components/CalendarDayGrid/CalendarMonthHeaderRow.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js +22 -0
- package/lib-commonjs/components/CalendarDayGrid/index.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +890 -0
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js +105 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js +54 -0
- package/lib-commonjs/components/CalendarDayGrid/useWeeks.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +272 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js +6 -0
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.types.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/index.js +8 -0
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js +14 -0
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js +4 -0
- package/lib-commonjs/components/CalendarPicker/CalendarPicker.types.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/index.js +7 -0
- package/lib-commonjs/components/CalendarPicker/index.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +742 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js +307 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js +6 -0
- package/lib-commonjs/components/CalendarYear/CalendarYear.types.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/index.js +8 -0
- package/lib-commonjs/components/CalendarYear/index.js.map +1 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js +14 -0
- package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +154 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/utils/animations.js +154 -0
- package/lib-commonjs/utils/animations.js.map +1 -0
- package/lib-commonjs/utils/constants.js +92 -0
- package/lib-commonjs/utils/constants.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js +116 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.defaults.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js +4 -0
- package/lib-commonjs/utils/dateFormatting/dateFormatting.types.js.map +1 -0
- package/lib-commonjs/utils/dateFormatting/index.js +7 -0
- package/lib-commonjs/utils/dateFormatting/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js +4 -0
- package/lib-commonjs/utils/dateGrid/dateGrid.types.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js +29 -0
- package/lib-commonjs/utils/dateGrid/findAvailableDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js +23 -0
- package/lib-commonjs/utils/dateGrid/getBoundedDateRange.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js +20 -0
- package/lib-commonjs/utils/dateGrid/getDateRangeTypeToUse.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +76 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/index.js +10 -0
- package/lib-commonjs/utils/dateGrid/index.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isAfterMaxDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js +15 -0
- package/lib-commonjs/utils/dateGrid/isBeforeMinDate.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js +28 -0
- package/lib-commonjs/utils/dateGrid/isContiguous.js.map +1 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js +21 -0
- package/lib-commonjs/utils/dateGrid/isRestrictedDate.js.map +1 -0
- package/lib-commonjs/utils/dateMath/dateMath.js +308 -0
- package/lib-commonjs/utils/dateMath/dateMath.js.map +1 -0
- package/lib-commonjs/utils/dateMath/index.js +6 -0
- package/lib-commonjs/utils/dateMath/index.js.map +1 -0
- package/lib-commonjs/utils/dom.js +18 -0
- package/lib-commonjs/utils/dom.js.map +1 -0
- package/lib-commonjs/utils/focus.js +31 -0
- package/lib-commonjs/utils/focus.js.map +1 -0
- package/lib-commonjs/utils/index.js +12 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/package.json +16 -10
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { AnimationDirection, Calendar, calendarClassNames, defaultCalendarStrings, useCalendarStyles_unstable } from './Calendar';\nexport { CalendarDay, calendarDayClassNames, useCalendarDayStyles_unstable } from './CalendarDay';\nexport { CalendarDayGrid, calendarDayGridClassNames, extraCalendarDayGridClassNames, useCalendarDayGridStyles_unstable } from './CalendarDayGrid';\nexport { CalendarMonth, useCalendarMonthStyles_unstable } from './CalendarMonth';\nexport { calendarPickerClassNames, useCalendarPickerStyles_unstable } from './CalendarPicker';\nexport { CalendarYear, useCalendarYearStyles_unstable } from './CalendarYear';\nexport { DAYS_IN_WEEK, DateRangeType, DayOfWeek, DEFAULT_CALENDAR_STRINGS, DEFAULT_DATE_GRID_STRINGS, DEFAULT_DATE_FORMATTING, FirstWeekOfYear, MonthOfYear, TimeConstants, addDays, addMonths, addWeeks, addYears, compareDatePart, compareDates, getDatePartHashValue, getDateRangeArray, getEndDateOfWeek, getMonthEnd, getMonthStart, getStartDateOfWeek, getWeekNumber, getWeekNumbersInMonth, getYearEnd, getYearStart, isInDateRangeArray, setMonth } from './utils';\n"],"names":["AnimationDirection","Calendar","calendarClassNames","defaultCalendarStrings","useCalendarStyles_unstable","CalendarDay","calendarDayClassNames","useCalendarDayStyles_unstable","CalendarDayGrid","calendarDayGridClassNames","extraCalendarDayGridClassNames","useCalendarDayGridStyles_unstable","CalendarMonth","useCalendarMonthStyles_unstable","calendarPickerClassNames","useCalendarPickerStyles_unstable","CalendarYear","useCalendarYearStyles_unstable","DAYS_IN_WEEK","DateRangeType","DayOfWeek","DEFAULT_CALENDAR_STRINGS","DEFAULT_DATE_GRID_STRINGS","DEFAULT_DATE_FORMATTING","FirstWeekOfYear","MonthOfYear","TimeConstants","addDays","addMonths","addWeeks","addYears","compareDatePart","compareDates","getDatePartHashValue","getDateRangeArray","getEndDateOfWeek","getMonthEnd","getMonthStart","getStartDateOfWeek","getWeekNumber","getWeekNumbersInMonth","getYearEnd","getYearStart","isInDateRangeArray","setMonth"],"mappings":";;;;;;;;;;;IAASA,kBAAkB;eAAlBA,4BAAkB;;IAAEC,QAAQ;eAARA,kBAAQ;;IAAEC,kBAAkB;eAAlBA,4BAAkB;;IAAEC,sBAAsB;eAAtBA,gCAAsB;;IAAEC,0BAA0B;eAA1BA,oCAA0B;;IACpGC,WAAW;eAAXA,wBAAW;;IAAEC,qBAAqB;eAArBA,kCAAqB;;IAAEC,6BAA6B;eAA7BA,0CAA6B;;IACjEC,eAAe;eAAfA,gCAAe;;IAAEC,yBAAyB;eAAzBA,0CAAyB;;IAAEC,8BAA8B;eAA9BA,+CAA8B;;IAAEC,iCAAiC;eAAjCA,kDAAiC;;IAC7GC,aAAa;eAAbA,4BAAa;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAC9CC,wBAAwB;eAAxBA,wCAAwB;;IAAEC,gCAAgC;eAAhCA,gDAAgC;;IAC1DC,YAAY;eAAZA,0BAAY;;IAAEC,8BAA8B;eAA9BA,4CAA8B;;IAC5CC,YAAY;eAAZA,mBAAY;;IAAEC,aAAa;eAAbA,oBAAa;;IAAEC,SAAS;eAATA,gBAAS;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,yBAAyB;eAAzBA,gCAAyB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,WAAW;eAAXA,kBAAW;;IAAEC,aAAa;eAAbA,oBAAa;;IAAEC,OAAO;eAAPA,cAAO;;IAAEC,SAAS;eAATA,gBAAS;;IAAEC,QAAQ;eAARA,eAAQ;;IAAEC,QAAQ;eAARA,eAAQ;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,YAAY;eAAZA,mBAAY;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IAAEC,gBAAgB;eAAhBA,uBAAgB;;IAAEC,WAAW;eAAXA,kBAAW;;IAAEC,aAAa;eAAbA,oBAAa;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,aAAa;eAAbA,oBAAa;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,UAAU;eAAVA,iBAAU;;IAAEC,YAAY;eAAZA,mBAAY;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,QAAQ;eAARA,eAAQ;;;0BANrU;6BACnC;iCAC4C;+BAC/D;gCACY;8BACd;uBACqY"}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
EASING_FUNCTION_1: function() {
|
13
|
+
return EASING_FUNCTION_1;
|
14
|
+
},
|
15
|
+
EASING_FUNCTION_2: function() {
|
16
|
+
return EASING_FUNCTION_2;
|
17
|
+
},
|
18
|
+
DURATION_1: function() {
|
19
|
+
return DURATION_1;
|
20
|
+
},
|
21
|
+
DURATION_2: function() {
|
22
|
+
return DURATION_2;
|
23
|
+
},
|
24
|
+
DURATION_3: function() {
|
25
|
+
return DURATION_3;
|
26
|
+
},
|
27
|
+
DURATION_4: function() {
|
28
|
+
return DURATION_4;
|
29
|
+
},
|
30
|
+
FADE_IN: function() {
|
31
|
+
return FADE_IN;
|
32
|
+
},
|
33
|
+
FADE_OUT: function() {
|
34
|
+
return FADE_OUT;
|
35
|
+
},
|
36
|
+
SLIDE_DOWN_IN20: function() {
|
37
|
+
return SLIDE_DOWN_IN20;
|
38
|
+
},
|
39
|
+
SLIDE_LEFT_IN20: function() {
|
40
|
+
return SLIDE_LEFT_IN20;
|
41
|
+
},
|
42
|
+
SLIDE_RIGHT_IN20: function() {
|
43
|
+
return SLIDE_RIGHT_IN20;
|
44
|
+
},
|
45
|
+
SLIDE_UP_IN20: function() {
|
46
|
+
return SLIDE_UP_IN20;
|
47
|
+
},
|
48
|
+
SLIDE_DOWN_OUT20: function() {
|
49
|
+
return SLIDE_DOWN_OUT20;
|
50
|
+
},
|
51
|
+
SLIDE_UP_OUT20: function() {
|
52
|
+
return SLIDE_UP_OUT20;
|
53
|
+
},
|
54
|
+
TRANSITION_ROW_DISAPPEARANCE: function() {
|
55
|
+
return TRANSITION_ROW_DISAPPEARANCE;
|
56
|
+
}
|
57
|
+
});
|
58
|
+
const _react = require("@griffel/react");
|
59
|
+
const EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';
|
60
|
+
const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';
|
61
|
+
const DURATION_1 = '0.167s';
|
62
|
+
const DURATION_2 = '0.267s';
|
63
|
+
const DURATION_3 = '0.367s';
|
64
|
+
const DURATION_4 = '0.467s';
|
65
|
+
const FADE_IN = {
|
66
|
+
from: {
|
67
|
+
opacity: 0
|
68
|
+
},
|
69
|
+
to: {
|
70
|
+
opacity: 1
|
71
|
+
}
|
72
|
+
};
|
73
|
+
const FADE_OUT = {
|
74
|
+
from: {
|
75
|
+
opacity: 1
|
76
|
+
},
|
77
|
+
to: {
|
78
|
+
opacity: 0,
|
79
|
+
visibility: 'hidden'
|
80
|
+
}
|
81
|
+
};
|
82
|
+
const SLIDE_DOWN_IN20 = {
|
83
|
+
from: {
|
84
|
+
pointerEvents: 'none',
|
85
|
+
transform: 'translate3d(0, -20px, 0)'
|
86
|
+
},
|
87
|
+
to: {
|
88
|
+
pointerEvents: 'auto',
|
89
|
+
transform: 'translate3d(0, 0, 0)'
|
90
|
+
}
|
91
|
+
};
|
92
|
+
const SLIDE_LEFT_IN20 = {
|
93
|
+
from: {
|
94
|
+
pointerEvents: 'none',
|
95
|
+
transform: 'translate3d(20px, 0, 0)'
|
96
|
+
},
|
97
|
+
to: {
|
98
|
+
pointerEvents: 'auto',
|
99
|
+
transform: 'translate3d(0, 0, 0)'
|
100
|
+
}
|
101
|
+
};
|
102
|
+
const SLIDE_RIGHT_IN20 = {
|
103
|
+
from: {
|
104
|
+
pointerEvents: 'none',
|
105
|
+
transform: 'translate3d(-20px, 0, 0)'
|
106
|
+
},
|
107
|
+
to: {
|
108
|
+
pointerEvents: 'auto',
|
109
|
+
transform: 'translate3d(0, 0, 0)'
|
110
|
+
}
|
111
|
+
};
|
112
|
+
const SLIDE_UP_IN20 = {
|
113
|
+
from: {
|
114
|
+
pointerEvents: 'none',
|
115
|
+
transform: 'translate3d(0, 20px, 0)'
|
116
|
+
},
|
117
|
+
to: {
|
118
|
+
pointerEvents: 'auto',
|
119
|
+
transform: 'translate3d(0, 0, 0)'
|
120
|
+
}
|
121
|
+
};
|
122
|
+
const SLIDE_DOWN_OUT20 = {
|
123
|
+
from: {
|
124
|
+
transform: 'translate3d(0, 0, 0)'
|
125
|
+
},
|
126
|
+
to: {
|
127
|
+
transform: 'translate3d(0, 20px, 0)'
|
128
|
+
}
|
129
|
+
};
|
130
|
+
const SLIDE_UP_OUT20 = {
|
131
|
+
from: {
|
132
|
+
transform: 'translate3d(0, 0, 0)'
|
133
|
+
},
|
134
|
+
to: {
|
135
|
+
transform: 'translate3d(0, -20px, 0)'
|
136
|
+
}
|
137
|
+
};
|
138
|
+
const TRANSITION_ROW_DISAPPEARANCE = {
|
139
|
+
'100%': {
|
140
|
+
height: '0px',
|
141
|
+
..._react.shorthands.overflow('hidden'),
|
142
|
+
width: '0px'
|
143
|
+
},
|
144
|
+
'99.9%': {
|
145
|
+
height: '28px',
|
146
|
+
..._react.shorthands.overflow('visible'),
|
147
|
+
width: '100%'
|
148
|
+
},
|
149
|
+
'0%': {
|
150
|
+
height: '28px',
|
151
|
+
..._react.shorthands.overflow('visible'),
|
152
|
+
width: '100%'
|
153
|
+
}
|
154
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["animations.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nexport const EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nexport const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nexport const DURATION_1 = '0.167s';\nexport const DURATION_2 = '0.267s';\nexport const DURATION_3 = '0.367s';\nexport const DURATION_4 = '0.467s';\nexport const FADE_IN = {\n from: {\n opacity: 0\n },\n to: {\n opacity: 1\n }\n};\nexport const FADE_OUT = {\n from: {\n opacity: 1\n },\n to: {\n opacity: 0,\n visibility: 'hidden'\n }\n};\nexport const SLIDE_DOWN_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, -20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_LEFT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_RIGHT_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(-20px, 0, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_UP_IN20 = {\n from: {\n pointerEvents: 'none',\n transform: 'translate3d(0, 20px, 0)'\n },\n to: {\n pointerEvents: 'auto',\n transform: 'translate3d(0, 0, 0)'\n }\n};\nexport const SLIDE_DOWN_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, 20px, 0)'\n }\n};\nexport const SLIDE_UP_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)'\n },\n to: {\n transform: 'translate3d(0, -20px, 0)'\n }\n};\nexport const TRANSITION_ROW_DISAPPEARANCE = {\n '100%': {\n height: '0px',\n ...shorthands.overflow('hidden'),\n width: '0px'\n },\n '99.9%': {\n height: '28px',\n ...shorthands.overflow('visible'),\n width: '100%'\n },\n '0%': {\n height: '28px',\n ...shorthands.overflow('visible'),\n width: '100%'\n }\n};\n"],"names":["EASING_FUNCTION_1","EASING_FUNCTION_2","DURATION_1","DURATION_2","DURATION_3","DURATION_4","FADE_IN","FADE_OUT","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_DOWN_OUT20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","from","opacity","to","visibility","pointerEvents","transform","height","shorthands","overflow","width"],"mappings":";;;;;;;;;;;IACaA,iBAAiB;eAAjBA;;IACAC,iBAAiB;eAAjBA;;IACAC,UAAU;eAAVA;;IACAC,UAAU;eAAVA;;IACAC,UAAU;eAAVA;;IACAC,UAAU;eAAVA;;IACAC,OAAO;eAAPA;;IAQAC,QAAQ;eAARA;;IASAC,eAAe;eAAfA;;IAUAC,eAAe;eAAfA;;IAUAC,gBAAgB;eAAhBA;;IAUAC,aAAa;eAAbA;;IAUAC,gBAAgB;eAAhBA;;IAQAC,cAAc;eAAdA;;IAQAC,4BAA4B;eAA5BA;;;uBAhFc;AACpB,MAAMd,oBAAoB;AAC1B,MAAMC,oBAAoB;AAC1B,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,aAAa;AACnB,MAAMC,UAAU;IACnBS,MAAM;QACFC,SAAS;IACb;IACAC,IAAI;QACAD,SAAS;IACb;AACJ;AACO,MAAMT,WAAW;IACpBQ,MAAM;QACFC,SAAS;IACb;IACAC,IAAI;QACAD,SAAS;QACTE,YAAY;IAChB;AACJ;AACO,MAAMV,kBAAkB;IAC3BO,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMX,kBAAkB;IAC3BM,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMV,mBAAmB;IAC5BK,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMT,gBAAgB;IACzBI,MAAM;QACFI,eAAe;QACfC,WAAW;IACf;IACAH,IAAI;QACAE,eAAe;QACfC,WAAW;IACf;AACJ;AACO,MAAMR,mBAAmB;IAC5BG,MAAM;QACFK,WAAW;IACf;IACAH,IAAI;QACAG,WAAW;IACf;AACJ;AACO,MAAMP,iBAAiB;IAC1BE,MAAM;QACFK,WAAW;IACf;IACAH,IAAI;QACAG,WAAW;IACf;AACJ;AACO,MAAMN,+BAA+B;IACxC,QAAQ;QACJO,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,SAAS;QAChCC,OAAO;IACX;IACA,SAAS;QACLH,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,UAAU;QACjCC,OAAO;IACX;IACA,MAAM;QACFH,QAAQ;QACR,GAAGC,iBAAU,CAACC,QAAQ,CAAC,UAAU;QACjCC,OAAO;IACX;AACJ"}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
/**
|
2
|
+
* The days of the week
|
3
|
+
*/ "use strict";
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
function _export(target, all) {
|
8
|
+
for(var name in all)Object.defineProperty(target, name, {
|
9
|
+
enumerable: true,
|
10
|
+
get: all[name]
|
11
|
+
});
|
12
|
+
}
|
13
|
+
_export(exports, {
|
14
|
+
DayOfWeek: function() {
|
15
|
+
return DayOfWeek;
|
16
|
+
},
|
17
|
+
MonthOfYear: function() {
|
18
|
+
return MonthOfYear;
|
19
|
+
},
|
20
|
+
FirstWeekOfYear: function() {
|
21
|
+
return FirstWeekOfYear;
|
22
|
+
},
|
23
|
+
DateRangeType: function() {
|
24
|
+
return DateRangeType;
|
25
|
+
},
|
26
|
+
DAYS_IN_WEEK: function() {
|
27
|
+
return DAYS_IN_WEEK;
|
28
|
+
},
|
29
|
+
TimeConstants: function() {
|
30
|
+
return TimeConstants;
|
31
|
+
}
|
32
|
+
});
|
33
|
+
var DayOfWeek;
|
34
|
+
(function(DayOfWeek) {
|
35
|
+
DayOfWeek[DayOfWeek["Sunday"] = 0] = "Sunday";
|
36
|
+
DayOfWeek[DayOfWeek["Monday"] = 1] = "Monday";
|
37
|
+
DayOfWeek[DayOfWeek["Tuesday"] = 2] = "Tuesday";
|
38
|
+
DayOfWeek[DayOfWeek["Wednesday"] = 3] = "Wednesday";
|
39
|
+
DayOfWeek[DayOfWeek["Thursday"] = 4] = "Thursday";
|
40
|
+
DayOfWeek[DayOfWeek["Friday"] = 5] = "Friday";
|
41
|
+
DayOfWeek[DayOfWeek["Saturday"] = 6] = "Saturday";
|
42
|
+
})(DayOfWeek || (DayOfWeek = {}));
|
43
|
+
var MonthOfYear;
|
44
|
+
(function(MonthOfYear) {
|
45
|
+
MonthOfYear[MonthOfYear["January"] = 0] = "January";
|
46
|
+
MonthOfYear[MonthOfYear["February"] = 1] = "February";
|
47
|
+
MonthOfYear[MonthOfYear["March"] = 2] = "March";
|
48
|
+
MonthOfYear[MonthOfYear["April"] = 3] = "April";
|
49
|
+
MonthOfYear[MonthOfYear["May"] = 4] = "May";
|
50
|
+
MonthOfYear[MonthOfYear["June"] = 5] = "June";
|
51
|
+
MonthOfYear[MonthOfYear["July"] = 6] = "July";
|
52
|
+
MonthOfYear[MonthOfYear["August"] = 7] = "August";
|
53
|
+
MonthOfYear[MonthOfYear["September"] = 8] = "September";
|
54
|
+
MonthOfYear[MonthOfYear["October"] = 9] = "October";
|
55
|
+
MonthOfYear[MonthOfYear["November"] = 10] = "November";
|
56
|
+
MonthOfYear[MonthOfYear["December"] = 11] = "December";
|
57
|
+
})(MonthOfYear || (MonthOfYear = {}));
|
58
|
+
var FirstWeekOfYear;
|
59
|
+
(function(FirstWeekOfYear) {
|
60
|
+
FirstWeekOfYear[FirstWeekOfYear["FirstDay"] = 0] = "FirstDay";
|
61
|
+
FirstWeekOfYear[FirstWeekOfYear["FirstFullWeek"] = 1] = "FirstFullWeek";
|
62
|
+
FirstWeekOfYear[FirstWeekOfYear["FirstFourDayWeek"] = 2] = "FirstFourDayWeek";
|
63
|
+
})(FirstWeekOfYear || (FirstWeekOfYear = {}));
|
64
|
+
var DateRangeType;
|
65
|
+
(function(DateRangeType) {
|
66
|
+
DateRangeType[DateRangeType["Day"] = 0] = "Day";
|
67
|
+
DateRangeType[DateRangeType["Week"] = 1] = "Week";
|
68
|
+
DateRangeType[DateRangeType["Month"] = 2] = "Month";
|
69
|
+
DateRangeType[DateRangeType["WorkWeek"] = 3] = "WorkWeek";
|
70
|
+
})(DateRangeType || (DateRangeType = {}));
|
71
|
+
const DAYS_IN_WEEK = 7;
|
72
|
+
const TimeConstants = {
|
73
|
+
MillisecondsInOneDay: 86400000,
|
74
|
+
MillisecondsIn1Sec: 1000,
|
75
|
+
MillisecondsIn1Min: 60000,
|
76
|
+
MillisecondsIn30Mins: 1800000,
|
77
|
+
MillisecondsIn1Hour: 3600000,
|
78
|
+
MinutesInOneDay: 1440,
|
79
|
+
MinutesInOneHour: 60,
|
80
|
+
DaysInOneWeek: 7,
|
81
|
+
MonthInOneYear: 12,
|
82
|
+
HoursInOneDay: 24,
|
83
|
+
SecondsInOneMinute: 60,
|
84
|
+
OffsetTo24HourFormat: 12,
|
85
|
+
/**
|
86
|
+
* Matches a time string. Groups:
|
87
|
+
* 1. hours (with or without leading 0)
|
88
|
+
* 2. minutes
|
89
|
+
* 3. seconds (optional)
|
90
|
+
* 4. meridiem (am/pm, case-insensitive, optional)
|
91
|
+
*/ TimeFormatRegex: /^(\d\d?):(\d\d):?(\d\d)? ?([ap]m)?/i
|
92
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["constants.js"],"sourcesContent":["/**\n * The days of the week\n */ export var DayOfWeek;\n(function(DayOfWeek) {\n DayOfWeek[DayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n DayOfWeek[DayOfWeek[\"Monday\"] = 1] = \"Monday\";\n DayOfWeek[DayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n DayOfWeek[DayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n DayOfWeek[DayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n DayOfWeek[DayOfWeek[\"Friday\"] = 5] = \"Friday\";\n DayOfWeek[DayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n})(DayOfWeek || (DayOfWeek = {}));\nexport var MonthOfYear;\n(function(MonthOfYear) {\n MonthOfYear[MonthOfYear[\"January\"] = 0] = \"January\";\n MonthOfYear[MonthOfYear[\"February\"] = 1] = \"February\";\n MonthOfYear[MonthOfYear[\"March\"] = 2] = \"March\";\n MonthOfYear[MonthOfYear[\"April\"] = 3] = \"April\";\n MonthOfYear[MonthOfYear[\"May\"] = 4] = \"May\";\n MonthOfYear[MonthOfYear[\"June\"] = 5] = \"June\";\n MonthOfYear[MonthOfYear[\"July\"] = 6] = \"July\";\n MonthOfYear[MonthOfYear[\"August\"] = 7] = \"August\";\n MonthOfYear[MonthOfYear[\"September\"] = 8] = \"September\";\n MonthOfYear[MonthOfYear[\"October\"] = 9] = \"October\";\n MonthOfYear[MonthOfYear[\"November\"] = 10] = \"November\";\n MonthOfYear[MonthOfYear[\"December\"] = 11] = \"December\";\n})(MonthOfYear || (MonthOfYear = {}));\nexport var FirstWeekOfYear;\n(function(FirstWeekOfYear) {\n FirstWeekOfYear[FirstWeekOfYear[\"FirstDay\"] = 0] = \"FirstDay\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFullWeek\"] = 1] = \"FirstFullWeek\";\n FirstWeekOfYear[FirstWeekOfYear[\"FirstFourDayWeek\"] = 2] = \"FirstFourDayWeek\";\n})(FirstWeekOfYear || (FirstWeekOfYear = {}));\nexport var DateRangeType;\n(function(DateRangeType) {\n DateRangeType[DateRangeType[\"Day\"] = 0] = \"Day\";\n DateRangeType[DateRangeType[\"Week\"] = 1] = \"Week\";\n DateRangeType[DateRangeType[\"Month\"] = 2] = \"Month\";\n DateRangeType[DateRangeType[\"WorkWeek\"] = 3] = \"WorkWeek\";\n})(DateRangeType || (DateRangeType = {}));\nexport const DAYS_IN_WEEK = 7;\nexport const TimeConstants = {\n MillisecondsInOneDay: 86400000,\n MillisecondsIn1Sec: 1000,\n MillisecondsIn1Min: 60000,\n MillisecondsIn30Mins: 1800000,\n MillisecondsIn1Hour: 3600000,\n MinutesInOneDay: 1440,\n MinutesInOneHour: 60,\n DaysInOneWeek: 7,\n MonthInOneYear: 12,\n HoursInOneDay: 24,\n SecondsInOneMinute: 60,\n OffsetTo24HourFormat: 12,\n /**\n * Matches a time string. Groups:\n * 1. hours (with or without leading 0)\n * 2. minutes\n * 3. seconds (optional)\n * 4. meridiem (am/pm, case-insensitive, optional)\n */ TimeFormatRegex: /^(\\d\\d?):(\\d\\d):?(\\d\\d)? ?([ap]m)?/i\n};\n"],"names":["DayOfWeek","MonthOfYear","FirstWeekOfYear","DateRangeType","DAYS_IN_WEEK","TimeConstants","MillisecondsInOneDay","MillisecondsIn1Sec","MillisecondsIn1Min","MillisecondsIn30Mins","MillisecondsIn1Hour","MinutesInOneDay","MinutesInOneHour","DaysInOneWeek","MonthInOneYear","HoursInOneDay","SecondsInOneMinute","OffsetTo24HourFormat","TimeFormatRegex"],"mappings":"AAAA;;CAEC;;;;;;;;;;;IAAcA,SAAS;eAATA;;IAUJC,WAAW;eAAXA;;IAeAC,eAAe;eAAfA;;IAMAC,aAAa;eAAbA;;IAOEC,YAAY;eAAZA;;IACAC,aAAa;eAAbA;;;AAvCF,IAAIL;AACd,CAAA,SAASA,SAAS;IACfA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,UAAU,GAAG,EAAE,GAAG;IACtCA,SAAS,CAACA,SAAS,CAAC,YAAY,GAAG,EAAE,GAAG;IACxCA,SAAS,CAACA,SAAS,CAAC,WAAW,GAAG,EAAE,GAAG;IACvCA,SAAS,CAACA,SAAS,CAAC,SAAS,GAAG,EAAE,GAAG;IACrCA,SAAS,CAACA,SAAS,CAAC,WAAW,GAAG,EAAE,GAAG;AAC3C,CAAA,EAAGA,aAAcA,CAAAA,YAAY,CAAC,CAAA;AACvB,IAAIC;AACV,CAAA,SAASA,WAAW;IACjBA,WAAW,CAACA,WAAW,CAAC,UAAU,GAAG,EAAE,GAAG;IAC1CA,WAAW,CAACA,WAAW,CAAC,WAAW,GAAG,EAAE,GAAG;IAC3CA,WAAW,CAACA,WAAW,CAAC,QAAQ,GAAG,EAAE,GAAG;IACxCA,WAAW,CAACA,WAAW,CAAC,QAAQ,GAAG,EAAE,GAAG;IACxCA,WAAW,CAACA,WAAW,CAAC,MAAM,GAAG,EAAE,GAAG;IACtCA,WAAW,CAACA,WAAW,CAAC,OAAO,GAAG,EAAE,GAAG;IACvCA,WAAW,CAACA,WAAW,CAAC,OAAO,GAAG,EAAE,GAAG;IACvCA,WAAW,CAACA,WAAW,CAAC,SAAS,GAAG,EAAE,GAAG;IACzCA,WAAW,CAACA,WAAW,CAAC,YAAY,GAAG,EAAE,GAAG;IAC5CA,WAAW,CAACA,WAAW,CAAC,UAAU,GAAG,EAAE,GAAG;IAC1CA,WAAW,CAACA,WAAW,CAAC,WAAW,GAAG,GAAG,GAAG;IAC5CA,WAAW,CAACA,WAAW,CAAC,WAAW,GAAG,GAAG,GAAG;AAChD,CAAA,EAAGA,eAAgBA,CAAAA,cAAc,CAAC,CAAA;AAC3B,IAAIC;AACV,CAAA,SAASA,eAAe;IACrBA,eAAe,CAACA,eAAe,CAAC,WAAW,GAAG,EAAE,GAAG;IACnDA,eAAe,CAACA,eAAe,CAAC,gBAAgB,GAAG,EAAE,GAAG;IACxDA,eAAe,CAACA,eAAe,CAAC,mBAAmB,GAAG,EAAE,GAAG;AAC/D,CAAA,EAAGA,mBAAoBA,CAAAA,kBAAkB,CAAC,CAAA;AACnC,IAAIC;AACV,CAAA,SAASA,aAAa;IACnBA,aAAa,CAACA,aAAa,CAAC,MAAM,GAAG,EAAE,GAAG;IAC1CA,aAAa,CAACA,aAAa,CAAC,OAAO,GAAG,EAAE,GAAG;IAC3CA,aAAa,CAACA,aAAa,CAAC,QAAQ,GAAG,EAAE,GAAG;IAC5CA,aAAa,CAACA,aAAa,CAAC,WAAW,GAAG,EAAE,GAAG;AACnD,CAAA,EAAGA,iBAAkBA,CAAAA,gBAAgB,CAAC,CAAA;AAC/B,MAAMC,eAAe;AACrB,MAAMC,gBAAgB;IACzBC,sBAAsB;IACtBC,oBAAoB;IACpBC,oBAAoB;IACpBC,sBAAsB;IACtBC,qBAAqB;IACrBC,iBAAiB;IACjBC,kBAAkB;IAClBC,eAAe;IACfC,gBAAgB;IAChBC,eAAe;IACfC,oBAAoB;IACpBC,sBAAsB;IACtB;;;;;;GAMD,GAAGC,iBAAiB;AACvB"}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
/**
|
2
|
+
* Format date to a day string representation
|
3
|
+
* @param date - input date to format
|
4
|
+
*/ "use strict";
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
function _export(target, all) {
|
9
|
+
for(var name in all)Object.defineProperty(target, name, {
|
10
|
+
enumerable: true,
|
11
|
+
get: all[name]
|
12
|
+
});
|
13
|
+
}
|
14
|
+
_export(exports, {
|
15
|
+
formatDay: function() {
|
16
|
+
return formatDay;
|
17
|
+
},
|
18
|
+
formatMonthDayYear: function() {
|
19
|
+
return formatMonthDayYear;
|
20
|
+
},
|
21
|
+
formatMonthYear: function() {
|
22
|
+
return formatMonthYear;
|
23
|
+
},
|
24
|
+
formatMonth: function() {
|
25
|
+
return formatMonth;
|
26
|
+
},
|
27
|
+
formatYear: function() {
|
28
|
+
return formatYear;
|
29
|
+
},
|
30
|
+
DEFAULT_DATE_GRID_STRINGS: function() {
|
31
|
+
return DEFAULT_DATE_GRID_STRINGS;
|
32
|
+
},
|
33
|
+
DEFAULT_DATE_FORMATTING: function() {
|
34
|
+
return DEFAULT_DATE_FORMATTING;
|
35
|
+
},
|
36
|
+
DEFAULT_CALENDAR_STRINGS: function() {
|
37
|
+
return DEFAULT_CALENDAR_STRINGS;
|
38
|
+
}
|
39
|
+
});
|
40
|
+
const formatDay = (date)=>date.getDate().toString();
|
41
|
+
const formatMonthDayYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear();
|
42
|
+
const formatMonthYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getFullYear();
|
43
|
+
const formatMonth = (date, strings)=>strings.months[date.getMonth()];
|
44
|
+
const formatYear = (date)=>date.getFullYear().toString();
|
45
|
+
const DEFAULT_DATE_GRID_STRINGS = {
|
46
|
+
months: [
|
47
|
+
'January',
|
48
|
+
'February',
|
49
|
+
'March',
|
50
|
+
'April',
|
51
|
+
'May',
|
52
|
+
'June',
|
53
|
+
'July',
|
54
|
+
'August',
|
55
|
+
'September',
|
56
|
+
'October',
|
57
|
+
'November',
|
58
|
+
'December'
|
59
|
+
],
|
60
|
+
shortMonths: [
|
61
|
+
'Jan',
|
62
|
+
'Feb',
|
63
|
+
'Mar',
|
64
|
+
'Apr',
|
65
|
+
'May',
|
66
|
+
'Jun',
|
67
|
+
'Jul',
|
68
|
+
'Aug',
|
69
|
+
'Sep',
|
70
|
+
'Oct',
|
71
|
+
'Nov',
|
72
|
+
'Dec'
|
73
|
+
],
|
74
|
+
days: [
|
75
|
+
'Sunday',
|
76
|
+
'Monday',
|
77
|
+
'Tuesday',
|
78
|
+
'Wednesday',
|
79
|
+
'Thursday',
|
80
|
+
'Friday',
|
81
|
+
'Saturday'
|
82
|
+
],
|
83
|
+
shortDays: [
|
84
|
+
'S',
|
85
|
+
'M',
|
86
|
+
'T',
|
87
|
+
'W',
|
88
|
+
'T',
|
89
|
+
'F',
|
90
|
+
'S'
|
91
|
+
]
|
92
|
+
};
|
93
|
+
const DEFAULT_DATE_FORMATTING = {
|
94
|
+
formatDay,
|
95
|
+
formatMonth,
|
96
|
+
formatYear,
|
97
|
+
formatMonthDayYear,
|
98
|
+
formatMonthYear
|
99
|
+
};
|
100
|
+
const DEFAULT_CALENDAR_STRINGS = {
|
101
|
+
...DEFAULT_DATE_GRID_STRINGS,
|
102
|
+
goToToday: 'Go to today',
|
103
|
+
weekNumberFormatString: 'Week number {0}',
|
104
|
+
prevMonthAriaLabel: 'Previous month',
|
105
|
+
nextMonthAriaLabel: 'Next month',
|
106
|
+
prevYearAriaLabel: 'Previous year',
|
107
|
+
nextYearAriaLabel: 'Next year',
|
108
|
+
prevYearRangeAriaLabel: 'Previous year range',
|
109
|
+
nextYearRangeAriaLabel: 'Next year range',
|
110
|
+
closeButtonAriaLabel: 'Close',
|
111
|
+
selectedDateFormatString: 'Selected date {0}',
|
112
|
+
todayDateFormatString: "Today's date {0}",
|
113
|
+
monthPickerHeaderAriaLabel: '{0}, change year',
|
114
|
+
yearPickerHeaderAriaLabel: '{0}, change month',
|
115
|
+
dayMarkedAriaLabel: 'marked'
|
116
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["dateFormatting.defaults.js"],"sourcesContent":["/**\n * Format date to a day string representation\n * @param date - input date to format\n */ export const formatDay = (date)=>date.getDate().toString();\n/**\n * Format date to a month-day-year string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonthDayYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear();\n/**\n * Format date to a month-year string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonthYear = (date, strings)=>strings.months[date.getMonth()] + ' ' + date.getFullYear();\n/**\n * Format date to a month string\n * @param date - input date to format\n * @param strings - localized strings\n */ export const formatMonth = (date, strings)=>strings.months[date.getMonth()];\n/**\n * Format date to a year string representation\n * @param date - input date to format\n */ export const formatYear = (date)=>date.getFullYear().toString();\nexport const DEFAULT_DATE_GRID_STRINGS = {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n shortMonths: [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec'\n ],\n days: [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday'\n ],\n shortDays: [\n 'S',\n 'M',\n 'T',\n 'W',\n 'T',\n 'F',\n 'S'\n ]\n};\nexport const DEFAULT_DATE_FORMATTING = {\n formatDay,\n formatMonth,\n formatYear,\n formatMonthDayYear,\n formatMonthYear\n};\nexport const DEFAULT_CALENDAR_STRINGS = {\n ...DEFAULT_DATE_GRID_STRINGS,\n goToToday: 'Go to today',\n weekNumberFormatString: 'Week number {0}',\n prevMonthAriaLabel: 'Previous month',\n nextMonthAriaLabel: 'Next month',\n prevYearAriaLabel: 'Previous year',\n nextYearAriaLabel: 'Next year',\n prevYearRangeAriaLabel: 'Previous year range',\n nextYearRangeAriaLabel: 'Next year range',\n closeButtonAriaLabel: 'Close',\n selectedDateFormatString: 'Selected date {0}',\n todayDateFormatString: \"Today's date {0}\",\n monthPickerHeaderAriaLabel: '{0}, change year',\n yearPickerHeaderAriaLabel: '{0}, change month',\n dayMarkedAriaLabel: 'marked'\n};\n"],"names":["formatDay","formatMonthDayYear","formatMonthYear","formatMonth","formatYear","DEFAULT_DATE_GRID_STRINGS","DEFAULT_DATE_FORMATTING","DEFAULT_CALENDAR_STRINGS","date","getDate","toString","strings","months","getMonth","getFullYear","shortMonths","days","shortDays","goToToday","weekNumberFormatString","prevMonthAriaLabel","nextMonthAriaLabel","prevYearAriaLabel","nextYearAriaLabel","prevYearRangeAriaLabel","nextYearRangeAriaLabel","closeButtonAriaLabel","selectedDateFormatString","todayDateFormatString","monthPickerHeaderAriaLabel","yearPickerHeaderAriaLabel","dayMarkedAriaLabel"],"mappings":"AAAA;;;CAGC;;;;;;;;;;;IAAgBA,SAAS;eAATA;;IAKAC,kBAAkB;eAAlBA;;IAKAC,eAAe;eAAfA;;IAKAC,WAAW;eAAXA;;IAIAC,UAAU;eAAVA;;IACJC,yBAAyB;eAAzBA;;IAgDAC,uBAAuB;eAAvBA;;IAOAC,wBAAwB;eAAxBA;;;AA3EF,MAAMP,YAAY,CAACQ,OAAOA,KAAKC,OAAO,GAAGC,QAAQ;AAKjD,MAAMT,qBAAqB,CAACO,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG,GAAG,MAAML,KAAKC,OAAO,KAAK,OAAOD,KAAKM,WAAW;AAK5H,MAAMZ,kBAAkB,CAACM,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG,GAAG,MAAML,KAAKM,WAAW;AAKjG,MAAMX,cAAc,CAACK,MAAMG,UAAUA,QAAQC,MAAM,CAACJ,KAAKK,QAAQ,GAAG;AAIpE,MAAMT,aAAa,CAACI,OAAOA,KAAKM,WAAW,GAAGJ,QAAQ;AAC1D,MAAML,4BAA4B;IACrCO,QAAQ;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDG,aAAa;QACT;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDC,MAAM;QACF;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IACDC,WAAW;QACP;QACA;QACA;QACA;QACA;QACA;QACA;KACH;AACL;AACO,MAAMX,0BAA0B;IACnCN;IACAG;IACAC;IACAH;IACAC;AACJ;AACO,MAAMK,2BAA2B;IACpC,GAAGF,yBAAyB;IAC5Ba,WAAW;IACXC,wBAAwB;IACxBC,oBAAoB;IACpBC,oBAAoB;IACpBC,mBAAmB;IACnBC,mBAAmB;IACnBC,wBAAwB;IACxBC,wBAAwB;IACxBC,sBAAsB;IACtBC,0BAA0B;IAC1BC,uBAAuB;IACvBC,4BAA4B;IAC5BC,2BAA2B;IAC3BC,oBAAoB;AACxB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./dateFormatting.defaults"), exports);
|
7
|
+
_export_star._(require("./dateFormatting.types"), exports);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './dateFormatting.defaults';\nexport * from './dateFormatting.types';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "findAvailableDate", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return findAvailableDate;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _isRestrictedDate = require("./isRestrictedDate");
|
12
|
+
const _isAfterMaxDate = require("./isAfterMaxDate");
|
13
|
+
const _isBeforeMinDate = require("./isBeforeMinDate");
|
14
|
+
const _dateMath = require("../dateMath/dateMath");
|
15
|
+
const findAvailableDate = (options)=>{
|
16
|
+
const { targetDate, initialDate, direction, ...restrictedDateOptions } = options;
|
17
|
+
let availableDate = targetDate;
|
18
|
+
// if the target date is available, return it immediately
|
19
|
+
if (!(0, _isRestrictedDate.isRestrictedDate)(targetDate, restrictedDateOptions)) {
|
20
|
+
return targetDate;
|
21
|
+
}
|
22
|
+
while((0, _dateMath.compareDatePart)(initialDate, availableDate) !== 0 && (0, _isRestrictedDate.isRestrictedDate)(availableDate, restrictedDateOptions) && !(0, _isAfterMaxDate.isAfterMaxDate)(availableDate, restrictedDateOptions) && !(0, _isBeforeMinDate.isBeforeMinDate)(availableDate, restrictedDateOptions)){
|
23
|
+
availableDate = (0, _dateMath.addDays)(availableDate, direction);
|
24
|
+
}
|
25
|
+
if ((0, _dateMath.compareDatePart)(initialDate, availableDate) !== 0 && !(0, _isRestrictedDate.isRestrictedDate)(availableDate, restrictedDateOptions)) {
|
26
|
+
return availableDate;
|
27
|
+
}
|
28
|
+
return undefined;
|
29
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["findAvailableDate.js"],"sourcesContent":["import { isRestrictedDate } from './isRestrictedDate';\nimport { isAfterMaxDate } from './isAfterMaxDate';\nimport { isBeforeMinDate } from './isBeforeMinDate';\nimport { compareDatePart, addDays } from '../dateMath/dateMath';\n/**\n * Returns closest available date given the restriction `options`, or undefined otherwise\n * @param options - list of search options\n */ export const findAvailableDate = (options)=>{\n const { targetDate, initialDate, direction, ...restrictedDateOptions } = options;\n let availableDate = targetDate;\n // if the target date is available, return it immediately\n if (!isRestrictedDate(targetDate, restrictedDateOptions)) {\n return targetDate;\n }\n while(compareDatePart(initialDate, availableDate) !== 0 && isRestrictedDate(availableDate, restrictedDateOptions) && !isAfterMaxDate(availableDate, restrictedDateOptions) && !isBeforeMinDate(availableDate, restrictedDateOptions)){\n availableDate = addDays(availableDate, direction);\n }\n if (compareDatePart(initialDate, availableDate) !== 0 && !isRestrictedDate(availableDate, restrictedDateOptions)) {\n return availableDate;\n }\n return undefined;\n};\n"],"names":["findAvailableDate","options","targetDate","initialDate","direction","restrictedDateOptions","availableDate","isRestrictedDate","compareDatePart","isAfterMaxDate","isBeforeMinDate","addDays","undefined"],"mappings":";;;;+BAOiBA;;;eAAAA;;;kCAPgB;gCACF;iCACC;0BACS;AAI9B,MAAMA,oBAAoB,CAACC;IAClC,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAE,GAAGC,uBAAuB,GAAGJ;IACzE,IAAIK,gBAAgBJ;IACpB,yDAAyD;IACzD,IAAI,CAACK,IAAAA,kCAAgB,EAACL,YAAYG,wBAAwB;QACtD,OAAOH;IACX;IACA,MAAMM,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAKC,IAAAA,kCAAgB,EAACD,eAAeD,0BAA0B,CAACI,IAAAA,8BAAc,EAACH,eAAeD,0BAA0B,CAACK,IAAAA,gCAAe,EAACJ,eAAeD,uBAAuB;QACjOC,gBAAgBK,IAAAA,iBAAO,EAACL,eAAeF;IAC3C;IACA,IAAII,IAAAA,yBAAe,EAACL,aAAaG,mBAAmB,KAAK,CAACC,IAAAA,kCAAgB,EAACD,eAAeD,wBAAwB;QAC9G,OAAOC;IACX;IACA,OAAOM;AACX"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "getBoundedDateRange", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return getBoundedDateRange;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _dateMath = require("../dateMath/dateMath");
|
12
|
+
const getBoundedDateRange = (dateRange, minDate, maxDate)=>{
|
13
|
+
let boundedDateRange = [
|
14
|
+
...dateRange
|
15
|
+
];
|
16
|
+
if (minDate) {
|
17
|
+
boundedDateRange = boundedDateRange.filter((date)=>(0, _dateMath.compareDatePart)(date, minDate) >= 0);
|
18
|
+
}
|
19
|
+
if (maxDate) {
|
20
|
+
boundedDateRange = boundedDateRange.filter((date)=>(0, _dateMath.compareDatePart)(date, maxDate) <= 0);
|
21
|
+
}
|
22
|
+
return boundedDateRange;
|
23
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["getBoundedDateRange.js"],"sourcesContent":["import { compareDatePart } from '../dateMath/dateMath';\n/**\n * Generates a list of dates, bounded by min and max dates\n * @param dateRange - input date range\n * @param minDate - min date to limit the range\n * @param maxDate - max date to limit the range\n */ export const getBoundedDateRange = (dateRange, minDate, maxDate)=>{\n let boundedDateRange = [\n ...dateRange\n ];\n if (minDate) {\n boundedDateRange = boundedDateRange.filter((date)=>compareDatePart(date, minDate) >= 0);\n }\n if (maxDate) {\n boundedDateRange = boundedDateRange.filter((date)=>compareDatePart(date, maxDate) <= 0);\n }\n return boundedDateRange;\n};\n"],"names":["getBoundedDateRange","dateRange","minDate","maxDate","boundedDateRange","filter","date","compareDatePart"],"mappings":";;;;+BAMiBA;;;eAAAA;;;0BANe;AAMrB,MAAMA,sBAAsB,CAACC,WAAWC,SAASC;IACxD,IAAIC,mBAAmB;WAChBH;KACN;IACD,IAAIC,SAAS;QACTE,mBAAmBA,iBAAiBC,MAAM,CAAC,CAACC,OAAOC,IAAAA,yBAAe,EAACD,MAAMJ,YAAY;IACzF;IACA,IAAIC,SAAS;QACTC,mBAAmBA,iBAAiBC,MAAM,CAAC,CAACC,OAAOC,IAAAA,yBAAe,EAACD,MAAMH,YAAY;IACzF;IACA,OAAOC;AACX"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "getDateRangeTypeToUse", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return getDateRangeTypeToUse;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _constants = require("../constants");
|
12
|
+
const _isContiguous = require("./isContiguous");
|
13
|
+
const getDateRangeTypeToUse = (dateRangeType, workWeekDays, firstDayOfWeek)=>{
|
14
|
+
if (workWeekDays && dateRangeType === _constants.DateRangeType.WorkWeek) {
|
15
|
+
if (!(0, _isContiguous.isContiguous)(workWeekDays, true, firstDayOfWeek) || workWeekDays.length === 0) {
|
16
|
+
return _constants.DateRangeType.Week;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
return dateRangeType;
|
20
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["getDateRangeTypeToUse.js"],"sourcesContent":["import { DateRangeType } from '../constants';\nimport { isContiguous } from './isContiguous';\n/**\n * Return corrected date range type, given `dateRangeType` and list of working days.\n * For non-contiguous working days and working week range type, returns general week range type.\n * For other cases returns input date range type.\n * @param dateRangeType - input type of range\n * @param workWeekDays - list of working days in a week\n */ export const getDateRangeTypeToUse = (dateRangeType, workWeekDays, firstDayOfWeek)=>{\n if (workWeekDays && dateRangeType === DateRangeType.WorkWeek) {\n if (!isContiguous(workWeekDays, true, firstDayOfWeek) || workWeekDays.length === 0) {\n return DateRangeType.Week;\n }\n }\n return dateRangeType;\n};\n"],"names":["getDateRangeTypeToUse","dateRangeType","workWeekDays","firstDayOfWeek","DateRangeType","WorkWeek","isContiguous","length","Week"],"mappings":";;;;+BAQiBA;;;eAAAA;;;2BARa;8BACD;AAOlB,MAAMA,wBAAwB,CAACC,eAAeC,cAAcC;IACnE,IAAID,gBAAgBD,kBAAkBG,wBAAa,CAACC,QAAQ,EAAE;QAC1D,IAAI,CAACC,IAAAA,0BAAY,EAACJ,cAAc,MAAMC,mBAAmBD,aAAaK,MAAM,KAAK,GAAG;YAChF,OAAOH,wBAAa,CAACI,IAAI;QAC7B;IACJ;IACA,OAAOP;AACX"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "getDayGrid", {
|
6
|
+
enumerable: true,
|
7
|
+
get: function() {
|
8
|
+
return getDayGrid;
|
9
|
+
}
|
10
|
+
});
|
11
|
+
const _dateMath = require("../dateMath/dateMath");
|
12
|
+
const _constants = require("../constants");
|
13
|
+
const _getDateRangeTypeToUse = require("./getDateRangeTypeToUse");
|
14
|
+
const _getBoundedDateRange = require("./getBoundedDateRange");
|
15
|
+
const _isRestrictedDate = require("./isRestrictedDate");
|
16
|
+
const getDayGrid = (options)=>{
|
17
|
+
const { selectedDate, dateRangeType, firstDayOfWeek, today, minDate, maxDate, weeksToShow, workWeekDays, daysToSelectInDayView, restrictedDates, markedDays } = options;
|
18
|
+
const restrictedDateOptions = {
|
19
|
+
minDate,
|
20
|
+
maxDate,
|
21
|
+
restrictedDates
|
22
|
+
};
|
23
|
+
const todaysDate = today || new Date();
|
24
|
+
const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;
|
25
|
+
let date;
|
26
|
+
if (weeksToShow && weeksToShow <= 4) {
|
27
|
+
// if showing less than a full month, just use date == navigatedDate
|
28
|
+
date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());
|
29
|
+
} else {
|
30
|
+
date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);
|
31
|
+
}
|
32
|
+
const weeks = [];
|
33
|
+
// Cycle the date backwards to get to the first day of the week.
|
34
|
+
while(date.getDay() !== firstDayOfWeek){
|
35
|
+
date.setDate(date.getDate() - 1);
|
36
|
+
}
|
37
|
+
// add the transition week as last week of previous range
|
38
|
+
date = (0, _dateMath.addDays)(date, -_constants.DAYS_IN_WEEK);
|
39
|
+
// a flag to indicate whether all days of the week are outside the month
|
40
|
+
let isAllDaysOfWeekOutOfMonth = false;
|
41
|
+
// in work week view if the days aren't contiguous we use week view instead
|
42
|
+
const selectedDateRangeType = (0, _getDateRangeTypeToUse.getDateRangeTypeToUse)(dateRangeType, workWeekDays, firstDayOfWeek);
|
43
|
+
let selectedDates = [];
|
44
|
+
if (selectedDate) {
|
45
|
+
selectedDates = (0, _dateMath.getDateRangeArray)(selectedDate, selectedDateRangeType, firstDayOfWeek, workWeekDays, daysToSelectInDayView);
|
46
|
+
selectedDates = (0, _getBoundedDateRange.getBoundedDateRange)(selectedDates, minDate, maxDate);
|
47
|
+
}
|
48
|
+
let shouldGetWeeks = true;
|
49
|
+
for(let weekIndex = 0; shouldGetWeeks; weekIndex++){
|
50
|
+
const week = [];
|
51
|
+
isAllDaysOfWeekOutOfMonth = true;
|
52
|
+
for(let dayIndex = 0; dayIndex < _constants.DAYS_IN_WEEK; dayIndex++){
|
53
|
+
const originalDate = new Date(date.getTime());
|
54
|
+
const dayInfo = {
|
55
|
+
key: date.toString(),
|
56
|
+
date: date.getDate().toString(),
|
57
|
+
originalDate,
|
58
|
+
isInMonth: date.getMonth() === navigatedDate.getMonth(),
|
59
|
+
isToday: (0, _dateMath.compareDates)(todaysDate, date),
|
60
|
+
isSelected: (0, _dateMath.isInDateRangeArray)(date, selectedDates),
|
61
|
+
isInBounds: !(0, _isRestrictedDate.isRestrictedDate)(date, restrictedDateOptions),
|
62
|
+
isMarked: (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some((markedDay)=>(0, _dateMath.compareDates)(originalDate, markedDay))) || false
|
63
|
+
};
|
64
|
+
week.push(dayInfo);
|
65
|
+
if (dayInfo.isInMonth) {
|
66
|
+
isAllDaysOfWeekOutOfMonth = false;
|
67
|
+
}
|
68
|
+
date.setDate(date.getDate() + 1);
|
69
|
+
}
|
70
|
+
// We append the condition of the loop depending upon the showSixWeeksByDefault prop.
|
71
|
+
shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;
|
72
|
+
// we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state
|
73
|
+
weeks.push(week);
|
74
|
+
}
|
75
|
+
return weeks;
|
76
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["getDayGrid.js"],"sourcesContent":["import { addDays, compareDates, getDateRangeArray, isInDateRangeArray } from '../dateMath/dateMath';\nimport { DAYS_IN_WEEK } from '../constants';\nimport { getDateRangeTypeToUse } from './getDateRangeTypeToUse';\nimport { getBoundedDateRange } from './getBoundedDateRange';\nimport { isRestrictedDate } from './isRestrictedDate';\n/**\n * Generates a grid of days, given the `options`.\n * Returns one additional week at the begining from the previous range\n * and one at the end from the future range\n * @param options - parameters to specify date related restrictions for the resulting grid\n */ export const getDayGrid = (options)=>{\n const { selectedDate, dateRangeType, firstDayOfWeek, today, minDate, maxDate, weeksToShow, workWeekDays, daysToSelectInDayView, restrictedDates, markedDays } = options;\n const restrictedDateOptions = {\n minDate,\n maxDate,\n restrictedDates\n };\n const todaysDate = today || new Date();\n const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;\n let date;\n if (weeksToShow && weeksToShow <= 4) {\n // if showing less than a full month, just use date == navigatedDate\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());\n } else {\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);\n }\n const weeks = [];\n // Cycle the date backwards to get to the first day of the week.\n while(date.getDay() !== firstDayOfWeek){\n date.setDate(date.getDate() - 1);\n }\n // add the transition week as last week of previous range\n date = addDays(date, -DAYS_IN_WEEK);\n // a flag to indicate whether all days of the week are outside the month\n let isAllDaysOfWeekOutOfMonth = false;\n // in work week view if the days aren't contiguous we use week view instead\n const selectedDateRangeType = getDateRangeTypeToUse(dateRangeType, workWeekDays, firstDayOfWeek);\n let selectedDates = [];\n if (selectedDate) {\n selectedDates = getDateRangeArray(selectedDate, selectedDateRangeType, firstDayOfWeek, workWeekDays, daysToSelectInDayView);\n selectedDates = getBoundedDateRange(selectedDates, minDate, maxDate);\n }\n let shouldGetWeeks = true;\n for(let weekIndex = 0; shouldGetWeeks; weekIndex++){\n const week = [];\n isAllDaysOfWeekOutOfMonth = true;\n for(let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++){\n const originalDate = new Date(date.getTime());\n const dayInfo = {\n key: date.toString(),\n date: date.getDate().toString(),\n originalDate,\n isInMonth: date.getMonth() === navigatedDate.getMonth(),\n isToday: compareDates(todaysDate, date),\n isSelected: isInDateRangeArray(date, selectedDates),\n isInBounds: !isRestrictedDate(date, restrictedDateOptions),\n isMarked: (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some((markedDay)=>compareDates(originalDate, markedDay))) || false\n };\n week.push(dayInfo);\n if (dayInfo.isInMonth) {\n isAllDaysOfWeekOutOfMonth = false;\n }\n date.setDate(date.getDate() + 1);\n }\n // We append the condition of the loop depending upon the showSixWeeksByDefault prop.\n shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;\n // we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state\n weeks.push(week);\n }\n return weeks;\n};\n"],"names":["getDayGrid","options","selectedDate","dateRangeType","firstDayOfWeek","today","minDate","maxDate","weeksToShow","workWeekDays","daysToSelectInDayView","restrictedDates","markedDays","restrictedDateOptions","todaysDate","Date","navigatedDate","date","getFullYear","getMonth","getDate","weeks","getDay","setDate","addDays","DAYS_IN_WEEK","isAllDaysOfWeekOutOfMonth","selectedDateRangeType","getDateRangeTypeToUse","selectedDates","getDateRangeArray","getBoundedDateRange","shouldGetWeeks","weekIndex","week","dayIndex","originalDate","getTime","dayInfo","key","toString","isInMonth","isToday","compareDates","isSelected","isInDateRangeArray","isInBounds","isRestrictedDate","isMarked","some","markedDay","push"],"mappings":";;;;+BAUiBA;;;eAAAA;;;0BAV4D;2BAChD;uCACS;qCACF;kCACH;AAMtB,MAAMA,aAAa,CAACC;IAC3B,MAAM,EAAEC,YAAY,EAAEC,aAAa,EAAEC,cAAc,EAAEC,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,WAAW,EAAEC,YAAY,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,UAAU,EAAE,GAAGX;IAChK,MAAMY,wBAAwB;QAC1BP;QACAC;QACAI;IACJ;IACA,MAAMG,aAAaT,SAAS,IAAIU;IAChC,MAAMC,gBAAgBf,QAAQe,aAAa,GAAGf,QAAQe,aAAa,GAAGF;IACtE,IAAIG;IACJ,IAAIT,eAAeA,eAAe,GAAG;QACjC,oEAAoE;QACpES,OAAO,IAAIF,KAAKC,cAAcE,WAAW,IAAIF,cAAcG,QAAQ,IAAIH,cAAcI,OAAO;IAChG,OAAO;QACHH,OAAO,IAAIF,KAAKC,cAAcE,WAAW,IAAIF,cAAcG,QAAQ,IAAI;IAC3E;IACA,MAAME,QAAQ,EAAE;IAChB,gEAAgE;IAChE,MAAMJ,KAAKK,MAAM,OAAOlB,eAAe;QACnCa,KAAKM,OAAO,CAACN,KAAKG,OAAO,KAAK;IAClC;IACA,yDAAyD;IACzDH,OAAOO,IAAAA,iBAAO,EAACP,MAAM,CAACQ,uBAAY;IAClC,wEAAwE;IACxE,IAAIC,4BAA4B;IAChC,2EAA2E;IAC3E,MAAMC,wBAAwBC,IAAAA,4CAAqB,EAACzB,eAAeM,cAAcL;IACjF,IAAIyB,gBAAgB,EAAE;IACtB,IAAI3B,cAAc;QACd2B,gBAAgBC,IAAAA,2BAAiB,EAAC5B,cAAcyB,uBAAuBvB,gBAAgBK,cAAcC;QACrGmB,gBAAgBE,IAAAA,wCAAmB,EAACF,eAAevB,SAASC;IAChE;IACA,IAAIyB,iBAAiB;IACrB,IAAI,IAAIC,YAAY,GAAGD,gBAAgBC,YAAY;QAC/C,MAAMC,OAAO,EAAE;QACfR,4BAA4B;QAC5B,IAAI,IAAIS,WAAW,GAAGA,WAAWV,uBAAY,EAAEU,WAAW;YACtD,MAAMC,eAAe,IAAIrB,KAAKE,KAAKoB,OAAO;YAC1C,MAAMC,UAAU;gBACZC,KAAKtB,KAAKuB,QAAQ;gBAClBvB,MAAMA,KAAKG,OAAO,GAAGoB,QAAQ;gBAC7BJ;gBACAK,WAAWxB,KAAKE,QAAQ,OAAOH,cAAcG,QAAQ;gBACrDuB,SAASC,IAAAA,sBAAY,EAAC7B,YAAYG;gBAClC2B,YAAYC,IAAAA,4BAAkB,EAAC5B,MAAMY;gBACrCiB,YAAY,CAACC,IAAAA,kCAAgB,EAAC9B,MAAMJ;gBACpCmC,UAAU,AAACpC,CAAAA,eAAe,QAAQA,eAAe,KAAK,IAAI,KAAK,IAAIA,WAAWqC,IAAI,CAAC,CAACC,YAAYP,IAAAA,sBAAY,EAACP,cAAcc,WAAU,KAAM;YAC/I;YACAhB,KAAKiB,IAAI,CAACb;YACV,IAAIA,QAAQG,SAAS,EAAE;gBACnBf,4BAA4B;YAChC;YACAT,KAAKM,OAAO,CAACN,KAAKG,OAAO,KAAK;QAClC;QACA,qFAAqF;QACrFY,iBAAiBxB,cAAcyB,YAAYzB,cAAc,IAAI,CAACkB,6BAA6BO,cAAc;QACzG,0GAA0G;QAC1GZ,MAAM8B,IAAI,CAACjB;IACf;IACA,OAAOb;AACX"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./dateGrid.types"), exports);
|
7
|
+
_export_star._(require("./findAvailableDate"), exports);
|
8
|
+
_export_star._(require("./getBoundedDateRange"), exports);
|
9
|
+
_export_star._(require("./getDayGrid"), exports);
|
10
|
+
_export_star._(require("./isRestrictedDate"), exports);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './dateGrid.types';\nexport * from './findAvailableDate';\nexport * from './getBoundedDateRange';\nexport * from './getDayGrid';\nexport * from './isRestrictedDate';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|