@bigbinary/neeto-commons-frontend 2.0.103 → 2.0.104
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/README.md +1 -1
- package/package.json +1 -1
- package/react-utils.cjs.js +13 -5
- package/react-utils.cjs.js.map +1 -1
- package/react-utils.d.ts +10 -18
- package/react-utils.js +14 -6
- package/react-utils.js.map +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ Category
|
|
|
53
53
|
- [useHotKeys](./docs/react/hooks.md#usehotkeys)
|
|
54
54
|
- [useTimer](./docs/react/hooks.md#usetimer)
|
|
55
55
|
- [useRegisterNavigationCheckpoint](./docs/react/hooks.md#useregisternavigationcheckpoint)
|
|
56
|
-
- [
|
|
56
|
+
- [useNavigationCheckpoints](./docs/react/hooks.md#usenavigationcheckpoints)
|
|
57
57
|
- [useStateWithDependency](./docs/react/hooks.md#usestatewithdependency)
|
|
58
58
|
- [withImmutableActions](./docs/react/utils.md#withimmutableactions)
|
|
59
59
|
- [withTitle](./docs/react/utils.md#withtitle)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.104",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
package/react-utils.cjs.js
CHANGED
|
@@ -4189,11 +4189,19 @@ var useCheckpointStore = create$1(withImmutableActions(function (set) {
|
|
|
4189
4189
|
}
|
|
4190
4190
|
};
|
|
4191
4191
|
}));
|
|
4192
|
-
var useRegisterNavigationCheckpoint = function useRegisterNavigationCheckpoint() {
|
|
4193
|
-
|
|
4192
|
+
var useRegisterNavigationCheckpoint = function useRegisterNavigationCheckpoint(key, path) {
|
|
4193
|
+
var setCheckpoint = useCheckpointStore(ramda.prop("setCheckpoint"));
|
|
4194
|
+
React.useEffect(function () {
|
|
4195
|
+
setCheckpoint(key, path);
|
|
4196
|
+
}, [key, path]);
|
|
4194
4197
|
};
|
|
4195
|
-
var
|
|
4196
|
-
|
|
4198
|
+
var useNavigationCheckpoints = function useNavigationCheckpoints() {
|
|
4199
|
+
for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4200
|
+
keys[_key] = arguments[_key];
|
|
4201
|
+
}
|
|
4202
|
+
return useCheckpointStore(function (store) {
|
|
4203
|
+
return ramda.pick(keys, store.checkpoints);
|
|
4204
|
+
}, shallow);
|
|
4197
4205
|
};
|
|
4198
4206
|
|
|
4199
4207
|
var useStateWithDependency = function useStateWithDependency(defaultValue) {
|
|
@@ -4751,7 +4759,7 @@ exports.useHotKeys = useHotKeys;
|
|
|
4751
4759
|
exports.useIsElementVisibleInDom = useIsElementVisibleInDom;
|
|
4752
4760
|
exports.useKeyboardShortcutsPaneState = useKeyboardShortcutsPaneState;
|
|
4753
4761
|
exports.useLocalStorage = useLocalStorage;
|
|
4754
|
-
exports.
|
|
4762
|
+
exports.useNavigationCheckpoints = useNavigationCheckpoints;
|
|
4755
4763
|
exports.useOnClickOutside = useOnClickOutside;
|
|
4756
4764
|
exports.usePrevious = usePrevious;
|
|
4757
4765
|
exports.useRegisterNavigationCheckpoint = useRegisterNavigationCheckpoint;
|