@reltio/remotes 1.4.1008 → 1.4.1011
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/1886.js +1 -1
- package/7110.js +1 -1
- package/7864.js +1 -1
- package/package.json +1 -1
package/1886.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1886],{28101:(e,t,n)=>{n.d(t,{G:()=>f});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(39475),c=n(79692),s=n(41128);const d=(0,c.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,s.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const f=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:c={}}=e;const s=d(),{active:f,buttonWrapper:m}=c,h=p(c,["active","buttonWrapper"]);return o().createElement("div",{className:a()(s.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,u({},r,{classes:h,size:"S",key:t,className:a()({[a()(s.active,f)]:n===t},s.buttonWrapper,m),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>a});var r=n(24328),o=n.n(r);const l=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),a=e=>{let{width:t,open:n,children:r}=e;const a=l();return o().createElement("div",{className:a.contentWrapper,style:{width:`${n?t:0}px`}},n&&o().createElement(o().Fragment,null,r))}},71886:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ae});var r=n(24328),o=n.n(r),l=n(52730),a=n(36138),i=n(97333),c=n(22664),s=n(52844),d=n(89810),u=n(87378),p=n(79692);const f=(0,p.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var m=n(4171),h=n(87918),v=n.n(h),g=n(17440),b=n(29627);function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},x=o().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{}});x.displayName="GraphStateContext";var w=n(71153),S=n.n(w),O=n(33109),N=n(62901),j=n(72316),k=n(95544);const P=(0,p.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),C=(0,r.memo)((e=>{let{className:t}=e;const n=P(),r=(0,l.useSelector)(d.ZP.selectors.getEntity),a=(0,l.useSelector)(d.ZP.selectors.getRangeColors);return o().createElement(O.Z,{className:S()(t,N.U),entity:r,rangeColorsConfig:a},o().createElement(k.Z,{className:n.comments},o().createElement(j.Z,{uri:r.uri,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:r.uri}),objectType:m.q7e.ENTITY})))}));C.displayName="GraphProfileBand";const R=C;var Z=n(11821),I=n(28101),L=n(82726);const D=(0,p.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function z(){return z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}const H=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",z({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var U=n(50548);const G=(0,U.l)(x,(0,g.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return o().createElement(O.Z,{entity:t})}));var T=n(15177);const W=(0,p.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),V=(0,U.l)(x,(0,g.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=W();return o().createElement("div",{className:r.wrapper},n&&o().createElement(u.Z,null),o().createElement(T.Z,{entity:t,caption:v().text("Entity details"),className:r.noShadowBlock}))}));let $;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}($||($={}));const B=(0,r.memo)((()=>{var e;const t=D(),[n,l]=(0,r.useState)(null),a=(0,r.useCallback)((e=>{l((t=>t===e?null:e))}),[]),i=null!==n,c=(0,r.useMemo)((()=>[{buttonProps:{id:$.Relationship,icon:H,tooltipTitle:v().text("Relationship")},content:"Relationship"},{buttonProps:{id:$.EntityDetails,icon:L.Z,tooltipTitle:v().text("Entity Details")},content:o().createElement(V,null)}]),[]);return o().createElement("div",{className:t.wrapper},o().createElement(Z.h,{open:i,width:480},o().createElement(G,null),null===(e=c[n])||void 0===e?void 0:e.content),o().createElement(I.G,{buttonsProps:(0,g.pluck)("buttonProps",c),onButtonClick:a,activeIndexId:n}))}));B.displayName="GraphRightSidePanel";const M=B;var F=n(4986);const Y=e=>{let{children:t}=e;return o().createElement("div",{style:{height:"calc(100% - 5px)"}},o().createElement(F.SigmaContainer,{style:{background:"transparent"}},t))};var _=n(98996),q=n.n(_),A=n(28833),X=n.n(A),J=n(3660),K=n.n(J);function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ee(e,t,n[t])}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=e=>{let{data:t,selectedNode:n,onNodeClick:o}=e;const l=(0,F.useSigma)(),a=(0,F.useRegisterEvents)(),i=(0,F.useLoadGraph)(),c=(0,F.useSetSettings)(),[s,d]=(0,r.useState)({hoverNode:void 0,hoverNeighbours:void 0});return(0,r.useEffect)((()=>{const e=new(q());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{e.addEdge(t.from,t.to,{size:5})})),X().assign(e);const n=K().inferSettings(e);K().assign(e,{settings:n,iterations:600}),i(e)}),[i,t]),(0,r.useEffect)((()=>{a({enterNode:e=>{let{node:n}=e;d({hoverNode:n,hoverNeighbours:t.edges.filter((e=>e.from===n||e.to===n)).map((e=>{var r,o;const l=e.from===n?e.to:e.from;return null!==(r=null===(o=t.nodes.find((e=>e.id===l)))||void 0===o?void 0:o.id)&&void 0!==r?r:""}))})},leaveNode:()=>{d({hoverNode:void 0,hoverNeighbours:void 0})},clickNode:e=>{let{node:t}=e;o(t)}})}),[l,a,t,o]),(0,r.useEffect)((()=>{c({nodeReducer:(e,t)=>{const r=Q({},t);return s.hoverNeighbours&&!s.hoverNeighbours.includes(e)&&s.hoverNode!==e&&(r.label="",r.color="#f6f6f6"),e===n&&(r.color="red"),r},edgeReducer:(e,t)=>{const n=l.getGraph(),r=Q({},t,{hidden:!1});return s.hoverNode&&!n.hasExtremity(e,s.hoverNode)&&(r.hidden=!0),r}})}),[l,c,s,n]),null},ne=(0,U.l)(x,(e=>{let{data:t,selectedEntity:n,onEntitySelect:r}=e;return{data:t,selectedNode:null==n?void 0:n.uri,onNodeSelect:r}}),(e=>{let{data:t,selectedNode:n,onNodeSelect:l}=e;const a=(0,r.useMemo)((()=>t&&(e=>{const t=new Set,n=new Set;e.entities.forEach((e=>t.add(e.uri))),e.relations.filter((e=>t.has(e.startObject.objectURI)&&t.has(e.endObject.objectURI))).forEach((e=>{n.has(`${e.endObject.objectURI}--${e.startObject.objectURI}`)||n.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.direction}`)}));const r=e.entities.map((e=>({id:e.uri,name:e.label}))),o=[];return n.forEach((e=>{const t=e.split("--");o.push({from:t[0],to:t[1]})})),{nodes:r,edges:o}})(t)),[t]);return a&&o().createElement(Y,null,o().createElement(te,{data:a,selectedNode:n,onNodeClick:l}))})),re=(0,r.memo)((()=>{const e=(0,l.useDispatch)();(0,r.useEffect)((()=>{e(d.N5.entity.actions.entityLoaded({uri:"entities/1IPdCSY1",type:"configuration/entityTypes/HCP"}))}),[e]);const t=f(),n=(0,l.useSelector)(d.ZP.selectors.getEntity),a=(e=>{const{graphLoading:t,data:n}=(e=>{const t=(0,l.useDispatch)(),[n,o]=(0,r.useState)(null),[a,i]=(0,r.useState)(!1),c=null==e?void 0:e.uri,s=(0,m.biM)(e);return(0,r.useEffect)((()=>(!c||(0,m.ZiX)(c)||s||(i(!0),(0,m.ZYI)({uri:c,deep:2,limitCreditsConsumption:!0,graphTypes:null,activenessDate:null}).then(o).catch((e=>{o(null),t(d.ui.actions.errorSet((0,m.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{i(!1)}))),()=>{o(null),i(!1)})),[c,s,t]),{graphLoading:a,data:n}})(e),{selectedEntity:o,onEntitySelect:a,selectedEntityLoading:i}=((e,t)=>{const n=(0,b._)(),o=(0,l.useDispatch)(),[a,i]=(0,r.useState)(null),c=(0,r.useRef)({}),[s,u]=(0,r.useState)(!1),p=(0,r.useCallback)((e=>{var r;if(c.current[e])return void i(c.current[e]);const l=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,g.propEq)("uri",e));l&&i(l),u(!0),n((0,m.HvW)(e)).then((e=>{c.current=E(c.current,e),i(e)})).catch((e=>{o(d.ui.actions.errorSet((0,m.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[o,t,n]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(c.current=E({},e),p(e.uri))}),[null==e?void 0:e.uri]),{selectedEntityLoading:s,selectedEntity:a,onEntitySelect:p}})(e,n);return{graphLoading:t,data:n,selectedEntity:o,onEntitySelect:a,selectedEntityLoading:i}})(n),{graphLoading:i}=a;return o().createElement(x.Provider,{value:a},o().createElement("div",{className:t.perspectiveView},i&&o().createElement(u.Z,null),(null==n?void 0:n.uri)&&o().createElement("div",{className:t.graphContainer},o().createElement("div",{className:t.graphWrapper},o().createElement(R,null),o().createElement(ne,null)),o().createElement(M,null))))}));re.displayName="GraphPerspectiveView";const oe=re,le=(0,a.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),ae=e=>{let{store:t}=e;return o().createElement(l.Provider,{store:t},o().createElement(a.StylesProvider,{generateClassName:le},o().createElement(c.MuiPickersUtilsProvider,{utils:s.Z},o().createElement(oe,null),o().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[1886],{28101:(e,t,n)=>{n.d(t,{G:()=>f});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(39475),c=n(79692),s=n(41128);const d=(0,c.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,s.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const f=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:c={}}=e;const s=d(),{active:f,buttonWrapper:m}=c,h=p(c,["active","buttonWrapper"]);return o().createElement("div",{className:a()(s.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,u({},r,{classes:h,size:"S",key:t,className:a()({[a()(s.active,f)]:n===t},s.buttonWrapper,m),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>a});var r=n(24328),o=n.n(r);const l=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),a=e=>{let{width:t,open:n,children:r}=e;const a=l();return o().createElement("div",{className:a.contentWrapper,style:{width:`${n?t:0}px`}},n&&o().createElement(o().Fragment,null,r))}},71886:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ae});var r=n(24328),o=n.n(r),l=n(52730),a=n(36138),i=n(97333),c=n(22664),s=n(52844),d=n(89810),u=n(87378),p=n(79692);const f=(0,p.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var m=n(4171),h=n(87918),v=n.n(h),g=n(17440),b=n(29627);function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},x=o().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{}});x.displayName="GraphStateContext";var w=n(71153),S=n.n(w),O=n(33109),N=n(62901),j=n(72316),k=n(95544);const P=(0,p.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),C=(0,r.memo)((e=>{let{className:t}=e;const n=P(),r=(0,l.useSelector)(d.ZP.selectors.getEntity),a=(0,l.useSelector)(d.ZP.selectors.getRangeColors);return o().createElement(O.Z,{className:S()(t,N.U),entity:r,rangeColorsConfig:a},o().createElement(k.Z,{className:n.comments},o().createElement(j.Z,{uri:r.uri,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:r.uri}),objectType:m.q7e.ENTITY})))}));C.displayName="GraphProfileBand";const R=C;var Z=n(11821),I=n(28101),L=n(82726);const D=(0,p.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function z(){return z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(this,arguments)}const H=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",z({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var U=n(50548);const G=(0,U.l)(x,(0,g.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return o().createElement(O.Z,{entity:t})}));var T=n(15177);const W=(0,p.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),V=(0,U.l)(x,(0,g.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=W();return o().createElement("div",{className:r.wrapper},n&&o().createElement(u.Z,null),o().createElement(T.Z,{entity:t,caption:v().text("Entity details"),className:r.noShadowBlock}))}));let $;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}($||($={}));const B=(0,r.memo)((()=>{var e;const t=D(),[n,l]=(0,r.useState)(null),a=(0,r.useCallback)((e=>{l((t=>t===e?null:e))}),[]),i=null!==n,c=(0,r.useMemo)((()=>[{buttonProps:{id:$.Relationship,icon:H,tooltipTitle:v().text("Relationship")},content:"Relationship"},{buttonProps:{id:$.EntityDetails,icon:L.Z,tooltipTitle:v().text("Entity Details")},content:o().createElement(V,null)}]),[]);return o().createElement("div",{className:t.wrapper},o().createElement(Z.h,{open:i,width:480},o().createElement(G,null),null===(e=c[n])||void 0===e?void 0:e.content),o().createElement(I.G,{buttonsProps:(0,g.pluck)("buttonProps",c),onButtonClick:a,activeIndexId:n}))}));B.displayName="GraphRightSidePanel";const M=B;var F=n(4986);const _=e=>{let{children:t}=e;return o().createElement("div",{style:{height:"calc(100% - 5px)"}},o().createElement(F.SigmaContainer,{style:{background:"transparent"}},t))};var q=n(98996),A=n.n(q),Y=n(28833),X=n.n(Y),J=n(3660),K=n.n(J);function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ee(e,t,n[t])}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=e=>{let{data:t,selectedNode:n,onNodeClick:o}=e;const l=(0,F.useSigma)(),a=(0,F.useRegisterEvents)(),i=(0,F.useLoadGraph)(),c=(0,F.useSetSettings)(),[s,d]=(0,r.useState)({hoverNode:void 0,hoverNeighbours:void 0});return(0,r.useEffect)((()=>{const e=new(A());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{e.addEdge(t.from,t.to,{size:5})})),X().assign(e);const n=K().inferSettings(e);K().assign(e,{settings:n,iterations:600}),i(e)}),[i,t]),(0,r.useEffect)((()=>{a({enterNode:e=>{let{node:n}=e;d({hoverNode:n,hoverNeighbours:t.edges.filter((e=>e.from===n||e.to===n)).map((e=>{var r,o;const l=e.from===n?e.to:e.from;return null!==(r=null===(o=t.nodes.find((e=>e.id===l)))||void 0===o?void 0:o.id)&&void 0!==r?r:""}))})},leaveNode:()=>{d({hoverNode:void 0,hoverNeighbours:void 0})},clickNode:e=>{let{node:t}=e;o(t)}})}),[l,a,t,o]),(0,r.useEffect)((()=>{c({nodeReducer:(e,t)=>{const r=Q({},t);return s.hoverNeighbours&&!s.hoverNeighbours.includes(e)&&s.hoverNode!==e&&(r.label="",r.color="#f6f6f6"),e===n&&(r.color="red"),r},edgeReducer:(e,t)=>{const n=l.getGraph(),r=Q({},t,{hidden:!1});return s.hoverNode&&!n.hasExtremity(e,s.hoverNode)&&(r.hidden=!0),r}})}),[l,c,s,n]),null},ne=(0,U.l)(x,(e=>{let{data:t,selectedEntity:n,onEntitySelect:r}=e;return{data:t,selectedNode:null==n?void 0:n.uri,onNodeSelect:r}}),(e=>{let{data:t,selectedNode:n,onNodeSelect:l}=e;const a=(0,r.useMemo)((()=>t&&(e=>{const t=new Set,n=new Set;e.entities.forEach((e=>t.add(e.uri))),e.relations.filter((e=>t.has(e.startObject.objectURI)&&t.has(e.endObject.objectURI))).forEach((e=>{n.has(`${e.endObject.objectURI}--${e.startObject.objectURI}`)||n.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.direction}`)}));const r=e.entities.map((e=>({id:e.uri,name:e.label}))),o=[];return n.forEach((e=>{const t=e.split("--");o.push({from:t[0],to:t[1]})})),{nodes:r,edges:o}})(t)),[t]);return a&&o().createElement(_,null,o().createElement(te,{data:a,selectedNode:n,onNodeClick:l}))})),re=(0,r.memo)((()=>{const e=(0,l.useDispatch)();(0,r.useEffect)((()=>{e(d.N5.entity.actions.entityLoaded(window.entity||{uri:"entities/1E4ASbuq",type:"configuration/entityTypes/HCP"}))}),[e]);const t=f(),n=(0,l.useSelector)(d.ZP.selectors.getEntity),a=(e=>{const{graphLoading:t,data:n}=(e=>{const t=(0,l.useDispatch)(),[n,o]=(0,r.useState)(null),[a,i]=(0,r.useState)(!1),c=null==e?void 0:e.uri,s=(0,m.biM)(e);return(0,r.useEffect)((()=>(!c||(0,m.ZiX)(c)||s||(i(!0),(0,m.ZYI)({uri:c,deep:2,limitCreditsConsumption:!0,graphTypes:null,activenessDate:null}).then(o).catch((e=>{o(null),t(d.ui.actions.errorSet((0,m.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{i(!1)}))),()=>{o(null),i(!1)})),[c,s,t]),{graphLoading:a,data:n}})(e),{selectedEntity:o,onEntitySelect:a,selectedEntityLoading:i}=((e,t)=>{const n=(0,b._)(),o=(0,l.useDispatch)(),[a,i]=(0,r.useState)(null),c=(0,r.useRef)({}),[s,u]=(0,r.useState)(!1),p=(0,r.useCallback)((e=>{var r;if(c.current[e])return void i(c.current[e]);const l=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,g.propEq)("uri",e));l&&i(l),u(!0),n((0,m.HvW)(e)).then((e=>{c.current=E(c.current,e),i(e)})).catch((e=>{o(d.ui.actions.errorSet((0,m.xU7)(e,v().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[o,t,n]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(c.current=E({},e),p(e.uri))}),[null==e?void 0:e.uri]),{selectedEntityLoading:s,selectedEntity:a,onEntitySelect:p}})(e,n);return{graphLoading:t,data:n,selectedEntity:o,onEntitySelect:a,selectedEntityLoading:i}})(n),{graphLoading:i}=a;return o().createElement(x.Provider,{value:a},o().createElement("div",{className:t.perspectiveView},i&&o().createElement(u.Z,null),(null==n?void 0:n.uri)&&o().createElement("div",{className:t.graphContainer},o().createElement("div",{className:t.graphWrapper},o().createElement(R,null),o().createElement(ne,null)),o().createElement(M,null))))}));re.displayName="GraphPerspectiveView";const oe=re,le=(0,a.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),ae=e=>{let{store:t}=e;return o().createElement(l.Provider,{store:t},o().createElement(a.StylesProvider,{generateClassName:le},o().createElement(c.MuiPickersUtilsProvider,{utils:s.Z},o().createElement(oe,null),o().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
|