react-native-bigger-calendar 0.2.0 → 0.2.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/dist/index.js +10 -7
- package/dist/index.mjs +10 -7
- package/package.json +2 -2
- package/src/components/TimeGrid.tsx +8 -7
package/dist/index.js
CHANGED
|
@@ -962,7 +962,7 @@ function TimetablePageInner({ mode, numberOfDays, date, events, cellHeight, hour
|
|
|
962
962
|
renderEvent,
|
|
963
963
|
onPress: onPressEvent,
|
|
964
964
|
onLongPress: onLongPressEvent
|
|
965
|
-
}, keyExtractor(positioned.event, eventIndex));
|
|
965
|
+
}, `${dayIndex}:${keyExtractor(positioned.event, eventIndex)}`);
|
|
966
966
|
})),
|
|
967
967
|
showNowIndicator && nowDayIndex >= 0 && nowInWindow ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NowIndicator, {
|
|
968
968
|
cellHeight: heightSource,
|
|
@@ -1200,12 +1200,15 @@ const DayHeader = ({ day, mode, width, locale, activeDate, onPressDateHeader })
|
|
|
1200
1200
|
disabled: !onPressDateHeader,
|
|
1201
1201
|
accessibilityRole: onPressDateHeader ? "button" : void 0,
|
|
1202
1202
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
1203
|
-
style: [
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1203
|
+
style: [
|
|
1204
|
+
styles.dayHeaderBadge,
|
|
1205
|
+
{
|
|
1206
|
+
width: badgeSize,
|
|
1207
|
+
height: badgeSize,
|
|
1208
|
+
borderRadius: 999
|
|
1209
|
+
},
|
|
1210
|
+
isHighlighted && { backgroundColor: theme.colors.todayBackground }
|
|
1211
|
+
],
|
|
1209
1212
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
|
|
1210
1213
|
style: [theme.text.dayNumber, { color: isHighlighted ? theme.colors.todayText : theme.colors.text }],
|
|
1211
1214
|
allowFontScaling: false,
|
package/dist/index.mjs
CHANGED
|
@@ -938,7 +938,7 @@ function TimetablePageInner({ mode, numberOfDays, date, events, cellHeight, hour
|
|
|
938
938
|
renderEvent,
|
|
939
939
|
onPress: onPressEvent,
|
|
940
940
|
onLongPress: onLongPressEvent
|
|
941
|
-
}, keyExtractor(positioned.event, eventIndex));
|
|
941
|
+
}, `${dayIndex}:${keyExtractor(positioned.event, eventIndex)}`);
|
|
942
942
|
})),
|
|
943
943
|
showNowIndicator && nowDayIndex >= 0 && nowInWindow ? /* @__PURE__ */ jsx(NowIndicator, {
|
|
944
944
|
cellHeight: heightSource,
|
|
@@ -1176,12 +1176,15 @@ const DayHeader = ({ day, mode, width, locale, activeDate, onPressDateHeader })
|
|
|
1176
1176
|
disabled: !onPressDateHeader,
|
|
1177
1177
|
accessibilityRole: onPressDateHeader ? "button" : void 0,
|
|
1178
1178
|
children: [/* @__PURE__ */ jsx(View, {
|
|
1179
|
-
style: [
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1179
|
+
style: [
|
|
1180
|
+
styles.dayHeaderBadge,
|
|
1181
|
+
{
|
|
1182
|
+
width: badgeSize,
|
|
1183
|
+
height: badgeSize,
|
|
1184
|
+
borderRadius: 999
|
|
1185
|
+
},
|
|
1186
|
+
isHighlighted && { backgroundColor: theme.colors.todayBackground }
|
|
1187
|
+
],
|
|
1185
1188
|
children: /* @__PURE__ */ jsx(Text, {
|
|
1186
1189
|
style: [theme.text.dayNumber, { color: isHighlighted ? theme.colors.todayText : theme.colors.text }],
|
|
1187
1190
|
allowFontScaling: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bigger-calendar",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A generic, themeable month/week/day calendar for React Native with pinch-to-zoom, virtualized paging, and a render-prop event API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"react-native-gesture-handler": "~2.31.1",
|
|
71
71
|
"react-native-reanimated": "4.3.1",
|
|
72
72
|
"tsdown": "^0.22.3",
|
|
73
|
-
"typescript": "^
|
|
73
|
+
"typescript": "^6.0.3"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -551,7 +551,10 @@ function TimetablePageInner<T>({
|
|
|
551
551
|
const columnWidth = dayWidth / positioned.columns;
|
|
552
552
|
return (
|
|
553
553
|
<AnimatedEventBox
|
|
554
|
-
|
|
554
|
+
// Prefix with the day so a multi-day event's per-day segments
|
|
555
|
+
// (which share the same event key) stay unique across the
|
|
556
|
+
// flattened list of all days' boxes.
|
|
557
|
+
key={`${dayIndex}:${keyExtractor(positioned.event, eventIndex)}`}
|
|
555
558
|
positioned={positioned}
|
|
556
559
|
cellHeight={heightSource}
|
|
557
560
|
minHour={minHour}
|
|
@@ -1009,12 +1012,10 @@ const DayHeader = ({ day, mode, width, locale, activeDate, onPressDateHeader }:
|
|
|
1009
1012
|
<View
|
|
1010
1013
|
style={[
|
|
1011
1014
|
styles.dayHeaderBadge,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
height: badgeSize,
|
|
1017
|
-
},
|
|
1015
|
+
// Reserve the badge's size on every day so the highlight circle doesn't
|
|
1016
|
+
// change the header's dimensions between today and other days (no shift).
|
|
1017
|
+
{ width: badgeSize, height: badgeSize, borderRadius: 999 },
|
|
1018
|
+
isHighlighted && { backgroundColor: theme.colors.todayBackground },
|
|
1018
1019
|
]}
|
|
1019
1020
|
>
|
|
1020
1021
|
<Text
|