UNPKG

devexpress-reporting

Version:

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

45 lines (44 loc) 1.8 kB
/** * DevExpress HTML/JS Reporting (designer\services\_reportScriptService.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 settings_1 = require("../utils/settings"); var analytics_internal_1 = require("@devexpress/analytics-core/analytics-internal"); var $ = require("jquery"); var ReportScriptService = (function () { function ReportScriptService() { } ReportScriptService.validateScripts = function (report) { return analytics_internal_1.ajax(settings_1.HandlerUri(), 'validateScripts', encodeURIComponent(JSON.stringify({ report: JSON.stringify({ 'XtraReportsLayoutSerializer': report.serialize() }) }))); }; ReportScriptService.getCompletions = function (editor, session, pos, prefix, callback, report, editorInstance, guid) { if (guid) { return analytics_internal_1.ajax(settings_1.HandlerUri(), 'getCompletions', encodeURIComponent(JSON.stringify({ Line: pos.row, Column: pos.column, Guid: guid, Script: editorInstance.getValue() }))); } else { return $.Deferred().resolve().promise(); } }; ReportScriptService.setCodeDom = function (key, reportLayout) { return analytics_internal_1.ajax(settings_1.HandlerUri(), 'setReportLayout', encodeURIComponent(JSON.stringify({ ReportLayout: reportLayout, Key: key }))); }; return ReportScriptService; }()); exports.ReportScriptService = ReportScriptService;