@jsenv/navi 0.30.22 → 0.30.24
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/dev/jsenv_navi.js +18 -10
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +18 -10
- package/dist/jsenv_navi.js.map +3 -3
- package/docs/actions.md +2 -2
- package/docs/list_refresh.md +8 -0
- package/docs/resource.md +4 -3
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -29228,7 +29228,7 @@ const createResourceLifecycleManager = () => {
|
|
|
29228
29228
|
|
|
29229
29229
|
for (const restAction of config.restActionSet) {
|
|
29230
29230
|
const actionCandidateArray = restAction.matchAllSelfOrDescendant(
|
|
29231
|
-
(action) =>
|
|
29231
|
+
(action) => shouldAskAgain(action, triggeringAction),
|
|
29232
29232
|
);
|
|
29233
29233
|
|
|
29234
29234
|
for (const actionCandidate of actionCandidateArray) {
|
|
@@ -29268,7 +29268,7 @@ const createResourceLifecycleManager = () => {
|
|
|
29268
29268
|
break delete_effect;
|
|
29269
29269
|
}
|
|
29270
29270
|
if (candidateIsPlural) {
|
|
29271
|
-
if (!shouldRerunGetMany) {
|
|
29271
|
+
if (candidateVerb !== "GET" || !shouldRerunGetMany) {
|
|
29272
29272
|
break delete_effect;
|
|
29273
29273
|
}
|
|
29274
29274
|
actionsToRerun.add(actionCandidate);
|
|
@@ -29410,7 +29410,7 @@ const createResourceLifecycleManager = () => {
|
|
|
29410
29410
|
continue;
|
|
29411
29411
|
}
|
|
29412
29412
|
const instanceArray = dependentAction.matchAllSelfOrDescendant(
|
|
29413
|
-
(action) =>
|
|
29413
|
+
(action) => shouldAskAgain(action, triggeringAction),
|
|
29414
29414
|
);
|
|
29415
29415
|
for (const instance of instanceArray) {
|
|
29416
29416
|
actionsToRerun.add(instance);
|
|
@@ -29513,12 +29513,16 @@ const createResourceLifecycleManager = () => {
|
|
|
29513
29513
|
};
|
|
29514
29514
|
};
|
|
29515
29515
|
|
|
29516
|
-
// A read to ask again after a write: answered before it landed,
|
|
29517
|
-
//
|
|
29518
|
-
// would replace what the write put in the store (a rerun aborts it and asks
|
|
29519
|
-
// again). A
|
|
29520
|
-
|
|
29521
|
-
|
|
29516
|
+
// A read to ask again after a write: answered before it landed, still out, or
|
|
29517
|
+
// failed. An answer that left before the write is as stale as a completed one,
|
|
29518
|
+
// and would replace what the write put in the store (a rerun aborts it and asks
|
|
29519
|
+
// again). A failed read has no other way back: only a write asks it again.
|
|
29520
|
+
// A head start is its owner's to ask: findEffectOnActions resets one holding an
|
|
29521
|
+
// answer, and one that failed stays FAILED (see prerunAhead in route_action.js).
|
|
29522
|
+
const shouldAskAgain = (action, triggeringAction) =>
|
|
29523
|
+
(action.completed ||
|
|
29524
|
+
action.runningState === RUNNING ||
|
|
29525
|
+
(action.runningState === FAILED && !action.isPrerunSignal.peek())) &&
|
|
29522
29526
|
action !== triggeringAction;
|
|
29523
29527
|
// A write named in `writes` says for itself which reads of its own resource it
|
|
29524
29528
|
// reruns (`rerunOn: { GET_RANGE: true }`); a read it leaves out, and every read
|
|
@@ -42437,10 +42441,14 @@ const RouteTravel = ({
|
|
|
42437
42441
|
const pages = pagesRef.current;
|
|
42438
42442
|
const currentIndex = currentPageIndex(pages);
|
|
42439
42443
|
// Where the page of a window stands: the address, or where it last was for an
|
|
42440
|
-
// address the row has no place for.
|
|
42444
|
+
// address the row has no place for, while the row still has that column.
|
|
42441
42445
|
const liveIndexRef = useRef(0);
|
|
42442
42446
|
if (currentIndex !== -1) {
|
|
42443
42447
|
liveIndexRef.current = currentIndex;
|
|
42448
|
+
} else if (liveIndexRef.current >= pages.length) {
|
|
42449
|
+
// Past the row's end the page stands in a column of its own, off screen: a
|
|
42450
|
+
// still row does not scroll, and nothing scrolls a row to an address it lacks.
|
|
42451
|
+
liveIndexRef.current = pages.length === 0 ? 0 : pages.length - 1;
|
|
42444
42452
|
}
|
|
42445
42453
|
const liveIndex = liveIndexRef.current;
|
|
42446
42454
|
const latestRef = useRef(null);
|