@equinor/fusion-framework-react 1.0.16 → 1.1.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 +24 -267
- package/LICENSE +21 -0
- package/dist/esm/Framework.js +9 -0
- package/dist/esm/Framework.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/Framework.d.ts +7 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +60 -60
- package/src/Framework.tsx +19 -0
- package/src/index.tsx +3 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FusionConfigurator } from '@equinor/fusion-framework';
|
|
2
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
export declare const Framework: (props: PropsWithChildren<{
|
|
4
|
+
configure: (configurator: FusionConfigurator) => void;
|
|
5
|
+
fallback: NonNullable<ReactNode> | null;
|
|
6
|
+
}>) => JSX.Element;
|
|
7
|
+
export default Framework;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { Fusion } from '@equinor/fusion-framework';
|
|
2
2
|
export { FusionConfigurator } from '@equinor/fusion-framework';
|
|
3
3
|
export { createFrameworkProvider } from './create-framework-provider';
|
|
4
|
-
export { FrameworkProvider
|
|
4
|
+
export { FrameworkProvider } from './context';
|
|
5
|
+
export { default, Framework } from './Framework';
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
2
|
+
"name": "@equinor/fusion-framework-react",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/esm/index.js",
|
|
8
|
+
"./hooks": "./dist/esm/hooks/index.js",
|
|
9
|
+
"./http": "./dist/esm/http/index.js"
|
|
10
|
+
},
|
|
11
|
+
"types": "dist/types/index.d.ts",
|
|
12
|
+
"typesVersions": {
|
|
13
|
+
"*": {
|
|
14
|
+
"hooks": [
|
|
15
|
+
"dist/types/hooks/index.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"http": [
|
|
18
|
+
"dist/types/http/index.d.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "npm run build:typescript",
|
|
24
|
+
"build:typescript": "tsc -b --verbose"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"author": "",
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/equinor/fusion-framework.git",
|
|
35
|
+
"directory": "packages/react"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@equinor/fusion-framework": "^4.0.16",
|
|
39
|
+
"@equinor/fusion-framework-react-module-http": "^1.0.14"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/react": "^17.0.11",
|
|
43
|
+
"@types/react-dom": "^17.0.7",
|
|
44
|
+
"react": "^17.0.2",
|
|
45
|
+
"react-dom": "^17.0.2",
|
|
46
|
+
"typescript": "^4.8.4"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0",
|
|
50
|
+
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
|
|
51
|
+
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"@types/react": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"react-dom": {
|
|
58
|
+
"optional": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"gitHead": "3506d6ea39362a9fb2764ac764fe8356fda0de01"
|
|
62
62
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FusionConfigurator } from '@equinor/fusion-framework';
|
|
2
|
+
import { createFrameworkProvider } from './create-framework-provider';
|
|
3
|
+
import { PropsWithChildren, ReactNode, Suspense, useMemo } from 'react';
|
|
4
|
+
|
|
5
|
+
export const Framework = (
|
|
6
|
+
props: PropsWithChildren<{
|
|
7
|
+
configure: (configurator: FusionConfigurator) => void;
|
|
8
|
+
fallback: NonNullable<ReactNode> | null;
|
|
9
|
+
}>
|
|
10
|
+
) => {
|
|
11
|
+
const Component = useMemo(() => createFrameworkProvider(props.configure), [props.configure]);
|
|
12
|
+
return (
|
|
13
|
+
<Suspense fallback={props.fallback}>
|
|
14
|
+
<Component>{props.children}</Component>
|
|
15
|
+
</Suspense>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default Framework;
|
package/src/index.tsx
CHANGED
|
@@ -7,4 +7,6 @@ export type { Fusion } from '@equinor/fusion-framework';
|
|
|
7
7
|
export { FusionConfigurator } from '@equinor/fusion-framework';
|
|
8
8
|
|
|
9
9
|
export { createFrameworkProvider } from './create-framework-provider';
|
|
10
|
-
export { FrameworkProvider
|
|
10
|
+
export { FrameworkProvider } from './context';
|
|
11
|
+
|
|
12
|
+
export { default, Framework } from './Framework';
|