@inertiajs/core 2.3.8 → 2.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +194 -143
- package/dist/index.esm.js.map +4 -4
- package/dist/index.js +194 -143
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/types/index.d.ts +1 -1
- package/types/request.d.ts +3 -2
- package/types/requestParams.d.ts +1 -0
- package/types/requestStream.d.ts +6 -4
- package/types/resetFormFields.d.ts +1 -0
- package/types/router.d.ts +8 -1
- package/types/scroll.d.ts +1 -0
- package/types/types.d.ts +2 -1
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { default as createHeadManager } from './head';
|
|
|
9
9
|
export { default as useInfiniteScroll } from './infiniteScroll';
|
|
10
10
|
export { shouldIntercept, shouldNavigate } from './navigationEvents';
|
|
11
11
|
export { hide as hideProgress, progress, reveal as revealProgress, default as setupProgress } from './progress';
|
|
12
|
-
export { resetFormFields } from './resetFormFields';
|
|
12
|
+
export { FormComponentResetSymbol, resetFormFields } from './resetFormFields';
|
|
13
13
|
export * from './types';
|
|
14
14
|
export { hrefToUrl, isUrlMethodPair, mergeDataIntoQueryString, urlHasProtocol, urlToString, urlWithoutHash, } from './url';
|
|
15
15
|
export { type Config, type Router };
|
package/types/request.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AxiosProgressEvent, AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { type AxiosProgressEvent, type AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { RequestParams } from './requestParams';
|
|
3
3
|
import { Response } from './response';
|
|
4
|
-
import { ActiveVisit, Page } from './types';
|
|
4
|
+
import type { ActiveVisit, Page } from './types';
|
|
5
5
|
export declare class Request {
|
|
6
6
|
protected page: Page;
|
|
7
7
|
protected response: Response;
|
|
@@ -10,6 +10,7 @@ export declare class Request {
|
|
|
10
10
|
protected requestHasFinished: boolean;
|
|
11
11
|
constructor(params: ActiveVisit, page: Page);
|
|
12
12
|
static create(params: ActiveVisit, page: Page): Request;
|
|
13
|
+
isPrefetch(): boolean;
|
|
13
14
|
send(): Promise<void | undefined>;
|
|
14
15
|
protected finish(): void;
|
|
15
16
|
protected fireFinishEvents(): void;
|
package/types/requestParams.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class RequestParams {
|
|
|
12
12
|
data(): import("./types").RequestPayload | null;
|
|
13
13
|
queryParams(): import("./types").RequestPayload;
|
|
14
14
|
isPartial(): boolean;
|
|
15
|
+
isPrefetch(): boolean;
|
|
15
16
|
isDeferredPropsRequest(): boolean;
|
|
16
17
|
onCancelToken(cb: VoidFunction): void;
|
|
17
18
|
markAsFinished(): void;
|
package/types/requestStream.d.ts
CHANGED
|
@@ -9,10 +9,12 @@ export declare class RequestStream {
|
|
|
9
9
|
});
|
|
10
10
|
send(request: Request): void;
|
|
11
11
|
interruptInFlight(): void;
|
|
12
|
-
cancelInFlight(
|
|
13
|
-
|
|
12
|
+
cancelInFlight({ prefetch }?: {
|
|
13
|
+
prefetch?: boolean | undefined;
|
|
14
|
+
}): void;
|
|
15
|
+
protected cancel({ cancelled, interrupted }?: {
|
|
14
16
|
cancelled?: boolean | undefined;
|
|
15
17
|
interrupted?: boolean | undefined;
|
|
16
|
-
}
|
|
17
|
-
protected shouldCancel(
|
|
18
|
+
}, force?: boolean): void;
|
|
19
|
+
protected shouldCancel(): boolean;
|
|
18
20
|
}
|
package/types/router.d.ts
CHANGED
|
@@ -18,8 +18,15 @@ export declare class Router {
|
|
|
18
18
|
remember(data: unknown, key?: string): void;
|
|
19
19
|
restore<T = unknown>(key?: string): T | undefined;
|
|
20
20
|
on<TEventName extends GlobalEventNames>(type: TEventName, callback: (event: GlobalEvent<TEventName>) => GlobalEventResult<TEventName>): VoidFunction;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use cancelAll() instead.
|
|
23
|
+
*/
|
|
21
24
|
cancel(): void;
|
|
22
|
-
cancelAll(
|
|
25
|
+
cancelAll({ async, prefetch, sync }?: {
|
|
26
|
+
async?: boolean | undefined;
|
|
27
|
+
prefetch?: boolean | undefined;
|
|
28
|
+
sync?: boolean | undefined;
|
|
29
|
+
}): void;
|
|
23
30
|
poll(interval: number, requestOptions?: ReloadOptions, options?: PollOptions): {
|
|
24
31
|
stop: VoidFunction;
|
|
25
32
|
start: VoidFunction;
|
package/types/scroll.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare class Scroll {
|
|
|
3
3
|
static save(): void;
|
|
4
4
|
static getScrollRegions(): ScrollRegion[];
|
|
5
5
|
protected static regions(): NodeListOf<Element>;
|
|
6
|
+
static scrollToTop(): void;
|
|
6
7
|
static reset(): void;
|
|
7
8
|
static scrollToAnchor(): void;
|
|
8
9
|
static restore(scrollRegions: ScrollRegion[]): void;
|
package/types/types.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export interface Page<SharedProps extends PageProps = PageProps> {
|
|
|
96
96
|
clearHistory: boolean;
|
|
97
97
|
encryptHistory: boolean;
|
|
98
98
|
deferredProps?: Record<string, NonNullable<VisitOptions['only']>>;
|
|
99
|
+
initialDeferredProps?: Record<string, NonNullable<VisitOptions['only']>>;
|
|
99
100
|
mergeProps?: string[];
|
|
100
101
|
prependProps?: string[];
|
|
101
102
|
deepMergeProps?: string[];
|
|
@@ -116,7 +117,7 @@ export type ScrollRegion = {
|
|
|
116
117
|
export interface ClientSideVisitOptions<TProps = Page['props']> {
|
|
117
118
|
component?: Page['component'];
|
|
118
119
|
url?: Page['url'];
|
|
119
|
-
props?: ((props: TProps) => PageProps) | PageProps;
|
|
120
|
+
props?: ((props: TProps, onceProps: Partial<TProps>) => PageProps) | PageProps;
|
|
120
121
|
flash?: ((flash: FlashData) => PageFlashData) | PageFlashData;
|
|
121
122
|
clearHistory?: Page['clearHistory'];
|
|
122
123
|
encryptHistory?: Page['encryptHistory'];
|