react-native-resource-calendar 1.1.14 → 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.mjs CHANGED
@@ -914,7 +914,8 @@ var DisabledBlockComponent = ({
914
914
  layout,
915
915
  disabledBlock,
916
916
  hourHeight,
917
- onDisabledBlockPress
917
+ onDisabledBlockPress,
918
+ tapThrough
918
919
  }) => {
919
920
  const dynamicStyle = {
920
921
  backgroundColor: "#d3d3d3",
@@ -923,13 +924,17 @@ var DisabledBlockComponent = ({
923
924
  height: height < hourHeight / 4 ? height : height - 4,
924
925
  width: layout.widthPx - 3,
925
926
  borderWidth: 1,
926
- borderColor: "rgba(0,0,0,0.12)"
927
+ borderColor: "rgba(0,0,0,0.12)",
928
+ opacity: tapThrough ? 0.5 : 1,
929
+ // Let touches fall through to the grid blocks beneath when tap-through.
930
+ pointerEvents: tapThrough ? "none" : "auto"
927
931
  };
928
932
  const titleFace = useResolvedFont({ fontWeight: "600" });
929
933
  return /* @__PURE__ */ React19__default.createElement(
930
934
  TouchableOpacity,
931
935
  {
932
936
  style: [styles4.event, dynamicStyle],
937
+ disabled: tapThrough,
933
938
  onPress: () => {
934
939
  onDisabledBlockPress && onDisabledBlockPress(disabledBlock);
935
940
  }
@@ -966,6 +971,7 @@ var DisabledBlocks = React19__default.memo(({
966
971
  APPOINTMENT_BLOCK_WIDTH,
967
972
  hourHeight,
968
973
  onDisabledBlockPress,
974
+ tapThrough,
969
975
  date: dateProp
970
976
  }) => {
971
977
  const { useDisabledBlocksFor: useDisabledBlocksFor2, useGetDate: useGetDate2 } = useCalendarBinding();
@@ -986,7 +992,8 @@ var DisabledBlocks = React19__default.memo(({
986
992
  top: scalePosition(disabledBlock.from, hourHeight),
987
993
  height: scalePosition(disabledBlock.to - disabledBlock.from, hourHeight),
988
994
  layout: layoutMap.get(key),
989
- onDisabledBlockPress
995
+ onDisabledBlockPress,
996
+ tapThrough
990
997
  }
991
998
  );
992
999
  }
@@ -1027,7 +1034,10 @@ var EventBlock = React19__default.memo(({
1027
1034
  zIndex: frame.zIndex,
1028
1035
  opacity: anyEventSelected || disabled ? 0.5 : 1,
1029
1036
  borderWidth: selected ? 2 : 1,
1030
- borderColor: selected ? "#4d959c" : "rgba(0,0,0,0.12)"
1037
+ borderColor: selected ? "#4d959c" : "rgba(0,0,0,0.12)",
1038
+ // When disabled, let touches fall through to the grid blocks beneath
1039
+ // (e.g. "select a time" mode) instead of swallowing them.
1040
+ pointerEvents: disabled ? "none" : "auto"
1031
1041
  };
1032
1042
  const resolved = typeof styleOverrides === "function" ? styleOverrides(event) ?? {} : styleOverrides ?? {};
1033
1043
  const handlePress = useCallback(() => onPress?.(event), [onPress, event]);
@@ -1789,7 +1799,8 @@ var CalendarInner = (props) => {
1789
1799
  date: dayDate,
1790
1800
  APPOINTMENT_BLOCK_WIDTH,
1791
1801
  hourHeight,
1792
- onDisabledBlockPress: stableOnDisabledBlockPress
1802
+ onDisabledBlockPress: stableOnDisabledBlockPress,
1803
+ tapThrough: props.disabledBlocksTapThrough
1793
1804
  }
1794
1805
  ), /* @__PURE__ */ React19__default.createElement(
1795
1806
  EventBlocks_default,
@@ -1820,7 +1831,8 @@ var CalendarInner = (props) => {
1820
1831
  internalStableOnLongPress,
1821
1832
  stableOnDisabledBlockPress,
1822
1833
  stableHandleBlockPress,
1823
- stableHandleBlockLongPress
1834
+ stableHandleBlockLongPress,
1835
+ props.disabledBlocksTapThrough
1824
1836
  ]);
1825
1837
  const listExtraData = useMemo(
1826
1838
  () => ({
@@ -1830,7 +1842,8 @@ var CalendarInner = (props) => {
1830
1842
  stacked: overLappingLayoutMode === "stacked",
1831
1843
  isEventSelectedStable,
1832
1844
  isEventDisabledStable,
1833
- effectiveRenderer
1845
+ effectiveRenderer,
1846
+ disabledBlocksTapThrough: props.disabledBlocksTapThrough
1834
1847
  }),
1835
1848
  [
1836
1849
  numberOfColumns,
@@ -1839,7 +1852,8 @@ var CalendarInner = (props) => {
1839
1852
  overLappingLayoutMode,
1840
1853
  isEventSelectedStable,
1841
1854
  isEventDisabledStable,
1842
- effectiveRenderer
1855
+ effectiveRenderer,
1856
+ props.disabledBlocksTapThrough
1843
1857
  ]
1844
1858
  );
1845
1859
  return /* @__PURE__ */ React19__default.createElement(React19__default.Fragment, null, /* @__PURE__ */ React19__default.createElement(StoreFeeder, { resources, store: binding, baseDate: date }), /* @__PURE__ */ React19__default.createElement(View, { style: { flex: 1 } }, !isMultiDay ? /* @__PURE__ */ React19__default.createElement(View, { key: `header-${numberOfColumns}-${width}` }, /* @__PURE__ */ React19__default.createElement(