@syncfusion/ej2-querybuilder 30.2.6 → 31.1.17

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 30.2.6
3
+ * version : 31.1.17
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -0,0 +1,4 @@
1
+ /**
2
+ * QueryBuilder all modules
3
+ */
4
+ export * from './query-builder/index';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * QueryBuilder all modules
3
+ */
4
+ export * from './query-builder/index';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * QueryBuilder modules
3
+ */
4
+ export * from './query-builder';
5
+ export * from './query-builder-model';
6
+ export * from './query-library';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * QueryBuilder modules
3
+ */
4
+ export * from './query-builder';
5
+ export * from './query-builder-model';
6
+ export * from './query-library';
@@ -0,0 +1,569 @@
1
+ import { Component, INotifyPropertyChanged, NotifyPropertyChanges, getComponent, MouseEventArgs, Browser, compile, append, ModuleDeclaration, Draggable, remove } from '@syncfusion/ej2-base';import { Property, ChildProperty, Complex, L10n, closest, extend, isNullOrUndefined, Collection, cldrData } from '@syncfusion/ej2-base';import { getInstance, addClass, removeClass, rippleEffect, detach, classList } from '@syncfusion/ej2-base';import { Internationalization, DateFormatOptions, KeyboardEventArgs, getUniqueID, select } from '@syncfusion/ej2-base';import { Button, CheckBox, RadioButton, ChangeEventArgs as ButtonChangeEventArgs, RadioButtonModel } from '@syncfusion/ej2-buttons';import { DropDownList, ChangeEventArgs as DropDownChangeEventArgs, FieldSettingsModel, CheckBoxSelection, DropDownTreeModel, DropDownTree, DdtFilteringEventArgs } from '@syncfusion/ej2-dropdowns';import { MultiSelect, MultiSelectChangeEventArgs, PopupEventArgs, MultiSelectModel, DropDownListModel } from '@syncfusion/ej2-dropdowns';import { EmitType, Event, EventHandler, getValue, Animation, BaseEventArgs } from '@syncfusion/ej2-base';import { Query, Predicate, DataManager, Deferred } from '@syncfusion/ej2-data';import { TextBox, NumericTextBox, InputEventArgs, ChangeEventArgs as InputChangeEventArgs } from '@syncfusion/ej2-inputs';import { TextBoxModel, NumericTextBoxModel } from '@syncfusion/ej2-inputs';import { DatePicker, ChangeEventArgs as CalendarChangeEventArgs, DatePickerModel } from '@syncfusion/ej2-calendars';import { DropDownButton, ItemModel, MenuEventArgs } from '@syncfusion/ej2-splitbuttons';import { Tooltip, createSpinner, showSpinner, hideSpinner, TooltipEventArgs } from '@syncfusion/ej2-popups';import { compile as templateCompiler, getNumericObject } from '@syncfusion/ej2-base';
2
+ import {TemplateColumn,Validation,FormatObject,ActionEventArgs,ChangeEventArgs,RuleChangeEventArgs,DragEventArgs,DropEventArgs,FieldMode,DisplayMode,SortDirection} from "./query-builder";
3
+ import {ComponentModel} from '@syncfusion/ej2-base';
4
+
5
+ /**
6
+ * Interface for a class Columns
7
+ */
8
+ export interface ColumnsModel {
9
+
10
+ /**
11
+ * Specifies the fields in columns.
12
+ *
13
+ * @default null
14
+ */
15
+ field?: string;
16
+
17
+ /**
18
+ * Specifies the labels name in columns.
19
+ *
20
+ * @default null
21
+ */
22
+ label?: string;
23
+
24
+ /**
25
+ * Specifies the types in columns field.
26
+ *
27
+ * @default null
28
+ */
29
+ type?: string;
30
+
31
+ /**
32
+ * Specifies the values in columns or bind the values from sub controls.
33
+ *
34
+ * @default null
35
+ */
36
+ values?: string[] | number[] | boolean[];
37
+
38
+ /**
39
+ * Specifies the operators in columns.
40
+ *
41
+ * @default null
42
+ */
43
+ operators?: { [key: string]: Object }[];
44
+
45
+ /**
46
+ * Specifies the rule template for the field with any other widgets.
47
+ *
48
+ * @default null
49
+ * @aspType string
50
+ */
51
+ ruleTemplate?: string | Function;
52
+
53
+ /**
54
+ * Specifies the template for value field such as slider or any other widgets.
55
+ *
56
+ * @default null
57
+ */
58
+ template?: TemplateColumn | string | Function;
59
+
60
+ /**
61
+ * Specifies the validation for columns (text, number and date).
62
+ *
63
+ * @default { isRequired: true , min: 0, max: Number.MAX_VALUE }
64
+ */
65
+ validation?: Validation;
66
+
67
+ /**
68
+ * Specifies the date format for columns.
69
+ *
70
+ * @aspType string
71
+ * @blazorType string
72
+ * @default null
73
+ */
74
+ format?: string | FormatObject;
75
+
76
+ /**
77
+ * Specifies the step value(numeric textbox) for columns.
78
+ *
79
+ * @default null
80
+ */
81
+ step?: number;
82
+
83
+ /**
84
+ * Specifies the default value for columns.
85
+ *
86
+ * @default null
87
+ */
88
+ value?: string[] | number[] | string | number | boolean | Date;
89
+
90
+ /**
91
+ * Specifies the category for columns.
92
+ *
93
+ * @default null
94
+ */
95
+ category?: string;
96
+
97
+ /**
98
+ * Specifies the sub fields in columns.
99
+ *
100
+ * @default null
101
+ */
102
+ columns?: ColumnsModel[];
103
+
104
+ }
105
+
106
+ /**
107
+ * Interface for a class Rule
108
+ */
109
+ export interface RuleModel {
110
+
111
+ /**
112
+ * Specifies the condition value in group.
113
+ *
114
+ * @default null
115
+ */
116
+ condition?: string;
117
+
118
+ /**
119
+ * Specifies the rules in group.
120
+ *
121
+ * @default []
122
+ */
123
+ rules?: RuleModel[];
124
+
125
+ /**
126
+ * Specifies the field value in group.
127
+ *
128
+ * @default null
129
+ */
130
+ field?: string;
131
+
132
+ /**
133
+ * Specifies the label value in group.
134
+ *
135
+ * @default null
136
+ */
137
+ label?: string;
138
+
139
+ /**
140
+ * Specifies the type value in group.
141
+ *
142
+ * @default null
143
+ */
144
+ type?: string;
145
+
146
+ /**
147
+ * Specifies the operator value in group.
148
+ *
149
+ * @default null
150
+ */
151
+ operator?: string;
152
+
153
+ /**
154
+ * Specifies the sub controls value in group.
155
+ *
156
+ * @default null
157
+ */
158
+ value?: string[] | number[] | string | number | boolean;
159
+
160
+ /**
161
+ * Specifies whether not condition is true/false.
162
+ *
163
+ * @default false
164
+ */
165
+ not?: boolean;
166
+
167
+ /**
168
+ * Specifies whether rule is locked or not.
169
+ *
170
+ * @aspType bool?
171
+ * @default null
172
+ */
173
+ isLocked?: boolean;
174
+
175
+ }
176
+
177
+ /**
178
+ * Interface for a class Value
179
+ */
180
+ export interface ValueModel {
181
+
182
+ /**
183
+ * Specifies the property for NumericTextBox value.
184
+ *
185
+ * @default null
186
+ */
187
+ numericTextBoxModel?: NumericTextBoxModel;
188
+
189
+ /**
190
+ * Specifies the property for MultiSelect value.
191
+ *
192
+ * @default null
193
+ */
194
+ multiSelectModel?: MultiSelectModel;
195
+
196
+ /**
197
+ * Specifies the property for DatePicker value.
198
+ *
199
+ * @default null
200
+ */
201
+ datePickerModel?: DatePickerModel;
202
+
203
+ /**
204
+ * Specifies the TextBox value.
205
+ *
206
+ * @default null
207
+ */
208
+ textBoxModel?: TextBoxModel;
209
+
210
+ /**
211
+ * Specifies the RadioButton value.
212
+ *
213
+ * @default null
214
+ */
215
+ radioButtonModel?: RadioButtonModel;
216
+
217
+ }
218
+
219
+ /**
220
+ * Interface for a class ShowButtons
221
+ */
222
+ export interface ShowButtonsModel {
223
+
224
+ /**
225
+ * Specifies the boolean value in ruleDelete that the enable/disable the buttons in rule.
226
+ *
227
+ * @default false
228
+ */
229
+ cloneRule?: boolean;
230
+
231
+ /**
232
+ * Specifies the boolean value in ruleDelete that the enable/disable the buttons in rule.
233
+ *
234
+ * @default false
235
+ */
236
+ cloneGroup?: boolean;
237
+
238
+ /**
239
+ * Specifies the boolean value in ruleDelete that the enable/disable the buttons in rule.
240
+ *
241
+ * @default false
242
+ */
243
+ lockRule?: boolean;
244
+
245
+ /**
246
+ * Specifies the boolean value in ruleDelete that the enable/disable the buttons in rule.
247
+ *
248
+ * @default false
249
+ */
250
+ lockGroup?: boolean;
251
+
252
+ /**
253
+ * Specifies the boolean value in ruleDelete that the enable/disable the buttons in rule.
254
+ *
255
+ * @default true
256
+ */
257
+ ruleDelete?: boolean;
258
+
259
+ /**
260
+ * Specifies the boolean value in groupInsert that the enable/disable the buttons in group.
261
+ *
262
+ * @default true
263
+ */
264
+ groupInsert?: boolean;
265
+
266
+ /**
267
+ * Specifies the boolean value in groupDelete that the enable/disable the buttons in group.
268
+ *
269
+ * @default true
270
+ */
271
+ groupDelete?: boolean;
272
+
273
+ }
274
+
275
+ /**
276
+ * Interface for a class QueryBuilder
277
+ */
278
+ export interface QueryBuilderModel extends ComponentModel{
279
+
280
+ /**
281
+ * Triggers when the component is created.
282
+ *
283
+ * @event created
284
+ * @blazorProperty 'Created'
285
+ */
286
+ created?: EmitType<Event>;
287
+
288
+ /**
289
+ * Triggers when field, operator, value is change.
290
+ *
291
+ * @event actionBegin
292
+ * @blazorProperty 'OnActionBegin'
293
+ */
294
+ actionBegin?: EmitType<ActionEventArgs>;
295
+
296
+ /**
297
+ * Triggers before the condition (And/Or), field, operator, value is changed.
298
+ *
299
+ * @event beforeChange
300
+ * @blazorProperty 'OnValueChange'
301
+ */
302
+ beforeChange?: EmitType<ChangeEventArgs>;
303
+
304
+ /**
305
+ * Triggers when changing the condition(AND/OR), field, value, operator is changed.
306
+ *
307
+ * @event change
308
+ * @blazorProperty 'Changed'
309
+ */
310
+ change?: EmitType<ChangeEventArgs>;
311
+
312
+ /**
313
+ * Triggers when dataBound to the Query Builder.
314
+ *
315
+ * @event dataBound
316
+ * @blazorProperty 'dataBound'
317
+ */
318
+ dataBound?: EmitType<Object>;
319
+
320
+ /**
321
+ * Triggers when changing the condition(AND/OR), field, value, operator is changed
322
+ *
323
+ * @event ruleChange
324
+ * @blazorProperty 'RuleChanged'
325
+ */
326
+ ruleChange?: EmitType<RuleChangeEventArgs>;
327
+
328
+ /**
329
+ * Triggers when rule/ group dragging starts.
330
+ *
331
+ *
332
+ */
333
+ dragStart?: EmitType<DragEventArgs>;
334
+
335
+ /**
336
+ * Triggers when rule/ group are dragged (moved) continuously.
337
+ *
338
+ *
339
+ */
340
+ drag?: EmitType<DragEventArgs>;
341
+
342
+ /**
343
+ * Triggers when rule/ group are dropped on to the target rule/ group.
344
+ *
345
+ *
346
+ */
347
+ drop?: EmitType<DropEventArgs>;
348
+
349
+ /**
350
+ * Specifies the showButtons settings of the query builder component.
351
+ * The showButtons can be enable Enables or disables the ruleDelete, groupInsert, and groupDelete buttons.
352
+ *
353
+ * @default { ruleDelete: true , groupInsert: true, groupDelete: true }
354
+ */
355
+ showButtons?: ShowButtonsModel;
356
+
357
+ /**
358
+ * Shows or hides the filtered query.
359
+ *
360
+ * @default false
361
+ */
362
+ summaryView?: boolean;
363
+
364
+ /**
365
+ * Enables or disables the validation.
366
+ *
367
+ * @default false
368
+ */
369
+ allowValidation?: boolean;
370
+
371
+ /**
372
+ * Specifies the fieldMode as DropDownList or DropDownTree.
373
+ *
374
+ * @default 'Default'
375
+ */
376
+ fieldMode?: FieldMode;
377
+
378
+ /**
379
+ * Specifies columns to create filters.
380
+ *
381
+ * @default {}
382
+ */
383
+ columns?: ColumnsModel[];
384
+
385
+ /**
386
+ * Specifies the property for field.
387
+ *
388
+ * @default null
389
+ */
390
+ fieldModel?: DropDownListModel | DropDownTreeModel;
391
+
392
+ /**
393
+ * Specifies the property for operator.
394
+ *
395
+ * @default null
396
+ */
397
+ operatorModel?: DropDownListModel;
398
+
399
+ /**
400
+ * Specifies the property for value.
401
+ *
402
+ * @default null
403
+ */
404
+ valueModel?: ValueModel;
405
+
406
+ /**
407
+ * Specifies the template for the header with any other widgets.
408
+ *
409
+ * @default null
410
+ * @aspType string
411
+ */
412
+ headerTemplate?: string | Function;
413
+
414
+ /**
415
+ * Defines class or multiple classes, which are separated by a space in the QueryBuilder element.
416
+ * You can add custom styles to the QueryBuilder using the cssClass property.
417
+ *
418
+ * @default ''
419
+ */
420
+ cssClass?: string;
421
+
422
+ /**
423
+ * Binds the column name from data source in query-builder.
424
+ * The `dataSource` is an array of JavaScript objects.
425
+ *
426
+ * @default []
427
+ */
428
+ dataSource?: Object[] | Object | DataManager;
429
+
430
+ /**
431
+ * Specifies the displayMode as Horizontal or Vertical.
432
+ *
433
+ * @default 'Horizontal'
434
+ */
435
+ displayMode?: DisplayMode;
436
+
437
+ /**
438
+ * Enable or disable persisting component's state between page reloads.
439
+ * If enabled, filter states will be persisted.
440
+ *
441
+ * @default false.
442
+ */
443
+ enablePersistence?: boolean;
444
+
445
+ /**
446
+ * Specifies the sort direction of the field names.
447
+ *
448
+ * @default 'Default'
449
+ */
450
+ sortDirection?: SortDirection;
451
+
452
+ /**
453
+ * Specifies the maximum group count or restricts the group count.
454
+ *
455
+ * @default 5
456
+ */
457
+ maxGroupCount?: number;
458
+
459
+ /**
460
+ * Specifies the height of the query builder.
461
+ *
462
+ * @default 'auto'
463
+ */
464
+ height?: string;
465
+
466
+ /**
467
+ * Specifies the width of the query builder.
468
+ *
469
+ * @default 'auto'
470
+ */
471
+ width?: string;
472
+
473
+ /**
474
+ * If match case is set to true, the grid filters the records with exact match.
475
+ * if false, it filters case insensitive records (uppercase and lowercase letters treated the same).
476
+ *
477
+ * @default false
478
+ */
479
+ matchCase?: boolean;
480
+
481
+ /**
482
+ * If immediateModeDelay is set by particular number, the rule Change event is triggered after that period.
483
+ *
484
+ * @default 0
485
+ */
486
+ immediateModeDelay?: number;
487
+
488
+ /**
489
+ * Enables/Disables the not group condition in query builder.
490
+ *
491
+ * @default false
492
+ */
493
+ enableNotCondition?: boolean;
494
+
495
+ /**
496
+ * When set to true, the user interactions on the component are disabled.
497
+ *
498
+ * @default false
499
+ */
500
+ readonly?: boolean;
501
+
502
+ /**
503
+ * Specifies a boolean value whether enable / disable the new rule adding while adding new groups.
504
+ *
505
+ * @remarks
506
+ * If this property is true, the empty rule is inserted while inserting new group.
507
+ * If set to false, the group is inserted without any rule.
508
+ * @default true
509
+ */
510
+ addRuleToNewGroups?: boolean;
511
+
512
+ /**
513
+ * Specifies a boolean value whether enable / disable the auto selection with the first value for the field.
514
+ *
515
+ * @remarks
516
+ * If this property is true, the field dropdown list will render with the first value of the dropdown list.
517
+ * If set to false, the dropdown list render with placeholder.
518
+ * @default false
519
+ */
520
+ autoSelectField?: boolean;
521
+
522
+ /**
523
+ * Specifies a boolean value whether enable / disable the auto selection with the first value for the operator.
524
+ *
525
+ * @remarks
526
+ * If this property is true, the operator dropdown list will render with the first value of the dropdown list.
527
+ * If set to false, the dropdown list render with placeholder.
528
+ * @default true
529
+ */
530
+ autoSelectOperator?: boolean;
531
+
532
+ /**
533
+ * Specifies the separator string for column.
534
+ *
535
+ * @default ''
536
+ */
537
+ separator?: string;
538
+
539
+ /**
540
+ * Specifies whether to enable separate connectors between rules/groups.
541
+ *
542
+ * @remarks
543
+ * When this property is set to true, each rule/group will have its own connector, allowing them to be connected independently with different connectors.
544
+ * When set to false, will result in connectors being shared between rules/groups, possibly connecting them with the same connector.
545
+ *
546
+ * @default false
547
+ *
548
+ */
549
+ enableSeparateConnector?: boolean;
550
+
551
+ /**
552
+ * Defines rules in the QueryBuilder.
553
+ * Specifies the initial rule, which is JSON data.
554
+ *
555
+ * @default {}
556
+ */
557
+ rule?: RuleModel;
558
+
559
+ /**
560
+ * Specifies a boolean value whether to enable / disable the drag and drop support to move the rules/ groups.
561
+ *
562
+ * @remarks
563
+ * If this property is true, the drag handle will be rendered in front of the rule/ group element to perform, drag and drop.
564
+ * If set to false, the drag handle element is not rendered.
565
+ * @default false
566
+ */
567
+ allowDragAndDrop?: boolean;
568
+
569
+ }