Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions packages/pluggable-widgets-tools/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]

### Added

- We added support for the `allowUpload` attribute on image properties in native widgets, generating `EditableImageValue<NativeImage>` when enabled, introduced in Mendix 11.11.

Comment thread
mlaponder marked this conversation as resolved.
### Changed

- We changed the order of imports in generated widget prop types to match that of the eslint sort-imports rule.
Expand Down
2 changes: 1 addition & 1 deletion packages/pluggable-widgets-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mendix/pluggable-widgets-tools",
"version": "11.8.2",
"version": "11.11.0",
"description": "Mendix Pluggable Widgets Tools",
"engines": {
"node": ">=20"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const imageNativeOutput = `export interface MyWidgetProps<Style> {
style: Style[];
image: DynamicValue<NativeImage>;
image2?: DynamicValue<NativeImage>;
image3: DynamicValue<NativeImage>;
image3: EditableImageValue<NativeImage>;
description: EditableValue<string>;
action?: ActionValue;
}`;
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ function toClientPropType(
case "icon":
return isNative ? "DynamicValue<NativeIcon>" : "DynamicValue<WebIcon>";
case "image":
return isNative ? "DynamicValue<NativeImage>" : prop.$.allowUpload === "true" ? "EditableImageValue<WebImage>" : "DynamicValue<WebImage>";
const imageType = isNative ? "NativeImage" : "WebImage";
return `${prop.$.allowUpload === "true" ? "EditableImageValue" : "DynamicValue"}<${imageType}>`;
case "file":
return prop.$.allowUpload ? "EditableFileValue" : "DynamicValue<FileValue>";
case "datasource":
Expand Down
Loading