@equinor/fusion-framework-module-navigation 7.0.0-next.2 → 7.0.1

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +42 -19
  2. package/README.md +97 -614
  3. package/dist/esm/NavigationConfigurator.js +29 -6
  4. package/dist/esm/NavigationConfigurator.js.map +1 -1
  5. package/dist/esm/NavigationProvider.js +57 -23
  6. package/dist/esm/NavigationProvider.js.map +1 -1
  7. package/dist/esm/events.js +20 -3
  8. package/dist/esm/events.js.map +1 -1
  9. package/dist/esm/index.js +23 -0
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/lib/BaseHistory.js +23 -6
  12. package/dist/esm/lib/BaseHistory.js.map +1 -1
  13. package/dist/esm/lib/BrowserHistoryStack.js +5 -6
  14. package/dist/esm/lib/BrowserHistoryStack.js.map +1 -1
  15. package/dist/esm/lib/MemoryHistory.js +13 -6
  16. package/dist/esm/lib/MemoryHistory.js.map +1 -1
  17. package/dist/esm/lib/MemoryStack.js +1 -0
  18. package/dist/esm/lib/MemoryStack.js.map +1 -1
  19. package/dist/esm/lib/ProxyHistory.js +114 -0
  20. package/dist/esm/lib/ProxyHistory.js.map +1 -0
  21. package/dist/esm/lib/create-history.js +7 -13
  22. package/dist/esm/lib/create-history.js.map +1 -1
  23. package/dist/esm/lib/index.js +10 -0
  24. package/dist/esm/lib/index.js.map +1 -1
  25. package/dist/esm/lib/state/history.flows.js +7 -12
  26. package/dist/esm/lib/state/history.flows.js.map +1 -1
  27. package/dist/esm/lib/state/history.reducer.js +8 -4
  28. package/dist/esm/lib/state/history.reducer.js.map +1 -1
  29. package/dist/esm/lib/state/history.state.js +9 -3
  30. package/dist/esm/lib/state/history.state.js.map +1 -1
  31. package/dist/esm/lib/utils/resolve-browser-location.js +2 -2
  32. package/dist/esm/lib/utils/resolve-browser-location.js.map +1 -1
  33. package/dist/esm/module.js +4 -4
  34. package/dist/esm/version.js +1 -1
  35. package/dist/esm/version.js.map +1 -1
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/dist/types/NavigationConfigurator.d.ts +10 -1
  38. package/dist/types/NavigationConfigurator.interface.d.ts +25 -5
  39. package/dist/types/NavigationProvider.d.ts +57 -23
  40. package/dist/types/NavigationProvider.interface.d.ts +20 -7
  41. package/dist/types/events.d.ts +20 -3
  42. package/dist/types/index.d.ts +24 -1
  43. package/dist/types/lib/BaseHistory.d.ts +23 -6
  44. package/dist/types/lib/BrowserHistoryStack.d.ts +5 -6
  45. package/dist/types/lib/MemoryHistory.d.ts +5 -5
  46. package/dist/types/lib/ProxyHistory.d.ts +68 -0
  47. package/dist/types/lib/create-history.d.ts +7 -13
  48. package/dist/types/lib/index.d.ts +10 -0
  49. package/dist/types/lib/state/history.flows.d.ts +6 -11
  50. package/dist/types/lib/state/history.reducer.d.ts +8 -4
  51. package/dist/types/lib/state/history.state.d.ts +9 -3
  52. package/dist/types/lib/types.d.ts +39 -8
  53. package/dist/types/version.d.ts +1 -1
  54. package/package.json +12 -13
  55. package/src/NavigationConfigurator.interface.ts +28 -5
  56. package/src/NavigationConfigurator.ts +47 -15
  57. package/src/NavigationProvider.interface.ts +20 -7
  58. package/src/NavigationProvider.ts +57 -23
  59. package/src/__tests__/ProxyHistory.test.ts +149 -0
  60. package/src/events.ts +20 -3
  61. package/src/index.ts +25 -1
  62. package/src/lib/BaseHistory.ts +23 -6
  63. package/src/lib/BrowserHistoryStack.ts +5 -6
  64. package/src/lib/MemoryHistory.ts +13 -6
  65. package/src/lib/MemoryStack.ts +1 -0
  66. package/src/lib/ProxyHistory.ts +144 -0
  67. package/src/lib/create-history.ts +7 -13
  68. package/src/lib/index.ts +11 -0
  69. package/src/lib/state/history.flows.ts +7 -12
  70. package/src/lib/state/history.reducer.ts +8 -4
  71. package/src/lib/state/history.state.ts +9 -3
  72. package/src/lib/types.ts +39 -8
  73. package/src/lib/utils/resolve-browser-location.ts +2 -2
  74. package/src/module.ts +4 -4
  75. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,29 +1,40 @@
1
1
  # Change Log
2
2
 
3
- ## 7.0.0-next.2
3
+ ## 7.0.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78) Thanks [@odinr](https://github.com/odinr)! - relase next
7
+ - e97bba0: Add `ProxyHistory` to prevent shared `BrowserHistory` disposal when child apps tear down.
8
8
 
9
- - Updated dependencies [[`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78)]:
10
- - @equinor/fusion-observable@8.5.9-next.0
11
- - @equinor/fusion-framework-module@5.0.7-next.0
9
+ When a child app inherits the portal's history via `NavigationConfigurator`, the history is now
10
+ wrapped in a `ProxyHistory` that delegates all operations but keeps its own listener/blocker
11
+ teardown list. Disposing the proxy only cleans up proxy-owned subscriptions — the underlying
12
+ history remains intact.
12
13
 
13
- ## 6.0.1
14
+ `setHistory()` gains an optional `{ proxy }` flag (default: `true`) to control wrapping behavior.
14
15
 
15
- ### Patch Changes
16
+ Fixes: https://github.com/equinor/fusion-core-tasks/issues/1016
16
17
 
17
- - [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
18
+ ## 7.0.0
18
19
 
19
- - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
20
- - @equinor/fusion-framework-module@5.0.6
20
+ ### Major Changes
21
21
 
22
- ## 7.0.0-next.1
22
+ - abffa53: Major version bump for Fusion Framework React 19 release.
23
23
 
24
- ### Major Changes
24
+ All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
25
+
26
+ **Breaking changes:**
27
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
28
+ - React Router upgraded from v6 to v7
29
+ - Navigation module refactored with new history API
30
+ - `renderComponent` and `renderApp` now use `createRoot` API
31
+
32
+ **Migration:**
33
+ - Update your React version to 18.0.0 or higher before upgrading
34
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
35
+ - See individual package changelogs for package-specific migration steps
25
36
 
26
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8) Thanks [@odinr](https://github.com/odinr)! - Complete refactor of navigation module architecture with React Router v7 upgrade, improved state management, and history implementations.
37
+ - abffa53: Complete refactor of navigation module architecture with React Router v7 upgrade, improved state management, and history implementations.
27
38
 
28
39
  **Breaking Changes:**
29
40
  1. **Upgraded to React Router v7**: `@remix-run/router` upgraded from v1.8.0 to v1.23.0 for React Router v7 compatibility
@@ -33,7 +44,7 @@
33
44
 
34
45
  ```typescript
35
46
  // Example: Type assertions required with React Router v7
36
- import { RouterProvider } from 'react-router-dom';
47
+ import { RouterProvider } from 'react-router';
37
48
  import { useRouter } from '@equinor/fusion-framework-react-app/navigation';
38
49
 
39
50
  export default function Router() {
@@ -60,6 +71,8 @@
60
71
  const history = navigation.history;
61
72
  ```
62
73
 
74
+ 6. **`NavigationProvider.createRouter` deprecated**: Use `@equinor/fusion-framework-react-router` instead. The method now emits a deprecation warning via telemetry when called.
75
+
63
76
  **New Features:**
64
77
  - Added `NavigationProvider` and `INavigationProvider` exports
65
78
  - Added `enableNavigation` helper function for easier configuration
@@ -78,7 +91,7 @@
78
91
 
79
92
  ### Minor Changes
80
93
 
81
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8) Thanks [@odinr](https://github.com/odinr)! - Deprecate `NavigationProvider.createRouter` method in favor of `@equinor/fusion-framework-react-router`.
94
+ - abffa53: Deprecate `NavigationProvider.createRouter` method in favor of `@equinor/fusion-framework-react-router`.
82
95
 
83
96
  The `createRouter` method now emits a deprecation warning via telemetry when called. Applications should migrate to using `@equinor/fusion-framework-react-router` for new route definitions.
84
97
 
@@ -86,11 +99,21 @@
86
99
 
87
100
  ### Patch Changes
88
101
 
89
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b) Thanks [@odinr](https://github.com/odinr)! - relase next
102
+ - Updated dependencies [abffa53]
103
+ - Updated dependencies [abffa53]
104
+ - Updated dependencies [abffa53]
105
+ - Updated dependencies [abffa53]
106
+ - @equinor/fusion-framework-module@6.0.0
107
+ - @equinor/fusion-observable@9.0.0
108
+
109
+ ## 6.0.1
110
+
111
+ ### Patch Changes
90
112
 
91
- - Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b), [`d252b0d`](https://github.com/equinor/fusion-framework/commit/d252b0d442b7c8c1b50bf2768cf9ecbbb55a76f8), [`9f7597e`](https://github.com/equinor/fusion-framework/commit/9f7597ee237ef069dc24cbe39c73b5b26db157dd), [`75c068f`](https://github.com/equinor/fusion-framework/commit/75c068fea13c32435ac26bd9043cc156482bfaf1)]:
92
- - @equinor/fusion-observable@9.0.0-next.0
93
- - @equinor/fusion-framework-module@5.0.6-next.0
113
+ - [#4157](https://github.com/equinor/fusion-framework/pull/4157) [`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581) Thanks [@Noggling](https://github.com/Noggling)! - Internal: patch release to align TypeScript types across packages for consistent type compatibility.
114
+
115
+ - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
116
+ - @equinor/fusion-framework-module@5.0.6
94
117
 
95
118
  ## 6.0.0
96
119