@lazerlen/legend-calendar 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -33,11 +33,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
33
33
 
34
34
  // src/components/Calendar.tsx
35
35
  import { c as _c10 } from "react/compiler-runtime";
36
- import { memo as memo6, useEffect } from "react";
36
+ import { useEffect } from "react";
37
37
 
38
38
  // src/components/CalendarItemDay.tsx
39
39
  import { c as _c3 } from "react/compiler-runtime";
40
- import { memo } from "react";
41
40
  import { Pressable, StyleSheet, View } from "react-native";
42
41
 
43
42
  // src/components/Text.tsx
@@ -591,7 +590,7 @@ var buildBaseStyles = (theme) => {
591
590
  }
592
591
  };
593
592
  };
594
- var CalendarItemDay = /* @__PURE__ */ memo(function CalendarItemDay2(t0) {
593
+ var CalendarItemDay = function CalendarItemDay2(t0) {
595
594
  const $ = _c3(22);
596
595
  const {
597
596
  onPress,
@@ -757,8 +756,8 @@ var CalendarItemDay = /* @__PURE__ */ memo(function CalendarItemDay2(t0) {
757
756
  t7 = $[21];
758
757
  }
759
758
  return t7;
760
- });
761
- var CalendarItemDayContainer = /* @__PURE__ */ memo(function CalendarItemDayContainer2(t0) {
759
+ };
760
+ var CalendarItemDayContainer = function CalendarItemDayContainer2(t0) {
762
761
  const $ = _c3(29);
763
762
  const {
764
763
  children,
@@ -885,8 +884,8 @@ var CalendarItemDayContainer = /* @__PURE__ */ memo(function CalendarItemDayCont
885
884
  t10 = $[28];
886
885
  }
887
886
  return t10;
888
- });
889
- var CalendarItemDayWithContainer = /* @__PURE__ */ memo(function CalendarItemDayWithContainer2(t0) {
887
+ };
888
+ var CalendarItemDayWithContainer = function CalendarItemDayWithContainer2(t0) {
890
889
  const $ = _c3(14);
891
890
  const {
892
891
  children,
@@ -943,11 +942,10 @@ var CalendarItemDayWithContainer = /* @__PURE__ */ memo(function CalendarItemDay
943
942
  t3 = $[13];
944
943
  }
945
944
  return t3;
946
- });
945
+ };
947
946
 
948
947
  // src/components/CalendarItemEmpty.tsx
949
948
  import { c as _c4 } from "react/compiler-runtime";
950
- import { memo as memo2 } from "react";
951
949
  import { StyleSheet as StyleSheet2, View as View2 } from "react-native";
952
950
  import { jsx as _jsx3 } from "react/jsx-runtime";
953
951
  var styles2 = StyleSheet2.create({
@@ -956,7 +954,7 @@ var styles2 = StyleSheet2.create({
956
954
  flex: 1
957
955
  }
958
956
  });
959
- var CalendarItemEmpty = /* @__PURE__ */ memo2(function CalendarItemEmpty2(props) {
957
+ var CalendarItemEmpty = function CalendarItemEmpty2(props) {
960
958
  const $ = _c4(5);
961
959
  const {
962
960
  height,
@@ -986,11 +984,10 @@ var CalendarItemEmpty = /* @__PURE__ */ memo2(function CalendarItemEmpty2(props)
986
984
  t2 = $[4];
987
985
  }
988
986
  return t2;
989
- });
987
+ };
990
988
 
991
989
  // src/components/CalendarItemWeekName.tsx
992
990
  import { c as _c5 } from "react/compiler-runtime";
993
- import { memo as memo3 } from "react";
994
991
  import { StyleSheet as StyleSheet3, View as View3 } from "react-native";
995
992
  import { jsx as _jsx4 } from "react/jsx-runtime";
996
993
  var styles3 = StyleSheet3.create({
@@ -1002,7 +999,7 @@ var styles3 = StyleSheet3.create({
1002
999
  },
1003
1000
  content: {}
1004
1001
  });
1005
- var CalendarItemWeekName = /* @__PURE__ */ memo3(function CalendarItemWeekName2(t0) {
1002
+ var CalendarItemWeekName = function CalendarItemWeekName2(t0) {
1006
1003
  const $ = _c5(18);
1007
1004
  const {
1008
1005
  children,
@@ -1083,11 +1080,18 @@ var CalendarItemWeekName = /* @__PURE__ */ memo3(function CalendarItemWeekName2(
1083
1080
  t9 = $[17];
1084
1081
  }
1085
1082
  return t9;
1086
- });
1083
+ };
1084
+
1085
+ // src/components/CalendarListConfigContext.tsx
1086
+ import { createContext as createContext2, useContext as useContext2 } from "react";
1087
+ var CalendarListConfigContext = /* @__PURE__ */ createContext2(null);
1088
+ var CalendarListConfigProvider = CalendarListConfigContext.Provider;
1089
+ var useCalendarListConfig = () => {
1090
+ return useContext2(CalendarListConfigContext);
1091
+ };
1087
1092
 
1088
1093
  // src/components/CalendarRowMonth.tsx
1089
1094
  import { c as _c6 } from "react/compiler-runtime";
1090
- import { memo as memo4 } from "react";
1091
1095
  import { StyleSheet as StyleSheet4, View as View4 } from "react-native";
1092
1096
  import { jsx as _jsx5 } from "react/jsx-runtime";
1093
1097
  var styles4 = StyleSheet4.create({
@@ -1101,7 +1105,7 @@ var styles4 = StyleSheet4.create({
1101
1105
  width: "100%"
1102
1106
  }
1103
1107
  });
1104
- var CalendarRowMonth = /* @__PURE__ */ memo4(function CalendarRowMonth2(t0) {
1108
+ var CalendarRowMonth = function CalendarRowMonth2(t0) {
1105
1109
  const $ = _c6(16);
1106
1110
  const {
1107
1111
  children,
@@ -1176,11 +1180,10 @@ var CalendarRowMonth = /* @__PURE__ */ memo4(function CalendarRowMonth2(t0) {
1176
1180
  t8 = $[15];
1177
1181
  }
1178
1182
  return t8;
1179
- });
1183
+ };
1180
1184
 
1181
1185
  // src/components/CalendarRowWeek.tsx
1182
1186
  import { c as _c8 } from "react/compiler-runtime";
1183
- import { memo as memo5 } from "react";
1184
1187
  import { StyleSheet as StyleSheet6 } from "react-native";
1185
1188
 
1186
1189
  // src/components/HStack.tsx
@@ -1344,7 +1347,7 @@ var styles6 = StyleSheet6.create({
1344
1347
  width: "100%"
1345
1348
  }
1346
1349
  });
1347
- var CalendarRowWeek = /* @__PURE__ */ memo5(function CalendarRowWeek2(t0) {
1350
+ var CalendarRowWeek = function CalendarRowWeek2(t0) {
1348
1351
  var _a;
1349
1352
  const $ = _c8(8);
1350
1353
  const {
@@ -1388,7 +1391,7 @@ var CalendarRowWeek = /* @__PURE__ */ memo5(function CalendarRowWeek2(t0) {
1388
1391
  t4 = $[7];
1389
1392
  }
1390
1393
  return t4;
1391
- });
1394
+ };
1392
1395
 
1393
1396
  // src/components/VStack.tsx
1394
1397
  import { c as _c9 } from "react/compiler-runtime";
@@ -1447,7 +1450,7 @@ var uppercaseFirstLetter = (value) => value.charAt(0).toUpperCase() + value.slic
1447
1450
 
1448
1451
  // src/components/Calendar.tsx
1449
1452
  import { jsx as _jsx9, jsxs as _jsxs2 } from "react/jsx-runtime";
1450
- var BaseCalendar = /* @__PURE__ */ memo6(function BaseCalendar2(props) {
1453
+ var BaseCalendar = function BaseCalendar2(props) {
1451
1454
  var _a;
1452
1455
  const $ = _c10(51);
1453
1456
  let CalendarPressableComponent;
@@ -1650,17 +1653,28 @@ var BaseCalendar = /* @__PURE__ */ memo6(function BaseCalendar2(props) {
1650
1653
  t13 = $[50];
1651
1654
  }
1652
1655
  return t13;
1653
- });
1654
- var Calendar = /* @__PURE__ */ memo6(function Calendar2(props) {
1656
+ };
1657
+ var Calendar = function Calendar2(props) {
1655
1658
  var _a;
1656
- const $ = _c10(20);
1659
+ const $ = _c10(23);
1660
+ const listConfig = useCalendarListConfig();
1661
+ let t0;
1662
+ if ($[0] !== listConfig || $[1] !== props) {
1663
+ t0 = listConfig ? __spreadValues(__spreadValues({}, listConfig), props) : props;
1664
+ $[0] = listConfig;
1665
+ $[1] = props;
1666
+ $[2] = t0;
1667
+ } else {
1668
+ t0 = $[2];
1669
+ }
1670
+ const resolvedProps = t0;
1657
1671
  let calendarActiveDateRanges;
1658
1672
  let calendarColorScheme;
1659
1673
  let calendarInstanceId;
1660
1674
  let calendarMonthId;
1661
1675
  let otherProps;
1662
- if ($[0] !== props) {
1663
- _a = props, {
1676
+ if ($[3] !== resolvedProps) {
1677
+ _a = resolvedProps, {
1664
1678
  calendarInstanceId,
1665
1679
  calendarActiveDateRanges,
1666
1680
  calendarMonthId,
@@ -1671,76 +1685,76 @@ var Calendar = /* @__PURE__ */ memo6(function Calendar2(props) {
1671
1685
  "calendarMonthId",
1672
1686
  "calendarColorScheme"
1673
1687
  ]);
1674
- $[0] = props;
1675
- $[1] = calendarActiveDateRanges;
1676
- $[2] = calendarColorScheme;
1677
- $[3] = calendarInstanceId;
1678
- $[4] = calendarMonthId;
1679
- $[5] = otherProps;
1680
- } else {
1681
- calendarActiveDateRanges = $[1];
1682
- calendarColorScheme = $[2];
1683
- calendarInstanceId = $[3];
1684
- calendarMonthId = $[4];
1685
- otherProps = $[5];
1688
+ $[3] = resolvedProps;
1689
+ $[4] = calendarActiveDateRanges;
1690
+ $[5] = calendarColorScheme;
1691
+ $[6] = calendarInstanceId;
1692
+ $[7] = calendarMonthId;
1693
+ $[8] = otherProps;
1694
+ } else {
1695
+ calendarActiveDateRanges = $[4];
1696
+ calendarColorScheme = $[5];
1697
+ calendarInstanceId = $[6];
1698
+ calendarMonthId = $[7];
1699
+ otherProps = $[8];
1686
1700
  }
1687
- let t0;
1688
- if ($[6] !== calendarActiveDateRanges || $[7] !== calendarInstanceId) {
1689
- t0 = () => {
1701
+ let t1;
1702
+ if ($[9] !== calendarActiveDateRanges || $[10] !== calendarInstanceId) {
1703
+ t1 = () => {
1690
1704
  if (calendarActiveDateRanges === void 0) {
1691
1705
  return;
1692
1706
  }
1693
1707
  activeDateRangesStore.setRanges(calendarInstanceId != null ? calendarInstanceId : "legend-calendar-default-instance", calendarActiveDateRanges);
1694
1708
  };
1695
- $[6] = calendarActiveDateRanges;
1696
- $[7] = calendarInstanceId;
1697
- $[8] = t0;
1698
- } else {
1699
- t0 = $[8];
1700
- }
1701
- let t1;
1702
- if ($[9] !== calendarActiveDateRanges || $[10] !== calendarInstanceId || $[11] !== calendarMonthId) {
1703
- t1 = [calendarActiveDateRanges, calendarInstanceId, calendarMonthId];
1704
1709
  $[9] = calendarActiveDateRanges;
1705
1710
  $[10] = calendarInstanceId;
1706
- $[11] = calendarMonthId;
1707
- $[12] = t1;
1711
+ $[11] = t1;
1708
1712
  } else {
1709
- t1 = $[12];
1713
+ t1 = $[11];
1710
1714
  }
1711
- useEffect(t0, t1);
1712
1715
  let t2;
1713
- if ($[13] !== calendarInstanceId || $[14] !== calendarMonthId || $[15] !== otherProps) {
1714
- t2 = /* @__PURE__ */ _jsx9(BaseCalendar, __spreadProps(__spreadValues({}, otherProps), {
1715
- calendarInstanceId,
1716
- calendarMonthId
1717
- }));
1716
+ if ($[12] !== calendarActiveDateRanges || $[13] !== calendarInstanceId || $[14] !== calendarMonthId) {
1717
+ t2 = [calendarActiveDateRanges, calendarInstanceId, calendarMonthId];
1718
+ $[12] = calendarActiveDateRanges;
1718
1719
  $[13] = calendarInstanceId;
1719
1720
  $[14] = calendarMonthId;
1720
- $[15] = otherProps;
1721
- $[16] = t2;
1721
+ $[15] = t2;
1722
1722
  } else {
1723
- t2 = $[16];
1723
+ t2 = $[15];
1724
1724
  }
1725
+ useEffect(t1, t2);
1725
1726
  let t3;
1726
- if ($[17] !== calendarColorScheme || $[18] !== t2) {
1727
- t3 = /* @__PURE__ */ _jsx9(CalendarThemeProvider, {
1728
- colorScheme: calendarColorScheme,
1729
- children: t2
1730
- });
1731
- $[17] = calendarColorScheme;
1732
- $[18] = t2;
1727
+ if ($[16] !== calendarInstanceId || $[17] !== calendarMonthId || $[18] !== otherProps) {
1728
+ t3 = /* @__PURE__ */ _jsx9(BaseCalendar, __spreadProps(__spreadValues({}, otherProps), {
1729
+ calendarInstanceId,
1730
+ calendarMonthId
1731
+ }));
1732
+ $[16] = calendarInstanceId;
1733
+ $[17] = calendarMonthId;
1734
+ $[18] = otherProps;
1733
1735
  $[19] = t3;
1734
1736
  } else {
1735
1737
  t3 = $[19];
1736
1738
  }
1737
- return t3;
1738
- });
1739
+ let t4;
1740
+ if ($[20] !== calendarColorScheme || $[21] !== t3) {
1741
+ t4 = /* @__PURE__ */ _jsx9(CalendarThemeProvider, {
1742
+ colorScheme: calendarColorScheme,
1743
+ children: t3
1744
+ });
1745
+ $[20] = calendarColorScheme;
1746
+ $[21] = t3;
1747
+ $[22] = t4;
1748
+ } else {
1749
+ t4 = $[22];
1750
+ }
1751
+ return t4;
1752
+ };
1739
1753
 
1740
1754
  // src/components/CalendarList.tsx
1741
1755
  import { c as _c12 } from "react/compiler-runtime";
1742
1756
  import { LegendList as LegendListBase } from "@legendapp/list/react-native";
1743
- import { useEffect as useEffect2, useImperativeHandle, useRef } from "react";
1757
+ import { useEffect as useEffect2, useImperativeHandle, useMemo, useRef, useState as useState2 } from "react";
1744
1758
  import { StyleSheet as StyleSheet8, View as View7 } from "react-native";
1745
1759
 
1746
1760
  // src/hooks/useCalendarList.tsx
@@ -1996,14 +2010,261 @@ var getHeightForMonth = ({
1996
2010
  import { jsx as _jsx10 } from "react/jsx-runtime";
1997
2011
  var LegendList = LegendListBase;
1998
2012
  var keyExtractor = (month) => month.id;
1999
- function CalendarList(t0) {
2000
- const $ = _c12(49);
2001
- const _a = t0, {
2002
- ref
2003
- } = _a, props = __objRest(_a, [
2004
- "ref"
2005
- ]);
2006
- const _b = props, {
2013
+ function buildCalendarConfig(calendarColorScheme, calendarDayHeight, calendarDisabledDateIds, calendarFirstDayOfWeek, calendarFormatLocale, calendarInstanceId, calendarMaxDateId, calendarMinDateId, calendarMonthHeaderHeight, calendarRowHorizontalSpacing, calendarRowVerticalSpacing, calendarWeekHeaderHeightProp, getCalendarDayFormat, getCalendarMonthFormat, getCalendarWeekDayFormat, onCalendarDayPress, theme, CalendarPressableComponent) {
2014
+ const calendarWeekHeaderHeight = calendarWeekHeaderHeightProp != null ? calendarWeekHeaderHeightProp : calendarDayHeight;
2015
+ return {
2016
+ calendarColorScheme,
2017
+ calendarDayHeight,
2018
+ calendarDisabledDateIds,
2019
+ calendarFirstDayOfWeek,
2020
+ calendarFormatLocale,
2021
+ calendarInstanceId,
2022
+ calendarMaxDateId,
2023
+ calendarMinDateId,
2024
+ calendarMonthHeaderHeight,
2025
+ calendarRowHorizontalSpacing,
2026
+ calendarRowVerticalSpacing,
2027
+ calendarWeekHeaderHeight,
2028
+ getCalendarDayFormat,
2029
+ getCalendarMonthFormat,
2030
+ getCalendarWeekDayFormat,
2031
+ onCalendarDayPress,
2032
+ theme,
2033
+ CalendarPressableComponent
2034
+ };
2035
+ }
2036
+ function CalendarList(props) {
2037
+ var _a;
2038
+ const $ = _c12(62);
2039
+ let CalendarPressableComponent;
2040
+ let calendarActiveDateRanges;
2041
+ let calendarAdditionalHeight;
2042
+ let calendarColorScheme;
2043
+ let calendarDayHeight;
2044
+ let calendarDisabledDateIds;
2045
+ let calendarFirstDayOfWeek;
2046
+ let calendarFormatLocale;
2047
+ let calendarFutureScrollRangeInMonths;
2048
+ let calendarInitialMonthId;
2049
+ let calendarInitialScrollToActiveRange;
2050
+ let calendarInstanceId;
2051
+ let calendarMaxDateId;
2052
+ let calendarMinDateId;
2053
+ let calendarMonthHeaderHeight;
2054
+ let calendarPastScrollRangeInMonths;
2055
+ let calendarRowHorizontalSpacing;
2056
+ let calendarRowVerticalSpacing;
2057
+ let calendarSpacing;
2058
+ let calendarWeekHeaderHeight;
2059
+ let flatListProps;
2060
+ let getCalendarDayFormat;
2061
+ let getCalendarMonthFormat;
2062
+ let getCalendarWeekDayFormat;
2063
+ let onCalendarDayPress;
2064
+ let onEndReached;
2065
+ let onStartReached;
2066
+ let ref;
2067
+ let renderItem;
2068
+ let theme;
2069
+ if ($[0] !== props) {
2070
+ _a = props, {
2071
+ ref,
2072
+ calendarInitialMonthId,
2073
+ calendarInitialScrollToActiveRange,
2074
+ calendarPastScrollRangeInMonths,
2075
+ calendarFutureScrollRangeInMonths,
2076
+ calendarFirstDayOfWeek,
2077
+ calendarFormatLocale,
2078
+ calendarSpacing,
2079
+ calendarRowHorizontalSpacing,
2080
+ calendarRowVerticalSpacing,
2081
+ calendarMonthHeaderHeight,
2082
+ calendarDayHeight,
2083
+ calendarWeekHeaderHeight,
2084
+ calendarAdditionalHeight,
2085
+ calendarColorScheme,
2086
+ theme,
2087
+ onEndReached,
2088
+ onStartReached,
2089
+ calendarActiveDateRanges,
2090
+ calendarDisabledDateIds,
2091
+ calendarInstanceId,
2092
+ calendarMaxDateId,
2093
+ calendarMinDateId,
2094
+ getCalendarDayFormat,
2095
+ getCalendarMonthFormat,
2096
+ getCalendarWeekDayFormat,
2097
+ onCalendarDayPress,
2098
+ CalendarPressableComponent,
2099
+ renderItem
2100
+ } = _a, flatListProps = __objRest(_a, [
2101
+ "ref",
2102
+ "calendarInitialMonthId",
2103
+ "calendarInitialScrollToActiveRange",
2104
+ "calendarPastScrollRangeInMonths",
2105
+ "calendarFutureScrollRangeInMonths",
2106
+ "calendarFirstDayOfWeek",
2107
+ "calendarFormatLocale",
2108
+ "calendarSpacing",
2109
+ "calendarRowHorizontalSpacing",
2110
+ "calendarRowVerticalSpacing",
2111
+ "calendarMonthHeaderHeight",
2112
+ "calendarDayHeight",
2113
+ "calendarWeekHeaderHeight",
2114
+ "calendarAdditionalHeight",
2115
+ "calendarColorScheme",
2116
+ "theme",
2117
+ "onEndReached",
2118
+ "onStartReached",
2119
+ "calendarActiveDateRanges",
2120
+ "calendarDisabledDateIds",
2121
+ "calendarInstanceId",
2122
+ "calendarMaxDateId",
2123
+ "calendarMinDateId",
2124
+ "getCalendarDayFormat",
2125
+ "getCalendarMonthFormat",
2126
+ "getCalendarWeekDayFormat",
2127
+ "onCalendarDayPress",
2128
+ "CalendarPressableComponent",
2129
+ "renderItem"
2130
+ ]);
2131
+ $[0] = props;
2132
+ $[1] = CalendarPressableComponent;
2133
+ $[2] = calendarActiveDateRanges;
2134
+ $[3] = calendarAdditionalHeight;
2135
+ $[4] = calendarColorScheme;
2136
+ $[5] = calendarDayHeight;
2137
+ $[6] = calendarDisabledDateIds;
2138
+ $[7] = calendarFirstDayOfWeek;
2139
+ $[8] = calendarFormatLocale;
2140
+ $[9] = calendarFutureScrollRangeInMonths;
2141
+ $[10] = calendarInitialMonthId;
2142
+ $[11] = calendarInitialScrollToActiveRange;
2143
+ $[12] = calendarInstanceId;
2144
+ $[13] = calendarMaxDateId;
2145
+ $[14] = calendarMinDateId;
2146
+ $[15] = calendarMonthHeaderHeight;
2147
+ $[16] = calendarPastScrollRangeInMonths;
2148
+ $[17] = calendarRowHorizontalSpacing;
2149
+ $[18] = calendarRowVerticalSpacing;
2150
+ $[19] = calendarSpacing;
2151
+ $[20] = calendarWeekHeaderHeight;
2152
+ $[21] = flatListProps;
2153
+ $[22] = getCalendarDayFormat;
2154
+ $[23] = getCalendarMonthFormat;
2155
+ $[24] = getCalendarWeekDayFormat;
2156
+ $[25] = onCalendarDayPress;
2157
+ $[26] = onEndReached;
2158
+ $[27] = onStartReached;
2159
+ $[28] = ref;
2160
+ $[29] = renderItem;
2161
+ $[30] = theme;
2162
+ } else {
2163
+ CalendarPressableComponent = $[1];
2164
+ calendarActiveDateRanges = $[2];
2165
+ calendarAdditionalHeight = $[3];
2166
+ calendarColorScheme = $[4];
2167
+ calendarDayHeight = $[5];
2168
+ calendarDisabledDateIds = $[6];
2169
+ calendarFirstDayOfWeek = $[7];
2170
+ calendarFormatLocale = $[8];
2171
+ calendarFutureScrollRangeInMonths = $[9];
2172
+ calendarInitialMonthId = $[10];
2173
+ calendarInitialScrollToActiveRange = $[11];
2174
+ calendarInstanceId = $[12];
2175
+ calendarMaxDateId = $[13];
2176
+ calendarMinDateId = $[14];
2177
+ calendarMonthHeaderHeight = $[15];
2178
+ calendarPastScrollRangeInMonths = $[16];
2179
+ calendarRowHorizontalSpacing = $[17];
2180
+ calendarRowVerticalSpacing = $[18];
2181
+ calendarSpacing = $[19];
2182
+ calendarWeekHeaderHeight = $[20];
2183
+ flatListProps = $[21];
2184
+ getCalendarDayFormat = $[22];
2185
+ getCalendarMonthFormat = $[23];
2186
+ getCalendarWeekDayFormat = $[24];
2187
+ onCalendarDayPress = $[25];
2188
+ onEndReached = $[26];
2189
+ onStartReached = $[27];
2190
+ ref = $[28];
2191
+ renderItem = $[29];
2192
+ theme = $[30];
2193
+ }
2194
+ let t0;
2195
+ if ($[31] !== CalendarPressableComponent || $[32] !== calendarActiveDateRanges || $[33] !== calendarAdditionalHeight || $[34] !== calendarColorScheme || $[35] !== calendarDayHeight || $[36] !== calendarDisabledDateIds || $[37] !== calendarFirstDayOfWeek || $[38] !== calendarFormatLocale || $[39] !== calendarFutureScrollRangeInMonths || $[40] !== calendarInitialMonthId || $[41] !== calendarInitialScrollToActiveRange || $[42] !== calendarInstanceId || $[43] !== calendarMaxDateId || $[44] !== calendarMinDateId || $[45] !== calendarMonthHeaderHeight || $[46] !== calendarPastScrollRangeInMonths || $[47] !== calendarRowHorizontalSpacing || $[48] !== calendarRowVerticalSpacing || $[49] !== calendarSpacing || $[50] !== calendarWeekHeaderHeight || $[51] !== flatListProps || $[52] !== getCalendarDayFormat || $[53] !== getCalendarMonthFormat || $[54] !== getCalendarWeekDayFormat || $[55] !== onCalendarDayPress || $[56] !== onEndReached || $[57] !== onStartReached || $[58] !== ref || $[59] !== renderItem || $[60] !== theme) {
2196
+ t0 = /* @__PURE__ */ _jsx10(CalendarListInner, {
2197
+ CalendarPressableComponent,
2198
+ calendarActiveDateRanges,
2199
+ calendarAdditionalHeight,
2200
+ calendarColorScheme,
2201
+ calendarDayHeight,
2202
+ calendarDisabledDateIds,
2203
+ calendarFirstDayOfWeek,
2204
+ calendarFormatLocale,
2205
+ calendarFutureScrollRangeInMonths,
2206
+ calendarInitialMonthId,
2207
+ calendarInitialScrollToActiveRange,
2208
+ calendarInstanceId,
2209
+ calendarMaxDateId,
2210
+ calendarMinDateId,
2211
+ calendarMonthHeaderHeight,
2212
+ calendarPastScrollRangeInMonths,
2213
+ calendarRowHorizontalSpacing,
2214
+ calendarRowVerticalSpacing,
2215
+ calendarSpacing,
2216
+ calendarWeekHeaderHeight,
2217
+ flatListProps,
2218
+ getCalendarDayFormat,
2219
+ getCalendarMonthFormat,
2220
+ getCalendarWeekDayFormat,
2221
+ onCalendarDayPress,
2222
+ onEndReached,
2223
+ onStartReached,
2224
+ ref,
2225
+ renderItem,
2226
+ theme
2227
+ });
2228
+ $[31] = CalendarPressableComponent;
2229
+ $[32] = calendarActiveDateRanges;
2230
+ $[33] = calendarAdditionalHeight;
2231
+ $[34] = calendarColorScheme;
2232
+ $[35] = calendarDayHeight;
2233
+ $[36] = calendarDisabledDateIds;
2234
+ $[37] = calendarFirstDayOfWeek;
2235
+ $[38] = calendarFormatLocale;
2236
+ $[39] = calendarFutureScrollRangeInMonths;
2237
+ $[40] = calendarInitialMonthId;
2238
+ $[41] = calendarInitialScrollToActiveRange;
2239
+ $[42] = calendarInstanceId;
2240
+ $[43] = calendarMaxDateId;
2241
+ $[44] = calendarMinDateId;
2242
+ $[45] = calendarMonthHeaderHeight;
2243
+ $[46] = calendarPastScrollRangeInMonths;
2244
+ $[47] = calendarRowHorizontalSpacing;
2245
+ $[48] = calendarRowVerticalSpacing;
2246
+ $[49] = calendarSpacing;
2247
+ $[50] = calendarWeekHeaderHeight;
2248
+ $[51] = flatListProps;
2249
+ $[52] = getCalendarDayFormat;
2250
+ $[53] = getCalendarMonthFormat;
2251
+ $[54] = getCalendarWeekDayFormat;
2252
+ $[55] = onCalendarDayPress;
2253
+ $[56] = onEndReached;
2254
+ $[57] = onStartReached;
2255
+ $[58] = ref;
2256
+ $[59] = renderItem;
2257
+ $[60] = theme;
2258
+ $[61] = t0;
2259
+ } else {
2260
+ t0 = $[61];
2261
+ }
2262
+ return t0;
2263
+ }
2264
+ function CalendarListInner(t0) {
2265
+ const $ = _c12(85);
2266
+ const {
2267
+ ref,
2007
2268
  calendarInitialMonthId,
2008
2269
  calendarInitialScrollToActiveRange: t1,
2009
2270
  calendarPastScrollRangeInMonths: t2,
@@ -2015,42 +2276,12 @@ function CalendarList(t0) {
2015
2276
  calendarRowVerticalSpacing: t6,
2016
2277
  calendarMonthHeaderHeight: t7,
2017
2278
  calendarDayHeight: t8,
2018
- calendarWeekHeaderHeight: t9,
2019
- calendarAdditionalHeight: t10,
2279
+ calendarWeekHeaderHeight: calendarWeekHeaderHeightProp,
2280
+ calendarAdditionalHeight: t9,
2020
2281
  calendarColorScheme,
2021
2282
  theme,
2022
2283
  onEndReached,
2023
- onStartReached
2024
- } = _b, otherProps = __objRest(_b, [
2025
- "calendarInitialMonthId",
2026
- "calendarInitialScrollToActiveRange",
2027
- "calendarPastScrollRangeInMonths",
2028
- "calendarFutureScrollRangeInMonths",
2029
- "calendarFirstDayOfWeek",
2030
- "calendarFormatLocale",
2031
- "calendarSpacing",
2032
- "calendarRowHorizontalSpacing",
2033
- "calendarRowVerticalSpacing",
2034
- "calendarMonthHeaderHeight",
2035
- "calendarDayHeight",
2036
- "calendarWeekHeaderHeight",
2037
- "calendarAdditionalHeight",
2038
- "calendarColorScheme",
2039
- "theme",
2040
- "onEndReached",
2041
- "onStartReached"
2042
- ]);
2043
- const calendarInitialScrollToActiveRange = t1 === void 0 ? true : t1;
2044
- const calendarPastScrollRangeInMonths = t2 === void 0 ? 12 : t2;
2045
- const calendarFutureScrollRangeInMonths = t3 === void 0 ? 12 : t3;
2046
- const calendarFirstDayOfWeek = t4 === void 0 ? "sunday" : t4;
2047
- const calendarSpacing = t5 === void 0 ? 20 : t5;
2048
- const calendarRowVerticalSpacing = t6 === void 0 ? 8 : t6;
2049
- const calendarMonthHeaderHeight = t7 === void 0 ? 20 : t7;
2050
- const calendarDayHeight = t8 === void 0 ? 32 : t8;
2051
- const calendarWeekHeaderHeight = t9 === void 0 ? calendarDayHeight : t9;
2052
- const calendarAdditionalHeight = t10 === void 0 ? 0 : t10;
2053
- const _c14 = otherProps, {
2284
+ onStartReached,
2054
2285
  calendarActiveDateRanges,
2055
2286
  calendarDisabledDateIds,
2056
2287
  calendarInstanceId,
@@ -2060,127 +2291,158 @@ function CalendarList(t0) {
2060
2291
  getCalendarMonthFormat,
2061
2292
  getCalendarWeekDayFormat,
2062
2293
  onCalendarDayPress,
2063
- CalendarPressableComponent
2064
- } = _c14, flatListProps = __objRest(_c14, [
2065
- "calendarActiveDateRanges",
2066
- "calendarDisabledDateIds",
2067
- "calendarInstanceId",
2068
- "calendarMaxDateId",
2069
- "calendarMinDateId",
2070
- "getCalendarDayFormat",
2071
- "getCalendarMonthFormat",
2072
- "getCalendarWeekDayFormat",
2073
- "onCalendarDayPress",
2074
- "CalendarPressableComponent"
2075
- ]);
2076
- useEffect2(() => {
2077
- activeDateRangesStore.setRanges(calendarInstanceId != null ? calendarInstanceId : "legend-calendar-default-instance", calendarActiveDateRanges != null ? calendarActiveDateRanges : []);
2078
- }, [calendarActiveDateRanges, calendarInstanceId]);
2079
- const calendarProps = {
2080
- calendarColorScheme,
2081
- calendarDayHeight,
2082
- calendarDisabledDateIds,
2083
- calendarFirstDayOfWeek,
2084
- calendarFormatLocale,
2085
- calendarInstanceId,
2086
- calendarMaxDateId,
2087
- calendarMinDateId,
2088
- calendarMonthHeaderHeight,
2089
- calendarRowHorizontalSpacing,
2090
- calendarRowVerticalSpacing,
2091
- calendarWeekHeaderHeight,
2092
- getCalendarDayFormat,
2093
- getCalendarMonthFormat,
2094
- getCalendarWeekDayFormat,
2095
- onCalendarDayPress,
2096
- theme,
2097
- CalendarPressableComponent
2098
- };
2294
+ CalendarPressableComponent,
2295
+ renderItem: customRenderItem,
2296
+ flatListProps
2297
+ } = t0;
2298
+ const calendarInitialScrollToActiveRange = t1 === void 0 ? true : t1;
2299
+ const calendarPastScrollRangeInMonths = t2 === void 0 ? 12 : t2;
2300
+ const calendarFutureScrollRangeInMonths = t3 === void 0 ? 12 : t3;
2301
+ const calendarFirstDayOfWeek = t4 === void 0 ? "sunday" : t4;
2302
+ const calendarSpacing = t5 === void 0 ? 20 : t5;
2303
+ const calendarRowVerticalSpacing = t6 === void 0 ? 8 : t6;
2304
+ const calendarMonthHeaderHeight = t7 === void 0 ? 20 : t7;
2305
+ const calendarDayHeight = t8 === void 0 ? 32 : t8;
2306
+ const calendarAdditionalHeight = t9 === void 0 ? 0 : t9;
2307
+ let t10;
2308
+ let t11;
2309
+ if ($[0] !== calendarActiveDateRanges || $[1] !== calendarInstanceId) {
2310
+ t10 = () => {
2311
+ activeDateRangesStore.setRanges(calendarInstanceId != null ? calendarInstanceId : "legend-calendar-default-instance", calendarActiveDateRanges != null ? calendarActiveDateRanges : []);
2312
+ };
2313
+ t11 = [calendarActiveDateRanges, calendarInstanceId];
2314
+ $[0] = calendarActiveDateRanges;
2315
+ $[1] = calendarInstanceId;
2316
+ $[2] = t10;
2317
+ $[3] = t11;
2318
+ } else {
2319
+ t10 = $[2];
2320
+ t11 = $[3];
2321
+ }
2322
+ useEffect2(t10, t11);
2323
+ let t12;
2324
+ if ($[4] !== CalendarPressableComponent || $[5] !== calendarColorScheme || $[6] !== calendarDayHeight || $[7] !== calendarDisabledDateIds || $[8] !== calendarFirstDayOfWeek || $[9] !== calendarFormatLocale || $[10] !== calendarInstanceId || $[11] !== calendarMaxDateId || $[12] !== calendarMinDateId || $[13] !== calendarMonthHeaderHeight || $[14] !== calendarRowHorizontalSpacing || $[15] !== calendarRowVerticalSpacing || $[16] !== calendarWeekHeaderHeightProp || $[17] !== getCalendarDayFormat || $[18] !== getCalendarMonthFormat || $[19] !== getCalendarWeekDayFormat || $[20] !== onCalendarDayPress || $[21] !== theme) {
2325
+ t12 = buildCalendarConfig(calendarColorScheme, calendarDayHeight, calendarDisabledDateIds, calendarFirstDayOfWeek, calendarFormatLocale, calendarInstanceId, calendarMaxDateId, calendarMinDateId, calendarMonthHeaderHeight, calendarRowHorizontalSpacing, calendarRowVerticalSpacing, calendarWeekHeaderHeightProp, getCalendarDayFormat, getCalendarMonthFormat, getCalendarWeekDayFormat, onCalendarDayPress, theme, CalendarPressableComponent);
2326
+ $[4] = CalendarPressableComponent;
2327
+ $[5] = calendarColorScheme;
2328
+ $[6] = calendarDayHeight;
2329
+ $[7] = calendarDisabledDateIds;
2330
+ $[8] = calendarFirstDayOfWeek;
2331
+ $[9] = calendarFormatLocale;
2332
+ $[10] = calendarInstanceId;
2333
+ $[11] = calendarMaxDateId;
2334
+ $[12] = calendarMinDateId;
2335
+ $[13] = calendarMonthHeaderHeight;
2336
+ $[14] = calendarRowHorizontalSpacing;
2337
+ $[15] = calendarRowVerticalSpacing;
2338
+ $[16] = calendarWeekHeaderHeightProp;
2339
+ $[17] = getCalendarDayFormat;
2340
+ $[18] = getCalendarMonthFormat;
2341
+ $[19] = getCalendarWeekDayFormat;
2342
+ $[20] = onCalendarDayPress;
2343
+ $[21] = theme;
2344
+ $[22] = t12;
2345
+ } else {
2346
+ t12 = $[22];
2347
+ }
2348
+ const calendarProps = t12;
2349
+ const calendarWeekHeaderHeight = calendarWeekHeaderHeightProp != null ? calendarWeekHeaderHeightProp : calendarDayHeight;
2350
+ let t13;
2351
+ if ($[23] !== calendarFirstDayOfWeek || $[24] !== calendarFutureScrollRangeInMonths || $[25] !== calendarInitialMonthId || $[26] !== calendarMaxDateId || $[27] !== calendarMinDateId || $[28] !== calendarPastScrollRangeInMonths) {
2352
+ t13 = {
2353
+ calendarFirstDayOfWeek,
2354
+ calendarFutureScrollRangeInMonths,
2355
+ calendarPastScrollRangeInMonths,
2356
+ calendarInitialMonthId,
2357
+ calendarMaxDateId,
2358
+ calendarMinDateId
2359
+ };
2360
+ $[23] = calendarFirstDayOfWeek;
2361
+ $[24] = calendarFutureScrollRangeInMonths;
2362
+ $[25] = calendarInitialMonthId;
2363
+ $[26] = calendarMaxDateId;
2364
+ $[27] = calendarMinDateId;
2365
+ $[28] = calendarPastScrollRangeInMonths;
2366
+ $[29] = t13;
2367
+ } else {
2368
+ t13 = $[29];
2369
+ }
2099
2370
  const {
2100
2371
  initialMonthIndex,
2101
2372
  monthList,
2102
2373
  appendMonths,
2103
2374
  prependMonths,
2104
2375
  addMissingMonths
2105
- } = useCalendarList({
2106
- calendarFirstDayOfWeek,
2107
- calendarFutureScrollRangeInMonths,
2108
- calendarPastScrollRangeInMonths,
2109
- calendarInitialMonthId,
2110
- calendarMaxDateId,
2111
- calendarMinDateId
2112
- });
2113
- let computedInitialScrollIndex = initialMonthIndex;
2114
- if (calendarInitialScrollToActiveRange && calendarActiveDateRanges) {
2115
- const firstRange = calendarActiveDateRanges[0];
2116
- if (firstRange == null ? void 0 : firstRange.startId) {
2117
- let t112;
2118
- if ($[0] !== firstRange.startId) {
2119
- const startDate = fromDateId(firstRange.startId);
2120
- t112 = toDateId(startOfMonth(startDate));
2121
- $[0] = firstRange.startId;
2122
- $[1] = t112;
2123
- } else {
2124
- t112 = $[1];
2125
- }
2126
- const monthId = t112;
2127
- let t122;
2128
- if ($[2] !== monthId || $[3] !== monthList) {
2129
- let t132;
2130
- if ($[5] !== monthId) {
2131
- t132 = (month) => month.id === monthId;
2132
- $[5] = monthId;
2133
- $[6] = t132;
2134
- } else {
2135
- t132 = $[6];
2376
+ } = useCalendarList(t13);
2377
+ let t14;
2378
+ if ($[30] !== calendarActiveDateRanges || $[31] !== calendarInitialScrollToActiveRange || $[32] !== initialMonthIndex || $[33] !== monthList) {
2379
+ t14 = () => {
2380
+ if (calendarInitialScrollToActiveRange && calendarActiveDateRanges) {
2381
+ const firstRange = calendarActiveDateRanges[0];
2382
+ if (firstRange == null ? void 0 : firstRange.startId) {
2383
+ const startDate = fromDateId(firstRange.startId);
2384
+ const monthId = toDateId(startOfMonth(startDate));
2385
+ const monthIndex = monthList.findIndex((month) => month.id === monthId);
2386
+ if (monthIndex !== -1) {
2387
+ return monthIndex;
2388
+ }
2136
2389
  }
2137
- t122 = monthList.findIndex(t132);
2138
- $[2] = monthId;
2139
- $[3] = monthList;
2140
- $[4] = t122;
2141
- } else {
2142
- t122 = $[4];
2143
- }
2144
- const monthIndex = t122;
2145
- if (monthIndex !== -1) {
2146
- computedInitialScrollIndex = monthIndex;
2147
2390
  }
2148
- }
2391
+ return initialMonthIndex;
2392
+ };
2393
+ $[30] = calendarActiveDateRanges;
2394
+ $[31] = calendarInitialScrollToActiveRange;
2395
+ $[32] = initialMonthIndex;
2396
+ $[33] = monthList;
2397
+ $[34] = t14;
2398
+ } else {
2399
+ t14 = $[34];
2149
2400
  }
2150
- const monthListWithCalendarProps = monthList.map((month_0) => __spreadProps(__spreadValues({}, month_0), {
2151
- calendarProps
2152
- }));
2153
- let t11;
2154
- if ($[7] !== appendMonths || $[8] !== calendarFutureScrollRangeInMonths || $[9] !== onEndReached) {
2155
- t11 = (info) => {
2401
+ const [computedInitialScrollIndex] = useState2(t14);
2402
+ let t15;
2403
+ if ($[35] !== calendarProps || $[36] !== customRenderItem || $[37] !== monthList) {
2404
+ t15 = customRenderItem ? monthList.map((month_0) => __spreadProps(__spreadValues({}, month_0), {
2405
+ calendarProps
2406
+ })) : monthList;
2407
+ $[35] = calendarProps;
2408
+ $[36] = customRenderItem;
2409
+ $[37] = monthList;
2410
+ $[38] = t15;
2411
+ } else {
2412
+ t15 = $[38];
2413
+ }
2414
+ const listData = t15;
2415
+ let t16;
2416
+ if ($[39] !== appendMonths || $[40] !== calendarFutureScrollRangeInMonths || $[41] !== onEndReached) {
2417
+ t16 = (info) => {
2156
2418
  appendMonths(calendarFutureScrollRangeInMonths);
2157
2419
  onEndReached == null ? void 0 : onEndReached(info);
2158
2420
  };
2159
- $[7] = appendMonths;
2160
- $[8] = calendarFutureScrollRangeInMonths;
2161
- $[9] = onEndReached;
2162
- $[10] = t11;
2421
+ $[39] = appendMonths;
2422
+ $[40] = calendarFutureScrollRangeInMonths;
2423
+ $[41] = onEndReached;
2424
+ $[42] = t16;
2163
2425
  } else {
2164
- t11 = $[10];
2426
+ t16 = $[42];
2165
2427
  }
2166
- const handleOnEndReached = t11;
2167
- let t12;
2168
- if ($[11] !== calendarPastScrollRangeInMonths || $[12] !== onStartReached || $[13] !== prependMonths) {
2169
- t12 = (info_0) => {
2428
+ const handleOnEndReached = t16;
2429
+ let t17;
2430
+ if ($[43] !== calendarPastScrollRangeInMonths || $[44] !== onStartReached || $[45] !== prependMonths) {
2431
+ t17 = (info_0) => {
2170
2432
  prependMonths(calendarPastScrollRangeInMonths);
2171
2433
  onStartReached == null ? void 0 : onStartReached(info_0);
2172
2434
  };
2173
- $[11] = calendarPastScrollRangeInMonths;
2174
- $[12] = onStartReached;
2175
- $[13] = prependMonths;
2176
- $[14] = t12;
2435
+ $[43] = calendarPastScrollRangeInMonths;
2436
+ $[44] = onStartReached;
2437
+ $[45] = prependMonths;
2438
+ $[46] = t17;
2177
2439
  } else {
2178
- t12 = $[14];
2440
+ t17 = $[46];
2179
2441
  }
2180
- const handleOnStartReached = t12;
2181
- let t13;
2182
- if ($[15] !== addMissingMonths || $[16] !== calendarAdditionalHeight || $[17] !== calendarDayHeight || $[18] !== calendarMonthHeaderHeight || $[19] !== calendarRowVerticalSpacing || $[20] !== calendarSpacing || $[21] !== calendarWeekHeaderHeight || $[22] !== monthList) {
2183
- t13 = (date) => {
2442
+ const handleOnStartReached = t17;
2443
+ let t18;
2444
+ if ($[47] !== addMissingMonths || $[48] !== calendarAdditionalHeight || $[49] !== calendarDayHeight || $[50] !== calendarMonthHeaderHeight || $[51] !== calendarRowVerticalSpacing || $[52] !== calendarSpacing || $[53] !== calendarWeekHeaderHeight || $[54] !== monthList) {
2445
+ t18 = (date) => {
2184
2446
  const monthId_0 = toDateId(startOfMonth(date));
2185
2447
  let baseMonthList = monthList;
2186
2448
  let index = baseMonthList.findIndex((month_1) => month_1.id === monthId_0);
@@ -2201,88 +2463,88 @@ function CalendarList(t0) {
2201
2463
  return acc + currentHeight;
2202
2464
  }, 0);
2203
2465
  };
2204
- $[15] = addMissingMonths;
2205
- $[16] = calendarAdditionalHeight;
2206
- $[17] = calendarDayHeight;
2207
- $[18] = calendarMonthHeaderHeight;
2208
- $[19] = calendarRowVerticalSpacing;
2209
- $[20] = calendarSpacing;
2210
- $[21] = calendarWeekHeaderHeight;
2211
- $[22] = monthList;
2212
- $[23] = t13;
2213
- } else {
2214
- t13 = $[23];
2215
- }
2216
- const getScrollOffsetForMonth = t13;
2466
+ $[47] = addMissingMonths;
2467
+ $[48] = calendarAdditionalHeight;
2468
+ $[49] = calendarDayHeight;
2469
+ $[50] = calendarMonthHeaderHeight;
2470
+ $[51] = calendarRowVerticalSpacing;
2471
+ $[52] = calendarSpacing;
2472
+ $[53] = calendarWeekHeaderHeight;
2473
+ $[54] = monthList;
2474
+ $[55] = t18;
2475
+ } else {
2476
+ t18 = $[55];
2477
+ }
2478
+ const getScrollOffsetForMonth = t18;
2217
2479
  const legendListRef = useRef(null);
2218
- let t14;
2219
- if ($[24] !== calendarDayHeight || $[25] !== calendarFirstDayOfWeek || $[26] !== calendarRowVerticalSpacing || $[27] !== calendarWeekHeaderHeight || $[28] !== getScrollOffsetForMonth) {
2220
- t14 = () => ({
2221
- scrollToMonth(date_0, animated, t152) {
2480
+ let t19;
2481
+ if ($[56] !== calendarDayHeight || $[57] !== calendarFirstDayOfWeek || $[58] !== calendarRowVerticalSpacing || $[59] !== calendarWeekHeaderHeight || $[60] !== getScrollOffsetForMonth) {
2482
+ t19 = () => ({
2483
+ scrollToMonth(date_0, animated, t202) {
2222
2484
  const {
2223
- additionalOffset: t162
2224
- } = t152 === void 0 ? {
2485
+ additionalOffset: t212
2486
+ } = t202 === void 0 ? {
2225
2487
  additionalOffset: 0
2226
- } : t152;
2227
- const additionalOffset = t162 === void 0 ? 0 : t162;
2488
+ } : t202;
2489
+ const additionalOffset = t212 === void 0 ? 0 : t212;
2228
2490
  setTimeout(() => {
2229
- var _a2;
2230
- (_a2 = legendListRef.current) == null ? void 0 : _a2.scrollToOffset({
2491
+ var _a;
2492
+ (_a = legendListRef.current) == null ? void 0 : _a.scrollToOffset({
2231
2493
  offset: getScrollOffsetForMonth(date_0) + additionalOffset,
2232
2494
  animated
2233
2495
  });
2234
2496
  }, 0);
2235
2497
  },
2236
- scrollToDate(date_1, animated_0, t172) {
2237
- var _a2;
2498
+ scrollToDate(date_1, animated_0, t222) {
2499
+ var _a;
2238
2500
  const {
2239
- additionalOffset: t182
2240
- } = t172 === void 0 ? {
2501
+ additionalOffset: t232
2502
+ } = t222 === void 0 ? {
2241
2503
  additionalOffset: 0
2242
- } : t172;
2243
- const additionalOffset_0 = t182 === void 0 ? 0 : t182;
2504
+ } : t222;
2505
+ const additionalOffset_0 = t232 === void 0 ? 0 : t232;
2244
2506
  const currentMonthOffset = getScrollOffsetForMonth(date_1);
2245
2507
  const weekOfMonthIndex = getWeekOfMonth(date_1, calendarFirstDayOfWeek);
2246
2508
  const rowHeight = calendarDayHeight + calendarRowVerticalSpacing;
2247
2509
  let weekOffset = calendarWeekHeaderHeight + rowHeight * weekOfMonthIndex;
2248
2510
  weekOffset = weekOffset - calendarRowVerticalSpacing;
2249
- (_a2 = legendListRef.current) == null ? void 0 : _a2.scrollToOffset({
2511
+ (_a = legendListRef.current) == null ? void 0 : _a.scrollToOffset({
2250
2512
  offset: currentMonthOffset + weekOffset + additionalOffset_0,
2251
2513
  animated: animated_0
2252
2514
  });
2253
2515
  },
2254
2516
  scrollToOffset(offset, animated_1) {
2255
- var _a2;
2256
- (_a2 = legendListRef.current) == null ? void 0 : _a2.scrollToOffset({
2517
+ var _a;
2518
+ (_a = legendListRef.current) == null ? void 0 : _a.scrollToOffset({
2257
2519
  offset,
2258
2520
  animated: animated_1
2259
2521
  });
2260
2522
  }
2261
2523
  });
2262
- $[24] = calendarDayHeight;
2263
- $[25] = calendarFirstDayOfWeek;
2264
- $[26] = calendarRowVerticalSpacing;
2265
- $[27] = calendarWeekHeaderHeight;
2266
- $[28] = getScrollOffsetForMonth;
2267
- $[29] = t14;
2268
- } else {
2269
- t14 = $[29];
2270
- }
2271
- useImperativeHandle(ref, t14);
2272
- let t15;
2273
- if ($[30] !== calendarSpacing) {
2274
- t15 = {
2524
+ $[56] = calendarDayHeight;
2525
+ $[57] = calendarFirstDayOfWeek;
2526
+ $[58] = calendarRowVerticalSpacing;
2527
+ $[59] = calendarWeekHeaderHeight;
2528
+ $[60] = getScrollOffsetForMonth;
2529
+ $[61] = t19;
2530
+ } else {
2531
+ t19 = $[61];
2532
+ }
2533
+ useImperativeHandle(ref, t19);
2534
+ let t20;
2535
+ if ($[62] !== calendarSpacing) {
2536
+ t20 = {
2275
2537
  paddingBottom: calendarSpacing
2276
2538
  };
2277
- $[30] = calendarSpacing;
2278
- $[31] = t15;
2539
+ $[62] = calendarSpacing;
2540
+ $[63] = t20;
2279
2541
  } else {
2280
- t15 = $[31];
2542
+ t20 = $[63];
2281
2543
  }
2282
- const calendarContainerStyle = t15;
2283
- let t16;
2284
- if ($[32] !== calendarAdditionalHeight || $[33] !== calendarDayHeight || $[34] !== calendarMonthHeaderHeight || $[35] !== calendarRowVerticalSpacing || $[36] !== calendarSpacing || $[37] !== calendarWeekHeaderHeight) {
2285
- t16 = (item) => getHeightForMonth({
2544
+ const calendarContainerStyle = t20;
2545
+ let t21;
2546
+ if ($[64] !== calendarAdditionalHeight || $[65] !== calendarDayHeight || $[66] !== calendarMonthHeaderHeight || $[67] !== calendarRowVerticalSpacing || $[68] !== calendarSpacing || $[69] !== calendarWeekHeaderHeight) {
2547
+ t21 = (item) => getHeightForMonth({
2286
2548
  calendarMonth: item,
2287
2549
  calendarSpacing,
2288
2550
  calendarDayHeight,
@@ -2291,41 +2553,43 @@ function CalendarList(t0) {
2291
2553
  calendarWeekHeaderHeight,
2292
2554
  calendarAdditionalHeight
2293
2555
  });
2294
- $[32] = calendarAdditionalHeight;
2295
- $[33] = calendarDayHeight;
2296
- $[34] = calendarMonthHeaderHeight;
2297
- $[35] = calendarRowVerticalSpacing;
2298
- $[36] = calendarSpacing;
2299
- $[37] = calendarWeekHeaderHeight;
2300
- $[38] = t16;
2301
- } else {
2302
- t16 = $[38];
2303
- }
2304
- const getFixedItemSize = t16;
2305
- let t17;
2306
- if ($[39] !== calendarContainerStyle) {
2307
- t17 = (t182) => {
2556
+ $[64] = calendarAdditionalHeight;
2557
+ $[65] = calendarDayHeight;
2558
+ $[66] = calendarMonthHeaderHeight;
2559
+ $[67] = calendarRowVerticalSpacing;
2560
+ $[68] = calendarSpacing;
2561
+ $[69] = calendarWeekHeaderHeight;
2562
+ $[70] = t21;
2563
+ } else {
2564
+ t21 = $[70];
2565
+ }
2566
+ const getFixedItemSize = t21;
2567
+ let t22;
2568
+ if ($[71] !== calendarContainerStyle || $[72] !== onCalendarDayPress) {
2569
+ t22 = (t232) => {
2308
2570
  const {
2309
2571
  item: item_0
2310
- } = t182;
2572
+ } = t232;
2311
2573
  return /* @__PURE__ */ _jsx10(View7, {
2312
2574
  style: calendarContainerStyle,
2313
- children: /* @__PURE__ */ _jsx10(Calendar, __spreadValues({
2314
- calendarMonthId: item_0.id
2315
- }, item_0.calendarProps))
2575
+ children: /* @__PURE__ */ _jsx10(Calendar, {
2576
+ calendarMonthId: item_0.id,
2577
+ onCalendarDayPress
2578
+ })
2316
2579
  });
2317
2580
  };
2318
- $[39] = calendarContainerStyle;
2319
- $[40] = t17;
2320
- } else {
2321
- t17 = $[40];
2322
- }
2323
- const handleRenderItem = t17;
2324
- const handleViewableItemsChanged = _temp;
2325
- let t18;
2326
- if ($[41] !== computedInitialScrollIndex || $[42] !== flatListProps || $[43] !== getFixedItemSize || $[44] !== handleOnEndReached || $[45] !== handleOnStartReached || $[46] !== handleRenderItem || $[47] !== monthListWithCalendarProps) {
2327
- t18 = /* @__PURE__ */ _jsx10(LegendList, __spreadValues({
2328
- data: monthListWithCalendarProps,
2581
+ $[71] = calendarContainerStyle;
2582
+ $[72] = onCalendarDayPress;
2583
+ $[73] = t22;
2584
+ } else {
2585
+ t22 = $[73];
2586
+ }
2587
+ const handleRenderItem = t22;
2588
+ const t23 = customRenderItem != null ? customRenderItem : handleRenderItem;
2589
+ let t24;
2590
+ if ($[74] !== computedInitialScrollIndex || $[75] !== flatListProps || $[76] !== getFixedItemSize || $[77] !== handleOnEndReached || $[78] !== handleOnStartReached || $[79] !== listData || $[80] !== t23) {
2591
+ t24 = /* @__PURE__ */ _jsx10(LegendList, __spreadValues({
2592
+ data: listData,
2329
2593
  drawDistance: 560,
2330
2594
  estimatedItemSize: 273,
2331
2595
  getFixedItemSize,
@@ -2334,27 +2598,36 @@ function CalendarList(t0) {
2334
2598
  maintainVisibleContentPosition: true,
2335
2599
  onEndReached: handleOnEndReached,
2336
2600
  onStartReached: handleOnStartReached,
2337
- onViewableItemsChanged: handleViewableItemsChanged,
2338
2601
  recycleItems: true,
2339
2602
  ref: legendListRef,
2340
- renderItem: handleRenderItem,
2603
+ renderItem: t23,
2341
2604
  showsVerticalScrollIndicator: false,
2342
2605
  style: styles8.container
2343
2606
  }, flatListProps));
2344
- $[41] = computedInitialScrollIndex;
2345
- $[42] = flatListProps;
2346
- $[43] = getFixedItemSize;
2347
- $[44] = handleOnEndReached;
2348
- $[45] = handleOnStartReached;
2349
- $[46] = handleRenderItem;
2350
- $[47] = monthListWithCalendarProps;
2351
- $[48] = t18;
2352
- } else {
2353
- t18 = $[48];
2354
- }
2355
- return t18;
2356
- }
2357
- function _temp() {
2607
+ $[74] = computedInitialScrollIndex;
2608
+ $[75] = flatListProps;
2609
+ $[76] = getFixedItemSize;
2610
+ $[77] = handleOnEndReached;
2611
+ $[78] = handleOnStartReached;
2612
+ $[79] = listData;
2613
+ $[80] = t23;
2614
+ $[81] = t24;
2615
+ } else {
2616
+ t24 = $[81];
2617
+ }
2618
+ let t25;
2619
+ if ($[82] !== calendarProps || $[83] !== t24) {
2620
+ t25 = /* @__PURE__ */ _jsx10(CalendarListConfigProvider, {
2621
+ value: calendarProps,
2622
+ children: t24
2623
+ });
2624
+ $[82] = calendarProps;
2625
+ $[83] = t24;
2626
+ $[84] = t25;
2627
+ } else {
2628
+ t25 = $[84];
2629
+ }
2630
+ return t25;
2358
2631
  }
2359
2632
  var styles8 = StyleSheet8.create({
2360
2633
  container: {
@@ -2383,7 +2656,7 @@ var Calendar3 = CalendarWithNamespace;
2383
2656
 
2384
2657
  // src/hooks/useDateRange.ts
2385
2658
  import { c as _c13 } from "react/compiler-runtime";
2386
- import { useState as useState2 } from "react";
2659
+ import { useState as useState3 } from "react";
2387
2660
  var useDateRange = (t0) => {
2388
2661
  const $ = _c13(10);
2389
2662
  let t1;
@@ -2398,7 +2671,7 @@ var useDateRange = (t0) => {
2398
2671
  t1 = $[1];
2399
2672
  }
2400
2673
  const initialDateRange = t1;
2401
- const [dateRange, setDateRange] = useState2(initialDateRange);
2674
+ const [dateRange, setDateRange] = useState3(initialDateRange);
2402
2675
  let t2;
2403
2676
  if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
2404
2677
  t2 = (dateId) => {
@@ -2490,6 +2763,7 @@ export {
2490
2763
  toDateId,
2491
2764
  useCalendar,
2492
2765
  useCalendarList,
2766
+ useCalendarListConfig,
2493
2767
  useDateRange,
2494
2768
  useOptimizedDayMetadata
2495
2769
  };