UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

43 lines (42 loc) 2.18 kB
/** * DevExpress HTML/JS Reporting (designer\controls\utils\_metaUtils.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 */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var editorTemplates_1 = require("../../widgets/editorTemplates"); exports.createSinglePopularBindingInfos = function (propertyName) { return [exports.createPopularBindingInfo({ bindingName: propertyName, propertyName: '' }, false), exports.createPopularBindingInfo({ bindingName: propertyName, propertyName: '' })]; }; exports.createPopularBindingInfos = function (options) { var dataBindingOptions = { propertyName: 'popularDataBinding' + options.propertyName, displayName: options.propertyName, localizationId: options.localizationId, bindingName: options.propertyName, }; var expressionOptions = { propertyName: 'popularExpression' + options.propertyName, displayName: options.propertyName, localizationId: options.localizationId, bindingName: options.propertyName, }; return [exports.createPopularBindingInfo(dataBindingOptions, false), exports.createPopularBindingInfo(expressionOptions)]; }; exports.createPopularBindingInfo = function (options, isExpression) { if (isExpression === void 0) { isExpression = true; } var newInfo = { propertyName: options.propertyName || (isExpression ? 'popularExpression' : 'popularDataBinding'), displayName: options.displayName || (isExpression ? 'Expression' : 'Data Binding'), localizationId: options.localizationId || (isExpression ? 'DevExpress.XtraReports.UI.CalculatedField.Expression' : 'ReportStringId.STag_Name_DataBinding'), editor: isExpression ? editorTemplates_1.designerEditorTemplates.getEditor('reportexpression') : editorTemplates_1.designerEditorTemplates.getEditor('dataBinding'), }; if (isExpression) newInfo['expressionName'] = options.bindingName; else newInfo['bindingName'] = options.bindingName; return newInfo; };