@hybridly/vue 0.9.0 → 0.10.0-beta.1
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 +884 -872
- package/dist/index.mjs +1263 -1333
- package/package.json +12 -14
- package/LICENSE +0 -19
- package/dist/index.cjs +0 -1504
- package/dist/index.d.cts +0 -1011
- package/dist/index.d.ts +0 -1011
package/dist/index.d.mts
CHANGED
|
@@ -1,765 +1,778 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ComputedRef, DeepReadonly,
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { FormDataConvertible, RequestData } from '@hybridly/utils';
|
|
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";
|
|
5
|
+
import { FormDataConvertible, RequestData } from "@hybridly/utils";
|
|
6
|
+
import { Path, PathValue, SearchableObject } from "@clickbar/dot-diver";
|
|
7
|
+
import { Axios } from "axios";
|
|
8
|
+
import * as _vue_shared0 from "@vue/shared";
|
|
10
9
|
|
|
10
|
+
//#region src/plugins/progress.d.ts
|
|
11
11
|
interface ProgressOptions {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The delay after which the progress bar will
|
|
14
|
+
* appear during navigation, in milliseconds.
|
|
15
|
+
*
|
|
16
|
+
* @default 250
|
|
17
|
+
*/
|
|
18
|
+
delay: number;
|
|
19
|
+
/**
|
|
20
|
+
* The color of the progress bar.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to #29d.
|
|
23
|
+
*/
|
|
24
|
+
color: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to include the default NProgress styles.
|
|
27
|
+
*
|
|
28
|
+
* Defaults to true.
|
|
29
|
+
*/
|
|
30
|
+
includeCSS: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the NProgress spinner will be shown.
|
|
33
|
+
*
|
|
34
|
+
* Defaults to false.
|
|
35
|
+
*/
|
|
36
|
+
spinner: boolean;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/composables/property.d.ts
|
|
40
|
+
type Property$1 = string | number | boolean | Property$1[] | {
|
|
41
|
+
[name: string]: Property$1;
|
|
42
|
+
};
|
|
43
|
+
type InternalProperties = GlobalHybridlyProperties & {
|
|
44
|
+
[key: string]: Property$1;
|
|
45
|
+
};
|
|
39
46
|
/** Accesses all current properties. */
|
|
40
|
-
declare function useProperties<T extends object, Global extends
|
|
47
|
+
declare function useProperties<T extends object, Global extends InternalProperties = InternalProperties>(): vue10.DeepReadonly<vue10.UnwrapNestedRefs<T & Global>>;
|
|
41
48
|
/** Accesses a property with a dot notation. */
|
|
42
|
-
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>;
|
|
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>;
|
|
43
50
|
/**
|
|
44
51
|
* Sets the property at the given path to the given value.
|
|
45
52
|
* Note: this helper is experimental and may change in the future.
|
|
46
53
|
*/
|
|
47
|
-
declare function setProperty<Override = never, T extends SearchableObject = GlobalHybridlyProperties, P extends Path<T> & string = Path<T> & string, ValueType = [Override] extends [never] ? PathValue<T, P> : Override>(path: [Override] extends [never] ? P : string, value: ValueType): void;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
54
|
+
declare function setProperty<Override = never, T extends SearchableObject = GlobalHybridlyProperties, P extends Path<T> & string = Path<T> & string, ValueType = ([Override] extends [never] ? PathValue<T, P> : Override)>(path: [Override] extends [never] ? P : string, value: ValueType): void;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/composables/form.d.ts
|
|
57
|
+
type Errors<T extends SearchableObject> = { [K in keyof T]?: T[K] extends Record<string, any> ? Errors<T[K]> : string };
|
|
52
58
|
type DefaultFormOptions = Pick<FormOptions<object>, 'timeout' | 'reset' | 'updateInitials' | 'progress' | 'preserveScroll' | 'preserveState' | 'preserveUrl' | 'headers' | 'errorBag' | 'spoof' | 'transformUrl' | 'updateHistoryState' | 'useFormData'>;
|
|
53
59
|
interface FormOptions<T extends SearchableObject> extends Omit<HybridRequestOptions, 'data' | 'url'> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
fields: T;
|
|
61
|
+
url?: UrlResolvable | (() => UrlResolvable);
|
|
62
|
+
key?: string | false;
|
|
63
|
+
/**
|
|
64
|
+
* Defines the delay after which the `recentlySuccessful` and `recentlyFailed` variables are reset to `false`.
|
|
65
|
+
*/
|
|
66
|
+
timeout?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Resets the fields of the form to their initial value after a successful submission.
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
71
|
+
reset?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Updates the initial values from the form after a successful submission.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
updateInitials?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Callback executed before the form submission for transforming the fields.
|
|
79
|
+
*/
|
|
80
|
+
transform?: (fields: T) => any;
|
|
75
81
|
}
|
|
76
82
|
declare function useForm<T extends SearchableObject, P extends Path<T> & string = Path<T> & string>(options: FormOptions<T>): {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
83
|
+
resetFields: (...keys: P[]) => void;
|
|
84
|
+
reset: () => void;
|
|
85
|
+
resetSubmissionState: () => void;
|
|
86
|
+
clear: (...keys: P[]) => void;
|
|
87
|
+
fields: vue10.UnwrapRef<T>;
|
|
88
|
+
abort: () => void;
|
|
89
|
+
setErrors: (incoming: Errors<T>) => void;
|
|
90
|
+
clearErrors: (...keys: P[]) => void;
|
|
91
|
+
clearError: (key: P) => void;
|
|
92
|
+
setInitial: (newInitial: Partial<T>) => void;
|
|
93
|
+
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>;
|
|
97
|
+
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;
|
|
115
|
+
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
|
+
processing: boolean;
|
|
118
|
+
successful: boolean;
|
|
119
|
+
failed: boolean;
|
|
120
|
+
recentlySuccessful: boolean;
|
|
121
|
+
recentlyFailed: boolean;
|
|
116
122
|
};
|
|
117
|
-
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/composables/history.d.ts
|
|
118
125
|
/**
|
|
119
126
|
* Returns a ref with a value saved in the history state through Hybridly.
|
|
120
127
|
* The state is linked to a specific browser history entry.
|
|
121
128
|
*/
|
|
122
|
-
declare function useHistoryState<T = any>(key: string, initial: T): [T] extends [
|
|
123
|
-
|
|
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>>;
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/composables/back-forward.d.ts
|
|
124
132
|
type BackForwardCallback = (context: RouterContext) => void;
|
|
125
133
|
interface UseBackForwardOptions {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Calls `reloadOnBackForward` immediately.
|
|
136
|
+
*/
|
|
137
|
+
reload: boolean | HybridRequestOptions;
|
|
130
138
|
}
|
|
131
139
|
declare function useBackForward(options?: UseBackForwardOptions): {
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
onBackForward: (fn: BackForwardCallback) => void;
|
|
141
|
+
reloadOnBackForward: (options?: HybridRequestOptions) => void;
|
|
134
142
|
};
|
|
135
|
-
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/composables/paginator.d.ts
|
|
136
145
|
declare global {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
146
|
+
/**
|
|
147
|
+
* Paginated data with metadata in a `meta` wrap.
|
|
148
|
+
*/
|
|
149
|
+
interface Paginator<T = any> {
|
|
150
|
+
data: T[];
|
|
151
|
+
meta: PaginatorMeta;
|
|
152
|
+
links: PaginatorLink[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Simple-paginated data with metadata in a `meta` wrap.
|
|
156
|
+
*/
|
|
157
|
+
interface SimplePaginator<T = any> {
|
|
158
|
+
data: T[];
|
|
159
|
+
meta: SimplePaginatorMeta;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Cursor paginator.
|
|
163
|
+
*/
|
|
164
|
+
interface CursorPaginator<T = any> {
|
|
165
|
+
data: T[];
|
|
166
|
+
meta: CursorPaginatorMeta;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Paginated data without metadata wrapping.
|
|
170
|
+
*/
|
|
171
|
+
interface UnwrappedPaginator<T = any> extends PaginatorMeta {
|
|
172
|
+
data: T[];
|
|
173
|
+
links: PaginatorLink[];
|
|
174
|
+
}
|
|
166
175
|
}
|
|
167
176
|
interface PaginatorLink {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
177
|
+
url?: string;
|
|
178
|
+
label: string;
|
|
179
|
+
active: boolean;
|
|
171
180
|
}
|
|
172
181
|
interface CursorPaginatorMeta {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
path: string;
|
|
183
|
+
per_page: number;
|
|
184
|
+
prev_cursor: string;
|
|
185
|
+
next_cursor: string;
|
|
186
|
+
next_page_url?: string;
|
|
187
|
+
prev_page_url?: string;
|
|
179
188
|
}
|
|
180
189
|
interface SimplePaginatorMeta {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
path: string;
|
|
191
|
+
per_page: number;
|
|
192
|
+
current_page: number;
|
|
193
|
+
next_page_url?: string;
|
|
194
|
+
first_page_url: string;
|
|
195
|
+
prev_page_url?: string;
|
|
196
|
+
from: number;
|
|
197
|
+
to: number;
|
|
189
198
|
}
|
|
190
199
|
interface PaginatorMeta {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
path: string;
|
|
201
|
+
from: number;
|
|
202
|
+
to: number;
|
|
203
|
+
total: number;
|
|
204
|
+
per_page: number;
|
|
205
|
+
current_page: number;
|
|
206
|
+
first_page: number;
|
|
207
|
+
last_page: number;
|
|
208
|
+
first_page_url: string;
|
|
209
|
+
last_page_url: string;
|
|
210
|
+
next_page_url?: string;
|
|
211
|
+
prev_page_url?: string;
|
|
203
212
|
}
|
|
204
|
-
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/composables/register-hook.d.ts
|
|
205
215
|
/**
|
|
206
216
|
* Registers a global hook.
|
|
207
217
|
* If called inside a component, unregisters after the component is unmounted.
|
|
208
218
|
*/
|
|
209
219
|
declare const registerHook: typeof registerHook$1;
|
|
210
|
-
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region ../core/src/router/types.d.ts
|
|
211
222
|
type Property = null | string | number | boolean | Property[] | {
|
|
212
|
-
|
|
223
|
+
[name: string]: Property;
|
|
213
224
|
};
|
|
214
225
|
type Properties = Record<string | number, Property>;
|
|
215
|
-
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/composables/dialog.d.ts
|
|
216
228
|
/**
|
|
217
229
|
* Exposes utilities related to the dialogs.
|
|
218
230
|
*/
|
|
219
231
|
declare function useDialog(): {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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>;
|
|
230
242
|
};
|
|
231
|
-
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/composables/refinements.d.ts
|
|
232
245
|
type SortDirection = 'asc' | 'desc';
|
|
233
246
|
type AvailableHybridRequestOptions = Omit<HybridRequestOptions, 'url' | 'data'>;
|
|
234
247
|
interface ToggleSortOptions extends AvailableHybridRequestOptions {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
248
|
+
direction?: SortDirection;
|
|
249
|
+
/** Additional sort data, only applied when sorting. */
|
|
250
|
+
sortData?: {
|
|
251
|
+
[key: string]: FormDataConvertible;
|
|
252
|
+
};
|
|
240
253
|
}
|
|
241
254
|
interface BindFilterOptions<T> extends AvailableHybridRequestOptions {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
255
|
+
transformValue?: (value?: T) => any;
|
|
256
|
+
/** If specified, this callback will be responsible for watching the specified ref that contains the filter value. */
|
|
257
|
+
watch?: (ref: Ref<T>, cb: any) => void;
|
|
258
|
+
/**
|
|
259
|
+
* The debounce time in milliseconds for applying this filter.
|
|
260
|
+
* @default 250ms
|
|
261
|
+
*/
|
|
262
|
+
debounce?: number;
|
|
263
|
+
/**
|
|
264
|
+
* The debounce time in milliseconds for updating the ref.
|
|
265
|
+
* @default 250ms
|
|
266
|
+
*/
|
|
267
|
+
syncDebounce?: number;
|
|
268
|
+
}
|
|
269
|
+
declare global {
|
|
270
|
+
interface FilterRefinement {
|
|
245
271
|
/**
|
|
246
|
-
*
|
|
247
|
-
* @default 250ms
|
|
272
|
+
* Whether this filter is currently active.
|
|
248
273
|
*/
|
|
249
|
-
|
|
274
|
+
is_active: boolean;
|
|
250
275
|
/**
|
|
251
|
-
* The
|
|
252
|
-
* @default 250ms
|
|
276
|
+
* The type of this filter.
|
|
253
277
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
keys: {
|
|
350
|
-
/**
|
|
351
|
-
* The scope key for sorting.
|
|
352
|
-
*/
|
|
353
|
-
sorts: string;
|
|
354
|
-
/**
|
|
355
|
-
* The scope key for filtering.
|
|
356
|
-
*/
|
|
357
|
-
filters: string;
|
|
358
|
-
};
|
|
359
|
-
}
|
|
278
|
+
type: 'trashed' | 'callback' | 'exact' | 'similar:loose' | 'similar:begins_with_strict' | 'similar:ends_with_strict' | string;
|
|
279
|
+
/**
|
|
280
|
+
* The label of the filter.
|
|
281
|
+
*/
|
|
282
|
+
label: string;
|
|
283
|
+
/**
|
|
284
|
+
* The metadata attributes of the filter.
|
|
285
|
+
*/
|
|
286
|
+
metadata: Record<string, any>;
|
|
287
|
+
/**
|
|
288
|
+
* The name of the fitler.
|
|
289
|
+
*/
|
|
290
|
+
name: string;
|
|
291
|
+
/**
|
|
292
|
+
* The current value of the filter.
|
|
293
|
+
*/
|
|
294
|
+
value: any;
|
|
295
|
+
/**
|
|
296
|
+
* Whether this filter is hidden.
|
|
297
|
+
*/
|
|
298
|
+
hidden: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* The default value of the filter.
|
|
301
|
+
*/
|
|
302
|
+
default: any;
|
|
303
|
+
}
|
|
304
|
+
interface SortRefinement {
|
|
305
|
+
/**
|
|
306
|
+
* Whether this sort is currently active.
|
|
307
|
+
*/
|
|
308
|
+
is_active: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* The current direction of the sort.
|
|
311
|
+
*/
|
|
312
|
+
direction?: SortDirection;
|
|
313
|
+
/**
|
|
314
|
+
* The default direction of the sort.
|
|
315
|
+
*/
|
|
316
|
+
default?: SortDirection;
|
|
317
|
+
/**
|
|
318
|
+
* The label of the sort.
|
|
319
|
+
*/
|
|
320
|
+
label: string;
|
|
321
|
+
/**
|
|
322
|
+
* The metadata attributes of the sort.
|
|
323
|
+
*/
|
|
324
|
+
metadata: Record<string, any>;
|
|
325
|
+
/**
|
|
326
|
+
* The name of the sort.
|
|
327
|
+
*/
|
|
328
|
+
name: string;
|
|
329
|
+
/**
|
|
330
|
+
* The value corresponding to the descending sort.
|
|
331
|
+
*/
|
|
332
|
+
desc: string;
|
|
333
|
+
/**
|
|
334
|
+
* The value corresponding to the ascending sort.
|
|
335
|
+
*/
|
|
336
|
+
asc: string;
|
|
337
|
+
/**
|
|
338
|
+
* The value that will be applied on toggle.
|
|
339
|
+
*/
|
|
340
|
+
next: string;
|
|
341
|
+
/**
|
|
342
|
+
* Whether this sort is hidden.
|
|
343
|
+
*/
|
|
344
|
+
hidden: boolean;
|
|
345
|
+
}
|
|
346
|
+
interface Refinements {
|
|
347
|
+
/**
|
|
348
|
+
* The list of available filters.
|
|
349
|
+
*/
|
|
350
|
+
filters: Array<FilterRefinement>;
|
|
351
|
+
/**
|
|
352
|
+
* The list of available sorts.
|
|
353
|
+
*/
|
|
354
|
+
sorts: Array<SortRefinement>;
|
|
355
|
+
/**
|
|
356
|
+
* The URL scope for these refinements.
|
|
357
|
+
*/
|
|
358
|
+
scope?: string;
|
|
359
|
+
/**
|
|
360
|
+
* The scope keys for these refinements.
|
|
361
|
+
*/
|
|
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
|
+
}
|
|
360
373
|
}
|
|
361
|
-
declare function useRefinements<Properties extends object, RefinementsKey extends {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
*/
|
|
371
|
-
filters: {
|
|
372
|
-
/**
|
|
373
|
-
* Applies this filter.
|
|
374
|
-
*/
|
|
375
|
-
apply: (value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse | undefined>;
|
|
376
|
-
/**
|
|
377
|
-
* Clears this filter.
|
|
378
|
-
*/
|
|
379
|
-
clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse>;
|
|
380
|
-
/**
|
|
381
|
-
* Whether this filter is currently active.
|
|
382
|
-
*/
|
|
383
|
-
is_active: boolean;
|
|
384
|
-
/**
|
|
385
|
-
* The type of this filter.
|
|
386
|
-
*/
|
|
387
|
-
type: "trashed" | "callback" | "exact" | "similar:loose" | "similar:begins_with_strict" | "similar:ends_with_strict" | string;
|
|
388
|
-
/**
|
|
389
|
-
* The label of the filter.
|
|
390
|
-
*/
|
|
391
|
-
label: string;
|
|
392
|
-
/**
|
|
393
|
-
* The metadata attributes of the filter.
|
|
394
|
-
*/
|
|
395
|
-
metadata: Record<string, any>;
|
|
396
|
-
/**
|
|
397
|
-
* The name of the fitler.
|
|
398
|
-
*/
|
|
399
|
-
name: string;
|
|
400
|
-
/**
|
|
401
|
-
* The current value of the filter.
|
|
402
|
-
*/
|
|
403
|
-
value: any;
|
|
404
|
-
/**
|
|
405
|
-
* Whether this filter is hidden.
|
|
406
|
-
*/
|
|
407
|
-
hidden: boolean;
|
|
408
|
-
/**
|
|
409
|
-
* The default value of the filter.
|
|
410
|
-
*/
|
|
411
|
-
default: any;
|
|
412
|
-
}[];
|
|
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): {
|
|
375
|
+
/**
|
|
376
|
+
* Binds a named filter to a ref, applying filters when it changes and updating the ref accordingly.
|
|
377
|
+
*/
|
|
378
|
+
bindFilter: <T = any>(name: string, options?: BindFilterOptions<T>) => Ref<T>;
|
|
379
|
+
/**
|
|
380
|
+
* Available filters.
|
|
381
|
+
*/
|
|
382
|
+
filters: {
|
|
413
383
|
/**
|
|
414
|
-
*
|
|
415
|
-
*/
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Toggles this sort.
|
|
419
|
-
*/
|
|
420
|
-
toggle: (options?: ToggleSortOptions) => Promise<_hybridly_core.NavigationResponse | undefined>;
|
|
421
|
-
/**
|
|
422
|
-
* Checks if this sort is active.
|
|
423
|
-
*/
|
|
424
|
-
isSorting: (direction?: SortDirection) => boolean;
|
|
425
|
-
/**
|
|
426
|
-
* Clears this sort.
|
|
427
|
-
*/
|
|
428
|
-
clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core.NavigationResponse>;
|
|
429
|
-
/**
|
|
430
|
-
* Whether this sort is currently active.
|
|
431
|
-
*/
|
|
432
|
-
is_active: boolean;
|
|
433
|
-
/**
|
|
434
|
-
* The current direction of the sort.
|
|
435
|
-
*/
|
|
436
|
-
direction?: SortDirection;
|
|
437
|
-
/**
|
|
438
|
-
* The default direction of the sort.
|
|
439
|
-
*/
|
|
440
|
-
default?: SortDirection;
|
|
441
|
-
/**
|
|
442
|
-
* The label of the sort.
|
|
443
|
-
*/
|
|
444
|
-
label: string;
|
|
445
|
-
/**
|
|
446
|
-
* The metadata attributes of the sort.
|
|
447
|
-
*/
|
|
448
|
-
metadata: Record<string, any>;
|
|
449
|
-
/**
|
|
450
|
-
* The name of the sort.
|
|
451
|
-
*/
|
|
452
|
-
name: string;
|
|
453
|
-
/**
|
|
454
|
-
* The value corresponding to the descending sort.
|
|
455
|
-
*/
|
|
456
|
-
desc: string;
|
|
457
|
-
/**
|
|
458
|
-
* The value corresponding to the ascending sort.
|
|
459
|
-
*/
|
|
460
|
-
asc: string;
|
|
461
|
-
/**
|
|
462
|
-
* The value that will be applied on toggle.
|
|
463
|
-
*/
|
|
464
|
-
next: string;
|
|
465
|
-
/**
|
|
466
|
-
* Whether this sort is hidden.
|
|
467
|
-
*/
|
|
468
|
-
hidden: boolean;
|
|
469
|
-
}[];
|
|
384
|
+
* Applies this filter.
|
|
385
|
+
*/
|
|
386
|
+
apply: (value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
|
|
470
387
|
/**
|
|
471
|
-
*
|
|
388
|
+
* Clears this filter.
|
|
472
389
|
*/
|
|
473
|
-
|
|
390
|
+
clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
474
391
|
/**
|
|
475
|
-
*
|
|
392
|
+
* Whether this filter is currently active.
|
|
476
393
|
*/
|
|
477
|
-
|
|
394
|
+
is_active: boolean;
|
|
478
395
|
/**
|
|
479
|
-
*
|
|
396
|
+
* The type of this filter.
|
|
480
397
|
*/
|
|
481
|
-
|
|
398
|
+
type: "trashed" | "callback" | "exact" | "similar:loose" | "similar:begins_with_strict" | "similar:ends_with_strict" | string;
|
|
482
399
|
/**
|
|
483
|
-
*
|
|
400
|
+
* The label of the filter.
|
|
484
401
|
*/
|
|
485
|
-
|
|
402
|
+
label: string;
|
|
486
403
|
/**
|
|
487
|
-
*
|
|
404
|
+
* The metadata attributes of the filter.
|
|
488
405
|
*/
|
|
489
|
-
|
|
406
|
+
metadata: Record<string, any>;
|
|
490
407
|
/**
|
|
491
|
-
*
|
|
408
|
+
* The name of the fitler.
|
|
492
409
|
*/
|
|
493
|
-
|
|
410
|
+
name: string;
|
|
411
|
+
/**
|
|
412
|
+
* The current value of the filter.
|
|
413
|
+
*/
|
|
414
|
+
value: any;
|
|
494
415
|
/**
|
|
495
|
-
* Whether
|
|
416
|
+
* Whether this filter is hidden.
|
|
496
417
|
*/
|
|
497
|
-
|
|
418
|
+
hidden: boolean;
|
|
498
419
|
/**
|
|
499
|
-
* The
|
|
420
|
+
* The default value of the filter.
|
|
500
421
|
*/
|
|
501
|
-
|
|
422
|
+
default: any;
|
|
423
|
+
}[];
|
|
424
|
+
/**
|
|
425
|
+
* Available sorts.
|
|
426
|
+
*/
|
|
427
|
+
sorts: {
|
|
502
428
|
/**
|
|
503
|
-
*
|
|
429
|
+
* Toggles this sort.
|
|
504
430
|
*/
|
|
505
|
-
|
|
431
|
+
toggle: (options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
|
|
506
432
|
/**
|
|
507
|
-
*
|
|
433
|
+
* Checks if this sort is active.
|
|
508
434
|
*/
|
|
509
|
-
|
|
435
|
+
isSorting: (direction?: SortDirection) => boolean;
|
|
510
436
|
/**
|
|
511
|
-
*
|
|
437
|
+
* Clears this sort.
|
|
512
438
|
*/
|
|
513
|
-
|
|
439
|
+
clear: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
514
440
|
/**
|
|
515
|
-
*
|
|
441
|
+
* Whether this sort is currently active.
|
|
516
442
|
*/
|
|
517
|
-
|
|
443
|
+
is_active: boolean;
|
|
518
444
|
/**
|
|
519
|
-
*
|
|
445
|
+
* The current direction of the sort.
|
|
520
446
|
*/
|
|
521
|
-
|
|
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
|
+
}[];
|
|
481
|
+
/**
|
|
482
|
+
* The key for the filters.
|
|
483
|
+
*/
|
|
484
|
+
filtersKey: vue10.ComputedRef<string>;
|
|
485
|
+
/**
|
|
486
|
+
* Gets a filter by name.
|
|
487
|
+
*/
|
|
488
|
+
getFilter: (name: string) => FilterRefinement | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* Gets a sort by name.
|
|
491
|
+
*/
|
|
492
|
+
getSort: (name: string) => SortRefinement | undefined;
|
|
493
|
+
/**
|
|
494
|
+
* Resets all filters and sorts.
|
|
495
|
+
*/
|
|
496
|
+
reset: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
497
|
+
/**
|
|
498
|
+
* Toggles the specified sort.
|
|
499
|
+
*/
|
|
500
|
+
toggleSort: (name: string, options?: ToggleSortOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
|
|
501
|
+
/**
|
|
502
|
+
* Whether a sort is active.
|
|
503
|
+
*/
|
|
504
|
+
isSorting: (name?: string, direction?: SortDirection) => boolean;
|
|
505
|
+
/**
|
|
506
|
+
* Whether a filter is active.
|
|
507
|
+
*/
|
|
508
|
+
isFiltering: (name?: string) => boolean;
|
|
509
|
+
/**
|
|
510
|
+
* The current sorts.
|
|
511
|
+
*/
|
|
512
|
+
currentSorts: () => Array<SortRefinement>;
|
|
513
|
+
/**
|
|
514
|
+
* The current filters.
|
|
515
|
+
*/
|
|
516
|
+
currentFilters: () => Array<FilterRefinement>;
|
|
517
|
+
/**
|
|
518
|
+
* Clears the given filter.
|
|
519
|
+
*/
|
|
520
|
+
clearFilter: (filter: string, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
521
|
+
/**
|
|
522
|
+
* Resets all sorts.
|
|
523
|
+
*/
|
|
524
|
+
clearSorts: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
525
|
+
/**
|
|
526
|
+
* Resets all filters.
|
|
527
|
+
*/
|
|
528
|
+
clearFilters: (options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
529
|
+
/**
|
|
530
|
+
* Applies the given filter.
|
|
531
|
+
*/
|
|
532
|
+
applyFilter: (name: string, value: any, options?: AvailableHybridRequestOptions) => Promise<_hybridly_core0.NavigationResponse | undefined>;
|
|
522
533
|
};
|
|
523
|
-
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region src/composables/current-route.d.ts
|
|
524
536
|
declare function useRoute(): {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
537
|
+
isNavigating: Readonly<vue10.Ref<boolean, boolean>>;
|
|
538
|
+
current: Readonly<vue10.Ref<string | undefined, string | undefined>>;
|
|
539
|
+
matches: <T extends RouteName>(name: MaybeRefOrGetter<T>, parameters?: RouteParameters<T>) => boolean;
|
|
528
540
|
};
|
|
529
|
-
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region src/composables/bulk-select.d.ts
|
|
530
543
|
interface BulkSelection<T = any> {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
544
|
+
/** Whether all records are selected. */
|
|
545
|
+
all: boolean;
|
|
546
|
+
/** Included records. */
|
|
547
|
+
only: Set<T>;
|
|
548
|
+
/** Excluded records. */
|
|
549
|
+
except: Set<T>;
|
|
537
550
|
}
|
|
538
551
|
declare function useBulkSelect<T = any>(): {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
+
allSelected: vue10.ComputedRef<boolean>;
|
|
553
|
+
selectAll: () => void;
|
|
554
|
+
deselectAll: () => void;
|
|
555
|
+
select: (...records: T[]) => void;
|
|
556
|
+
deselect: (...records: T[]) => void;
|
|
557
|
+
toggle: (record: T, force?: boolean) => void;
|
|
558
|
+
selected: (record: T) => boolean;
|
|
559
|
+
selection: Ref<BulkSelection<T>, BulkSelection<T>>;
|
|
560
|
+
bindCheckbox: (key: T) => {
|
|
561
|
+
onChange: (event: Event) => void;
|
|
562
|
+
checked: boolean;
|
|
563
|
+
value: T;
|
|
564
|
+
};
|
|
552
565
|
};
|
|
553
|
-
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/composables/table.d.ts
|
|
554
568
|
declare global {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
569
|
+
interface Table<T extends Record<string, any> = any, PaginatorKind extends 'cursor' | 'length-aware' | 'simple' = 'length-aware'> {
|
|
570
|
+
id: string;
|
|
571
|
+
keyName: string;
|
|
572
|
+
scope?: string;
|
|
573
|
+
columns: Column<T>[];
|
|
574
|
+
inlineActions: InlineAction[];
|
|
575
|
+
bulkActions: BulkAction[];
|
|
576
|
+
records: Array<T>;
|
|
577
|
+
paginator: Exclude<PaginatorKind extends 'cursor' ? CursorPaginator<T> : (PaginatorKind extends 'simple' ? SimplePaginator<T> : Paginator<T>), 'data'>;
|
|
578
|
+
refinements: Refinements;
|
|
579
|
+
endpoint: string;
|
|
580
|
+
}
|
|
567
581
|
}
|
|
568
582
|
interface Column<T extends object = never> {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
583
|
+
/** The name of this column. */
|
|
584
|
+
name: keyof T;
|
|
585
|
+
/** The label of this column. */
|
|
586
|
+
label: string;
|
|
587
|
+
/** The type of this column. */
|
|
588
|
+
type: string;
|
|
589
|
+
/** Metadata of this column. */
|
|
590
|
+
metadata: Record<string, any>;
|
|
577
591
|
}
|
|
578
592
|
interface Action {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
593
|
+
/** The name of this action. */
|
|
594
|
+
name: string;
|
|
595
|
+
/** The label of this action. */
|
|
596
|
+
label: string;
|
|
597
|
+
/** The type of this action. */
|
|
598
|
+
type: string;
|
|
599
|
+
/** Custom metadata for this action. */
|
|
600
|
+
metadata: any;
|
|
587
601
|
}
|
|
588
602
|
interface BulkAction extends Action {
|
|
589
|
-
|
|
590
|
-
|
|
603
|
+
/** Should deselect all records after action. */
|
|
604
|
+
deselect: boolean;
|
|
591
605
|
}
|
|
592
606
|
interface BulkActionOptions {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
interface InlineAction extends Action {
|
|
607
|
+
/** Force deselecting all records after action. */
|
|
608
|
+
deselect?: boolean;
|
|
597
609
|
}
|
|
610
|
+
interface InlineAction extends Action {}
|
|
598
611
|
type RecordIdentifier = string | number;
|
|
599
|
-
type
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
};
|
|
604
|
-
};
|
|
612
|
+
type AsRecordTypeWithExtra<T extends Record<string, any>> = { [K in keyof T]: {
|
|
613
|
+
extra: Record<string, any>;
|
|
614
|
+
value: T[K];
|
|
615
|
+
} };
|
|
605
616
|
interface TableDefaultOptions extends AvailableHybridRequestOptions {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
617
|
+
/**
|
|
618
|
+
* Whether to include existing query parameters in the request.
|
|
619
|
+
* @default true
|
|
620
|
+
*/
|
|
621
|
+
includeQueryParameters?: boolean;
|
|
622
|
+
/**
|
|
623
|
+
* Additionnal data to send with the requests.
|
|
624
|
+
*/
|
|
625
|
+
data?: Record<string, FormDataConvertible> | FormDataConvertible;
|
|
615
626
|
}
|
|
616
627
|
/**
|
|
617
628
|
* Provides utilities for working with tables.
|
|
618
629
|
*/
|
|
619
|
-
declare function useTable<RecordType extends (Props[PropsKey] extends Table<infer T, any> ?
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
/** Selects this record. */
|
|
748
|
-
select: () => void;
|
|
749
|
-
/** Deselects this record. */
|
|
750
|
-
deselect: () => void;
|
|
751
|
-
/** Toggles the selection for this record. */
|
|
752
|
-
toggle: (force?: boolean) => void;
|
|
753
|
-
/** Checks whether this record is selected. */
|
|
754
|
-
selected: boolean;
|
|
755
|
-
/** Gets the value of the record for the specified column. */
|
|
756
|
-
value: (column: string | Column<RecordType>) => any;
|
|
757
|
-
/** Gets the extra object of the record for the specified column. */
|
|
758
|
-
extra: (column: string | Column<RecordType>, path: string) => any;
|
|
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
|
+
}[];
|
|
659
|
+
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>;
|
|
664
|
+
isSorting: (name?: string, direction?: SortDirection) => boolean;
|
|
665
|
+
isFiltering: (name?: string) => boolean;
|
|
666
|
+
currentSorts: () => Array<SortRefinement>;
|
|
667
|
+
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>;
|
|
672
|
+
selectAll: () => void;
|
|
673
|
+
deselectAll: () => void;
|
|
674
|
+
selectPage: () => void;
|
|
675
|
+
deselectPage: () => void;
|
|
676
|
+
isPageSelected: boolean;
|
|
677
|
+
isSelected: (record: RecordTypeWithExtra) => boolean;
|
|
678
|
+
allSelected: boolean;
|
|
679
|
+
selection: BulkSelection<RecordIdentifier>;
|
|
680
|
+
bindCheckbox: (key: RecordIdentifier) => {
|
|
681
|
+
onChange: (event: Event) => void;
|
|
682
|
+
checked: boolean;
|
|
683
|
+
value: RecordIdentifier;
|
|
684
|
+
};
|
|
685
|
+
toggle: (record: RecordTypeWithExtra) => void;
|
|
686
|
+
select: (record: RecordTypeWithExtra) => void;
|
|
687
|
+
deselect: (record: RecordTypeWithExtra) => void;
|
|
688
|
+
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>;
|
|
699
|
+
}[];
|
|
700
|
+
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>;
|
|
713
|
+
}[];
|
|
714
|
+
executeInlineAction: (action: Action | string, record: RecordTypeWithExtra | RecordIdentifier) => Promise<_hybridly_core0.NavigationResponse>;
|
|
715
|
+
executeBulkAction: (action: Action | string, options?: BulkActionOptions) => Promise<_hybridly_core0.NavigationResponse>;
|
|
716
|
+
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. */
|
|
736
|
+
metadata: Record<string, any>;
|
|
737
|
+
}[];
|
|
738
|
+
data: RecordType[];
|
|
739
|
+
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. */
|
|
747
|
+
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;
|
|
759
758
|
}[];
|
|
760
|
-
|
|
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. */
|
|
770
|
+
extra: (column: string | Column<RecordTypeWithExtra>, path: string) => any;
|
|
771
|
+
}[];
|
|
772
|
+
paginator: Exclude<PaginatorKindName extends "cursor" ? CursorPaginator<RecordTypeWithExtra> : PaginatorKindName extends "simple" ? SimplePaginator<RecordTypeWithExtra> : Paginator<RecordTypeWithExtra>, "data">;
|
|
761
773
|
};
|
|
762
|
-
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/composables/query-parameters.d.ts
|
|
763
776
|
/**
|
|
764
777
|
* Access reactive query parameters.
|
|
765
778
|
*
|
|
@@ -769,25 +782,25 @@ declare function useQueryParameters<T extends Record<string, any> = Record<strin
|
|
|
769
782
|
type RouteParameter = string | number | boolean | null | undefined;
|
|
770
783
|
type TransformFunction<V extends RouteParameter, R> = (val: V) => R;
|
|
771
784
|
type TransformType<T extends RouteParameter, O> = O extends {
|
|
772
|
-
|
|
785
|
+
transform: 'number';
|
|
773
786
|
} ? number : O extends {
|
|
774
|
-
|
|
787
|
+
transform: 'bool';
|
|
775
788
|
} ? boolean : O extends {
|
|
776
|
-
|
|
789
|
+
transform: 'string';
|
|
777
790
|
} ? string : O extends {
|
|
778
|
-
|
|
791
|
+
transform: 'date';
|
|
779
792
|
} ? Date : O extends {
|
|
780
|
-
|
|
793
|
+
transform: TransformFunction<T, infer R>;
|
|
781
794
|
} ? R : T;
|
|
782
795
|
interface UseQueryParameterOptions<V extends RouteParameter, R> {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
796
|
+
/**
|
|
797
|
+
* Specifies a default value if the query parameter does not exist.
|
|
798
|
+
*/
|
|
799
|
+
defaultValue?: MaybeRefOrGetter<R>;
|
|
800
|
+
/**
|
|
801
|
+
* Transforms the query parameter.
|
|
802
|
+
*/
|
|
803
|
+
transform?: 'number' | 'bool' | 'string' | 'date' | TransformFunction<V, R>;
|
|
791
804
|
}
|
|
792
805
|
/**
|
|
793
806
|
* Makes the specified query parameter reactive.
|
|
@@ -795,217 +808,216 @@ interface UseQueryParameterOptions<V extends RouteParameter, R> {
|
|
|
795
808
|
* @see https://hybridly.dev/api/utils/use-query-parameter.html
|
|
796
809
|
*/
|
|
797
810
|
declare function useQueryParameter<ParameterType extends RouteParameter = RouteParameter, Options extends UseQueryParameterOptions<ParameterType, any> = UseQueryParameterOptions<ParameterType, ParameterType>>(name: string, options?: Options): Ref<TransformType<ParameterType, Options>>;
|
|
798
|
-
|
|
811
|
+
//#endregion
|
|
812
|
+
//#region src/initialize.d.ts
|
|
799
813
|
/**
|
|
800
814
|
* Initializes Hybridly's router and context.
|
|
801
815
|
*/
|
|
802
816
|
declare function initializeHybridly(options?: InitializeOptions): Promise<any>;
|
|
803
817
|
interface InitializeOptions {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
/** Options that will apply to all forms by default. Specific forms' options will override them. */
|
|
834
|
-
defaultFormOptions?: DefaultFormOptions;
|
|
818
|
+
/** Callback that gets executed before Vue is mounted. */
|
|
819
|
+
enhanceVue?: (/** Vue application to enhance. */
|
|
820
|
+
vue: App<Element>, /** Initial payload. */
|
|
821
|
+
payload: Record<string, any>) => any;
|
|
822
|
+
/** ID of the app element. */
|
|
823
|
+
id?: string;
|
|
824
|
+
/** Clean up the host element's payload dataset after loading. */
|
|
825
|
+
cleanup?: boolean;
|
|
826
|
+
/** Whether to set up the devtools plugin. */
|
|
827
|
+
devtools?: boolean;
|
|
828
|
+
/** Whether to display response error modals. */
|
|
829
|
+
responseErrorModals?: boolean;
|
|
830
|
+
/** Custom history state serialization functions. */
|
|
831
|
+
serializer?: RouterContextOptions['serializer'];
|
|
832
|
+
/** Progressbar options. */
|
|
833
|
+
progress?: false | Partial<ProgressOptions>;
|
|
834
|
+
/** Sets up the hybridly router. */
|
|
835
|
+
setup?: (options: SetupArguments) => any;
|
|
836
|
+
/** List of Hybridly plugins. */
|
|
837
|
+
plugins?: Plugin$1[];
|
|
838
|
+
/** Custom Axios instance. */
|
|
839
|
+
axios?: Axios;
|
|
840
|
+
/**
|
|
841
|
+
* Enables the View Transition API, if supported.
|
|
842
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition
|
|
843
|
+
*/
|
|
844
|
+
viewTransition?: boolean;
|
|
845
|
+
/** Options that will apply to all forms by default. Specific forms' options will override them. */
|
|
846
|
+
defaultFormOptions?: DefaultFormOptions;
|
|
835
847
|
}
|
|
836
848
|
interface SetupArguments {
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
849
|
+
/** DOM element to mount Vue on. */
|
|
850
|
+
element: Element;
|
|
851
|
+
/** Hybridly wrapper component. */
|
|
852
|
+
wrapper: any;
|
|
853
|
+
/** Hybridly wrapper component properties. */
|
|
854
|
+
props: {
|
|
855
|
+
context: RouterContext;
|
|
856
|
+
};
|
|
857
|
+
/** Vue plugin that registers the devtools. */
|
|
858
|
+
hybridly: Plugin;
|
|
859
|
+
/** Renders the wrapper. */
|
|
860
|
+
render: () => ReturnType<typeof h>;
|
|
861
|
+
/** Initial payload. */
|
|
862
|
+
payload: Record<string, any>;
|
|
851
863
|
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
};
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
};
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
864
|
+
//#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
|
+
};
|
|
996
1009
|
}>> & Readonly<{}>, {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}, {}, {}, {}, string,
|
|
1009
|
-
|
|
1010
|
-
export { RouterLink, initializeHybridly, registerHook, setProperty, useBackForward, useBulkSelect, useDialog, useForm, useHistoryState, useProperties, useProperty, useQueryParameter, useQueryParameters, useRefinements, useRoute, useTable };
|
|
1011
|
-
export type { Action, AvailableHybridRequestOptions, BindFilterOptions, BulkAction, BulkSelection, Column, DefaultFormOptions, InitializeOptions, InlineAction, RecordIdentifier, SortDirection, TableDefaultOptions, ToggleSortOptions };
|
|
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 };
|