react-native-resource-calendar 1.0.3 → 1.0.5
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/README.md +37 -3
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -668,7 +668,7 @@ function StaffAvatar({
|
|
|
668
668
|
width: circleSize,
|
|
669
669
|
backgroundColor: avatarColor || "#C9E5E8",
|
|
670
670
|
overflow: "hidden"
|
|
671
|
-
} }, image ? /* @__PURE__ */ React18.createElement(
|
|
671
|
+
} }, !image ? /* @__PURE__ */ React18.createElement(
|
|
672
672
|
Image,
|
|
673
673
|
{
|
|
674
674
|
resizeMode: "cover",
|
|
@@ -686,10 +686,11 @@ function StaffAvatar({
|
|
|
686
686
|
style: {
|
|
687
687
|
fontFamily: titleFace,
|
|
688
688
|
fontSize,
|
|
689
|
-
color: textColor || "#4d959c"
|
|
689
|
+
color: textColor || "#4d959c",
|
|
690
|
+
lineHeight: circleSize
|
|
690
691
|
}
|
|
691
692
|
},
|
|
692
|
-
name ? name.split(" ").map((n) => n[0]).join("") : ""
|
|
693
|
+
name ? name.split(" ").map((n) => n[0]).join("").slice(0, 2) : ""
|
|
693
694
|
))))
|
|
694
695
|
);
|
|
695
696
|
}
|
|
@@ -744,7 +745,16 @@ var EventGridBlocksSkia = ({
|
|
|
744
745
|
const onTouchesUp = React18.useCallback(() => {
|
|
745
746
|
setPressedRow(null);
|
|
746
747
|
}, []);
|
|
747
|
-
const longPressGesture = Gesture.LongPress().onBegin((e) =>
|
|
748
|
+
const longPressGesture = Gesture.LongPress().onBegin((e) => {
|
|
749
|
+
"worklet";
|
|
750
|
+
runOnJS(onPressBegin)(Math.floor(e.y / rowHeight));
|
|
751
|
+
}).onEnd((e) => {
|
|
752
|
+
"worklet";
|
|
753
|
+
runOnJS(onSlotPress)(Math.floor(e.y / rowHeight));
|
|
754
|
+
}).onFinalize(() => {
|
|
755
|
+
"worklet";
|
|
756
|
+
runOnJS(onTouchesUp)();
|
|
757
|
+
});
|
|
748
758
|
return /* @__PURE__ */ React18.createElement(GestureDetector, { gesture: longPressGesture }, /* @__PURE__ */ React18.createElement(View, null, /* @__PURE__ */ React18.createElement(Canvas, { style: { width: APPOINTMENT_BLOCK_WIDTH, height: segmentHeight } }, firstRects.map(({ x, y, width: w, height: h, row }, idx) => /* @__PURE__ */ React18.createElement(React18.Fragment, { key: idx }, /* @__PURE__ */ React18.createElement(
|
|
749
759
|
Rect$1,
|
|
750
760
|
{
|
|
@@ -1309,11 +1319,13 @@ var CalendarInner = (props) => {
|
|
|
1309
1319
|
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
|
1310
1320
|
}, []);
|
|
1311
1321
|
const panGesture = Gesture.Pan().manualActivation(!isIOS).enabled(layout !== null).shouldCancelWhenOutside(false).onTouchesMove((_evt, stateManager) => {
|
|
1322
|
+
"worklet";
|
|
1312
1323
|
if (isIOS) return;
|
|
1313
1324
|
if (selectedEvent)
|
|
1314
1325
|
stateManager.activate();
|
|
1315
1326
|
else stateManager.end();
|
|
1316
1327
|
}).onUpdate((evt) => {
|
|
1328
|
+
"worklet";
|
|
1317
1329
|
if (!evt || evt.y == null || evt.x == null) return;
|
|
1318
1330
|
let draggable = false;
|
|
1319
1331
|
let pullable = false;
|
|
@@ -1402,6 +1414,7 @@ var CalendarInner = (props) => {
|
|
|
1402
1414
|
}
|
|
1403
1415
|
}
|
|
1404
1416
|
}).onEnd(() => {
|
|
1417
|
+
"worklet";
|
|
1405
1418
|
autoScrollSpeed.value = 0;
|
|
1406
1419
|
autoScrollXSpeed.value = 0;
|
|
1407
1420
|
lastXScrollTime.value = 0;
|