@timeax/form-palette 0.0.20 → 0.0.21

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.
@@ -1,4 +1,4 @@
1
- import { Page } from './../../../../node_modules/@inertiajs/core/types/types.d';
1
+ import { Page } from '@inertiajs/core';
2
2
  import { AxiosResponse, AxiosRequestConfig } from 'axios';
3
3
 
4
4
  /**
@@ -23,7 +23,7 @@ interface AdapterCallbacks<Ok = unknown, Err = unknown> {
23
23
  * Called when the underlying request fails.
24
24
  * Adapters should pass the most informative error shape they have.
25
25
  */
26
- onError?(error: Err): void;
26
+ onError?(error: Err, updateRef?: boolean): void;
27
27
  /**
28
28
  * Called at the end of the adapter lifecycle, whether success or error.
29
29
  * Useful for clearing loading states, unlocking buttons, etc.
@@ -97,6 +97,7 @@ interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
97
97
  * { ...formValues, ...extra }
98
98
  */
99
99
  data: Body;
100
+ errorBag?: string;
100
101
  /**
101
102
  * Lifecycle callbacks provided by the core.
102
103
  *
@@ -310,5 +311,9 @@ declare function registerInertiaAdapter(): Promise<void>;
310
311
  * registerInertiaAdapter directly.
311
312
  */
312
313
  declare function registerKnownAdapter(key: AdapterKey): Promise<void>;
314
+ /**
315
+ * Convenience helper: register all known adapters.
316
+ **/
317
+ declare function registerAllAdapters(): void;
313
318
 
314
- export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterProps, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };
319
+ export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterProps, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAllAdapters, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };
@@ -1,4 +1,4 @@
1
- import { Page } from './../../../../node_modules/@inertiajs/core/types/types.d';
1
+ import { Page } from '@inertiajs/core';
2
2
  import { AxiosResponse, AxiosRequestConfig } from 'axios';
3
3
 
4
4
  /**
@@ -23,7 +23,7 @@ interface AdapterCallbacks<Ok = unknown, Err = unknown> {
23
23
  * Called when the underlying request fails.
24
24
  * Adapters should pass the most informative error shape they have.
25
25
  */
26
- onError?(error: Err): void;
26
+ onError?(error: Err, updateRef?: boolean): void;
27
27
  /**
28
28
  * Called at the end of the adapter lifecycle, whether success or error.
29
29
  * Useful for clearing loading states, unlocking buttons, etc.
@@ -97,6 +97,7 @@ interface AdapterConfig<Body = unknown, Ok = unknown, Err = unknown> {
97
97
  * { ...formValues, ...extra }
98
98
  */
99
99
  data: Body;
100
+ errorBag?: string;
100
101
  /**
101
102
  * Lifecycle callbacks provided by the core.
102
103
  *
@@ -310,5 +311,9 @@ declare function registerInertiaAdapter(): Promise<void>;
310
311
  * registerInertiaAdapter directly.
311
312
  */
312
313
  declare function registerKnownAdapter(key: AdapterKey): Promise<void>;
314
+ /**
315
+ * Convenience helper: register all known adapters.
316
+ **/
317
+ declare function registerAllAdapters(): void;
313
318
 
314
- export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterProps, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };
319
+ export { type AdapterCallbacks, type AdapterConfig, type AdapterError, type AdapterFactory, type AdapterKey, type AdapterOk, type AdapterProps, type AdapterResult, type AdapterSubmit, type Adapters, type Method, type NamedAdapterConfig, type NamedAdapterFactory, createAxiosAdapter, createInertiaAdapter, getAdapter, hasAdapter, localAdapter, registerAdapter, registerAllAdapters, registerAxiosAdapter, registerInertiaAdapter, registerKnownAdapter };