Skip to content

Commit 32b8899

Browse files
Refactor image type generation and update version to 11.11.0
1 parent c6a4076 commit 32b8899

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/pluggable-widgets-tools/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### Added
1010

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

1313
### Changed
1414

packages/pluggable-widgets-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mendix/pluggable-widgets-tools",
3-
"version": "11.8.2",
3+
"version": "11.11.0",
44
"description": "Mendix Pluggable Widgets Tools",
55
"engines": {
66
"node": ">=20"

packages/pluggable-widgets-tools/src/typings-generator/generateClientTypes.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,8 @@ function toClientPropType(
131131
case "icon":
132132
return isNative ? "DynamicValue<NativeIcon>" : "DynamicValue<WebIcon>";
133133
case "image":
134-
if (prop.$.allowUpload === "true") {
135-
return isNative ? "EditableImageValue<NativeImage>" : "EditableImageValue<WebImage>";
136-
}
137-
return isNative ? "DynamicValue<NativeImage>" : "DynamicValue<WebImage>";
134+
const imageType = isNative ? "NativeImage" : "WebImage";
135+
return `${prop.$.allowUpload === "true" ? "EditableImageValue" : "DynamicValue"}<${imageType}>`;
138136
case "file":
139137
return prop.$.allowUpload ? "EditableFileValue" : "DynamicValue<FileValue>";
140138
case "datasource":

0 commit comments

Comments
 (0)