@equinor/fusion-framework-cli 0.3.1 → 0.3.2
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
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.3.2](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@0.3.1...@equinor/fusion-framework-cli@0.3.2) (2022-11-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- basename in app render ([ae75815](https://github.com/equinor/fusion-framework/commit/ae75815877701c364f853413b29ad4f053d9c2c2))
|
|
11
|
+
|
|
6
12
|
## [0.3.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@0.3.0...@equinor/fusion-framework-cli@0.3.1) (2022-11-18)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @equinor/fusion-framework-cli
|
|
@@ -387,4 +387,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
387
387
|
* LICENSE.md file in the root directory of this source tree.
|
|
388
388
|
*
|
|
389
389
|
* @license MIT
|
|
390
|
-
*/function tk(t,e){var r;return yI({basename:e==null?void 0:e.basename,history:jb({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||((r=window)==null?void 0:r.__staticRouterHydrationData),routes:R0(t)}).initialize()}var Dg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(Dg||(Dg={}));var Hg;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Hg||(Hg={}));const P0=({error:t})=>no(Qy,{children:[no("div",{style:{marginTop:20,border:"1px solid"},children:[no("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:[t.name," - ",t.message]}),W("section",{style:{padding:10},children:t.stack&&W("pre",{children:t.stack})})]}),t.cause&&W(P0,{error:t.cause})]}),rk=t=>{const{appKey:e}=t,r=O1(),n=j.exports.useRef(null),[o,i]=j.exports.useState(),[a,s]=j.exports.useState(!1),[c,l]=j.exports.useState();return j.exports.useEffect(()=>{s(!0);const u=r.modules.app.loadApp(e).subscribe({next:h=>i(h),error:l,complete:()=>{s(!1)}});return()=>u.unsubscribe()},[e]),j.exports.useEffect(()=>{var u,h;if(o&&n.current){const{manifest:d,config:f,module:m}=o,[v]=(u=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g))!=null?u:[];return((h=m.render)!=null?h:m.default)(n.current,{fusion:r,
|
|
390
|
+
*/function tk(t,e){var r;return yI({basename:e==null?void 0:e.basename,history:jb({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||((r=window)==null?void 0:r.__staticRouterHydrationData),routes:R0(t)}).initialize()}var Dg;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(Dg||(Dg={}));var Hg;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Hg||(Hg={}));const P0=({error:t})=>no(Qy,{children:[no("div",{style:{marginTop:20,border:"1px solid"},children:[no("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:[t.name," - ",t.message]}),W("section",{style:{padding:10},children:t.stack&&W("pre",{children:t.stack})})]}),t.cause&&W(P0,{error:t.cause})]}),rk=t=>{const{appKey:e}=t,r=O1(),n=j.exports.useRef(null),[o,i]=j.exports.useState(),[a,s]=j.exports.useState(!1),[c,l]=j.exports.useState();return j.exports.useEffect(()=>{s(!0);const u=r.modules.app.loadApp(e).subscribe({next:h=>i(h),error:l,complete:()=>{s(!1)}});return()=>u.unsubscribe()},[e]),j.exports.useEffect(()=>{var u,h;if(o&&n.current){const{manifest:d,config:f,module:m}=o,[v]=(u=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g))!=null?u:[];return((h=m.render)!=null?h:m.default)(n.current,{fusion:r,env:{manifest:d,config:f,basename:v}})}},[r,n,o]),c?no("div",{children:[W("h2",{children:"\u{1F525} Failed to load application \u{1F92C}"}),W(P0,{error:c}),";"]}):no("div",{children:[a&&W(m0,{text:"Loading Application"}),W("span",{ref:n,style:{display:o?"":"none"}})]})},nk=()=>W("div",{style:{fontFamily:"Equinor"},children:W(JI,{})}),ok=()=>{const{appKey:t}=jI();return t?W(rk,{appKey:t}):null},ik=tk([{path:"/",element:W(nk,{}),children:[{path:"apps/:appKey/*",element:W(ok,{})},{path:"test",element:W("p",{children:"ok"})}]}]),ak=()=>W(QI,{router:ik,fallbackElement:W("p",{children:"wooot"})});Cu.createRoot(document.getElementById("root")).render(W(Qa.StrictMode,{children:W(yb,{theme:Ke,children:W(x1,{configure:zb,fallback:W(m0,{text:"Loading framework"}),children:W(ak,{})})})}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Fusion Framework Dev Portal</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index.
|
|
8
|
+
<script type="module" crossorigin src="/assets/index.deee6d0f.js"></script>
|
|
9
9
|
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-router-dom": "^6.4.3",
|
|
47
47
|
"typescript": "^4.8.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "300dd2973166082a51b1dd47e75f60ba1c3ef20c"
|
|
50
50
|
}
|