mobx-route 0.17.0 → 0.18.0
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/core/config/config.cjs
CHANGED
|
@@ -4,7 +4,6 @@ exports.routeConfig = void 0;
|
|
|
4
4
|
const mobx_location_history_1 = require("mobx-location-history");
|
|
5
5
|
const complex_1 = require("yummies/complex");
|
|
6
6
|
let localHistory;
|
|
7
|
-
let localQueryParams;
|
|
8
7
|
exports.routeConfig = (0, complex_1.createGlobalDynamicConfig)((update) => {
|
|
9
8
|
if (localHistory && update?.history && (0, mobx_location_history_1.isObservableHistory)(localHistory)) {
|
|
10
9
|
localHistory.destroy();
|
|
@@ -18,20 +17,14 @@ exports.routeConfig = (0, complex_1.createGlobalDynamicConfig)((update) => {
|
|
|
18
17
|
}
|
|
19
18
|
let queryParams;
|
|
20
19
|
if (update?.history && !update.queryParams) {
|
|
21
|
-
|
|
22
|
-
localQueryParams.destroy();
|
|
23
|
-
}
|
|
24
|
-
queryParams = localQueryParams = new mobx_location_history_1.QueryParams({ history });
|
|
20
|
+
queryParams = new mobx_location_history_1.QueryParams({ history });
|
|
25
21
|
}
|
|
26
22
|
else {
|
|
27
|
-
if (localQueryParams && update?.queryParams) {
|
|
28
|
-
localQueryParams.destroy();
|
|
29
|
-
}
|
|
30
23
|
if (update?.queryParams) {
|
|
31
24
|
queryParams = update.queryParams;
|
|
32
25
|
}
|
|
33
26
|
else {
|
|
34
|
-
queryParams =
|
|
27
|
+
queryParams = new mobx_location_history_1.QueryParams({ history });
|
|
35
28
|
}
|
|
36
29
|
}
|
|
37
30
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/config/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA0B;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/config/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA0B;AAI3D,eAAO,MAAM,WAAW;;;;CAiCvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/config/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/config/config.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B;AAI3D,eAAO,MAAM,WAAW;;;;CAiCvB,CAAC"}
|
package/core/config/config.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createBrowserHistory, isObservableHistory, QueryParams, } from 'mobx-location-history';
|
|
2
2
|
import { createGlobalDynamicConfig } from 'yummies/complex';
|
|
3
3
|
let localHistory;
|
|
4
|
-
let localQueryParams;
|
|
5
4
|
export const routeConfig = createGlobalDynamicConfig((update) => {
|
|
6
5
|
if (localHistory && update?.history && isObservableHistory(localHistory)) {
|
|
7
6
|
localHistory.destroy();
|
|
@@ -15,20 +14,14 @@ export const routeConfig = createGlobalDynamicConfig((update) => {
|
|
|
15
14
|
}
|
|
16
15
|
let queryParams;
|
|
17
16
|
if (update?.history && !update.queryParams) {
|
|
18
|
-
|
|
19
|
-
localQueryParams.destroy();
|
|
20
|
-
}
|
|
21
|
-
queryParams = localQueryParams = new QueryParams({ history });
|
|
17
|
+
queryParams = new QueryParams({ history });
|
|
22
18
|
}
|
|
23
19
|
else {
|
|
24
|
-
if (localQueryParams && update?.queryParams) {
|
|
25
|
-
localQueryParams.destroy();
|
|
26
|
-
}
|
|
27
20
|
if (update?.queryParams) {
|
|
28
21
|
queryParams = update.queryParams;
|
|
29
22
|
}
|
|
30
23
|
else {
|
|
31
|
-
queryParams =
|
|
24
|
+
queryParams = new QueryParams({ history });
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
27
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobx-route",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"mobx",
|
|
6
6
|
"react",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"linked-abort-controller": "^1.1.0",
|
|
26
|
-
"mobx-location-history": "^
|
|
26
|
+
"mobx-location-history": "^9.1.1",
|
|
27
27
|
"path-to-regexp": "^8.2.0",
|
|
28
28
|
"react-simple-loadable": "^2.3.8",
|
|
29
29
|
"yummies": "^6.0.0"
|