@equinor/fusion-framework-cli 5.0.4 → 5.0.5
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,10 @@
|
|
|
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.5 (2023-03-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @equinor/fusion-framework-cli
|
|
9
|
+
|
|
6
10
|
## [5.0.4](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-cli@5.0.3...@equinor/fusion-framework-cli@5.0.4) (2023-03-09)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
|
@@ -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=I.useRef(document.createElement("div")),[o,a]=I.useState(!1),[s,c]=I.useState(),{value:l}=lp(I.useMemo(()=>r.modules.app.current$,[r.modules.app]));
|
|
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=I.useRef(document.createElement("div")),[o,a]=I.useState(!1),[s,c]=I.useState(),{value:l}=lp(I.useMemo(()=>r.modules.app.current$,[r.modules.app]));I.useEffect(()=>{r.modules.app.setCurrentApp(e)},[e,r]),I.useEffect(()=>{a(!0),c(void 0);const u=new _n;return u.add(l==null?void 0:l.initialize().subscribe({next:({manifest:f,script:m,config:v})=>{const[w]=window.location.pathname.match(/\/?apps\/[a-z|-]+(\/)?/g)??[""];i.current=document.createElement("div");const g=m.renderApp??m.default;u.add(g(i.current,{fusion:r,env:{basename:w,config:v,manifest:f}}))},complete:()=>{a(!1)},error:f=>{c(f)}})),()=>u.unsubscribe()},[r,l,i]);const d=n.current,h=i.current;return I.useEffect(()=>{if(h&&d)return d.appendChild(h),()=>{try{d.removeChild(h)}catch(u){console.error(u)}}},[d,h]),s?s.cause instanceof qi?Gr("div",{children:[Y("h2",{children:"🔥 Failed to load application manifest 🤬"}),Y("h3",{children:s.cause.type}),Y(yf,{error:s}),";"]}):Gr("div",{children:[Y("h2",{children:"🔥 Failed to load application 🤬"}),Y(yf,{error:s}),";"]}):o?Y(C8,{text:"Loading Application"}):Y("section",{ref:n})},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
|
|
@@ -1845,7 +1845,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1845
1845
|
<span class="trailing-icon">
|
|
1846
1846
|
<slot name="trailingIcon"> ${this.icon&&this.trailingIcon?this.renderIcon():""} </slot>
|
|
1847
1847
|
</span>
|
|
1848
|
-
</a>`}}y([x({type:String})],jo.prototype,"href",void 0);y([x({type:String})],jo.prototype,"target",void 0);y([x({type:String,reflect:!0})],jo.prototype,"color",void 0);y([x({type:String,reflect:!0})],jo.prototype,"variant",void 0);jo.styles=dB;const r9="fwc-link-button";let ig=class extends jo{};ig=y([Ue(r9)],ig);bn(jo,r9);const hB=bn(vl,t9),uB=bn(up,fh),fB=o8(a8({header:{padding:"0 1em"},center:{display:"flex",justifyContent:"flex-start",alignItems:"center"},contextselector:{width:"100%",maxWidth:"420px",marginLeft:"1em"}}),{name:"contextselector-styles"}),pB=()=>{const t=fB(),e=I.useRef(null),[r,n]=I.useState(!1)
|
|
1848
|
+
</a>`}}y([x({type:String})],jo.prototype,"href",void 0);y([x({type:String})],jo.prototype,"target",void 0);y([x({type:String,reflect:!0})],jo.prototype,"color",void 0);y([x({type:String,reflect:!0})],jo.prototype,"variant",void 0);jo.styles=dB;const r9="fwc-link-button";let ig=class extends jo{};ig=y([Ue(r9)],ig);bn(jo,r9);const hB=bn(vl,t9),uB=bn(up,fh),fB=o8(a8({header:{padding:"0 1em"},center:{display:"flex",justifyContent:"flex-start",alignItems:"center"},contextselector:{width:"100%",maxWidth:"420px",marginLeft:"1em"}}),{name:"contextselector-styles"}),pB=()=>{const t=fB(),e=I.useRef(null),[r,n]=I.useState(!1);return Y(_8,{theme:k,children:Gr("header",{className:uf(t.header,t.center),children:[Y(hB,{ref:e,onClick:()=>n(!r),variant:"ghost",children:Y(uB,{icon:"menu"})}),Y(oB,{scale:.7}),Y("div",{className:uf(t.contextselector),children:Y(iB,{})})]})})};class Za extends CustomEvent{constructor(e){super(Za.eventName,e)}}Za.eventName="fwc-person-controller-connect";class mB extends Qe{constructor(){super(...arguments),this.resolver=void 0,this.updateCallbacks=[]}createRenderRoot(){return this}setResolver(e){this.resolver=e,this.updateCallbacks.forEach(r=>{r(e)})}removeResolver(){this.updateCallbacks.forEach(e=>{e()})}connectedCallback(){super.connectedCallback(),this.addEventListener(Za.eventName,this.handleElementConnect)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Za.eventName,this.handleElementConnect)}handleElementConnect(e){const{disconnectedCallback:r,updateResolver:n}=e.detail;r(()=>{const i=this.updateCallbacks.indexOf(n);i>0&&this.updateCallbacks.splice(i,1)}),this.updateCallbacks.push(n),e.preventDefault(),e.stopPropagation(),this.resolver&&n(this.resolver)}}class vB{constructor(e){this.host=e,this.updateResolver=r=>{this.host.presence=this._peresenceTask(r),this.host.details=this._detailsTask(r),this.host.requestUpdate()},this.host=e,this.host.addController(this)}hostConnected(){const e=new Za({detail:{disconnectedCallback:r=>{this.disconnectProvider=r},updateResolver:this.updateResolver},bubbles:!0,composed:!0,cancelable:!1});this.host.dispatchEvent(e)}hostDisconnected(){this.disconnectProvider&&this.disconnectProvider()}get azureId(){return this.host.azureId}_peresenceTask(e){return new _f(this.host,([r])=>{if(!(e!=null&&e.getPresence))throw new Error("PersonResolver is undefined");return Promise.resolve(e.getPresence(r))},()=>[this.azureId])}_detailsTask(e){return new _f(this.host,([r])=>{if(!(e!=null&&e.getDetails))throw new Error("PersonResolver is undefined");return Promise.resolve(e.getDetails(r))},()=>[this.azureId])}}const gB="fwc-person-provider";let og=class extends mB{};og=y([Ue(gB)],og);class fp extends Qe{constructor(){super(),this.azureId="",this.controller=new vB(this)}}y([x({type:String})],fp.prototype,"azureId",void 0);var Hn;(function(t){t.Employee="Employee",t.ExternalHire="External hire",t.XExternal="X-External",t.JointVentureAffiliate="Joint venture/Affiliate"})(Hn||(Hn={}));var me;(function(t){t.Available="Available",t.AvailableIdle="AvailableIdle",t.Away="Away",t.BeRightBack="BeRightBack",t.Busy="Busy",t.BusyIdle="BusyIdle",t.DoNotDisturb="DoNotDisturb",t.Offline="Offline",t.Pending="Pending"})(me||(me={}));var _c;(function(t){t.XSmall="x-small",t.Small="small",t.Medium="medium",t.Large="large"})(_c||(_c={}));var H1;(function(t){t.TopLeft="top-left",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomRight="bottom-right"})(H1||(H1={}));var ti;(function(t){t.Primary="primary",t.Secondary="secondary",t.Success="success",t.Danger="danger",t.Warning="warning",t.Disabled="disabled"})(ti||(ti={}));class n9 extends gt{}n9.styles=[K8];const yB="fwc-ripple";let ag=class extends n9{};ag=y([Ue(yB)],ag);const _B=ie`
|
|
1849
1849
|
:host {
|
|
1850
1850
|
--fwc-badge-color: ${A(k.colors.interactive.primary__resting.getVariable("color"))};
|
|
1851
1851
|
--fwc-badge-size: 1.5rem;
|
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.5",
|
|
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": "a66ae896c36f94bbd827cd0732f2110287da4cf8"
|
|
60
60
|
}
|