Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion packages/jsActions/mobile-resources-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [12.7.0] Native Mobile Resources - 2026-11-20
### Changed

- We refactored the GetDeviceInfo action to use the shared device metrics utility instead of directly importing react-native-device-info.

## [12.7.0] Native Mobile Resources - 2026-11-20

## [4.6.0] BarcodeScanner

### BREAKING

- We updated react-native-vision-camera from v4.7.3 to v5.2.3. On Android, barcodes are now scanned with react-native-vision-camera-barcode-scanner v5.2.3 (Google ML Kit). On iOS, barcodes are still scanned with Apple's built-in scanner, as before. This version requires Make It Native version 11.12.3 or above. Older versions of Make It Native cannot run this version of the widget.
Expand All @@ -24,12 +28,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We fixed barcodes with patterned backgrounds not being scanned correctly on Android.

## [3.7.0] Feedback

### Changed

- The feedback dialogs are now presented through the shared MxOverlay component instead of react-native-dialog, which has been removed as a dependency.
- Screen readers now treat the feedback dialogs as modal, move focus to the dialog title when one opens, and return focus to the feedback button when the last one closes.

## [4.6.1] IntroScreen

### Added

- We added an "Accessibility" group with a label for the slide position announcement, and an accessibility label for each of the Skip, Previous, Next and Done buttons, so screen reader text can be translated.
Expand All @@ -39,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We fixed an issue where screen readers (TalkBack and VoiceOver) read out every pagination dot as a separate button. The dots are now announced once as a page indicator (for example "Slide 2 of 4"), which can be adjusted to change slide.

## [12.6.0] Native Mobile Resources - 2026-11-4

### Fixed

- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime.
Expand All @@ -49,11 +56,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We bumped the `brace-expansion` package to v5.0.12 to fix a denial-of-service vulnerability.

## [5.3.5] BottomSheet

### Fixed

- Fixed the app becoming unresponsive to touches after a modal bottom sheet (basic or custom rendering) was closed while it was still opening, e.g. when opening and closing it quickly. A sheet whose trigger attribute is set to false while it is opening now also closes once it has opened.

## [2.4.1] ColorPicker

### Added

- We added screen reader label properties for the hue, saturation, brightness and transparency sliders.
Expand All @@ -68,16 +77,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We fixed the other sliders moving slightly while one slider is dragged, and hue and saturation being lost when the color becomes black or white.

## [3.2.0] Image

### Changed

- The enlarged image is now presented through the shared MxOverlay component. Screen readers now treat it as a modal, move focus to the enlarged image when it opens and return focus to the image when it closes.

## [4.6.0] IntroScreen

### Changed

- The IntroScreen is now presented through the shared MxOverlay component. Its appearance and behaviour, including blocking the Android back button, are unchanged.

## [4.5.0] ProgressBar

### Changed

- Removed the react-native-progress dependency. There is no change in appearance or behavior.
Expand All @@ -87,6 +99,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- The progress bar now announces itself to screen readers with a progress bar role and its current value.

## [3.4.0] ProgressCircle

### Changed

- Removed the react-native-progress dependency. There is no change in appearance or behavior.
Expand All @@ -96,6 +109,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- The progress circle now announces itself to screen readers with a progress bar role and its current value.

## [3.1.0] RangeSlider

### Changed

- We replaced @miblanchard/react-native-slider with a built-in slider component.
Expand All @@ -105,11 +119,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We fixed the range slider thumbs not announcing their values or being adjustable with VoiceOver and TalkBack.

## [3.1.0] Signature

### Added

- We added mendix-native as a dependency to provide native file system.

## [4.1.0] Slider

### Changed

- We replaced @miblanchard/react-native-slider with a built-in slider component.
Expand All @@ -119,6 +135,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- We fixed the slider not announcing its value or being adjustable with VoiceOver and TalkBack.

## [6.5.0] VideoPlayer

### Added

- We added mendix-native as a dependency to provide platform utilities.
Expand Down
4 changes: 2 additions & 2 deletions packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"release:marketplace": "node ../../../scripts/release/marketplaceRelease.js"
},
"dependencies": {
"@mendix/piw-native-utils-internal": "*",
"@react-native-camera-roll/camera-roll": "7.10.2",
"react-native-notify-kit": "10.4.7",
"@react-native-firebase/messaging": "20.1.0",
Expand All @@ -37,7 +38,6 @@
"mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.5.2/mendix-native-v0.5.2.tgz",
"mime": "3.0.0",
"react-native-blob-util": "0.24.7",
"react-native-device-info": "15.0.2",
"react-native-file-viewer-turbo": "0.7.4",
"react-native-image-picker": "7.2.3",
"react-native-localize": "3.7.0",
Expand All @@ -52,4 +52,4 @@
"mendix": "11.8.0",
"rimraf": "^6.1.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import { Big } from "big.js";
import DeviceInfo from "react-native-device-info";
import { useDeviceMetrics } from "@mendix/piw-native-utils-internal";
import { getLocales, getCountry, getTimeZone, uses24HourClock } from "react-native-localize";

// BEGIN EXTRA CODE
Expand All @@ -17,20 +17,21 @@ import { getLocales, getCountry, getTimeZone, uses24HourClock } from "react-nati
*/
export async function GetDeviceInfo(): Promise<mendix.lib.MxObject> {
// BEGIN USER CODE
const deviceMetrics = useDeviceMetrics();

return Promise.all([
createMxObject("NativeMobileResources.DeviceInfo"),
DeviceInfo.getBatteryLevel(),
DeviceInfo.getFontScale(),
DeviceInfo.getFreeDiskStorage(),
DeviceInfo.getTotalDiskCapacity(),
DeviceInfo.getTotalMemory(),
DeviceInfo.getCarrier(),
DeviceInfo.getManufacturer(),
DeviceInfo.getUserAgent(),
DeviceInfo.getUniqueId(),
DeviceInfo.isEmulator(),
DeviceInfo.isLandscape()
deviceMetrics.getBatteryLevel(),
deviceMetrics.getFontScale(),
deviceMetrics.getFreeDiskStorage(),
deviceMetrics.getTotalDiskCapacity(),
deviceMetrics.getTotalMemory(),
deviceMetrics.getCarrier(),
deviceMetrics.getManufacturer(),
deviceMetrics.getUserAgent(),
deviceMetrics.getUniqueId(),
deviceMetrics.isEmulator(),
deviceMetrics.isLandscape()
]).then(
async ([
mxObject,
Expand All @@ -47,33 +48,33 @@ export async function GetDeviceInfo(): Promise<mendix.lib.MxObject> {
isLandscape
]) => {
const locales = getLocales();
mxObject.set("ApplicationName", DeviceInfo.getApplicationName());
mxObject.set("ApplicationName", deviceMetrics.getApplicationName());
mxObject.set("BatteryLevel", new Big(batteryLevel.toFixed(2)));
mxObject.set("Brand", DeviceInfo.getBrand());
mxObject.set("BuildNumber", String(DeviceInfo.getBuildNumber()));
mxObject.set("BundleId", DeviceInfo.getBundleId());
mxObject.set("Brand", deviceMetrics.getBrand());
mxObject.set("BuildNumber", String(deviceMetrics.getBuildNumber()));
mxObject.set("BundleId", deviceMetrics.getBundleId());
mxObject.set("Carrier", carrier);
mxObject.set("DeviceCountry", getCountry());
mxObject.set("DeviceId", DeviceInfo.getDeviceId());
mxObject.set("DeviceId", deviceMetrics.getDeviceId());
mxObject.set("DeviceLocale", locales && locales.length > 0 ? locales[0].languageTag : "");
mxObject.set("FontScale", new Big(fontScale.toFixed(2)));
mxObject.set("FreeDiskStorage", new Big(freeDiskStorage));
mxObject.set("Manufacturer", manufacturer);
mxObject.set("Model", DeviceInfo.getModel());
mxObject.set("ReadableVersion", DeviceInfo.getReadableVersion());
mxObject.set("SystemName", DeviceInfo.getSystemName());
mxObject.set("SystemVersion", DeviceInfo.getSystemVersion());
mxObject.set("Model", deviceMetrics.getModel());
mxObject.set("ReadableVersion", deviceMetrics.getReadableVersion());
mxObject.set("SystemName", deviceMetrics.getSystemName());
mxObject.set("SystemVersion", deviceMetrics.getSystemVersion());
mxObject.set("Timezone", getTimeZone());
mxObject.set("TotalDiskCapacity", new Big(totalDiskCapacity));
mxObject.set("TotalMemory", new Big(totalMemory));
mxObject.set("UniqueId", uniqueId);
mxObject.set("UserAgent", userAgent);
mxObject.set("Version", DeviceInfo.getVersion());
mxObject.set("Version", deviceMetrics.getVersion());
mxObject.set("Is24Hour", uses24HourClock());
mxObject.set("IsEmulator", isEmulator);
mxObject.set("IsTablet", DeviceInfo.isTablet());
mxObject.set("IsTablet", deviceMetrics.isTablet);
mxObject.set("IsLandscape", isLandscape);
mxObject.set("HasNotch", DeviceInfo.hasNotch());
mxObject.set("HasNotch", deviceMetrics.hasNotch);

return mxObject;
}
Expand Down
1 change: 1 addition & 0 deletions packages/jsActions/nanoflow-actions-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]

## [7.4.2] Nanoflow Commons - 2026-11-23

### Changed

- Updated react-native-nitro-modules to 0.37.0.
Expand Down
2 changes: 1 addition & 1 deletion packages/jsActions/nanoflow-actions-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"@mendix/pluggable-widgets-tools": "*",
"mendix": "11.8.0"
}
}
}
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/bottom-sheet-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- Removed unnecessary react-native-device-info dependency.

## [5.3.5] - 2026-11-4

### Fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bottom-sheet-native",
"widgetName": "BottomSheet",
"version": "5.3.5",
"version": "5.3.6",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -23,7 +23,6 @@
"@mendix/piw-native-utils-internal": "*",
"@mendix/piw-utils-internal": "*",
"@shopify/flash-list": "2.3.1",
"react-native-device-info": "15.0.2",
"react-native-gesture-handler": "2.31.2",
"react-native-reanimated": "4.3.1",
"react-native-worklets": "0.8.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jest.mock("react-native-reanimated", () => {
return Reanimated;
});

jest.mock("react-native-device-info", () => ({
getDeviceId: () => "iPhone10,6"
}));

jest.mock("react-native/Libraries/Utilities/Platform", () => {
const Platform = jest.requireActual("react-native/Libraries/Utilities/Platform");
Platform.OS = "ios";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="BottomSheet" version="5.3.5" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="BottomSheet" version="5.3.6" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="BottomSheet.xml" />
</widgetFiles>
Expand Down
24 changes: 0 additions & 24 deletions packages/pluggableWidgets/bottom-sheet-native/src/ui/Styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { TextStyle, ViewStyle } from "react-native";
import DeviceInfo from "react-native-device-info";

export interface ModalItemsStyle {
container?: ModalItemContainerStyle;
Expand All @@ -19,26 +18,3 @@ export interface BottomSheetStyle {
modal: ViewStyle;
modalItems: ModalItemsStyle;
}

const isiPhoneModelWithNotch = (): boolean => {
const model = DeviceInfo.getDeviceId();
if (model.indexOf("iPhone") !== -1) {
switch (model) {
case "iPhone10,6": // iPhone X GSM
case "iPhone11,2": // iPhone XS
case "iPhone11,4": // iPhone XS Max
case "iPhone11,6": // iPhone XS Max Global
case "iPhone11,8": // Iphone XR
case "iPhone12,1": // Iphone 11
case "iPhone12,3": // Iphone 11 Pro
case "iPhone12,5": // Iphone 11 Pro Max
return true;
default:
return false;
}
}
return false;
};

export const defaultPaddings = { paddingBottom: isiPhoneModelWithNotch() ? 24 : 0 };
export const defaultMargins = { marginBottom: isiPhoneModelWithNotch() ? 24 : 0 };
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/gallery-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- Migrated device metrics utility to shared package for better code reusability.

## [2.3.0] - 2026-10-8

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions packages/pluggableWidgets/gallery-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gallery-native",
"widgetName": "Gallery",
"version": "2.3.0",
"version": "2.3.1",
"description": "A flexible gallery widget that renders columns, rows and layouts.",
"copyright": "© Mendix Technology BV 2022. All rights reserved.",
"license": "Apache-2.0",
Expand All @@ -22,9 +22,9 @@
"test": "pluggable-widgets-tools test:unit:native"
},
"dependencies": {
"@mendix/piw-native-utils-internal": "*",
"@mendix/piw-utils-internal": "*",
"@shopify/flash-list": "2.3.1",
"react-native-device-info": "15.0.2"
"@shopify/flash-list": "2.3.1"
},
"devDependencies": {
"@mendix/pluggable-widgets-tools": "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
useWindowDimensions
} from "react-native";
import { ObjectItem, DynamicValue } from "mendix";
import DeviceInfo from "react-native-device-info";
import { useDeviceMetrics } from "@mendix/piw-native-utils-internal";
import { GalleryStyle } from "../ui/Styles";
import { HorizontalItemSizingEnum, PaginationEnum, ScrollDirectionEnum } from "../../typings/GalleryProps";
import { isAvailable } from "@mendix/piw-utils-internal";
Expand Down Expand Up @@ -39,8 +39,9 @@ export interface GalleryProps<T extends ObjectItem> {
}

export const Gallery = <T extends ObjectItem>(props: GalleryProps<T>): ReactElement => {
const { isTablet } = useDeviceMetrics();
const isScrollDirectionVertical = props.scrollDirection === "vertical";
const numColumns = DeviceInfo.isTablet() ? props.tabletColumns : props.phoneColumns;
const numColumns = isTablet ? props.tabletColumns : props.phoneColumns;
const firstItemId = props.items?.[0]?.id;
const lastItemId = props.items?.[props.items.length - 1]?.id;
const { name, style, itemRenderer } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { ObjectItem, GUID, DynamicValue, ValueStatus } from "mendix";
import { render, fireEvent, act } from "@testing-library/react-native";
import { Gallery, GalleryProps } from "../Gallery";

jest.mock("react-native-device-info", () => ({ isTablet: jest.fn().mockReturnValue(false) }));
jest.mock("@mendix/piw-native-utils-internal", () => ({
useDeviceMetrics: () => ({ isTablet: false })
}));
jest.mock("@shopify/flash-list"); // Mocking FlashList API because it causes issues with the test renderer

const itemWrapperFunction =
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/gallery-native/src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Gallery" version="2.3.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Gallery" version="2.3.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Gallery.xml" />
</widgetFiles>
Expand Down
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/intro-screen-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- Migrated device metrics utility to shared package for better code reusability and removed static iPhone list for notch detection.

## [4.6.1] - 2026-11-20

### Added
Expand Down
Loading
Loading