@easyquery/core 7.2.3-rc03 → 7.2.4-beta03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/easyquery.core.js +9353 -9335
- package/dist/bundles/easyquery.core.js.map +1 -1
- package/dist/bundles/easyquery.core.min.js +1 -1
- package/dist/bundles/easyquery.core.min.js.map +1 -1
- package/dist/lib/common/eq_services.d.ts +56 -56
- package/dist/lib/common/eq_services.js +159 -159
- package/dist/lib/common/query_param.d.ts +25 -25
- package/dist/lib/common/query_param.js +1 -0
- package/dist/lib/common/tree.d.ts +10 -10
- package/dist/lib/common/tree.js +57 -57
- package/dist/lib/data/eq_aggr_container.d.ts +24 -24
- package/dist/lib/data/eq_aggr_container.js +108 -108
- package/dist/lib/data/eq_aggr_container.js.map +1 -1
- package/dist/lib/data/eq_data_loader.d.ts +8 -8
- package/dist/lib/data/eq_data_loader.js +49 -49
- package/dist/lib/data/eq_data_loader.js.map +1 -1
- package/dist/lib/data/google_data_converter.d.ts +82 -82
- package/dist/lib/data/google_data_converter.js +173 -173
- package/dist/lib/data/google_data_converter.js.map +1 -1
- package/dist/lib/dm/aggr_function.d.ts +27 -27
- package/dist/lib/dm/aggr_function.js +42 -42
- package/dist/lib/dm/data_model.d.ts +330 -330
- package/dist/lib/dm/data_model.js +934 -932
- package/dist/lib/dm/data_model.js.map +1 -1
- package/dist/lib/dm/dto/af_data.d.ts +16 -16
- package/dist/lib/dm/dto/af_data.js +1 -0
- package/dist/lib/dm/dto/dm_data.d.ts +34 -34
- package/dist/lib/dm/dto/dm_data.js +1 -0
- package/dist/lib/dm/dto/entity_data.d.ts +37 -37
- package/dist/lib/dm/dto/entity_data.js +1 -0
- package/dist/lib/dm/dto/operator_data.d.ts +44 -44
- package/dist/lib/dm/dto/operator_data.js +1 -0
- package/dist/lib/dm/dto/ve_data.d.ts +10 -10
- package/dist/lib/dm/dto/ve_data.js +1 -0
- package/dist/lib/dm/entity.d.ts +71 -71
- package/dist/lib/dm/entity.js +90 -88
- package/dist/lib/dm/entity.js.map +1 -1
- package/dist/lib/dm/link.d.ts +7 -7
- package/dist/lib/dm/link.js +1 -0
- package/dist/lib/dm/operator.d.ts +80 -80
- package/dist/lib/dm/operator.js +93 -93
- package/dist/lib/dm/value_editor.d.ts +16 -16
- package/dist/lib/dm/value_editor.js +43 -41
- package/dist/lib/dm/value_editor.js.map +1 -1
- package/dist/lib/eqs/eqs_data_fetcher.d.ts +7 -7
- package/dist/lib/eqs/eqs_data_fetcher.js +36 -36
- package/dist/lib/eqs/eqs_exporter.d.ts +10 -10
- package/dist/lib/eqs/eqs_exporter.js +57 -54
- package/dist/lib/eqs/eqs_exporter.js.map +1 -1
- package/dist/lib/eqs/eqs_model_loader.d.ts +7 -7
- package/dist/lib/eqs/eqs_model_loader.js +42 -40
- package/dist/lib/eqs/eqs_model_loader.js.map +1 -1
- package/dist/lib/eqs/eqs_query_file_loader.d.ts +9 -9
- package/dist/lib/eqs/eqs_query_file_loader.js +54 -54
- package/dist/lib/eqs/eqs_query_file_loader.js.map +1 -1
- package/dist/lib/eqs/eqs_query_synchronizer.d.ts +7 -7
- package/dist/lib/eqs/eqs_query_synchronizer.js +23 -23
- package/dist/lib/eqs/eqs_value_list_resolver.d.ts +7 -7
- package/dist/lib/eqs/eqs_value_list_resolver.js +28 -28
- package/dist/lib/export/exporter.d.ts +16 -16
- package/dist/lib/export/exporter.js +1 -0
- package/dist/lib/i18n/text_resources.d.ts +1 -1
- package/dist/lib/i18n/text_resources.js +26 -26
- package/dist/lib/i18n/text_resources.js.map +1 -1
- package/dist/lib/main/action.d.ts +13 -13
- package/dist/lib/main/action.js +5 -5
- package/dist/lib/main/context.d.ts +342 -342
- package/dist/lib/main/context.js +1439 -1438
- package/dist/lib/main/context.js.map +1 -1
- package/dist/lib/main/context_options.d.ts +145 -145
- package/dist/lib/main/context_options.js +1 -0
- package/dist/lib/main/data_fetcher.d.ts +46 -46
- package/dist/lib/main/data_fetcher.js +1 -0
- package/dist/lib/main/eq_actions.d.ts +14 -14
- package/dist/lib/main/eq_actions.js +15 -15
- package/dist/lib/main/list_cache.d.ts +8 -8
- package/dist/lib/main/list_cache.js +1 -0
- package/dist/lib/main/model_loader.d.ts +21 -21
- package/dist/lib/main/model_loader.js +32 -32
- package/dist/lib/main/model_storage.d.ts +13 -13
- package/dist/lib/main/model_storage.js +17 -17
- package/dist/lib/main/query_file_loader.d.ts +15 -15
- package/dist/lib/main/query_file_loader.js +1 -0
- package/dist/lib/main/query_storage.d.ts +58 -58
- package/dist/lib/main/query_storage.js +124 -124
- package/dist/lib/main/query_synchronizer.d.ts +9 -9
- package/dist/lib/main/query_synchronizer.js +1 -0
- package/dist/lib/main/value_list_resolver.d.ts +18 -18
- package/dist/lib/main/value_list_resolver.js +1 -0
- package/dist/lib/main/widget.d.ts +74 -74
- package/dist/lib/main/widget.js +101 -101
- package/dist/lib/public_api.d.ts +58 -58
- package/dist/lib/public_api.js +59 -42
- package/dist/lib/public_api.js.map +1 -1
- package/dist/lib/query/condition.d.ts +97 -97
- package/dist/lib/query/condition.js +331 -331
- package/dist/lib/query/descriptors.d.ts +36 -36
- package/dist/lib/query/descriptors.js +1 -0
- package/dist/lib/query/dto/condition_data.d.ts +38 -38
- package/dist/lib/query/dto/condition_data.js +1 -0
- package/dist/lib/query/dto/expression_data.d.ts +32 -32
- package/dist/lib/query/dto/expression_data.js +1 -0
- package/dist/lib/query/dto/query_column_data.d.ts +28 -28
- package/dist/lib/query/dto/query_column_data.js +1 -0
- package/dist/lib/query/dto/query_data.d.ts +27 -27
- package/dist/lib/query/dto/query_data.js +1 -0
- package/dist/lib/query/expression.d.ts +69 -69
- package/dist/lib/query/expression.js +202 -202
- package/dist/lib/query/query.d.ts +410 -410
- package/dist/lib/query/query.js +1393 -1391
- package/dist/lib/query/query.js.map +1 -1
- package/dist/lib/query/query_column.d.ts +70 -70
- package/dist/lib/query/query_column.js +157 -157
- package/dist/lib/query/query_events.d.ts +29 -29
- package/dist/lib/query/query_events.js +19 -19
- package/dist/lib/types/cond_part.d.ts +6 -6
- package/dist/lib/types/cond_part.js +7 -7
- package/dist/lib/types/cond_tag.d.ts +12 -12
- package/dist/lib/types/cond_tag.js +13 -13
- package/dist/lib/types/data_kind.d.ts +15 -15
- package/dist/lib/types/data_kind.js +16 -16
- package/dist/lib/types/eq_editor_tag.d.ts +17 -17
- package/dist/lib/types/eq_editor_tag.js +20 -20
- package/dist/lib/types/expr_tag.d.ts +19 -19
- package/dist/lib/types/expr_tag.js +20 -20
- package/dist/lib/types/link_type.d.ts +17 -17
- package/dist/lib/types/link_type.js +18 -18
- package/dist/lib/types/widget_group.d.ts +17 -17
- package/dist/lib/types/widget_group.js +18 -18
- package/dist/lib/utils/constants.d.ts +36 -36
- package/dist/lib/utils/constants.js +50 -50
- package/dist/lib/utils/format_parser.d.ts +40 -40
- package/dist/lib/utils/format_parser.js +87 -87
- package/dist/lib/utils/utils.d.ts +34 -34
- package/dist/lib/utils/utils.js +102 -102
- package/dist/lib/utils/version_info.d.ts +9 -9
- package/dist/lib/utils/version_info.js +12 -12
- package/dist/lib/utils/version_info.js.map +1 -1
- package/package.json +16 -16
- package/webpack.config.js +6 -5
|
@@ -1,410 +1,410 @@
|
|
|
1
|
-
import { EqEvent, AggregationColumnStore, AggregationSettings } from '@easydata/core';
|
|
2
|
-
import { DataModel } from '../dm/data_model';
|
|
3
|
-
import { Operator } from '../dm/operator';
|
|
4
|
-
import { EntityAttr } from '../dm/entity';
|
|
5
|
-
import { QueryColumn } from './query_column';
|
|
6
|
-
import { Condition } from './condition';
|
|
7
|
-
import { ExprTag } from '../types/expr_tag';
|
|
8
|
-
import { CondTag } from '../types/cond_tag';
|
|
9
|
-
import { QueryData } from './dto/query_data';
|
|
10
|
-
import { ModelPlainData } from '../dm/dto/dm_data';
|
|
11
|
-
import { ColumnDescriptor, SimpleConditionDescriptor, ConditionGroupDescriptor } from './descriptors';
|
|
12
|
-
import { QueryChangeEventParams, QueryChangeAction } from './query_events';
|
|
13
|
-
/**
|
|
14
|
-
* The error that appears when the query is not valid
|
|
15
|
-
*/
|
|
16
|
-
export declare class InvalidQueryError extends Error {
|
|
17
|
-
/**
|
|
18
|
-
* Creates an instance of error type.
|
|
19
|
-
* @param message The error message
|
|
20
|
-
*/
|
|
21
|
-
constructor(message: string);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Represents query options.
|
|
25
|
-
*/
|
|
26
|
-
export interface QueryOptions {
|
|
27
|
-
parent?: Query;
|
|
28
|
-
attrTag?: ExprTag;
|
|
29
|
-
clientListRequestHandler?: any;
|
|
30
|
-
serverListRequestHandler?: any;
|
|
31
|
-
}
|
|
32
|
-
export interface ValidateQueryOptions {
|
|
33
|
-
checkExpressions?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export
|
|
36
|
-
changeStatus?: boolean;
|
|
37
|
-
validate?: boolean;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Represents Query.
|
|
41
|
-
*/
|
|
42
|
-
export declare class Query implements AggregationColumnStore {
|
|
43
|
-
private id;
|
|
44
|
-
private name;
|
|
45
|
-
private description;
|
|
46
|
-
private root;
|
|
47
|
-
private columns;
|
|
48
|
-
private justsorted;
|
|
49
|
-
protected extraConditions: Condition;
|
|
50
|
-
/**
|
|
51
|
-
* Current timezone offset (it's sent to the server for proper date/time values processing).
|
|
52
|
-
*/
|
|
53
|
-
timezoneOffset: number;
|
|
54
|
-
/**
|
|
55
|
-
* Contains user-defined extra data for current query.
|
|
56
|
-
*/
|
|
57
|
-
extraData: any;
|
|
58
|
-
innerData: any;
|
|
59
|
-
/**
|
|
60
|
-
* The Data Model associated with this query.
|
|
61
|
-
*/
|
|
62
|
-
model: DataModel;
|
|
63
|
-
private eventEmitter;
|
|
64
|
-
/**
|
|
65
|
-
* The attributec class name (Tag).
|
|
66
|
-
*/
|
|
67
|
-
attributeExprTag: ExprTag;
|
|
68
|
-
clientListRequestHandler: any;
|
|
69
|
-
serverListRequestHandler: any;
|
|
70
|
-
isNewbie: boolean;
|
|
71
|
-
private _isModified;
|
|
72
|
-
private _enableAggregation;
|
|
73
|
-
private parentQuery;
|
|
74
|
-
private drillDowns;
|
|
75
|
-
private aggrSettings;
|
|
76
|
-
isModified(): boolean;
|
|
77
|
-
resetModified(): void;
|
|
78
|
-
get enableAggregation(): boolean;
|
|
79
|
-
set enableAggregation(value: boolean);
|
|
80
|
-
/**
|
|
81
|
-
* The default constructor.
|
|
82
|
-
* @param model The data model.
|
|
83
|
-
* @param data JSON representation object.
|
|
84
|
-
* @param options The options.
|
|
85
|
-
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
86
|
-
*/
|
|
87
|
-
constructor(model?: DataModel, data?: QueryData, options?: QueryOptions);
|
|
88
|
-
protected updateAggregationSettings(): boolean;
|
|
89
|
-
createSubQuery(): Query;
|
|
90
|
-
useAggregation(settingsTuner: (settings: AggregationSettings) => void, silent?: boolean): void;
|
|
91
|
-
useDefaultAggregation(): void;
|
|
92
|
-
private processQueryForAggregation;
|
|
93
|
-
getAggregationSettings(): AggregationSettings;
|
|
94
|
-
getColumnIds(from: number, to?: number): string[];
|
|
95
|
-
/**
|
|
96
|
-
* Checks if the columns with IDs passed in function's parameter exist and are valid
|
|
97
|
-
*/
|
|
98
|
-
validateColumns(colIds: string[]): boolean;
|
|
99
|
-
validateAggregate(colId: string, funcId: string): boolean;
|
|
100
|
-
isEx(): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Resets the query: clears all its conditions and columns, regenerate the ID and sets the default name.
|
|
103
|
-
* @param silent Indicates whether we need to avoid firing the QueryChanged event.
|
|
104
|
-
*/
|
|
105
|
-
reset(clearQuery?: boolean): void;
|
|
106
|
-
hasEnabledAggrColumns(): boolean;
|
|
107
|
-
setDefaultName(): string;
|
|
108
|
-
/**
|
|
109
|
-
* Validates wether the query corresponds to the model.
|
|
110
|
-
* @param options Validate options.
|
|
111
|
-
* @throws {InvalidQueryError} If query is not valid.
|
|
112
|
-
*/
|
|
113
|
-
validate(options?: ValidateQueryOptions): void;
|
|
114
|
-
getAggregatedColumns(): QueryColumn[];
|
|
115
|
-
/**
|
|
116
|
-
* Validates wether the query corresponds to the model.
|
|
117
|
-
* @param options Validate options.
|
|
118
|
-
* @returns `true` if it is valid, otherwise `false`
|
|
119
|
-
*/
|
|
120
|
-
tryValidate(options?: ValidateQueryOptions): boolean;
|
|
121
|
-
private validateConditionGroup;
|
|
122
|
-
/**
|
|
123
|
-
* Sets data to the query.
|
|
124
|
-
* @param data JSON representation object or JSON string
|
|
125
|
-
* @param changeStatus Indicate whether we should change the "isModified" status (by default == `true`)
|
|
126
|
-
*/
|
|
127
|
-
loadFromDataOrJson(data: QueryData | string, options?: LoadQueryFromDataOptions): void;
|
|
128
|
-
/**
|
|
129
|
-
* Loads query from JSON.
|
|
130
|
-
* @param json The JSON string.
|
|
131
|
-
* @param options The options.
|
|
132
|
-
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
133
|
-
*/
|
|
134
|
-
loadFromJson(json: string, options?: LoadQueryFromDataOptions): void;
|
|
135
|
-
/**
|
|
136
|
-
* Loads query from data representation.
|
|
137
|
-
* @param data The query DTO.
|
|
138
|
-
* @param options The options.
|
|
139
|
-
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
140
|
-
*/
|
|
141
|
-
loadFromData(data: QueryData, options?: LoadQueryFromDataOptions): void;
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
addDrillDown(): Query;
|
|
146
|
-
getDrillDowns(): Array<Query>;
|
|
147
|
-
getParentQuery(): Query | null;
|
|
148
|
-
/**
|
|
149
|
-
*
|
|
150
|
-
*/
|
|
151
|
-
findColumnById(colId: string): QueryColumn | null;
|
|
152
|
-
/**
|
|
153
|
-
* Gets DataModel object associated with this query.
|
|
154
|
-
* @retruns The data model.
|
|
155
|
-
*/
|
|
156
|
-
getModel(): DataModel;
|
|
157
|
-
/**
|
|
158
|
-
* Sets DataModel object associated with this query.
|
|
159
|
-
* @param model The data model.
|
|
160
|
-
*/
|
|
161
|
-
setModel(model: DataModel): void;
|
|
162
|
-
/**
|
|
163
|
-
* Loads data model.
|
|
164
|
-
* @param model JSON representation object or JSON string.
|
|
165
|
-
*/
|
|
166
|
-
loadModelData(model: ModelPlainData | string): void;
|
|
167
|
-
/**
|
|
168
|
-
* Returns JSON representation of this query.
|
|
169
|
-
* @retruns JSON string.
|
|
170
|
-
*/
|
|
171
|
-
toJSON(): string;
|
|
172
|
-
/**
|
|
173
|
-
* Returns JSON representation of this query.
|
|
174
|
-
* @retruns JSON representation object.
|
|
175
|
-
*/
|
|
176
|
-
toJSONData(): QueryData;
|
|
177
|
-
/**
|
|
178
|
-
* Checks wether query does not contains any condtion.
|
|
179
|
-
* @retruns `true` if query does not contain any condition, otherwise `false`.
|
|
180
|
-
*/
|
|
181
|
-
isEmptyConditions(): boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Checks wether query does not contains any column.
|
|
184
|
-
* @retruns `true` if query does not contain any column, otherwise `false`.
|
|
185
|
-
*/
|
|
186
|
-
isEmptyColumns(): boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Checks wether query does not contains any column and any condition.
|
|
189
|
-
* @retruns `true` if query does not contain any column and any condition, otherwise `false`.
|
|
190
|
-
*/
|
|
191
|
-
isEmpty(): boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Clears the query (all conditions, columns, extraData, etc).
|
|
194
|
-
*/
|
|
195
|
-
clear(): void;
|
|
196
|
-
/**
|
|
197
|
-
* Clears all columns in query
|
|
198
|
-
*/
|
|
199
|
-
clearColumns(): void;
|
|
200
|
-
/**
|
|
201
|
-
* Clears all conditions in query.
|
|
202
|
-
*/
|
|
203
|
-
clearConditions(): void;
|
|
204
|
-
/**
|
|
205
|
-
* Clears all extra conditions in query
|
|
206
|
-
*/
|
|
207
|
-
clearExtraConditions(): void;
|
|
208
|
-
/**
|
|
209
|
-
* Clears all drill downs
|
|
210
|
-
*/
|
|
211
|
-
clearDrillDowns(): void;
|
|
212
|
-
/**
|
|
213
|
-
* Gets query ID.
|
|
214
|
-
* @returns The ID>
|
|
215
|
-
*/
|
|
216
|
-
getId(): string;
|
|
217
|
-
/**
|
|
218
|
-
* Sets query ID.
|
|
219
|
-
* @param id New Query ID.
|
|
220
|
-
*/
|
|
221
|
-
setId(id: string): void;
|
|
222
|
-
/**
|
|
223
|
-
* Regenerates current query ID.
|
|
224
|
-
* @param id New Query ID.
|
|
225
|
-
*/
|
|
226
|
-
regenerateId(): void;
|
|
227
|
-
/**
|
|
228
|
-
* Gets name of the query.
|
|
229
|
-
* @retruns The name.
|
|
230
|
-
*/
|
|
231
|
-
getName(): string;
|
|
232
|
-
/**
|
|
233
|
-
* Sets name of the query
|
|
234
|
-
* @param name New name.
|
|
235
|
-
*/
|
|
236
|
-
setName(name: string): void;
|
|
237
|
-
/**
|
|
238
|
-
* Gets description of the query.
|
|
239
|
-
* @retruns The description.
|
|
240
|
-
*/
|
|
241
|
-
getDescription(): string;
|
|
242
|
-
/**
|
|
243
|
-
* Sets description of the query
|
|
244
|
-
* @param description New description.
|
|
245
|
-
*/
|
|
246
|
-
setDescription(description: string): void;
|
|
247
|
-
/**
|
|
248
|
-
* Get array of columns.
|
|
249
|
-
* @retruns Columns.
|
|
250
|
-
*/
|
|
251
|
-
getColumns(): QueryColumn[];
|
|
252
|
-
/**
|
|
253
|
-
* Gets array of columns that are used as keys
|
|
254
|
-
* for totals.
|
|
255
|
-
*/
|
|
256
|
-
getUsedInTotalsColumns(): QueryColumn[];
|
|
257
|
-
/**
|
|
258
|
-
* Get array of columns used only in sorting.
|
|
259
|
-
* @retruns Columns.
|
|
260
|
-
*/
|
|
261
|
-
getJustSortedColumns(): QueryColumn[];
|
|
262
|
-
/**
|
|
263
|
-
* Gets array of columns used in sorting
|
|
264
|
-
* @retruns Columns
|
|
265
|
-
*/
|
|
266
|
-
getSortedColumns(): QueryColumn[];
|
|
267
|
-
/**
|
|
268
|
-
* Gets Colummn sorting index.
|
|
269
|
-
* @param col The column.
|
|
270
|
-
* @retruns The index.
|
|
271
|
-
*/
|
|
272
|
-
getColumnSortIndex(col: QueryColumn): number;
|
|
273
|
-
createColumn(justsorted?: boolean): QueryColumn;
|
|
274
|
-
getColumnById(id: string): QueryColumn;
|
|
275
|
-
/**
|
|
276
|
-
* Adds a new column with specified parameters
|
|
277
|
-
* @param desriptor The descriptor of the new column. Can contain different parameters like:
|
|
278
|
-
* `attribute` - a reference to a EntityAttr object,
|
|
279
|
-
* `attributeId` - an ID of the entity attribute we need (if we don't indicate `attribute`),
|
|
280
|
-
* `index`, sorting`, 'sortIndex` and other
|
|
281
|
-
*
|
|
282
|
-
* @param author The author of this operation. This parameter is used in EasyQuery widgets only to indicate which of the initiates the change.
|
|
283
|
-
* @retruns The column.
|
|
284
|
-
* @example
|
|
285
|
-
* query.addColumn({
|
|
286
|
-
* attributeId: 'Customers.CompanyName',
|
|
287
|
-
* sortIndex: SortDirection.Ascending
|
|
288
|
-
* }});
|
|
289
|
-
*/
|
|
290
|
-
addColumn(descriptor: ColumnDescriptor, author?: string): QueryColumn;
|
|
291
|
-
/**
|
|
292
|
-
* Adds a new column with specified index.
|
|
293
|
-
* @param column The column or array of columns
|
|
294
|
-
* @param index The index of new column
|
|
295
|
-
* @param author The author.
|
|
296
|
-
* @example
|
|
297
|
-
* const column = new Column();
|
|
298
|
-
* column.caption = "Company name";
|
|
299
|
-
*
|
|
300
|
-
* query.addColumn(column, 1)
|
|
301
|
-
*/
|
|
302
|
-
addColumnObj(column: QueryColumn | QueryColumn[], index: any, author: any): void;
|
|
303
|
-
/**
|
|
304
|
-
* Changes column to Aggregate function, custom expression or simple column.
|
|
305
|
-
* @param column The column to change.
|
|
306
|
-
* @param tag New column expression tag.
|
|
307
|
-
* @param args The arguments (Contains aggregate function id)
|
|
308
|
-
*/
|
|
309
|
-
changeColumnType(column: QueryColumn, tag: ExprTag, args?: any): void;
|
|
310
|
-
/**
|
|
311
|
-
* Moves the column with specified index to another position.
|
|
312
|
-
* @param index1 The index of the column that should be moved.
|
|
313
|
-
* @param index2 The index of the position the column should be moved to
|
|
314
|
-
* @param author The author
|
|
315
|
-
*/
|
|
316
|
-
moveColumn(index1: number, index2: number): void;
|
|
317
|
-
/**
|
|
318
|
-
* Removes the column.
|
|
319
|
-
* @param column The column to be removed.
|
|
320
|
-
* @param author The author
|
|
321
|
-
*/
|
|
322
|
-
removeColumn(column: QueryColumn, author: any): void;
|
|
323
|
-
/**
|
|
324
|
-
* Adds a condition group - a group of simple conditions (predicates) linked by AND or OR
|
|
325
|
-
* @param descriptor The descriptor of the new condition group.
|
|
326
|
-
* @returns The new search condition.
|
|
327
|
-
*/
|
|
328
|
-
addConditionGroup(descriptor: ConditionGroupDescriptor, addChildCondition?: boolean): Condition;
|
|
329
|
-
addExtraConditionGroup(descriptor: ConditionGroupDescriptor, addChildCondition?: boolean): Condition;
|
|
330
|
-
createCondition(tag?: CondTag): Condition;
|
|
331
|
-
/**
|
|
332
|
-
* Adds a new simple condition (a predicate)
|
|
333
|
-
* @param descriptor The descriptor which defines different parameters of the new condition
|
|
334
|
-
* @returns The new condition.
|
|
335
|
-
*/
|
|
336
|
-
addSimpleCondition(descriptor: SimpleConditionDescriptor): Condition;
|
|
337
|
-
addSimpleExtraCondition(descriptor: SimpleConditionDescriptor): Condition;
|
|
338
|
-
protected createSimpleConditionObject(attr: EntityAttr, operator: Operator, inputValues: string | Array<string>): Condition;
|
|
339
|
-
/**
|
|
340
|
-
* Removes several columns passed as array.
|
|
341
|
-
* @param columnsToRemove The list of columns to be removed.
|
|
342
|
-
* @param author The author.
|
|
343
|
-
*/
|
|
344
|
-
removeColumns(columnsToRemove: QueryColumn[], author: any): void;
|
|
345
|
-
/**
|
|
346
|
-
* Fires process event.
|
|
347
|
-
* @param data The data.
|
|
348
|
-
*/
|
|
349
|
-
fireProcessEvent(data: any): void;
|
|
350
|
-
/**
|
|
351
|
-
* Fires a QueryChanged event.
|
|
352
|
-
* @param params The event parameters.
|
|
353
|
-
*/
|
|
354
|
-
fireChangedEvent(params?: QueryChangeEventParams): any;
|
|
355
|
-
/**
|
|
356
|
-
*
|
|
357
|
-
* @param params
|
|
358
|
-
* @param postpone
|
|
359
|
-
* @param wasModified
|
|
360
|
-
* @deprecated Method with 'postpone\' and \'wasModified\' args is deprecated. Pass args in params object
|
|
361
|
-
*/
|
|
362
|
-
fireChangedEvent(params?: QueryChangeEventParams, postpone?: number, wasModified?: boolean): any;
|
|
363
|
-
fireColumnsChangedEvent(action?: QueryChangeAction, column?: QueryColumn | QueryColumn[], justsorted?: boolean): void;
|
|
364
|
-
fireConditionsChangedEvent(action?: QueryChangeAction, condition?: Condition | Condition[]): void;
|
|
365
|
-
/**
|
|
366
|
-
* Runs through condition with this callback.
|
|
367
|
-
* @param processCondition The function to process condition.
|
|
368
|
-
*/
|
|
369
|
-
runThroughConditions(processCondition: (cond: Condition) => void): void;
|
|
370
|
-
/**
|
|
371
|
-
* Gets one value for the attribute
|
|
372
|
-
* @param attrId The attribute ID.
|
|
373
|
-
* @retruns The value.
|
|
374
|
-
*/
|
|
375
|
-
getOneValueForAttr(attrId: string): string;
|
|
376
|
-
/**
|
|
377
|
-
* Gets root predicate
|
|
378
|
-
* @retruns The condition.
|
|
379
|
-
*/
|
|
380
|
-
getRootCondition(): Condition;
|
|
381
|
-
/**
|
|
382
|
-
* Add process callback
|
|
383
|
-
* @param callback The callback.
|
|
384
|
-
* @retruns The callback ID.
|
|
385
|
-
*/
|
|
386
|
-
addProcessCallback(callback: (event: EqEvent) => void): string;
|
|
387
|
-
/**
|
|
388
|
-
* Remove process callback
|
|
389
|
-
* @param callbackId The callback ID.
|
|
390
|
-
*/
|
|
391
|
-
removeProcessCallback(callbackId: string): void;
|
|
392
|
-
/**
|
|
393
|
-
* Add changed callback
|
|
394
|
-
* @param callback The callback ID.
|
|
395
|
-
*/
|
|
396
|
-
addChangedCallback(callback: (event: EqEvent) => void): string;
|
|
397
|
-
/**
|
|
398
|
-
* Remove changed callback
|
|
399
|
-
* @param callbackId The callback ID.
|
|
400
|
-
*/
|
|
401
|
-
removeChangedCallback(callbackId: string): void;
|
|
402
|
-
/**
|
|
403
|
-
* Retruns conditions text
|
|
404
|
-
*/
|
|
405
|
-
getConditionsText(): string;
|
|
406
|
-
/**
|
|
407
|
-
* Retruns conditions text
|
|
408
|
-
*/
|
|
409
|
-
getConditionsTextAsHtml(): string;
|
|
410
|
-
}
|
|
1
|
+
import { EqEvent, AggregationColumnStore, AggregationSettings } from '@easydata/core';
|
|
2
|
+
import { DataModel } from '../dm/data_model';
|
|
3
|
+
import { Operator } from '../dm/operator';
|
|
4
|
+
import { EntityAttr } from '../dm/entity';
|
|
5
|
+
import { QueryColumn } from './query_column';
|
|
6
|
+
import { Condition } from './condition';
|
|
7
|
+
import { ExprTag } from '../types/expr_tag';
|
|
8
|
+
import { CondTag } from '../types/cond_tag';
|
|
9
|
+
import { QueryData } from './dto/query_data';
|
|
10
|
+
import { ModelPlainData } from '../dm/dto/dm_data';
|
|
11
|
+
import { ColumnDescriptor, SimpleConditionDescriptor, ConditionGroupDescriptor } from './descriptors';
|
|
12
|
+
import { QueryChangeEventParams, QueryChangeAction } from './query_events';
|
|
13
|
+
/**
|
|
14
|
+
* The error that appears when the query is not valid
|
|
15
|
+
*/
|
|
16
|
+
export declare class InvalidQueryError extends Error {
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of error type.
|
|
19
|
+
* @param message The error message
|
|
20
|
+
*/
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents query options.
|
|
25
|
+
*/
|
|
26
|
+
export interface QueryOptions {
|
|
27
|
+
parent?: Query;
|
|
28
|
+
attrTag?: ExprTag;
|
|
29
|
+
clientListRequestHandler?: any;
|
|
30
|
+
serverListRequestHandler?: any;
|
|
31
|
+
}
|
|
32
|
+
export interface ValidateQueryOptions {
|
|
33
|
+
checkExpressions?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export type LoadQueryFromDataOptions = {
|
|
36
|
+
changeStatus?: boolean;
|
|
37
|
+
validate?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Represents Query.
|
|
41
|
+
*/
|
|
42
|
+
export declare class Query implements AggregationColumnStore {
|
|
43
|
+
private id;
|
|
44
|
+
private name;
|
|
45
|
+
private description;
|
|
46
|
+
private root;
|
|
47
|
+
private columns;
|
|
48
|
+
private justsorted;
|
|
49
|
+
protected extraConditions: Condition;
|
|
50
|
+
/**
|
|
51
|
+
* Current timezone offset (it's sent to the server for proper date/time values processing).
|
|
52
|
+
*/
|
|
53
|
+
timezoneOffset: number;
|
|
54
|
+
/**
|
|
55
|
+
* Contains user-defined extra data for current query.
|
|
56
|
+
*/
|
|
57
|
+
extraData: any;
|
|
58
|
+
innerData: any;
|
|
59
|
+
/**
|
|
60
|
+
* The Data Model associated with this query.
|
|
61
|
+
*/
|
|
62
|
+
model: DataModel;
|
|
63
|
+
private eventEmitter;
|
|
64
|
+
/**
|
|
65
|
+
* The attributec class name (Tag).
|
|
66
|
+
*/
|
|
67
|
+
attributeExprTag: ExprTag;
|
|
68
|
+
clientListRequestHandler: any;
|
|
69
|
+
serverListRequestHandler: any;
|
|
70
|
+
isNewbie: boolean;
|
|
71
|
+
private _isModified;
|
|
72
|
+
private _enableAggregation;
|
|
73
|
+
private parentQuery;
|
|
74
|
+
private drillDowns;
|
|
75
|
+
private aggrSettings;
|
|
76
|
+
isModified(): boolean;
|
|
77
|
+
resetModified(): void;
|
|
78
|
+
get enableAggregation(): boolean;
|
|
79
|
+
set enableAggregation(value: boolean);
|
|
80
|
+
/**
|
|
81
|
+
* The default constructor.
|
|
82
|
+
* @param model The data model.
|
|
83
|
+
* @param data JSON representation object.
|
|
84
|
+
* @param options The options.
|
|
85
|
+
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
86
|
+
*/
|
|
87
|
+
constructor(model?: DataModel, data?: QueryData, options?: QueryOptions);
|
|
88
|
+
protected updateAggregationSettings(): boolean;
|
|
89
|
+
createSubQuery(): Query;
|
|
90
|
+
useAggregation(settingsTuner: (settings: AggregationSettings) => void, silent?: boolean): void;
|
|
91
|
+
useDefaultAggregation(): void;
|
|
92
|
+
private processQueryForAggregation;
|
|
93
|
+
getAggregationSettings(): AggregationSettings;
|
|
94
|
+
getColumnIds(from: number, to?: number): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Checks if the columns with IDs passed in function's parameter exist and are valid
|
|
97
|
+
*/
|
|
98
|
+
validateColumns(colIds: string[]): boolean;
|
|
99
|
+
validateAggregate(colId: string, funcId: string): boolean;
|
|
100
|
+
isEx(): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Resets the query: clears all its conditions and columns, regenerate the ID and sets the default name.
|
|
103
|
+
* @param silent Indicates whether we need to avoid firing the QueryChanged event.
|
|
104
|
+
*/
|
|
105
|
+
reset(clearQuery?: boolean): void;
|
|
106
|
+
hasEnabledAggrColumns(): boolean;
|
|
107
|
+
setDefaultName(): string;
|
|
108
|
+
/**
|
|
109
|
+
* Validates wether the query corresponds to the model.
|
|
110
|
+
* @param options Validate options.
|
|
111
|
+
* @throws {InvalidQueryError} If query is not valid.
|
|
112
|
+
*/
|
|
113
|
+
validate(options?: ValidateQueryOptions): void;
|
|
114
|
+
getAggregatedColumns(): QueryColumn[];
|
|
115
|
+
/**
|
|
116
|
+
* Validates wether the query corresponds to the model.
|
|
117
|
+
* @param options Validate options.
|
|
118
|
+
* @returns `true` if it is valid, otherwise `false`
|
|
119
|
+
*/
|
|
120
|
+
tryValidate(options?: ValidateQueryOptions): boolean;
|
|
121
|
+
private validateConditionGroup;
|
|
122
|
+
/**
|
|
123
|
+
* Sets data to the query.
|
|
124
|
+
* @param data JSON representation object or JSON string
|
|
125
|
+
* @param changeStatus Indicate whether we should change the "isModified" status (by default == `true`)
|
|
126
|
+
*/
|
|
127
|
+
loadFromDataOrJson(data: QueryData | string, options?: LoadQueryFromDataOptions): void;
|
|
128
|
+
/**
|
|
129
|
+
* Loads query from JSON.
|
|
130
|
+
* @param json The JSON string.
|
|
131
|
+
* @param options The options.
|
|
132
|
+
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
133
|
+
*/
|
|
134
|
+
loadFromJson(json: string, options?: LoadQueryFromDataOptions): void;
|
|
135
|
+
/**
|
|
136
|
+
* Loads query from data representation.
|
|
137
|
+
* @param data The query DTO.
|
|
138
|
+
* @param options The options.
|
|
139
|
+
* @throws {InvalidQueryError} The error throws when query is not valid.
|
|
140
|
+
*/
|
|
141
|
+
loadFromData(data: QueryData, options?: LoadQueryFromDataOptions): void;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
addDrillDown(): Query;
|
|
146
|
+
getDrillDowns(): Array<Query>;
|
|
147
|
+
getParentQuery(): Query | null;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
findColumnById(colId: string): QueryColumn | null;
|
|
152
|
+
/**
|
|
153
|
+
* Gets DataModel object associated with this query.
|
|
154
|
+
* @retruns The data model.
|
|
155
|
+
*/
|
|
156
|
+
getModel(): DataModel;
|
|
157
|
+
/**
|
|
158
|
+
* Sets DataModel object associated with this query.
|
|
159
|
+
* @param model The data model.
|
|
160
|
+
*/
|
|
161
|
+
setModel(model: DataModel): void;
|
|
162
|
+
/**
|
|
163
|
+
* Loads data model.
|
|
164
|
+
* @param model JSON representation object or JSON string.
|
|
165
|
+
*/
|
|
166
|
+
loadModelData(model: ModelPlainData | string): void;
|
|
167
|
+
/**
|
|
168
|
+
* Returns JSON representation of this query.
|
|
169
|
+
* @retruns JSON string.
|
|
170
|
+
*/
|
|
171
|
+
toJSON(): string;
|
|
172
|
+
/**
|
|
173
|
+
* Returns JSON representation of this query.
|
|
174
|
+
* @retruns JSON representation object.
|
|
175
|
+
*/
|
|
176
|
+
toJSONData(): QueryData;
|
|
177
|
+
/**
|
|
178
|
+
* Checks wether query does not contains any condtion.
|
|
179
|
+
* @retruns `true` if query does not contain any condition, otherwise `false`.
|
|
180
|
+
*/
|
|
181
|
+
isEmptyConditions(): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Checks wether query does not contains any column.
|
|
184
|
+
* @retruns `true` if query does not contain any column, otherwise `false`.
|
|
185
|
+
*/
|
|
186
|
+
isEmptyColumns(): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Checks wether query does not contains any column and any condition.
|
|
189
|
+
* @retruns `true` if query does not contain any column and any condition, otherwise `false`.
|
|
190
|
+
*/
|
|
191
|
+
isEmpty(): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Clears the query (all conditions, columns, extraData, etc).
|
|
194
|
+
*/
|
|
195
|
+
clear(): void;
|
|
196
|
+
/**
|
|
197
|
+
* Clears all columns in query
|
|
198
|
+
*/
|
|
199
|
+
clearColumns(): void;
|
|
200
|
+
/**
|
|
201
|
+
* Clears all conditions in query.
|
|
202
|
+
*/
|
|
203
|
+
clearConditions(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Clears all extra conditions in query
|
|
206
|
+
*/
|
|
207
|
+
clearExtraConditions(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Clears all drill downs
|
|
210
|
+
*/
|
|
211
|
+
clearDrillDowns(): void;
|
|
212
|
+
/**
|
|
213
|
+
* Gets query ID.
|
|
214
|
+
* @returns The ID>
|
|
215
|
+
*/
|
|
216
|
+
getId(): string;
|
|
217
|
+
/**
|
|
218
|
+
* Sets query ID.
|
|
219
|
+
* @param id New Query ID.
|
|
220
|
+
*/
|
|
221
|
+
setId(id: string): void;
|
|
222
|
+
/**
|
|
223
|
+
* Regenerates current query ID.
|
|
224
|
+
* @param id New Query ID.
|
|
225
|
+
*/
|
|
226
|
+
regenerateId(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Gets name of the query.
|
|
229
|
+
* @retruns The name.
|
|
230
|
+
*/
|
|
231
|
+
getName(): string;
|
|
232
|
+
/**
|
|
233
|
+
* Sets name of the query
|
|
234
|
+
* @param name New name.
|
|
235
|
+
*/
|
|
236
|
+
setName(name: string): void;
|
|
237
|
+
/**
|
|
238
|
+
* Gets description of the query.
|
|
239
|
+
* @retruns The description.
|
|
240
|
+
*/
|
|
241
|
+
getDescription(): string;
|
|
242
|
+
/**
|
|
243
|
+
* Sets description of the query
|
|
244
|
+
* @param description New description.
|
|
245
|
+
*/
|
|
246
|
+
setDescription(description: string): void;
|
|
247
|
+
/**
|
|
248
|
+
* Get array of columns.
|
|
249
|
+
* @retruns Columns.
|
|
250
|
+
*/
|
|
251
|
+
getColumns(): QueryColumn[];
|
|
252
|
+
/**
|
|
253
|
+
* Gets array of columns that are used as keys
|
|
254
|
+
* for totals.
|
|
255
|
+
*/
|
|
256
|
+
getUsedInTotalsColumns(): QueryColumn[];
|
|
257
|
+
/**
|
|
258
|
+
* Get array of columns used only in sorting.
|
|
259
|
+
* @retruns Columns.
|
|
260
|
+
*/
|
|
261
|
+
getJustSortedColumns(): QueryColumn[];
|
|
262
|
+
/**
|
|
263
|
+
* Gets array of columns used in sorting
|
|
264
|
+
* @retruns Columns
|
|
265
|
+
*/
|
|
266
|
+
getSortedColumns(): QueryColumn[];
|
|
267
|
+
/**
|
|
268
|
+
* Gets Colummn sorting index.
|
|
269
|
+
* @param col The column.
|
|
270
|
+
* @retruns The index.
|
|
271
|
+
*/
|
|
272
|
+
getColumnSortIndex(col: QueryColumn): number;
|
|
273
|
+
createColumn(justsorted?: boolean): QueryColumn;
|
|
274
|
+
getColumnById(id: string): QueryColumn;
|
|
275
|
+
/**
|
|
276
|
+
* Adds a new column with specified parameters
|
|
277
|
+
* @param desriptor The descriptor of the new column. Can contain different parameters like:
|
|
278
|
+
* `attribute` - a reference to a EntityAttr object,
|
|
279
|
+
* `attributeId` - an ID of the entity attribute we need (if we don't indicate `attribute`),
|
|
280
|
+
* `index`, sorting`, 'sortIndex` and other
|
|
281
|
+
*
|
|
282
|
+
* @param author The author of this operation. This parameter is used in EasyQuery widgets only to indicate which of the initiates the change.
|
|
283
|
+
* @retruns The column.
|
|
284
|
+
* @example
|
|
285
|
+
* query.addColumn({
|
|
286
|
+
* attributeId: 'Customers.CompanyName',
|
|
287
|
+
* sortIndex: SortDirection.Ascending
|
|
288
|
+
* }});
|
|
289
|
+
*/
|
|
290
|
+
addColumn(descriptor: ColumnDescriptor, author?: string): QueryColumn;
|
|
291
|
+
/**
|
|
292
|
+
* Adds a new column with specified index.
|
|
293
|
+
* @param column The column or array of columns
|
|
294
|
+
* @param index The index of new column
|
|
295
|
+
* @param author The author.
|
|
296
|
+
* @example
|
|
297
|
+
* const column = new Column();
|
|
298
|
+
* column.caption = "Company name";
|
|
299
|
+
*
|
|
300
|
+
* query.addColumn(column, 1)
|
|
301
|
+
*/
|
|
302
|
+
addColumnObj(column: QueryColumn | QueryColumn[], index: any, author: any): void;
|
|
303
|
+
/**
|
|
304
|
+
* Changes column to Aggregate function, custom expression or simple column.
|
|
305
|
+
* @param column The column to change.
|
|
306
|
+
* @param tag New column expression tag.
|
|
307
|
+
* @param args The arguments (Contains aggregate function id)
|
|
308
|
+
*/
|
|
309
|
+
changeColumnType(column: QueryColumn, tag: ExprTag, args?: any): void;
|
|
310
|
+
/**
|
|
311
|
+
* Moves the column with specified index to another position.
|
|
312
|
+
* @param index1 The index of the column that should be moved.
|
|
313
|
+
* @param index2 The index of the position the column should be moved to
|
|
314
|
+
* @param author The author
|
|
315
|
+
*/
|
|
316
|
+
moveColumn(index1: number, index2: number): void;
|
|
317
|
+
/**
|
|
318
|
+
* Removes the column.
|
|
319
|
+
* @param column The column to be removed.
|
|
320
|
+
* @param author The author
|
|
321
|
+
*/
|
|
322
|
+
removeColumn(column: QueryColumn, author: any): void;
|
|
323
|
+
/**
|
|
324
|
+
* Adds a condition group - a group of simple conditions (predicates) linked by AND or OR
|
|
325
|
+
* @param descriptor The descriptor of the new condition group.
|
|
326
|
+
* @returns The new search condition.
|
|
327
|
+
*/
|
|
328
|
+
addConditionGroup(descriptor: ConditionGroupDescriptor, addChildCondition?: boolean): Condition;
|
|
329
|
+
addExtraConditionGroup(descriptor: ConditionGroupDescriptor, addChildCondition?: boolean): Condition;
|
|
330
|
+
createCondition(tag?: CondTag): Condition;
|
|
331
|
+
/**
|
|
332
|
+
* Adds a new simple condition (a predicate)
|
|
333
|
+
* @param descriptor The descriptor which defines different parameters of the new condition
|
|
334
|
+
* @returns The new condition.
|
|
335
|
+
*/
|
|
336
|
+
addSimpleCondition(descriptor: SimpleConditionDescriptor): Condition;
|
|
337
|
+
addSimpleExtraCondition(descriptor: SimpleConditionDescriptor): Condition;
|
|
338
|
+
protected createSimpleConditionObject(attr: EntityAttr, operator: Operator, inputValues: string | Array<string>): Condition;
|
|
339
|
+
/**
|
|
340
|
+
* Removes several columns passed as array.
|
|
341
|
+
* @param columnsToRemove The list of columns to be removed.
|
|
342
|
+
* @param author The author.
|
|
343
|
+
*/
|
|
344
|
+
removeColumns(columnsToRemove: QueryColumn[], author: any): void;
|
|
345
|
+
/**
|
|
346
|
+
* Fires process event.
|
|
347
|
+
* @param data The data.
|
|
348
|
+
*/
|
|
349
|
+
fireProcessEvent(data: any): void;
|
|
350
|
+
/**
|
|
351
|
+
* Fires a QueryChanged event.
|
|
352
|
+
* @param params The event parameters.
|
|
353
|
+
*/
|
|
354
|
+
fireChangedEvent(params?: QueryChangeEventParams): any;
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
* @param params
|
|
358
|
+
* @param postpone
|
|
359
|
+
* @param wasModified
|
|
360
|
+
* @deprecated Method with 'postpone\' and \'wasModified\' args is deprecated. Pass args in params object
|
|
361
|
+
*/
|
|
362
|
+
fireChangedEvent(params?: QueryChangeEventParams, postpone?: number, wasModified?: boolean): any;
|
|
363
|
+
fireColumnsChangedEvent(action?: QueryChangeAction, column?: QueryColumn | QueryColumn[], justsorted?: boolean): void;
|
|
364
|
+
fireConditionsChangedEvent(action?: QueryChangeAction, condition?: Condition | Condition[]): void;
|
|
365
|
+
/**
|
|
366
|
+
* Runs through condition with this callback.
|
|
367
|
+
* @param processCondition The function to process condition.
|
|
368
|
+
*/
|
|
369
|
+
runThroughConditions(processCondition: (cond: Condition) => void): void;
|
|
370
|
+
/**
|
|
371
|
+
* Gets one value for the attribute
|
|
372
|
+
* @param attrId The attribute ID.
|
|
373
|
+
* @retruns The value.
|
|
374
|
+
*/
|
|
375
|
+
getOneValueForAttr(attrId: string): string;
|
|
376
|
+
/**
|
|
377
|
+
* Gets root predicate
|
|
378
|
+
* @retruns The condition.
|
|
379
|
+
*/
|
|
380
|
+
getRootCondition(): Condition;
|
|
381
|
+
/**
|
|
382
|
+
* Add process callback
|
|
383
|
+
* @param callback The callback.
|
|
384
|
+
* @retruns The callback ID.
|
|
385
|
+
*/
|
|
386
|
+
addProcessCallback(callback: (event: EqEvent) => void): string;
|
|
387
|
+
/**
|
|
388
|
+
* Remove process callback
|
|
389
|
+
* @param callbackId The callback ID.
|
|
390
|
+
*/
|
|
391
|
+
removeProcessCallback(callbackId: string): void;
|
|
392
|
+
/**
|
|
393
|
+
* Add changed callback
|
|
394
|
+
* @param callback The callback ID.
|
|
395
|
+
*/
|
|
396
|
+
addChangedCallback(callback: (event: EqEvent) => void): string;
|
|
397
|
+
/**
|
|
398
|
+
* Remove changed callback
|
|
399
|
+
* @param callbackId The callback ID.
|
|
400
|
+
*/
|
|
401
|
+
removeChangedCallback(callbackId: string): void;
|
|
402
|
+
/**
|
|
403
|
+
* Retruns conditions text
|
|
404
|
+
*/
|
|
405
|
+
getConditionsText(): string;
|
|
406
|
+
/**
|
|
407
|
+
* Retruns conditions text
|
|
408
|
+
*/
|
|
409
|
+
getConditionsTextAsHtml(): string;
|
|
410
|
+
}
|