@equinor/fusion-framework-react-module 4.0.3 → 4.0.4

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.
@@ -1 +1 @@
1
- export declare const version = "4.0.3";
1
+ export declare const version = "4.0.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-react-module",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "type": "module",
5
5
  "main": "dist/esm/index.js",
6
6
  "exports": {
@@ -17,6 +17,9 @@
17
17
  "description": "Utils for initializing and consuming fusion framework modules",
18
18
  "author": "odin.rochmann@gmail.com",
19
19
  "license": "ISC",
20
+ "files": [
21
+ "dist"
22
+ ],
20
23
  "publishConfig": {
21
24
  "access": "public"
22
25
  },
@@ -26,7 +29,7 @@
26
29
  "directory": "packages/react/modules/module"
27
30
  },
28
31
  "dependencies": {
29
- "@equinor/fusion-framework-module": "^6.1.3"
32
+ "@equinor/fusion-framework-module": "^6.1.4"
30
33
  },
31
34
  "devDependencies": {
32
35
  "@types/react": "^19.2.7",
package/CHANGELOG.md DELETED
@@ -1,522 +0,0 @@
1
- # Change Log
2
-
3
- ## 4.0.3
4
-
5
- ### Patch Changes
6
-
7
- - f663b46: Internal: promote packages already published on the `next` prerelease channel to their stable versions.
8
-
9
- ## 4.0.2
10
-
11
- ### Patch Changes
12
-
13
- - 80c3e4a: Internal: align source filenames with their exports (`context.ts` → `module-context.ts`, `ModuleProvider.tsx` → `create-module-provider.tsx`) while preserving existing public entrypoints; no public API changes.
14
- - 80c3e4a: Internal: split multi-export files into one export per file and convert pure interop re-exports to `export { X } from 'y'` syntax, per `fusion-lint`'s `single-export-per-file` rule. Also removed `modules/event/src/EventProvider.tsx`, a fully dead duplicate of `eventContext.ts`/`useEventProvider.ts`/`useModulesEventProvider.ts` with no remaining consumers. No behavior changes.
15
-
16
- ## 4.0.1
17
-
18
- ### Patch Changes
19
-
20
- - b7b1d9a: Add `registerPlugin` to `IModulesConfigurator` and `ModulesConfigurator` for application-level side effects that run after modules are initialized and before application render.
21
-
22
- Plugins receive the initialized module map through `FrameworkPluginArgs` and may return a teardown callback that runs during `dispose`. Plugin-related types and the `createPlugin(name, callback)` helper are available from the dedicated `@equinor/fusion-framework-module/plugins` entrypoint. Plugin registration and teardown failures are isolated so one failing plugin does not block other plugins or module disposal. `ModuleConfiguratorEventName` and `ModuleConfiguratorEventBaseName` are available from the `@equinor/fusion-framework-module/configurator` entrypoint for filtering `ModuleConfigurator.{name}.{state}` lifecycle events without hard-coded strings.
23
-
24
- ```typescript
25
- import { createPlugin } from "@equinor/fusion-framework-module/plugins";
26
-
27
- const contextTelemetryPlugin = createPlugin<[EventModule, TelemetryModule]>(
28
- "contextTelemetry",
29
- (modules) =>
30
- modules.event.addEventListener("context:changed", (event) => {
31
- modules.telemetry.track("context.changed", event.detail);
32
- }),
33
- );
34
-
35
- configurator.registerPlugin(contextTelemetryPlugin);
36
- ```
37
-
38
- Align `createModuleProvider` configurator typing with the module configurator reference type so React module package builds against the new plugin callback contract.
39
-
40
- Fixes: https://github.com/equinor/fusion-core-tasks/issues/1259
41
-
42
- - Updated dependencies [b7b1d9a]
43
- - Updated dependencies [b7b1d9a]
44
- - Updated dependencies [b7b1d9a]
45
- - @equinor/fusion-framework-module@6.1.0
46
-
47
- ## 4.0.0
48
-
49
- ### Major Changes
50
-
51
- - abffa53: Major version bump for Fusion Framework React 19 release.
52
-
53
- 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.
54
-
55
- **Breaking changes:**
56
- - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
57
- - React Router upgraded from v6 to v7
58
- - Navigation module refactored with new history API
59
- - `renderComponent` and `renderApp` now use `createRoot` API
60
-
61
- **Migration:**
62
- - Update your React version to 18.0.0 or higher before upgrading
63
- - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
64
- - See individual package changelogs for package-specific migration steps
65
-
66
- - abffa53: Require React 18+ as peer dependency. React 17 is no longer supported.
67
-
68
- **Migration:** Update your application to React 18+ to continue using these packages.
69
-
70
- Closes https://github.com/equinor/fusion-framework/issues/3504
71
-
72
- - abffa53: Upgrade to React 19 and remove support for React versions lower than 18.
73
-
74
- **Breaking changes:**
75
- - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
76
- - React 16 and 17 are no longer supported
77
- - Dev dependencies upgraded to React 19.2.1 and @types/react 19.2.7
78
-
79
- **Migration:**
80
- - Update your React version to 18.0.0 or higher before upgrading these packages
81
- - If using React 16 or 17, upgrade to React 18 or 19 first
82
-
83
- Closes https://github.com/equinor/fusion-framework/issues/3504
84
-
85
- ### Minor Changes
86
-
87
- - abffa53: Add type exports for better TypeScript support and tree-shaking.
88
-
89
- The following types are now exported from `@equinor/fusion-framework-react-module`:
90
- - `Modules`
91
- - `ModulesInstanceType`
92
- - `AnyModule`
93
- - `ModulesInstance`
94
-
95
- ```typescript
96
- import type {
97
- Modules,
98
- ModulesInstanceType,
99
- } from "@equinor/fusion-framework-react-module";
100
- ```
101
-
102
- ### Patch Changes
103
-
104
- - Updated dependencies [abffa53]
105
- - @equinor/fusion-framework-module@6.0.0
106
-
107
- ## 3.1.14
108
-
109
- ### Patch Changes
110
-
111
- - [#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.
112
-
113
- - Updated dependencies [[`6aa8e1f`](https://github.com/equinor/fusion-framework/commit/6aa8e1f5c9d852b25e97aa7d98a63008c64d4581)]:
114
- - @equinor/fusion-framework-module@5.0.6
115
-
116
- ## 3.1.13
117
-
118
- ### Patch Changes
119
-
120
- - Updated dependencies [[`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253), [`8fffbfb`](https://github.com/equinor/fusion-framework/commit/8fffbfb12daa9748bf5290e5084cd4d409aed253)]:
121
- - @equinor/fusion-framework-module@5.0.0
122
-
123
- ## 3.1.13-next.2
124
-
125
- ### Patch Changes
126
-
127
- - [#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
128
-
129
- - [#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
130
-
131
- - Updated dependencies [[`7c58c78`](https://github.com/equinor/fusion-framework/commit/7c58c7868c66b1fc0f720b4ed13d39e0fe505461), [`db34d90`](https://github.com/equinor/fusion-framework/commit/db34d9003d64e4c7cb46cf0c95f0c7a0e7587128)]:
132
- - @equinor/fusion-framework-module@4.4.3-next.2
133
-
134
- ## 3.1.13-next.1
135
-
136
- ### Patch Changes
137
-
138
- - Updated dependencies [[`bbda62d`](https://github.com/equinor/fusion-framework/commit/bbda62def35c8e8b742d90459680f7199c4ece0f)]:
139
- - @equinor/fusion-framework-module@4.4.3-next.1
140
-
141
- ## 3.1.13-next.0
142
-
143
- ### Patch Changes
144
-
145
- - Updated dependencies [[`53ef326`](https://github.com/equinor/fusion-framework/commit/53ef32633ce1c050e20614f1343148327a40b2e6)]:
146
- - @equinor/fusion-framework-module@4.4.3-next.0
147
-
148
- ## 3.1.12
149
-
150
- ### Patch Changes
151
-
152
- - Updated dependencies [[`96bb1fb`](https://github.com/equinor/fusion-framework/commit/96bb1fb744d8dc2410e99fea6ca948d2d5489428)]:
153
- - @equinor/fusion-framework-module@4.4.2
154
-
155
- ## 3.1.11
156
-
157
- ### Patch Changes
158
-
159
- - Updated dependencies [[`e49f916`](https://github.com/equinor/fusion-framework/commit/e49f9161557202df57248d02ade4d2ef50231bdc), [`c6af3a3`](https://github.com/equinor/fusion-framework/commit/c6af3a3c926fb245e9d056b506d47b8bf4f1efde)]:
160
- - @equinor/fusion-framework-module@4.4.1
161
-
162
- ## 3.1.10
163
-
164
- ### Patch Changes
165
-
166
- - Updated dependencies [[`efd70a3`](https://github.com/equinor/fusion-framework/commit/efd70a34f734e0c155d3440e35ce4fa11a7abc42)]:
167
- - @equinor/fusion-framework-module@4.4.0
168
-
169
- ## 3.1.9
170
-
171
- ### Patch Changes
172
-
173
- - Updated dependencies [[`f53b60b`](https://github.com/equinor/fusion-framework/commit/f53b60b7805706ce7617e614f0ac0c24317a2e43)]:
174
- - @equinor/fusion-framework-module@4.3.8
175
-
176
- ## 3.1.8
177
-
178
- ### Patch Changes
179
-
180
- - [#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`
181
-
182
- - Updated dependencies [[`abb3560`](https://github.com/equinor/fusion-framework/commit/abb3560a22ad8830df19904272035458433f4237)]:
183
- - @equinor/fusion-framework-module@4.3.7
184
-
185
- ## 3.1.7
186
-
187
- ### Patch Changes
188
-
189
- - [#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`
190
-
191
- - [#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.
192
-
193
- - Updated dependencies [[`ba5d12e`](https://github.com/equinor/fusion-framework/commit/ba5d12eba0a38db412353765e997d02c1fbb478d), [`dcd2fb1`](https://github.com/equinor/fusion-framework/commit/dcd2fb1394e175d0cc2a4289ed3ede8e0271d67d)]:
194
- - @equinor/fusion-framework-module@4.3.6
195
-
196
- ## 3.1.6
197
-
198
- ### Patch Changes
199
-
200
- - Updated dependencies [[`2644b3d`](https://github.com/equinor/fusion-framework/commit/2644b3d63939aede736a3b1950db32dbd487877d)]:
201
- - @equinor/fusion-framework-module@4.3.5
202
-
203
- ## 3.1.5
204
-
205
- ### Patch Changes
206
-
207
- - Updated dependencies [[`75d676d`](https://github.com/equinor/fusion-framework/commit/75d676d2c7919f30e036b5ae97c4d814c569aa87), [`00d5e9c`](https://github.com/equinor/fusion-framework/commit/00d5e9c632876742c3d2a74efea2f126a0a169d9)]:
208
- - @equinor/fusion-framework-module@4.3.4
209
-
210
- ## 3.1.4
211
-
212
- ### Patch Changes
213
-
214
- - Updated dependencies [[`a1524e9`](https://github.com/equinor/fusion-framework/commit/a1524e9c4d83778da3db42dbcf99908b776a0592)]:
215
- - @equinor/fusion-framework-module@4.3.3
216
-
217
- ## 3.1.3
218
-
219
- ### Patch Changes
220
-
221
- - [#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
222
-
223
- - [#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.
224
-
225
- Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
226
- 1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
227
- 2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
228
- 3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
229
-
230
- 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.
231
-
232
- Before:
233
-
234
- ```json
235
- {
236
- "compilerOptions": {
237
- "module": "ES2022",
238
- "target": "ES6",
239
- "incremental": true,
240
- "removeComments": true,
241
- "preserveConstEnums": true,
242
- "sourceMap": true,
243
- "moduleResolution": "node"
244
- }
245
- }
246
- ```
247
-
248
- After:
249
-
250
- ```json
251
- {
252
- "compilerOptions": {
253
- "module": "ES2022",
254
- "target": "ES6",
255
- "incremental": true,
256
- "preserveConstEnums": true,
257
- "sourceMap": true,
258
- "moduleResolution": "node"
259
- }
260
- }
261
- ```
262
-
263
- This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
264
-
265
- - 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)]:
266
- - @equinor/fusion-framework-module@4.3.2
267
-
268
- ## 3.1.2
269
-
270
- ### Patch Changes
271
-
272
- - 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)]:
273
- - @equinor/fusion-framework-module@4.3.1
274
-
275
- ## 3.1.1
276
-
277
- ### Patch Changes
278
-
279
- - [#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.
280
-
281
- ## 3.1.0
282
-
283
- ### Minor Changes
284
-
285
- - [#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
286
-
287
- ### Patch Changes
288
-
289
- - Updated dependencies [[`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904), [`f3ae28d`](https://github.com/equinor/fusion-framework/commit/f3ae28dc6d1d5043605e07e2cd2e83ae799cd904)]:
290
- - @equinor/fusion-framework-module@4.3.0
291
-
292
- ## 3.0.8
293
-
294
- ### Patch Changes
295
-
296
- - Updated dependencies [[`152cf73`](https://github.com/equinor/fusion-framework/commit/152cf73d39eb32ccbaddaa6941e315c437c4972d)]:
297
- - @equinor/fusion-framework-module@4.2.7
298
-
299
- ## 3.0.7
300
-
301
- ### Patch Changes
302
-
303
- - Updated dependencies [[`9c24e84`](https://github.com/equinor/fusion-framework/commit/9c24e847d041dea8384c77439e6b237f5bdb3125)]:
304
- - @equinor/fusion-framework-module@4.2.6
305
-
306
- ## 3.0.6
307
-
308
- ### Patch Changes
309
-
310
- - [`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc) Thanks [@odinr](https://github.com/odinr)! - force patch bump, realign missing snapshot
311
-
312
- - Updated dependencies [[`b5dfe5d2`](https://github.com/equinor/fusion-framework/commit/b5dfe5d29a249e0cca6c9589322931dfedd06acc)]:
313
- - @equinor/fusion-framework-module@4.2.5
314
-
315
- ## 3.0.5
316
-
317
- ### Patch Changes
318
-
319
- - Updated dependencies [[`9076a498`](https://github.com/equinor/fusion-framework/commit/9076a49876e7a414a27557b7fb9095a67fe3a57f)]:
320
- - @equinor/fusion-framework-module@4.2.4
321
-
322
- ## 3.0.4
323
-
324
- ### Patch Changes
325
-
326
- - [#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
327
-
328
- conflicts of `@types/react` made random outcomes when using `yarn`
329
-
330
- this change should not affect consumer of the packages, but might conflict dependent on local package manager.
331
-
332
- - [#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
333
-
334
- only dev deps updated should not affect any consumers
335
-
336
- see [react changelog](https://github.com/facebook/react/releases) for details
337
-
338
- - Updated dependencies [[`7ec195d4`](https://github.com/equinor/fusion-framework/commit/7ec195d42098fec8794db13e83b71ef7753ff862), [`d276fc5d`](https://github.com/equinor/fusion-framework/commit/d276fc5d514566d05c64705076a1cb91c6a44272)]:
339
- - @equinor/fusion-framework-module@4.2.3
340
-
341
- ## 3.0.3
342
-
343
- ### Patch Changes
344
-
345
- - [#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**
346
- - align all versions of typescript
347
- - update types to build
348
- - 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
349
-
350
- - 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)]:
351
- - @equinor/fusion-framework-module@4.2.0
352
-
353
- All notable changes to this project will be documented in this file.
354
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
355
-
356
- ## 3.0.2 (2023-05-23)
357
-
358
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
359
-
360
- ## 3.0.1 (2023-05-05)
361
-
362
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
363
-
364
- ## 3.0.0 (2023-04-16)
365
-
366
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
367
-
368
- ## [2.0.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@2.0.1...@equinor/fusion-framework-react-module@2.0.2) (2023-03-20)
369
-
370
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
371
-
372
- ## 2.0.1 (2023-01-30)
373
-
374
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
375
-
376
- ## [2.0.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.1.2...@equinor/fusion-framework-react-module@2.0.0) (2023-01-27)
377
-
378
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
379
-
380
- ## [2.0.0-alpha.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.1.2...@equinor/fusion-framework-react-module@2.0.0-alpha.0) (2023-01-26)
381
-
382
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
383
-
384
- ## 1.1.2 (2023-01-26)
385
-
386
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
387
-
388
- ## 1.1.1 (2022-12-01)
389
-
390
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
391
-
392
- ## 1.1.0 (2022-11-17)
393
-
394
- ### Features
395
-
396
- - update typing of useModule hook ([958dd04](https://github.com/equinor/fusion-framework/commit/958dd0401667e9ebb1a51bced128ae43369cd6c4))
397
-
398
- ## 1.0.15 (2022-11-11)
399
-
400
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
401
-
402
- ## 1.0.14 (2022-11-03)
403
-
404
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
405
-
406
- ## 1.0.13 (2022-11-02)
407
-
408
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
409
-
410
- ## 1.0.12 (2022-10-27)
411
-
412
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
413
-
414
- ## 1.0.11 (2022-10-21)
415
-
416
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
417
-
418
- ## [1.0.10](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.9...@equinor/fusion-framework-react-module@1.0.10) (2022-10-17)
419
-
420
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
421
-
422
- ## 1.0.9 (2022-10-03)
423
-
424
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
425
-
426
- ## [1.0.8](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.7...@equinor/fusion-framework-react-module@1.0.8) (2022-09-29)
427
-
428
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
429
-
430
- ## 1.0.7 (2022-09-27)
431
-
432
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
433
-
434
- ## 1.0.6 (2022-09-20)
435
-
436
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
437
-
438
- ## [1.0.5](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.4...@equinor/fusion-framework-react-module@1.0.5) (2022-09-14)
439
-
440
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
441
-
442
- ## [1.0.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.3...@equinor/fusion-framework-react-module@1.0.4) (2022-09-13)
443
-
444
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
445
-
446
- ## [1.0.3](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.2...@equinor/fusion-framework-react-module@1.0.3) (2022-09-13)
447
-
448
- ### Bug Fixes
449
-
450
- - update typings and linting ([7d2056b](https://github.com/equinor/fusion-framework/commit/7d2056b7866850b7efdfd4567385b5dbbcdf8761))
451
-
452
- ## [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)
453
-
454
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
455
-
456
- ## [1.0.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.1-next.1...@equinor/fusion-framework-react-module@1.0.1) (2022-09-12)
457
-
458
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
459
-
460
- ## [1.0.1-next.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.1-next.0...@equinor/fusion-framework-react-module@1.0.1-next.1) (2022-09-12)
461
-
462
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
463
-
464
- ## [1.0.1-next.0](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@1.0.0...@equinor/fusion-framework-react-module@1.0.1-next.0) (2022-09-12)
465
-
466
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
467
-
468
- ## 1.0.0 (2022-09-12)
469
-
470
- ### ⚠ BREAKING CHANGES
471
-
472
- - **react-module:** config is now object
473
-
474
- ### Features
475
-
476
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
477
-
478
- ## [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)
479
-
480
- ### ⚠ BREAKING CHANGES
481
-
482
- - **react-module:** config is now object
483
-
484
- ### Features
485
-
486
- - **react-module:** update configurator ([9105abd](https://github.com/equinor/fusion-framework/commit/9105abd8458a5f1ea04fa46cd1a4bb86596a2346))
487
-
488
- ## [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)
489
-
490
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
491
-
492
- ## [0.2.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.3...@equinor/fusion-framework-react-module@0.2.4) (2022-09-05)
493
-
494
- ### Bug Fixes
495
-
496
- - **react-module:** fix typing of refs ([0df08fc](https://github.com/equinor/fusion-framework/commit/0df08fc00990a5c93b851f2c00175c7996f15845))
497
-
498
- ## 0.2.3 (2022-09-05)
499
-
500
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
501
-
502
- ## 0.2.2 (2022-08-19)
503
-
504
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
505
-
506
- ## [0.2.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-react-module@0.2.0...@equinor/fusion-framework-react-module@0.2.1) (2022-08-15)
507
-
508
- **Note:** Version bump only for package @equinor/fusion-framework-react-module
509
-
510
- # 0.2.0 (2022-08-11)
511
-
512
- - feat!: allow modules to displose ([32b69fb](https://github.com/equinor/fusion-framework/commit/32b69fb7cc61e78e503e67d0e77f21fb44b600b9))
513
-
514
- ### BREAKING CHANGES
515
-
516
- - module.initialize now has object as arg
517
-
518
- # 0.1.0 (2022-08-05)
519
-
520
- ### Features
521
-
522
- - **react-module:** initial ([#192](https://github.com/equinor/fusion-framework/issues/192)) ([368614b](https://github.com/equinor/fusion-framework/commit/368614b2c7bd43fad21b17ba709a42cad6e84319))
@@ -1,78 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import {
3
- lazy,
4
- useEffect,
5
- type LazyExoticComponent,
6
- type FunctionComponent,
7
- type ReactNode,
8
- } from 'react';
9
-
10
- import {
11
- initializeModules,
12
- type ModulesConfigurator,
13
- type ModulesInstanceType,
14
- type AnyModule,
15
- } from '@equinor/fusion-framework-module';
16
-
17
- import { ModuleProvider } from './module-provider.js';
18
-
19
- type ModuleProviderCreator = <
20
- TModules extends Array<AnyModule> = Array<AnyModule>,
21
- // biome-ignore lint/suspicious/noExplicitAny: Default type parameter for module instance reference
22
- TRef extends ModulesInstanceType<[AnyModule]> = any,
23
- >(
24
- configurator: ModulesConfigurator<TModules, TRef>,
25
- ref?: TRef,
26
- ) => Promise<LazyExoticComponent<FunctionComponent>>;
27
-
28
- /**
29
- * Function for creating a `ModuleProvider` component.
30
- *
31
- * __NOTE:__ this function requires component to be wrapped in `Suspense`
32
- *
33
- * @example
34
- * ```ts
35
- * import http, { HttpModule } from '@equinor/fusion-framework-module-http';
36
- * import msal, { MsalModule } from '@equinor/fusion-framework-module-msal';
37
- * import { ModulesConfigurator } from '@equinor/fusion-framework-module';
38
- * import { createModuleProvider } from '@equinor/fusion-framework-react-module';
39
- *
40
- * const configurator = new ModulesConfigurator([http, msal]);
41
- * configurator.onConfigured((config) => {
42
- * config.auth.configureDefault({
43
- * tenantId: 'MY_TENANT_ID',
44
- * clientId: 'MY_CLIENT_ID',
45
- * redirectUri: '/authentication/login-callback',
46
- * });
47
- * config.http.configureClient('foo', {
48
- * baseUri: 'https://foo.bar',
49
- * defaultScopes: ['FOO_CLIENT_ID/.default'],
50
- * });
51
- * });
52
- *
53
- * export default createModuleProvider(configurator);
54
- * ```
55
- * @param configurator configurator for the modules that should be initialized
56
- * @param ref optional parent module instance
57
- * @returns Suspensive `ModuleProvider`
58
- */
59
- export const createModuleProvider: ModuleProviderCreator = async <
60
- TModules extends Array<AnyModule>,
61
- // biome-ignore lint/suspicious/noExplicitAny: Default type parameter for module instance reference
62
- TRef extends ModulesInstanceType<[AnyModule]> = any,
63
- >(
64
- configurator: ModulesConfigurator<TModules, TRef>,
65
- ref?: TRef,
66
- ): Promise<LazyExoticComponent<FunctionComponent>> => {
67
- const Component = lazy(async () => {
68
- const { dispose, ...instance } = await initializeModules<TModules, TRef>(configurator, ref);
69
- return {
70
- default: ({ children }: { children?: ReactNode }) => {
71
- // biome-ignore lint/correctness/useExhaustiveDependencies: should dispose when new instance is provided
72
- useEffect(() => dispose, [instance]);
73
- return <ModuleProvider value={instance}>{children}</ModuleProvider>;
74
- },
75
- };
76
- });
77
- return Component;
78
- };
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
- export type {
2
- Modules,
3
- ModulesInstanceType,
4
- AnyModule,
5
- ModulesInstance,
6
- } from '@equinor/fusion-framework-module';
7
-
8
- export { createModuleProvider } from './create-module-provider.js';
9
- export { ModuleProvider } from './module-provider.js';
10
- export { useModules } from './useModules.js';
11
- export { useModule } from './useModule.js';
@@ -1,5 +0,0 @@
1
- import { createContext } from 'react';
2
-
3
- export const moduleContext = createContext<Record<string, unknown>>({});
4
-
5
- export default moduleContext;
@@ -1,5 +0,0 @@
1
- import moduleContext from './module-context.js';
2
-
3
- export const ModuleProvider = moduleContext.Provider;
4
-
5
- export default ModuleProvider;