Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Howl authored and Howl committed Sep 20, 2024
1 parent 9417976 commit eba22cb
Show file tree
Hide file tree
Showing 14 changed files with 505 additions and 388 deletions.
9 changes: 7 additions & 2 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
Expand All @@ -24,7 +26,10 @@
"web": {
"favicon": "./assets/images/favicon.png"
},
"plugins": ["expo-router"],
"plugins": [
"expo-router",
"expo-secure-store"
],
"scheme": "myapp"
}
}
14 changes: 7 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
"web": "expo start --web"
},
"dependencies": {
"@expo/vector-icons": "^14.0.0",
"@expo/vector-icons": "^14.0.3",
"@react-navigation/drawer": "^6.6.11",
"axios": "^1.6.7",
"expo": "^51.0.2",
"expo-constants": "~16.0.1",
"expo": "^51.0.32",
"expo-constants": "~16.0.2",
"expo-haptics": "^13.0.1",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.11",
"expo-secure-store": "~13.0.1",
"expo-router": "~3.5.23",
"expo-secure-store": "~13.0.2",
"expo-status-bar": "~1.12.1",
"expo-web-browser": "~13.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native": "0.74.5",
"react-native-gesture-handler": "~2.16.1",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-web": "~0.19.6",
"react-native-webview": "13.8.6"
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
],
"scripts": {
"example": "yarn workspace react-native-calendar-kit-example",
"server": "yarn workspace calendar-server",
"test": "jest",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
Expand Down Expand Up @@ -61,7 +60,9 @@
"@react-native/eslint-config": "^0.73.1",
"@release-it/conventional-changelog": "^5.0.0",
"@types/jest": "^29.5.5",
"@types/lodash": "^4.14.202",
"@types/lodash.debounce": "^4.0.9",
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.merge": "^4.6.9",
"@types/luxon": "^3.4.2",
"@types/react": "^18.2.44",
"commitlint": "^17.0.2",
Expand Down Expand Up @@ -178,8 +179,9 @@
]
},
"dependencies": {
"lodash": "^4.17.21",
"luxon": "^3.4.4",
"rrule": "^2.8.1"
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"lodash.merge": "^4.6.2",
"luxon": "^3.4.4"
}
}
2 changes: 2 additions & 0 deletions src/CalendarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ const CalendarContainer: React.ForwardRefRenderFunction<
pagesPerSide,
hideWeekDays,
visibleWeeks,
useAllDayEvent,
}),
[
calendarLayout,
Expand Down Expand Up @@ -560,6 +561,7 @@ const CalendarContainer: React.ForwardRefRenderFunction<
pagesPerSide,
hideWeekDays,
visibleWeeks,
useAllDayEvent,
]
);

Expand Down
3 changes: 3 additions & 0 deletions src/CalendarDayBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const CalendarDayBar: React.FC<CalendarDayBarProps> = ({
visibleDateUnixAnim,
visibleWeeks,
columnWidth,
useAllDayEvent,
} = useCalendar();

const colors = useTheme((state) => state.colors);
Expand Down Expand Up @@ -128,6 +129,7 @@ const CalendarDayBar: React.FC<CalendarDayBarProps> = ({
allDayEventsHeight,
isShowExpandButton,
columnWidth,
useAllDayEvent,
}),
[
initialHeight,
Expand All @@ -145,6 +147,7 @@ const CalendarDayBar: React.FC<CalendarDayBarProps> = ({
allDayEventsHeight,
isShowExpandButton,
columnWidth,
useAllDayEvent,
]
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/EventItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isEqual from 'lodash/isEqual';
import isEqual from 'lodash.isequal';
import React, { FC, useCallback, useEffect, useMemo, useRef } from 'react';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import Animated, {
Expand Down
45 changes: 29 additions & 16 deletions src/components/SingleDayBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface SingleDayBarItemProps {

const SingleDayBarItem = ({ startUnix }: SingleDayBarItemProps) => {
const colors = useTheme((state) => state.colors);
const { hourWidth, height, allDayEventsHeight } = useDayBar();
const { hourWidth, height, allDayEventsHeight, useAllDayEvent } = useDayBar();
const { data: events, eventCounts } = useAllDayEventsByDay(startUnix);
const { onPressEvent } = useActions();
const containerStyle = useAnimatedStyle(() => {
Expand All @@ -44,21 +44,29 @@ const SingleDayBarItem = ({ startUnix }: SingleDayBarItemProps) => {
return (
<View>
<Animated.View style={[styles.container, containerStyle]}>
<View
style={[
styles.dayItemContainer,
{ width: hourWidth, borderRightColor: colors.border },
]}
>
<DayItem dateUnix={startUnix} />
<ExpandButton />
</View>
<View style={[styles.eventsContainer]}>
<View style={styles.events}>{events.map(_renderEvent)}</View>
{eventCounts > COLLAPSED_ROW_COUNT && (
<EventCounts eventCounts={eventCounts} />
)}
</View>
{!useAllDayEvent ? (
<View style={styles.dayContainer}>
<DayItem dateUnix={startUnix} />
</View>
) : (
<>
<View
style={[
styles.dayItemContainer,
{ width: hourWidth, borderRightColor: colors.border },
]}
>
<DayItem dateUnix={startUnix} />
<ExpandButton />
</View>
<View style={[styles.eventsContainer]}>
<View style={styles.events}>{events.map(_renderEvent)}</View>
{eventCounts > COLLAPSED_ROW_COUNT && (
<EventCounts eventCounts={eventCounts} />
)}
</View>
</>
)}
</Animated.View>
<LoadingOverlay />
<ProgressBar />
Expand Down Expand Up @@ -149,4 +157,9 @@ const styles = StyleSheet.create({
},
eventTitle: { fontSize: 12, color: '#FFF', paddingHorizontal: 2 },
countText: { fontSize: 12, paddingHorizontal: 8 },
dayContainer: {
justifyContent: 'center',
alignItems: 'center',
flexGrow: 1,
},
});
1 change: 1 addition & 0 deletions src/context/CalendarProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface CalendarContextProps {
scrollVisibleHeightAnim: SharedValue<number>;
pagesPerSide: number;
hideWeekDays: WeekdayNumbers[];
useAllDayEvent: boolean;
}

export const CalendarContext = React.createContext<
Expand Down
1 change: 1 addition & 0 deletions src/context/DayBarContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface DayBarContextProps {
allDayEventsHeight: Readonly<SharedValue<number>>;
isShowExpandButton: SharedValue<boolean>;
columnWidth: number;
useAllDayEvent: boolean;
}

export const DayBarContext = React.createContext<
Expand Down
2 changes: 1 addition & 1 deletion src/context/LocaleProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import merge from 'lodash/merge';
import merge from 'lodash.merge';
import React, { useMemo, type PropsWithChildren } from 'react';
import { DEFAULT_LOCALES } from '../constants';
import useLazyRef from '../hooks/useLazyRef';
Expand Down
2 changes: 1 addition & 1 deletion src/context/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import merge from 'lodash/merge';
import merge from 'lodash.merge';
import React, {
createContext,
useContext,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useSyncExternalStoreWithSelector.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import is from 'lodash/isEqual';
import is from 'lodash.isequal';
import { useEffect, useMemo, useRef, useSyncExternalStore } from 'react';

type InstRef<T> = {
Expand Down
2 changes: 1 addition & 1 deletion src/recyclerlistview/core/RecyclerListView.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import debounce from 'lodash/debounce';
import debounce from 'lodash.debounce';
import * as React from 'react';
import { ScrollViewProps } from 'react-native';
import { ComponentCompat } from '../utils/ComponentCompat';
Expand Down
Loading

0 comments on commit eba22cb

Please sign in to comment.