@bigbinary/neeto-commons-frontend 2.0.102 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "2.0.102",
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>",
@@ -4189,11 +4189,19 @@ var useCheckpointStore = create$1(withImmutableActions(function (set) {
4189
4189
  }
4190
4190
  };
4191
4191
  }));
4192
- var useRegisterNavigationCheckpoint = function useRegisterNavigationCheckpoint() {
4193
- return useCheckpointStore(ramda.prop("setCheckpoint"));
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 useNavigationCheckpoint = function useNavigationCheckpoint(key) {
4196
- return useCheckpointStore(ramda.path(["checkpoints", key]));
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.useNavigationCheckpoint = useNavigationCheckpoint;
4762
+ exports.useNavigationCheckpoints = useNavigationCheckpoints;
4755
4763
  exports.useOnClickOutside = useOnClickOutside;
4756
4764
  exports.usePrevious = usePrevious;
4757
4765
  exports.useRegisterNavigationCheckpoint = useRegisterNavigationCheckpoint;