devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
1,208 lines (1,201 loc) • 848 kB
TypeScript
import dxGallery from 'devextreme/ui/gallery';
import dxSelectBox from 'devextreme/ui/select_box';
/**
* DevExpress HTML/JS Analytics Core (dx-analytics-module-header.ts)
* Version: 19.1.4
* Build date: 2019-06-17
* Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/NetComponents.xml
*/
import 'jquery';
import 'jqueryui';
import * as ko from 'knockout'
import dxButton from 'devextreme/ui/button';
import dxTextBox from 'devextreme/ui/text_box';
import dxDropDownBox from 'devextreme/ui/drop_down_box';
import dxPopup from 'devextreme/ui/popup';
import { IOptions as dxPopupOptions } from 'devextreme/ui/popup';
import ArrayStore from 'devextreme/data/array_store';
import CustomStore from 'devextreme/data/custom_store';
import DataSource from 'devextreme/data/data_source';
/**
* DevExpress HTML/JS Analytics Core (dx-analytics-core.d.ts)
* Version: 19.1.4
* Build date: 2019-06-17
* Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/NetComponents.xml
*/
declare module DevExpress.Analytics {
module Internal {
function propertiesVisitor(target: any, visitor: (properties: any[]) => any, visited?: any[], skip?: Array<string>): void;
function checkModelReady(model: any): boolean;
}
module Utils {
interface IModelReady {
isModelReady: ko.Computed<boolean>;
}
class UndoEngine extends Disposable {
static _disposeUndoEngineSubscriptionsName: string;
static tryGetUndoEngine(object: any): UndoEngine;
private _groupObservers;
private _getInfoMethodName;
private _ignoredProperties;
private _groupPosition;
private _observers;
private _subscriptions;
private _targetSubscription;
private _visited;
private _position;
private _lockedPosition;
private _inUndoRedo;
private _model;
private readonly _modelReady;
private _disposeObserver;
private properyChanged;
private visitProperties;
private undoChangeSet;
private redoChangeSet;
private _disposeChilds;
private _createDisposeFunction;
private _callDisposeFunction;
private _cleanSubscribtions;
protected validatePropertyName(target: any, propertyName: string): string;
subscribeProperty(property: any, subscribeChilds: any): ko.Subscription;
subscribeProperties(properties: any): void;
subscribe(target: any, info?: any): any[];
private _removePropertiesSubscriptions;
constructor(target: any, ignoredProperties?: string[], getInfoMethodName?: string);
redoEnabled: ko.Observable<boolean>;
undoEnabled: ko.Observable<boolean>;
dispose(): void;
removeTargetSubscription(): void;
undoAll(): void;
reset(): void;
clearHistory(): void;
undo(): void;
redo(): void;
isIngroup: number;
isDirty: ko.Computed<boolean>;
start(): void;
end(): void;
}
}
}
declare module DevExpress.Analytics {
module Internal {
function _defineProperty(legacyObject: any, realObject: any, propertyName: any, newPropertyName?: any): void;
function _definePropertyByString(rootObject: any, ...objectPathes: string[]): void;
}
module Utils {
interface IDisposable {
dispose: () => void;
_disposables?: Array<ko.Subscription | ko.ComputedFunctions | IDisposable>;
}
class Disposable implements IDisposable {
_disposables: Array<ko.Subscription | ko.ComputedFunctions | IDisposable>;
isDisposing: boolean;
constructor();
disposeObservableArray(array: ko.ObservableArray<IDisposable>): void;
resetObservableArray(array: ko.ObservableArray<any>): void;
disposeArray(array: IDisposable[]): void;
dispose(): void;
removeProperties(): void;
}
function deserializeArray<T>(model: any, creator: (item: any) => any): ko.ObservableArray<T>;
function serializeDate(date: Date): string;
}
module Internal {
function knockoutArrayWrapper<T>(items?: any, ...onChange: Array<(array: any[], event?: string) => void>): ko.ObservableArray<T>;
function isPlainObject(obj: any): boolean;
function isEmptyObject(obj: any): boolean;
function extend(target: any, object1?: any, ...objectN: any[]): any;
function getPropertyValues(target?: any): any[];
}
module Utils {
interface IEditorInfo {
header?: string;
content?: string;
custom?: string;
editorType?: any;
extendedOptions?: any;
}
interface ISerializationInfo {
propertyName: string;
modelName?: string;
defaultVal?: any;
type?: ISerializableModelConstructor;
info?: ISerializationInfoArray;
from?: (val: any, serializer?: IModelSerializer) => any;
toJsonObject?: any;
array?: boolean;
link?: boolean;
editor?: IEditorInfo;
displayName?: string;
values?: {
[key: string]: string;
} | ko.Observable<{
[key: string]: string;
}>;
valuesArray?: Array<IDisplayedValue>;
initialize?: (viewModel: any, serilizer?: IModelSerializer) => void;
validationRules?: Array<any>;
editorOptions?: any;
localizationId?: string;
visible?: any;
disabled?: any;
valueStore?: any;
addHandler?: () => any;
alwaysSerialize?: boolean;
template?: string;
beforeSerialize?: (value: any) => any;
}
interface IDisplayedValue {
value: any;
displayValue: string;
localizationId?: string;
}
interface ISerializationInfoArray extends Array<ISerializationInfo> {
}
interface ISerializableModel {
_model?: any;
getInfo?: () => ISerializationInfoArray;
}
interface ISerializableModelConstructor extends ISerializableModel {
new (model?: any, serializer?: IModelSerializer, info?: ISerializationInfoArray): any;
}
interface IModelSerializerOptions {
useRefs?: boolean;
serializeDate?: (date: Date) => string;
}
interface IModelSerializer {
deserialize(viewModel: ISerializableModel, model: any, serializationsInfo?: ISerializationInfoArray): any;
serialize(viewModel: ISerializableModel, serializationsInfo?: ISerializationInfoArray, refs?: any): any;
}
class ModelSerializer implements IModelSerializer {
private _options;
private _refTable;
private _linkTable;
private linkObjects;
constructor(options?: IModelSerializerOptions);
deserializeProperty(modelPropertyInfo: ISerializationInfo, model: any): any;
deserialize(viewModel: Utils.ISerializableModel, model: any, serializationsInfo?: Utils.ISerializationInfoArray): void;
serialize(viewModel: Utils.ISerializableModel, serializationsInfo?: Utils.ISerializationInfoArray, refs?: any): any;
private _isSerializableValue;
private _serialize;
}
interface IEventHandler {
type: any;
value: (ev: any) => any;
}
class EventManager<Sender, EventType> extends Utils.Disposable {
dispose(): void;
private _handlers;
call<K extends keyof EventType>(type: K, args: EventType[K]): void;
addHandler<K extends keyof EventType>(type: K, listener: (this: Sender, ev: EventType[K]) => any): void;
removeHandler<K extends keyof EventType>(type: K, listener: (this: Sender, ev: EventType[K]) => any): void;
}
}
}
declare module DevExpress.Analytics {
module Internal {
var removeWinSymbols: boolean;
var Globalize: any;
var messages: {};
var custom_localization_values: {};
function selectPlaceholder(): any;
function noDataText(): any;
function resolveFromPromises<T>(promises: JQueryPromise<any>[], createModel: () => T): JQueryDeferred<T>;
function applyLocalizationToDevExtreme(currentCulture: string): void;
function isCustomizedWithUpdateLocalizationMethod(text: string): boolean;
function localize(val: string): any;
function formatDate(val: any): any;
function parseDate(val: any, useDefault?: boolean, format?: string): Date;
}
module Utils {
function addCultureInfo(json: {
messages: any;
}): void;
function _stringEndsWith(string: string, searchString: string): boolean;
function getLocalization(text: string, id?: string, _removeWinSymbols?: boolean): any;
function updateLocalization(object: {
[key: string]: string;
}): void;
}
module Localization {
function loadMessages(messages: {
[key: string]: string;
}): void;
}
module Internal {
var StringId: {
MasterDetailRelationsEditor: string;
DataAccessBtnOK: string;
DataAccessBtnCancel: string;
DataSourceWizardTitle: string;
WizardPageConfigureQuery: string;
};
interface ILocalizationInfo {
text: string;
localizationId: string;
}
interface IFileUploadOptions {
accept?: string;
type?: string;
readMode?: string;
}
interface IFileUploadResult {
content: string;
format: string;
}
function uploadFile(options: IFileUploadOptions): JQueryPromise<IFileUploadResult>;
function compareEditorInfo(editor1: any, editor2: any): boolean;
function findMatchesInString(textToTest: string, searchPattern: string): RegExpMatchArray;
function escapeToRegExp(string: String): string;
function formatUnicorn(text: string, ...args: any[]): string;
interface IModelAction {
action: (propertyName: string) => void;
title: string;
visible: (propertyName: string) => boolean;
}
interface IControlPropertiesViewModel {
isPropertyDisabled: (name: string) => boolean;
isPropertyVisible: (name: string) => boolean;
isPropertyModified: (name: string) => boolean;
controlType?: string;
actions: IModelAction[];
getInfo?: () => Analytics.Utils.ISerializationInfoArray;
}
interface IUndoEngine {
start: () => void;
end: () => void;
}
}
module Widgets {
var editorTemplates: any;
module Internal {
var propertiesGridEditorsPaddingLeft: number;
}
class Editor extends Utils.Disposable {
_setPadding(position: string, value: any): {};
_model: ko.Observable<Analytics.Internal.IControlPropertiesViewModel>;
isVisibleByContent: ko.Observable<boolean>;
isSearchedProperty: ko.Observable<boolean> | ko.Computed<boolean>;
isParentSearched: ko.Observable<boolean>;
rtl: boolean;
dispose(): void;
constructor(modelPropertyInfo: Analytics.Utils.ISerializationInfo, level: any, parentDisabled?: ko.Observable<boolean> | ko.Computed<boolean>, textToSearch?: any);
private _validatorInstance;
private _onValidatedHandler;
private _cachedValue;
private _assignValue;
private _isValid;
private _init;
findInfo(viewModel: any): any;
updateInfo(propertyInfo: Analytics.Utils.ISerializationInfo): boolean;
update(viewModel: Analytics.Internal.IControlPropertiesViewModel): void;
getOptions(templateOptions: any): any;
getValidationRules(): any[];
padding: any;
level: any;
textToSearch: ko.Observable<string> | ko.Computed<string>;
info: ko.Observable<Analytics.Utils.ISerializationInfo>;
name: string;
displayName: ko.Computed<string>;
templateName: string;
contentTemplateName: string;
editorTemplate: string;
viewmodel: any;
values: ko.Computed<{
displayValue: string;
value: string;
}[]>;
value: ko.Computed<any>;
isEditorSelected: ko.Observable<boolean>;
isPropertyModified: ko.Computed<boolean>;
disabled: ko.Computed<boolean>;
visible: ko.Computed<boolean>;
validatorInstance: any;
onValidatedHandler: any;
readonly validationRules: any[];
readonly onValidatorInitialized: (e: any) => void;
getPopupServiceActions(): Analytics.Internal.IModelAction[];
editorOptions: any;
defaultValue: any;
readonly isComplexEditor: boolean;
collapsed: ko.Observable<boolean>;
}
class PropertyGridEditor extends Editor {
constructor(info: Analytics.Utils.ISerializationInfo, level: any, parentDisabled?: ko.Computed<boolean>, textToSearch?: any);
createObjectProperties(): ObjectProperties;
visibleByName: ko.Computed<boolean>;
editorCreated: ko.Observable<boolean>;
}
class ObjectProperties extends Utils.Disposable {
private _targetSubscription;
private _infoSubscription;
private _getInfoComputed;
update(viewModel: Analytics.Internal.IControlPropertiesViewModel): void;
private _cleanEditorsSubscriptions;
dispose(): void;
cleanSubscriptions(): void;
cleanEditors(): void;
findEditorByInfo(serializationInfo: Analytics.Utils.ISerializationInfo): Editor;
createEditor(modelPropertyInfo: Analytics.Utils.ISerializationInfo): any;
createEditors(serializationInfo: Analytics.Utils.ISerializationInfoArray): any[];
private _createEditors;
protected _update(target: any, editorsInfo: any, recreateEditors: any): void;
constructor(target: ko.Observable<any> | ko.Computed<any>, editorsInfo?: {
editors?: Analytics.Utils.ISerializationInfoArray | ko.Observable<Analytics.Utils.ISerializationInfoArray> | ko.Computed<Analytics.Utils.ISerializationInfoArray>;
}, level?: number, parentDisabled?: ko.Observable<boolean> | ko.Computed<boolean>, recreateEditors?: boolean, textToSearch?: any);
level: number;
rtl: boolean;
getEditors(): Editor[];
_textToSearch: any;
visible: ko.Observable<boolean> | ko.Computed<boolean>;
_editors: ko.ObservableArray<Editor>;
private _parentDisabled;
}
}
module Internal {
class CodeResolver {
private _queue;
private _done;
done(callback: any): void;
execute(func: any, time?: number): JQueryPromise<{}>;
}
var globalResolver: CodeResolver;
}
module Widgets {
}
module Internal {
class PopupService {
data: ko.Observable<any>;
title: ko.Observable<string>;
visible: ko.Observable<boolean>;
actions: ko.ObservableArray<IModelAction>;
target: ko.Observable<any>;
}
interface IEditorAddon {
templateName: string;
data: EditorAddOn;
}
class EditorAddOn extends Utils.Disposable {
private _popupService;
private _editor;
private _updateActions;
constructor(editor: Widgets.Editor, popupService: PopupService);
showPopup: (_: any, element: any) => void;
visible: ko.Computed<boolean>;
editorMenuButtonCss: ko.Observable<string> | ko.Computed<string>;
templateName: string;
}
}
module Widgets {
class GuidEditor extends Editor {
getValidationRules(): any[];
}
module Internal {
function validateGuid(guid: any): boolean;
function validateNullableGuid(guid: any): boolean;
var guidValidationRules: {
type: string;
validationCallback: (options: any) => boolean;
message: () => any;
}[];
var guidRequiredValidationRules: {
type: string;
message: () => any;
}[];
var requiredValidationRules: {
type: string;
message: () => any;
}[];
}
module Internal {
class CollectionItemWrapper {
constructor(editor: any, array: any, index: ko.Observable<number> | ko.Computed<number>, displayNameField?: string);
editor: any;
index: ko.Observable<number> | ko.Computed<number>;
value: ko.Observable | ko.Computed;
collapsed: ko.Observable<boolean> | ko.Computed<boolean>;
name: ko.Observable<string> | ko.Computed<string>;
selected: ko.Observable<boolean> | ko.Computed<boolean>;
}
interface ICollectionEditorOptions {
values: ko.Observable<ko.ObservableArray<any>> | ko.Computed<ko.ObservableArray<any>>;
addHandler: () => any;
displayName?: string;
displayPropertyName?: string;
hideButtons?: any;
collapsed?: boolean;
undoEngine?: ko.Observable<Analytics.Internal.IUndoEngine> | ko.Computed<Analytics.Internal.IUndoEngine>;
level?: number;
info?: ko.Observable<Analytics.Utils.ISerializationInfo> | ko.Computed<Analytics.Utils.ISerializationInfo>;
template?: string;
editorTemplate?: string;
textEmptyArray?: Analytics.Internal.ILocalizationInfo;
isVisibleButton?: (index: any, buttonName: any) => boolean;
isDisabledButton?: (index: any, buttonName: any) => boolean;
}
class CollectionEditorViewModel {
private _textEmptyArray;
private _move;
options: any;
displayPropertyName: string;
constructor(options: ICollectionEditorOptions, disabled?: ko.Observable<boolean>);
getDisplayTextButton(key: string): any;
getDisplayTextEmptyArray(): any;
createCollectionItemWrapper(grandfather: any, index: any): CollectionItemWrapper;
buttonMap: {
[keyname: string]: Analytics.Internal.ILocalizationInfo;
};
isVisibleButton: (buttonName: any) => boolean;
isDisabledButton: (buttonName: any) => boolean;
padding: number;
values: ko.Observable<any[]> | ko.Computed<any[]>;
add: (model: any) => void;
up: (model: any) => void;
down: (model: any) => void;
remove: (model: any) => void;
select: (event: any) => void;
selectedIndex: ko.Observable<number>;
collapsed: ko.Observable<boolean> | ko.Computed<boolean>;
displayName: string;
alwaysShow: ko.Observable<boolean>;
showButtons: ko.Computed<boolean>;
disabled: ko.Observable<boolean> | ko.Computed<boolean>;
}
class dxEllipsisEditor extends dxTextBox {
_$button: JQuery;
_$buttonIcon: JQuery;
_modelByElement: any;
_koContext: any;
constructor(element: any, options?: any);
_init(): void;
_render(): void;
_renderButton(): void;
_updateButtonSize(): void;
_attachButtonEvents(): void;
_optionChanged(obj: any, value: any): void;
}
class dxFileImagePicker extends dxEllipsisEditor {
_filesinput: any;
constructor(element: any, options?: any);
_handleFiles(filesHolder: {
files: any;
}): void;
_$getInput(): JQuery;
_render(): void;
_renderInput(inputContainer: any): void;
_attachButtonEvents(): void;
_renderValue(): void;
}
var availableUnits: {
value: string;
displayValue: string;
localizationId: string;
}[];
class FontModel extends Utils.Disposable {
updateModel(value: string): void;
updateValue(value: any): void;
constructor(value: ko.Observable<string> | ko.Computed<string>);
family: ko.Observable<string>;
unit: ko.Observable<string>;
isUpdateModel: boolean;
size: ko.Observable<number>;
modificators: {
bold: ko.Observable<boolean>;
italic: ko.Observable<boolean>;
strikeout: ko.Observable<boolean>;
underline: ko.Observable<boolean>;
};
}
var availableFonts: ko.Observable<{
[key: string]: string;
}>;
}
class FontEditor extends PropertyGridEditor {
constructor(info: Analytics.Utils.ISerializationInfo, level: any, parentDisabled?: ko.Computed<boolean>, textToSearch?: any);
createObjectProperties(): ObjectProperties;
}
module Metadata {
var fontInfo: Utils.ISerializationInfoArray;
}
module Internal {
var extendedTemplates: (templates?: {
[key: string]: string;
}) => {
[key: string]: string;
};
var availableTemplates: {
[key: string]: string;
};
class SvgTemplatesEngine {
private static _instance;
private _engine;
private _data;
private _templates;
private _hasTemplate;
constructor();
private static readonly Instance;
static readonly templates: {
[key: string]: string;
};
static addTemplates(templates: any): void;
static getExistingTemplate(name: any): any;
makeTemplateSource: (template: any, doc: Document) => any;
}
function getTemplate(id: string): string;
}
}
}
declare module DevExpress.Analytics {
module Utils {
interface IPathRequest {
fullPath: string;
path: string;
ref?: string;
id?: string;
dataSource?: any;
state?: any;
pathParts?: string[];
}
class PathRequest implements IPathRequest {
pathParts: string[];
constructor(fullPath: string, pathParts?: string[]);
fullPath: string;
ref: string;
id: string;
path: string;
}
}
module Widgets {
module Internal {
class ValueEditorHelper {
private static _getCharFromKeyCode;
private static _getCaretPosition;
static editors: {
"integer": {
regExpEditing: RegExp;
};
"float": {
regExpEditing: RegExp;
};
"System.Byte": {
regExpEditing: RegExp;
minValue: any;
maxValue: string;
};
"System.SByte": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.Int16": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.UInt16": {
regExpEditing: RegExp;
minValue: any;
maxValue: string;
};
"System.Int32": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.UInt32": {
regExpEditing: RegExp;
minValue: any;
maxValue: string;
};
"System.Int64": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.UInt64": {
regExpEditing: RegExp;
minValue: any;
maxValue: string;
};
"System.Single": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.Double": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
"System.Decimal": {
regExpEditing: RegExp;
minValue: string;
maxValue: string;
};
};
private static _validate;
static validateWidgetValue(e: any, validate: (value: string) => boolean, defaultVal: string): void;
static getNumberEditorOptions(id: string, specifics: string, extendOptions?: {}): any;
static getValueEditorOptions(regExpEditing: RegExp, validate: (value: string) => boolean, defaultVal: string, extendOptions?: {}): any;
static isValid(id: string, specifics: string, value: string): boolean;
private static _invokeStandardHandler;
}
}
}
module Internal {
function integerValueConverter(val: any, defaultValue: any): any;
interface IValidateExpressionOptions {
fieldListProvider: Utils.IItemsProvider;
expression: string;
path: string;
rootItems?: string[];
}
function validateExpression(options: IValidateExpressionOptions): JQueryPromise<{}>;
function floatValueConverter(val: any, defaultValue: any): any;
function isDarkTheme(theme?: string): boolean;
function setCursorInFunctionParameter(paramCount: any, editor: any, insertValue: any): void;
function isList(data: Utils.IDataMemberInfo): boolean;
function getParentContainer(el: HTMLElement, container?: string): JQuery;
function isNullOrEmptyString(str: string): boolean;
}
module Utils {
interface IDataMemberInfo {
name: string;
displayName: string;
isList?: boolean;
specifics?: string;
isSelected?: boolean;
dataType?: string;
templateName?: string;
innerActions?: any;
noDragable?: any;
dragData?: any;
icon?: string;
}
interface IItemsProvider {
getItems: (path: IPathRequest) => JQueryPromise<IDataMemberInfo[]>;
getItemByPath?: (path: IPathRequest) => JQueryPromise<IDataMemberInfo>;
getValues?: (path: IPathRequest) => JQueryPromise<any[]>;
}
interface IHotKey {
ctrlKey: boolean;
keyCode: number;
}
interface IAction {
id?: string;
text: string;
textId?: string;
displayText?: () => string;
imageClassName: any;
imageTemplateName?: any;
container?: string;
clickAction: (model?: any) => void;
disabled?: ko.Observable<boolean> | ko.Computed<boolean>;
hotKey?: IHotKey;
hasSeparator?: boolean;
templateName?: string;
visible?: any;
zoomStep?: any;
zoomLevels?: any;
zoom?: any;
zoomItems?: any;
position?: number;
selected?: ko.Observable<boolean> | ko.Computed<boolean>;
displayExpr?: (val: any) => string;
onCustomItemCreating?: (e: {
text: string;
customItem: any;
}) => void;
}
}
module Widgets {
module Internal {
interface IAceEditor {
require(module: string): any;
edit(element: HTMLElement): any;
}
var ace: IAceEditor;
var aceAvailable: boolean;
}
module Internal {
interface IExpressionEditorItem {
text: string;
description?: string;
descriptionStringId?: string;
}
interface IExpressionEditorOperatorItem extends IExpressionEditorItem {
image?: string;
hasSeparator?: boolean;
}
var operatorNames: Array<IExpressionEditorOperatorItem>;
interface IExpressionEditorFunctionItem extends IExpressionEditorItem {
paramCount: number;
displayName?: string;
}
interface IExpressionEditorFunction {
display: string;
localizationId?: string;
items?: {
[key: string]: Array<IExpressionEditorFunctionItem>;
};
category?: string;
}
var functionDisplay: Array<IExpressionEditorFunction>;
function insertInFunctionDisplay(addins: any): Array<Internal.IExpressionEditorFunction>;
}
}
module Criteria {
class CriteriaOperator {
static operators(enums: any): any;
static parse(stringCriteria: string): CriteriaOperator;
static create(operatorType: any): CriteriaOperator;
static and(left: CriteriaOperator, right: CriteriaOperator): CriteriaOperator;
static or(left: CriteriaOperator, right: CriteriaOperator): CriteriaOperator;
static getNotValidRange(value: string, errorMessage: string): {
start: number;
end: number;
};
readonly displayType: string;
readonly enumType: any;
operatorType: any;
type: string;
operands: any;
create: (operatorType: any, field: CriteriaOperator) => CriteriaOperator;
remove: (operand: CriteriaOperator) => void;
change: (operandType: any, operand: CriteriaOperator, incorrectSpecificsForAggregate: boolean) => CriteriaOperator;
changeValueType: (type: any, location: Utils.IPropertyLocation) => CriteriaOperator;
changeValue: (operand: CriteriaOperator, reverse: boolean, location: Utils.IPropertyLocation) => CriteriaOperator;
assignLeftPart: (criteriaOperator: any) => any;
assignRightPart: (criteriaOperator: any) => any;
assignType: (type: any) => void;
readonly leftPart: any;
readonly rightPart: any;
resetrightPart: (value: any) => any;
assignFrom(criteriaOperator: any, incorrectSpecificsForAggregate?: boolean): void;
children(): any[];
accept(visitor: Utils.ICriteriaOperatorVisitor): CriteriaOperator;
}
}
module Widgets {
module Internal {
interface ICompletionRootItem {
name: string;
needPrefix?: boolean;
rootPath?: string;
}
interface ICodeCompletorOptions {
editor: any;
bindingContext: any;
fieldListProvider: Utils.IItemsProvider;
path: ko.Observable<string> | ko.Computed<string>;
functions?: Array<Internal.IExpressionEditorFunction> | ko.ObservableArray<Internal.IExpressionEditorFunction>;
rootItems?: Array<ICompletionRootItem>;
getRealExpression?: (path: string, member: string) => JQueryPromise<string>;
}
class CodeCompletor extends Utils.Disposable {
private _options;
private _fieldListProvider;
private _path;
private _editor;
private _contextPath;
private _functions;
private _rootItems;
private _isInContext;
private _getPath;
private _previousSymbol;
beforeInsertMatch(editor: any, token: any, parentPrefix: any): void;
insertMatch(editor: any, parentPrefix: any, fieldName: any): void;
generateFieldDisplayName(parentPrefix: any, displayName: any): string;
private _convertDataMemberInfoToCompletions;
private _combinePath;
private _getParentPrefix;
private _getRealPath;
private _getFields;
private static _cleanupFields;
getFunctionsCompletions(): any[];
getAggregateCompletions(): any[];
getOperatorCompletions(prefix: any): {
caption: string;
snippet: string;
meta: any;
}[];
private _addFunctions;
private _addAggregates;
private _addOperators;
private _addParameterOperators;
private _getOperands;
private _getOperandsOrOperators;
private _findStartContextTokenPosition;
private _findOpenedStartContext;
private _findOpenedAggregates;
private _getContextPath;
private _getCompletions;
defaultProcess(token: any, text: any, completions: any): JQueryPromise<{}>;
constructor(_options: ICodeCompletorOptions);
identifierRegexps: RegExp[];
getCompletions(aceEditor: any, session: any, pos: any, prefix: any, callback: any): void;
getDocTooltip(item: any): void;
}
function createFunctionCompletion(fnInfo: Internal.IExpressionEditorFunctionItem, name: string, insertValue?: string): {
caption: string;
snippet: string;
meta: any;
tooltip: any;
score: number;
completer: {
insertMatch: (editor: any, data: any) => void;
};
};
}
}
module Criteria {
module Utils {
interface IPropertyLocation {
index?: number;
name?: string;
}
var operatorTokens: {
"Plus": string;
"Minus": string;
"Equal": string;
"NotEqual": string;
"Greater": string;
"Less": string;
"LessOrEqual": string;
"GreaterOrEqual": string;
};
function criteriaForEach(operator: CriteriaOperator, callback: (operator: CriteriaOperator, path?: any) => void, path?: string): void;
interface ICriteriaOperatorVisitor {
visitGroupOperator?: (element: GroupOperator) => GroupOperator;
visitOperandProperty?: (element: OperandProperty) => OperandProperty;
visitConstantValue?: (element: ConstantValue) => ConstantValue;
visitOperandParameter?: (element: OperandParameter) => OperandParameter;
visitAggregateOperand?: (element: AggregateOperand) => AggregateOperand;
visitJoinOperand?: (element: JoinOperand) => JoinOperand;
visitBetweenOperator?: (element: BetweenOperator) => BetweenOperator;
visitInOperator?: (element: InOperator) => InOperator;
visitBinaryOperator?: (element: BinaryOperator) => BinaryOperator;
visitUnaryOperator?: (element: UnaryOperator) => UnaryOperator;
visitFunctionOperator?: (element: FunctionOperator) => FunctionOperator;
}
}
interface IOperandPropertyOptions {
propertyName: string;
startColumn: any;
startLine: any;
originalPropertyLength: any;
}
class OperandProperty extends CriteriaOperator {
constructor(propertyName?: string, startColumn?: number, startLine?: number, originalPropertyLength?: number);
readonly displayType: string;
propertyName: string;
originalPropertyLength: number;
type: string;
startPosition: {
line: number;
column: number;
};
accept(visitor: Utils.ICriteriaOperatorVisitor): OperandProperty;
}
}
module Utils {
interface IDisplayExpressionConverter {
toDisplayExpression(path: string, expression: string): JQueryPromise<string>;
toRealExpression(path: string, expression: string): JQueryPromise<string>;
}
interface IDisplayNameProvider {
getDisplayNameByPath: (path: string, dataMember: string) => JQueryPromise<string>;
getRealName: (path: string, displayDataMember: string) => JQueryPromise<string>;
}
}
module Internal {
class DisplayExpressionConverter implements Utils.IDisplayExpressionConverter {
private displayNameProvider;
private _replaceNames;
constructor(displayNameProvider: Utils.IDisplayNameProvider);
toDisplayExpression(path: string, expression: string): JQueryPromise<string>;
toRealExpression(path: string, expression: string): JQueryPromise<any>;
}
}
module Criteria {
class CriteriaOperatorPreprocessor {
_func: Array<(currentOperand: CriteriaOperator, options: {
operatorType: string;
options: any;
}) => CriteriaOperator>;
CriteriaOperator(): CriteriaOperator;
BinaryOperator(options: IBinaryOperatorOptions): BinaryOperator;
FunctionOperator(options: IFunctionOperatorProperties): FunctionOperator;
AggregateOperand(options: IAggregateOperandOptions): AggregateOperand;
GroupOperator(options: IGroupOperatorOptions): GroupOperator;
InOperator(options: IInOperatorOptions): InOperator;
ConstantValue(options: IOperandValueOptions): ConstantValue;
OperandValue(options: IOperandValueOptions): OperandValue;
OperandParameter(options: IOperandParameterOptions): OperandParameter;
OperandProperty(options: IOperandPropertyOptions): OperandProperty;
UnaryOperator(options: IUnaryOperatorOptions): UnaryOperator;
BetweenOperator(options: IBetweenOperatorOptions): BetweenOperator;
JoinOperator(options: IJoinOperandOptions): JoinOperand;
addListener(func: (currentOperand: CriteriaOperator, options: {
operatorType: string;
options: any;
}) => CriteriaOperator): void;
removeListener(func: (currentOperand: CriteriaOperator, options: {
operatorType: string;
options: any;
}) => CriteriaOperator): void;
process(operatorType: string, options: any): CriteriaOperator;
}
var criteriaCreator: CriteriaOperatorPreprocessor;
enum Aggregate {
Count = 0,
Exists = 1,
Min = 2,
Max = 3,
Avg = 4,
Sum = 5,
Single = 6
}
interface IAggregateOperandOptions {
property: CriteriaOperator;
aggregatedExpression: CriteriaOperator;
aggregateType: Aggregate;
condition: any;
}
class AggregateOperand extends CriteriaOperator {
constructor(property: CriteriaOperator, aggregatedExpression: CriteriaOperator, aggregateType: Aggregate, condition: any);
readonly displayType: string;
readonly enumType: typeof Aggregate;
readonly leftPart: CriteriaOperator;
children(): any[];
change: (operationType: any, item: CriteriaOperator) => any;
assignLeftPart: (criteriaOperator: any) => void;
property: CriteriaOperator;
condition: CriteriaOperator;
operatorType: Aggregate;
aggregatedExpression: any;
type: string;
accept(visitor: Utils.ICriteriaOperatorVisitor): AggregateOperand;
}
interface IBetweenOperatorOptions {
property: CriteriaOperator;
begin: CriteriaOperator;
end: CriteriaOperator;
}
class BetweenOperator extends CriteriaOperator {
constructor(property: CriteriaOperator, begin: CriteriaOperator, end: CriteriaOperator);
property: CriteriaOperator;
begin: CriteriaOperator;
end: CriteriaOperator;
readonly leftPart: CriteriaOperator;
readonly rightPart: CriteriaOperator[];
resetRightPart: (newVal: any) => void;
assignLeftPart: (criteriaOperator: any) => void;
assignRightPart: (criteriaOperator: any) => void;
readonly displayType: string;
operatorType: string;
readonly enumType: typeof BetweenOperator;
type: string;
accept(visitor: Utils.ICriteriaOperatorVisitor): BetweenOperator;
}
enum BinaryOperatorType {
Equal = 0,
NotEqual = 1,
Greater = 2,
Less = 3,
LessOrEqual = 4,
GreaterOrEqual = 5,
Like = 6,
BitwiseAnd = 7,
BitwiseOr = 8,
BitwiseXor = 9,
Divide = 10,
Modulo = 11,
Multiply = 12,
Plus = 13,
Minus = 14
}
interface IBinaryOperatorOptions {
left: CriteriaOperator;
right: CriteriaOperator;
operatorType: BinaryOperatorType;
}
class BinaryOperator extends CriteriaOperator {
constructor(left: CriteriaOperator, right: CriteriaOperator, operatorType: BinaryOperatorType);
readonly leftPart: CriteriaOperator;
readonly rightPart: CriteriaOperator;
assignLeftPart: (criteriaOperator: any) => void;
assignRightPart: (criteriaOperator: any) => void;
leftOperand: CriteriaOperator;
rightOperand: CriteriaOperator;
operatorType: BinaryOperatorType;
readonly displayType: any;
readonly enumType: typeof BinaryOperatorType;
type: string;
accept(visitor: Utils.ICriteriaOperatorVisitor): BinaryOperator;
}
interface IOperandValueOptions {
value: any;
}
class OperandValue extends CriteriaOperator {
private _processStringValue;
constructor(value?: any);
readonly displayType: any;
value: any;
type: string;
specifics: string;
}
class ConstantValue extends OperandValue {
constructor(value: any);
accept(visitor: Utils.ICriteriaOperatorVisitor): ConstantValue;
}
enum FunctionOperatorType {
None = 0,
Custom = 1,
CustomNonDeterministic = 2,
Iif = 3,
IsNull = 4,
IsNullOrEmpty = 5,
Trim = 6,
Len = 7,
Substring = 8,
Upper = 9,
Lower = 10,
Concat = 11,
Ascii = 12,
Char = 13,
ToStr = 14,
Replace = 15,
Reverse = 16,
Insert = 17,
CharIndex = 18,
Remove = 19,
Abs = 20,
Sqr = 21,
Cos = 22,
Sin = 23,
Atn = 24,
Exp = 25,
Log = 26,
Rnd = 27,
Tan = 28,
Power = 29,
Sign = 30,
Round = 31,
Ceiling = 32,
Floor = 33,
Max = 34,
Min = 35,
Acos = 36,
Asin = 37,
Atn2 = 38,
BigMul = 39,
Cosh = 40,
Log10 = 41,
Sinh = 42,
Tanh = 43,
PadLeft = 44,
PadRight = 45,
StartsWith = 46,
EndsWith = 47,
Contains = 48,
ToInt = 49,
ToLong = 50,
ToFloat = 51,
ToDouble = 52,
ToDecimal = 53,
LocalDateTimeThisYear = 54,
LocalDateTimeThisMonth = 55,
LocalDateTimeLastWeek = 56,
LocalDateTimeThisWeek = 57,
LocalDateTimeYesterday = 58,
LocalDateTimeToday = 59,
LocalDateTimeNow = 60,
LocalDateTimeTomorrow = 61,
LocalDateTimeDayAfterTomorrow = 62,
LocalDateTimeNextWeek = 63,
LocalDateTimeTwoWeeksAway = 64,
LocalDateTimeNextMonth = 65,
LocalDateTimeNextYear = 66,
IsOutlookIntervalBeyondThisYear = 67,
IsOutlookIntervalLaterThisYear = 68,
IsOutlookIntervalLaterThisMonth = 69,
IsOutlookIntervalNextWeek = 70,
IsOutlookIntervalLaterThisWeek = 71,
IsOutlookIntervalTomorrow = 72,
IsOutlookIntervalToday = 73,
IsOutlookIntervalYesterday = 74,
IsOutlookIntervalEarlierThisWeek = 75,
IsOutlookIntervalLastWeek = 76,
IsOutlookIntervalEarlierThisMonth = 77,
IsOutlookIntervalEarlierThisYear = 78,
IsOutlookIntervalPriorThisYear = 79,
IsThisWeek = 80,
IsThisMonth = 81,
IsThisYear = 82,
DateDiffTick = 83,
DateDiffSecond = 84,
DateDiffMilliSecond = 85,
DateDiffMinute = 86,
DateDiffHour = 87,
DateDiffDay = 88,
DateDiffMonth = 89,
DateDiffYear = 90,
GetDate = 91,
GetMilliSecond = 92,
GetSecond = 93,
GetMinute = 94,
GetHour = 95,
GetDay = 96,
GetMonth = 97,
GetYear = 98,
GetDayOfWeek = 99,
GetDayOfYear = 100,
GetTimeOfDay = 101,
Now = 102,
UtcNow = 103,
Today = 104,
AddTimeSpan = 105,
AddTicks = 106,
AddMilliSeconds = 107,
AddSeconds = 108,
AddMinutes = 109,
AddHours = 110,
AddDays = 111,
AddMonths = 112,
AddYears = 113,
OrderDescToken = 114
}
interface IFunctionOperatorProperties {
operatorType: FunctionOperatorType;
operands: any[];
}
class FunctionOperator extends CriteriaOperator {
constructor(operatorType: FunctionOperatorType, operands: any);
toString: (reverse: any) => string;
operatorType: FunctionOperatorType;
assignLeftPart: (criteriaOperator: any) => void;
assignRightPart: (criteriaOperator: any) => void;
readonly leftPart: any;
readonly rightPart: any[];
readonly displayType: string;
readonly enumType: typeof FunctionOperatorType;
operands: any[];
type: string;
accept(visitor: Utils.ICriteriaOperatorVisitor): FunctionOperator;
}
enum GroupOperatorType {
And = 0,
Or = 1
}
interface IGroupOperatorOptions {
operation: GroupOperatorType;
operands: Array<CriteriaOperator>;
}
class GroupOperator extends CriteriaOperator {
constructor(operation: GroupOperatorType, operands: Array<CriteriaOperator>);
static combine(operation: GroupOperatorType, operands: Array<Criteria