@sap-ux/fe-mockserver-core
Advanced tools
Comparing version 1.1.76 to 1.1.77
@@ -460,3 +460,3 @@ "use strict"; | ||
if (drillStateProperty) { | ||
if (isLastLevel && ((_a = currentNode.$children) === null || _a === void 0 ? void 0 : _a.length) === 0) { | ||
if (((_a = currentNode.$children) === null || _a === void 0 ? void 0 : _a.length) === 0) { | ||
currentNode[drillStateProperty] = 'leaf'; | ||
@@ -537,11 +537,14 @@ } | ||
const nodeProperty = aggregationAnnotation.NodeProperty.$target.name; | ||
const adjustedData = this._mockData.map((item) => { | ||
const adjustedRowData = data.find((dataItem) => dataItem[nodeProperty] === item[nodeProperty]); | ||
if (adjustedRowData) { | ||
return { ...item, ...adjustedRowData, ...{ $inResultSet: true } }; | ||
} | ||
else { | ||
return { ...item, ...{ $inResultSet: false } }; | ||
} | ||
let adjustedData = data.map((adjustedRowData) => { | ||
const item = this._mockData.find((dataItem) => dataItem[nodeProperty] === adjustedRowData[nodeProperty]); | ||
return { ...item, ...adjustedRowData, ...{ $inResultSet: true } }; | ||
}); | ||
const restOfData = this._mockData | ||
.filter((item) => { | ||
return !data.find((dataItem) => dataItem[nodeProperty] === item[nodeProperty]); | ||
}) | ||
.map((item) => { | ||
return { ...item, ...{ $inResultSet: false } }; | ||
}); | ||
adjustedData = adjustedData.concat(restOfData); | ||
const hierarchyNodes = this.buildHierarchyTree(hierarchyQualifier, adjustedData); | ||
@@ -554,2 +557,8 @@ const sourceReference = aggregationAnnotation.ParentNavigationProperty.$target.referentialConstraint[0].sourceProperty; | ||
}); | ||
allRootNodes.sort((a) => { | ||
if (a.$rootDistance === undefined) { | ||
return -1; | ||
} | ||
return 1; | ||
}); | ||
const depth = parseInt(_parameters.Levels, 10); | ||
@@ -556,0 +565,0 @@ const hierarchyAnnotation = (_d = (_c = this._entityType.annotations) === null || _c === void 0 ? void 0 : _c.Hierarchy) === null || _d === void 0 ? void 0 : _d[`RecursiveHierarchy#${hierarchyQualifier}`]; |
@@ -37,5 +37,5 @@ "use strict"; | ||
exports.LOGICAL_OPERATOR = (0, chevrotain_1.createToken)({ name: 'Logical', pattern: /(:?eq|ne|lt|le|gt|ge)/ }); | ||
exports.ANDOR = (0, chevrotain_1.createToken)({ name: 'AndOr', pattern: /\s(:?and|or)\s/ }); | ||
exports.ASCDESC = (0, chevrotain_1.createToken)({ name: 'AscDesc', pattern: /\s(:?asc|desc)\s/ }); | ||
exports.WS = (0, chevrotain_1.createToken)({ name: 'Whitespace', pattern: /\s+/ }); | ||
exports.ANDOR = (0, chevrotain_1.createToken)({ name: 'AndOr', pattern: /(\s|%20)(:?and|or)(\s|%20)/ }); | ||
exports.ASCDESC = (0, chevrotain_1.createToken)({ name: 'AscDesc', pattern: /(:?asc|desc)/ }); | ||
exports.WS = (0, chevrotain_1.createToken)({ name: 'Whitespace', pattern: /(\s|%20)+/ }); | ||
// const STRINGLITERAL = createToken({ | ||
@@ -42,0 +42,0 @@ // name: 'SimpleIdentifier', |
{ | ||
"name": "@sap-ux/fe-mockserver-core", | ||
"version": "1.1.76", | ||
"version": "1.1.77", | ||
"description": "SAP Fiori OData - Fiori elements mock server core", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
543791
6283