devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
23 lines (22 loc) • 1.34 kB
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\services\_formatStringService.js)
* Version: 24.2.6
* Build date: Mar 18, 2025
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
import { sendRequest } from '@devexpress/analytics-core/analytics-internal';
import { HandlerUri } from '../utils/settings';
import { PrepareRequestArgs } from '@devexpress/analytics-core/analytics-utils';
export class FormatStringService {
static saveCustomPattern(typeString, format) {
return sendRequest(HandlerUri(), 'formatString', PrepareRequestArgs({ action: 'save', typeString: typeString, customFormatString: format }));
}
static removeCustomPattern(typeString, format) {
return sendRequest(HandlerUri(), 'formatString', PrepareRequestArgs({ action: 'remove', typeString: typeString, customFormatString: format }));
}
static updatePreview(value, typeString, format) {
return sendRequest(HandlerUri(), 'formatStringPreview', PrepareRequestArgs({ value: value, typeString: typeString, formatString: format }));
}
}
FormatStringService.actions = { updatePreview: FormatStringService.updatePreview, removeCustomPattern: FormatStringService.removeCustomPattern, saveCustomPattern: FormatStringService.saveCustomPattern };