/** * DevExpress Analytics (widgets\formatstring\formatstringeditor.d.ts) * Version: 25.2.7 * Build date: May 5, 2026 * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import * as ko from 'knockout'; import { Disposable } from '../../serializer/disposable'; import { IStandardPattern } from './_patterns'; import { PopupService } from '../../property-grid/internal/_popupService'; import { ILocalizationInfo } from '../../property-grid/widgets/internal/_utils'; import { DxPromise } from '../../core/utils/_jqueryUtils'; export interface IPatternItem { name: string; canRemove: boolean; } export interface IFormatStringEditorActions { updatePreview?: (value: string, category: string, pattern: string) => DxPromise<_IFormatStringEditorPreviewResponse>; saveCustomPattern?: (category: string, pattern: string) => DxPromise; removeCustomPattern?: (category: string, pattern: string) => DxPromise; } export interface _IFormatStringEditorPreviewResponse { Result?: string; IsError?: boolean; } export declare class FormatStringEditor extends Disposable { private _standardPatternSource; private _customPatternSource; private _lastUpdatePreviewPromise; private _isDisabled; private _timeout; private okAction; private _createMainPopupButtons; private _convertArray; private _convertTypes; private _scrollToBottom; private _updateFormatList; private _updateSelection; private _setPreviewString; private _setErrorMessage; private _updatePreview; private _getGeneralPreview; private _wrapFormat; private _updateCanAddCustomFormat; private _initEditor; constructor(value: ko.Observable, disabled?: ko.Observable, defaultPatterns?: { [key: string]: IStandardPattern; }, customPatterns?: { [key: string]: Array; }, actions?: IFormatStringEditorActions, rtl?: ko.Observable, popupContainer?: string); updateInputText(propertyName: string, componentInstance: any): void; option(name: any, value?: any): any; updatePreview(value: string, category: string, pattern: string): DxPromise<_IFormatStringEditorPreviewResponse>; get customPatterns(): string[]; get isGeneralType(): boolean; getDisplayText(key: any): any; getPopupContainer(el: any): HTMLElement; onHiddenHandler: () => void; currentType: ko.Observable; setType: (e: { itemData: IPatternItem; }) => void; setFormat: (e: { itemData: IPatternItem; }) => void; types: Array; patternList: ko.ObservableArray; addCustomFormat: () => void; removeCustomFormat: (e: any) => void; canAddCustomFormat: ko.Observable; formatPrefix: ko.Observable; formatSuffix: ko.Observable; previewString: ko.Observable; formatResult: ko.Observable; selectedFormats: ko.Observable; selectedTypes: ko.Observable; popupService: PopupService; popupVisible: ko.Observable; buttonItems: Array; localizationIdMap: { [key: string]: ILocalizationInfo; }; }