overgrid-vue 1.4.1 → 1.6.0

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.
@@ -0,0 +1,758 @@
1
+ import { AllowedComponentProps } from 'vue';
2
+ import { ComponentCustomProperties } from 'vue';
3
+ import { ComponentCustomProps } from 'vue';
4
+ import { ComponentInternalInstance } from 'vue';
5
+ import { ComponentOptionsBase } from 'vue';
6
+ import { ComponentOptionsMixin } from 'vue';
7
+ import { ComponentProvideOptions } from 'vue';
8
+ import { ComponentPublicInstance } from 'vue';
9
+ import { ComputedRef } from 'vue';
10
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
11
+ import { DebuggerEvent } from 'vue';
12
+ import { ExtractPropTypes } from 'vue';
13
+ import { GlobalComponents } from 'vue';
14
+ import { GlobalDirectives } from 'vue';
15
+ import { nextTick } from 'vue';
16
+ import { OnCleanup } from '@vue/reactivity';
17
+ import { PublicProps } from 'vue';
18
+ import { Ref } from 'vue';
19
+ import { ShallowUnwrapRef } from 'vue';
20
+ import { Slot } from 'vue';
21
+ import { VNodeProps } from 'vue';
22
+ import { WatchOptions } from 'vue';
23
+ import { WatchStopHandle } from 'vue';
24
+
25
+ export declare const OverGrid: {
26
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{
27
+ config: OverGridConfig;
28
+ customFormatters?: {
29
+ name: string;
30
+ component: any;
31
+ }[];
32
+ }> & Readonly<{}>, {
33
+ fields: OverGridFields;
34
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
35
+ operationsDropdown: ({
36
+ $: ComponentInternalInstance;
37
+ $data: {};
38
+ $props: Partial<{
39
+ orientation: string;
40
+ extraClass: string;
41
+ }> & Omit<{
42
+ readonly orientation: string;
43
+ readonly extraClass: string;
44
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "orientation" | "extraClass">;
45
+ $attrs: {
46
+ [x: string]: unknown;
47
+ };
48
+ $refs: {
49
+ [x: string]: unknown;
50
+ };
51
+ $slots: Readonly<{
52
+ [name: string]: Slot<any> | undefined;
53
+ }>;
54
+ $root: ComponentPublicInstance | null;
55
+ $parent: ComponentPublicInstance | null;
56
+ $host: Element | null;
57
+ $emit: (event: string, ...args: any[]) => void;
58
+ $el: HTMLDivElement;
59
+ $options: ComponentOptionsBase<Readonly<ExtractPropTypes< {
60
+ orientation: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
64
+ extraClass: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ };
68
+ }>> & Readonly<{}>, {
69
+ close: () => void;
70
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
71
+ orientation: string;
72
+ extraClass: string;
73
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
74
+ beforeCreate?: (() => void) | (() => void)[];
75
+ created?: (() => void) | (() => void)[];
76
+ beforeMount?: (() => void) | (() => void)[];
77
+ mounted?: (() => void) | (() => void)[];
78
+ beforeUpdate?: (() => void) | (() => void)[];
79
+ updated?: (() => void) | (() => void)[];
80
+ activated?: (() => void) | (() => void)[];
81
+ deactivated?: (() => void) | (() => void)[];
82
+ beforeDestroy?: (() => void) | (() => void)[];
83
+ beforeUnmount?: (() => void) | (() => void)[];
84
+ destroyed?: (() => void) | (() => void)[];
85
+ unmounted?: (() => void) | (() => void)[];
86
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
87
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
88
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
89
+ };
90
+ $forceUpdate: () => void;
91
+ $nextTick: nextTick;
92
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
93
+ } & Readonly<{
94
+ orientation: string;
95
+ extraClass: string;
96
+ }> & Omit<Readonly<ExtractPropTypes< {
97
+ orientation: {
98
+ type: StringConstructor;
99
+ default: string;
100
+ };
101
+ extraClass: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ }>> & Readonly<{}>, "close" | ("orientation" | "extraClass")> & ShallowUnwrapRef< {
106
+ close: () => void;
107
+ }> & {} & ComponentCustomProperties & {} & {
108
+ $slots: {
109
+ iconButton?(_: {}): any;
110
+ content?(_: {}): any;
111
+ };
112
+ }) | null;
113
+ }, HTMLDivElement, ComponentProvideOptions, {
114
+ P: {};
115
+ B: {};
116
+ D: {};
117
+ C: {};
118
+ M: {};
119
+ Defaults: {};
120
+ }, Readonly<{
121
+ config: OverGridConfig;
122
+ customFormatters?: {
123
+ name: string;
124
+ component: any;
125
+ }[];
126
+ }> & Readonly<{}>, {
127
+ fields: OverGridFields;
128
+ }, {}, {}, {}, {}>;
129
+ __isFragment?: never;
130
+ __isTeleport?: never;
131
+ __isSuspense?: never;
132
+ } & ComponentOptionsBase<Readonly<{
133
+ config: OverGridConfig;
134
+ customFormatters?: {
135
+ name: string;
136
+ component: any;
137
+ }[];
138
+ }> & Readonly<{}>, {
139
+ fields: OverGridFields;
140
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
141
+ $slots: {
142
+ extraRow?(_: {
143
+ record: any;
144
+ extraSlotParams: object;
145
+ }): any;
146
+ };
147
+ });
148
+
149
+ export declare interface OverGridActionButton {
150
+ /**
151
+ * The title of the button.
152
+ */
153
+ title?: string;
154
+ /**
155
+ * The icon of the button. You can use any valid FontAwesome icon class here. For example, 'fas fa-edit'.
156
+ */
157
+ icon?: string;
158
+ /**
159
+ * The test value attribute of the button. If set, the button will have a test value attribute with this value to make e2e testing easier.
160
+ */
161
+ testValueAttribute?: string;
162
+ /**
163
+ * The class list of the button. You can set multiple classes here. For example, 'btn btn-primary'.
164
+ */
165
+ classList?: string;
166
+ /**
167
+ * The variant of the button. You can use any of the variants defined in OverGridBtn.vue. For example, 'primary', 'secondary', 'danger', etc.
168
+ */
169
+ variant?: string;
170
+ /**
171
+ * If true, the button is a dropdown button. If false, the button is a normal button.
172
+ */
173
+ dropdowned?: boolean;
174
+ /**
175
+ * If true, the button is disabled. If false, the button is enabled.
176
+ */
177
+ disabled?: boolean;
178
+ /**
179
+ * The function that is called when the button is clicked. You can access the full record object while you define buttons in the OperationsFormatterConfigType.buttons function.
180
+ */
181
+ action?: Function;
182
+ }
183
+
184
+ export declare interface OverGridBulkOperationsConfig {
185
+ /**
186
+ * If true, the column selector/bulk operation is active. If false, the column selector/bulk operation is disabled.
187
+ */
188
+ active: boolean;
189
+ /**
190
+ * The bulk operation methods. You can define multiple methods here. Each method has a title, a key (must be unique) and an action function. The action function gets the checked rows and a function to clear the checked rows.
191
+ */
192
+ methods: Array<{
193
+ title: string;
194
+ key: string;
195
+ action: (checkedRows: any[], clearRows: () => void) => void;
196
+ }>;
197
+ }
198
+
199
+ export declare interface OverGridColumnFilter {
200
+ /**
201
+ * The key of the field that this filter applies to.
202
+ */
203
+ key: string;
204
+ /**
205
+ * The filter key is used when the DTO key is different from the filter key what the server expects.
206
+ * This is useful when the server expects a different key for filtering.
207
+ * For example, if the field key is 'id' but the server expects 'user.id' for filtering,
208
+ * Most of the time it is the same as the field key.
209
+ */
210
+ filterKey: string;
211
+ /**
212
+ * The type of the filter.
213
+ * This can be 'text', 'number', 'date', etc.
214
+ */
215
+ type: string;
216
+ /**
217
+ * The operator of the filter.
218
+ * This can be 'cn', 'ncn', 'eq', 'neq', etc.
219
+ */
220
+ operation: string;
221
+ /**
222
+ * The value of the filter.
223
+ * This can be a string, number, date, etc. depending on the type of the filter.
224
+ */
225
+ value: any;
226
+ }
227
+
228
+ export declare interface OverGridColumnFiltersConfig {
229
+ /**
230
+ * If true, the column filters are active. If false, the column filters are disabled.
231
+ */
232
+ active: boolean;
233
+ }
234
+
235
+ export declare interface OverGridColumnSelectorConfig {
236
+ /**
237
+ * If true, the column selector is active. If false, the column selector is disabled.
238
+ */
239
+ active: boolean;
240
+ }
241
+
242
+ /**
243
+ * The full configuration object for the OverGrid
244
+ */
245
+ export declare interface OverGridConfig {
246
+ /**
247
+ * The unique ID of the grid. This is used for the grid's internal operations. It should be unique for each grid in the same domain.
248
+ */
249
+ gridUniqueId: string;
250
+ /**
251
+ * The endpoint of the API
252
+ */
253
+ endpoint: string;
254
+ /**
255
+ * The field that you use as unique ID in records. This field is used internally for row selection, bulk operations and "extra row".
256
+ * For example, if your server returns an object like this: { data: [{ id: 1, name: 'Jane' }, { id: 2, name: 'Jack' }], count: 2 }, then the idKey is 'id'.
257
+ * Not set this field leads to unexpected behavior and bugs.
258
+ */
259
+ idkey?: string;
260
+ /**
261
+ * Theme code for the OverGrid.
262
+ */
263
+ theme?: string;
264
+ /**
265
+ * The root key of the server's response object. For example, if your server returns an object like this: { data: [{...}, {...}], count: 2 }, then the root key is 'data'. If null, the root key is the root object itself.
266
+ */
267
+ rootkey?: string;
268
+ /**
269
+ * The possible languages that the grid can use. If not set, the grid will use the default language, which is 'en'.
270
+ * Currently, the possible languages are 'en' and 'hu'.
271
+ * If you set the locale to an object, you can pass a custom locale to the grid. See the 'i18n' section for more information.
272
+ */
273
+ locale?: string | Record<string, string>;
274
+ /**
275
+ * If true, the grid will show the about window. Otherwise the grid will not show the about window.
276
+ */
277
+ hideAboutWindow?: boolean;
278
+ /**
279
+ * The configuration object for the ordering in grid. If not set, the order is fully disabled.
280
+ */
281
+ orderConfiguration?: OverGridOrderConfig;
282
+ /**
283
+ * You can modify the server request parameters before sending to the server. This function is called before the request is sent. You can modify the ordering, pagination and filtering parameters in order to your needs. If not set, the grid will send the parameters as is.
284
+ * @param orders List of ordering objects. Each object has a key and a direction (ASC or DESC).
285
+ * @param pagination The pagination object.
286
+ * @param filters List of filters. Each filter has a key, an operator and a value.
287
+ * @returns The modified URLSearchParams object.
288
+ */
289
+ serverTransformation?: (orders: any, pagination: any, filters: any, searchQuery?: string) => URLSearchParams;
290
+ /**
291
+ * You can modify the axios instance before sending the request to the server. This function is called before the request is sent. You can modify the axios instance in order to your needs. If not set, the grid will use the default axios instance.
292
+ * Use this function to set custom headers, base URL, or any other axios configuration.
293
+ * This function should return the modified axios instance.
294
+ * @param axios The default axios instance.
295
+ * @returns The modified axios instance.
296
+ */
297
+ axiosConfigurator?: (axios: any) => any;
298
+ /**
299
+ * The pagination configuration object for the grid.
300
+ */
301
+ pagination?: OverGridPaginationConfig;
302
+ /**
303
+ * The row highlighter configuration object for the grid.
304
+ * If not set, the row highlighter is disabled.
305
+ */
306
+ rowHighlighter?: OverGridRowHighlighterConfig;
307
+ /**
308
+ * Setup the column filters for the grid.
309
+ * If not set, the column filters are disabled.
310
+ * If you want to use the column filters, you can set the active property to true
311
+ */
312
+ columnFilters?: OverGridColumnFiltersConfig;
313
+ /**
314
+ * The search configuration object for the grid.
315
+ * If not set, the search is disabled.
316
+ * If you want to use the search, you can set the active property to true.
317
+ */
318
+ search?: OverGridSearchConfig;
319
+ extraRow?: OverGridExtraRowConfig;
320
+ bulkOperations?: OverGridBulkOperationsConfig;
321
+ events?: {
322
+ /**
323
+ * The event is fired when the grid is ready. The grid is ready when the first data load is finished.
324
+ */
325
+ onDataLoad?: (data: Array<any>) => Array<any>;
326
+ onDataLoadWithFullResponse?: (response: any) => Array<any>;
327
+ /**
328
+ * The event is fired when the grid is ready after a refresh. The grid is ready when the first data load is finished.
329
+ */
330
+ readyAfterRefresh?: () => void;
331
+ /**
332
+ * The event is fired when the selected records on the current pages are changed. The function gets the selected rows.
333
+ */
334
+ onBulkSelectChanges?: (checkedRows: Array<any>) => void;
335
+ };
336
+ columnSelector?: OverGridColumnSelectorConfig;
337
+ currentPageExport?: OverGridCurrentPageExportConfig;
338
+ refreshable?: OverGridRefreshableConfig;
339
+ /**
340
+ * The columns configuration object for the grid. The key of the object is the field name in the server's response. The value is the configuration object for the column. See the MappingRecordType for more information.
341
+ */
342
+ mapping?: OverGridField[];
343
+ }
344
+
345
+ export declare interface OverGridCurrentPageExportConfig {
346
+ /**
347
+ * If true, the XLSX/CSV export is active. If false, the XLSX/CSV export is disabled.
348
+ */
349
+ active: boolean;
350
+ /**
351
+ * If true, the XLSX export is enabled. If false, the XLSX export is disabled.
352
+ * One of the fields 'xlsxEnabled' or 'csvEnabled' must be true to enable the export functionality.
353
+ */
354
+ xlsxEnabled?: boolean;
355
+ /**
356
+ * If true, the CSV export is enabled. If false, the CSV export is disabled.
357
+ * One of the fields 'xlsxEnabled' or 'csvEnabled' must be true to enable the export functionality.
358
+ */
359
+ csvEnabled?: boolean;
360
+ additionalExportFields?: {
361
+ /**
362
+ * User-defined function to append additional fields for the export. The function gets the record object and should return an array.
363
+ */
364
+ columnsFn?: Function;
365
+ };
366
+ }
367
+
368
+ export declare interface OverGridEnumMapping {
369
+ [key: string]: {
370
+ title: string;
371
+ class?: string;
372
+ };
373
+ }
374
+
375
+ export declare interface OverGridExtraRowConfig {
376
+ /**
377
+ * If true, the extra row is active. If false, the extra row is disabled.
378
+ */
379
+ active: boolean;
380
+ /**
381
+ * Determines the user can open more than one extra row at the same time. If false, the user can open only one extra row at a time (close the other when open a new one).
382
+ */
383
+ multiOpen: boolean;
384
+ /**
385
+ * Ths extraRow slot gets the full record object of the "parent". You can define extra fields here that you want to pass to the slot.
386
+ */
387
+ extraSlotParams: object;
388
+ }
389
+
390
+ export declare class OverGridField {
391
+ constructor(key: string, title: string, fieldsObject: OverGridFields);
392
+ fieldsObject: OverGridFields;
393
+ /**
394
+ * The field name is the key of the field in the record object. It is used to access the value of the field in the record object responded from server.
395
+ * For example, if the field name is 'id', you can access the value of the field in the record object using record.id.
396
+ */
397
+ key: string;
398
+ /**
399
+ * The title of the column shown in the thead.
400
+ */
401
+ title: string;
402
+ /**
403
+ * If true, the column is visible. If false, the column is hidden in grid.
404
+ */
405
+ visible?: boolean;
406
+ /**
407
+ * If set, the column is filterable. If false, the column is not filterable.
408
+ */
409
+ columnFilter?: {
410
+ /**
411
+ * If true, the filter is active. If false, the filter is disabled for the field.
412
+ */
413
+ active: boolean;
414
+ /**
415
+ * The filter type. The filter type is used to determine the filter input field. The possible values are 'text', 'number', 'date', 'enum'.
416
+ */
417
+ type?: string;
418
+ /**
419
+ * The key to send to the server. If not set, the key is the same as the field name. If set, the key is the value of the key. Useful when the server expects a different key as it serves in the DTO.
420
+ */
421
+ filterKey?: string;
422
+ /**
423
+ * The configuration object for the filter. The configuration object is specific to the filter type.
424
+ * For example, a 'enum' filter can have a 'values' field to define the possible statuses.
425
+ * See the documentation for more information about the filter types.
426
+ */
427
+ config?: any;
428
+ };
429
+ /**
430
+ * A function to modify the data after it gets from the server but before showing in the cell. This function is called before the data is shown in the cell. You can modify the data here. For example, you can format a date, or you can show a different value based on the raw data.
431
+ * @param data The raw data of the cell
432
+ * @param record The full record object
433
+ * @returns The modified/formatted/tweaked data to show in the cell
434
+ */
435
+ middleware?: (data: any, record: any) => any;
436
+ /**
437
+ * A function to transform the data before export to an XLSX (or CSV) cell. This function is called before the data is written to the XLSX (or CSV) file. You can modify the data here. For example, you can format a date, or you can show a different value based on the raw data.
438
+ * If the exportMiddleware is set, the middleware function will not be called for the export. If the exportMiddleware is not set, the middleware function will be called for the export. If neither are set, the Formatter will be used to format the data for export, if applicable (e.g.: Status formatter, Boolean formatter, etc.).
439
+ * @param data The raw data of the cell
440
+ * @param record The full record object
441
+ * @param format The format of the cell. The format is used to determine the type of the export. Currently, the possible values are 'xlsx', 'csv'.
442
+ * @returns The modified/formatted/tweaked data to show in the cell
443
+ */
444
+ exportMiddleware?: (data: any, record: any, format?: string) => any;
445
+ /**
446
+ * If true, the column is selectable in the Column Selector Panel. If false, the column is not selectable.
447
+ * Default is true.
448
+ */
449
+ selectable?: boolean;
450
+ /**
451
+ * If true, the column is orderable/sortable. If false, the column is not orderable/sortable.
452
+ * Default is true.
453
+ */
454
+ orderable?: boolean;
455
+ /**
456
+ * You can set a custom order key for the column. If not set, the order key is the same as the field name. Useful when the server expects a different key as it serves in the DTO.
457
+ */
458
+ orderKey?: string;
459
+ /**
460
+ * If its true or not set, the column is exportable and will be added in the export file. If false, the column is not exportable.
461
+ * Default is true.
462
+ */
463
+ exportable?: boolean;
464
+ /**
465
+ * Sets the width of the column. If not set, the column width is auto. Example values: '100px', '10%'.
466
+ */
467
+ width?: string;
468
+ /**
469
+ * The formatter configuration object for the column. The formatter is a special component to format the data in the cell.
470
+ * There are 9 types of formatters built-in: 'Boolean', 'DateTime', 'Highlighter', 'HTML', 'LongText', 'Operations', 'Status', 'Strong', 'Tailwind'.
471
+ * You can set the formatter type and the configuration object for the formatter. For example, a 'Strong' type of formatter makes the text bold in cell, and a 'DateTime' type of formatter formats the date.
472
+ * You can define your own custom formatter as well. Check the documentation 'Custom formatters' section for more information.
473
+ */
474
+ formatter?: {
475
+ /**
476
+ * The type of the formatter.
477
+ */
478
+ type: string;
479
+ /**
480
+ * The configuration object for the formatter. The configuration object is specific to the formatter type.
481
+ * For example, a 'DateTime' formatter can have a 'format' field to define the date format, while a 'Status' formatter can have a 'statuses' field to define the possible statuses.
482
+ */
483
+ config?: any;
484
+ };
485
+ setTitle(title: string): OverGridField;
486
+ setVisible(visible: boolean): OverGridField;
487
+ setColumnFilter(columnFilter: {
488
+ active: boolean;
489
+ type?: string;
490
+ filterKey?: string;
491
+ config?: any;
492
+ }): OverGridField;
493
+ setSelectable(selectable: boolean): OverGridField;
494
+ setOrerable(orderable: boolean): OverGridField;
495
+ setOrderKey(orderKey: string): OverGridField;
496
+ setExportable(exportable: boolean): OverGridField;
497
+ setWidth(width: string): OverGridField;
498
+ setFilterKey(filterKey: string): OverGridField;
499
+ setOrderable(orderable: boolean): OverGridField;
500
+ setFormatter(type: string, config?: any): OverGridField;
501
+ setMiddleware(middleware: (data: any, record: any) => any): OverGridField;
502
+ setExportMiddleware(exportMiddleware: (data: any, record: any, format?: string) => any): OverGridField;
503
+ commit(): OverGridFields;
504
+ }
505
+
506
+ declare class OverGridFields {
507
+ mapping: Ref<OverGridField[]>;
508
+ actionButtonFieldCounter: number;
509
+ constructor();
510
+ mappingVisible: () => OverGridField[];
511
+ addField(key: string, title: string): OverGridField;
512
+ addNumberField(key: string, title: string, extraConfig?: any): OverGridField;
513
+ addTextField(key: string, title: string, extraConfig?: any): OverGridField;
514
+ addDateField(key: string, title: string, extraConfig?: any): OverGridField;
515
+ addEnumField(key: string, title: string, enumMapping: OverGridEnumMapping, extraConfig?: any): OverGridField;
516
+ addBooleanField(key: string, title: string, extraConfig?: any): OverGridField;
517
+ addActionButtonField(title: string, buttons: OverGridActionButton[]): OverGridField;
518
+ }
519
+
520
+ export declare interface OverGridOrderConfig {
521
+ /**
522
+ * If true, the ordering is active. If false, the ordering is disabled.
523
+ */
524
+ active: boolean;
525
+ /**
526
+ * Sets the initial order direction when a field is added to the ordering. If not set, the default order direction is 'DESC'.
527
+ * * Possible values are 'ASC' for ascending order and 'DESC' for descending order.
528
+ */
529
+ initialOrderDirection?: string;
530
+ /**
531
+ * Sets the default key for ordering in grid. Works only if the defaultOrderDirection is set. If not set, default ordering is disabled.
532
+ */
533
+ defaultOrder?: {
534
+ /**
535
+ * The key of the field to order by. This should match one of the field keys defined in the grid.
536
+ */
537
+ key: string;
538
+ /**
539
+ * The key used for ordering. This can be different from the field key if the server expects a different key for ordering. Most of the time it is the same as the field key.
540
+ */
541
+ orderKey: string;
542
+ /**
543
+ * Sets the default direction for ordering in grid. Works only if the defaultOrderKey is set. If not set, default ordering is disabled.
544
+ * Possible values are 'ASC' for ascending order and 'DESC' for descending order.
545
+ */
546
+ direction: string;
547
+ };
548
+ /**
549
+ * If true, the user can define multiple fields for ordering. If false, the user can define only one field for ordering.
550
+ */
551
+ orderMultiple?: boolean;
552
+ /**
553
+ * If true, the grid will show the order index in column title. Works only if the orderMultiple is set to true. For example if the user orders by 'name' and 'age', the grid will show '1' on name column title, and '2' in age column title.
554
+ */
555
+ showOrderIndex?: boolean;
556
+ }
557
+
558
+ export declare interface OverGridPaginationConfig {
559
+ /**
560
+ * If true, the pagination is active. If false, the pagination is disabled.
561
+ */
562
+ active: boolean;
563
+ /**
564
+ * The initial page number.
565
+ */
566
+ initialPage: number;
567
+ /**
568
+ * The initial page size.
569
+ */
570
+ initialSize: number;
571
+ /**
572
+ * If true, the pagination starts with page 0. If false, it starts with page 1.
573
+ * This is useful for APIs that use 0-based pagination.
574
+ * If not set, the default is false (1-based pagination).
575
+ */
576
+ startWithZero?: boolean;
577
+ /**
578
+ * The possible page sizes that the user can select/change in settins menu. If not set, the grid will not show the page size selector.
579
+ */
580
+ possiblePageSizes?: Array<number>;
581
+ /**
582
+ * Define the field that you use in the server's response to store the total number of records. This field is used for pagination. For example, if your server returns an object like this: { data: [{...}, {...}], count: 2 }, then the allRecordsCountKey is 'count'.
583
+ */
584
+ allRecordsCountKey: string;
585
+ }
586
+
587
+ export declare interface OverGridPaginationState {
588
+ page: number;
589
+ pageSize: number;
590
+ totalPages: number;
591
+ }
592
+
593
+ export declare interface OverGridRefreshableConfig {
594
+ /**
595
+ * If true, the refresh button is active. If false, the refresh button is hidden.
596
+ */
597
+ manualActive: boolean;
598
+ /**
599
+ * If true, the auto refresh is active in the grid's menu. If false, the auto refresh is disabled.
600
+ */
601
+ autoActive: boolean;
602
+ /**
603
+ * If true, the auto refresh can be disabled in the grid's menu by the user. If false, the auto refresh cannot be disabled.
604
+ */
605
+ autoCanBeDisabled: boolean;
606
+ /**
607
+ * The auto refresh values. You can set multiple values here. Each value has a key (must be unique), a refresh interval in seconds and a title. The default value is the value that is selected by default in the grid's menu.
608
+ */
609
+ autoValues: Array<{
610
+ /**
611
+ * The key of the value. This key is used in the grid's menu to identify the value. It must be unique in the array.
612
+ */
613
+ key: string;
614
+ /**
615
+ * The refresh interval in seconds.
616
+ */
617
+ refreshInterval: number;
618
+ /**
619
+ * The title of the value. This title is shown in the grid's menu.
620
+ */
621
+ title: string;
622
+ /**
623
+ * If true, the value is the default value. If false, the value is not the default value.
624
+ */
625
+ default?: boolean;
626
+ }>;
627
+ }
628
+
629
+ export declare interface OverGridRowHighlighterConfig {
630
+ /**
631
+ * Row highlighter: You can highlight any row in the grid (e.g. you can set a slightly darker background color). For example you can set background color based on a priority value in record.
632
+ * If true, the row highlighter is active. If false, the row highlighter is disabled.
633
+ */
634
+ active: boolean;
635
+ /**
636
+ * Define the highlighter function. This function should return a boolean value. If the function returns true, the row will be highlighted.
637
+ * @param record The current record with all fields.
638
+ */
639
+ fn: (record: any) => boolean;
640
+ /**
641
+ * The class that will be added to the row if the highlighter function returns true.
642
+ */
643
+ classList?: string;
644
+ }
645
+
646
+ export declare interface OverGridSearchConfig {
647
+ /**
648
+ * If true, the search is active. If false, the search is disabled.
649
+ */
650
+ active: boolean;
651
+ /**
652
+ * The placeholder text for the search input.
653
+ */
654
+ inputPlaceholder?: string;
655
+ /**
656
+ * The initial query to set in the search input when the grid is loaded.
657
+ * This can be used to pre-populate the search input with a specific value.
658
+ */
659
+ initialQuery?: string;
660
+ /**
661
+ * The debounce time in milliseconds for the search input.
662
+ * Default is 300ms.
663
+ */
664
+ debounceTime?: number;
665
+ }
666
+
667
+ export declare interface OverGridUseAboutModalInterface {
668
+ showModal: () => void;
669
+ closeModal: () => void;
670
+ isModalShown: Ref<boolean>;
671
+ }
672
+
673
+ export declare interface OverGridUseAutoRefreshInterface {
674
+ changeAutoRefreshValue: (value: string) => void;
675
+ autoRefresh: Ref<string>;
676
+ }
677
+
678
+ export declare interface OverGridUseBulkOperationsInterface {
679
+ checkedRows: Ref<string[]>;
680
+ }
681
+
682
+ export declare interface OverGridUseColumnFiltersInterface {
683
+ filters: Ref<OverGridColumnFilter[]>;
684
+ isFieldActive: (field: OverGridField) => boolean;
685
+ toggleColumnFilter: (field: OverGridField) => void;
686
+ fieldUnderAdding: Ref<OverGridField | null>;
687
+ closeColumnFilterConfigModal: () => void;
688
+ registerColumnFilter: (filter: OverGridColumnFilter) => void;
689
+ initiateColumnFilter: (field: OverGridField) => void;
690
+ removeColumnFilter: (field: OverGridField) => void;
691
+ editColumnFilter: (field: OverGridField) => void;
692
+ returnCurrentFilter: (field: OverGridField) => OverGridColumnFilter | undefined;
693
+ }
694
+
695
+ export declare interface OverGridUseColumnSelectorInterface {
696
+ showModal: () => void;
697
+ closeModal: () => void;
698
+ isModalShown: Ref<boolean>;
699
+ setColumns: (selectedColumns: string[]) => void;
700
+ selectedFields: Ref<string[] | null>;
701
+ filter(fields: OverGridField[]): OverGridField[];
702
+ }
703
+
704
+ export declare interface OverGridUseCurrentPageExportInterface {
705
+ showModal: () => void;
706
+ closeModal: () => void;
707
+ isModalShown: Ref<boolean>;
708
+ }
709
+
710
+ export declare interface OverGridUseExtraRowInterface {
711
+ openedRows: Ref<string[]>;
712
+ isRowOpened: (id?: string) => boolean;
713
+ openRow: (id?: string) => void;
714
+ closeRow: (id?: string) => void;
715
+ toggleRow: (id?: string) => void;
716
+ }
717
+
718
+ export declare interface OverGridUseOrderingInterface {
719
+ isFieldActive: (field: OverGridField) => boolean;
720
+ addOrder: (field: OverGridField) => void;
721
+ removeOrder: (field: OverGridField) => void;
722
+ toggleField: (field: OverGridField) => void;
723
+ getFieldOrderDirection: (field: OverGridField) => string | undefined;
724
+ rawState: Ref<{
725
+ key: string;
726
+ direction: string;
727
+ }[]>;
728
+ state: {
729
+ key: string;
730
+ direction: string;
731
+ }[];
732
+ }
733
+
734
+ export declare interface OverGridUsePaginationInterface {
735
+ state: OverGridPaginationState;
736
+ nextPage: () => void;
737
+ previousPage: () => void;
738
+ setPage: (newPage: number) => void;
739
+ setByResponse: (responseData: any) => void;
740
+ hasPreviousPage: () => boolean;
741
+ hasNextPage: () => boolean;
742
+ lastPage: () => void;
743
+ firstPage: () => void;
744
+ currentPageForUI?: ComputedRef<number>;
745
+ changePageSize: (newPageSize: number) => void;
746
+ pageSize: ComputedRef<number>;
747
+ }
748
+
749
+ export declare interface OverGridUseRowHighlighterInterface {
750
+ getClassList(record: any): string;
751
+ }
752
+
753
+ export declare interface OverGridUseSearchInterface {
754
+ query: Ref<string>;
755
+ debounce: (func: Function) => void;
756
+ }
757
+
758
+ export { }