File tree Expand file tree Collapse file tree
packages/pluggable-widgets-tools/src/typings-generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export interface Property {
5151 isDefault ?: string ;
5252 dataSource ?: string ;
5353 onChange ?: string ;
54+ allowUpload ?: string ;
5455 } ;
5556 caption ?: string [ ] ;
5657 category ?: string [ ] ;
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ const mxExports = [
1010 "DynamicValue" ,
1111 "EditableValue" ,
1212 "EditableListValue" ,
13+ "EditableFileValue" ,
14+ "EditableImageValue" ,
1315 "FileValue" ,
1416 "ListValue" ,
1517 "NativeIcon" ,
Original file line number Diff line number Diff line change @@ -128,12 +128,15 @@ function toClientPropType(
128128 return "number" ;
129129 case "decimal" :
130130 return "Big" ;
131- case "icon" :
131+ case "icon" :
132132 return isNative ? "DynamicValue<NativeIcon>" : "DynamicValue<WebIcon>" ;
133- case "image" :
134- return isNative ? "DynamicValue<NativeImage>" : "DynamicValue<WebImage>" ;
133+ case "image" : {
134+ const allowUpload = prop . $ . allowUpload === "true" ;
135+ const imageType = isNative ? "NativeImage" : "WebImage" ;
136+ return allowUpload ? `EditableImageValue<${ imageType } >` : `DynamicValue<${ imageType } >` ;
137+ }
135138 case "file" :
136- return "DynamicValue<FileValue>" ;
139+ return prop . $ . allowUpload ? "EditableFileValue<FileValue>" : "DynamicValue<FileValue>" ;
137140 case "datasource" :
138141 return "ListValue" ;
139142 case "attribute" : {
You can’t perform that action at this time.
0 commit comments