@feathery/react 2.4.55 → 2.4.57
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/Form/grid/index.d.ts.map +1 -1
- package/dist/Form/index.d.ts.map +1 -1
- package/dist/elements/components/QuikFormViewer/transforms/form.d.ts +2 -0
- package/dist/elements/components/QuikFormViewer/transforms/form.d.ts.map +1 -0
- package/dist/elements/components/QuikFormViewer/transforms/header.d.ts +2 -0
- package/dist/elements/components/QuikFormViewer/transforms/header.d.ts.map +1 -0
- package/dist/elements/components/QuikFormViewer/transforms/sidebar.d.ts +7 -0
- package/dist/elements/components/QuikFormViewer/transforms/sidebar.d.ts.map +1 -0
- package/dist/elements/components/QuikFormViewer.d.ts +4 -2
- package/dist/elements/components/QuikFormViewer.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/featheryClient/integrationClient.d.ts +2 -1
- package/dist/utils/featheryClient/integrationClient.d.ts.map +1 -1
- package/dist/utils/featheryClient/utils.d.ts +2 -0
- package/dist/utils/featheryClient/utils.d.ts.map +1 -0
- package/dist/utils/offlineRequestHandler.d.ts +36 -2
- package/dist/utils/offlineRequestHandler.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/index.js +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { OfflineRequestHandler } from '../offlineRequestHandler';
|
|
2
2
|
import { AlloyEntities, IntegrationActionIds, IntegrationActionOptions, LoanProCustomerObject } from '../internalState';
|
|
3
3
|
export declare const TYPE_MESSAGES_TO_IGNORE: string[];
|
|
4
|
-
export declare function checkResponseSuccess(response: any): Promise<void>;
|
|
5
4
|
export default class IntegrationClient {
|
|
6
5
|
formKey: string;
|
|
7
6
|
version?: string;
|
|
@@ -12,7 +11,9 @@ export default class IntegrationClient {
|
|
|
12
11
|
submitQueue: Promise<any>;
|
|
13
12
|
eventQueue: Promise<any>;
|
|
14
13
|
offlineRequestHandler: OfflineRequestHandler;
|
|
14
|
+
showNetworkErrorAlert: boolean;
|
|
15
15
|
constructor(formKey?: string, ignoreNetworkErrors?: any, draft?: boolean, bypassCDN?: boolean);
|
|
16
|
+
errorCallback(): void;
|
|
16
17
|
_fetch(url: any, options?: any, parseResponse?: boolean, propagateNetworkErrors?: boolean): Promise<void | Response>;
|
|
17
18
|
fetchPlaidLinkToken(kwargs: Record<string, any>): Promise<{
|
|
18
19
|
token: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationClient.d.ts","sourceRoot":"","sources":["../../../src/utils/featheryClient/integrationClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integrationClient.d.ts","sourceRoot":"","sources":["../../../src/utils/featheryClient/integrationClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAI1B,eAAO,MAAM,uBAAuB,UAKnC,CAAC;AAGF,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,EAAE,GAAG,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACzB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;gBAG7B,OAAO,SAAK,EACZ,mBAAmB,CAAC,EAAE,GAAG,EACzB,KAAK,UAAQ,EACb,SAAS,UAAQ;IAcnB,aAAa;IAQb,MAAM,CACJ,GAAG,EAAE,GAAG,EACR,OAAO,CAAC,EAAE,GAAG,EACb,aAAa,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,EAAE,MAAM,EAAE,CAAA;KAAE;IAUnD,sBAAsB,SAAQ;IAC9B,gBAAgB,SAAa;IAE7B,mBAAmB;IA0Cb,0BAA0B,CAAC,WAAW,EAAE,MAAM;IAmE9C,iBAAiB,CAAC,WAAW,EAAE,MAAM;IAmBrC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,OAAO,GAAG,KAAe;IAepE,iBAAiB,CAAC,GAAG,EAAE,MAAM;IAiB7B,SAAS,CAAC,UAAU,EAAE,MAAM;IAe5B,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa;;;;;;;;;IAmBrE,wCAAwC,CAC5C,UAAU,EAAE,qBAAqB;;;;;;;;;IAoB7B,sCAAsC;;;;;;;;;IAkBtC,mBAAmB;;;;;;;;;IAiBnB,mBAAmB,CACvB,aAAa,EAAE,oBAAoB,EACnC,OAAO,EAAE,wBAAwB;;;;;;;;;IAwB7B,8BAA8B,CAClC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM;CAcxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/featheryClient/utils.ts"],"names":[],"mappings":"AAGA,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,GAAG,iBAyBvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import FeatheryClient from './featheryClient';
|
|
1
|
+
import type FeatheryClient from './featheryClient';
|
|
2
2
|
export interface RequestOptions {
|
|
3
3
|
headers?: {
|
|
4
4
|
'Content-Type'?: string | undefined;
|
|
@@ -10,6 +10,16 @@ export interface RequestOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const untrackUnload: (force?: boolean) => void;
|
|
12
12
|
export declare function useOfflineRequestHandler(client: FeatheryClient): void;
|
|
13
|
+
/**
|
|
14
|
+
* OfflineRequestHandler manages HTTP request reliability for forms.
|
|
15
|
+
* Failed requests are queued in IndexedDB and replayed when connectivity is restored.
|
|
16
|
+
*
|
|
17
|
+
* Behavior:
|
|
18
|
+
* - When online: attempts requests immediately, but queues them if network errors occur
|
|
19
|
+
* - When offline: immediately queues all requests for later replay
|
|
20
|
+
* - Prevent page unload while requests are pending
|
|
21
|
+
* - Replays requests in chronological order
|
|
22
|
+
*/
|
|
13
23
|
export declare class OfflineRequestHandler {
|
|
14
24
|
private isReplayingRequests;
|
|
15
25
|
private readonly formKey;
|
|
@@ -20,17 +30,41 @@ export declare class OfflineRequestHandler {
|
|
|
20
30
|
private readonly retryDelayMs;
|
|
21
31
|
private onlineSignals;
|
|
22
32
|
private indexedDBSupported;
|
|
23
|
-
|
|
33
|
+
private errorCallback?;
|
|
34
|
+
constructor(formKey: string, errorCallback?: (error: string) => void);
|
|
24
35
|
dbHasRequest(): Promise<boolean>;
|
|
25
36
|
onlineAndReplayed(): Promise<unknown>;
|
|
26
37
|
openDatabase(): Promise<IDBDatabase | undefined>;
|
|
27
38
|
private getDbTransaction;
|
|
39
|
+
/**
|
|
40
|
+
* Core request orchestration method that decides whether to execute a request immediately
|
|
41
|
+
* or queue it for later replay. This implements the "eventual consistency" pattern for
|
|
42
|
+
* offline-first applications.
|
|
43
|
+
*
|
|
44
|
+
* Logic flow:
|
|
45
|
+
* 1. If online AND no pending requests: execute immediately
|
|
46
|
+
* 2. If online BUT requests are queued/replaying: wait for queue to clear, then execute
|
|
47
|
+
* 3. If request fails with network error: queue it and start replay process
|
|
48
|
+
* 4. If offline: immediately queue the request
|
|
49
|
+
*/
|
|
28
50
|
runOrSaveRequest(run: any, url: string, options: any, type: string, stepKey?: string): Promise<void>;
|
|
29
51
|
saveRequest(url: string, options: any, type: string, stepKey?: string): Promise<void>;
|
|
30
52
|
private serializeRequestBody;
|
|
53
|
+
/**
|
|
54
|
+
* Replay queued requests:
|
|
55
|
+
*
|
|
56
|
+
* Step 1: Submit requests (form submissions, custom requests) - executed in parallel
|
|
57
|
+
* Step 2: Event registrations - grouped by step and executed sequentially by step,
|
|
58
|
+
* but in parallel within each step to maintain event ordering per form step
|
|
59
|
+
*/
|
|
31
60
|
replayRequests(): Promise<void>;
|
|
32
61
|
private replayRequestsInParallel;
|
|
33
62
|
private removeRequest;
|
|
63
|
+
/**
|
|
64
|
+
* Calculates exponential backoff delay with jitter.
|
|
65
|
+
* Pattern: 1s, 2s, 4s, etc.
|
|
66
|
+
*/
|
|
67
|
+
private getExponentialDelay;
|
|
34
68
|
private delay;
|
|
35
69
|
private reconstructBody;
|
|
36
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offlineRequestHandler.d.ts","sourceRoot":"","sources":["../../src/utils/offlineRequestHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"offlineRequestHandler.d.ts","sourceRoot":"","sources":["../../src/utils/offlineRequestHandler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAcnD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAqCD,eAAO,MAAM,aAAa,2BAOzB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,cAAc,QAS9D;AAED;;;;;;;;;GASG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB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