@jsenv/navi 0.18.20 → 0.18.22
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/jsenv_navi.js +10 -0
- package/dist/jsenv_navi.js.map +3 -3
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -1375,6 +1375,7 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1375
1375
|
keepOldData = false,
|
|
1376
1376
|
meta = {},
|
|
1377
1377
|
|
|
1378
|
+
outputSignal,
|
|
1378
1379
|
completeSideEffect,
|
|
1379
1380
|
} = options;
|
|
1380
1381
|
if (!Object.hasOwn(options, "params")) {
|
|
@@ -1595,6 +1596,9 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1595
1596
|
writable: true,
|
|
1596
1597
|
value: name,
|
|
1597
1598
|
});
|
|
1599
|
+
// Register the action function itself so that createAction(action) returns
|
|
1600
|
+
// the same action instead of creating a new one
|
|
1601
|
+
actionWeakMap.set(action, action);
|
|
1598
1602
|
}
|
|
1599
1603
|
|
|
1600
1604
|
const callSource = generateActionCallSource(name, params);
|
|
@@ -1793,6 +1797,9 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1793
1797
|
valueSignal.value = value;
|
|
1794
1798
|
runningStateSignal.value = COMPLETED;
|
|
1795
1799
|
const data = dataSignal.value;
|
|
1800
|
+
if (outputSignal) {
|
|
1801
|
+
outputSignal.value = data;
|
|
1802
|
+
}
|
|
1796
1803
|
onComplete?.(data, action);
|
|
1797
1804
|
completeSideEffect?.(action);
|
|
1798
1805
|
});
|
|
@@ -1909,6 +1916,9 @@ const createAction = (callback, rootOptions = {}) => {
|
|
|
1909
1916
|
if (!keepOldData) {
|
|
1910
1917
|
valueSignal.value = valueInitial;
|
|
1911
1918
|
}
|
|
1919
|
+
if (outputSignal) {
|
|
1920
|
+
outputSignal.value = undefined;
|
|
1921
|
+
}
|
|
1912
1922
|
isPrerunSignal.value = true;
|
|
1913
1923
|
runningStateSignal.value = IDLE;
|
|
1914
1924
|
});
|