react-native-resource-calendar 1.0.3 → 1.0.4
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 +13 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -770,7 +770,16 @@ var EventGridBlocksSkia = ({
|
|
|
770
770
|
const onTouchesUp = React18__namespace.useCallback(() => {
|
|
771
771
|
setPressedRow(null);
|
|
772
772
|
}, []);
|
|
773
|
-
const longPressGesture = reactNativeGestureHandler.Gesture.LongPress().onBegin((e) =>
|
|
773
|
+
const longPressGesture = reactNativeGestureHandler.Gesture.LongPress().onBegin((e) => {
|
|
774
|
+
"worklet";
|
|
775
|
+
Animated2.runOnJS(onPressBegin)(Math.floor(e.y / rowHeight));
|
|
776
|
+
}).onEnd((e) => {
|
|
777
|
+
"worklet";
|
|
778
|
+
Animated2.runOnJS(onSlotPress)(Math.floor(e.y / rowHeight));
|
|
779
|
+
}).onFinalize(() => {
|
|
780
|
+
"worklet";
|
|
781
|
+
Animated2.runOnJS(onTouchesUp)();
|
|
782
|
+
});
|
|
774
783
|
return /* @__PURE__ */ React18__namespace.createElement(reactNativeGestureHandler.GestureDetector, { gesture: longPressGesture }, /* @__PURE__ */ React18__namespace.createElement(reactNative.View, null, /* @__PURE__ */ React18__namespace.createElement(reactNativeSkia.Canvas, { style: { width: APPOINTMENT_BLOCK_WIDTH, height: segmentHeight } }, firstRects.map(({ x, y, width: w, height: h, row }, idx) => /* @__PURE__ */ React18__namespace.createElement(React18__namespace.Fragment, { key: idx }, /* @__PURE__ */ React18__namespace.createElement(
|
|
775
784
|
reactNativeSkia.Rect,
|
|
776
785
|
{
|
|
@@ -1335,11 +1344,13 @@ var CalendarInner = (props) => {
|
|
|
1335
1344
|
Haptics__namespace.impactAsync(Haptics__namespace.ImpactFeedbackStyle.Light);
|
|
1336
1345
|
}, []);
|
|
1337
1346
|
const panGesture = reactNativeGestureHandler.Gesture.Pan().manualActivation(!isIOS).enabled(layout !== null).shouldCancelWhenOutside(false).onTouchesMove((_evt, stateManager) => {
|
|
1347
|
+
"worklet";
|
|
1338
1348
|
if (isIOS) return;
|
|
1339
1349
|
if (selectedEvent)
|
|
1340
1350
|
stateManager.activate();
|
|
1341
1351
|
else stateManager.end();
|
|
1342
1352
|
}).onUpdate((evt) => {
|
|
1353
|
+
"worklet";
|
|
1343
1354
|
if (!evt || evt.y == null || evt.x == null) return;
|
|
1344
1355
|
let draggable = false;
|
|
1345
1356
|
let pullable = false;
|
|
@@ -1428,6 +1439,7 @@ var CalendarInner = (props) => {
|
|
|
1428
1439
|
}
|
|
1429
1440
|
}
|
|
1430
1441
|
}).onEnd(() => {
|
|
1442
|
+
"worklet";
|
|
1431
1443
|
autoScrollSpeed.value = 0;
|
|
1432
1444
|
autoScrollXSpeed.value = 0;
|
|
1433
1445
|
lastXScrollTime.value = 0;
|