@reltio/remotes 1.4.1023 → 1.4.1024

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/3500.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3500],{28101:(e,t,r)=>{r.d(t,{G:()=>h});var n=r(24328),o=r.n(n),l=r(71153),a=r.n(l),i=r(39475),s=r(79692),c=r(41128);const u=(0,s.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,c.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 d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const h=e=>{let{buttonsProps:t,activeIndexId:r,className:n,onButtonClick:l,classes:s={}}=e;const c=u(),{active:h,buttonWrapper:m}=s,g=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,n)},t.map((e=>{let{id:t}=e,n=p(e,["id"]);return o().createElement(i.k,d({},n,{classes:g,size:"S",key:t,className:a()({[a()(c.active,h)]:r===t},c.buttonWrapper,m),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,r)=>{r.d(t,{h:()=>a});var n=r(24328),o=r.n(n);const l=(0,r(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:r,children:n}=e;const a=l();return o().createElement("div",{className:a.contentWrapper,style:{width:`${r?t:0}px`}},r&&o().createElement(o().Fragment,null,n))}},13500:(e,t,r)=>{r.r(t),r.d(t,{default:()=>pe});var n=r(24328),o=r.n(n),l=r(52730),a=r(36138),i=r(97333),s=r(22664),c=r(52844),u=r(89810),d=r(87378),p=r(1627),h=r(87918),m=r.n(h),g=r(17440),f=r(29627);function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b=(e,t)=>{const r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){v(e,t,r[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),n=Object.keys(r);return n.length>50&&delete r[n[0]],r},y=o().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{}});y.displayName="GraphStateContext";var E=r(71153),x=r.n(E),w=r(33109),S=r(62901),N=r(72316),O=r(95544),j=r(79692);const k=(0,j.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),C=(0,n.memo)((e=>{let{className:t}=e;const r=k(),n=(0,l.useSelector)(u.ZP.selectors.getEntity),a=(0,l.useSelector)(u.ZP.selectors.getRangeColors);return o().createElement(w.Z,{className:x()(t,S.U),entity:n,rangeColorsConfig:a},o().createElement(O.Z,{className:r.comments},o().createElement(N.Z,{uri:n.uri,relatedObjectUris:(0,p.wp9)(p.q7e.ENTITY,{entityUri:n.uri}),objectType:p.q7e.ENTITY})))}));C.displayName="GraphProfileBand";const P=C;var R=r(11821),U=r(28101),Z=r(82726);const T=(0,j.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function G(){return G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G.apply(this,arguments)}const I=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["styles"]);return o().createElement("svg",G({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),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 z=r(50548);const L=(0,z.l)(y,(0,g.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return o().createElement(w.Z,{entity:t})}));var D=r(15177);const H=(0,j.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),W=(0,z.l)(y,(0,g.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:r}=e;const n=H();return o().createElement("div",{className:n.wrapper},r&&o().createElement(d.Z,null),o().createElement(D.Z,{entity:t,caption:m().text("Entity details"),className:n.noShadowBlock}))}));let F;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(F||(F={}));const M=(0,n.memo)((()=>{var e;const t=T(),[r,l]=(0,n.useState)(null),a=(0,n.useCallback)((e=>{l((t=>t===e?null:e))}),[]),i=null!==r,s=(0,n.useMemo)((()=>[{buttonProps:{id:F.Relationship,icon:I,tooltipTitle:m().text("Relationship")},content:"Relationship"},{buttonProps:{id:F.EntityDetails,icon:Z.Z,tooltipTitle:m().text("Entity Details")},content:o().createElement(W,null)}]),[]);return o().createElement("div",{className:t.wrapper},o().createElement(R.h,{open:i,width:480},o().createElement(L,null),null===(e=s[r])||void 0===e?void 0:e.content),o().createElement(U.G,{buttonsProps:(0,g.pluck)("buttonProps",s),onButtonClick:a,activeIndexId:r}))}));M.displayName="GraphRightSidePanel";const A=M;var V=r(4986);const $=e=>{let{children:t}=e;return o().createElement(V.SigmaContainer,{style:{background:"transparent"}},t)};var B=r(28833),Y=r.n(B),_=r(3660),q=r.n(_),X=r(98996),J=r.n(X),K=r(60715),Q=r(35174);function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){te(e,t,r[t])}))}return e}function te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const re=e=>{let{data:t,selectedNode:r,onNodeClick:o}=e;const a=(0,n.useCallback)((e=>{Y().assign(e);const t=q().inferSettings(e);q().assign(e,{settings:t,iterations:600})}),[]);return(e=>{let{data:t,arrangeNodes:r,selectedNode:o,onNodeClick:a}=e;const i=(0,V.useSigma)(),s=(0,V.useLoadGraph)(),c=(0,V.useRegisterEvents)(),d=(0,V.useSetSettings)(),p=(0,l.useSelector)(u.ZP.selectors.getEntity),[h,m]=(0,n.useState)({hoverNode:void 0,hoverNeighbours:void 0}),[g,f]=(0,n.useState)(null),[v,b]=(0,n.useState)({});(0,n.useEffect)((()=>{const e=new(J());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:1,color:"rgba(0, 0, 0, 0.2)"})})),r(e),s(e),f((0,Q.toUndirected)(e)),i.getCamera().animatedUnzoom()}),[s,t,i,r]);const y=(0,n.useCallback)((e=>{const t=i.getGraph(),r=null==p?void 0:p.uri;if(t&&g&&r&&e&&r!==e){const n=(0,K.Ar)(g,r,e),o=((e,t)=>{const r=[];return t.reduce(((t,n)=>(r.push(e.edge(t,n)||e.edge(n,t)),n))),r})(t,n);return{edges:o,nodes:n}}return{}}),[i,null==p?void 0:p.uri,g]);(0,n.useEffect)((()=>{b(y(o))}),[o,y]),(0,n.useEffect)((()=>{c({enterNode:e=>{let{node:t}=e;const r=i.getGraph();m({hoverNode:t,hoverNeighbours:r.neighbors(t)})},leaveNode:()=>{m({hoverNode:void 0,hoverNeighbours:void 0})},clickNode:e=>{let{node:t}=e;a(t)}})}),[i,c,a]),(0,n.useEffect)((()=>{d({nodeReducer:(e,t)=>{const r=ee({},t),n=(v.nodes||[]).includes(e);return!h.hoverNeighbours||h.hoverNeighbours.includes(e)||h.hoverNode===e||n||(r.label="",r.color="#f6f6f6"),e===o&&(r.color="red"),e===(null==p?void 0:p.uri)&&(r.color="green"),r},edgeReducer:(e,t)=>{const r=i.getGraph(),n=ee({},t,{hidden:!1}),o=(v.edges||[]).includes(e);return!h.hoverNode||r.hasExtremity(e,h.hoverNode)||o||(n.hidden=!0),o&&(n.color="#0072CE",n.size=4),n}})}),[i,d,h,o,v,null==p?void 0:p.uri])})({arrangeNodes:a,data:t,selectedNode:r,onNodeClick:o}),null},ne=(0,j.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});var oe=r(84425);const le=(0,j.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),ae=(0,z.l)(y,(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;return{setGraphTypeUri:r,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;const a=le(),i=(0,l.useSelector)(u.ZP.selectors.getMetadata),s=(0,l.useSelector)(u.ZP.selectors.getEntity),c=(0,n.useMemo)((()=>[{label:m().text("All"),value:null},...(0,p.mmY)(i,s.type).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}}))]),[s,i]),d=(0,n.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return o().createElement(oe.Z,{classes:{valueContainer:a.valueContainer},className:a.graphTypeSelector,height:42,label:m().text("Graph type"),value:d,options:c,onChange:e=>r(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:a.filledInputRoot}}}})})),ie=(0,z.l)(y,(e=>{let{data:t,selectedEntity:r,onEntitySelect:n}=e;return{data:t,selectedNode:null==r?void 0:r.uri,onNodeSelect:n}}),(e=>{let{data:t,selectedNode:r,onNodeSelect:l}=e;const a=(0,n.useMemo)((()=>t&&(e=>{var t;const r=new Set,n=new Set;e.entities.forEach((e=>r.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>r.has(e.startObject.objectURI)&&r.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 o=e.entities.map((e=>({id:e.uri,name:e.label}))),l=[];return n.forEach((e=>{const t=e.split("--");l.push({from:t[0],to:t[1]})})),{nodes:o,edges:l}})(t)),[t]),i=ne();return o().createElement("div",{className:i.wrapper},o().createElement("div",{className:i.selectors},o().createElement(ae,null)),o().createElement("div",{className:i.graph},a&&o().createElement($,null,o().createElement(re,{data:a,selectedNode:r,onNodeClick:l}))))})),se=(0,j.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"}}))),ce=(0,n.memo)((()=>{const e=se(),t=(0,l.useSelector)(u.ZP.selectors.getEntity),r=(e=>{const{graphLoading:t,data:r,graphTypeUri:o,setGraphTypeUri:a}=(e=>{const[t,r]=(0,n.useState)(null),o=(0,l.useDispatch)(),[a,i]=(0,n.useState)(null),[s,c]=(0,n.useState)(!1),d=null==e?void 0:e.uri,h=(0,p.biM)(e);return(0,n.useEffect)((()=>(!d||(0,p.ZiX)(d)||h||(c(!0),(0,p.ZYI)({uri:d,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,p.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then(i).catch((e=>{i(null),o(u.ui.actions.errorSet((0,p.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{c(!1)}))),()=>{i(null),c(!1)})),[d,h,o,t]),{graphLoading:s,data:a,graphTypeUri:t,setGraphTypeUri:r}})(e),{selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c}=((e,t)=>{const r=(0,f._)(),o=(0,l.useDispatch)(),[a,i]=(0,n.useState)(null),s=(0,n.useRef)({}),[c,d]=(0,n.useState)(!1),h=(0,n.useCallback)((e=>{var n;if(s.current[e])return void i(s.current[e]);const l=null==t||null===(n=t.entities)||void 0===n?void 0:n.find((0,g.propEq)("uri",e));l&&i(l),d(!0),r((0,p.HvW)(e)).then((e=>{s.current=b(s.current,e),i(e)})).catch((e=>{o(u.ui.actions.errorSet((0,p.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{d(!1)}))}),[o,t,r]);return(0,n.useEffect)((()=>{null!=e&&e.uri&&(s.current=b({},e),h(e.uri))}),[null==e?void 0:e.uri]),(0,n.useEffect)((()=>{const r=null==t?void 0:t.entities.find((e=>(null==a?void 0:a.uri)===e.uri));r||(null!=e&&e.uri?(s.current=b({},e),h(e.uri)):(s.current={},i(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:a,onEntitySelect:h}})(e,r);return{graphLoading:t,data:r,selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c,graphTypeUri:o,setGraphTypeUri:a}})(t),{graphLoading:a}=r;return o().createElement(y.Provider,{value:r},o().createElement("div",{className:e.perspectiveView},a&&o().createElement(d.Z,null),(null==t?void 0:t.uri)&&o().createElement("div",{className:e.graphContainer},o().createElement("div",{className:e.graphWrapper},o().createElement(P,null),o().createElement(ie,null)),o().createElement(A,null))))}));ce.displayName="GraphPerspectiveView";const ue=ce,de=(0,a.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),pe=e=>{let{store:t}=e;return o().createElement(l.Provider,{store:t},o().createElement(a.StylesProvider,{generateClassName:de},o().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},o().createElement(ue,null),o().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);