@equinor/fusion-framework-cli 5.0.5 → 5.0.6
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
|
+
## [5.0.6](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@5.0.5...@equinor/fusion-framework-cli@5.0.6) (2023-03-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **cli:** fix mounting element in app loader ([0410c7f](https://github.com/equinor/fusion-framework/commit/0410c7f0ce7a1b9f25c7716e0206534a1d047529))
|
|
11
|
+
|
|
6
12
|
## 5.0.5 (2023-03-09)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @equinor/fusion-framework-cli
|
|
@@ -434,7 +434,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
434
434
|
* LICENSE.md file in the root directory of this source tree.
|
|
435
435
|
*
|
|
436
436
|
* @license MIT
|
|
437
|
-
*/function gf(){return gf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gf.apply(this,arguments)}function kA(t,e){return Bk({basename:e==null?void 0:e.basename,history:lk({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||AA(),routes:F8(t)}).initialize()}function AA(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=gf({},e,{errors:TA(e.errors)})),e}function TA(t){if(!t)return null;let e=Object.entries(t),r={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")r[n]=new op(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){let o=new Error(i.message);o.stack="",r[n]=o}else r[n]=i;return r}var T4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(T4||(T4={}));var I4;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(I4||(I4={}));const IA=(t,e,r)=>{I.useEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])},MA=(t,e,r)=>{I.useLayoutEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])};function lp(t,e){const[r]=I.useState(e==null?void 0:e.initial),[n,i]=I.useState(r),[o,a]=I.useState(null),[s,c]=I.useState(!1),l=I.useCallback(()=>{a(null),i(r),c(!1)},[i,a,c,r]);I.useLayoutEffect(()=>{const h=t.value;return h&&i(h),l},[i,l,t]);const d=I.useMemo(()=>({next:i,error:a,complete:()=>c(!0)}),[i,a,c]);return MA(t,d,e==null?void 0:e.teardown),{value:n,error:o,complete:s}}const yf=({error:t})=>Gr(D9,{children:[Gr("div",{style:{marginTop:20,border:"1px solid"},children:[Y("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:t.message}),Y("section",{style:{padding:10},children:t.stack&&Y("pre",{children:t.stack})})]}),t.cause&&Y(yf,{error:t.cause})]}),PA=t=>{const{appKey:e}=t,r=rh(),n=I.useRef(null),i
|
|
437
|
+
*/function gf(){return gf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},gf.apply(this,arguments)}function kA(t,e){return Bk({basename:e==null?void 0:e.basename,history:lk({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||AA(),routes:F8(t)}).initialize()}function AA(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=gf({},e,{errors:TA(e.errors)})),e}function TA(t){if(!t)return null;let e=Object.entries(t),r={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")r[n]=new op(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){let o=new Error(i.message);o.stack="",r[n]=o}else r[n]=i;return r}var T4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(T4||(T4={}));var I4;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(I4||(I4={}));const IA=(t,e,r)=>{I.useEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])},MA=(t,e,r)=>{I.useLayoutEffect(()=>{const n=t.subscribe(e);return n.add(r),()=>n.unsubscribe()},[t,e])};function lp(t,e){const[r]=I.useState(e==null?void 0:e.initial),[n,i]=I.useState(r),[o,a]=I.useState(null),[s,c]=I.useState(!1),l=I.useCallback(()=>{a(null),i(r),c(!1)},[i,a,c,r]);I.useLayoutEffect(()=>{const h=t.value;return h&&i(h),l},[i,l,t]);const d=I.useMemo(()=>({next:i,error:a,complete:()=>c(!0)}),[i,a,c]);return MA(t,d,e==null?void 0:e.teardown),{value:n,error:o,complete:s}}const yf=({error:t})=>Gr(D9,{children:[Gr("div",{style:{marginTop:20,border:"1px solid"},children:[Y("h4",{style:{backgroundColor:"rgb(153, 0, 37)",color:"white",padding:10,margin:0},children:t.message}),Y("section",{style:{padding:10},children:t.stack&&Y("pre",{children:t.stack})})]}),t.cause&&Y(yf,{error:t.cause})]}),PA=t=>{const{appKey:e}=t,r=rh(),n=I.useRef(null),[i,o]=I.useState(!1),[a,s]=I.useState(),{value:c}=lp(I.useMemo(()=>r.modules.app.current$,[r.modules.app]));return I.useEffect(()=>{r.modules.app.setCurrentApp(e)},[e,r]),I.useEffect(()=>{o(!0),s(void 0);const l=new _n;return l.add(c==null?void 0:c.initialize().subscribe({next:({manifest:d,script:h,config:u})=>{const[f]=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g)??[""],m=document.createElement("div");if(!n.current)throw Error("Missing application mounting point");n.current.appendChild(m);const v=h.renderApp??h.default;l.add(v(m,{fusion:r,env:{basename:f,config:u,manifest:d}})),l.add(()=>m.remove())},complete:()=>{o(!1)},error:d=>{s(d)}})),()=>l.unsubscribe()},[r,c,n]),a?a.cause instanceof qi?Gr("div",{children:[Y("h2",{children:"🔥 Failed to load application manifest 🤬"}),Y("h3",{children:a.cause.type}),Y(yf,{error:a}),";"]}):Gr("div",{children:[Y("h2",{children:"🔥 Failed to load application 🤬"}),Y(yf,{error:a}),";"]}):Y("section",{ref:n,children:i&&Y(C8,{text:"Loading Application"})})},RA=()=>{const t=rh().modules.app;if(!t)throw Error("Current framework does not have AppModule configured");const e=I.useMemo(()=>t.current$,[t]),{value:r}=lp(e);return{currentApp:r,setCurrentApp:I.useMemo(()=>t.setCurrentApp.bind(t),[t]),clearCurrentApp:I.useMemo(()=>t.clearCurrentApp.bind(t),[t])}};class ch extends CustomEvent{constructor(e){super(ch.eventName,e)}}ch.eventName="select";class Ja extends CustomEvent{constructor(e){super(Ja.eventName,e)}}Ja.eventName="fwc-searchabledropdown-controller-connect";var Js;class U8 extends Qe{constructor(){super(...arguments),this.resolverCallbacks=[],Js.set(this,void 0)}createRenderRoot(){return this}connectResolver(e){ia(this,Js,e,"f"),this.resolverCallbacks.forEach(r=>{r(e)})}removeResolver(){this.resolverCallbacks.forEach(e=>{e()})}connectedCallback(){super.connectedCallback(),this.addEventListener(Ja.eventName,this.handleElementConnect)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Ja.eventName,this.handleElementConnect)}handleElementConnect(e){const{disconnectedCallback:r,updateResolver:n}=e.detail;r(()=>{this.resolverCallbacks.filter(i=>i!==n)}),ye(this,Js,"f")&&n(ye(this,Js,"f")),this.resolverCallbacks.push(n),e.preventDefault(),e.stopPropagation()}}Js=new WeakMap;/**
|
|
438
438
|
* @license
|
|
439
439
|
* Copyright 2017 Google LLC
|
|
440
440
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"typescript": "^4.9.3",
|
|
57
57
|
"vite-plugin-environment": "^1.1.3"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "b9390b5daadf71f862533c492123aaf46f6ed18c"
|
|
60
60
|
}
|