@evlop/commons 1.0.86 → 1.0.87
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/hooks/useNavigator.app.d.ts.map +1 -1
- package/dist/src/hooks/useNavigator.app.js +2 -1
- package/dist/src/hooks/useNavigator.app.js.map +1 -1
- package/dist/src/hooks/useNavigator.d.ts.map +1 -1
- package/dist/src/hooks/useNavigator.js +2 -3
- package/dist/src/hooks/useNavigator.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.app.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,
|
1
|
+
{"version":3,"file":"useNavigator.app.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,WAYxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -11,7 +11,8 @@ const useNavigator = () => {
|
|
11
11
|
const navigation = native_1.useNavigation();
|
12
12
|
const route = native_1.useRoute();
|
13
13
|
const dispatch = react_redux_1.useDispatch();
|
14
|
-
|
14
|
+
const navigator = react_1.useRef({});
|
15
|
+
return react_1.useMemo(() => lodash_1.assign(navigator.current, navigation, {
|
15
16
|
getParam: (name) => lodash_1.get(route.params, name),
|
16
17
|
openPage: (pageId, params) => navigation.push(dispatch(reducers_1.getPageRouteName(pageId)), params),
|
17
18
|
openRoute: (route) => navigation.push(dispatch(reducers_1.getPageRouteName(route))),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.app.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":";;;AAAA,qDAAsF;AACtF,mCAAqC;AACrC,
|
1
|
+
{"version":3,"file":"useNavigator.app.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.app.tsx"],"names":[],"mappings":";;;AAAA,qDAAsF;AACtF,mCAAqC;AACrC,iCAAwC;AACxC,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ator.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,
|
1
|
+
{"version":3,"file":"useNavigator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,WAwBxB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAe,CAAC"}
|
@@ -16,10 +16,10 @@ const useNavigator = () => {
|
|
16
16
|
const { state, search, hash, pathname } = react_router_1.useLocation();
|
17
17
|
const dispatch = react_redux_1.useDispatch();
|
18
18
|
const navigator = react_1.useRef({});
|
19
|
-
react_1.
|
19
|
+
return react_1.useMemo(() => {
|
20
20
|
const allParams = params;
|
21
21
|
const queryParams = query_string_1.default.parse(search);
|
22
|
-
lodash_1.assign(navigator.current, history, {
|
22
|
+
return lodash_1.assign(navigator.current, history, {
|
23
23
|
pop: history.back,
|
24
24
|
navigate: (name, params) => history.push(dispatch(reducers_1.getPagePath(name, params))),
|
25
25
|
openPage: (name, params) => history.push(dispatch(reducers_1.getPagePath(name, params))),
|
@@ -33,7 +33,6 @@ const useNavigator = () => {
|
|
33
33
|
})
|
34
34
|
});
|
35
35
|
}, [params, history, pathname, hash, search, state]);
|
36
|
-
return navigator.current;
|
37
36
|
};
|
38
37
|
exports.useNavigator = useNavigator;
|
39
38
|
exports.useNavigation = exports.useNavigator;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNavigator.js","sourceRoot":"","sources":["../../../src/hooks/useNavigator.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAgC;AAChC,iCAAmD;AACnD,6CAA0C;AAC1C,gEAAuC;AACvC,+CAAkE;AAClE,0CAA0C;AAEnC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,MAAM,MAAM,GAAG,wBAAS,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAG,yBAAU,EAAE,CAAC;IAC7B,MAAM,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAC,GAAG,0BAAW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