react-native-resource-calendar 1.0.15 → 1.0.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/README.md +1 -4
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,6 @@ export default function App() {
|
|
|
102
102
|
const {event, from, to, resourceId, date} = draft;
|
|
103
103
|
|
|
104
104
|
return prev.map((res: any) => {
|
|
105
|
-
// ✅ if this is the new target resource
|
|
106
105
|
if (res.id === resourceId) {
|
|
107
106
|
// was the event originally in a different resource?
|
|
108
107
|
const wasDifferentResource = event.resourceId !== resourceId;
|
|
@@ -126,7 +125,6 @@ export default function App() {
|
|
|
126
125
|
};
|
|
127
126
|
}
|
|
128
127
|
|
|
129
|
-
// ✅ if this is the old resource and event moved away
|
|
130
128
|
if (res.id === event.resourceId && event.resourceId !== resourceId) {
|
|
131
129
|
return {
|
|
132
130
|
...res,
|
|
@@ -134,7 +132,6 @@ export default function App() {
|
|
|
134
132
|
};
|
|
135
133
|
}
|
|
136
134
|
|
|
137
|
-
// ✅ untouched resources
|
|
138
135
|
return res;
|
|
139
136
|
});
|
|
140
137
|
});
|
|
@@ -144,7 +141,7 @@ export default function App() {
|
|
|
144
141
|
|
|
145
142
|
const eventStyleOverrides = (event: Event) => {
|
|
146
143
|
const bg = statusColor(event.meta?.status)
|
|
147
|
-
return {container: {backgroundColor: bg}};
|
|
144
|
+
return {container: {backgroundColor: bg}, time: {color: "black"}};
|
|
148
145
|
};
|
|
149
146
|
|
|
150
147
|
const randomPropsGenerator = () => {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import { StyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
|
|
3
4
|
|
|
4
5
|
type ResourceId = number;
|
|
5
6
|
type Event = {
|
|
@@ -63,6 +64,7 @@ type EventSlots = {
|
|
|
63
64
|
}>;
|
|
64
65
|
};
|
|
65
66
|
type StyleOverrides = Partial<{
|
|
67
|
+
time: StyleProp<TextStyle>;
|
|
66
68
|
container: ViewStyle;
|
|
67
69
|
content: ViewStyle;
|
|
68
70
|
title: TextStyle;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React$1 from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import { StyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet';
|
|
3
4
|
|
|
4
5
|
type ResourceId = number;
|
|
5
6
|
type Event = {
|
|
@@ -63,6 +64,7 @@ type EventSlots = {
|
|
|
63
64
|
}>;
|
|
64
65
|
};
|
|
65
66
|
type StyleOverrides = Partial<{
|
|
67
|
+
time: StyleProp<TextStyle>;
|
|
66
68
|
container: ViewStyle;
|
|
67
69
|
content: ViewStyle;
|
|
68
70
|
title: TextStyle;
|
package/dist/index.js
CHANGED
|
@@ -1051,14 +1051,14 @@ var EventBlock = React19__namespace.default.memo(({
|
|
|
1051
1051
|
editable: false,
|
|
1052
1052
|
allowFontScaling: false,
|
|
1053
1053
|
underlineColorAndroid: "transparent",
|
|
1054
|
-
style: {
|
|
1054
|
+
style: [{
|
|
1055
1055
|
width: "100%",
|
|
1056
1056
|
fontFamily: timeFace,
|
|
1057
1057
|
fontSize: getTextSize(hourHeight),
|
|
1058
1058
|
pointerEvents: "none",
|
|
1059
1059
|
padding: 0,
|
|
1060
1060
|
margin: 0
|
|
1061
|
-
},
|
|
1061
|
+
}, resolved?.time],
|
|
1062
1062
|
defaultValue: `${start} - ${end}`
|
|
1063
1063
|
}
|
|
1064
1064
|
), Body ? /* @__PURE__ */ React19__namespace.default.createElement(Body, { event, ctx: { hourHeight } }) : /* @__PURE__ */ React19__namespace.default.createElement(React19__namespace.default.Fragment, null, /* @__PURE__ */ React19__namespace.default.createElement(Row_default, { style: { alignItems: "center", height: 18 } }, /* @__PURE__ */ React19__namespace.default.createElement(
|
|
@@ -1170,14 +1170,14 @@ var DraggableEvent = ({
|
|
|
1170
1170
|
editable: false,
|
|
1171
1171
|
allowFontScaling: false,
|
|
1172
1172
|
underlineColorAndroid: "transparent",
|
|
1173
|
-
style: {
|
|
1173
|
+
style: [{
|
|
1174
1174
|
width: "100%",
|
|
1175
1175
|
fontFamily: timeFace,
|
|
1176
1176
|
fontSize: getTextSize(hourHeight),
|
|
1177
1177
|
pointerEvents: "none",
|
|
1178
1178
|
padding: 0,
|
|
1179
1179
|
margin: 0
|
|
1180
|
-
},
|
|
1180
|
+
}, resolved?.time],
|
|
1181
1181
|
defaultValue: initialDisplayTime,
|
|
1182
1182
|
animatedProps: animatedTimeProps
|
|
1183
1183
|
}
|