@equinor/fusion-framework-cli 10.3.0 → 10.3.1
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
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2632](https://github.com/equinor/fusion-framework/pull/2632) [`b136b45`](https://github.com/equinor/fusion-framework/commit/b136b4565da1af09c8447956716f3d9f0ea91698) Thanks [@eikeland](https://github.com/eikeland)! - ### Changes
|
|
8
|
+
|
|
9
|
+
Updated `@equinor/fusion-wc-person` dependency from version `^3.0.5` to `^3.0.6`
|
|
10
|
+
|
|
3
11
|
## 10.3.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -3510,4 +3510,4 @@ cursor: pointer;`),r},Ri=({left:t,right:e,top:r,bottom:n})=>Ee({paddingLeft:t,pa
|
|
|
3510
3510
|
.list-scroll {
|
|
3511
3511
|
max-height: ${this.dropdownHeight};
|
|
3512
3512
|
}
|
|
3513
|
-
</style>`}}Mr.styles=MPe;x([B()],Mr.prototype,"label",void 0);x([B()],Mr.prototype,"placeholder",void 0);x([B()],Mr.prototype,"variant",void 0);x([B()],Mr.prototype,"leadingIcon",void 0);x([B({attribute:!1,state:!0})],Mr.prototype,"trailingIcon",void 0);x([B()],Mr.prototype,"meta",void 0);x([B()],Mr.prototype,"value",void 0);x([B()],Mr.prototype,"graphic",void 0);x([B()],Mr.prototype,"initialText",void 0);x([B()],Mr.prototype,"multiple",void 0);x([B()],Mr.prototype,"dropdownHeight",void 0);x([B()],Mr.prototype,"disabled",void 0);x([Vo()],Mr.prototype,"azureId",void 0);x([Vo()],Mr.prototype,"upn",void 0);x([Vo()],Mr.prototype,"search",void 0);x([B({converter(t){if(t!=null&&t.length)try{return JSON.parse(t)}catch{if(t!=null&&t.match("@"))return{upn:t.toLocaleLowerCase()};if(t!=null&&t.length)return{azureId:t.toLocaleLowerCase()}}return null}})],Mr.prototype,"selectedPerson",void 0);x([B()],Mr.prototype,"autofocus",void 0);x([E0("fwc-textinput")],Mr.prototype,"textInputElement",void 0);x([E0("fwc-list")],Mr.prototype,"listElement",void 0);x([fQ("fwc-list-item:not([disabled])")],Mr.prototype,"listItems",void 0);const APe="fwc-person-select";let XZ=class extends Mr{};XZ=x([xt(APe)],XZ);const TPe=t=>{const{resolver:e,children:r}=t,n=g.useRef(null);return g.useEffect(()=>{n.current&&e&&(n.current.resolver=e)},[n,e]),w.jsx("fwc-person-provider",{ref:n,children:r})},IPe={[no.v2]:["azureUniqueId"],[no.v4]:["azureUniqueId"]},Ni=t=>e=>{if(typeof e!="object")return!1;const r=Object.keys(e);return IPe[no[t]].every(o=>r.includes(o))};var Ag=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},A1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},E2,N1,o4;const Tg=t=>e=>{var r,n;const{azureId:i,upn:o}=t;return i&&o?((r=e.upn)===null||r===void 0?void 0:r.toLocaleLowerCase())===o.toLocaleLowerCase()&&e.azureUniqueId===i:i?e.azureUniqueId===i:o?((n=e.upn)===null||n===void 0?void 0:n.toLocaleLowerCase())===o.toLocaleLowerCase():!1};class $Pe{constructor(e,r){E2.set(this,void 0),N1.set(this,void 0),o4.set(this,void 0);const n=3*60*1e3;Ag(this,E2,new Hn({expire:n,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.get("v4","json$",{azureId:i,expand:["manager","positions"]},{signal:o})}}),"f"),Ag(this,N1,new Hn({expire:n,queueOperator:"merge",key:({search:i})=>i,client:{fn:({search:i},o)=>e.query("v2","json$",{search:i},{signal:o})}}),"f"),Ag(this,o4,new Hn({expire:n,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.photo("v2","blob$",{azureId:i},{signal:o}).pipe(X(a=>a.blob),nt(a=>{var s;if(a.name==="ApiProviderError"&&((s=a.response)===null||s===void 0?void 0:s.status)===404&&(r!=null&&r.fallbackImage))return Ke(r==null?void 0:r.fallbackImage);throw a}))}}),"f")}search(e){const{search:r,signal:n}=e;return A1(this,N1,"f").query({search:r},{signal:n}).pipe(bd)}getPhoto(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonPhotoByAzureId(r,i);if(n)return this._getPersonPhotoByUpn(n,i);throw Error("invalid args provided")}getPerson(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonByAzureId(r,i);if(n)return this._getPersonByUpn(n,i);throw Error("invalid args provided")}getPersonInfo(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonInfoById(r,i);if(n)return this._getPersonInfoByUpn(n,i);throw Error("invalid args provided")}_getPersonByUpn(e,r){const n=r?El(r,"abort"):qt;return ec(this._personCache$({upn:e}),this._getPersonInfoByUpn(e,r).pipe(le(Ni("v2")),ut(({azureUniqueId:i})=>this._getPersonByAzureId(i,r)))).pipe(le(Ni("v4")),Zl(n))}_getPersonByAzureId(e,r){return A1(this,E2,"f").query({azureId:e},{signal:r}).pipe(bd)}_getPersonInfoById(e,r){const n=r?El(r,"abort"):qt;return ec(this._personCache$({azureId:e}),this._queryCache$({azureId:e}),this._getPersonByAzureId(e,r)).pipe(le(Ni("v2")),Zl(n))}_getPersonInfoByUpn(e,r){const n=Tg({upn:e}),i=r?El(r,"abort"):qt;return ec(this._personCache$({upn:e}),this._queryCache$({upn:e}),A1(this,N1,"f").query({search:e},{signal:r}).pipe(X(o=>o.value.find(n)),Ah(Ni("v2")))).pipe(Ah(Ni("v2")),le(Ni("v2")),le(Ni("v2")),Zl(i))}_getPersonPhotoByAzureId(e,r){return A1(this,o4,"f").query({azureId:e},{signal:r}).pipe(e2(1),X(n=>URL.createObjectURL(n.value)))}_getPersonPhotoByUpn(e,r){return this._getPersonInfoByUpn(e,r).pipe(e2(1),ut(n=>this._getPersonPhotoByAzureId(n.azureUniqueId,r)))}_personCache$(e){const r=Tg(e);return A1(this,E2,"f").cache.state$.pipe(e2(1),X(n=>{var i;return(i=Object.values(n).find(o=>r(o.value)))===null||i===void 0?void 0:i.value}),Ah(Ni("v4")),le(Ni("v4")))}_queryCache$(e){const r=Tg(e);return A1(this,N1,"f").cache.state$.pipe(e2(1),ut(n=>Ie(Object.values(n)).pipe(X(i=>i.value.find(o=>r(o))),Ah(Ni("v2")))),Ah(Ni("v2")),le(Ni("v2")))}}E2=new WeakMap,N1=new WeakMap,o4=new WeakMap;const HPe=t=>({getDetails(e){return Jr(t.getPerson(e).pipe(X(r=>Object.assign(Object.assign({},r),{azureId:r.azureUniqueId}))))},getInfo(e){return Jr(t.getPersonInfo(e).pipe(X(r=>Object.assign(Object.assign({},r),{azureId:r.azureUniqueId}))))},getPhoto(e){return Jr(t.getPhoto(e))},search(e){return Jr(t.search(e).pipe(X(r=>r.map(n=>Object.assign(Object.assign({},n),{azureId:n.azureUniqueId})))))}});var RPe=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const LPe=(t,e)=>g.lazy(()=>RPe(void 0,void 0,void 0,function*(){const r=yield t.createPeopleClient(),n=new $Pe(r,e),i=HPe(n);return{default:({children:a})=>w.jsx(TPe,{resolver:i,children:a})}})),VPe=t=>{const{children:e,options:r,fallback:n}=t,i=WA("services");if(!i)throw Error("missing service module");const o=g.useMemo(()=>LPe(i,r),[i,r]);return w.jsx(g.Suspense,{fallback:n||w.jsx(w.Fragment,{}),children:w.jsx(o,{children:e})})},DPe='<svg height="24px" width="24px" fill="#999" viewBox="0 0 24 24" title="person" role="img" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#eee" /><path d="M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm2 4c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2Zm4 10c-.2-.71-3.3-2-6-2-2.69 0-5.77 1.28-6 2h12ZM4 18c0-2.66 5.33-4 8-4s8 1.34 8 4v2H4v-2Z" fill-rule="evenodd" clip-rule="evenodd" class="sc-dmqHEX eydzYY"></path></svg>',OPe=document.getElementById("root"),NPe=new Blob([DPe],{type:"image/svg+xml"});Ig.createRoot(OPe).render(w.jsx(JY,{theme:M,children:w.jsx(XW,{configure:JJ,fallback:w.jsx(UT,{text:"Loading framework"}),children:w.jsx(VPe,{options:{fallbackImage:NPe},children:w.jsx(vPe,{})})})}));
|
|
3513
|
+
</style>`}}Mr.styles=MPe;x([B()],Mr.prototype,"label",void 0);x([B()],Mr.prototype,"placeholder",void 0);x([B()],Mr.prototype,"variant",void 0);x([B()],Mr.prototype,"leadingIcon",void 0);x([B({attribute:!1,state:!0})],Mr.prototype,"trailingIcon",void 0);x([B()],Mr.prototype,"meta",void 0);x([B()],Mr.prototype,"value",void 0);x([B()],Mr.prototype,"graphic",void 0);x([B()],Mr.prototype,"initialText",void 0);x([B()],Mr.prototype,"multiple",void 0);x([B()],Mr.prototype,"dropdownHeight",void 0);x([B()],Mr.prototype,"disabled",void 0);x([Vo()],Mr.prototype,"azureId",void 0);x([Vo()],Mr.prototype,"upn",void 0);x([Vo()],Mr.prototype,"search",void 0);x([B({attribute:"selectedperson",converter(t){if(t!=null&&t.length)try{return JSON.parse(t)}catch{if(t!=null&&t.match("@"))return{upn:t.toLocaleLowerCase()};if(t!=null&&t.length)return{azureId:t.toLocaleLowerCase()}}return null}})],Mr.prototype,"selectedPerson",void 0);x([B()],Mr.prototype,"autofocus",void 0);x([E0("fwc-textinput")],Mr.prototype,"textInputElement",void 0);x([E0("fwc-list")],Mr.prototype,"listElement",void 0);x([fQ("fwc-list-item:not([disabled])")],Mr.prototype,"listItems",void 0);const APe="fwc-person-select";let XZ=class extends Mr{};XZ=x([xt(APe)],XZ);const TPe=t=>{const{resolver:e,children:r}=t,n=g.useRef(null);return g.useEffect(()=>{n.current&&e&&(n.current.resolver=e)},[n,e]),w.jsx("fwc-person-provider",{ref:n,children:r})},IPe={[no.v2]:["azureUniqueId"],[no.v4]:["azureUniqueId"]},Ni=t=>e=>{if(typeof e!="object")return!1;const r=Object.keys(e);return IPe[no[t]].every(o=>r.includes(o))};var Ag=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},A1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},E2,N1,o4;const Tg=t=>e=>{var r,n;const{azureId:i,upn:o}=t;return i&&o?((r=e.upn)===null||r===void 0?void 0:r.toLocaleLowerCase())===o.toLocaleLowerCase()&&e.azureUniqueId===i:i?e.azureUniqueId===i:o?((n=e.upn)===null||n===void 0?void 0:n.toLocaleLowerCase())===o.toLocaleLowerCase():!1};class $Pe{constructor(e,r){E2.set(this,void 0),N1.set(this,void 0),o4.set(this,void 0);const n=3*60*1e3;Ag(this,E2,new Hn({expire:n,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.get("v4","json$",{azureId:i,expand:["manager","positions"]},{signal:o})}}),"f"),Ag(this,N1,new Hn({expire:n,queueOperator:"merge",key:({search:i})=>i,client:{fn:({search:i},o)=>e.query("v2","json$",{search:i},{signal:o})}}),"f"),Ag(this,o4,new Hn({expire:n,queueOperator:"merge",key:({azureId:i})=>i,client:{fn:({azureId:i},o)=>e.photo("v2","blob$",{azureId:i},{signal:o}).pipe(X(a=>a.blob),nt(a=>{var s;if(a.name==="ApiProviderError"&&((s=a.response)===null||s===void 0?void 0:s.status)===404&&(r!=null&&r.fallbackImage))return Ke(r==null?void 0:r.fallbackImage);throw a}))}}),"f")}search(e){const{search:r,signal:n}=e;return A1(this,N1,"f").query({search:r},{signal:n}).pipe(bd)}getPhoto(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonPhotoByAzureId(r,i);if(n)return this._getPersonPhotoByUpn(n,i);throw Error("invalid args provided")}getPerson(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonByAzureId(r,i);if(n)return this._getPersonByUpn(n,i);throw Error("invalid args provided")}getPersonInfo(e){const{azureId:r,upn:n,signal:i}=e;if(r)return this._getPersonInfoById(r,i);if(n)return this._getPersonInfoByUpn(n,i);throw Error("invalid args provided")}_getPersonByUpn(e,r){const n=r?El(r,"abort"):qt;return ec(this._personCache$({upn:e}),this._getPersonInfoByUpn(e,r).pipe(le(Ni("v2")),ut(({azureUniqueId:i})=>this._getPersonByAzureId(i,r)))).pipe(le(Ni("v4")),Zl(n))}_getPersonByAzureId(e,r){return A1(this,E2,"f").query({azureId:e},{signal:r}).pipe(bd)}_getPersonInfoById(e,r){const n=r?El(r,"abort"):qt;return ec(this._personCache$({azureId:e}),this._queryCache$({azureId:e}),this._getPersonByAzureId(e,r)).pipe(le(Ni("v2")),Zl(n))}_getPersonInfoByUpn(e,r){const n=Tg({upn:e}),i=r?El(r,"abort"):qt;return ec(this._personCache$({upn:e}),this._queryCache$({upn:e}),A1(this,N1,"f").query({search:e},{signal:r}).pipe(X(o=>o.value.find(n)),Ah(Ni("v2")))).pipe(Ah(Ni("v2")),le(Ni("v2")),le(Ni("v2")),Zl(i))}_getPersonPhotoByAzureId(e,r){return A1(this,o4,"f").query({azureId:e},{signal:r}).pipe(e2(1),X(n=>URL.createObjectURL(n.value)))}_getPersonPhotoByUpn(e,r){return this._getPersonInfoByUpn(e,r).pipe(e2(1),ut(n=>this._getPersonPhotoByAzureId(n.azureUniqueId,r)))}_personCache$(e){const r=Tg(e);return A1(this,E2,"f").cache.state$.pipe(e2(1),X(n=>{var i;return(i=Object.values(n).find(o=>r(o.value)))===null||i===void 0?void 0:i.value}),Ah(Ni("v4")),le(Ni("v4")))}_queryCache$(e){const r=Tg(e);return A1(this,N1,"f").cache.state$.pipe(e2(1),ut(n=>Ie(Object.values(n)).pipe(X(i=>i.value.find(o=>r(o))),Ah(Ni("v2")))),Ah(Ni("v2")),le(Ni("v2")))}}E2=new WeakMap,N1=new WeakMap,o4=new WeakMap;const HPe=t=>({getDetails(e){return Jr(t.getPerson(e).pipe(X(r=>Object.assign(Object.assign({},r),{azureId:r.azureUniqueId}))))},getInfo(e){return Jr(t.getPersonInfo(e).pipe(X(r=>Object.assign(Object.assign({},r),{azureId:r.azureUniqueId}))))},getPhoto(e){return Jr(t.getPhoto(e))},search(e){return Jr(t.search(e).pipe(X(r=>r.map(n=>Object.assign(Object.assign({},n),{azureId:n.azureUniqueId})))))}});var RPe=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const LPe=(t,e)=>g.lazy(()=>RPe(void 0,void 0,void 0,function*(){const r=yield t.createPeopleClient(),n=new $Pe(r,e),i=HPe(n);return{default:({children:a})=>w.jsx(TPe,{resolver:i,children:a})}})),VPe=t=>{const{children:e,options:r,fallback:n}=t,i=WA("services");if(!i)throw Error("missing service module");const o=g.useMemo(()=>LPe(i,r),[i,r]);return w.jsx(g.Suspense,{fallback:n||w.jsx(w.Fragment,{}),children:w.jsx(o,{children:e})})},DPe='<svg height="24px" width="24px" fill="#999" viewBox="0 0 24 24" title="person" role="img" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="#eee" /><path d="M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm2 4c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2Zm4 10c-.2-.71-3.3-2-6-2-2.69 0-5.77 1.28-6 2h12ZM4 18c0-2.66 5.33-4 8-4s8 1.34 8 4v2H4v-2Z" fill-rule="evenodd" clip-rule="evenodd" class="sc-dmqHEX eydzYY"></path></svg>',OPe=document.getElementById("root"),NPe=new Blob([DPe],{type:"image/svg+xml"});Ig.createRoot(OPe).render(w.jsx(JY,{theme:M,children:w.jsx(XW,{configure:JJ,fallback:w.jsx(UT,{text:"Loading framework"}),children:w.jsx(VPe,{options:{fallbackImage:NPe},children:w.jsx(vPe,{})})})}));
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "10.3.
|
|
1
|
+
export declare const version = "10.3.1";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@equinor/fusion-react-side-sheet": "1.3.3",
|
|
68
68
|
"@equinor/fusion-react-styles": "^0.6.0",
|
|
69
69
|
"@equinor/fusion-wc-chip": "^1.2.1",
|
|
70
|
-
"@equinor/fusion-wc-person": "^3.0.
|
|
70
|
+
"@equinor/fusion-wc-person": "^3.0.6",
|
|
71
71
|
"@material-ui/styles": "^4.11.5",
|
|
72
72
|
"@types/adm-zip": "^0.5.0",
|
|
73
73
|
"@types/loader-utils": "^2.0.6",
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"@equinor/fusion-framework-app": "^9.1.15",
|
|
89
89
|
"@equinor/fusion-framework-module-app": "^6.1.0",
|
|
90
90
|
"@equinor/fusion-framework-module-bookmark": "^2.0.1",
|
|
91
|
-
"@equinor/fusion-framework-module-context": "^5.0.14",
|
|
92
91
|
"@equinor/fusion-framework-module-feature-flag": "^1.1.11",
|
|
93
92
|
"@equinor/fusion-framework-module-msal": "^3.1.5",
|
|
93
|
+
"@equinor/fusion-framework-module-context": "^5.0.14",
|
|
94
94
|
"@equinor/fusion-framework-module-navigation": "^4.0.7",
|
|
95
95
|
"@equinor/fusion-framework-module-services": "^5.0.0",
|
|
96
|
-
"@equinor/fusion-framework-react-components-bookmark": "^1.0.2",
|
|
97
96
|
"@equinor/fusion-framework-react": "^7.3.3",
|
|
98
|
-
"@equinor/fusion-framework-react-components-people-provider": "^1.4.
|
|
97
|
+
"@equinor/fusion-framework-react-components-people-provider": "^1.4.15",
|
|
98
|
+
"@equinor/fusion-framework-react-components-bookmark": "^1.0.2",
|
|
99
99
|
"@equinor/fusion-framework-react-module-bookmark": "^2.2.2",
|
|
100
100
|
"@equinor/fusion-observable": "^8.4.3",
|
|
101
101
|
"@equinor/fusion-query": "^5.1.5"
|