@sap-ux/edmx-parser
Advanced tools
Comparing version 0.8.1 to 0.8.2
# @sap-ux/edmx-parser | ||
## 0.8.2 | ||
### Patch Changes | ||
- cdce1a0: fix: improve support for Edm.Double | ||
## 0.8.1 | ||
@@ -4,0 +10,0 @@ |
@@ -65,2 +65,3 @@ "use strict"; | ||
case 'Edm.Decimal': | ||
case 'Edm.Double': | ||
edmProperty.defaultValue = parseFloat(entityProperty._attributes.DefaultValue); | ||
@@ -550,2 +551,7 @@ break; | ||
}; | ||
case 'Double': | ||
return { | ||
type: 'Double', | ||
Double: parseFloat(expression.Double) | ||
}; | ||
case 'Date': | ||
@@ -703,2 +709,10 @@ return { | ||
}; | ||
case 'Double': | ||
if (simplifyPrimitive) { | ||
return parseFloat(expression.Double._text); | ||
} | ||
return { | ||
type: 'Double', | ||
Decimal: parseFloat(expression.Double._text) | ||
}; | ||
case 'Path': | ||
@@ -705,0 +719,0 @@ return { |
{ | ||
"name": "@sap-ux/edmx-parser", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "SAP Fiori OData - EDMX File parser", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"devDependencies": { | ||
"@sap-ux/vocabularies-types": "0.11.3" | ||
"@sap-ux/vocabularies-types": "0.11.6" | ||
}, | ||
@@ -23,0 +23,0 @@ "scripts": { |
@@ -120,2 +120,3 @@ // eslint-disable-next-line @typescript-eslint/triple-slash-reference | ||
case 'Edm.Decimal': | ||
case 'Edm.Double': | ||
edmProperty.defaultValue = parseFloat(entityProperty._attributes.DefaultValue); | ||
@@ -780,2 +781,8 @@ break; | ||
}; | ||
case 'Double': | ||
return { | ||
type: 'Double', | ||
Double: parseFloat(expression.Double as string) | ||
}; | ||
case 'Date': | ||
@@ -954,2 +961,10 @@ return { | ||
}; | ||
case 'Double': | ||
if (simplifyPrimitive) { | ||
return parseFloat((expression.Double as any)._text as string); | ||
} | ||
return { | ||
type: 'Double', | ||
Decimal: parseFloat((expression.Double as any)._text as string) | ||
}; | ||
case 'Path': | ||
@@ -956,0 +971,0 @@ return { |
@@ -329,2 +329,3 @@ declare namespace EDMX { | ||
export type DecimalWrapper = Record<'Decimal', string>; | ||
export type DoubleWrapper = Record<'Double', string>; | ||
export type DurationWrapper = Record<'Duration', any>; | ||
@@ -379,2 +380,3 @@ export type EnumMemberWrapper = Record<'EnumMember', string>; | ||
DecimalWrapper & | ||
DoubleWrapper & | ||
DurationWrapper & | ||
@@ -414,2 +416,3 @@ EnumMemberWrapper & | ||
DecimalWrapper & | ||
DoubleWrapper & | ||
DurationWrapper & | ||
@@ -450,2 +453,3 @@ EnumMemberWrapper & | ||
export type DecimalCollectionWrapper = Record<'Decimal', number[]>; | ||
export type DoubleCollectionWrapper = Record<'Double', number[]>; | ||
export type DurationCollectionWrapper = Record<'Duration', any[]>; | ||
@@ -473,2 +477,3 @@ export type EnumMemberCollectionWrapper = Record<'EnumMember', any[]>; | ||
| DecimalCollectionWrapper | ||
| DoubleCollectionWrapper | ||
| DurationCollectionWrapper | ||
@@ -518,2 +523,3 @@ | EnumMemberCollectionWrapper | ||
Decimal?: string; | ||
Double?: string; | ||
} | ||
@@ -520,0 +526,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260863
4818