@react-native-user-interface/date-picker-modal 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/lib/date-picker-modal.d.ts +47 -0
- package/src/lib/date-picker-modal.js +340 -0
- package/src/lib/date-picker-modal.js.map +1 -0
- package/src/lib/hooks/use-calendar-data-for-date.d.ts +21 -0
- package/src/lib/hooks/use-calendar-data-for-date.js +45 -0
- package/src/lib/hooks/use-calendar-data-for-date.js.map +1 -0
- package/src/lib/hooks/use-current-datetime.d.ts +9 -0
- package/src/lib/hooks/use-current-datetime.js +24 -0
- package/src/lib/hooks/use-current-datetime.js.map +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-user-interface/date-picker-modal",
|
|
3
|
+
"dependencies": {
|
|
4
|
+
"react": "18.2.0",
|
|
5
|
+
"react-native": "0.70.1"
|
|
6
|
+
},
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"date-fns": "^2.29.3",
|
|
9
|
+
"react-native-gesture-handler": "^2.8.0",
|
|
10
|
+
"react-native-reanimated": "^2.12.0",
|
|
11
|
+
"tslib": "2.4.1"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"private": false,
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"version": "0.1.0",
|
|
17
|
+
"main": "./src/index.js",
|
|
18
|
+
"types": "./src/index.d.ts"
|
|
19
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './lib/date-picker-modal';
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/date-picker-modal/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
export declare type DatePickerModalStyleSheet = {
|
|
4
|
+
cancelButton?: ViewStyle;
|
|
5
|
+
cancelButtonText?: TextStyle;
|
|
6
|
+
confirmButton?: ViewStyle;
|
|
7
|
+
confirmButtonText?: TextStyle;
|
|
8
|
+
container?: ViewStyle;
|
|
9
|
+
content?: ViewStyle;
|
|
10
|
+
dateSelector?: ViewStyle;
|
|
11
|
+
dateSelectorControl?: ViewStyle;
|
|
12
|
+
dateSelectorControlText?: TextStyle;
|
|
13
|
+
dateSelectorControls?: ViewStyle;
|
|
14
|
+
dateSelectorDayContainer?: ViewStyle;
|
|
15
|
+
dateSelectorDayContent?: ViewStyle;
|
|
16
|
+
dateSelectorDayContentCurrentDayIndex?: ViewStyle;
|
|
17
|
+
dateSelectorDayContentFocusedDayIndex?: ViewStyle;
|
|
18
|
+
dateSelectorDayContentFocusedPastDayIndex?: ViewStyle;
|
|
19
|
+
dateSelectorDayText?: TextStyle;
|
|
20
|
+
dateSelectorDayTextIsCurrentMonth?: TextStyle;
|
|
21
|
+
dateSelectorDayTextIsSelected?: TextStyle;
|
|
22
|
+
dateSelectorWeek?: ViewStyle;
|
|
23
|
+
dateSelectorWeekday?: ViewStyle;
|
|
24
|
+
dateSelectorWeekdayText?: TextStyle;
|
|
25
|
+
dateSelectorWeekdays?: ViewStyle;
|
|
26
|
+
dateSelectorWeeks?: ViewStyle;
|
|
27
|
+
heading?: TextStyle;
|
|
28
|
+
selectedDateErrorContainer?: ViewStyle;
|
|
29
|
+
selectedDateErrorText?: TextStyle;
|
|
30
|
+
};
|
|
31
|
+
declare type DatePickerModalProps = {
|
|
32
|
+
animationType?: 'fade' | 'none' | 'slide';
|
|
33
|
+
initialDate?: Date;
|
|
34
|
+
onCancel?: () => void;
|
|
35
|
+
onConfirm?: (date: Date) => void;
|
|
36
|
+
presentationStyle?: 'formSheet' | 'fullScreen' | 'overFullScreen' | 'pageSheet';
|
|
37
|
+
stylesheet?: DatePickerModalStyleSheet;
|
|
38
|
+
transparent?: boolean;
|
|
39
|
+
visible?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @param {DatePickerModalProps} props
|
|
44
|
+
* @returns {JSX.Element}
|
|
45
|
+
*/
|
|
46
|
+
declare const DatePickerModal: FunctionComponent<DatePickerModalProps>;
|
|
47
|
+
export default DatePickerModal;
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { Modal, StyleSheet, Text, View } from 'react-native';
|
|
4
|
+
import { Gesture, GestureDetector, TouchableOpacity, TouchableWithoutFeedback, gestureHandlerRootHOC } from 'react-native-gesture-handler';
|
|
5
|
+
import { runOnJS } from 'react-native-reanimated';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
+
import format from 'date-fns/format';
|
|
8
|
+
import isSameDay from 'date-fns/isSameDay';
|
|
9
|
+
import startOfDay from 'date-fns/startOfDay';
|
|
10
|
+
import subMonths from 'date-fns/subMonths';
|
|
11
|
+
import addMonths from 'date-fns/addMonths';
|
|
12
|
+
// assets
|
|
13
|
+
import ChevronLeft from '../asset/ChevronLeft.svg';
|
|
14
|
+
import ChevronRight from '../asset/ChevronRight.svg';
|
|
15
|
+
// hooks
|
|
16
|
+
import useCalendarDataForDate from './hooks/use-calendar-data-for-date';
|
|
17
|
+
import useCurrentDatetime from './hooks/use-current-datetime';
|
|
18
|
+
//
|
|
19
|
+
const defaultStylesheet = StyleSheet.create({
|
|
20
|
+
cancelButton: {
|
|
21
|
+
backgroundColor: 'transparent',
|
|
22
|
+
borderRadius: 8,
|
|
23
|
+
marginBottom: 10,
|
|
24
|
+
marginHorizontal: 20,
|
|
25
|
+
},
|
|
26
|
+
cancelButtonText: {
|
|
27
|
+
color: '#4a83e7',
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
fontWeight: '600',
|
|
30
|
+
padding: 15,
|
|
31
|
+
textAlign: 'center',
|
|
32
|
+
},
|
|
33
|
+
confirmButton: {
|
|
34
|
+
backgroundColor: '#4a83e7',
|
|
35
|
+
borderRadius: 8,
|
|
36
|
+
marginBottom: 10,
|
|
37
|
+
marginHorizontal: 20,
|
|
38
|
+
},
|
|
39
|
+
confirmButtonText: {
|
|
40
|
+
color: '#ffffff',
|
|
41
|
+
fontSize: 16,
|
|
42
|
+
fontWeight: '600',
|
|
43
|
+
padding: 15,
|
|
44
|
+
textAlign: 'center',
|
|
45
|
+
},
|
|
46
|
+
container: {
|
|
47
|
+
flex: 1,
|
|
48
|
+
flexDirection: 'column',
|
|
49
|
+
justifyContent: 'flex-end',
|
|
50
|
+
},
|
|
51
|
+
content: {
|
|
52
|
+
backgroundColor: '#ffffff',
|
|
53
|
+
borderTopLeftRadius: 32,
|
|
54
|
+
borderTopRightRadius: 32,
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
paddingTop: 20,
|
|
57
|
+
},
|
|
58
|
+
dateSelector: {
|
|
59
|
+
paddingHorizontal: 20,
|
|
60
|
+
paddingVertical: 20,
|
|
61
|
+
},
|
|
62
|
+
dateSelectorControl: {
|
|
63
|
+
flexDirection: 'row',
|
|
64
|
+
},
|
|
65
|
+
dateSelectorControlButton: {
|
|
66
|
+
paddingHorizontal: 10,
|
|
67
|
+
paddingVertical: 10,
|
|
68
|
+
},
|
|
69
|
+
dateSelectorControlText: {
|
|
70
|
+
fontSize: 16,
|
|
71
|
+
lineHeight: 16,
|
|
72
|
+
paddingHorizontal: 5,
|
|
73
|
+
paddingVertical: 10,
|
|
74
|
+
textAlign: 'center',
|
|
75
|
+
},
|
|
76
|
+
dateSelectorControls: {
|
|
77
|
+
alignItems: 'center',
|
|
78
|
+
flexDirection: 'row',
|
|
79
|
+
justifyContent: 'space-between',
|
|
80
|
+
paddingHorizontal: 10,
|
|
81
|
+
},
|
|
82
|
+
dateSelectorDayContainer: {
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
},
|
|
87
|
+
dateSelectorDayContent: {
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
flexDirection: 'row',
|
|
90
|
+
justifyContent: 'center',
|
|
91
|
+
},
|
|
92
|
+
dateSelectorDayContentCurrentDayIndex: {
|
|
93
|
+
backgroundColor: '#4a83e733',
|
|
94
|
+
},
|
|
95
|
+
dateSelectorDayContentFocusedDayIndex: {
|
|
96
|
+
backgroundColor: '#4a83e7',
|
|
97
|
+
},
|
|
98
|
+
dateSelectorDayContentFocusedPastDayIndex: {
|
|
99
|
+
backgroundColor: '#4a83e733',
|
|
100
|
+
},
|
|
101
|
+
dateSelectorDayText: {
|
|
102
|
+
color: '#000000',
|
|
103
|
+
},
|
|
104
|
+
dateSelectorDayTextIsCurrentMonth: {
|
|
105
|
+
color: '#cccccc',
|
|
106
|
+
},
|
|
107
|
+
dateSelectorDayTextIsSelected: {
|
|
108
|
+
color: '#ffffff',
|
|
109
|
+
},
|
|
110
|
+
dateSelectorWeekday: {
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
justifyContent: 'center',
|
|
114
|
+
},
|
|
115
|
+
dateSelectorWeekdayText: {
|
|
116
|
+
fontSize: 16,
|
|
117
|
+
fontWeight: '600',
|
|
118
|
+
},
|
|
119
|
+
dateSelectorWeekdays: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
},
|
|
122
|
+
dateSelectorWeek: {
|
|
123
|
+
flexDirection: 'row',
|
|
124
|
+
},
|
|
125
|
+
dateSelectorWeeks: {},
|
|
126
|
+
heading: {
|
|
127
|
+
fontFamily: 'Arial',
|
|
128
|
+
fontSize: 30,
|
|
129
|
+
fontWeight: '600',
|
|
130
|
+
marginHorizontal: 20,
|
|
131
|
+
marginVertical: 20,
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
},
|
|
134
|
+
selectedDateErrorContainer: {
|
|
135
|
+
alignItems: 'flex-end',
|
|
136
|
+
flexDirection: 'row',
|
|
137
|
+
height: 60,
|
|
138
|
+
justifyContent: 'center',
|
|
139
|
+
padding: 20,
|
|
140
|
+
},
|
|
141
|
+
selectedDateErrorText: {
|
|
142
|
+
color: 'red',
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
* @param {DatePickerModalProps} props
|
|
148
|
+
* @returns {JSX.Element}
|
|
149
|
+
*/
|
|
150
|
+
const DatePickerModal = ({ animationType = 'slide', initialDate, onCancel, onConfirm, presentationStyle = 'overFullScreen', stylesheet = {}, transparent = true, visible = false, }) => {
|
|
151
|
+
var _a;
|
|
152
|
+
const { bottom } = useSafeAreaInsets();
|
|
153
|
+
const { currentDatetime } = useCurrentDatetime();
|
|
154
|
+
const [focusedDate, setFocusedDate] = useState(initialDate || currentDatetime);
|
|
155
|
+
const [selectedDate, setSelectedDate] = useState(initialDate || currentDatetime);
|
|
156
|
+
const [selectedDateError, setSelectedDateError] = useState(false);
|
|
157
|
+
const [dateSelectorColumnWidth, setDateSelectorColumnWidth] = useState(0);
|
|
158
|
+
const targetDate = useRef(initialDate || currentDatetime);
|
|
159
|
+
const onCancelPress = useCallback(() => {
|
|
160
|
+
if (onCancel)
|
|
161
|
+
onCancel();
|
|
162
|
+
}, [onCancel]);
|
|
163
|
+
const onConfirmPress = useCallback(() => {
|
|
164
|
+
if (selectedDate === undefined) {
|
|
165
|
+
setSelectedDateError(true);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (onConfirm)
|
|
169
|
+
onConfirm(selectedDate);
|
|
170
|
+
}, [onConfirm, selectedDate]);
|
|
171
|
+
const onContainerPress = useCallback(() => {
|
|
172
|
+
if (onCancel)
|
|
173
|
+
onCancel();
|
|
174
|
+
}, [onCancel]);
|
|
175
|
+
const onContentPress = useCallback(() => null, []);
|
|
176
|
+
const onDateSelectorWeeksLayout = useCallback((event) => {
|
|
177
|
+
setDateSelectorColumnWidth(event.nativeEvent.layout.width / 7);
|
|
178
|
+
}, []);
|
|
179
|
+
const onGoToPreviousYearPress = useCallback(() => {
|
|
180
|
+
if (focusedDate === undefined)
|
|
181
|
+
return;
|
|
182
|
+
setFocusedDate(subMonths(focusedDate, 12));
|
|
183
|
+
}, [focusedDate]);
|
|
184
|
+
const onGoToNextYearPress = useCallback(() => {
|
|
185
|
+
if (focusedDate === undefined)
|
|
186
|
+
return;
|
|
187
|
+
setFocusedDate(addMonths(focusedDate, 12));
|
|
188
|
+
}, [focusedDate]);
|
|
189
|
+
const onGoToPreviousMonthPress = useCallback(() => {
|
|
190
|
+
if (focusedDate === undefined)
|
|
191
|
+
return;
|
|
192
|
+
setFocusedDate(subMonths(focusedDate, 1));
|
|
193
|
+
}, [focusedDate]);
|
|
194
|
+
const onGoToNextMonthPress = useCallback(() => {
|
|
195
|
+
if (focusedDate === undefined)
|
|
196
|
+
return;
|
|
197
|
+
setFocusedDate(addMonths(focusedDate, 1));
|
|
198
|
+
}, [focusedDate]);
|
|
199
|
+
const calendarDataForFocusedDate = useCalendarDataForDate(focusedDate);
|
|
200
|
+
const dateSelectorWeeks = useMemo(() => {
|
|
201
|
+
const { month, monthFirstDayWeekday, monthFirstDayWeekdayIndex, monthIndex, monthLastDay, previousMonthLastMonthDay, year } = calendarDataForFocusedDate;
|
|
202
|
+
if (month === undefined)
|
|
203
|
+
return;
|
|
204
|
+
if (monthFirstDayWeekday === undefined)
|
|
205
|
+
return;
|
|
206
|
+
if (monthFirstDayWeekdayIndex === undefined)
|
|
207
|
+
return;
|
|
208
|
+
if (monthIndex === undefined)
|
|
209
|
+
return;
|
|
210
|
+
if (monthLastDay === undefined)
|
|
211
|
+
return;
|
|
212
|
+
if (previousMonthLastMonthDay === undefined)
|
|
213
|
+
return;
|
|
214
|
+
if (year === undefined)
|
|
215
|
+
return;
|
|
216
|
+
const dateSelectorWeeksData = [{ days: [] }];
|
|
217
|
+
let calendarWeekIndex = 0;
|
|
218
|
+
// previous month
|
|
219
|
+
for (let iteration = previousMonthLastMonthDay - (monthFirstDayWeekdayIndex || 7); iteration < previousMonthLastMonthDay; iteration++) {
|
|
220
|
+
dateSelectorWeeksData[calendarWeekIndex].days.push({
|
|
221
|
+
date: new Date(year, monthIndex - 1, iteration + 1),
|
|
222
|
+
isCurrentMonth: false,
|
|
223
|
+
isNextMonth: false,
|
|
224
|
+
isPreviousMonth: true,
|
|
225
|
+
monthDay: iteration + 1,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
// current month
|
|
229
|
+
for (let iteration = 0; iteration < monthLastDay; iteration++) {
|
|
230
|
+
if (dateSelectorWeeksData[calendarWeekIndex].days.length === 7) {
|
|
231
|
+
calendarWeekIndex = calendarWeekIndex + 1;
|
|
232
|
+
dateSelectorWeeksData[calendarWeekIndex] = { days: [] };
|
|
233
|
+
}
|
|
234
|
+
dateSelectorWeeksData[calendarWeekIndex].days.push({
|
|
235
|
+
date: new Date(year, monthIndex, iteration + 1),
|
|
236
|
+
isCurrentMonth: true,
|
|
237
|
+
isNextMonth: false,
|
|
238
|
+
isPreviousMonth: false,
|
|
239
|
+
monthDay: iteration + 1,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
const nextMonthDayCount = (7 - dateSelectorWeeksData[calendarWeekIndex].days.length) || 7;
|
|
243
|
+
for (let iteration = 0; iteration < nextMonthDayCount; iteration++) {
|
|
244
|
+
if (dateSelectorWeeksData[calendarWeekIndex].days.length === 7) {
|
|
245
|
+
calendarWeekIndex = calendarWeekIndex + 1;
|
|
246
|
+
dateSelectorWeeksData[calendarWeekIndex] = { days: [] };
|
|
247
|
+
}
|
|
248
|
+
if (dateSelectorWeeksData[calendarWeekIndex] === undefined)
|
|
249
|
+
dateSelectorWeeksData[calendarWeekIndex] = { days: [] };
|
|
250
|
+
dateSelectorWeeksData[calendarWeekIndex].days.push({
|
|
251
|
+
date: new Date(year, monthIndex + 1, iteration + 1),
|
|
252
|
+
isCurrentMonth: false,
|
|
253
|
+
isNextMonth: true,
|
|
254
|
+
isPreviousMonth: false,
|
|
255
|
+
monthDay: iteration + 1,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return dateSelectorWeeksData;
|
|
259
|
+
}, [calendarDataForFocusedDate]);
|
|
260
|
+
const renderDateSelectorControls = () => {
|
|
261
|
+
return (_jsxs(View, Object.assign({ style: [defaultStylesheet.dateSelectorControls, stylesheet.dateSelectorControls] }, { children: [_jsxs(View, Object.assign({ style: [defaultStylesheet.dateSelectorControl, stylesheet.dateSelectorControl] }, { children: [_jsx(TouchableOpacity, Object.assign({ onPress: onGoToPreviousYearPress, style: [defaultStylesheet.dateSelectorControlButton] }, { children: _jsx(ChevronLeft, {}) })), _jsx(Text, Object.assign({ style: [defaultStylesheet.dateSelectorControlText, stylesheet.dateSelectorControlText] }, { children: format(focusedDate, 'yyyy') })), _jsx(TouchableOpacity, Object.assign({ onPress: onGoToNextYearPress, style: [defaultStylesheet.dateSelectorControlButton] }, { children: _jsx(ChevronRight, {}) }))] })), _jsxs(View, Object.assign({ style: [defaultStylesheet.dateSelectorControl, stylesheet.dateSelectorControl] }, { children: [_jsx(TouchableOpacity, Object.assign({ onPress: onGoToPreviousMonthPress, style: [defaultStylesheet.dateSelectorControlButton] }, { children: _jsx(ChevronLeft, {}) })), _jsx(Text, Object.assign({ style: [defaultStylesheet.dateSelectorControlText, stylesheet.dateSelectorControlText] }, { children: format(focusedDate, 'MMM') })), _jsx(TouchableOpacity, Object.assign({ onPress: onGoToNextMonthPress, style: [defaultStylesheet.dateSelectorControlButton] }, { children: _jsx(ChevronRight, {}) }))] }))] })));
|
|
262
|
+
};
|
|
263
|
+
const renderDateSelectorWeekdays = () => {
|
|
264
|
+
const weekdayMapper = (weekdayInitial, index) => {
|
|
265
|
+
const viewStyle = [
|
|
266
|
+
{ height: dateSelectorColumnWidth, width: dateSelectorColumnWidth },
|
|
267
|
+
];
|
|
268
|
+
return (_jsx(View, Object.assign({ style: [defaultStylesheet.dateSelectorWeekday, stylesheet.dateSelectorWeekday, viewStyle] }, { children: _jsx(Text, Object.assign({ style: [defaultStylesheet.dateSelectorWeekdayText, stylesheet.dateSelectorWeekdayText] }, { children: weekdayInitial.toUpperCase() })) }), index));
|
|
269
|
+
};
|
|
270
|
+
return (_jsx(View, Object.assign({ onLayout: onDateSelectorWeeksLayout, style: defaultStylesheet.dateSelectorWeekdays }, { children: ['S', 'M', 'T', 'W', 'T', 'F', 'S'].map(weekdayMapper) })));
|
|
271
|
+
};
|
|
272
|
+
const renderDateSelectorWeeks = () => {
|
|
273
|
+
const dateSelectorWeekMapper = ({ date: dailyDate, isCurrentMonth, monthDay }) => {
|
|
274
|
+
const normalisedCurrentDate = startOfDay(currentDatetime);
|
|
275
|
+
const containerStyle = [
|
|
276
|
+
{ height: dateSelectorColumnWidth, width: dateSelectorColumnWidth },
|
|
277
|
+
];
|
|
278
|
+
const textStyle = [
|
|
279
|
+
stylesheet.dateSelectorDayText || defaultStylesheet.dateSelectorDayText,
|
|
280
|
+
];
|
|
281
|
+
if (isCurrentMonth === false) {
|
|
282
|
+
textStyle.push(stylesheet.dateSelectorDayTextIsCurrentMonth || defaultStylesheet.dateSelectorDayTextIsCurrentMonth);
|
|
283
|
+
}
|
|
284
|
+
if (selectedDate !== undefined && selectedDate >= normalisedCurrentDate && isSameDay(dailyDate, selectedDate)) {
|
|
285
|
+
textStyle.push(stylesheet.dateSelectorDayTextIsSelected || defaultStylesheet.dateSelectorDayTextIsSelected);
|
|
286
|
+
}
|
|
287
|
+
const viewStyle = [
|
|
288
|
+
{ borderRadius: dateSelectorColumnWidth / 2, height: dateSelectorColumnWidth - 5, width: dateSelectorColumnWidth - 5 },
|
|
289
|
+
];
|
|
290
|
+
if (isSameDay(dailyDate, normalisedCurrentDate)) {
|
|
291
|
+
viewStyle.push(stylesheet.dateSelectorDayContentCurrentDayIndex || defaultStylesheet.dateSelectorDayContentCurrentDayIndex);
|
|
292
|
+
}
|
|
293
|
+
if (selectedDate !== undefined && selectedDate < normalisedCurrentDate && isSameDay(dailyDate, selectedDate)) {
|
|
294
|
+
viewStyle.push(stylesheet.dateSelectorDayContentFocusedPastDayIndex || defaultStylesheet.dateSelectorDayContentFocusedPastDayIndex);
|
|
295
|
+
}
|
|
296
|
+
if (selectedDate !== undefined && selectedDate >= normalisedCurrentDate && isSameDay(dailyDate, selectedDate)) {
|
|
297
|
+
viewStyle.push(stylesheet.dateSelectorDayContentFocusedDayIndex || defaultStylesheet.dateSelectorDayContentFocusedDayIndex);
|
|
298
|
+
}
|
|
299
|
+
return (_jsx(View, Object.assign({ style: [defaultStylesheet.dateSelectorDayContainer, stylesheet.dateSelectorDayContainer, containerStyle] }, { children: _jsx(View, Object.assign({ style: [defaultStylesheet.dateSelectorDayContent, stylesheet.dateSelectorDayContent, viewStyle] }, { children: _jsx(Text, Object.assign({ style: [defaultStylesheet.dateSelectorDayText, stylesheet.dateSelectorDayText, textStyle] }, { children: monthDay })) })) }), dailyDate.toString()));
|
|
300
|
+
};
|
|
301
|
+
const dateSelectorWeeksMapper = ({ days }, index) => {
|
|
302
|
+
return (_jsx(View, Object.assign({ style: [defaultStylesheet.dateSelectorWeek, stylesheet.dateSelectorWeek] }, { children: days.map(dateSelectorWeekMapper) }), index));
|
|
303
|
+
};
|
|
304
|
+
return (_jsx(GestureDetector, Object.assign({ gesture: dayTapGesture }, { children: _jsx(View, Object.assign({ style: [defaultStylesheet.dateSelectorWeeks, stylesheet.dateSelectorWeeks] }, { children: dateSelectorWeeks === null || dateSelectorWeeks === void 0 ? void 0 : dateSelectorWeeks.map(dateSelectorWeeksMapper) })) })));
|
|
305
|
+
};
|
|
306
|
+
const onDayTapGestureStart = (event) => {
|
|
307
|
+
var _a;
|
|
308
|
+
const columnIndex = Math.floor(event.x / dateSelectorColumnWidth);
|
|
309
|
+
const rowIndex = Math.floor(event.y / dateSelectorColumnWidth);
|
|
310
|
+
if (columnIndex < 0)
|
|
311
|
+
return;
|
|
312
|
+
if (rowIndex < 0)
|
|
313
|
+
return;
|
|
314
|
+
const tappedDate = (_a = dateSelectorWeeks === null || dateSelectorWeeks === void 0 ? void 0 : dateSelectorWeeks[rowIndex > dateSelectorWeeks.length - 1 ? dateSelectorWeeks.length - 1 : rowIndex].days) === null || _a === void 0 ? void 0 : _a[columnIndex > 6 ? 6 : columnIndex].date;
|
|
315
|
+
if (tappedDate !== undefined) {
|
|
316
|
+
const normalisedFocusedDate = new Date(tappedDate);
|
|
317
|
+
normalisedFocusedDate.setHours(0);
|
|
318
|
+
normalisedFocusedDate.setMinutes(0);
|
|
319
|
+
normalisedFocusedDate.setSeconds(0);
|
|
320
|
+
normalisedFocusedDate.setMilliseconds(0);
|
|
321
|
+
targetDate.current = normalisedFocusedDate;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const onDayTapGestureEnd = () => {
|
|
325
|
+
if (targetDate.current === undefined)
|
|
326
|
+
return;
|
|
327
|
+
runOnJS(setSelectedDate)(targetDate.current);
|
|
328
|
+
};
|
|
329
|
+
const dayTapGesture = Gesture.Tap().
|
|
330
|
+
onStart(onDayTapGestureStart).
|
|
331
|
+
onEnd(onDayTapGestureEnd);
|
|
332
|
+
const contentStyles = {
|
|
333
|
+
paddingBottom: bottom + Number(((_a = stylesheet === null || stylesheet === void 0 ? void 0 : stylesheet.content) === null || _a === void 0 ? void 0 : _a.paddingBottom) || 0),
|
|
334
|
+
};
|
|
335
|
+
const Component = gestureHandlerRootHOC(() => (_jsx(TouchableWithoutFeedback, Object.assign({ containerStyle: [defaultStylesheet.container, stylesheet.container], onPress: onContainerPress, style: [defaultStylesheet.container, stylesheet.container] }, { children: _jsxs(TouchableWithoutFeedback, Object.assign({ onPress: onContentPress, style: [defaultStylesheet.content, stylesheet.content, contentStyles] }, { children: [_jsx(Text, Object.assign({ style: [defaultStylesheet.heading, stylesheet.heading] }, { children: "Select a Date" })), _jsxs(View, Object.assign({ style: [defaultStylesheet.dateSelector, stylesheet.dateSelector] }, { children: [renderDateSelectorControls(), renderDateSelectorWeekdays(), renderDateSelectorWeeks()] })), _jsx(View, Object.assign({ style: [defaultStylesheet.selectedDateErrorContainer, stylesheet.selectedDateErrorContainer] }, { children: selectedDateError && _jsx(Text, Object.assign({ style: [defaultStylesheet.selectedDateErrorText, stylesheet.selectedDateErrorText] }, { children: "You need to select a date" })) })), _jsx(TouchableOpacity, Object.assign({ onPress: onConfirmPress, style: [defaultStylesheet.confirmButton, stylesheet.confirmButton] }, { children: _jsx(Text, Object.assign({ style: [defaultStylesheet.confirmButtonText, stylesheet.confirmButtonText] }, { children: "Confirm" })) })), _jsx(TouchableOpacity, Object.assign({ onPress: onCancelPress, style: [defaultStylesheet.cancelButton, stylesheet.cancelButton] }, { children: _jsx(Text, Object.assign({ style: [defaultStylesheet.cancelButtonText, stylesheet.cancelButtonText] }, { children: "Cancel" })) }))] })) }))));
|
|
336
|
+
return (_jsx(Modal, Object.assign({ animationType: animationType, presentationStyle: presentationStyle, transparent: transparent, visible: visible }, { children: _jsx(Component, {}) })));
|
|
337
|
+
};
|
|
338
|
+
//
|
|
339
|
+
export default DatePickerModal;
|
|
340
|
+
//# sourceMappingURL=date-picker-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker-modal.js","sourceRoot":"","sources":["../../../../../../libs/date-picker-modal/src/lib/date-picker-modal.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAqB,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAqB,KAAK,EAAE,UAAU,EAAE,IAAI,EAAa,IAAI,EAAa,MAAM,cAAc,CAAC;AACtG,OAAO,EAAE,OAAO,EAA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AiB,IAAI,KAAC,IAAI,kBAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,CAAC,+CAAkC,IAC3I,EACP,KAAC,gBAAgB,kBAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,iBAAiB,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,gBAC3G,KAAC,IAAI,kBAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,6BAAgB,IAC/E,EACnB,KAAC,gBAAgB,kBAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,iBAAiB,CAAC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,gBACxG,KAAC,IAAI,kBAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,CAAC,4BAAe,IAC5E,KACM,IACF,CAC5B,CAAC,CAAA;IAEF,OAAO,CACL,KAAC,KAAK,kBACJ,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,gBAEhB,KAAC,SAAS,KAAG,IACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,EAAE;AACF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare type UseCalendarDataForDateReturnValue = {
|
|
2
|
+
monthFirstDayWeekday?: number;
|
|
3
|
+
monthFirstDayWeekdayIndex?: number;
|
|
4
|
+
month?: number;
|
|
5
|
+
monthDay?: number;
|
|
6
|
+
monthDayIndex?: number;
|
|
7
|
+
monthIndex?: number;
|
|
8
|
+
monthLastDay?: number;
|
|
9
|
+
monthLastDayIndex?: number;
|
|
10
|
+
previousMonthLastMonthDay?: number;
|
|
11
|
+
weekDay?: number;
|
|
12
|
+
weekDayIndex?: number;
|
|
13
|
+
year?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param {Date} date
|
|
18
|
+
* @returns {UseCalendarDataForDateReturnValue}
|
|
19
|
+
*/
|
|
20
|
+
declare const useCalendarDataForDate: (datetime: Date | undefined) => UseCalendarDataForDateReturnValue;
|
|
21
|
+
export default useCalendarDataForDate;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {Date} date
|
|
5
|
+
* @returns {UseCalendarDataForDateReturnValue}
|
|
6
|
+
*/
|
|
7
|
+
const useCalendarDataForDate = (datetime) => {
|
|
8
|
+
const data = useMemo(() => {
|
|
9
|
+
if (datetime === undefined)
|
|
10
|
+
return {};
|
|
11
|
+
const monthIndex = datetime.getMonth();
|
|
12
|
+
const monthDay = datetime.getDate();
|
|
13
|
+
const weekDayIndex = datetime.getDay();
|
|
14
|
+
const year = datetime.getFullYear();
|
|
15
|
+
const month = monthIndex + 1;
|
|
16
|
+
const monthDayIndex = monthDay ? monthDay - 1 : undefined;
|
|
17
|
+
const monthLastDay = new Date(year, monthIndex + 1, 0).getDate();
|
|
18
|
+
const weekDay = weekDayIndex + 1;
|
|
19
|
+
const monthLastDayIndex = monthLastDay ? monthLastDay - 1 : undefined;
|
|
20
|
+
const firstDayDate = new Date(year, monthIndex, 1);
|
|
21
|
+
const monthFirstDayWeekdayIndex = firstDayDate.getDay();
|
|
22
|
+
const monthFirstDayWeekday = monthFirstDayWeekdayIndex + 1;
|
|
23
|
+
const previousMonthLastDayDate = new Date(firstDayDate);
|
|
24
|
+
previousMonthLastDayDate.setHours(-12);
|
|
25
|
+
const previousMonthLastMonthDay = previousMonthLastDayDate.getDate();
|
|
26
|
+
return {
|
|
27
|
+
monthFirstDayWeekday,
|
|
28
|
+
monthFirstDayWeekdayIndex,
|
|
29
|
+
month,
|
|
30
|
+
monthDay,
|
|
31
|
+
monthDayIndex,
|
|
32
|
+
monthIndex,
|
|
33
|
+
monthLastDay,
|
|
34
|
+
monthLastDayIndex,
|
|
35
|
+
previousMonthLastMonthDay,
|
|
36
|
+
weekDay,
|
|
37
|
+
weekDayIndex,
|
|
38
|
+
year,
|
|
39
|
+
};
|
|
40
|
+
}, [datetime]);
|
|
41
|
+
return data;
|
|
42
|
+
};
|
|
43
|
+
//
|
|
44
|
+
export default useCalendarDataForDate;
|
|
45
|
+
//# sourceMappingURL=use-calendar-data-for-date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-calendar-data-for-date.js","sourceRoot":"","sources":["../../../../../../../libs/date-picker-modal/src/lib/hooks/use-calendar-data-for-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAkB/B;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,CAAC,QAA0B,EAAqC,EAAE;IAC/F,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,EAAE,CAAA;QAErC,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;QACtC,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAA;QACnC,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAA;QACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAA;QAEnC,MAAM,KAAK,GAAG,UAAU,GAAG,CAAC,CAAA;QAC5B,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACzD,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,UAAU,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;QAChE,MAAM,OAAO,GAAG,YAAY,GAAG,CAAC,CAAA;QAEhC,MAAM,iBAAiB,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAErE,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;QAClD,MAAM,yBAAyB,GAAG,YAAY,CAAC,MAAM,EAAE,CAAA;QACvD,MAAM,oBAAoB,GAAG,yBAAyB,GAAG,CAAC,CAAA;QAE1D,MAAM,wBAAwB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAA;QACvD,wBAAwB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAA;QAEtC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,OAAO,EAAE,CAAA;QAEpE,OAAO;YACL,oBAAoB;YACpB,yBAAyB;YACzB,KAAK;YACL,QAAQ;YACR,aAAa;YACb,UAAU;YACV,YAAY;YACZ,iBAAiB;YACjB,yBAAyB;YACzB,OAAO;YACP,YAAY;YACZ,IAAI;SACL,CAAA;IAEH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,EAAE;AACF,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @returns {UserDateReturnValue}
|
|
5
|
+
*/
|
|
6
|
+
const useCurrentDatetime = () => {
|
|
7
|
+
const [currentDatetime, setCurrentDatetime] = useState(new Date());
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const date = currentDatetime;
|
|
10
|
+
const midnight = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 24, 0, 0, 0);
|
|
11
|
+
setCurrentDatetime(date);
|
|
12
|
+
const millisecondsToMidnight = midnight.getTime() - new Date().getTime();
|
|
13
|
+
const timeoutId = setTimeout(() => setCurrentDatetime(midnight), millisecondsToMidnight);
|
|
14
|
+
return () => {
|
|
15
|
+
clearTimeout(timeoutId);
|
|
16
|
+
};
|
|
17
|
+
}, [currentDatetime]);
|
|
18
|
+
return {
|
|
19
|
+
currentDatetime,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//
|
|
23
|
+
export default useCurrentDatetime;
|
|
24
|
+
//# sourceMappingURL=use-current-datetime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-current-datetime.js","sourceRoot":"","sources":["../../../../../../../libs/date-picker-modal/src/lib/hooks/use-current-datetime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAO3C;;;GAGG;AACH,MAAM,kBAAkB,GAAG,GAAwB,EAAE;IACnD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAO,IAAI,IAAI,EAAE,CAAC,CAAA;IAExE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,IAAI,GAAG,eAAe,CAAA;QAC5B,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QAE3F,kBAAkB,CAAC,IAAI,CAAC,CAAA;QAExB,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QACxE,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAC,CAAA;QAExF,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,SAAS,CAAC,CAAA;QACzB,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAA;IAErB,OAAO;QACL,eAAe;KAChB,CAAA;AACH,CAAC,CAAA;AAED,EAAE;AACF,eAAe,kBAAkB,CAAA"}
|