devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
35 lines (34 loc) • 1.27 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\internal\_createObjectFromInfo.js)
* Version: 20.2.13
* Build date: Apr 10, 2023
* Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
;
Object.defineProperty(exports, "__esModule", { value: true });
function createObjectFromInfo(control, serializationsInfo) {
var newObj = undefined;
var newObjInfo = [];
serializationsInfo.forEach(function (info) {
if (control[info.propertyName]) {
if (newObj === undefined)
newObj = {};
newObj[info.propertyName] = control[info.propertyName];
newObjInfo.push(info);
}
});
if (!!newObj) {
newObj['getInfo'] = function () { return newObjInfo; };
}
return newObj;
}
exports.createObjectFromInfo = createObjectFromInfo;
function findFirstParentWithPropertyName(control, propertyName) {
var parent = control.parentModel && control.parentModel();
if (parent)
return parent[propertyName] ? parent : findFirstParentWithPropertyName(parent, propertyName);
else
return control.root;
}
exports.findFirstParentWithPropertyName = findFirstParentWithPropertyName;