@expo/ui 58.0.13 → 58.0.14
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/CHANGELOG.md +7 -0
- package/android/build.gradle +2 -2
- package/build/community/datetime-picker/DateTimePicker.android.js +13 -4
- package/build/community/datetime-picker/DateTimePicker.android.js.map +1 -1
- package/build/community/datetime-picker/utils.d.ts +10 -0
- package/build/community/datetime-picker/utils.js +19 -0
- package/build/community/datetime-picker/utils.js.map +1 -0
- package/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.js.map +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.module → 58.0.14/expo.modules.ui-58.0.14.module} +7 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.pom → 58.0.14/expo.modules.ui-58.0.14.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha512 +1 -0
- package/package.json +2 -2
- package/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
- package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
- package/src/community/datetime-picker/DateTimePicker.android.tsx +14 -4
- package/src/community/datetime-picker/utils.ts +21 -0
- package/src/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts +6 -2
- package/build/ts-declarations/react-native-assets.d.ts +0 -31
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha512 +0 -1
- package/src/ts-declarations/react-native-assets.d.ts +0 -31
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13-sources.jar → 58.0.14/expo.modules.ui-58.0.14-sources.jar} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13-sources.jar.md5 → 58.0.14/expo.modules.ui-58.0.14-sources.jar.md5} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13-sources.jar.sha1 → 58.0.14/expo.modules.ui-58.0.14-sources.jar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13-sources.jar.sha256 → 58.0.14/expo.modules.ui-58.0.14-sources.jar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13-sources.jar.sha512 → 58.0.14/expo.modules.ui-58.0.14-sources.jar.sha512} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.aar → 58.0.14/expo.modules.ui-58.0.14.aar} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.aar.md5 → 58.0.14/expo.modules.ui-58.0.14.aar.md5} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.aar.sha1 → 58.0.14/expo.modules.ui-58.0.14.aar.sha1} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.aar.sha256 → 58.0.14/expo.modules.ui-58.0.14.aar.sha256} +0 -0
- /package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.13/expo.modules.ui-58.0.13.aar.sha512 → 58.0.14/expo.modules.ui-58.0.14.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [Android] Fix the community `DateTimePicker` reading `value` as a UTC day while `minimumDate`/`maximumDate` use the device-local day. In non-UTC timezones the picker could select and return the wrong day — one before `minimumDate`. `value`'s local calendar day is now sent to Material3 as a UTC day, and the picked day is returned as a local date that keeps `value`'s time of day. ([#50941](https://github.com/expo/expo/pull/50941) by [@expo-bot](https://github.com/expo-bot))
|
|
8
|
+
- [Internal] Import React Native internals from `react-native/unstable-internals-do-not-use`. ([#50860](https://github.com/expo/expo/pull/50860) by [@huntie](https://github.com/huntie))
|
|
9
|
+
|
|
3
10
|
## 58.0.13
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '58.0.
|
|
15
|
+
version = '58.0.14'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "58.0.
|
|
21
|
+
versionName "58.0.14"
|
|
22
22
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
23
23
|
}
|
|
24
24
|
buildFeatures {
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { DateTimePicker as AndroidPicker, DatePickerDialog as AndroidDatePickerDialog, TimePickerDialog as AndroidTimePickerDialog } from '../../jetpack-compose/DatePicker';
|
|
3
3
|
import { Host } from '../../jetpack-compose/Host';
|
|
4
4
|
import { buildEvent, buildChangeEvent } from './types';
|
|
5
|
+
import { localDateToUtcDayISOString, utcDayToLocalDate } from './utils';
|
|
5
6
|
function modeToDisplayedComponents(mode) {
|
|
6
7
|
switch(mode){
|
|
7
8
|
case 'time':
|
|
@@ -24,6 +25,13 @@ function displayToAndroidVariant(display) {
|
|
|
24
25
|
}
|
|
25
26
|
export function DateTimePicker(props) {
|
|
26
27
|
const { value, onChange, onValueChange, onDismiss: onDismissProp, mode = 'date', minimumDate, maximumDate, display = 'default', is24Hour, testID, style, accentColor, presentation = 'dialog', positiveButton, negativeButton } = props;
|
|
28
|
+
// Material3 date pickers work in UTC days, while `value` and the reported date are local —
|
|
29
|
+
// matching `@react-native-community/datetimepicker`. Send `value`'s local calendar day as a UTC
|
|
30
|
+
// day and convert the picked UTC day back, keeping `value`'s time of day. The native side
|
|
31
|
+
// already converts `minimumDate`/`maximumDate` by their local calendar day. Time pickers read
|
|
32
|
+
// local hours from the instant, so they take `value` unchanged.
|
|
33
|
+
const usesDateComponents = mode !== 'time';
|
|
34
|
+
const initialDate = usesDateComponents ? localDateToUtcDayISOString(value) : value.toISOString();
|
|
27
35
|
const onDismissed = ()=>{
|
|
28
36
|
if (onDismissProp) {
|
|
29
37
|
onDismissProp();
|
|
@@ -38,10 +46,11 @@ export function DateTimePicker(props) {
|
|
|
38
46
|
}
|
|
39
47
|
};
|
|
40
48
|
const onDateSelected = (date)=>{
|
|
49
|
+
const selected = usesDateComponents ? utcDayToLocalDate(date, value) : date;
|
|
41
50
|
if (onValueChange) {
|
|
42
|
-
onValueChange(buildChangeEvent(
|
|
51
|
+
onValueChange(buildChangeEvent(selected), selected);
|
|
43
52
|
} else {
|
|
44
|
-
onChange?.(buildEvent(
|
|
53
|
+
onChange?.(buildEvent(selected), selected);
|
|
45
54
|
}
|
|
46
55
|
};
|
|
47
56
|
const selectableDates = minimumDate || maximumDate ? {
|
|
@@ -49,7 +58,7 @@ export function DateTimePicker(props) {
|
|
|
49
58
|
end: maximumDate
|
|
50
59
|
} : undefined;
|
|
51
60
|
const dialogProps = {
|
|
52
|
-
initialDate
|
|
61
|
+
initialDate,
|
|
53
62
|
color: accentColor,
|
|
54
63
|
confirmButtonLabel: positiveButton?.label,
|
|
55
64
|
dismissButtonLabel: negativeButton?.label,
|
|
@@ -81,7 +90,7 @@ export function DateTimePicker(props) {
|
|
|
81
90
|
},
|
|
82
91
|
style: style,
|
|
83
92
|
children: /*#__PURE__*/ _jsx(AndroidPicker, {
|
|
84
|
-
initialDate:
|
|
93
|
+
initialDate: initialDate,
|
|
85
94
|
displayedComponents: modeToDisplayedComponents(mode),
|
|
86
95
|
variant: displayToAndroidVariant(display),
|
|
87
96
|
selectableDates: selectableDates,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["community/datetime-picker/DateTimePicker.android.tsx"],"sourcesContent":[null],"names":["DateTimePicker","AndroidPicker","DatePickerDialog","AndroidDatePickerDialog","TimePickerDialog","AndroidTimePickerDialog","Host","buildEvent","buildChangeEvent","modeToDisplayedComponents","mode","displayToAndroidVariant","display","props","value","onChange","onValueChange","onDismiss","onDismissProp","minimumDate","maximumDate","is24Hour","testID","style","accentColor","presentation","positiveButton","negativeButton","onDismissed","type","nativeEvent","timestamp","getTime","utcOffset","getTimezoneOffset","onDateSelected","date","selectableDates","start","end","undefined","dialogProps","
|
|
1
|
+
{"version":3,"sources":["community/datetime-picker/DateTimePicker.android.tsx"],"sourcesContent":[null],"names":["DateTimePicker","AndroidPicker","DatePickerDialog","AndroidDatePickerDialog","TimePickerDialog","AndroidTimePickerDialog","Host","buildEvent","buildChangeEvent","localDateToUtcDayISOString","utcDayToLocalDate","modeToDisplayedComponents","mode","displayToAndroidVariant","display","props","value","onChange","onValueChange","onDismiss","onDismissProp","minimumDate","maximumDate","is24Hour","testID","style","accentColor","presentation","positiveButton","negativeButton","usesDateComponents","initialDate","toISOString","onDismissed","type","nativeEvent","timestamp","getTime","utcOffset","getTimezoneOffset","onDateSelected","date","selected","selectableDates","start","end","undefined","dialogProps","color","confirmButtonLabel","label","dismissButtonLabel","onDismissRequest","variant","matchContents","vertical","displayedComponents","showVariantToggle"],"mappings":";AAAA,SACEA,kBAAkBC,aAAa,EAC/BC,oBAAoBC,uBAAuB,EAC3CC,oBAAoBC,uBAAuB,QAEtC,mCAAmC;AAC1C,SAASC,IAAI,QAAQ,6BAA6B;AAClD,SAASC,UAAU,EAAEC,gBAAgB,QAAkC,UAAU;AACjF,SAASC,0BAA0B,EAAEC,iBAAiB,QAAQ,UAAU;AAExE,SAASC,0BACPC,IAAiC;IAEjC,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,kEAAkE;YAClE,OAAO;QACT,KAAK;QACL;YACE,OAAO;IACX;AACF;AAEA,SAASC,wBACPC,OAAuC;IAEvC,OAAQA;QACN,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF;AAEA,OAAO,SAASd,eAAee,KAA0B;IACvD,MAAM,EACJC,KAAK,EACLC,QAAQ,EACRC,aAAa,EACbC,WAAWC,aAAa,EACxBR,OAAO,MAAM,EACbS,WAAW,EACXC,WAAW,EACXR,UAAU,SAAS,EACnBS,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,WAAW,EACXC,eAAe,QAAQ,EACvBC,cAAc,EACdC,cAAc,EACf,GAAGd;IAEJ,2FAA2F;IAC3F,gGAAgG;IAChG,0FAA0F;IAC1F,8FAA8F;IAC9F,gEAAgE;IAChE,MAAMe,qBAAqBlB,SAAS;IACpC,MAAMmB,cAAcD,qBAAqBrB,2BAA2BO,SAASA,MAAMgB,WAAW;IAE9F,MAAMC,cAAc;QAClB,IAAIb,eAAe;YACjBA;QACF,OAAO;YACLH,WACE;gBACEiB,MAAM;gBACNC,aAAa;oBACXC,WAAWpB,MAAMqB,OAAO;oBACxBC,WAAW,CAACtB,MAAMuB,iBAAiB;gBACrC;YACF,GACAvB;QAEJ;IACF;IAEA,MAAMwB,iBAAiB,CAACC;QACtB,MAAMC,WAAWZ,qBAAqBpB,kBAAkB+B,MAAMzB,SAASyB;QACvE,IAAIvB,eAAe;YACjBA,cAAcV,iBAAiBkC,WAAWA;QAC5C,OAAO;YACLzB,WAAWV,WAAWmC,WAAWA;QACnC;IACF;IAEA,MAAMC,kBACJtB,eAAeC,cAAc;QAAEsB,OAAOvB;QAAawB,KAAKvB;IAAY,IAAIwB;IAE1E,MAAMC,cAAc;QAClBhB;QACAiB,OAAOtB;QACPuB,oBAAoBrB,gBAAgBsB;QACpCC,oBAAoBtB,gBAAgBqB;QACpCV;QACAY,kBAAkBnB;IACpB;IAEA,IAAIN,iBAAiB,UAAU;QAC7B,IAAIf,SAAS,QAAQ;YACnB,qBACE,KAACN;gBAAKmB,OAAOA;0BACX,cAAA,KAACpB;oBAAyB,GAAG0C,WAAW;oBAAExB,UAAUA;;;QAG1D;QACA,qBACE,KAACjB;YAAKmB,OAAOA;sBACX,cAAA,KAACtB;gBACE,GAAG4C,WAAW;gBACfM,SAASxC,wBAAwBC;gBACjC6B,iBAAiBA;;;IAIzB;IAEA,qBACE,KAACrC;QAAKgD,eAAe;YAAEC,UAAU;QAAK;QAAG9B,OAAOA;kBAC9C,cAAA,KAACxB;YACC8B,aAAaA;YACbyB,qBAAqB7C,0BAA0BC;YAC/CyC,SAASxC,wBAAwBC;YACjC6B,iBAAiBA;YACjBpB,UAAUA;YACVyB,OAAOtB;YACPc,gBAAgBA;YAChBiB,mBAAmB;YAClB,GAAIjC,SAAS;gBAAEA;YAAO,IAAIsB,SAAS;;;AAI5C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the ISO string of the UTC midnight of `value`'s local calendar day, so Material3 shows
|
|
3
|
+
* the same day the user sees locally.
|
|
4
|
+
*/
|
|
5
|
+
export declare function localDateToUtcDayISOString(value: Date): string;
|
|
6
|
+
/**
|
|
7
|
+
* Converts the UTC-midnight day reported by Material3 back into a local date, keeping the time of
|
|
8
|
+
* day from `timeOfDay`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function utcDayToLocalDate(utcDay: Date, timeOfDay: Date): Date;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Material3's DatePicker (and the native side's `toUtcDayMillis` bounds conversion) works in UTC
|
|
2
|
+
// days, while `value`, `minimumDate`, and `maximumDate` are local dates — matching
|
|
3
|
+
// `@react-native-community/datetimepicker`. These helpers convert between the two.
|
|
4
|
+
/**
|
|
5
|
+
* Returns the ISO string of the UTC midnight of `value`'s local calendar day, so Material3 shows
|
|
6
|
+
* the same day the user sees locally.
|
|
7
|
+
*/ export function localDateToUtcDayISOString(value) {
|
|
8
|
+
return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate())).toISOString();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Converts the UTC-midnight day reported by Material3 back into a local date, keeping the time of
|
|
12
|
+
* day from `timeOfDay`.
|
|
13
|
+
*/ export function utcDayToLocalDate(utcDay, timeOfDay) {
|
|
14
|
+
const result = new Date(timeOfDay);
|
|
15
|
+
result.setFullYear(utcDay.getUTCFullYear(), utcDay.getUTCMonth(), utcDay.getUTCDate());
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["community/datetime-picker/utils.ts"],"sourcesContent":[null],"names":["localDateToUtcDayISOString","value","Date","UTC","getFullYear","getMonth","getDate","toISOString","utcDayToLocalDate","utcDay","timeOfDay","result","setFullYear","getUTCFullYear","getUTCMonth","getUTCDate"],"mappings":"AAAA,iGAAiG;AACjG,mFAAmF;AACnF,mFAAmF;AAEnF;;;CAGC,GACD,OAAO,SAASA,2BAA2BC,KAAW;IACpD,OAAO,IAAIC,KAAKA,KAAKC,GAAG,CAACF,MAAMG,WAAW,IAAIH,MAAMI,QAAQ,IAAIJ,MAAMK,OAAO,KAAKC,WAAW;AAC/F;AAEA;;;CAGC,GACD,OAAO,SAASC,kBAAkBC,MAAY,EAAEC,SAAe;IAC7D,MAAMC,SAAS,IAAIT,KAAKQ;IACxBC,OAAOC,WAAW,CAACH,OAAOI,cAAc,IAAIJ,OAAOK,WAAW,IAAIL,OAAOM,UAAU;IACnF,OAAOJ;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts"],"sourcesContent":[null],"names":["Image","resolveAssetSource","addCustomSourceTransformer","resolver","process","env","EXPO_OS","asset","type","serverUrl","assetServerURL","defaultAsset"],"mappings":"AAAA,SAASA,KAAK,QAAQ,eAAe;
|
|
1
|
+
{"version":3,"sources":["jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts"],"sourcesContent":[null],"names":["Image","resolveAssetSource","addCustomSourceTransformer","resolver","process","env","EXPO_OS","asset","type","serverUrl","assetServerURL","defaultAsset"],"mappings":"AAAA,SAASA,KAAK,QAAQ,eAAe;AAOrC,oEAAoE;AACpE,IAAI,OAAOA,MAAMC,kBAAkB,CAACC,0BAA0B,KAAK,YAAY;IAC7E,oEAAoE;IACpEF,MAAMC,kBAAkB,CAACC,0BAA0B,CAAC,CAACC;QACnD,IACEC,QAAQC,GAAG,CAACC,OAAO,KAAK,aACxBH,SAASI,KAAK,CAACC,IAAI,KAAK,SACxBL,SAASM,SAAS,IAAI,QACtBN,SAASM,SAAS,KAAK,IACvB;YACA,6FAA6F;YAC7F,kGAAkG;YAClG,oFAAoF;YACpF,8JAA8J;YAC9J,OAAON,SAASO,cAAc;QAChC;QACA,OAAOP,SAASQ,YAAY;IAC9B;AACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "expo.modules.ui",
|
|
5
5
|
"module": "expo.modules.ui",
|
|
6
|
-
"version": "58.0.
|
|
6
|
+
"version": "58.0.14",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.ui-58.0.
|
|
28
|
-
"url": "expo.modules.ui-58.0.
|
|
27
|
+
"name": "expo.modules.ui-58.0.14.aar",
|
|
28
|
+
"url": "expo.modules.ui-58.0.14.aar",
|
|
29
29
|
"size": 1843673,
|
|
30
30
|
"sha512": "ef66aaa30d2d2703c4ff5c36c117ffaf8dd41a2d2a9a8a286224b817f77d20ae2298cd6e0959e1a78ccc3c741cbc286db2e8d5a086b4ed9e11acc6a206207d68",
|
|
31
31
|
"sha256": "dc0a8e5a28e1f4f7d722e8706b5858844aa6eac089e89e5f8099374b309bed60",
|
|
@@ -141,8 +141,8 @@
|
|
|
141
141
|
],
|
|
142
142
|
"files": [
|
|
143
143
|
{
|
|
144
|
-
"name": "expo.modules.ui-58.0.
|
|
145
|
-
"url": "expo.modules.ui-58.0.
|
|
144
|
+
"name": "expo.modules.ui-58.0.14.aar",
|
|
145
|
+
"url": "expo.modules.ui-58.0.14.aar",
|
|
146
146
|
"size": 1843673,
|
|
147
147
|
"sha512": "ef66aaa30d2d2703c4ff5c36c117ffaf8dd41a2d2a9a8a286224b817f77d20ae2298cd6e0959e1a78ccc3c741cbc286db2e8d5a086b4ed9e11acc6a206207d68",
|
|
148
148
|
"sha256": "dc0a8e5a28e1f4f7d722e8706b5858844aa6eac089e89e5f8099374b309bed60",
|
|
@@ -161,8 +161,8 @@
|
|
|
161
161
|
},
|
|
162
162
|
"files": [
|
|
163
163
|
{
|
|
164
|
-
"name": "expo.modules.ui-58.0.
|
|
165
|
-
"url": "expo.modules.ui-58.0.
|
|
164
|
+
"name": "expo.modules.ui-58.0.14-sources.jar",
|
|
165
|
+
"url": "expo.modules.ui-58.0.14-sources.jar",
|
|
166
166
|
"size": 110723,
|
|
167
167
|
"sha512": "3e6c99d1b6aa74d01d30339d222653a631dae2abf99075e4c25fc171fbb33f9d55bca7daee4d1cd4c6ecdcdc89fb71067de948ac4a91135b6ce38cbb337c52d1",
|
|
168
168
|
"sha256": "eee15e7c9f3aeb7b3941ead7ce0e72d8174b0b95964c69ef5a1d5fbf02536fbe",
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8620eb4f3a0034ee25df426d15a2132c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.module.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bac0bb14d7f8206e4f6fea13dab4cf103839b7f6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9211bc6ae1cb6ca9bae211e99fdfecb0870b0e5dfc1bf31d50552e794cc02abf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
250717c1fdfaad128b302fc4d7ce975d8cb26444b84ebb91de16d911d91cef07f40632026edc6fe3653c5ebbb621a90e35c1749b301b9e70961f72428265ae4e
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>expo.modules.ui</groupId>
|
|
11
11
|
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>58.0.
|
|
12
|
+
<version>58.0.14</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.ui</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5830eabc528b387a16b2c11fa647cccf
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2aa19c59ef78a58437075381e54f80196277f198
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
190fae0bf2c5e0e704aff6203b831db1bb670bb9d12db1d93e2c382a1aaca0a6
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.14/expo.modules.ui-58.0.14.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b1e6707e0766bbcc90144b50abbb05f9dc5bd5c29bda43a4ba32924d7c930425a8c173d500f1ac3d9b1a3d3ad8fb4667fd848ec1ab58bc9ed4d26bbbb7ca7ee7
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.14",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Jetpack Compose",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@types/jest": "^30.0.0",
|
|
149
149
|
"@types/node": "^22.14.0",
|
|
150
150
|
"@types/react": "~19.3.0",
|
|
151
|
-
"expo-module-scripts": "56.0.
|
|
151
|
+
"expo-module-scripts": "56.0.8",
|
|
152
152
|
"react-native-reanimated": "4.7.0",
|
|
153
153
|
"react-native-worklets": "0.13.0"
|
|
154
154
|
},
|
|
Binary file
|
|
Binary file
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
} from '../../jetpack-compose/DatePicker';
|
|
7
7
|
import { Host } from '../../jetpack-compose/Host';
|
|
8
8
|
import { buildEvent, buildChangeEvent, type DateTimePickerProps } from './types';
|
|
9
|
+
import { localDateToUtcDayISOString, utcDayToLocalDate } from './utils';
|
|
9
10
|
|
|
10
11
|
function modeToDisplayedComponents(
|
|
11
12
|
mode: DateTimePickerProps['mode']
|
|
@@ -52,6 +53,14 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
52
53
|
negativeButton,
|
|
53
54
|
} = props;
|
|
54
55
|
|
|
56
|
+
// Material3 date pickers work in UTC days, while `value` and the reported date are local —
|
|
57
|
+
// matching `@react-native-community/datetimepicker`. Send `value`'s local calendar day as a UTC
|
|
58
|
+
// day and convert the picked UTC day back, keeping `value`'s time of day. The native side
|
|
59
|
+
// already converts `minimumDate`/`maximumDate` by their local calendar day. Time pickers read
|
|
60
|
+
// local hours from the instant, so they take `value` unchanged.
|
|
61
|
+
const usesDateComponents = mode !== 'time';
|
|
62
|
+
const initialDate = usesDateComponents ? localDateToUtcDayISOString(value) : value.toISOString();
|
|
63
|
+
|
|
55
64
|
const onDismissed = () => {
|
|
56
65
|
if (onDismissProp) {
|
|
57
66
|
onDismissProp();
|
|
@@ -70,10 +79,11 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
70
79
|
};
|
|
71
80
|
|
|
72
81
|
const onDateSelected = (date: Date) => {
|
|
82
|
+
const selected = usesDateComponents ? utcDayToLocalDate(date, value) : date;
|
|
73
83
|
if (onValueChange) {
|
|
74
|
-
onValueChange(buildChangeEvent(
|
|
84
|
+
onValueChange(buildChangeEvent(selected), selected);
|
|
75
85
|
} else {
|
|
76
|
-
onChange?.(buildEvent(
|
|
86
|
+
onChange?.(buildEvent(selected), selected);
|
|
77
87
|
}
|
|
78
88
|
};
|
|
79
89
|
|
|
@@ -81,7 +91,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
81
91
|
minimumDate || maximumDate ? { start: minimumDate, end: maximumDate } : undefined;
|
|
82
92
|
|
|
83
93
|
const dialogProps = {
|
|
84
|
-
initialDate
|
|
94
|
+
initialDate,
|
|
85
95
|
color: accentColor,
|
|
86
96
|
confirmButtonLabel: positiveButton?.label,
|
|
87
97
|
dismissButtonLabel: negativeButton?.label,
|
|
@@ -111,7 +121,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
|
|
|
111
121
|
return (
|
|
112
122
|
<Host matchContents={{ vertical: true }} style={style}>
|
|
113
123
|
<AndroidPicker
|
|
114
|
-
initialDate={
|
|
124
|
+
initialDate={initialDate}
|
|
115
125
|
displayedComponents={modeToDisplayedComponents(mode)}
|
|
116
126
|
variant={displayToAndroidVariant(display)}
|
|
117
127
|
selectableDates={selectableDates}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Material3's DatePicker (and the native side's `toUtcDayMillis` bounds conversion) works in UTC
|
|
2
|
+
// days, while `value`, `minimumDate`, and `maximumDate` are local dates — matching
|
|
3
|
+
// `@react-native-community/datetimepicker`. These helpers convert between the two.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the ISO string of the UTC midnight of `value`'s local calendar day, so Material3 shows
|
|
7
|
+
* the same day the user sees locally.
|
|
8
|
+
*/
|
|
9
|
+
export function localDateToUtcDayISOString(value: Date): string {
|
|
10
|
+
return new Date(Date.UTC(value.getFullYear(), value.getMonth(), value.getDate())).toISOString();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Converts the UTC-midnight day reported by Material3 back into a local date, keeping the time of
|
|
15
|
+
* day from `timeOfDay`.
|
|
16
|
+
*/
|
|
17
|
+
export function utcDayToLocalDate(utcDay: Date, timeOfDay: Date): Date {
|
|
18
|
+
const result = new Date(timeOfDay);
|
|
19
|
+
result.setFullYear(utcDay.getUTCFullYear(), utcDay.getUTCMonth(), utcDay.getUTCDate());
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Image } from 'react-native';
|
|
2
|
-
import type AssetSourceResolver from 'react-native/
|
|
2
|
+
import type { AssetSourceResolver } from 'react-native/unstable-internals-do-not-use';
|
|
3
|
+
|
|
4
|
+
type AssetResolver = AssetSourceResolver & {
|
|
5
|
+
asset: { type?: string };
|
|
6
|
+
};
|
|
3
7
|
|
|
4
8
|
// @ts-expect-error: addCustomSourceTransformer type is not exported
|
|
5
9
|
if (typeof Image.resolveAssetSource.addCustomSourceTransformer === 'function') {
|
|
6
10
|
// @ts-expect-error: addCustomSourceTransformer type is not exported
|
|
7
|
-
Image.resolveAssetSource.addCustomSourceTransformer((resolver:
|
|
11
|
+
Image.resolveAssetSource.addCustomSourceTransformer((resolver: AssetResolver) => {
|
|
8
12
|
if (
|
|
9
13
|
process.env.EXPO_OS === 'android' &&
|
|
10
14
|
resolver.asset.type === 'xml' &&
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare module 'react-native/Libraries/Image/AssetSourceResolver' {
|
|
2
|
-
import type { PackagerAsset } from 'react-native/asset-registry';
|
|
3
|
-
|
|
4
|
-
export type ResolvedAssetSource = {
|
|
5
|
-
__packager_asset: boolean;
|
|
6
|
-
width?: number | null;
|
|
7
|
-
height?: number | null;
|
|
8
|
-
uri: string;
|
|
9
|
-
scale: number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default class AssetSourceResolver {
|
|
13
|
-
serverUrl: string | null;
|
|
14
|
-
jsbundleUrl: string | null;
|
|
15
|
-
asset: PackagerAsset & { fileHashes?: string[] };
|
|
16
|
-
|
|
17
|
-
constructor(serverUrl: string | null, jsbundleUrl: string | null, asset: PackagerAsset);
|
|
18
|
-
|
|
19
|
-
isLoadedFromServer(): boolean;
|
|
20
|
-
isLoadedFromFileSystem(): boolean;
|
|
21
|
-
defaultAsset(): ResolvedAssetSource;
|
|
22
|
-
assetServerURL(): ResolvedAssetSource;
|
|
23
|
-
scaledAssetPath(): ResolvedAssetSource;
|
|
24
|
-
scaledAssetURLNearBundle(): ResolvedAssetSource;
|
|
25
|
-
resourceIdentifierWithoutScale(): ResolvedAssetSource;
|
|
26
|
-
drawableFolderInBundle(): ResolvedAssetSource;
|
|
27
|
-
fromSource(source: string): ResolvedAssetSource;
|
|
28
|
-
|
|
29
|
-
static pickScale(scales: number[], deviceScale: number): number;
|
|
30
|
-
}
|
|
31
|
-
}
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
52b71a4f4df5e14f0d8981c716abf0b5
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9733a96d1ff7d223a5f70be6e6dfe7bb8e87a65d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f69ec3f19d8e25695b4285ffd82dc9c7fae64d77138b3650c75c96d785069f25
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
62bb4e1488c2d1ec2a92018daf0e9a3743b13f2eac6fd9f2824b2811a50ea67f94d13aa8bda773a19bf65987b34813baeefa2103ea9af839451034086683378e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
163d916be872a111d5f095a7fa13dc3c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3cd5de5e06cb53c184c41eb8b7136e576bdfae63
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8140b397ebcb1f6d3c375179559510d32fdeeb8b95772cba5bc2119bc5c7e5ed
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.13/expo.modules.ui-58.0.13.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
877cc4dd09304c8a40de927737422f89e43dbb7893f8d529edbf585b886113ec03bd15df807d3776ff1b22b5214390277f2fdfa2b525eb950968e534bf3a39ad
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare module 'react-native/Libraries/Image/AssetSourceResolver' {
|
|
2
|
-
import type { PackagerAsset } from 'react-native/asset-registry';
|
|
3
|
-
|
|
4
|
-
export type ResolvedAssetSource = {
|
|
5
|
-
__packager_asset: boolean;
|
|
6
|
-
width?: number | null;
|
|
7
|
-
height?: number | null;
|
|
8
|
-
uri: string;
|
|
9
|
-
scale: number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default class AssetSourceResolver {
|
|
13
|
-
serverUrl: string | null;
|
|
14
|
-
jsbundleUrl: string | null;
|
|
15
|
-
asset: PackagerAsset & { fileHashes?: string[] };
|
|
16
|
-
|
|
17
|
-
constructor(serverUrl: string | null, jsbundleUrl: string | null, asset: PackagerAsset);
|
|
18
|
-
|
|
19
|
-
isLoadedFromServer(): boolean;
|
|
20
|
-
isLoadedFromFileSystem(): boolean;
|
|
21
|
-
defaultAsset(): ResolvedAssetSource;
|
|
22
|
-
assetServerURL(): ResolvedAssetSource;
|
|
23
|
-
scaledAssetPath(): ResolvedAssetSource;
|
|
24
|
-
scaledAssetURLNearBundle(): ResolvedAssetSource;
|
|
25
|
-
resourceIdentifierWithoutScale(): ResolvedAssetSource;
|
|
26
|
-
drawableFolderInBundle(): ResolvedAssetSource;
|
|
27
|
-
fromSource(source: string): ResolvedAssetSource;
|
|
28
|
-
|
|
29
|
-
static pickScale(scales: number[], deviceScale: number): number;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|