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