inertia-angular 3.7.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.
@@ -0,0 +1,498 @@
1
+ import * as _inertiajs_core from '@inertiajs/core';
2
+ import { PageProps, SharedPageProps, CreateInertiaAppOptions, Page, LayoutCallbackReturn, ServerHeadOption, HeadManager, LayoutProps, NamedLayoutProps, LinkComponentBaseProps, UrlMethodPair, Method, RequestPayload, LinkPrefetchOption, CacheForOption, CancelToken, PendingVisit, ActiveVisit, Errors, ReloadOptions, PollOptions, VisitOptions, FormDataErrors, Progress, FormDataKeys, FormDataValues, UseFormTransformCallback, ErrorValue, UseFormWithPrecognitionArguments, UseFormSubmitArguments, UseFormSubmitOptions, OptimisticCallback, FormDataType, UseHttpSubmitArguments, UseHttpSubmitOptions, FormDataConvertible, HttpProgressEvent, FormComponentOptions, FormComponentOptimisticCallback, FormComponentOnSubmitCompleteArguments, FormComponentProps, InfiniteScrollRef, InfiniteScrollSlotProps, InfiniteScrollActionSlotProps } from '@inertiajs/core';
3
+ export { http, progress, router } from '@inertiajs/core';
4
+ import * as _angular_core from '@angular/core';
5
+ import { AfterViewInit, Type, Provider, EnvironmentProviders, ApplicationRef, ViewContainerRef, Signal, OnInit, WritableSignal, TemplateRef } from '@angular/core';
6
+ import { NamedInputEvent, ValidationConfig, Validator } from 'laravel-precognition';
7
+
8
+ declare class App implements AfterViewInit {
9
+ #private;
10
+ private readonly outlet;
11
+ ngAfterViewInit(): void;
12
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<App, never>;
13
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<App, "inertia-app", never, {}, {}, never, never, true, never>;
14
+ }
15
+
16
+ type AngularRenderNode = {
17
+ component: Type<unknown>;
18
+ children: AngularRenderNode[];
19
+ };
20
+ type AngularRenderFunction = (h: (component: Type<unknown>, children?: AngularRenderNode | AngularRenderNode[]) => AngularRenderNode, page: AngularRenderNode) => AngularRenderNode;
21
+ type LayoutCallback = (props: SharedPageProps) => LayoutCallbackReturn<Type<unknown>>;
22
+ type AngularLayout = Type<unknown> | Type<unknown>[] | LayoutCallback | AngularRenderFunction | LayoutCallbackReturn<Type<unknown>>;
23
+ type ResolvedComponent = Type<unknown> & {
24
+ layout?: AngularLayout;
25
+ };
26
+ type ComponentResolver = (name: string, page?: Page<SharedPageProps>) => ResolvedComponent | Promise<ResolvedComponent> | {
27
+ default: ResolvedComponent;
28
+ };
29
+ type InertiaAppProps<SharedProps extends PageProps = PageProps> = {
30
+ initialPage: Page<SharedProps>;
31
+ initialComponent: ResolvedComponent;
32
+ resolveComponent: (name: string, page?: Page) => Promise<ResolvedComponent>;
33
+ titleCallback?: (title: string, page: Page) => string;
34
+ defaultLayout?: (name: string, page: Page) => unknown;
35
+ serverHead?: ServerHeadOption;
36
+ onHeadUpdate?: (elements: string[]) => void;
37
+ };
38
+ type SetupOptions<SharedProps extends PageProps = PageProps> = {
39
+ el: HTMLElement | null;
40
+ App: Type<unknown>;
41
+ props: InertiaAppProps<SharedProps>;
42
+ providers: Array<Provider | EnvironmentProviders>;
43
+ };
44
+ type AngularWithApp<SharedProps extends PageProps = PageProps> = (options: {
45
+ ssr: boolean;
46
+ page: Page<SharedProps>;
47
+ }) => Array<Provider | EnvironmentProviders>;
48
+ type AngularInertiaAppConfig = Record<never, never>;
49
+ type AngularCreateInertiaAppOptions<SharedProps extends PageProps = PageProps & SharedPageProps> = Omit<CreateInertiaAppOptions<ComponentResolver, SetupOptions<SharedProps>, ApplicationRef | void, AngularInertiaAppConfig>, 'setup'> & {
50
+ page?: Page<SharedProps>;
51
+ setup?: (options: SetupOptions<SharedProps>) => ApplicationRef | void | Promise<ApplicationRef | void>;
52
+ withApp?: AngularWithApp<SharedProps>;
53
+ };
54
+
55
+ declare const config: _inertiajs_core.Config<_inertiajs_core.InertiaAppConfig & AngularInertiaAppConfig>;
56
+
57
+ declare function createInertiaApp<SharedProps extends PageProps = PageProps & SharedPageProps>(options: AngularCreateInertiaAppOptions<SharedProps>): Promise<ApplicationRef | void>;
58
+
59
+ declare class LayoutOutlet implements AfterViewInit {
60
+ #private;
61
+ readonly outlet: _angular_core.Signal<ViewContainerRef>;
62
+ ngAfterViewInit(): void;
63
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LayoutOutlet, never>;
64
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LayoutOutlet, "inertia-layout-outlet", never, {}, {}, never, never, true, never>;
65
+ }
66
+ declare function h(component: Type<unknown>, children?: AngularRenderNode | AngularRenderNode[]): AngularRenderNode;
67
+ declare class InertiaRenderer {
68
+ #private;
69
+ constructor();
70
+ render(root: ViewContainerRef, component: ResolvedComponent, page: Page, key: number | null, dynamicProps: {
71
+ shared: Record<string, unknown>;
72
+ named: Record<string, Record<string, unknown>>;
73
+ }, defaultLayout?: (name: string, page: Page) => unknown): void;
74
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InertiaRenderer, never>;
75
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<InertiaRenderer>;
76
+ }
77
+
78
+ declare class InertiaRuntime {
79
+ #private;
80
+ readonly page: Signal<Page<PageProps>>;
81
+ readonly component: Signal<ResolvedComponent>;
82
+ readonly key: Signal<number | null>;
83
+ readonly layoutProps: Signal<{
84
+ shared: Record<string, unknown>;
85
+ named: Record<string, Record<string, unknown>>;
86
+ }>;
87
+ readonly headManager: HeadManager;
88
+ constructor();
89
+ /** @internal Not part of the public API. May change or be removed without notice. */
90
+ connectRenderer(render: () => void): () => void;
91
+ setLayoutProps(props: Partial<LayoutProps>): void;
92
+ setNamedLayoutProps<K extends keyof NamedLayoutProps>(name: K, props: Partial<NamedLayoutProps[K]>): void;
93
+ resetLayoutProps(): void;
94
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InertiaRuntime, never>;
95
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<InertiaRuntime>;
96
+ }
97
+ declare function usePage<TProps extends PageProps = PageProps>(): Signal<Page<TProps & PageProps>>;
98
+ declare function useLayoutProps(): {
99
+ set: (props: Partial<LayoutProps>) => void;
100
+ setFor: <K extends keyof NamedLayoutProps>(name: K, props: Partial<NamedLayoutProps[K]>) => void;
101
+ reset: () => void;
102
+ };
103
+
104
+ interface InertiaLinkProps extends LinkComponentBaseProps {
105
+ href: string | UrlMethodPair;
106
+ }
107
+ declare class Link implements OnInit {
108
+ #private;
109
+ readonly href: _angular_core.InputSignal<string | UrlMethodPair>;
110
+ readonly method: _angular_core.InputSignal<Method | "GET" | "POST" | "PUT" | "PATCH" | "DELETE">;
111
+ readonly data: _angular_core.InputSignal<RequestPayload>;
112
+ readonly preserveScroll: _angular_core.InputSignal<NonNullable<_inertiajs_core.PreserveStateOption | undefined>>;
113
+ readonly preserveState: _angular_core.InputSignal<_inertiajs_core.PreserveStateOption | null | undefined>;
114
+ readonly preserveUrl: _angular_core.InputSignal<boolean>;
115
+ readonly replace: _angular_core.InputSignal<boolean>;
116
+ readonly only: _angular_core.InputSignal<string[]>;
117
+ readonly except: _angular_core.InputSignal<string[]>;
118
+ readonly headers: _angular_core.InputSignal<Record<string, string>>;
119
+ readonly queryStringArrayFormat: _angular_core.InputSignal<NonNullable<_inertiajs_core.QueryStringArrayFormatOption | undefined>>;
120
+ readonly async: _angular_core.InputSignal<boolean>;
121
+ readonly viewTransition: _angular_core.InputSignal<NonNullable<boolean | ((viewTransition: ViewTransition) => void) | undefined>>;
122
+ readonly component: _angular_core.InputSignal<string | null>;
123
+ readonly instant: _angular_core.InputSignal<boolean>;
124
+ readonly pageProps: _angular_core.InputSignal<Record<string, unknown> | ((currentProps: _inertiajs_core.PageProps, sharedProps: Partial<_inertiajs_core.PageProps>) => Record<string, unknown>) | null>;
125
+ readonly prefetch: _angular_core.InputSignal<boolean | LinkPrefetchOption | LinkPrefetchOption[]>;
126
+ readonly cacheFor: _angular_core.InputSignal<CacheForOption | CacheForOption[] | undefined>;
127
+ readonly cacheTags: _angular_core.InputSignal<string | string[]>;
128
+ readonly onCancelToken: _angular_core.InputSignal<_inertiajs_core.CancelTokenCallback | null>;
129
+ readonly onBefore: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"before", RequestPayload> | null>;
130
+ readonly onStart: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"start", RequestPayload> | null>;
131
+ readonly onProgress: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"progress", RequestPayload> | null>;
132
+ readonly onFinish: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"finish", RequestPayload> | null>;
133
+ readonly onCancel: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"cancel", RequestPayload> | null>;
134
+ readonly onSuccess: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"success", RequestPayload> | null>;
135
+ readonly onError: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"error", RequestPayload> | null>;
136
+ readonly onPrefetching: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"prefetching", RequestPayload> | null>;
137
+ readonly onPrefetched: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"prefetched", RequestPayload> | null>;
138
+ readonly cancelToken: _angular_core.OutputEmitterRef<CancelToken>;
139
+ readonly before: _angular_core.OutputEmitterRef<PendingVisit>;
140
+ readonly start: _angular_core.OutputEmitterRef<PendingVisit>;
141
+ readonly progress: _angular_core.OutputEmitterRef<_inertiajs_core.HttpProgressEvent | undefined>;
142
+ readonly finish: _angular_core.OutputEmitterRef<ActiveVisit>;
143
+ readonly cancel: _angular_core.OutputEmitterRef<void>;
144
+ readonly success: _angular_core.OutputEmitterRef<Page<_inertiajs_core.PageProps>>;
145
+ readonly error: _angular_core.OutputEmitterRef<Errors>;
146
+ readonly prefetching: _angular_core.OutputEmitterRef<PendingVisit>;
147
+ readonly prefetched: _angular_core.OutputEmitterRef<{
148
+ response: unknown;
149
+ visit: PendingVisit;
150
+ }>;
151
+ readonly loading: _angular_core.Signal<boolean>;
152
+ readonly anchorHref: _angular_core.Signal<string | null>;
153
+ readonly buttonType: _angular_core.Signal<"button" | null>;
154
+ constructor();
155
+ ngOnInit(): void;
156
+ handleClick(event: MouseEvent): void;
157
+ handleMouseEnter(): void;
158
+ handleMouseLeave(): void;
159
+ handleMouseDown(event: MouseEvent): void;
160
+ handleMouseUp(event: MouseEvent): void;
161
+ handleKeyDown(event: KeyboardEvent): void;
162
+ handleKeyUp(event: KeyboardEvent): void;
163
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Link, never>;
164
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Link, "[inertiaLink]", ["inertiaLink"], { "href": { "alias": "href"; "required": false; "isSignal": true; }; "method": { "alias": "method"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "preserveScroll": { "alias": "preserveScroll"; "required": false; "isSignal": true; }; "preserveState": { "alias": "preserveState"; "required": false; "isSignal": true; }; "preserveUrl": { "alias": "preserveUrl"; "required": false; "isSignal": true; }; "replace": { "alias": "replace"; "required": false; "isSignal": true; }; "only": { "alias": "only"; "required": false; "isSignal": true; }; "except": { "alias": "except"; "required": false; "isSignal": true; }; "headers": { "alias": "headers"; "required": false; "isSignal": true; }; "queryStringArrayFormat": { "alias": "queryStringArrayFormat"; "required": false; "isSignal": true; }; "async": { "alias": "async"; "required": false; "isSignal": true; }; "viewTransition": { "alias": "viewTransition"; "required": false; "isSignal": true; }; "component": { "alias": "component"; "required": false; "isSignal": true; }; "instant": { "alias": "instant"; "required": false; "isSignal": true; }; "pageProps": { "alias": "pageProps"; "required": false; "isSignal": true; }; "prefetch": { "alias": "prefetch"; "required": false; "isSignal": true; }; "cacheFor": { "alias": "cacheFor"; "required": false; "isSignal": true; }; "cacheTags": { "alias": "cacheTags"; "required": false; "isSignal": true; }; "onCancelToken": { "alias": "onCancelToken"; "required": false; "isSignal": true; }; "onBefore": { "alias": "onBefore"; "required": false; "isSignal": true; }; "onStart": { "alias": "onStart"; "required": false; "isSignal": true; }; "onProgress": { "alias": "onProgress"; "required": false; "isSignal": true; }; "onFinish": { "alias": "onFinish"; "required": false; "isSignal": true; }; "onCancel": { "alias": "onCancel"; "required": false; "isSignal": true; }; "onSuccess": { "alias": "onSuccess"; "required": false; "isSignal": true; }; "onError": { "alias": "onError"; "required": false; "isSignal": true; }; "onPrefetching": { "alias": "onPrefetching"; "required": false; "isSignal": true; }; "onPrefetched": { "alias": "onPrefetched"; "required": false; "isSignal": true; }; }, { "cancelToken": "cancelToken"; "before": "before"; "start": "start"; "progress": "progress"; "finish": "finish"; "cancel": "cancel"; "success": "success"; "error": "error"; "prefetching": "prefetching"; "prefetched": "prefetched"; }, never, never, true, never>;
165
+ }
166
+
167
+ declare function usePoll(interval: number, requestOptions?: ReloadOptions | (() => ReloadOptions), options?: PollOptions): {
168
+ stop: VoidFunction;
169
+ start: VoidFunction;
170
+ polling: Signal<boolean>;
171
+ };
172
+
173
+ declare function usePrefetch(options?: VisitOptions): {
174
+ lastUpdatedAt: Signal<number | null>;
175
+ isPrefetching: Signal<boolean>;
176
+ isPrefetched: Signal<boolean>;
177
+ flush: () => void;
178
+ };
179
+
180
+ declare function useRemember<T>(initialState: T, key?: string, exclude?: readonly string[]): WritableSignal<T>;
181
+
182
+ type SetDataByObject<TForm> = (data: Partial<TForm>) => void;
183
+ type SetDataByMethod<TForm> = (data: (previousData: TForm) => TForm) => void;
184
+ type SetDataByKeyValuePair<TForm> = <K extends FormDataKeys<TForm>>(key: K, value: FormDataValues<TForm, K>) => void;
185
+ type SetDataAction<TForm extends object> = SetDataByObject<TForm> & SetDataByMethod<TForm> & SetDataByKeyValuePair<TForm>;
186
+ type PrecognitionValidationConfig<TKeys> = ValidationConfig & {
187
+ only?: TKeys[] | Iterable<TKeys> | ArrayLike<TKeys>;
188
+ };
189
+ interface FormState<TForm extends object> {
190
+ data: WritableSignal<TForm>;
191
+ isDirty: Signal<boolean>;
192
+ errors: Signal<FormDataErrors<TForm>>;
193
+ hasErrors: Signal<boolean>;
194
+ processing: Signal<boolean>;
195
+ progress: Signal<Progress | null>;
196
+ wasSuccessful: Signal<boolean>;
197
+ recentlySuccessful: Signal<boolean>;
198
+ setData: SetDataAction<TForm>;
199
+ transform(callback: UseFormTransformCallback<TForm>): this;
200
+ setDefaults: {
201
+ (): void;
202
+ <K extends FormDataKeys<TForm>>(field: K, value: FormDataValues<TForm, K>): void;
203
+ (fields: Partial<TForm>): void;
204
+ };
205
+ reset<K extends FormDataKeys<TForm>>(...fields: K[]): void;
206
+ clearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
207
+ resetAndClearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
208
+ setError: {
209
+ <K extends FormDataKeys<TForm>>(field: K, value: ErrorValue): void;
210
+ (errors: FormDataErrors<TForm>): void;
211
+ };
212
+ withPrecognition(...args: UseFormWithPrecognitionArguments): PrecognitiveFormState<TForm>;
213
+ }
214
+ interface FormValidationState<TForm extends object> {
215
+ validating: Signal<boolean>;
216
+ invalid<K extends FormDataKeys<TForm>>(field: K): boolean;
217
+ setValidationTimeout(duration: number): this;
218
+ touch<K extends FormDataKeys<TForm>>(field: K | NamedInputEvent | Array<K>, ...fields: K[]): this;
219
+ touched<K extends FormDataKeys<TForm>>(field?: K): boolean;
220
+ valid<K extends FormDataKeys<TForm>>(field: K): boolean;
221
+ validate<K extends FormDataKeys<TForm>>(field?: K | NamedInputEvent | PrecognitionValidationConfig<K>, validationConfig?: PrecognitionValidationConfig<K>): this;
222
+ validateFiles(): this;
223
+ validator(): Validator;
224
+ withAllErrors(): this;
225
+ withoutFileValidation(): this;
226
+ setErrors(errors: FormDataErrors<TForm>): this;
227
+ forgetError<K extends FormDataKeys<TForm> | NamedInputEvent>(field: K): this;
228
+ }
229
+ type PrecognitiveFormState<TForm extends object> = FormState<TForm> & FormValidationState<TForm>;
230
+
231
+ interface InertiaFormProps$1<TForm extends object> extends FormState<TForm> {
232
+ submit(...args: UseFormSubmitArguments): void;
233
+ get(url: string, options?: UseFormSubmitOptions): void;
234
+ post(url: string, options?: UseFormSubmitOptions): void;
235
+ put(url: string, options?: UseFormSubmitOptions): void;
236
+ patch(url: string, options?: UseFormSubmitOptions): void;
237
+ delete(url: string, options?: UseFormSubmitOptions): void;
238
+ cancel(): void;
239
+ dontRemember<K extends FormDataKeys<TForm>>(...fields: K[]): this;
240
+ optimistic<TProps>(callback: OptimisticCallback<TProps>): this;
241
+ withPrecognition(...args: UseFormWithPrecognitionArguments): InertiaPrecognitiveFormProps<TForm>;
242
+ }
243
+ type InertiaPrecognitiveFormProps<TForm extends object> = InertiaFormProps$1<TForm> & FormValidationState<TForm>;
244
+ type InertiaForm$1<TForm extends object> = InertiaFormProps$1<TForm>;
245
+ type InertiaPrecognitiveForm$1<TForm extends object> = InertiaPrecognitiveFormProps<TForm>;
246
+ declare function useForm<TForm extends FormDataType<TForm>>(method: Method | (() => Method), url: string | (() => string), data: TForm | (() => TForm)): InertiaPrecognitiveFormProps<TForm>;
247
+ declare function useForm<TForm extends FormDataType<TForm>>(urlMethodPair: UrlMethodPair | (() => UrlMethodPair), data: TForm | (() => TForm)): InertiaPrecognitiveFormProps<TForm>;
248
+ declare function useForm<TForm extends FormDataType<TForm>>(rememberKey: string, data: TForm | (() => TForm)): InertiaFormProps$1<TForm>;
249
+ declare function useForm<TForm extends FormDataType<TForm>>(data: TForm | (() => TForm)): InertiaFormProps$1<TForm>;
250
+ declare function useForm<TForm extends FormDataType<TForm>>(): InertiaFormProps$1<TForm>;
251
+
252
+ interface UseHttpProps<TForm extends object, TResponse = unknown> extends FormState<TForm> {
253
+ response: Signal<TResponse | null>;
254
+ submit(...args: UseHttpSubmitArguments<TResponse, TForm>): Promise<TResponse>;
255
+ get(url: string, options?: UseHttpSubmitOptions<TResponse, TForm>): Promise<TResponse>;
256
+ post(url: string, options?: UseHttpSubmitOptions<TResponse, TForm>): Promise<TResponse>;
257
+ put(url: string, options?: UseHttpSubmitOptions<TResponse, TForm>): Promise<TResponse>;
258
+ patch(url: string, options?: UseHttpSubmitOptions<TResponse, TForm>): Promise<TResponse>;
259
+ delete(url: string, options?: UseHttpSubmitOptions<TResponse, TForm>): Promise<TResponse>;
260
+ cancel(): void;
261
+ dontRemember<K extends FormDataKeys<TForm>>(...fields: K[]): this;
262
+ optimistic(callback: (currentData: TForm) => Partial<TForm>): this;
263
+ withAllErrors(): this;
264
+ withPrecognition(...args: UseFormWithPrecognitionArguments): UseHttpPrecognitiveProps<TForm, TResponse>;
265
+ }
266
+ type UseHttpValidationProps<TForm extends object> = FormValidationState<TForm>;
267
+ type UseHttp<TForm extends object, TResponse = unknown> = UseHttpProps<TForm, TResponse>;
268
+ type UseHttpPrecognitiveProps<TForm extends object, TResponse = unknown> = UseHttpProps<TForm, TResponse> & UseHttpValidationProps<TForm>;
269
+ declare function useHttp<TForm extends FormDataType<TForm>, TResponse = unknown>(method: Method | (() => Method), url: string | (() => string), data: TForm | (() => TForm)): UseHttpPrecognitiveProps<TForm, TResponse>;
270
+ declare function useHttp<TForm extends FormDataType<TForm>, TResponse = unknown>(urlMethodPair: UrlMethodPair | (() => UrlMethodPair), data: TForm | (() => TForm)): UseHttpPrecognitiveProps<TForm, TResponse>;
271
+ declare function useHttp<TForm extends FormDataType<TForm>, TResponse = unknown>(rememberKey: string, data: TForm | (() => TForm)): UseHttpProps<TForm, TResponse>;
272
+ declare function useHttp<TForm extends FormDataType<TForm>, TResponse = unknown>(data: TForm | (() => TForm)): UseHttpProps<TForm, TResponse>;
273
+ declare function useHttp<TForm extends FormDataType<TForm>, TResponse = unknown>(): UseHttpProps<TForm, TResponse>;
274
+
275
+ type FormType<TForm extends object> = {
276
+ readonly __inertiaFormType?: TForm;
277
+ };
278
+ declare function createForm<TForm extends object>(): FormType<TForm>;
279
+ interface InertiaForm<TForm extends object = Record<string, FormDataConvertible>> {
280
+ errors: Signal<FormDataErrors<TForm>>;
281
+ hasErrors: Signal<boolean>;
282
+ processing: Signal<boolean>;
283
+ progress: Signal<HttpProgressEvent | null>;
284
+ wasSuccessful: Signal<boolean>;
285
+ recentlySuccessful: Signal<boolean>;
286
+ isDirty: Signal<boolean>;
287
+ validating: Signal<boolean>;
288
+ clearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
289
+ resetAndClearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
290
+ setError: {
291
+ <K extends FormDataKeys<TForm>>(field: K, value: ErrorValue): void;
292
+ (errors: FormDataErrors<TForm>): void;
293
+ };
294
+ reset<K extends FormDataKeys<TForm>>(...fields: K[]): void;
295
+ submit(submitter?: HTMLElement | null): void;
296
+ cancel(): void;
297
+ defaults(): void;
298
+ getData(submitter?: HTMLElement | null): TForm;
299
+ getFormData(submitter?: HTMLElement | null): FormData;
300
+ valid<K extends FormDataKeys<TForm>>(field: K): boolean;
301
+ invalid<K extends FormDataKeys<TForm>>(field: K): boolean;
302
+ validate<K extends FormDataKeys<TForm>>(field?: K | NamedInputEvent | ValidationConfig, validationConfig?: ValidationConfig): void;
303
+ touch<K extends FormDataKeys<TForm>>(...fields: K[]): void;
304
+ touched<K extends FormDataKeys<TForm>>(field?: K): boolean;
305
+ validator(): Validator;
306
+ }
307
+ declare function useFormContext<TForm extends object = Record<string, FormDataConvertible>>(): InertiaForm<TForm> | null;
308
+ declare class Form<TForm extends object = Record<string, FormDataConvertible>> implements AfterViewInit, InertiaForm<TForm> {
309
+ #private;
310
+ readonly formType: _angular_core.InputSignal<FormType<TForm> | null>;
311
+ readonly action: _angular_core.InputSignal<string | UrlMethodPair>;
312
+ readonly method: _angular_core.InputSignal<Method | "GET" | "POST" | "PUT" | "PATCH" | "DELETE">;
313
+ readonly headers: _angular_core.InputSignal<Record<string, string>>;
314
+ readonly queryStringArrayFormat: _angular_core.InputSignal<"indices" | "brackets">;
315
+ readonly errorBag: _angular_core.InputSignal<string | null>;
316
+ readonly showProgress: _angular_core.InputSignal<boolean>;
317
+ readonly transform: _angular_core.InputSignal<(data: TForm) => Record<string, FormDataConvertible>>;
318
+ readonly options: _angular_core.InputSignal<FormComponentOptions>;
319
+ readonly resetOnError: _angular_core.InputSignal<boolean | FormDataKeys<TForm>[]>;
320
+ readonly resetOnSuccess: _angular_core.InputSignal<boolean | FormDataKeys<TForm>[]>;
321
+ readonly setDefaultsOnSuccess: _angular_core.InputSignal<boolean>;
322
+ readonly disableWhileProcessing: _angular_core.InputSignal<boolean>;
323
+ readonly cancelOnUnmount: _angular_core.InputSignal<boolean>;
324
+ readonly invalidateCacheTags: _angular_core.InputSignal<string | string[]>;
325
+ readonly validateFiles: _angular_core.InputSignal<boolean>;
326
+ readonly validationTimeout: _angular_core.InputSignal<number>;
327
+ readonly optimistic: _angular_core.InputSignal<FormComponentOptimisticCallback<_inertiajs_core.PageProps & {
328
+ errors: _inertiajs_core.Errors & _inertiajs_core.ErrorBag;
329
+ deferred?: Record<string, VisitOptions["only"]>;
330
+ }, TForm> | null>;
331
+ readonly withAllErrors: _angular_core.InputSignal<boolean | null>;
332
+ readonly component: _angular_core.InputSignal<string | null>;
333
+ readonly instant: _angular_core.InputSignal<boolean>;
334
+ readonly onCancelToken: _angular_core.InputSignal<_inertiajs_core.CancelTokenCallback | null>;
335
+ readonly onBefore: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"before", _inertiajs_core.RequestPayload> | null>;
336
+ readonly onStart: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"start", _inertiajs_core.RequestPayload> | null>;
337
+ readonly onProgress: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"progress", _inertiajs_core.RequestPayload> | null>;
338
+ readonly onFinish: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"finish", _inertiajs_core.RequestPayload> | null>;
339
+ readonly onCancel: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"cancel", _inertiajs_core.RequestPayload> | null>;
340
+ readonly onSuccess: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"success", _inertiajs_core.RequestPayload> | null>;
341
+ readonly onError: _angular_core.InputSignal<_inertiajs_core.GlobalEventCallback<"error", _inertiajs_core.RequestPayload> | null>;
342
+ readonly onSubmitComplete: _angular_core.InputSignal<((props: FormComponentOnSubmitCompleteArguments<TForm>) => void) | null | undefined>;
343
+ readonly cancelToken: _angular_core.OutputEmitterRef<CancelToken>;
344
+ readonly before: _angular_core.OutputEmitterRef<PendingVisit>;
345
+ readonly start: _angular_core.OutputEmitterRef<PendingVisit>;
346
+ readonly progressEvent: _angular_core.OutputEmitterRef<HttpProgressEvent | undefined>;
347
+ readonly finish: _angular_core.OutputEmitterRef<ActiveVisit>;
348
+ readonly cancelEvent: _angular_core.OutputEmitterRef<void>;
349
+ readonly success: _angular_core.OutputEmitterRef<Page<_inertiajs_core.PageProps>>;
350
+ readonly error: _angular_core.OutputEmitterRef<FormDataErrors<TForm>>;
351
+ readonly submitComplete: _angular_core.OutputEmitterRef<FormComponentOnSubmitCompleteArguments<TForm>>;
352
+ readonly isDirty: Signal<boolean>;
353
+ readonly errors: Signal<FormDataErrors<TForm>>;
354
+ readonly hasErrors: Signal<boolean>;
355
+ readonly processing: Signal<boolean>;
356
+ readonly progress: Signal<HttpProgressEvent | null>;
357
+ readonly wasSuccessful: Signal<boolean>;
358
+ readonly recentlySuccessful: Signal<boolean>;
359
+ readonly validating: Signal<boolean>;
360
+ readonly resolvedMethod: Signal<Method>;
361
+ readonly resolvedAction: Signal<string>;
362
+ constructor();
363
+ ngAfterViewInit(): void;
364
+ handleFormUpdate(event: Event): void;
365
+ handleSubmit(event: SubmitEvent): void;
366
+ getFormData(submitter?: HTMLElement | null): FormData;
367
+ getData(submitter?: HTMLElement | null): TForm;
368
+ submit(submitter?: HTMLElement | null): void;
369
+ clearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
370
+ cancel(): void;
371
+ reset<K extends FormDataKeys<TForm>>(...fields: K[]): void;
372
+ resetAndClearErrors<K extends FormDataKeys<TForm>>(...fields: K[]): void;
373
+ readonly setError: InertiaForm<TForm>["setError"];
374
+ defaults(): void;
375
+ valid<K extends FormDataKeys<TForm>>(field: K): boolean;
376
+ invalid<K extends FormDataKeys<TForm>>(field: K): boolean;
377
+ validate<K extends FormDataKeys<TForm>>(field?: K | NamedInputEvent | ValidationConfig, validationConfig?: ValidationConfig): void;
378
+ touch<K extends FormDataKeys<TForm>>(...fields: K[]): void;
379
+ touched<K extends FormDataKeys<TForm>>(field?: K): boolean;
380
+ validator(): Validator;
381
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Form<any>, never>;
382
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Form<any>, "form[inertiaForm]", ["inertiaForm"], { "formType": { "alias": "formType"; "required": false; "isSignal": true; }; "action": { "alias": "action"; "required": false; "isSignal": true; }; "method": { "alias": "method"; "required": false; "isSignal": true; }; "headers": { "alias": "headers"; "required": false; "isSignal": true; }; "queryStringArrayFormat": { "alias": "queryStringArrayFormat"; "required": false; "isSignal": true; }; "errorBag": { "alias": "errorBag"; "required": false; "isSignal": true; }; "showProgress": { "alias": "showProgress"; "required": false; "isSignal": true; }; "transform": { "alias": "transform"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "resetOnError": { "alias": "resetOnError"; "required": false; "isSignal": true; }; "resetOnSuccess": { "alias": "resetOnSuccess"; "required": false; "isSignal": true; }; "setDefaultsOnSuccess": { "alias": "setDefaultsOnSuccess"; "required": false; "isSignal": true; }; "disableWhileProcessing": { "alias": "disableWhileProcessing"; "required": false; "isSignal": true; }; "cancelOnUnmount": { "alias": "cancelOnUnmount"; "required": false; "isSignal": true; }; "invalidateCacheTags": { "alias": "invalidateCacheTags"; "required": false; "isSignal": true; }; "validateFiles": { "alias": "validateFiles"; "required": false; "isSignal": true; }; "validationTimeout": { "alias": "validationTimeout"; "required": false; "isSignal": true; }; "optimistic": { "alias": "optimistic"; "required": false; "isSignal": true; }; "withAllErrors": { "alias": "withAllErrors"; "required": false; "isSignal": true; }; "component": { "alias": "component"; "required": false; "isSignal": true; }; "instant": { "alias": "instant"; "required": false; "isSignal": true; }; "onCancelToken": { "alias": "onCancelToken"; "required": false; "isSignal": true; }; "onBefore": { "alias": "onBefore"; "required": false; "isSignal": true; }; "onStart": { "alias": "onStart"; "required": false; "isSignal": true; }; "onProgress": { "alias": "onProgress"; "required": false; "isSignal": true; }; "onFinish": { "alias": "onFinish"; "required": false; "isSignal": true; }; "onCancel": { "alias": "onCancel"; "required": false; "isSignal": true; }; "onSuccess": { "alias": "onSuccess"; "required": false; "isSignal": true; }; "onError": { "alias": "onError"; "required": false; "isSignal": true; }; "onSubmitComplete": { "alias": "onSubmitComplete"; "required": false; "isSignal": true; }; }, { "cancelToken": "cancelToken"; "before": "before"; "start": "start"; "progressEvent": "progress"; "finish": "finish"; "cancelEvent": "cancel"; "success": "success"; "error": "error"; "submitComplete": "submitComplete"; }, never, never, true, never>;
383
+ }
384
+ type InertiaFormProps<TForm extends object = Record<string, FormDataConvertible>> = FormComponentProps<TForm>;
385
+ type InertiaPrecognitiveForm<TForm extends object = Record<string, FormDataConvertible>> = InertiaForm<TForm>;
386
+
387
+ declare class Head implements AfterViewInit {
388
+ #private;
389
+ readonly title: _angular_core.InputSignal<string | undefined>;
390
+ constructor();
391
+ ngAfterViewInit(): void;
392
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Head, never>;
393
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Head, "ng-template[inertiaHead]", ["inertiaHead"], { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
394
+ }
395
+
396
+ interface DeferredTemplateContext {
397
+ reloading: boolean;
398
+ }
399
+ declare class DeferredContent {
400
+ readonly template: TemplateRef<DeferredTemplateContext>;
401
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredContent, never>;
402
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredContent, "ng-template[inertiaDeferredContent]", never, {}, {}, never, never, true, never>;
403
+ }
404
+ declare class DeferredFallback {
405
+ readonly template: TemplateRef<unknown>;
406
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredFallback, never>;
407
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredFallback, "ng-template[inertiaDeferredFallback]", never, {}, {}, never, never, true, never>;
408
+ }
409
+ declare class DeferredRescue {
410
+ readonly template: TemplateRef<DeferredTemplateContext>;
411
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeferredRescue, never>;
412
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DeferredRescue, "ng-template[inertiaDeferredRescue]", never, {}, {}, never, never, true, never>;
413
+ }
414
+ declare class Deferred {
415
+ #private;
416
+ readonly data: _angular_core.InputSignal<string | string[]>;
417
+ readonly content: _angular_core.Signal<DeferredContent | undefined>;
418
+ readonly fallback: _angular_core.Signal<DeferredFallback | undefined>;
419
+ readonly rescue: _angular_core.Signal<DeferredRescue | undefined>;
420
+ readonly ready: _angular_core.Signal<boolean>;
421
+ readonly rescued: _angular_core.Signal<boolean>;
422
+ readonly context: _angular_core.Signal<{
423
+ reloading: boolean;
424
+ }>;
425
+ constructor();
426
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Deferred, never>;
427
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Deferred, "inertia-deferred", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, ["content", "fallback", "rescue"], never, true, never>;
428
+ }
429
+
430
+ interface WhenVisibleTemplateContext {
431
+ fetching: boolean;
432
+ }
433
+ declare class WhenVisibleContent {
434
+ readonly template: TemplateRef<WhenVisibleTemplateContext>;
435
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WhenVisibleContent, never>;
436
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WhenVisibleContent, "ng-template[inertiaWhenVisibleContent]", never, {}, {}, never, never, true, never>;
437
+ }
438
+ declare class WhenVisibleFallback {
439
+ readonly template: TemplateRef<unknown>;
440
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WhenVisibleFallback, never>;
441
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WhenVisibleFallback, "ng-template[inertiaWhenVisibleFallback]", never, {}, {}, never, never, true, never>;
442
+ }
443
+ declare class WhenVisible {
444
+ #private;
445
+ private readonly sentinel;
446
+ readonly data: _angular_core.InputSignal<string | string[] | undefined>;
447
+ readonly params: _angular_core.InputSignal<ReloadOptions>;
448
+ readonly buffer: _angular_core.InputSignal<number>;
449
+ readonly always: _angular_core.InputSignal<boolean>;
450
+ readonly content: _angular_core.Signal<WhenVisibleContent | undefined>;
451
+ readonly fallback: _angular_core.Signal<WhenVisibleFallback | undefined>;
452
+ readonly loaded: _angular_core.Signal<boolean>;
453
+ readonly context: _angular_core.Signal<{
454
+ fetching: boolean;
455
+ }>;
456
+ constructor();
457
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WhenVisible, never>;
458
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WhenVisible, "inertia-when-visible", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "buffer": { "alias": "buffer"; "required": false; "isSignal": true; }; "always": { "alias": "always"; "required": false; "isSignal": true; }; }, {}, ["content", "fallback"], never, true, never>;
459
+ }
460
+
461
+ type ElementTarget = HTMLElement | string | null;
462
+ declare class InfiniteScroll implements InfiniteScrollRef {
463
+ #private;
464
+ readonly data: _angular_core.InputSignal<string>;
465
+ readonly buffer: _angular_core.InputSignal<number>;
466
+ readonly manual: _angular_core.InputSignal<boolean>;
467
+ readonly manualAfter: _angular_core.InputSignal<number>;
468
+ readonly preserveUrl: _angular_core.InputSignal<boolean>;
469
+ readonly reverse: _angular_core.InputSignal<boolean>;
470
+ readonly autoScroll: _angular_core.InputSignal<boolean | undefined>;
471
+ readonly onlyNext: _angular_core.InputSignal<boolean>;
472
+ readonly onlyPrevious: _angular_core.InputSignal<boolean>;
473
+ readonly params: _angular_core.InputSignal<ReloadOptions>;
474
+ readonly startElement: _angular_core.InputSignal<ElementTarget>;
475
+ readonly endElement: _angular_core.InputSignal<ElementTarget>;
476
+ readonly itemsElement: _angular_core.InputSignal<ElementTarget>;
477
+ readonly loadingPrevious: Signal<boolean>;
478
+ readonly loadingNext: Signal<boolean>;
479
+ readonly loading: Signal<boolean>;
480
+ readonly manualMode: Signal<boolean>;
481
+ readonly hasPreviousPage: Signal<boolean>;
482
+ readonly hasNextPage: Signal<boolean>;
483
+ readonly slot: Signal<InfiniteScrollSlotProps>;
484
+ readonly previous: Signal<InfiniteScrollActionSlotProps>;
485
+ readonly next: Signal<InfiniteScrollActionSlotProps>;
486
+ constructor();
487
+ fetchNext(options?: ReloadOptions): void;
488
+ fetchPrevious(options?: ReloadOptions): void;
489
+ hasPrevious(): boolean;
490
+ hasNext(): boolean;
491
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InfiniteScroll, never>;
492
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<InfiniteScroll, "[inertiaInfiniteScroll]", ["inertiaInfiniteScroll"], { "data": { "alias": "inertiaInfiniteScroll"; "required": true; "isSignal": true; }; "buffer": { "alias": "buffer"; "required": false; "isSignal": true; }; "manual": { "alias": "manual"; "required": false; "isSignal": true; }; "manualAfter": { "alias": "manualAfter"; "required": false; "isSignal": true; }; "preserveUrl": { "alias": "preserveUrl"; "required": false; "isSignal": true; }; "reverse": { "alias": "reverse"; "required": false; "isSignal": true; }; "autoScroll": { "alias": "autoScroll"; "required": false; "isSignal": true; }; "onlyNext": { "alias": "onlyNext"; "required": false; "isSignal": true; }; "onlyPrevious": { "alias": "onlyPrevious"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "startElement": { "alias": "startElement"; "required": false; "isSignal": true; }; "endElement": { "alias": "endElement"; "required": false; "isSignal": true; }; "itemsElement": { "alias": "itemsElement"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
493
+ }
494
+
495
+ declare function provideInertiaApp(props: InertiaAppProps, additionalProviders?: Array<Provider | EnvironmentProviders>): EnvironmentProviders;
496
+
497
+ export { App, Deferred, DeferredContent, DeferredFallback, DeferredRescue, Form, Head, InertiaRenderer, InertiaRuntime, InfiniteScroll, LayoutOutlet, Link, WhenVisible, WhenVisibleContent, WhenVisibleFallback, config, createForm, createInertiaApp, h, provideInertiaApp, useForm, useFormContext, useHttp, useLayoutProps, usePage, usePoll, usePrefetch, useRemember };
498
+ export type { AngularCreateInertiaAppOptions, AngularInertiaAppConfig, AngularLayout, AngularRenderFunction, AngularRenderNode, AngularWithApp, ComponentResolver, DeferredTemplateContext, FormType, InertiaAppProps, InertiaForm$1 as InertiaForm, InertiaForm as InertiaFormComponent, InertiaFormProps as InertiaFormComponentProps, InertiaFormProps$1 as InertiaFormProps, InertiaLinkProps, InertiaPrecognitiveForm$1 as InertiaPrecognitiveForm, InertiaPrecognitiveForm as InertiaPrecognitiveFormComponent, InertiaPrecognitiveFormProps, LayoutCallback, ResolvedComponent, SetDataAction, SetDataByKeyValuePair, SetDataByMethod, SetDataByObject, SetupOptions, UseHttp, UseHttpPrecognitiveProps, UseHttpProps, UseHttpValidationProps, WhenVisibleTemplateContext };