@ui5/dts-generator
Advanced tools
Comparing version 2.0.6 to 2.1.0
@@ -6,2 +6,9 @@ # Change Log | ||
# [2.1.0](https://github.com/SAP/ui5-typescript/compare/v2.0.6...v2.1.0) (2021-01-28) | ||
### Features | ||
- align set of allowedProperties with newer UI5 versions ([#218](https://github.com/SAP/ui5-typescript/issues/218)) ([e28646b](https://github.com/SAP/ui5-typescript/commit/e28646b8ac5734f886351074f41e7b100ac5f66f)) | ||
- Support UI5 interfaces extending classes or other interfaces ([#217](https://github.com/SAP/ui5-typescript/issues/217)) ([503fa56](https://github.com/SAP/ui5-typescript/commit/503fa56b37a8a350074fba1956e8786ae4976ae1)) | ||
## [2.0.6](https://github.com/SAP/ui5-typescript/compare/v2.0.5...v2.0.6) (2020-12-22) | ||
@@ -8,0 +15,0 @@ |
@@ -27,4 +27,5 @@ const _ = require("lodash"); | ||
"examples", | ||
// TODO: why does a namespace have an "extends" property? :) | ||
// TODO: why does a namespace have an "extends" or "implements" property? :) | ||
"extends", | ||
"implements", | ||
"final", | ||
@@ -181,13 +182,13 @@ "methods", | ||
"type", | ||
"parameterProperties", | ||
"optional", | ||
"defaultValue", | ||
"parameterProperties", // method parameters only | ||
"optional", // method parameters only | ||
"defaultValue", // properties only | ||
// from UI5 metadata for mSettings | ||
"group", | ||
"methods", | ||
"bindable", | ||
"parameters", | ||
"singularName", | ||
"cardinality", | ||
"dnd", | ||
"group", // properties only | ||
"methods", // properties, aggregations, associations, events only | ||
"bindable", // property and aggregation only | ||
"parameters", // events only | ||
"singularName", // aggregation and association only | ||
"cardinality", // aggregation and association only | ||
"dnd", // aggregations only | ||
// TODO: more magic new ways to describe types in UI5 | ||
@@ -198,2 +199,6 @@ // need to look into this property and its meaning | ||
"altTypes", | ||
// TODO: better separate different types of settings as they | ||
// have different sets of allowed properties | ||
"allowPreventDefault", // for events only | ||
"enableEventBubbling", // for events only | ||
], | ||
@@ -286,2 +291,9 @@ ui5ItemMeta | ||
const ui5ExtendsToArray = (ui5Extends) => { | ||
if (_.isArray(ui5Extends)) { | ||
return _.clone(ui5Extends); | ||
} | ||
return ui5Extends ? [ui5Extends] : []; | ||
}; | ||
/** | ||
@@ -292,3 +304,6 @@ * @param ui5Interface | ||
function buildInterface(ui5Interface) { | ||
assertKnownProps(["basename", "name", "methods", "events"], ui5Interface); | ||
assertKnownProps( | ||
["basename", "name", "extends", "methods", "events"], | ||
ui5Interface | ||
); | ||
@@ -298,4 +313,4 @@ const astNode = { | ||
name: ui5Interface.basename, | ||
// The input UI5 Interfaces never seem to extend any other interface. | ||
extends: [], | ||
// The input UI5 Interfaces either have no or a single 'extends', but might have multiple in future. | ||
extends: ui5ExtendsToArray(ui5Interface.extends), | ||
methods: _.map(ui5Interface.methods, buildFunction), | ||
@@ -302,0 +317,0 @@ // The input UI5 interfaces only have methods, never properties |
@@ -22,2 +22,3 @@ const _ = require("lodash"); | ||
"visibility", | ||
"allowedFor", | ||
]; | ||
@@ -24,0 +25,0 @@ function assertKnownProps(expectedPropNames, obj) { |
{ | ||
"name": "@ui5/dts-generator", | ||
"description": "Generates TypeScript Definitions from UI5 api.json files", | ||
"version": "2.0.6", | ||
"version": "2.1.0", | ||
"license": "Apache-2.0", | ||
@@ -23,3 +23,3 @@ "repository": { | ||
"prettier": "2.2.1", | ||
"sanitize-html": "2.3.0" | ||
"sanitize-html": "2.3.2" | ||
}, | ||
@@ -33,3 +33,3 @@ "scripts": { | ||
}, | ||
"gitHead": "d67b90e4866712b3b37dcc5046c1c209a7c3a108" | ||
"gitHead": "0b2f9616ef3fd6344a726049e63cdd81be5b3e0c" | ||
} |
87362
2027
+ Addedsanitize-html@2.3.2(transitive)
- Removedsanitize-html@2.3.0(transitive)
Updatedsanitize-html@2.3.2