@hybridly/vue 0.10.0-beta.1 → 0.10.0-beta.10

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/index.d.mts CHANGED
@@ -1,12 +1,27 @@
1
- import * as vue10 from "vue";
2
- import { App, ComputedRef, DeepReadonly, MaybeRefOrGetter, Plugin, PropType, Ref, h } from "vue";
3
- import * as _hybridly_core0 from "@hybridly/core";
4
- import { GlobalHybridlyProperties, HybridRequestOptions, Method, Plugin as Plugin$1, RouteName, RouteParameters, RouterContext, RouterContextOptions, UrlResolvable, can, registerHook as registerHook$1, route, router } from "@hybridly/core";
1
+ import { n as __reExport, t as __exportAll } from "./_chunks/chunk.mjs";
2
+ import { GlobalHybridlyProperties, HybridRequestOptions, Method, NavigationResponse, Plugin, Progress, RouteName, RouteParameters, RouterContext, RouterContextOptions, UrlResolvable, can, registerHook as registerHook$1, route, router } from "@hybridly/core";
5
3
  import { FormDataConvertible, RequestData } from "@hybridly/utils";
4
+ import * as vue from "vue";
5
+ import { App, ComputedRef, DeepReadonly, DefineComponent, MaybeRefOrGetter, Plugin as Plugin$1, Ref, h } from "vue";
6
6
  import { Path, PathValue, SearchableObject } from "@clickbar/dot-diver";
7
- import { Axios } from "axios";
8
- import * as _vue_shared0 from "@vue/shared";
9
7
 
8
+ //#region src/components/link.d.ts
9
+ interface RouterLinkProps {
10
+ href?: string;
11
+ as?: string | object;
12
+ method?: Method | Lowercase<Method>;
13
+ data?: RequestData;
14
+ external?: boolean;
15
+ disabled?: boolean;
16
+ options?: Omit<HybridRequestOptions, 'url' | 'data' | 'method'>;
17
+ text?: string;
18
+ preload?: boolean | 'hover' | 'mount';
19
+ preserveScroll?: boolean;
20
+ preserveState?: boolean;
21
+ }
22
+ declare const RouterLink: DefineComponent<RouterLinkProps>;
23
+ import * as import__hybridly_core from "@hybridly/core";
24
+ //#endregion
10
25
  //#region src/plugins/progress.d.ts
11
26
  interface ProgressOptions {
12
27
  /**
@@ -44,9 +59,9 @@ type InternalProperties = GlobalHybridlyProperties & {
44
59
  [key: string]: Property$1;
45
60
  };
46
61
  /** Accesses all current properties. */
47
- declare function useProperties<T extends object, Global extends InternalProperties = InternalProperties>(): vue10.DeepReadonly<vue10.UnwrapNestedRefs<T & Global>>;
62
+ declare function useProperties<T extends object, Global extends InternalProperties = InternalProperties>(): vue.DeepReadonly<vue.UnwrapNestedRefs<T & Global>>;
48
63
  /** Accesses a property with a dot notation. */
49
- declare function useProperty<Override = never, T extends SearchableObject = GlobalHybridlyProperties, P extends Path<T> & string = Path<T> & string, ReturnType$1 = ([Override] extends [never] ? PathValue<T, P> : Override)>(path: [Override] extends [never] ? P : string): ComputedRef<ReturnType$1>;
64
+ declare function useProperty<Override = never, T extends SearchableObject = GlobalHybridlyProperties, P extends Path<T> & string = Path<T> & string, ReturnType = ([Override] extends [never] ? PathValue<T, P> : Override)>(path: [Override] extends [never] ? P : string): ComputedRef<ReturnType>;
50
65
  /**
51
66
  * Sets the property at the given path to the given value.
52
67
  * Note: this helper is experimental and may change in the future.
@@ -79,54 +94,41 @@ interface FormOptions<T extends SearchableObject> extends Omit<HybridRequestOpti
79
94
  */
80
95
  transform?: (fields: T) => any;
81
96
  }
82
- declare function useForm<T extends SearchableObject, P extends Path<T> & string = Path<T> & string>(options: FormOptions<T>): {
97
+ interface FormReturn<T extends SearchableObject, P extends Path<T> & string = Path<T> & string> {
83
98
  resetFields: (...keys: P[]) => void;
84
99
  reset: () => void;
85
100
  resetSubmissionState: () => void;
86
101
  clear: (...keys: P[]) => void;
87
- fields: vue10.UnwrapRef<T>;
102
+ fields: T;
88
103
  abort: () => void;
89
104
  setErrors: (incoming: Errors<T>) => void;
90
105
  clearErrors: (...keys: P[]) => void;
91
106
  clearError: (key: P) => void;
92
107
  setInitial: (newInitial: Partial<T>) => void;
93
108
  hasDirty: (...keys: P[]) => boolean;
94
- submitWith: (optionsOverrides?: Omit<FormOptions<T>, "fields" | "key">) => Promise<_hybridly_core0.NavigationResponse>;
95
- submitWithOptions: (optionsOverrides?: Omit<FormOptions<T>, "fields" | "key">) => Promise<_hybridly_core0.NavigationResponse>;
96
- submit: () => Promise<_hybridly_core0.NavigationResponse>;
109
+ submitWith: (optionsOverrides?: Omit<FormOptions<T>, 'fields' | 'key'>) => Promise<any>;
110
+ submitWithOptions: (optionsOverrides?: Omit<FormOptions<T>, 'fields' | 'key'>) => Promise<any>;
111
+ submit: () => Promise<any>;
97
112
  hasErrors: boolean;
98
- initial: vue10.UnwrapRef<DeepReadonly<T>>;
99
- loaded: DeepReadonly<any>;
100
- progress: {
101
- readonly event: {
102
- readonly loaded: number;
103
- readonly total?: number | undefined;
104
- readonly progress?: number | undefined;
105
- readonly bytes: number;
106
- readonly rate?: number | undefined;
107
- readonly estimated?: number | undefined;
108
- readonly upload?: boolean | undefined;
109
- readonly download?: boolean | undefined;
110
- readonly event?: any;
111
- readonly lengthComputable: boolean;
112
- };
113
- readonly percentage: Readonly<number>;
114
- } | undefined;
113
+ initial: DeepReadonly<T>;
114
+ loaded: DeepReadonly<T>;
115
+ progress: Progress | undefined;
115
116
  isDirty: boolean;
116
- errors: vue10.UnwrapRef<DeepReadonly<[Errors<T>] extends [vue10.Ref<any, any>] ? _vue_shared0.IfAny<vue10.Ref<any, any> & Errors<T>, vue10.Ref<vue10.Ref<any, any> & Errors<T>, vue10.Ref<any, any> & Errors<T>>, vue10.Ref<any, any> & Errors<T>> : vue10.Ref<vue10.UnwrapRef<Errors<T>>, Errors<T> | vue10.UnwrapRef<Errors<T>>>>>;
117
+ errors: Errors<T>;
117
118
  processing: boolean;
118
119
  successful: boolean;
119
120
  failed: boolean;
120
121
  recentlySuccessful: boolean;
121
122
  recentlyFailed: boolean;
122
- };
123
+ }
124
+ declare function useForm<T extends SearchableObject, P extends Path<T> & string = Path<T> & string>(options: FormOptions<T>): FormReturn<T, P>;
123
125
  //#endregion
124
126
  //#region src/composables/history.d.ts
125
127
  /**
126
128
  * Returns a ref with a value saved in the history state through Hybridly.
127
129
  * The state is linked to a specific browser history entry.
128
130
  */
129
- declare function useHistoryState<T = any>(key: string, initial: T): [T] extends [vue10.Ref<any, any>] ? _vue_shared0.IfAny<T, vue10.Ref<T, T>, T> : vue10.Ref<vue10.UnwrapRef<T>, T | vue10.UnwrapRef<T>>;
131
+ declare function useHistoryState<T = any>(key: string, initial: T): Ref<T>;
130
132
  //#endregion
131
133
  //#region src/composables/back-forward.d.ts
132
134
  type BackForwardCallback = (context: RouterContext) => void;
@@ -177,6 +179,7 @@ interface PaginatorLink {
177
179
  url?: string;
178
180
  label: string;
179
181
  active: boolean;
182
+ page?: number;
180
183
  }
181
184
  interface CursorPaginatorMeta {
182
185
  path: string;
@@ -210,6 +213,11 @@ interface PaginatorMeta {
210
213
  next_page_url?: string;
211
214
  prev_page_url?: string;
212
215
  }
216
+ type MaybeWithData<T> = T | Omit<T, 'data'>;
217
+ type PaginatorResult<T, P = MaybeWithData<Paginator<T>>> = P extends MaybeWithData<Paginator<T>> ? P & {
218
+ to: (page: number, options?: Omit<index_d_exports.HybridRequestOptions, 'method' | 'url'>) => Promise<index_d_exports.NavigationResponse> | undefined;
219
+ } : P;
220
+ declare function createPaginator<T, P extends MaybeWithData<Paginator<T> | SimplePaginator<T> | CursorPaginator<T>>>(paginator: P, defaultOptions?: Omit<index_d_exports.HybridRequestOptions, 'method' | 'url'>): PaginatorResult<T, P>;
213
221
  //#endregion
214
222
  //#region src/composables/register-hook.d.ts
215
223
  /**
@@ -229,21 +237,27 @@ type Properties = Record<string | number, Property>;
229
237
  * Exposes utilities related to the dialogs.
230
238
  */
231
239
  declare function useDialog(): {
232
- /** Closes the dialog. */
233
- close: () => void;
234
- /** Closes the dialog without a server round-trip. */
235
- closeLocally: () => void;
236
- /** Unmounts the dialog. Should be called after its closing animations. */
237
- unmount: () => void;
238
- /** Whether the dialog is shown. */
239
- show: vue10.WritableComputedRef<boolean | undefined, boolean | undefined>;
240
- /** Properties of the dialog. */
241
- properties: vue10.ComputedRef<Properties | undefined>;
240
+ /** Closes the dialog. */close: () => void; /** Closes the dialog without a server round-trip. */
241
+ closeLocally: () => void; /** Unmounts the dialog. Should be called after its closing animations. */
242
+ unmount: () => void; /** Whether the dialog is shown. */
243
+ show: vue.WritableComputedRef<boolean | undefined, boolean | undefined>; /** Properties of the dialog. */
244
+ properties: vue.ComputedRef<Properties | undefined>;
242
245
  };
243
246
  //#endregion
244
247
  //#region src/composables/refinements.d.ts
245
248
  type SortDirection = 'asc' | 'desc';
246
249
  type AvailableHybridRequestOptions = Omit<HybridRequestOptions, 'url' | 'data'>;
250
+ type AvailableHybridRequestOptionsForFilters = AvailableHybridRequestOptions & {
251
+ operator?: FilterOperator;
252
+ options?: {
253
+ /**
254
+ * Show empty relationships in relationship filters.
255
+ */
256
+ empty?: boolean;
257
+ [key: string]: any;
258
+ };
259
+ };
260
+ type FilterOperator = 'equals' | 'not_equals' | 'in' | 'not_in' | 'is_null' | 'is_not_null' | 'contains' | 'not_contains' | 'begins_with' | 'ends_with' | 'is_empty' | 'is_not_empty' | 'greater_than' | 'greater_than_or_equal' | 'less_than' | 'less_than_or_equal' | 'between' | 'not_between' | 'after' | 'before' | 'in_the_last' | 'not_in_the_last';
247
261
  interface ToggleSortOptions extends AvailableHybridRequestOptions {
248
262
  direction?: SortDirection;
249
263
  /** Additional sort data, only applied when sorting. */
@@ -266,238 +280,471 @@ interface BindFilterOptions<T> extends AvailableHybridRequestOptions {
266
280
  */
267
281
  syncDebounce?: number;
268
282
  }
269
- declare global {
270
- interface FilterRefinement {
283
+ /**
284
+ * Base interface for all filter refinements.
285
+ */
286
+ interface BaseFilterRefinement {
287
+ /**
288
+ * Whether this filter is currently active.
289
+ */
290
+ is_active: boolean;
291
+ /**
292
+ * A string-based icon identifier.
293
+ */
294
+ icon?: string;
295
+ /**
296
+ * The type of this filter.
297
+ */
298
+ type: string;
299
+ /**
300
+ * The label of the filter.
301
+ */
302
+ label: string;
303
+ /**
304
+ * The name of the filter.
305
+ */
306
+ name: string;
307
+ /**
308
+ * The current value of the filter.
309
+ */
310
+ value: any;
311
+ /**
312
+ * The current search query of the filter.
313
+ */
314
+ search_query?: string;
315
+ /**
316
+ * The current options of the filter.
317
+ */
318
+ options?: Record<string, any>;
319
+ /**
320
+ * Whether this filter is hidden.
321
+ */
322
+ hidden: boolean;
323
+ /**
324
+ * The default value of the filter.
325
+ */
326
+ default: any;
327
+ /**
328
+ * The current operator of the filter.
329
+ */
330
+ operator?: FilterOperator;
331
+ /**
332
+ * The default operator of the filter.
333
+ */
334
+ default_operator?: FilterOperator;
335
+ /**
336
+ * The list of supported operators for this filter.
337
+ */
338
+ supported_operators?: FilterOperator[];
339
+ /**
340
+ * The metadata attributes of the filter.
341
+ */
342
+ metadata: {
271
343
  /**
272
- * Whether this filter is currently active.
344
+ * A string-based icon identifier.
273
345
  */
274
- is_active: boolean;
346
+ icon?: string;
275
347
  /**
276
- * The type of this filter.
348
+ * The label of the filter, suitable for display purposes.
277
349
  */
278
- type: 'trashed' | 'callback' | 'exact' | 'similar:loose' | 'similar:begins_with_strict' | 'similar:ends_with_strict' | string;
350
+ label?: string;
279
351
  /**
280
- * The label of the filter.
352
+ * A label suitable for previewing this filter in a compact context, like a pill.
281
353
  */
282
- label: string;
354
+ preview_label?: string;
283
355
  /**
284
- * The metadata attributes of the filter.
356
+ * A string-based identifier suitable for previewing this filter in a compact context, like a pill.
285
357
  */
286
- metadata: Record<string, any>;
358
+ current_value_label?: string;
287
359
  /**
288
- * The name of the fitler.
360
+ * A string-based icon identifier suitable for displaying next to the current value of this filter in a compact context, like a pill.
289
361
  */
290
- name: string;
362
+ current_value_icon?: string;
291
363
  /**
292
- * The current value of the filter.
364
+ * A custom property.
293
365
  */
294
- value: any;
366
+ [key: string]: any;
367
+ };
368
+ }
369
+ /**
370
+ * Text filter refinement.
371
+ */
372
+ interface TextFilterRefinement extends BaseFilterRefinement {
373
+ type: 'text';
374
+ operator?: FilterOperator;
375
+ }
376
+ /**
377
+ * Select filter refinement.
378
+ */
379
+ interface SelectFilterRefinement extends BaseFilterRefinement {
380
+ type: 'select';
381
+ operator?: FilterOperator;
382
+ metadata: BaseFilterRefinement['metadata'] & {
295
383
  /**
296
- * Whether this filter is hidden.
384
+ * Whether multiple options can be selected.
297
385
  */
298
- hidden: boolean;
386
+ is_multiple?: boolean;
299
387
  /**
300
- * The default value of the filter.
388
+ * Whether the select filter is searchable.
301
389
  */
302
- default: any;
303
- }
304
- interface SortRefinement {
390
+ is_searchable?: boolean;
305
391
  /**
306
- * Whether this sort is currently active.
392
+ * Available options for the select filter.
307
393
  */
308
- is_active: boolean;
394
+ options?: Record<string | number, string>;
309
395
  /**
310
- * The current direction of the sort.
396
+ * Label for the selected options.
311
397
  */
312
- direction?: SortDirection;
398
+ selected_options_label?: string;
313
399
  /**
314
- * The default direction of the sort.
400
+ * Whether the filter allows an empty relationship option.
315
401
  */
316
- default?: SortDirection;
402
+ allows_empty_relationship_option?: boolean;
317
403
  /**
318
- * The label of the sort.
404
+ * Label for the empty relationship option.
319
405
  */
320
- label: string;
406
+ empty_relationship_option_label?: string;
321
407
  /**
322
- * The metadata attributes of the sort.
408
+ * Label for the empty search result.
323
409
  */
324
- metadata: Record<string, any>;
410
+ empty_search_result_label?: string;
411
+ };
412
+ }
413
+ /**
414
+ * Ternary filter refinement.
415
+ */
416
+ interface TernaryFilterRefinement extends BaseFilterRefinement {
417
+ type: 'ternary';
418
+ operator?: FilterOperator;
419
+ metadata: BaseFilterRefinement['metadata'] & {
325
420
  /**
326
- * The name of the sort.
421
+ * Label for the true state.
327
422
  */
328
- name: string;
423
+ true_label?: string;
329
424
  /**
330
- * The value corresponding to the descending sort.
425
+ * Label for the false state.
331
426
  */
332
- desc: string;
427
+ false_label?: string;
333
428
  /**
334
- * The value corresponding to the ascending sort.
429
+ * Placeholder label.
335
430
  */
336
- asc: string;
431
+ placeholder?: string;
432
+ };
433
+ supported_operators?: never;
434
+ }
435
+ /**
436
+ * Boolean filter refinement.
437
+ */
438
+ interface BooleanFilterRefinement extends BaseFilterRefinement {
439
+ type: 'boolean';
440
+ operator?: FilterOperator;
441
+ metadata: BaseFilterRefinement['metadata'] & {
337
442
  /**
338
- * The value that will be applied on toggle.
443
+ * Label for the true state.
339
444
  */
340
- next: string;
445
+ true_label?: string;
341
446
  /**
342
- * Whether this sort is hidden.
447
+ * Label for the false state.
343
448
  */
344
- hidden: boolean;
345
- }
346
- interface Refinements {
449
+ false_label?: string;
450
+ };
451
+ }
452
+ /**
453
+ * Numeric filter refinement.
454
+ */
455
+ interface NumericFilterRefinement extends BaseFilterRefinement {
456
+ type: 'numeric';
457
+ operator?: FilterOperator;
458
+ }
459
+ /**
460
+ * Time suggestion for single date filters.
461
+ */
462
+ interface TimeSuggestion {
463
+ type: 'time';
464
+ label: string;
465
+ date: string;
466
+ }
467
+ /**
468
+ * Timeframe suggestion for date range filters.
469
+ */
470
+ interface TimeframeSuggestion {
471
+ type: 'timeframe';
472
+ label: string;
473
+ start: string;
474
+ end: string;
475
+ }
476
+ /**
477
+ * Date filter refinement.
478
+ */
479
+ interface DateFilterRefinement extends BaseFilterRefinement {
480
+ type: 'date';
481
+ operator?: FilterOperator;
482
+ metadata: BaseFilterRefinement['metadata'] & {
347
483
  /**
348
- * The list of available filters.
484
+ * Whether this is a timeframe filter (with start and end columns).
349
485
  */
350
- filters: Array<FilterRefinement>;
486
+ is_timeframe?: boolean;
351
487
  /**
352
- * The list of available sorts.
488
+ * The start column for timeframe filters.
353
489
  */
354
- sorts: Array<SortRefinement>;
490
+ start_column?: string;
355
491
  /**
356
- * The URL scope for these refinements.
492
+ * The end column for timeframe filters.
357
493
  */
358
- scope?: string;
494
+ end_column?: string;
359
495
  /**
360
- * The scope keys for these refinements.
496
+ * Suggested dates or timeframes for this filter.
361
497
  */
362
- keys: {
363
- /**
364
- * The scope key for sorting.
365
- */
366
- sorts: string;
367
- /**
368
- * The scope key for filtering.
369
- */
370
- filters: string;
371
- };
372
- }
498
+ suggestions?: Array<TimeSuggestion | TimeframeSuggestion>;
499
+ /**
500
+ * A description for this filter, suitable for display purposes.
501
+ */
502
+ description?: string;
503
+ };
504
+ }
505
+ /**
506
+ * Trashed filter refinement.
507
+ */
508
+ interface TrashedFilterRefinement extends BaseFilterRefinement {
509
+ type: 'trashed';
510
+ supported_operators?: never;
511
+ }
512
+ /**
513
+ * Callback filter refinement.
514
+ */
515
+ interface CallbackFilterRefinement extends BaseFilterRefinement {
516
+ type: 'callback' | (string & {});
517
+ supported_operators?: never;
373
518
  }
374
- declare function useRefinements<Properties$1 extends object, RefinementsKey extends { [K in keyof Properties$1]: Properties$1[K] extends Refinements ? K : never }[keyof Properties$1]>(properties: Properties$1, refinementsKeys: RefinementsKey, defaultOptions?: AvailableHybridRequestOptions): {
519
+ /**
520
+ * Represents a filter.
521
+ */
522
+ type FilterRefinement = TextFilterRefinement | SelectFilterRefinement | TernaryFilterRefinement | BooleanFilterRefinement | NumericFilterRefinement | DateFilterRefinement | TrashedFilterRefinement | CallbackFilterRefinement;
523
+ interface SortRefinement {
375
524
  /**
376
- * Binds a named filter to a ref, applying filters when it changes and updating the ref accordingly.
525
+ * Whether this sort is currently active.
377
526
  */
378
- bindFilter: <T = any>(name: string, options?: BindFilterOptions<T>) => Ref<T>;
527
+ is_active: boolean;
379
528
  /**
380
- * Available filters.
529
+ * The current direction of the sort.
381
530
  */
382
- filters: {
383
- /**
384
- * Applies this filter.
385
- */
386
- apply: (value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
387
- /**
388
- * Clears this filter.
389
- */
390
- clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
391
- /**
392
- * Whether this filter is currently active.
393
- */
394
- is_active: boolean;
395
- /**
396
- * The type of this filter.
397
- */
398
- type: "trashed" | "callback" | "exact" | "similar:loose" | "similar:begins_with_strict" | "similar:ends_with_strict" | string;
399
- /**
400
- * The label of the filter.
401
- */
402
- label: string;
403
- /**
404
- * The metadata attributes of the filter.
405
- */
406
- metadata: Record<string, any>;
407
- /**
408
- * The name of the fitler.
409
- */
410
- name: string;
411
- /**
412
- * The current value of the filter.
413
- */
414
- value: any;
531
+ direction?: SortDirection;
532
+ /**
533
+ * The default direction of the sort.
534
+ */
535
+ default?: SortDirection;
536
+ /**
537
+ * The label of the sort.
538
+ */
539
+ label: string;
540
+ /**
541
+ * The metadata attributes of the sort.
542
+ */
543
+ metadata: Record<string, any>;
544
+ /**
545
+ * The name of the sort.
546
+ */
547
+ name: string;
548
+ /**
549
+ * The value corresponding to the descending sort.
550
+ */
551
+ desc: string;
552
+ /**
553
+ * The value corresponding to the ascending sort.
554
+ */
555
+ asc: string;
556
+ /**
557
+ * The value that will be applied on toggle.
558
+ */
559
+ next: string;
560
+ /**
561
+ * Whether this sort is hidden.
562
+ */
563
+ hidden: boolean;
564
+ }
565
+ interface Refinements {
566
+ /**
567
+ * The list of available filters.
568
+ */
569
+ filters: Array<FilterRefinement>;
570
+ /**
571
+ * The list of available sorts.
572
+ */
573
+ sorts: Array<SortRefinement>;
574
+ /**
575
+ * The URL scope for these refinements.
576
+ */
577
+ scope?: string;
578
+ /**
579
+ * The scope keys for these refinements.
580
+ */
581
+ keys: {
415
582
  /**
416
- * Whether this filter is hidden.
583
+ * The scope key for sorting.
417
584
  */
418
- hidden: boolean;
585
+ sorts: string;
419
586
  /**
420
- * The default value of the filter.
587
+ * The scope key for filtering.
421
588
  */
422
- default: any;
423
- }[];
589
+ filters: string;
590
+ };
591
+ }
592
+ /**
593
+ * Base bound filter refinement with common methods.
594
+ */
595
+ interface BoundFilterRefinementMethods {
596
+ /**
597
+ * Applies this filter.
598
+ */
599
+ apply: (value: any, options?: AvailableHybridRequestOptionsForFilters) => Promise<NavigationResponse | undefined>;
600
+ /**
601
+ * Clears this filter.
602
+ */
603
+ clear: (options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
604
+ /**
605
+ * Searches this filter.
606
+ */
607
+ search: (value?: string | number, options?: AvailableHybridRequestOptions) => Promise<NavigationResponse | undefined>;
608
+ /**
609
+ * Whether this filter is a date filter.
610
+ */
611
+ isDateFilter: () => boolean;
612
+ /**
613
+ * Whether this filter is a select filter.
614
+ */
615
+ isSelectFilter: () => boolean;
616
+ /**
617
+ * Whether this filter is a search filter.
618
+ */
619
+ isSearchFilter: () => boolean;
620
+ /**
621
+ * Whether this filter is a ternary filter.
622
+ */
623
+ isTernaryFilter: () => boolean;
624
+ /**
625
+ * Whether this filter is a boolean filter.
626
+ */
627
+ isBooleanFilter: () => boolean;
628
+ /**
629
+ * Whether this filter is a trashed filter.
630
+ */
631
+ isTrashedFilter: () => boolean;
632
+ /**
633
+ * Whether this filter is a callback filter.
634
+ */
635
+ isCallbackFilter: () => boolean;
636
+ }
637
+ /**
638
+ * Checks whether the given filter is a text filter, and narrows its type.
639
+ */
640
+ declare function isTextFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundTextFilterRefinement;
641
+ /**
642
+ * Checks whether the given filter is a date filter, and narrows its type.
643
+ */
644
+ declare function isDateFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundDateFilterRefinement;
645
+ /**
646
+ * Checks whether the given filter is a select filter, and narrows its type.
647
+ */
648
+ declare function isSelectFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundSelectFilterRefinement;
649
+ /**
650
+ * Checks whether the given filter is a ternary filter, and narrows its type.
651
+ */
652
+ declare function isTernaryFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundTernaryFilterRefinement;
653
+ /**
654
+ * Checks whether the given filter is a boolean filter, and narrows its type.
655
+ */
656
+ declare function isBooleanFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundBooleanFilterRefinement;
657
+ /**
658
+ * Checks whether the given filter is a trashed filter, and narrows its type.
659
+ */
660
+ declare function isTrashedFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundTrashedFilterRefinement;
661
+ /**
662
+ * Checks whether the given filter is a callback filter, and narrows its type.
663
+ */
664
+ declare function isCallbackFilter(filter: FilterRefinement | BoundFilterRefinement): filter is BoundCallbackFilterRefinement;
665
+ /**
666
+ * Bound text filter refinement with type-specific methods.
667
+ */
668
+ interface BoundTextFilterRefinement extends TextFilterRefinement, BoundFilterRefinementMethods {}
669
+ /**
670
+ * Bound date filter refinement with type-specific methods.
671
+ */
672
+ interface BoundDateFilterRefinement extends DateFilterRefinement, BoundFilterRefinementMethods {}
673
+ /**
674
+ * Bound select filter refinement with type-specific methods.
675
+ */
676
+ interface BoundSelectFilterRefinement extends SelectFilterRefinement, BoundFilterRefinementMethods {}
677
+ /**
678
+ * Bound ternary filter refinement with type-specific methods.
679
+ */
680
+ interface BoundTernaryFilterRefinement extends TernaryFilterRefinement, BoundFilterRefinementMethods {}
681
+ /**
682
+ * Bound boolean filter refinement with type-specific methods.
683
+ */
684
+ interface BoundBooleanFilterRefinement extends BooleanFilterRefinement, BoundFilterRefinementMethods {}
685
+ /**
686
+ * Bound trashed filter refinement with type-specific methods.
687
+ */
688
+ interface BoundTrashedFilterRefinement extends TrashedFilterRefinement, BoundFilterRefinementMethods {}
689
+ /**
690
+ * Bound callback filter refinement with type-specific methods.
691
+ */
692
+ interface BoundCallbackFilterRefinement extends CallbackFilterRefinement, BoundFilterRefinementMethods {}
693
+ /**
694
+ * Union of all bound filter refinement types.
695
+ */
696
+ type BoundFilterRefinement = BoundTextFilterRefinement | BoundSelectFilterRefinement | BoundTernaryFilterRefinement | BoundBooleanFilterRefinement | BoundTrashedFilterRefinement | BoundCallbackFilterRefinement;
697
+ interface BoundSortRefinement extends SortRefinement {
698
+ /**
699
+ * Toggles this sort.
700
+ */
701
+ toggle: (options?: ToggleSortOptions) => Promise<NavigationResponse | undefined>;
702
+ /**
703
+ * Checks if this sort is active.
704
+ */
705
+ isSorting: (direction?: SortDirection) => boolean;
706
+ /**
707
+ * Clears this sort.
708
+ */
709
+ clear: (options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
710
+ }
711
+ interface UseRefinements {
712
+ /**
713
+ * Binds a named filter to a ref, applying filters when it changes and updating the ref accordingly.
714
+ */
715
+ bindFilter: <T = string | number>(name: string, options?: BindFilterOptions<T>) => Ref<T>;
716
+ /**
717
+ * Available filters.
718
+ */
719
+ filters: ComputedRef<Array<BoundFilterRefinement>>;
424
720
  /**
425
721
  * Available sorts.
426
722
  */
427
- sorts: {
428
- /**
429
- * Toggles this sort.
430
- */
431
- toggle: (options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
432
- /**
433
- * Checks if this sort is active.
434
- */
435
- isSorting: (direction?: SortDirection) => boolean;
436
- /**
437
- * Clears this sort.
438
- */
439
- clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
440
- /**
441
- * Whether this sort is currently active.
442
- */
443
- is_active: boolean;
444
- /**
445
- * The current direction of the sort.
446
- */
447
- direction?: SortDirection;
448
- /**
449
- * The default direction of the sort.
450
- */
451
- default?: SortDirection;
452
- /**
453
- * The label of the sort.
454
- */
455
- label: string;
456
- /**
457
- * The metadata attributes of the sort.
458
- */
459
- metadata: Record<string, any>;
460
- /**
461
- * The name of the sort.
462
- */
463
- name: string;
464
- /**
465
- * The value corresponding to the descending sort.
466
- */
467
- desc: string;
468
- /**
469
- * The value corresponding to the ascending sort.
470
- */
471
- asc: string;
472
- /**
473
- * The value that will be applied on toggle.
474
- */
475
- next: string;
476
- /**
477
- * Whether this sort is hidden.
478
- */
479
- hidden: boolean;
480
- }[];
723
+ sorts: ComputedRef<Array<BoundSortRefinement>>;
481
724
  /**
482
725
  * The key for the filters.
483
726
  */
484
- filtersKey: vue10.ComputedRef<string>;
727
+ filtersKey: Readonly<Ref<string>>;
728
+ /**
729
+ * The key for the sorts.
730
+ */
731
+ sortsKey: Readonly<Ref<string>>;
485
732
  /**
486
733
  * Gets a filter by name.
487
734
  */
488
- getFilter: (name: string) => FilterRefinement | undefined;
735
+ getFilter: (name: string) => BoundFilterRefinement | undefined;
489
736
  /**
490
737
  * Gets a sort by name.
491
738
  */
492
- getSort: (name: string) => SortRefinement | undefined;
739
+ getSort: (name: string) => BoundSortRefinement | undefined;
493
740
  /**
494
741
  * Resets all filters and sorts.
495
742
  */
496
- reset: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
743
+ reset: (options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
497
744
  /**
498
745
  * Toggles the specified sort.
499
746
  */
500
- toggleSort: (name: string, options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
747
+ toggleSort: (name: string, options?: ToggleSortOptions) => Promise<NavigationResponse | undefined>;
501
748
  /**
502
749
  * Whether a sort is active.
503
750
  */
@@ -517,25 +764,26 @@ declare function useRefinements<Properties$1 extends object, RefinementsKey exte
517
764
  /**
518
765
  * Clears the given filter.
519
766
  */
520
- clearFilter: (filter: string, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
767
+ clearFilter: (filter: string, options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
521
768
  /**
522
769
  * Resets all sorts.
523
770
  */
524
- clearSorts: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
771
+ clearSorts: (options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
525
772
  /**
526
773
  * Resets all filters.
527
774
  */
528
- clearFilters: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
775
+ clearFilters: (options?: AvailableHybridRequestOptions) => Promise<NavigationResponse>;
529
776
  /**
530
777
  * Applies the given filter.
531
778
  */
532
- applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
533
- };
779
+ applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptionsForFilters) => Promise<NavigationResponse | undefined>;
780
+ }
781
+ declare function useRefinements<T extends Refinements>(input: MaybeRefOrGetter<T>, defaultOptions?: AvailableHybridRequestOptions): UseRefinements;
534
782
  //#endregion
535
783
  //#region src/composables/current-route.d.ts
536
784
  declare function useRoute(): {
537
- isNavigating: Readonly<vue10.Ref<boolean, boolean>>;
538
- current: Readonly<vue10.Ref<string | undefined, string | undefined>>;
785
+ isNavigating: Readonly<vue.Ref<boolean, boolean>>;
786
+ current: Readonly<vue.Ref<string | undefined, string | undefined>>;
539
787
  matches: <T extends RouteName>(name: MaybeRefOrGetter<T>, parameters?: RouteParameters<T>) => boolean;
540
788
  };
541
789
  //#endregion
@@ -549,7 +797,9 @@ interface BulkSelection<T = any> {
549
797
  except: Set<T>;
550
798
  }
551
799
  declare function useBulkSelect<T = any>(): {
552
- allSelected: vue10.ComputedRef<boolean>;
800
+ allSelected: vue.ComputedRef<boolean>;
801
+ anySelected: vue.ComputedRef<boolean>;
802
+ toggleAll: (force?: boolean) => void;
553
803
  selectAll: () => void;
554
804
  deselectAll: () => void;
555
805
  select: (...records: T[]) => void;
@@ -574,7 +824,7 @@ declare global {
574
824
  inlineActions: InlineAction[];
575
825
  bulkActions: BulkAction[];
576
826
  records: Array<T>;
577
- paginator: Exclude<PaginatorKind extends 'cursor' ? CursorPaginator<T> : (PaginatorKind extends 'simple' ? SimplePaginator<T> : Paginator<T>), 'data'>;
827
+ paginator: Omit<PaginatorKind extends 'cursor' ? CursorPaginator<T> : (PaginatorKind extends 'simple' ? SimplePaginator<T> : Paginator<T>), 'data'>;
578
828
  refinements: Refinements;
579
829
  endpoint: string;
580
830
  }
@@ -598,15 +848,20 @@ interface Action {
598
848
  type: string;
599
849
  /** Custom metadata for this action. */
600
850
  metadata: any;
851
+ /** A user-defined URL to which to post the action. */
852
+ url?: string;
601
853
  }
602
854
  interface BulkAction extends Action {
603
855
  /** Should deselect all records after action. */
604
856
  deselect: boolean;
605
857
  }
606
- interface BulkActionOptions {
858
+ interface BulkActionOptions extends Omit<HybridRequestOptions, 'url'> {
607
859
  /** Force deselecting all records after action. */
608
860
  deselect?: boolean;
609
861
  }
862
+ interface InlineActionOptions<T> extends Omit<HybridRequestOptions, 'url'> {
863
+ record: T;
864
+ }
610
865
  interface InlineAction extends Action {}
611
866
  type RecordIdentifier = string | number;
612
867
  type AsRecordTypeWithExtra<T extends Record<string, any>> = { [K in keyof T]: {
@@ -627,149 +882,94 @@ interface TableDefaultOptions extends AvailableHybridRequestOptions {
627
882
  /**
628
883
  * Provides utilities for working with tables.
629
884
  */
630
- declare function useTable<RecordType extends (Props[PropsKey] extends Table<infer T, any> ? T : never), RecordTypeWithExtra extends AsRecordTypeWithExtra<RecordType>, PaginatorKindName extends (Props[PropsKey] extends Table<any, infer PaginatorKind> ? PaginatorKind : never), TableType extends (Props[PropsKey] extends Table<any, PaginatorKindName> ? Table<RecordTypeWithExtra, PaginatorKindName> : never), Props extends Record<string, unknown>, PropsKey extends keyof Props>(props: Props, key: PropsKey, defaultOptions?: TableDefaultOptions): {
631
- bindFilter: <T = any>(name: string, options?: BindFilterOptions<T>) => vue10.Ref<T, T>;
632
- filters: {
633
- apply: (value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
634
- clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
635
- is_active: boolean;
636
- type: "trashed" | "callback" | "exact" | "similar:loose" | "similar:begins_with_strict" | "similar:ends_with_strict" | string;
637
- label: string;
638
- metadata: Record<string, any>;
639
- name: string;
640
- value: any;
641
- hidden: boolean;
642
- default: any;
643
- }[];
644
- sorts: {
645
- toggle: (options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
646
- isSorting: (direction?: SortDirection) => boolean;
647
- clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
648
- is_active: boolean;
649
- direction?: SortDirection | undefined;
650
- default?: SortDirection | undefined;
651
- label: string;
652
- metadata: Record<string, any>;
653
- name: string;
654
- desc: string;
655
- asc: string;
656
- next: string;
657
- hidden: boolean;
658
- }[];
885
+ declare function useTable<T extends Table<any, any>, RecordType extends Record<string, any> = (T extends Table<infer R, any> ? R : any), PaginatorKind extends 'cursor' | 'length-aware' | 'simple' = (T extends Table<any, infer P> ? P : 'length-aware'), RecordTypeWithExtra extends Record<string, any> = AsRecordTypeWithExtra<RecordType>>(input: MaybeRefOrGetter<T>, defaultOptions?: TableDefaultOptions): {
886
+ bindFilter: <T_1 = string | number>(name: string, options?: BindFilterOptions<T_1>) => vue.Ref<T_1>;
887
+ filters: BoundFilterRefinement[];
888
+ sorts: BoundSortRefinement[];
659
889
  filtersKey: string;
660
- getFilter: (name: string) => FilterRefinement | undefined;
661
- getSort: (name: string) => SortRefinement | undefined;
662
- reset: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
663
- toggleSort: (name: string, options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
890
+ sortsKey: string;
891
+ getFilter: (name: string) => BoundFilterRefinement | undefined;
892
+ getSort: (name: string) => BoundSortRefinement | undefined;
893
+ reset: (options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse>;
894
+ toggleSort: (name: string, options?: ToggleSortOptions) => Promise<index_d_exports.NavigationResponse | undefined>;
664
895
  isSorting: (name?: string, direction?: SortDirection) => boolean;
665
896
  isFiltering: (name?: string) => boolean;
666
897
  currentSorts: () => Array<SortRefinement>;
667
898
  currentFilters: () => Array<FilterRefinement>;
668
- clearFilter: (filter: string, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
669
- clearSorts: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
670
- clearFilters: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
671
- applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
899
+ clearFilter: (filter: string, options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse>;
900
+ clearSorts: (options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse>;
901
+ clearFilters: (options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse>;
902
+ applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptionsForFilters) => Promise<index_d_exports.NavigationResponse | undefined>;
672
903
  selectAll: () => void;
673
904
  deselectAll: () => void;
674
905
  selectPage: () => void;
675
906
  deselectPage: () => void;
676
907
  isPageSelected: boolean;
677
- isSelected: (record: RecordTypeWithExtra) => boolean;
908
+ isSelected: (record: RecordTypeWithExtra | RecordType) => boolean;
678
909
  allSelected: boolean;
910
+ anySelected: boolean;
679
911
  selection: BulkSelection<RecordIdentifier>;
680
912
  bindCheckbox: (key: RecordIdentifier) => {
681
913
  onChange: (event: Event) => void;
682
914
  checked: boolean;
683
915
  value: RecordIdentifier;
684
916
  };
685
- toggle: (record: RecordTypeWithExtra) => void;
686
- select: (record: RecordTypeWithExtra) => void;
687
- deselect: (record: RecordTypeWithExtra) => void;
917
+ toggle: (record: RecordTypeWithExtra | RecordType, force?: boolean) => void;
918
+ toggleAll: (force?: boolean) => void;
919
+ select: (record: RecordTypeWithExtra | RecordType) => void;
920
+ deselect: (record: RecordTypeWithExtra | RecordType) => void;
688
921
  inlineActions: {
689
- /** The name of this action. */
690
- name: string;
691
- /** The label of this action. */
692
- label: string;
693
- /** The type of this action. */
694
- type: string;
695
- /** Custom metadata for this action. */
696
- metadata: any;
697
- /** Executes the action. */
698
- execute: (record: RecordTypeWithExtra | RecordIdentifier) => Promise<_hybridly_core0.NavigationResponse>;
922
+ /** The name of this action. */name: string; /** The label of this action. */
923
+ label: string; /** The type of this action. */
924
+ type: string; /** Custom metadata for this action. */
925
+ metadata: any; /** A user-defined URL to which to post the action. */
926
+ url?: string; /** Executes the action. */
927
+ execute: (record: RecordTypeWithExtra | RecordIdentifier | RecordType) => Promise<index_d_exports.NavigationResponse | undefined>;
699
928
  }[];
700
929
  bulkActions: {
701
- /** Should deselect all records after action. */
702
- deselect: boolean;
703
- /** The name of this action. */
704
- name: string;
705
- /** The label of this action. */
706
- label: string;
707
- /** The type of this action. */
708
- type: string;
709
- /** Custom metadata for this action. */
710
- metadata: any;
711
- /** Executes the action. */
712
- execute: (options?: BulkActionOptions) => Promise<_hybridly_core0.NavigationResponse>;
930
+ /** Should deselect all records after action. */deselect: boolean; /** The name of this action. */
931
+ name: string; /** The label of this action. */
932
+ label: string; /** The type of this action. */
933
+ type: string; /** Custom metadata for this action. */
934
+ metadata: any; /** A user-defined URL to which to post the action. */
935
+ url?: string; /** Executes the action. */
936
+ execute: (options?: BulkActionOptions) => Promise<index_d_exports.NavigationResponse | undefined>;
713
937
  }[];
714
- executeInlineAction: (action: Action | string, record: RecordTypeWithExtra | RecordIdentifier) => Promise<_hybridly_core0.NavigationResponse>;
715
- executeBulkAction: (action: Action | string, options?: BulkActionOptions) => Promise<_hybridly_core0.NavigationResponse>;
938
+ executeInlineAction: (action: InlineAction | string, options: InlineActionOptions<RecordTypeWithExtra | RecordIdentifier | RecordType>) => Promise<index_d_exports.NavigationResponse | undefined>;
939
+ executeBulkAction: (action: BulkAction | string, options?: BulkActionOptions) => Promise<index_d_exports.NavigationResponse | undefined>;
716
940
  columns: {
717
- /** Toggles sorting for this column. */
718
- toggleSort: (options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
719
- /** Checks whether the column is being sorted. */
720
- isSorting: (direction?: SortDirection) => boolean;
721
- /** Applies the filer for this column. */
722
- applyFilter: (value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
723
- /** Clears the filter for this column. */
724
- clearFilter: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
725
- /** Checks whether the column is sortable. */
726
- isSortable: boolean;
727
- /** Checks whether the column is filterable. */
728
- isFilterable: boolean;
729
- /** The name of this column. */
730
- name: keyof RecordTypeWithExtra;
731
- /** The label of this column. */
732
- label: string;
733
- /** The type of this column. */
734
- type: string;
735
- /** Metadata of this column. */
941
+ /** Toggles sorting for this column. */toggleSort: (options?: ToggleSortOptions) => Promise<index_d_exports.NavigationResponse | undefined>; /** Checks whether the column is being sorted. */
942
+ isSorting: (direction?: SortDirection) => boolean; /** Applies the filer for this column. */
943
+ applyFilter: (value: any, options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse | undefined>; /** Clears the filter for this column. */
944
+ clearFilter: (options?: AvailableHybridRequestOptions) => Promise<index_d_exports.NavigationResponse>; /** Checks whether the column is sortable. */
945
+ isSortable: boolean; /** Checks whether the column is filterable. */
946
+ isFilterable: boolean; /** The name of this column. */
947
+ name: keyof RecordTypeWithExtra; /** The label of this column. */
948
+ label: string; /** The type of this column. */
949
+ type: string; /** Metadata of this column. */
736
950
  metadata: Record<string, any>;
737
951
  }[];
738
952
  data: RecordType[];
739
953
  records: {
740
- /** The actual record. */
741
- record: any[];
742
- /** The key of the record. Use this instead of `id`. */
743
- key: RecordIdentifier;
744
- /** Executes the given inline action. */
745
- execute: (action: string | InlineAction) => Promise<_hybridly_core0.NavigationResponse>;
746
- /** Gets the available inline actions. */
954
+ /** The actual record. */record: RecordType; /** The key of the record. Use this instead of `id`. */
955
+ key: RecordIdentifier; /** Executes the given inline action. */
956
+ execute: (action: string | InlineAction) => Promise<index_d_exports.NavigationResponse | undefined>; /** Gets the available inline actions. */
747
957
  actions: {
748
- /** Executes the action. */
749
- execute: () => Promise<_hybridly_core0.NavigationResponse>;
750
- /** The name of this action. */
751
- name: string;
752
- /** The label of this action. */
753
- label: string;
754
- /** The type of this action. */
755
- type: string;
756
- /** Custom metadata for this action. */
757
- metadata: any;
758
- }[];
759
- /** Selects this record. */
760
- select: () => void;
761
- /** Deselects this record. */
762
- deselect: () => void;
763
- /** Toggles the selection for this record. */
764
- toggle: (force?: boolean) => void;
765
- /** Checks whether this record is selected. */
766
- selected: boolean;
767
- /** Gets the value of the record for the specified column. */
768
- value: (column: string | Column<RecordTypeWithExtra>) => RecordType[string] | RecordType[number] | RecordType[symbol];
769
- /** Gets the extra object of the record for the specified column. */
958
+ /** Executes the action. */execute: () => Promise<index_d_exports.NavigationResponse | undefined>; /** The name of this action. */
959
+ name: string; /** The label of this action. */
960
+ label: string; /** The type of this action. */
961
+ type: string; /** Custom metadata for this action. */
962
+ metadata: any; /** A user-defined URL to which to post the action. */
963
+ url?: string;
964
+ }[]; /** Selects this record. */
965
+ select: () => void; /** Deselects this record. */
966
+ deselect: () => void; /** Toggles the selection for this record. */
967
+ toggle: (force?: boolean) => void; /** Checks whether this record is selected. */
968
+ selected: boolean; /** Gets the value of the record for the specified column. */
969
+ value: (column: string | Column<RecordTypeWithExtra>) => any; /** Gets the extra object of the record for the specified column. */
770
970
  extra: (column: string | Column<RecordTypeWithExtra>, path: string) => any;
771
971
  }[];
772
- paginator: Exclude<PaginatorKindName extends "cursor" ? CursorPaginator<RecordTypeWithExtra> : PaginatorKindName extends "simple" ? SimplePaginator<RecordTypeWithExtra> : Paginator<RecordTypeWithExtra>, "data">;
972
+ paginator: PaginatorResult<unknown, Omit<PaginatorKind extends "cursor" ? CursorPaginator<RecordTypeWithExtra> : PaginatorKind extends "simple" ? SimplePaginator<RecordTypeWithExtra> : Paginator<RecordTypeWithExtra>, "data">>;
773
973
  };
774
974
  //#endregion
775
975
  //#region src/composables/query-parameters.d.ts
@@ -817,7 +1017,9 @@ declare function initializeHybridly(options?: InitializeOptions): Promise<any>;
817
1017
  interface InitializeOptions {
818
1018
  /** Callback that gets executed before Vue is mounted. */
819
1019
  enhanceVue?: (/** Vue application to enhance. */
1020
+
820
1021
  vue: App<Element>, /** Initial payload. */
1022
+
821
1023
  payload: Record<string, any>) => any;
822
1024
  /** ID of the app element. */
823
1025
  id?: string;
@@ -834,7 +1036,7 @@ interface InitializeOptions {
834
1036
  /** Sets up the hybridly router. */
835
1037
  setup?: (options: SetupArguments) => any;
836
1038
  /** List of Hybridly plugins. */
837
- plugins?: Plugin$1[];
1039
+ plugins?: Plugin[];
838
1040
  /** Custom Axios instance. */
839
1041
  axios?: Axios;
840
1042
  /**
@@ -855,169 +1057,11 @@ interface SetupArguments {
855
1057
  context: RouterContext;
856
1058
  };
857
1059
  /** Vue plugin that registers the devtools. */
858
- hybridly: Plugin;
1060
+ hybridly: Plugin$1;
859
1061
  /** Renders the wrapper. */
860
1062
  render: () => ReturnType<typeof h>;
861
1063
  /** Initial payload. */
862
1064
  payload: Record<string, any>;
863
1065
  }
864
1066
  //#endregion
865
- //#region src/components/link.d.ts
866
- declare const RouterLink: vue10.DefineComponent<vue10.ExtractPropTypes<{
867
- href: {
868
- type: StringConstructor;
869
- required: false;
870
- default: undefined;
871
- };
872
- as: {
873
- type: (StringConstructor | ObjectConstructor)[];
874
- default: string;
875
- };
876
- method: {
877
- type: PropType<Method | Lowercase<Method>>;
878
- default: string;
879
- };
880
- data: {
881
- type: PropType<RequestData>;
882
- default: () => {};
883
- };
884
- external: {
885
- type: BooleanConstructor;
886
- default: boolean;
887
- };
888
- disabled: {
889
- type: BooleanConstructor;
890
- default: boolean;
891
- };
892
- options: {
893
- type: PropType<Omit<HybridRequestOptions, "url" | "data" | "method">>;
894
- default: () => {};
895
- };
896
- text: {
897
- type: StringConstructor;
898
- required: false;
899
- default: undefined;
900
- };
901
- preload: {
902
- type: PropType<boolean | "hover" | "mount">;
903
- default: boolean;
904
- };
905
- preserveScroll: {
906
- type: BooleanConstructor;
907
- default: undefined;
908
- };
909
- preserveState: {
910
- type: BooleanConstructor;
911
- default: undefined;
912
- };
913
- }>, (props: _vue_shared0.LooseRequired<Readonly<vue10.ExtractPropTypes<{
914
- href: {
915
- type: StringConstructor;
916
- required: false;
917
- default: undefined;
918
- };
919
- as: {
920
- type: (StringConstructor | ObjectConstructor)[];
921
- default: string;
922
- };
923
- method: {
924
- type: PropType<Method | Lowercase<Method>>;
925
- default: string;
926
- };
927
- data: {
928
- type: PropType<RequestData>;
929
- default: () => {};
930
- };
931
- external: {
932
- type: BooleanConstructor;
933
- default: boolean;
934
- };
935
- disabled: {
936
- type: BooleanConstructor;
937
- default: boolean;
938
- };
939
- options: {
940
- type: PropType<Omit<HybridRequestOptions, "url" | "data" | "method">>;
941
- default: () => {};
942
- };
943
- text: {
944
- type: StringConstructor;
945
- required: false;
946
- default: undefined;
947
- };
948
- preload: {
949
- type: PropType<boolean | "hover" | "mount">;
950
- default: boolean;
951
- };
952
- preserveScroll: {
953
- type: BooleanConstructor;
954
- default: undefined;
955
- };
956
- preserveState: {
957
- type: BooleanConstructor;
958
- default: undefined;
959
- };
960
- }>> & Readonly<{}> & {}>) => vue10.VNode<vue10.RendererNode, vue10.RendererElement, {
961
- [key: string]: any;
962
- }>, {}, {}, {}, vue10.ComponentOptionsMixin, vue10.ComponentOptionsMixin, {}, string, vue10.PublicProps, Readonly<vue10.ExtractPropTypes<{
963
- href: {
964
- type: StringConstructor;
965
- required: false;
966
- default: undefined;
967
- };
968
- as: {
969
- type: (StringConstructor | ObjectConstructor)[];
970
- default: string;
971
- };
972
- method: {
973
- type: PropType<Method | Lowercase<Method>>;
974
- default: string;
975
- };
976
- data: {
977
- type: PropType<RequestData>;
978
- default: () => {};
979
- };
980
- external: {
981
- type: BooleanConstructor;
982
- default: boolean;
983
- };
984
- disabled: {
985
- type: BooleanConstructor;
986
- default: boolean;
987
- };
988
- options: {
989
- type: PropType<Omit<HybridRequestOptions, "url" | "data" | "method">>;
990
- default: () => {};
991
- };
992
- text: {
993
- type: StringConstructor;
994
- required: false;
995
- default: undefined;
996
- };
997
- preload: {
998
- type: PropType<boolean | "hover" | "mount">;
999
- default: boolean;
1000
- };
1001
- preserveScroll: {
1002
- type: BooleanConstructor;
1003
- default: undefined;
1004
- };
1005
- preserveState: {
1006
- type: BooleanConstructor;
1007
- default: undefined;
1008
- };
1009
- }>> & Readonly<{}>, {
1010
- data: RequestData;
1011
- method: "delete" | "get" | Method | "post" | "put" | "patch";
1012
- preserveScroll: boolean;
1013
- preserveState: boolean;
1014
- href: string;
1015
- as: string | Record<string, any>;
1016
- external: boolean;
1017
- disabled: boolean;
1018
- options: Omit<HybridRequestOptions, "data" | "url" | "method">;
1019
- text: string;
1020
- preload: boolean | "hover" | "mount";
1021
- }, {}, {}, {}, string, vue10.ComponentProvideOptions, true, {}, any>;
1022
- //#endregion
1023
- export { Action, AvailableHybridRequestOptions, BindFilterOptions, BulkAction, BulkSelection, Column, DefaultFormOptions, type InitializeOptions, InlineAction, InternalProperties, RecordIdentifier, RouterLink, SortDirection, TableDefaultOptions, ToggleSortOptions, can, initializeHybridly, registerHook, route, router, setProperty, useBackForward, useBulkSelect, useDialog, useForm, useHistoryState, useProperties, useProperty, useQueryParameter, useQueryParameters, useRefinements, useRoute, useTable };
1067
+ export { Action, AvailableHybridRequestOptions, AvailableHybridRequestOptionsForFilters, BaseFilterRefinement, BindFilterOptions, BooleanFilterRefinement, BoundBooleanFilterRefinement, BoundCallbackFilterRefinement, BoundDateFilterRefinement, BoundFilterRefinement, BoundSelectFilterRefinement, BoundSortRefinement, BoundTernaryFilterRefinement, BoundTextFilterRefinement, BoundTrashedFilterRefinement, BulkAction, BulkSelection, CallbackFilterRefinement, Column, DateFilterRefinement, DefaultFormOptions, FilterOperator, FilterRefinement, FormReturn, type InitializeOptions, InlineAction, InternalProperties, MaybeWithData, NumericFilterRefinement, PaginatorResult, RecordIdentifier, Refinements, RouterLink, SelectFilterRefinement, SortDirection, SortRefinement, TableDefaultOptions, TernaryFilterRefinement, TextFilterRefinement, TimeSuggestion, TimeframeSuggestion, ToggleSortOptions, TrashedFilterRefinement, UseRefinements, can, createPaginator, initializeHybridly, isBooleanFilter, isCallbackFilter, isDateFilter, isSelectFilter, isTernaryFilter, isTextFilter, isTrashedFilter, registerHook, route, router, setProperty, useBackForward, useBulkSelect, useDialog, useForm, useHistoryState, useProperties, useProperty, useQueryParameter, useQueryParameters, useRefinements, useRoute, useTable };