@remix-run/router 0.0.0-experimental-b162e81d → 0.0.0-experimental-0f2dd78c
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/router.cjs.js +15 -31
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +0 -3
- package/dist/router.js +15 -31
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +15 -31
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/router.ts +3 -25
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v0.0.0-experimental-
|
|
2
|
+
* @remix-run/router v0.0.0-experimental-0f2dd78c
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2147,8 +2147,7 @@ function createRouter(init) {
|
|
|
2147
2147
|
formMethod: undefined,
|
|
2148
2148
|
formAction: undefined,
|
|
2149
2149
|
formEncType: undefined,
|
|
2150
|
-
formData: undefined
|
|
2151
|
-
" _hasFetcherDoneAnything ": true
|
|
2150
|
+
formData: undefined
|
|
2152
2151
|
};
|
|
2153
2152
|
state.fetchers.set(rf.key, revalidatingFetcher);
|
|
2154
2153
|
});
|
|
@@ -2284,8 +2283,7 @@ function createRouter(init) {
|
|
|
2284
2283
|
let fetcher = _extends({
|
|
2285
2284
|
state: "submitting"
|
|
2286
2285
|
}, submission, {
|
|
2287
|
-
data: existingFetcher && existingFetcher.data
|
|
2288
|
-
" _hasFetcherDoneAnything ": true
|
|
2286
|
+
data: existingFetcher && existingFetcher.data
|
|
2289
2287
|
});
|
|
2290
2288
|
|
|
2291
2289
|
state.fetchers.set(key, fetcher);
|
|
@@ -2315,8 +2313,7 @@ function createRouter(init) {
|
|
|
2315
2313
|
let loadingFetcher = _extends({
|
|
2316
2314
|
state: "loading"
|
|
2317
2315
|
}, submission, {
|
|
2318
|
-
data: undefined
|
|
2319
|
-
" _hasFetcherDoneAnything ": true
|
|
2316
|
+
data: undefined
|
|
2320
2317
|
});
|
|
2321
2318
|
|
|
2322
2319
|
state.fetchers.set(key, loadingFetcher);
|
|
@@ -2324,8 +2321,7 @@ function createRouter(init) {
|
|
|
2324
2321
|
fetchers: new Map(state.fetchers)
|
|
2325
2322
|
});
|
|
2326
2323
|
return startRedirectNavigation(state, actionResult, {
|
|
2327
|
-
submission
|
|
2328
|
-
isFetchActionRedirect: true
|
|
2324
|
+
submission
|
|
2329
2325
|
});
|
|
2330
2326
|
} // Process any non-redirect errors thrown
|
|
2331
2327
|
|
|
@@ -2354,9 +2350,7 @@ function createRouter(init) {
|
|
|
2354
2350
|
let loadFetcher = _extends({
|
|
2355
2351
|
state: "loading",
|
|
2356
2352
|
data: actionResult.data
|
|
2357
|
-
}, submission
|
|
2358
|
-
" _hasFetcherDoneAnything ": true
|
|
2359
|
-
});
|
|
2353
|
+
}, submission);
|
|
2360
2354
|
|
|
2361
2355
|
state.fetchers.set(key, loadFetcher);
|
|
2362
2356
|
let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, routesToUse, init.basename, {
|
|
@@ -2375,8 +2369,7 @@ function createRouter(init) {
|
|
|
2375
2369
|
formMethod: undefined,
|
|
2376
2370
|
formAction: undefined,
|
|
2377
2371
|
formEncType: undefined,
|
|
2378
|
-
formData: undefined
|
|
2379
|
-
" _hasFetcherDoneAnything ": true
|
|
2372
|
+
formData: undefined
|
|
2380
2373
|
};
|
|
2381
2374
|
state.fetchers.set(staleKey, revalidatingFetcher);
|
|
2382
2375
|
fetchControllers.set(staleKey, abortController);
|
|
@@ -2414,8 +2407,7 @@ function createRouter(init) {
|
|
|
2414
2407
|
formMethod: undefined,
|
|
2415
2408
|
formAction: undefined,
|
|
2416
2409
|
formEncType: undefined,
|
|
2417
|
-
formData: undefined
|
|
2418
|
-
" _hasFetcherDoneAnything ": true
|
|
2410
|
+
formData: undefined
|
|
2419
2411
|
};
|
|
2420
2412
|
state.fetchers.set(key, doneFetcher);
|
|
2421
2413
|
let didAbortFetchLoads = abortStaleFetchLoads(loadId); // If we are currently in a navigation loading state and this fetcher is
|
|
@@ -2456,8 +2448,7 @@ function createRouter(init) {
|
|
|
2456
2448
|
formEncType: undefined,
|
|
2457
2449
|
formData: undefined
|
|
2458
2450
|
}, submission, {
|
|
2459
|
-
data: existingFetcher && existingFetcher.data
|
|
2460
|
-
" _hasFetcherDoneAnything ": true
|
|
2451
|
+
data: existingFetcher && existingFetcher.data
|
|
2461
2452
|
});
|
|
2462
2453
|
|
|
2463
2454
|
state.fetchers.set(key, loadingFetcher);
|
|
@@ -2517,8 +2508,7 @@ function createRouter(init) {
|
|
|
2517
2508
|
formMethod: undefined,
|
|
2518
2509
|
formAction: undefined,
|
|
2519
2510
|
formEncType: undefined,
|
|
2520
|
-
formData: undefined
|
|
2521
|
-
" _hasFetcherDoneAnything ": true
|
|
2511
|
+
formData: undefined
|
|
2522
2512
|
};
|
|
2523
2513
|
state.fetchers.set(key, doneFetcher);
|
|
2524
2514
|
updateState({
|
|
@@ -2551,20 +2541,16 @@ function createRouter(init) {
|
|
|
2551
2541
|
|
|
2552
2542
|
let {
|
|
2553
2543
|
submission,
|
|
2554
|
-
replace
|
|
2555
|
-
isFetchActionRedirect
|
|
2544
|
+
replace
|
|
2556
2545
|
} = _temp === void 0 ? {} : _temp;
|
|
2557
2546
|
|
|
2558
2547
|
if (redirect.revalidate) {
|
|
2559
2548
|
isRevalidationRequired = true;
|
|
2560
2549
|
}
|
|
2561
2550
|
|
|
2562
|
-
let redirectLocation = createLocation(state.location, redirect.location,
|
|
2563
|
-
_extends({
|
|
2551
|
+
let redirectLocation = createLocation(state.location, redirect.location, {
|
|
2564
2552
|
_isRedirect: true
|
|
2565
|
-
}
|
|
2566
|
-
_isFetchActionRedirect: true
|
|
2567
|
-
} : {}));
|
|
2553
|
+
});
|
|
2568
2554
|
invariant(redirectLocation, "Expected a location on the redirect navigation"); // Check if this an absolute external redirect that goes to a new origin
|
|
2569
2555
|
|
|
2570
2556
|
if (ABSOLUTE_URL_REGEX.test(redirect.location) && isBrowser && typeof ((_window = window) == null ? void 0 : _window.location) !== "undefined") {
|
|
@@ -2710,8 +2696,7 @@ function createRouter(init) {
|
|
|
2710
2696
|
formMethod: undefined,
|
|
2711
2697
|
formAction: undefined,
|
|
2712
2698
|
formEncType: undefined,
|
|
2713
|
-
formData: undefined
|
|
2714
|
-
" _hasFetcherDoneAnything ": true
|
|
2699
|
+
formData: undefined
|
|
2715
2700
|
};
|
|
2716
2701
|
state.fetchers.set(key, doneFetcher);
|
|
2717
2702
|
}
|
|
@@ -3957,8 +3942,7 @@ function processLoaderData(state, matches, matchesToLoad, results, pendingError,
|
|
|
3957
3942
|
formMethod: undefined,
|
|
3958
3943
|
formAction: undefined,
|
|
3959
3944
|
formEncType: undefined,
|
|
3960
|
-
formData: undefined
|
|
3961
|
-
" _hasFetcherDoneAnything ": true
|
|
3945
|
+
formData: undefined
|
|
3962
3946
|
};
|
|
3963
3947
|
state.fetchers.set(key, doneFetcher);
|
|
3964
3948
|
}
|