@inertiajs/svelte
Advanced tools
| import type { Errors, FormDataConvertible, Method, Progress, VisitOptions } from '@inertiajs/core'; | ||
| import { type Writable } from 'svelte/store'; | ||
| type FormDataType = Record<string, FormDataConvertible>; | ||
| type FormOptions = Omit<VisitOptions, 'data'>; | ||
| export interface InertiaFormProps<TForm extends FormDataType> { | ||
@@ -23,8 +24,8 @@ isDirty: boolean; | ||
| setError(errors: Errors): this; | ||
| submit(method: Method, url: string, options?: Partial<VisitOptions>): void; | ||
| get(url: string, options?: Partial<VisitOptions>): void; | ||
| post(url: string, options?: Partial<VisitOptions>): void; | ||
| put(url: string, options?: Partial<VisitOptions>): void; | ||
| patch(url: string, options?: Partial<VisitOptions>): void; | ||
| delete(url: string, options?: Partial<VisitOptions>): void; | ||
| submit(method: Method, url: string, options?: FormOptions): void; | ||
| get(url: string, options?: FormOptions): void; | ||
| post(url: string, options?: FormOptions): void; | ||
| put(url: string, options?: FormOptions): void; | ||
| patch(url: string, options?: FormOptions): void; | ||
| delete(url: string, options?: FormOptions): void; | ||
| cancel(): void; | ||
@@ -31,0 +32,0 @@ } |
+1
-1
@@ -7,3 +7,3 @@ import { router } from '@inertiajs/core'; | ||
| const rememberKey = typeof rememberKeyOrData === 'string' ? rememberKeyOrData : null; | ||
| const inputData = typeof rememberKeyOrData === 'string' ? maybeData : rememberKeyOrData; | ||
| const inputData = (typeof rememberKeyOrData === 'string' ? maybeData : rememberKeyOrData) ?? {}; | ||
| const data = typeof inputData === 'function' ? inputData() : inputData; | ||
@@ -10,0 +10,0 @@ const restored = rememberKey |
+2
-2
| { | ||
| "name": "@inertiajs/svelte", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "license": "MIT", | ||
@@ -46,3 +46,3 @@ "description": "The Svelte adapter for Inertia.js", | ||
| "dependencies": { | ||
| "@inertiajs/core": "2.0.0", | ||
| "@inertiajs/core": "2.0.1", | ||
| "html-escape": "^2.0.0", | ||
@@ -49,0 +49,0 @@ "lodash": "^4.5.0" |
749
0.13%39050
-0.01%+ Added
- Removed
Updated