@equinor/fusion-framework-react-module 4.0.0-next-663bed8344cc2ca0111705b05045173328b3104d → 4.0.0-next.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/CHANGELOG.md CHANGED
@@ -1,177 +1,286 @@
1
1
  # Change Log
2
2
 
3
- ## 4.0.0-next-663bed8344cc2ca0111705b05045173328b3104d
3
+ ## 4.0.0-next.0
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - [#2510](https://github.com/equinor/fusion-framework/pull/2510) [`663bed8`](https://github.com/equinor/fusion-framework/commit/663bed8344cc2ca0111705b05045173328b3104d) Thanks [@eikeland](https://github.com/eikeland)! - BREAKING_CHANGE: all fusion-framework modules are now defiend as type module.
7
+ - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`9f7597e`](https://github.com/equinor/fusion-framework/commit/9f7597ee237ef069dc24cbe39c73b5b26db157dd) Thanks [@odinr](https://github.com/odinr)! - Require React 18+ as peer dependency. React 17 is no longer supported.
8
8
 
9
- > [!WARNING]
10
- > This will introduce breaking changes to the consumption of fusion-framework moduels.
9
+ **Migration:** Update your application to React 18+ to continue using these packages.
10
+
11
+ Closes https://github.com/equinor/fusion-framework/issues/3504
12
+
13
+ - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`75c068f`](https://github.com/equinor/fusion-framework/commit/75c068fea13c32435ac26bd9043cc156482bfaf1) Thanks [@odinr](https://github.com/odinr)! - Upgrade to React 19 and remove support for React versions lower than 18.
14
+
15
+ **Breaking changes:**
16
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
17
+ - React 16 and 17 are no longer supported
18
+ - Dev dependencies upgraded to React 19.2.1 and @types/react 19.2.7
19
+
20
+ **Migration:**
21
+ - Update your React version to 18.0.0 or higher before upgrading these packages
22
+ - If using React 16 or 17, upgrade to React 18 or 19 first
23
+
24
+ ### Minor Changes
25
+
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)! - Add type exports for better TypeScript support and tree-shaking.
27
+
28
+ The following types are now exported from `@equinor/fusion-framework-react-module`:
29
+ - `Modules`
30
+ - `ModulesInstanceType`
31
+ - `AnyModule`
32
+ - `ModulesInstance`
33
+
34
+ ```typescript
35
+ import type {
36
+ Modules,
37
+ ModulesInstanceType,
38
+ } from "@equinor/fusion-framework-react-module";
39
+ ```
11
40
 
12
41
  ### Patch Changes
13
42
 
14
- - Updated dependencies [[`663bed8`](https://github.com/equinor/fusion-framework/commit/663bed8344cc2ca0111705b05045173328b3104d)]:
15
- - @equinor/fusion-framework-module@5.0.0-next-663bed8344cc2ca0111705b05045173328b3104d
43
+ - [#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
44
+
45
+ - Updated dependencies [[`265bb76`](https://github.com/equinor/fusion-framework/commit/265bb767249989eeb1971e83f3fba94879e0813b)]:
46
+ - @equinor/fusion-framework-module@5.0.6-next.0
47
+
48
+ ## 3.1.13
49
+
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [[`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253)]:
53
+ - @equinor/fusion-framework-module@5.0.0
54
+
55
+ ## 3.1.13-next.2
56
+
57
+ ### Patch Changes
58
+
59
+ - [#3137](https://github.com/equinor/fusion-framework/pull/3137) [`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461) Thanks [@odinr](https://github.com/odinr)! - updates from main
60
+
61
+ - [#3075](https://github.com/equinor/fusion-framework/pull/3075) [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128) Thanks [@odinr](https://github.com/odinr)! - merge with main
62
+
63
+ - Updated dependencies [[`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461), [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128)]:
64
+ - @equinor/fusion-framework-module@4.4.3-next.2
65
+
66
+ ## 3.1.13-next.1
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies [[`bbda62d`](https://github.com/equinor/fusion-framework/commit/bbda62def35c8e8b742d90459680f7199c4ece0f)]:
71
+ - @equinor/fusion-framework-module@4.4.3-next.1
72
+
73
+ ## 3.1.13-next.0
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [[`53ef326`](https://github.com/equinor/fusion-framework/commit/53ef32633ce1c050e20614f1343148327a40b2e6)]:
78
+ - @equinor/fusion-framework-module@4.4.3-next.0
79
+
80
+ ## 3.1.12
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [[`96bb1fb`](https://github.com/equinor/fusion-framework/commit/96bb1fb744d8dc2410e99fea6ca948d2d5489428)]:
85
+ - @equinor/fusion-framework-module@4.4.2
86
+
87
+ ## 3.1.11
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [[`e49f916`](https://github.com/equinor/fusion-framework/commit/e49f9161557202df57248d02ade4d2ef50231bdc), [`c6af3a3`](https://github.com/equinor/fusion-framework/commit/c6af3a3c926fb245e9d056b506d47b8bf4f1efde)]:
92
+ - @equinor/fusion-framework-module@4.4.1
93
+
94
+ ## 3.1.10
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [[`efd70a3`](https://github.com/equinor/fusion-framework/commit/efd70a34f734e0c155d3440e35ce4fa11a7abc42)]:
99
+ - @equinor/fusion-framework-module@4.4.0
100
+
101
+ ## 3.1.9
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies [[`f53b60b`](https://github.com/equinor/fusion-framework/commit/f53b60b7805706ce7617e614f0ac0c24317a2e43)]:
106
+ - @equinor/fusion-framework-module@4.3.8
107
+
108
+ ## 3.1.8
109
+
110
+ ### Patch Changes
111
+
112
+ - [#2885](https://github.com/equinor/fusion-framework/pull/2885) [`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update he `Typescript` version `^5.7.3` to `^5.8.2`
113
+
114
+ - Updated dependencies [[`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237)]:
115
+ - @equinor/fusion-framework-module@4.3.7
116
+
117
+ ## 3.1.7
118
+
119
+ ### Patch Changes
120
+
121
+ - [#2855](https://github.com/equinor/fusion-framework/pull/2855) [`811f1a0`](https://github.com/equinor/fusion-framework/commit/811f1a0139ff4d1b0c3fba1ec2b77cc84ba080d1) Thanks [@odinr](https://github.com/odinr)! - Conformed to Biome `linter.correctness.useExhaustiveDependencies`
122
+
123
+ - [#2848](https://github.com/equinor/fusion-framework/pull/2848) [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d) Thanks [@odinr](https://github.com/odinr)! - Refactored imports to use `type` when importing types from a module, to conform with the `useImportType` rule in Biome.
124
+
125
+ - Updated dependencies [[`ba5d12e`](https://github.com/equinor/fusion-framework/commit/ba5d12eba0a38db412353765e997d02c1fbb478d), [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d)]:
126
+ - @equinor/fusion-framework-module@4.3.6
16
127
 
17
128
  ## 3.1.6
18
129
 
19
130
  ### Patch Changes
20
131
 
21
- - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
22
- - @equinor/fusion-framework-module@4.3.5
132
+ - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
133
+ - @equinor/fusion-framework-module@4.3.5
23
134
 
24
135
  ## 3.1.5
25
136
 
26
137
  ### Patch Changes
27
138
 
28
- - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
29
- - @equinor/fusion-framework-module@4.3.4
139
+ - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
140
+ - @equinor/fusion-framework-module@4.3.4
30
141
 
31
142
  ## 3.1.4
32
143
 
33
144
  ### Patch Changes
34
145
 
35
- - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
36
- - @equinor/fusion-framework-module@4.3.3
146
+ - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
147
+ - @equinor/fusion-framework-module@4.3.3
37
148
 
38
149
  ## 3.1.3
39
150
 
40
151
  ### Patch Changes
41
152
 
42
- - [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
43
-
44
- - [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
153
+ - [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
45
154
 
46
- Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
155
+ - [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
47
156
 
48
- 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
49
- 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
50
- 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
157
+ Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
158
+ 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
159
+ 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
160
+ 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
51
161
 
52
- No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
162
+ No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
53
163
 
54
- Before:
164
+ Before:
55
165
 
56
- ```json
57
- {
58
- "compilerOptions": {
59
- "module": "ES2022",
60
- "target": "ES6",
61
- "incremental": true,
62
- "removeComments": true,
63
- "preserveConstEnums": true,
64
- "sourceMap": true,
65
- "moduleResolution": "node"
66
- }
166
+ ```json
167
+ {
168
+ "compilerOptions": {
169
+ "module": "ES2022",
170
+ "target": "ES6",
171
+ "incremental": true,
172
+ "removeComments": true,
173
+ "preserveConstEnums": true,
174
+ "sourceMap": true,
175
+ "moduleResolution": "node"
67
176
  }
68
- ```
69
-
70
- After:
71
-
72
- ```json
73
- {
74
- "compilerOptions": {
75
- "module": "ES2022",
76
- "target": "ES6",
77
- "incremental": true,
78
- "preserveConstEnums": true,
79
- "sourceMap": true,
80
- "moduleResolution": "node"
81
- }
177
+ }
178
+ ```
179
+
180
+ After:
181
+
182
+ ```json
183
+ {
184
+ "compilerOptions": {
185
+ "module": "ES2022",
186
+ "target": "ES6",
187
+ "incremental": true,
188
+ "preserveConstEnums": true,
189
+ "sourceMap": true,
190
+ "moduleResolution": "node"
82
191
  }
83
- ```
192
+ }
193
+ ```
84
194
 
85
- This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
195
+ This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
86
196
 
87
- - Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
88
- - @equinor/fusion-framework-module@4.3.2
197
+ - Updated dependencies [[`2f74edc`](https://github.com/equinor/fusion-framework/commit/2f74edcd4a3ea2b87d69f0fd63492145c3c01663), [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
198
+ - @equinor/fusion-framework-module@4.3.2
89
199
 
90
200
  ## 3.1.2
91
201
 
92
202
  ### Patch Changes
93
203
 
94
- - Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
95
- - @equinor/fusion-framework-module@4.3.1
204
+ - Updated dependencies [[`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2), [`fb424be`](https://github.com/equinor/fusion-framework/commit/fb424be24ad9349d01daef91a01c464d7b1413d2)]:
205
+ - @equinor/fusion-framework-module@4.3.1
96
206
 
97
207
  ## 3.1.1
98
208
 
99
209
  ### Patch Changes
100
210
 
101
- - [#1981](https://github.com/equinor/fusion-framework/pull/1981) [`3d068b5`](https://github.com/equinor/fusion-framework/commit/3d068b5a7b214b62fcae5546f08830ea90f872dc) Thanks [@eikeland](https://github.com/eikeland)! - Align package exports with node10+ documentation.
211
+ - [#1981](https://github.com/equinor/fusion-framework/pull/1981) [`3d068b5`](https://github.com/equinor/fusion-framework/commit/3d068b5a7b214b62fcae5546f08830ea90f872dc) Thanks [@eikeland](https://github.com/eikeland)! - Align package exports with node10+ documentation.
102
212
 
103
213
  ## 3.1.0
104
214
 
105
215
  ### Minor Changes
106
216
 
107
- - [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
217
+ - [#1953](https://github.com/equinor/fusion-framework/pull/1953) [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904) Thanks [@odinr](https://github.com/odinr)! - updated typescript to 5.4.2
108
218
 
109
219
  ### Patch Changes
110
220
 
111
- - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
112
- - @equinor/fusion-framework-module@4.3.0
221
+ - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
222
+ - @equinor/fusion-framework-module@4.3.0
113
223
 
114
224
  ## 3.0.8
115
225
 
116
226
  ### Patch Changes
117
227
 
118
- - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
119
- - @equinor/fusion-framework-module@4.2.7
228
+ - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
229
+ - @equinor/fusion-framework-module@4.2.7
120
230
 
121
231
  ## 3.0.7
122
232
 
123
233
  ### Patch Changes
124
234
 
125
- - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
126
- - @equinor/fusion-framework-module@4.2.6
235
+ - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
236
+ - @equinor/fusion-framework-module@4.2.6
127
237
 
128
238
  ## 3.0.6
129
239
 
130
240
  ### Patch Changes
131
241
 
132
- - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
242
+ - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
133
243
 
134
- - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
135
- - @equinor/fusion-framework-module@4.2.5
244
+ - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
245
+ - @equinor/fusion-framework-module@4.2.5
136
246
 
137
247
  ## 3.0.5
138
248
 
139
249
  ### Patch Changes
140
250
 
141
- - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
142
- - @equinor/fusion-framework-module@4.2.4
251
+ - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
252
+ - @equinor/fusion-framework-module@4.2.4
143
253
 
144
254
  ## 3.0.4
145
255
 
146
256
  ### Patch Changes
147
257
 
148
- - [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
258
+ - [#1109](https://github.com/equinor/fusion-framework/pull/1109) [`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862) Thanks [@odinr](https://github.com/odinr)! - Change packaged manager from yarn to pnpm
149
259
 
150
- conflicts of `@types/react` made random outcomes when using `yarn`
260
+ conflicts of `@types/react` made random outcomes when using `yarn`
151
261
 
152
- this change should not affect consumer of the packages, but might conflict dependent on local package manager.
262
+ this change should not affect consumer of the packages, but might conflict dependent on local package manager.
153
263
 
154
- - [#1125](https://github.com/equinor/fusion-framework/pull/1125) [`2dccccd1`](https://github.com/equinor/fusion-framework/commit/2dccccd124fbe3cdde2132c29c27d3da9fc6f1f5) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump react and @types/react to react 18.2
264
+ - [#1125](https://github.com/equinor/fusion-framework/pull/1125) [`2dccccd1`](https://github.com/equinor/fusion-framework/commit/2dccccd124fbe3cdde2132c29c27d3da9fc6f1f5) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump react and @types/react to react 18.2
155
265
 
156
- only dev deps updated should not affect any consumers
266
+ only dev deps updated should not affect any consumers
157
267
 
158
- see [react changelog](https://github.com/facebook/react/releases) for details
268
+ see [react changelog](https://github.com/facebook/react/releases) for details
159
269
 
160
- - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
161
- - @equinor/fusion-framework-module@4.2.3
270
+ - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
271
+ - @equinor/fusion-framework-module@4.2.3
162
272
 
163
273
  ## 3.0.3
164
274
 
165
275
  ### Patch Changes
166
276
 
167
- - [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
168
-
169
- - align all versions of typescript
170
- - update types to build
171
- - a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
277
+ - [#905](https://github.com/equinor/fusion-framework/pull/905) [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c) Thanks [@odinr](https://github.com/odinr)! - **🚧 Chore: dedupe packages**
278
+ - align all versions of typescript
279
+ - update types to build
280
+ - a couple of typecasts did not [satisfies](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#satisfies-support-in-jsdoc) and was recasted as `unknwon`, marked with `TODO`, should be fixed in future
172
281
 
173
- - Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
174
- - @equinor/fusion-framework-module@4.2.0
282
+ - Updated dependencies [[`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`76b30c1e`](https://github.com/equinor/fusion-framework/commit/76b30c1e86db3db18adbe759bb1e39885de1c898), [`83ee5abf`](https://github.com/equinor/fusion-framework/commit/83ee5abf7bcab193c85980e5ae44895cd7f6f08d), [`7500ec2c`](https://github.com/equinor/fusion-framework/commit/7500ec2c9ca9b926a19539fc97c61c67f76fc8d9), [`060818eb`](https://github.com/equinor/fusion-framework/commit/060818eb04ebb9ed6deaed1f0b4530201b1181cf), [`3efbf0bb`](https://github.com/equinor/fusion-framework/commit/3efbf0bb93fc11aa158872cd6ab98a22bcfb59e5), [`a7858a1c`](https://github.com/equinor/fusion-framework/commit/a7858a1c01542e2dc94370709f122b4b99c3219c)]:
283
+ - @equinor/fusion-framework-module@4.2.0
175
284
 
176
285
  All notable changes to this project will be documented in this file.
177
286
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
@@ -216,7 +325,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
216
325
 
217
326
  ### Features
218
327
 
219
- - update typing of useModule hook ([958dd04](https://github.com/equinor/fusion-framework/commit/958dd0401667e9ebb1a51bced128ae43369cd6c4))
328
+ - update typing of useModule hook ([958dd04](https://github.com/equinor/fusion-framework/commit/958dd0401667e9ebb1a51bced128ae43369cd6c4))
220
329
 
221
330
  ## 1.0.15 (2022-11-11)
222
331
 
@@ -270,7 +379,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
270
379
 
271
380
  ### Bug Fixes
272
381
 
273
- - update typings and linting ([7d2056b](https://github.com/equinor/fusion-framework/commit/7d2056b7866850b7efdfd4567385b5dbbcdf8761))
382
+ - update typings and linting ([7d2056b](https://github.com/equinor/fusion-framework/commit/7d2056b7866850b7efdfd4567385b5dbbcdf8761))
274
383
 
275
384
  ## [1.0.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.1...@equinor/fusion-framework-react-module@1.0.2) (2022-09-13)
276
385
 
@@ -292,21 +401,21 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
292
401
 
293
402
  ### ⚠ BREAKING CHANGES
294
403
 
295
- - **react-module:** config is now object
404
+ - **react-module:** config is now object
296
405
 
297
406
  ### Features
298
407
 
299
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
408
+ - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
300
409
 
301
410
  ## [1.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.5...@equinor/fusion-framework-react-module@1.0.0-alpha.0) (2022-09-12)
302
411
 
303
412
  ### ⚠ BREAKING CHANGES
304
413
 
305
- - **react-module:** config is now object
414
+ - **react-module:** config is now object
306
415
 
307
416
  ### Features
308
417
 
309
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
418
+ - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
310
419
 
311
420
  ## [0.2.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.4...@equinor/fusion-framework-react-module@0.2.5) (2022-09-05)
312
421
 
@@ -316,7 +425,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
316
425
 
317
426
  ### Bug Fixes
318
427
 
319
- - **react-module:** fix typing of refs ([0df08fc](https://github.com/equinor/fusion-framework/commit/0df08fc00990a5c93b851f2c00175c7996f15845))
428
+ - **react-module:** fix typing of refs ([0df08fc](https://github.com/equinor/fusion-framework/commit/0df08fc00990a5c93b851f2c00175c7996f15845))
320
429
 
321
430
  ## 0.2.3 (2022-09-05)
322
431
 
@@ -332,14 +441,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
332
441
 
333
442
  # 0.2.0 (2022-08-11)
334
443
 
335
- - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
444
+ - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
336
445
 
337
446
  ### BREAKING CHANGES
338
447
 
339
- - module.initialize now has object as arg
448
+ - module.initialize now has object as arg
340
449
 
341
450
  # 0.1.0 (2022-08-05)
342
451
 
343
452
  ### Features
344
453
 
345
- - **react-module:** initial ([#192](https://github.com/equinor/fusion-framework/issues/192)) ([368614b](https://github.com/equinor/fusion-framework/commit/368614b2c7bd43fad21b17ba709a42cad6e84319))
454
+ - **react-module:** initial ([#192](https://github.com/equinor/fusion-framework/issues/192)) ([368614b](https://github.com/equinor/fusion-framework/commit/368614b2c7bd43fad21b17ba709a42cad6e84319))
@@ -1,28 +1,8 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __rest = (this && this.__rest) || function (s, e) {
11
- var t = {};
12
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
- t[p] = s[p];
14
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
- t[p[i]] = s[p[i]];
18
- }
19
- return t;
20
- };
21
1
  import { jsx as _jsx } from "react/jsx-runtime";
22
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
23
- import { lazy, useEffect } from 'react';
3
+ import { lazy, useEffect, } from 'react';
24
4
  import { initializeModules, } from '@equinor/fusion-framework-module';
25
- import moduleContext from './context';
5
+ import moduleContext from './context.js';
26
6
  /**
27
7
  * Function for creating a `ModuleProvider` component.
28
8
  *
@@ -54,21 +34,19 @@ import moduleContext from './context';
54
34
  * @param ref optional parent module instance
55
35
  * @returns Suspensive `ModuleProvider`
56
36
  */
57
- export const createModuleProvider = (configurator, ref) => __awaiter(void 0, void 0, void 0, function* () {
58
- const Component = lazy(() => __awaiter(void 0, void 0, void 0, function* () {
59
- const _a = yield initializeModules(configurator, ref), { dispose } = _a, instance = __rest(_a, ["dispose"]);
37
+ export const createModuleProvider = async (configurator, ref) => {
38
+ const Component = lazy(async () => {
39
+ const { dispose, ...instance } = await initializeModules(configurator, ref);
60
40
  return {
61
41
  default: ({ children }) => {
62
- // eslint-disable-next-line react-hooks/rules-of-hooks
63
- useEffect(() => dispose,
64
- // eslint-disable-next-line react-hooks/exhaustive-deps
65
- [instance]);
42
+ // biome-ignore lint/correctness/useExhaustiveDependencies: should dispose when new instance is provided
43
+ useEffect(() => dispose, [instance]);
66
44
  return _jsx(ModuleProvider, { value: instance, children: children });
67
45
  },
68
46
  };
69
- }));
47
+ });
70
48
  return Component;
71
- });
49
+ };
72
50
  export const ModuleProvider = moduleContext.Provider;
73
51
  export default ModuleProvider;
74
52
  //# sourceMappingURL=ModuleProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleProvider.js","sourceRoot":"","sources":["../../src/ModuleProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uDAAuD;AACvD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EACH,iBAAiB,GAIpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,aAAa,MAAM,WAAW,CAAC;AAWtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,CAIvD,YAA2C,EAC3C,GAAU,EACiD,EAAE;IAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAS,EAAE;QAC9B,MAAM,KAA2B,MAAM,iBAAiB,CAAiB,YAAY,EAAE,GAAG,CAAC,EAArF,EAAE,OAAO,OAA4E,EAAvE,QAAQ,cAAtB,WAAwB,CAA6D,CAAC;QAC5F,OAAO;YACH,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAkC,EAAE,EAAE;gBACtD,sDAAsD;gBACtD,SAAS,CACL,GAAG,EAAE,CAAC,OAAO;gBACb,wDAAwD;gBACxD,CAAC,QAAQ,CAAC,CACb,CAAC;gBACF,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAkB,CAAC;YACxE,CAAC;SACJ,CAAC;IACN,CAAC,CAAA,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACrB,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC;AAErD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ModuleProvider.js","sourceRoot":"","sources":["../../src/ModuleProvider.tsx"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,OAAO,EACL,IAAI,EACJ,SAAS,GAIV,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,iBAAiB,GAIlB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,aAAa,MAAM,cAAc,CAAC;AAYzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,KAAK,EAK9D,YAA2C,EAC3C,GAAU,EACuC,EAAE;IACnD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,MAAM,iBAAiB,CAAiB,YAAY,EAAE,GAAG,CAAC,CAAC;QAC5F,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,QAAQ,EAA4B,EAAE,EAAE;gBAClD,wGAAwG;gBACxG,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACrC,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,QAAQ,YAAG,QAAQ,GAAkB,CAAC;YACtE,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,QAAQ,CAAC;AAErD,eAAe,cAAc,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ModuleProvider, createModuleProvider } from './ModuleProvider';
2
- export { useModules, useModule } from './useModules';
1
+ export { ModuleProvider, createModuleProvider } from './ModuleProvider.js';
2
+ export { useModules, useModule } from './useModules.js';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +1,48 @@
1
1
  import { useContext } from 'react';
2
- import { moduleContext } from './context';
3
- /** Hook for using modules in current context scope */
2
+ import { moduleContext } from './context.js';
3
+ /**
4
+ * Hook for accessing module instances from the current context scope.
5
+ *
6
+ * Retrieves initialized module instances that were provided via a `ModuleProvider`.
7
+ * The hook supports both array and object-based module collections, with full type safety.
8
+ *
9
+ * @template TModules - The type of modules to retrieve. Can be an array of modules or a record/object mapping module names to module types. Defaults to all available `Modules`.
10
+ * @returns An object containing the initialized module instances, with types inferred from the provided module definitions.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * // Using with a specific module object
15
+ * const modules = useModules<{ navigation: NavigationModule }>();
16
+ * const navigation = modules.navigation;
17
+ *
18
+ * // Using with default modules
19
+ * const allModules = useModules();
20
+ * ```
21
+ */
4
22
  export const useModules = () => useContext(moduleContext);
5
- /** Hook for use a single module in current context scope */
6
- export const useModule = (key) => useModules()[key];
23
+ /**
24
+ * Hook for accessing a single module instance from the current context scope.
25
+ *
26
+ * Convenience hook that retrieves a single module by its key/name. This is useful
27
+ * when you only need one module and want to avoid destructuring from `useModules`.
28
+ *
29
+ * @template T - The type of the module to retrieve. Defaults to any module from the available `Modules`.
30
+ * @template TKey - The string key/name of the module. Automatically inferred from `T` when possible.
31
+ * @param key - The name/key of the module to retrieve from the context.
32
+ * @returns The initialized instance of the requested module, with proper type inference.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * // Get a specific module by name
37
+ * const navigation = useModule('navigation');
38
+ *
39
+ * // With explicit type
40
+ * const navigation = useModule<NavigationModule>('navigation');
41
+ * ```
42
+ */
43
+ export const useModule = (key) => {
44
+ const modules = useModules();
45
+ return modules[key];
46
+ };
7
47
  export default useModules;
8
48
  //# sourceMappingURL=useModules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,sDAAsD;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAS,EAAE,CAAC,UAAU,CAAC,aAAa,CAAM,CAAC;AAErE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAG,CAIrB,GAAS,EACiD,EAAE,CAAC,UAAU,EAAiB,CAAC,GAAG,CAAC,CAAC;AAElG,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"useModules.js","sourceRoot":"","sources":["../../src/useModules.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAES,EAAE,CAAC,UAAU,CAAC,aAAa,CAAkC,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAIvB,GAAS,EACmD,EAAE;IAC9D,MAAM,OAAO,GAAG,UAAU,EAA6B,CAAC;IACxD,OAAQ,OAAmC,CAAC,GAAG,CAE9C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '3.1.6';
2
+ export const version = '4.0.0-next.0';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC"}