react-native-resource-calendar 1.0.11 → 1.0.12
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 +3 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1267,7 +1267,7 @@ var EventBlocks_default = EventBlocks;
|
|
|
1267
1267
|
var DaysComponent = ({ onResourcePress, activeResourceId, mode, date, APPOINTMENT_BLOCK_WIDTH }) => {
|
|
1268
1268
|
const { useResourceById: useResourceById2 } = useCalendarBinding();
|
|
1269
1269
|
const resource = useResourceById2(activeResourceId);
|
|
1270
|
-
|
|
1270
|
+
useResolvedFont({ fontWeight: "700" });
|
|
1271
1271
|
const subTitleFace = useResolvedFont({ fontWeight: "600" });
|
|
1272
1272
|
const isMultiDay = mode !== "day";
|
|
1273
1273
|
const visibleDayCount = isMultiDay ? mode === "week" ? 7 : 3 : 1;
|
|
@@ -1287,18 +1287,6 @@ var DaysComponent = ({ onResourcePress, activeResourceId, mode, date, APPOINTMEN
|
|
|
1287
1287
|
fontSize: 16,
|
|
1288
1288
|
image: resource?.avatar
|
|
1289
1289
|
}
|
|
1290
|
-
), /* @__PURE__ */ React19__namespace.createElement(
|
|
1291
|
-
reactNative.Text,
|
|
1292
|
-
{
|
|
1293
|
-
style: {
|
|
1294
|
-
fontSize: 14,
|
|
1295
|
-
fontFamily: titleFace,
|
|
1296
|
-
fontWeight: "700"
|
|
1297
|
-
},
|
|
1298
|
-
numberOfLines: 1,
|
|
1299
|
-
allowFontScaling: false
|
|
1300
|
-
},
|
|
1301
|
-
resource?.name
|
|
1302
1290
|
)), /* @__PURE__ */ React19__namespace.createElement(Row_default, { style: { flex: 1 } }, days.map((d, i) => {
|
|
1303
1291
|
const selected = dateFns.isSameDay(d, /* @__PURE__ */ new Date());
|
|
1304
1292
|
return /* @__PURE__ */ React19__namespace.createElement(
|
|
@@ -1694,7 +1682,8 @@ var CalendarInner = (props) => {
|
|
|
1694
1682
|
const days2 = daysRef.current;
|
|
1695
1683
|
const APPOINTMENT_BLOCK_WIDTH2 = apptWidthRef.current;
|
|
1696
1684
|
const isMultiDay2 = isMultiDayRef.current;
|
|
1697
|
-
const
|
|
1685
|
+
const EPS = 1e-4;
|
|
1686
|
+
const leftmostColumnIndex = Math.max(0, Math.floor((scrollX.value + EPS) / APPOINTMENT_BLOCK_WIDTH2));
|
|
1698
1687
|
let absoluteColIndex;
|
|
1699
1688
|
if (!isMultiDay2) {
|
|
1700
1689
|
absoluteColIndex = findResourceIndexFor(event.resourceId, resources2?.map((r) => r.id));
|