react-native-resource-calendar 1.1.15 → 1.1.16

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.d.mts CHANGED
@@ -95,6 +95,7 @@ interface CalendarProps {
95
95
  eventStyleOverrides?: StyleOverrides | ((event: Event) => StyleOverrides | undefined);
96
96
  isEventSelected?: FlagFn;
97
97
  isEventDisabled?: FlagFn;
98
+ disabledBlocksTapThrough?: boolean;
98
99
  theme?: CalendarTheme;
99
100
  overLappingLayoutMode?: LayoutMode;
100
101
  mode?: CalendarMode;
package/dist/index.d.ts CHANGED
@@ -95,6 +95,7 @@ interface CalendarProps {
95
95
  eventStyleOverrides?: StyleOverrides | ((event: Event) => StyleOverrides | undefined);
96
96
  isEventSelected?: FlagFn;
97
97
  isEventDisabled?: FlagFn;
98
+ disabledBlocksTapThrough?: boolean;
98
99
  theme?: CalendarTheme;
99
100
  overLappingLayoutMode?: LayoutMode;
100
101
  mode?: CalendarMode;
package/dist/index.js CHANGED
@@ -939,7 +939,8 @@ var DisabledBlockComponent = ({
939
939
  layout,
940
940
  disabledBlock,
941
941
  hourHeight,
942
- onDisabledBlockPress
942
+ onDisabledBlockPress,
943
+ tapThrough
943
944
  }) => {
944
945
  const dynamicStyle = {
945
946
  backgroundColor: "#d3d3d3",
@@ -948,13 +949,17 @@ var DisabledBlockComponent = ({
948
949
  height: height < hourHeight / 4 ? height : height - 4,
949
950
  width: layout.widthPx - 3,
950
951
  borderWidth: 1,
951
- borderColor: "rgba(0,0,0,0.12)"
952
+ borderColor: "rgba(0,0,0,0.12)",
953
+ opacity: tapThrough ? 0.5 : 1,
954
+ // Let touches fall through to the grid blocks beneath when tap-through.
955
+ pointerEvents: tapThrough ? "none" : "auto"
952
956
  };
953
957
  const titleFace = useResolvedFont({ fontWeight: "600" });
954
958
  return /* @__PURE__ */ React19__namespace.default.createElement(
955
959
  reactNative.TouchableOpacity,
956
960
  {
957
961
  style: [styles4.event, dynamicStyle],
962
+ disabled: tapThrough,
958
963
  onPress: () => {
959
964
  onDisabledBlockPress && onDisabledBlockPress(disabledBlock);
960
965
  }
@@ -991,6 +996,7 @@ var DisabledBlocks = React19__namespace.default.memo(({
991
996
  APPOINTMENT_BLOCK_WIDTH,
992
997
  hourHeight,
993
998
  onDisabledBlockPress,
999
+ tapThrough,
994
1000
  date: dateProp
995
1001
  }) => {
996
1002
  const { useDisabledBlocksFor: useDisabledBlocksFor2, useGetDate: useGetDate2 } = useCalendarBinding();
@@ -1011,7 +1017,8 @@ var DisabledBlocks = React19__namespace.default.memo(({
1011
1017
  top: scalePosition(disabledBlock.from, hourHeight),
1012
1018
  height: scalePosition(disabledBlock.to - disabledBlock.from, hourHeight),
1013
1019
  layout: layoutMap.get(key),
1014
- onDisabledBlockPress
1020
+ onDisabledBlockPress,
1021
+ tapThrough
1015
1022
  }
1016
1023
  );
1017
1024
  }
@@ -1817,7 +1824,8 @@ var CalendarInner = (props) => {
1817
1824
  date: dayDate,
1818
1825
  APPOINTMENT_BLOCK_WIDTH,
1819
1826
  hourHeight,
1820
- onDisabledBlockPress: stableOnDisabledBlockPress
1827
+ onDisabledBlockPress: stableOnDisabledBlockPress,
1828
+ tapThrough: props.disabledBlocksTapThrough
1821
1829
  }
1822
1830
  ), /* @__PURE__ */ React19__namespace.default.createElement(
1823
1831
  EventBlocks_default,
@@ -1848,7 +1856,8 @@ var CalendarInner = (props) => {
1848
1856
  internalStableOnLongPress,
1849
1857
  stableOnDisabledBlockPress,
1850
1858
  stableHandleBlockPress,
1851
- stableHandleBlockLongPress
1859
+ stableHandleBlockLongPress,
1860
+ props.disabledBlocksTapThrough
1852
1861
  ]);
1853
1862
  const listExtraData = React19.useMemo(
1854
1863
  () => ({
@@ -1858,7 +1867,8 @@ var CalendarInner = (props) => {
1858
1867
  stacked: overLappingLayoutMode === "stacked",
1859
1868
  isEventSelectedStable,
1860
1869
  isEventDisabledStable,
1861
- effectiveRenderer
1870
+ effectiveRenderer,
1871
+ disabledBlocksTapThrough: props.disabledBlocksTapThrough
1862
1872
  }),
1863
1873
  [
1864
1874
  numberOfColumns,
@@ -1867,7 +1877,8 @@ var CalendarInner = (props) => {
1867
1877
  overLappingLayoutMode,
1868
1878
  isEventSelectedStable,
1869
1879
  isEventDisabledStable,
1870
- effectiveRenderer
1880
+ effectiveRenderer,
1881
+ props.disabledBlocksTapThrough
1871
1882
  ]
1872
1883
  );
1873
1884
  return /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, /* @__PURE__ */ React19__namespace.default.createElement(StoreFeeder, { resources, store: binding, baseDate: date }), /* @__PURE__ */ React19__namespace.default.createElement(reactNative.View, { style: { flex: 1 } }, !isMultiDay ? /* @__PURE__ */ React19__namespace.default.createElement(reactNative.View, { key: `header-${numberOfColumns}-${width}` }, /* @__PURE__ */ React19__namespace.default.createElement(