@reltio/remotes 1.4.1042 → 1.4.1043
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/1041.js +1 -1
- package/1707.js +1 -1
- package/2602.js +1 -1
- package/2958.js +1 -1
- package/3011.js +1 -1
- package/3349.js +1 -1
- package/5226.js +1 -1
- package/5337.js +1 -1
- package/6754.js +1 -1
- package/7833.js +1 -1
- package/8072.js +1 -1
- package/8684.js +1 -0
- package/8911.js +1 -1
- package/9019.js +1 -1
- package/9810.js +1 -1
- package/9915.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/9158.js +0 -1
package/8911.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8911],{44938:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),l=r.n(n),a=r(50166),o=r(44443),i=r(76444);const s=(0,r(79692).Z)({item:{overflow:"hidden"}});function c(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){p(e,t,r[t])}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const u=(0,n.memo)((e=>{let{width:t=0,height:r=0,defaultItemSize:p,data:u,children:d,itemKey:h,showNotMeasuredItems:m,listRef:y}=e;const f=s(),g=(0,n.useRef)({}),[b,v]=(0,n.useState)({}),x=(0,n.useCallback)((0,i.DsO)((()=>{v(c({},g.current))})),[]),E=(0,n.useCallback)(((e,t)=>h?h(t,e):t),[h]),w=(0,n.useRef)(),S=y||w;S.current&&S.current.resetAfterIndex(0,!1);const T=(0,n.useMemo)((()=>e=>{let{data:t,index:r,style:n}=e;const a=E(t,r);return l().createElement("div",{style:n,className:f.item},l().createElement("div",{style:m?void 0:{visibility:a in b?void 0:"hidden"}},l().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[a]!==t&&(((e,t)=>{g.current=c({},g.current,{[e]:t})})(a,t),x())}}),d({data:t,index:r})))}),[d,m,E,x,!m&&b]);return l().createElement(a.VariableSizeList,{ref:S,width:t,height:r,itemCount:u.length,itemData:u,itemSize:e=>b[(e=>E(u,e))(e)]||p,itemKey:h},T)}))},68977:(e,t,r)=>{r.d(t,{U:()=>c});var n=r(24328),l=r.n(n),a=r(87918),o=r.n(a),i=r(76444),s=r(72108);const c=(0,n.memo)((e=>{let{relationTypes:t,selectedRelationTypes:r,single:a,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:h={},disabled:m=!1}=e;const y=(0,n.useMemo)((()=>t.filter(i.Tt2)),[t]);return l().createElement(s.S,{items:y,selectedItemsUris:r,single:a,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:h,disabled:m,label:o().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:o().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,r)=>{r.d(t,{G:()=>h});var n=r(24328),l=r.n(n),a=r(71153),o=r.n(a),i=r(39475),s=r(79692),c=r(41128);const p=(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 u(){return u=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},u.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}const h=e=>{let{buttonsProps:t,activeIndexId:r,className:n,onButtonClick:a,classes:s={}}=e;const c=p(),{active:h,buttonWrapper:m}=s,y=d(s,["active","buttonWrapper"]);return l().createElement("div",{className:o()(c.container,n)},t.map((e=>{let{id:t}=e,n=d(e,["id"]);return l().createElement(i.k,u({},n,{classes:y,size:"S",key:t,className:o()({[o()(c.active,h)]:r===t},c.buttonWrapper,m),onClick:()=>a(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(24328),l=r.n(n);const a=(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})}}))),o=e=>{let{width:t,open:r,children:n}=e;const o=a();return l().createElement("div",{className:o.contentWrapper,style:{width:`${r?t:0}px`}},r&&l().createElement(l().Fragment,null,n))}},38911:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Tt});var n=r(24328),l=r.n(n),a=r(52730),o=r(36138),i=r(97333),s=r(22664),c=r(52844),p=r(89810),u=r(87378),d=r(76444),h=r(87918),m=r.n(h),y=r(17440),f=r(29627);function g(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){g(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},v=[25,50,100],x=(e,t,r)=>{const{startObject:n,endObject:l,type:a}=t,{directionalLabel:o}=(0,d.nqN)(t)===r?n:l;return o||(0,d.Lmx)(e,a)},E=(e,t,r)=>{const[l,o]=(0,n.useState)({field:"",order:"asc"}),[i,s]=(0,n.useState)(0),[c,u]=(0,n.useState)(v[0]),[h,m]=(0,n.useState)([]),f=(0,a.useSelector)(p.ZP.selectors.getMetadata),g=(0,n.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,y.zipObj)(t.map((0,y.prop)("uri")),t)}),[null==e?void 0:e.entities]),b=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((0,y.either)((0,y.pipe)(d.nqN,(0,y.equals)(t)),(0,y.pipe)(d.j5q,(0,y.equals)(t)))),(0,y.uniqBy)((0,y.prop)("uri")),(0,y.map)((e=>{const r=g[((e,t)=>{const r=(0,d.nqN)(t),n=(0,d.j5q)(t);return r===e?n:r})(t,e)];return{relation:e,entity:r,entityLabel:(0,d.idV)(r.label),entityTypeLabel:(0,d.jFi)(f,r),relationTypeLabel:x(f,e,r.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,g,f]),{searchText:E,onChangeSearchText:w,filters:S,onFilter:T,relationTypesOptions:O,entityTypesOptions:C}=(e=>{const[t,r]=(0,n.useState)(""),[l,o]=(0,n.useState)({entityTypesUris:[],relationTypesUris:[]}),i=(0,a.useSelector)(p.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:r,filters:l,onFilter:o,entityTypesOptions:(0,n.useMemo)((()=>(0,y.pipe)((0,y.map)((e=>{let{entity:t}=e;return t.type})),y.uniq,(0,y.map)((0,d.nt9)(i)))(e)),[e,i]),relationTypesOptions:(0,n.useMemo)((()=>(0,y.pipe)((0,y.map)((e=>{let{relation:t}=e;return t.type})),y.uniq,(0,y.map)((0,d.V3K)(i)))(e)),[e,i])}})(b),R=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((e=>{let{entityLabel:t,entity:r,relation:n}=e;const{entityTypesUris:l,relationTypesUris:a}=S;return t.toLowerCase().includes(E)&&(0,y.ifElse)((0,y.prop)("length"),(0,y.includes)(n.type),y.T)(a)&&(0,y.ifElse)((0,y.prop)("length"),(0,y.includes)(r.type),y.T)(l)})),l.field?(0,y.sort)(((e,t)=>d.P6Y.strings.sort(l.order,e[l.field],t[l.field]))):y.identity)(b)),[b,l,E,S]),N=(0,n.useMemo)((()=>R.slice(i*c,i*c+c)),[R,i,c]),P=(0,n.useCallback)((e=>{m((t=>[...t,e]))}),[]),k=(0,n.useCallback)((e=>{m((t=>(0,y.without)([e],t)))}),[]);return(0,n.useEffect)((()=>{s(0),w(""),T({entityTypesUris:[],relationTypesUris:[]})}),[t,r,w,T]),(0,n.useEffect)((()=>{s(0)}),[l,E,S]),{rowsData:N,onSort:o,sorting:l,searchText:E,onChangeSearchText:w,filters:S,onFilter:T,entityTypesOptions:C,relationTypesOptions:O,editingRelations:h,onStartRelationEditing:P,onFinishRelationEditing:k,total:R.length,page:i,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:u}},w=l().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});w.displayName="GraphStateContext";var S=r(71153),T=r.n(S),O=r(33109),C=r(62901),R=r(72316),N=r(95544),P=r(79692);const k=(0,P.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),j=(0,n.memo)((e=>{let{className:t}=e;const r=k(),n=(0,a.useSelector)(p.ZP.selectors.getEntity);return l().createElement(O.Z,{className:T()(t,C.U),entity:n},l().createElement(N.Z,{className:r.comments},l().createElement(R.Z,{uri:n.uri,relatedObjectUris:(0,d.wp9)(d.q7e.ENTITY,{entityUri:n.uri}),objectType:d.q7e.ENTITY})))}));j.displayName="GraphProfileBand";const L=j;var Z=r(11821),I=r(28101),U=r(82726);const z=(0,P.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});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)}const B=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["styles"]);return l().createElement("svg",D({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l().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 A=r(50548);const H=(0,A.l)(w,(0,y.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return l().createElement(O.Z,{entity:t})}));var V=r(15177);const M=(0,P.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),W=(0,A.l)(w,(0,y.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:r}=e;const n=M();return l().createElement("div",{className:n.wrapper},r&&l().createElement(u.Z,null),l().createElement(V.Z,{entity:t,caption:m().text("Entity details"),className:n.noShadowBlock}))}));var F=r(90436),G=r(42011),_=r(44443),q=r(44938),K=r(79573);const X="1px solid rgba(0, 0, 0, 0.05)",Y=(0,P.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:X},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},headRow:{borderBottom:X}});function $(){return $=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},$.apply(this,arguments)}const Q=(0,n.memo)((e=>{let{columnsData:t,sorting:r,onSort:n}=e;const a=Y();return l().createElement("div",{className:T()(a.tableRow,a.headRow)},t.map((e=>{const{id:t,sortable:a,headCellRenderer:o,columnClassName:i}=e,s=o,c=a?{sortField:r.field,sortOrder:r.order,sortHandler:()=>{n({field:t,order:r.field===t?(0,K.Dh)(r.order):"asc"})}}:{};return l().createElement("div",{key:t,className:i},l().createElement(s,$({headCellData:e},c)))})))})),J=(0,n.forwardRef)(((e,t)=>{let{classes:r,columnsData:a,rowsData:o,sorting:i,onSort:s,getRowKey:c,ExpandedRowRenderer:p,defaultRowHeight:u}=e;const d=Y(),[h,m]=(0,n.useState)({width:0,height:0}),y=(0,n.useCallback)((e=>{let{data:t,index:n}=e;const o=t[n];return l().createElement("div",{className:T()(d.tableRowWrapper,null==r?void 0:r.tableRowWrapper)},l().createElement("div",{className:T()(d.tableRow,null==r?void 0:r.tableRow)},a.map((e=>{let{id:t,rowCellValueRenderer:r,columnClassName:n}=e;const a=r;return l().createElement("div",{key:t,className:n},l().createElement(a,{value:o[t],rowValue:o}))}))),o.expanded&&p&&l().createElement(p,{open:o.expanded,rowValue:o}))}),[a,p]),f=(0,n.useCallback)(((e,t)=>{m({width:e,height:t})}),[]),g=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=g.current)||void 0===e||e.scrollTo(0)}}))),l().createElement("div",{className:d.table},l().createElement(Q,{columnsData:a,sorting:i,onSort:s}),l().createElement("div",{className:d.tableBodyWrapper},l().createElement(_.Z,{handleHeight:!0,handleWidth:!0,onResize:f}),l().createElement("div",{className:d.tableBody},l().createElement(q.Z,{listRef:g,width:h.width,height:h.height,data:o,defaultItemSize:u,itemKey:c,showNotMeasuredItems:!0},y))))})),ee=(0,n.memo)(J);var te=r(92332),re=r(83088);const ne="rgba(238, 238, 238, 1)",le=(0,P.Z)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{width:"200px"},relationshipTypeColumn:{width:"130px"},entityTypeColumn:{width:"140px"},row:{position:"relative","&:hover":{background:ne}}});function ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oe={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},ie=".collapsibleTableRow:hover &",se=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){ae(e,t,r[t])}))}return e}({},oe,{[ie]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${ne} 100%)`}}),ce=(0,P.Z)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":oe},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":se},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[ie]:{visibility:"visible",background:ne}},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"}})));function pe(){return pe=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},pe.apply(this,arguments)}function ue(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){de(e,t,r[t])}))}return e}function de(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const he=e=>{let{className:t,headCellData:r}=e,n=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["className","headCellData"]);const a=ce();return l().createElement("div",{className:T()(a.headCell,t)},l().createElement(te.default,pe({},n,{headCellData:ue({},r,{label:l().createElement(re.C,{value:r.label},l().createElement("div",{className:a.headLabel},r.label))})})))},me=(0,n.memo)((e=>{let{value:t="",tooltip:r,onClick:n,className:a}=e;const o=ce();return r=r||t,l().createElement(re.C,{value:r},l().createElement("div",{className:T()(o.defaultCell,a,{[o.clickable]:!!n}),onClick:n},t))}));var ye=r(37573);const fe=(0,A.l)(w,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:r},className:n,onClick:a}=e;const o=ce(),i=l().createElement(l().Fragment,null,l().createElement(ye.Z,{entity:r,avatarClassName:o.entityAvatar}),t);return l().createElement(me,{value:i,tooltip:t,className:T()(o.profileCell,n),onClick:()=>a(r.uri)})})),ge=(0,n.memo)((e=>{let{open:t,rowValue:r}=e;return t?l().createElement("div",{style:{padding:"6px 16px",fontSize:"13px"}},r.relation.uri):null}));var be=r(39475),ve=r(27604),xe=r(22983);const Ee=(0,A.l)(w,(e=>{let{relationshipTable:{onStartRelationEditing:t,onFinishRelationEditing:r}}=e;return{onEdit:t,onDelete:r}}),(e=>{let{rowValue:{relation:{uri:t}},className:r,onEdit:n,onDelete:a}=e;const o=ce();return l().createElement("div",{className:T()(o.controlsCell,r)},l().createElement(be.k,{className:o.editButton,icon:ve.Z,size:"XXS",tooltipTitle:m().text("Edit"),onClick:()=>n(t)}),l().createElement(be.k,{icon:xe.Z,size:"XXS",tooltipTitle:m().text("Delete"),onClick:()=>a(t)}))}));function we(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){Se(e,t,r[t])}))}return e}function Se(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Te=(e,t)=>t[e].relation.uri||`${e}`,Oe=(0,A.l)(w,(e=>{let{relationshipTable:t}=e;return we({},t)}),(e=>{let{rowsData:t,sorting:r,onSort:a,total:o,page:i,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:p,editingRelations:u}=e;const d=le(),h=(0,n.useMemo)((()=>[{id:"entityLabel",label:m().text("Profile"),headCellRenderer:he,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.profileColumn},{id:"relationTypeLabel",label:m().text("Relationship type"),headCellRenderer:he,rowCellValueRenderer:me,sortable:!0,columnClassName:d.relationshipTypeColumn},{id:"entityTypeLabel",label:m().text("Entity Type"),headCellRenderer:he,rowCellValueRenderer:me,sortable:!0,columnClassName:d.entityTypeColumn},{id:"controls",label:"",headCellRenderer:he,rowCellValueRenderer:Ee}]),[d]),y=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e;null===(e=y.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const f=(0,n.useMemo)((()=>t.map((e=>{var t;return null!=u&&u.includes(null==e||null===(t=e.relation)||void 0===t?void 0:t.uri)?we({},e,{expanded:!0}):e}))),[t,u]),g=(0,n.useMemo)((()=>({tableRow:T()(d.row,"collapsibleTableRow")})),[d]);return l().createElement("div",{className:d.tableWithPagination},l().createElement("div",{className:d.tableContainer},l().createElement(ee,{ref:y,columnsData:h,rowsData:f,sorting:r,onSort:a,getRowKey:Te,ExpandedRowRenderer:ge,defaultRowHeight:28,classes:g})),o>v[0]&&l().createElement(G.Z,{count:o,rowsPerPageOptions:v,rowsPerPage:s,onChangeRowsPerPage:p,page:i,onChangePage:c,basicTableRef:y}))}));var Ce=r(36444),Re=r(61837),Ne=r(33662);const Pe=(0,P.Z)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),ke=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:r}=e;const n=Pe();return l().createElement(Ne.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:r,placeholder:m().text("Search profiles"),classes:{input:n.input}})}));var je=r(92934),Le=r(68977),Ze=r(77277),Ie=r(8629);const Ue=(0,P.Z)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),ze=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:r,filters:a,onFilter:o,entityTypesOptions:i,relationTypesOptions:s}=e;const c=Ue(),[p,u]=(0,n.useState)([]),[d,h]=(0,n.useState)([]),y=()=>{u(a.entityTypesUris),h(a.relationTypesUris),r()};return(0,n.useEffect)((()=>{u(a.entityTypesUris),h(a.relationTypesUris)}),[a.entityTypesUris,a.relationTypesUris]),l().createElement(Ie.Z,{classes:{paper:c.dialogPaper},onClose:y,open:t},l().createElement(F.Z,{className:c.title},m().text("Filter")),l().createElement(je.Q,{classes:{root:c.entityTypesSelector},entityTypes:i,selectedEntityTypes:p,enableEmptyValueUnderline:!0,onChange:u}),l().createElement(Le.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:d,enableEmptyValueUnderline:!0,onChange:h}),l().createElement("div",{className:c.footer},l().createElement(Ze.Z,{className:c.clearAllButton,onClick:()=>{u([]),h([])}},m().text("Clear All")),l().createElement(Ze.Z,{className:c.cancelButton,onClick:y},m().text("Cancel")),l().createElement(Ze.Z,{onClick:()=>{o({entityTypesUris:p,relationTypesUris:d}),r()},color:"primary"},m().text("Apply"))))})),De=(0,P.Z)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),Be=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["filters"])),(e=>{let{filters:t}=e;const r=De(),[a,o]=(0,n.useState)(!1),{entityTypesUris:i,relationTypesUris:s}=t,c=i.length||s.length;return l().createElement("div",{className:r.wrapper},l().createElement(ke,null),l().createElement(Re.Z,{className:r.iconButton,onClick:()=>o(!0)},l().createElement(Ce.Z,{className:c?r.activeFiltersIcon:r.inactiveFiltersIcon})),l().createElement(ze,{open:a,onClose:()=>o(!1)}))})),Ae=(0,P.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),He=()=>{const e=Ae();return l().createElement("div",{className:e.wrapper},l().createElement(F.Z,{className:e.caption,variant:"subtitle1"},m().text("Relationships")),l().createElement(Be,null),l().createElement(Oe,null))};let Ve;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(Ve||(Ve={}));const Me=(0,n.memo)((()=>{var e;const t=z(),[r,a]=(0,n.useState)(null),o=(0,n.useCallback)((e=>{a((t=>t===e?null:e))}),[]),i=null!==r,s=(0,n.useMemo)((()=>[{buttonProps:{id:Ve.Relationship,icon:B,tooltipTitle:m().text("Relationship")},content:l().createElement(He,null)},{buttonProps:{id:Ve.EntityDetails,icon:U.Z,tooltipTitle:m().text("Entity Details")},content:l().createElement(W,null)}]),[]);return l().createElement("div",{className:t.wrapper},l().createElement(Z.h,{open:i,width:480},l().createElement(H,null),null===(e=s[r])||void 0===e?void 0:e.content),l().createElement(I.G,{buttonsProps:(0,y.pluck)("buttonProps",s),onButtonClick:o,activeIndexId:r}))}));Me.displayName="GraphRightSidePanel";const We=Me;var Fe=r(4986);const Ge=e=>{let{children:t}=e;return l().createElement(Fe.SigmaContainer,{style:{background:"transparent"}},t)};var _e=r(28833),qe=r.n(_e),Ke=r(3660),Xe=r.n(Ke),Ye=r(98996),$e=r.n(Ye),Qe=r(60715),Je=r(35174),et=r(30284);const tt=.6,rt=(e,t,r,n,l)=>{if(t.loop){const{size:n,color:l}=t,a=r.x,o=r.y,i=r.size,s=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(r+n),y1:t,x2:e,y2:t+7*(r+n)}}(a,o,.6*i);if(e.strokeStyle=l,e.lineWidth=n,"arrow"===t.type){const{aX:t,aY:r,vX:n,vY:c}=((e,t,r,n)=>{const l=Math.max(.5*n,5),a=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(r-e.y1,2));return{aX:e.x1+(t-e.x1)*(a-l-n)/a,aY:e.y1+(r-e.y1)*(a-l-n)/a,vX:(t-e.x1)*l/a,vY:(r-e.y1)*l/a}})(s,a,o,i);e.beginPath(),e.moveTo(a,o),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,r),e.stroke(),e.fillStyle=l,e.beginPath(),e.moveTo(t+n,r+c),e.lineTo(t+c*tt,r-n*tt),e.lineTo(t-c*tt,r+n*tt),e.lineTo(t+n,r+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(a,o),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,a,o),e.stroke()}(0,et.default)(e,t,r,n,l)};function nt(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){lt(e,t,r[t])}))}return e}function lt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const at=e=>{let{data:t,arrangeNodes:r,selectedNode:l,onNodeClick:o}=e;const i=(0,Fe.useSigma)(),s=(0,Fe.useLoadGraph)(),c=(0,Fe.useRegisterEvents)(),u=(0,Fe.useSetSettings)(),d=(0,a.useSelector)(p.ZP.selectors.getEntity),[h,m]=(0,n.useState)({hoverNode:void 0,hoverNeighbours:void 0}),[y,f]=(0,n.useState)(null),[g,b]=(0,n.useState)({});(0,n.useEffect)((()=>{const e=new($e());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{if(!e.hasEdge(t.from,t.to)){const r=t.from===t.to;e.addEdge(t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:r,loop:r})}})),r(e),s(e),f((0,Je.toUndirected)(e)),i.getCamera().setState({ratio:1.2})}),[s,t,i,r]);const v=(0,n.useCallback)((e=>{const t=i.getGraph(),r=null==d?void 0:d.uri;if(t&&y&&r&&e&&r!==e){const n=(0,Qe.Ar)(y,r,e),l=((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:l,nodes:n}}return{}}),[i,null==d?void 0:d.uri,y]);(0,n.useEffect)((()=>{b(v(l))}),[l,v]),(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;o(t)}})}),[i,c,o]),(0,n.useEffect)((()=>{u({nodeReducer:(e,t)=>{const r=nt({},t),n=(g.nodes||[]).includes(e);return!h.hoverNeighbours||h.hoverNeighbours.includes(e)||h.hoverNode===e||n||(r.label="",r.color="#f6f6f6"),e===l&&(r.color="red"),e===(null==d?void 0:d.uri)&&(r.color="green"),r},edgeReducer:(e,t)=>{const r=i.getGraph(),n=nt({},t,{hidden:!1}),l=(g.edges||[]).includes(e);return!h.hoverNode||r.hasExtremity(e,h.hoverNode)||l||(n.hidden=!0),l&&(n.color="#0072CE",n.size=4),n},renderEdgeLabels:!0,edgeLabelRenderer:rt})}),[i,u,h,l,g,null==d?void 0:d.uri])},ot=e=>{let{data:t,selectedNode:r,onNodeClick:l}=e;const a=(0,n.useCallback)((e=>{qe().assign(e);const t=Xe().inferSettings(e);Xe().assign(e,{settings:t,iterations:600})}),[]);return at({arrangeNodes:a,data:t,selectedNode:r,onNodeClick:l}),null};var it=r(36039);let st;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy TB",e.VERTICAL_BT="Vertical hierarchy BT",e.HORIZONTAL_LR="Horizontal hierarchy LR",e.HORIZONTAL_RL="Horizontal hierarchy RL"}(st||(st={}));const ct=(e,t,r,n)=>{const l=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{r.add(t),n.forEach((n=>{n.from!==t||e.has(n.to)||r.has(n.to)||l.add(n.to)}))})),l.size&&t.push(Array.from(l)),((e,t,r)=>{const n=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||r.has(t.to)||n.add(t.to)}))})),!!n.size})(l,n,r)?ct(l,t,r,n):t},pt=(e,t,r,n)=>{if(e.length<10&&(t[n]=[...e]),e.length>10){const l=e.slice(10),a=e.slice(0,10);t[n]=a,t[n+1]=r[n+1]?[...r[n+1],...l]:l}if(t[n+1]||r[n+1]){const e=t[++n]||r[n];return pt(e,t,r,n)}return t},ut=e=>{let{data:t,selectedNode:r,layout:l,onNodeClick:a}=e;const o=(0,n.useCallback)((e=>{const n=(e=>{switch(e){case st.VERTICAL_TB:return 180;case st.VERTICAL_BT:return 0;case st.HORIZONTAL_LR:return 270;case st.HORIZONTAL_RL:return 90}})(l),a=((e,t)=>{const r=e.nodes,n=e.edges.filter((e=>e.from!==e.to)),l=((e,t,r)=>{const n=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||n.add(t.id)})),n.size||n.add(r),n})(n,r,t),a=ct(l,[],new Set,n);return pt(a[0],[],a,0)})(t,r),o=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(a);for(let t=0;t<a.length;++t)for(let r=0;r<a[t].length;++r)e.setNodeAttribute(a[t][r],"x",(s=r,(i=a[t].length)===(c=o)?5*s:1===i?5*(c-1)/2:5*(c-1)/(i+1)*(s+1))),e.setNodeAttribute(a[t][r],"y",0+10*t);var i,s,c;it.rotation.assign(e,n,{degrees:!0})}),[t,l,r]);return at({arrangeNodes:o,data:t,selectedNode:r,onNodeClick:a}),null};var dt=r(84425);const ht=(0,P.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),mt=(0,A.l)(w,(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;return{setGraphTypeUri:r,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;const o=ht(),i=(0,a.useSelector)(p.ZP.selectors.getMetadata),s=(0,a.useSelector)(p.ZP.selectors.getEntity),c=(0,n.useMemo)((()=>[{label:m().text("All"),value:null},...(0,d.mmY)(i,s.type).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}}))]),[s,i]),u=(0,n.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return l().createElement(dt.Z,{classes:{valueContainer:o.valueContainer},className:o.graphTypeSelector,height:42,label:m().text("Graph type"),value:u,options:c,onChange:e=>r(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:o.filledInputRoot}}}})})),yt=(0,P.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),ft=(0,n.memo)((e=>{let{value:t,onChangeHandler:r}=e;const n=yt(),a=[{label:m().text("Simple network"),value:st.SIMPLE_NETWORK},{label:m().text("Vertical hierarchy TB"),value:st.VERTICAL_TB},{label:m().text("Vertical hierarchy BT"),value:st.VERTICAL_BT},{label:m().text("Horizontal hierarchy LR"),value:st.HORIZONTAL_LR},{label:m().text("Horizontal hierarchy RL"),value:st.HORIZONTAL_RL}];return l().createElement(dt.Z,{className:n.graphLayoutSelector,label:m().text("Graph layout"),value:a.find((0,y.propEq)("value",t)),options:a,onChange:e=>r(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:n.filledInputRoot}}}})})),gt=(0,P.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function bt(){return bt=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},bt.apply(this,arguments)}const vt=(0,A.l)(w,(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:a}=e;const[o,i]=(0,n.useState)(st.SIMPLE_NETWORK),s=(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 l=e.entities.map((e=>({id:e.uri,name:e.label}))),a=[];return n.forEach((e=>{const t=e.split("--");a.push({from:t[0],to:t[1]})})),{nodes:l,edges:a}})(t)),[t]),c=gt(),p={data:s,selectedNode:r,onNodeClick:a};return l().createElement("div",{className:c.wrapper},l().createElement("div",{className:c.selectors},l().createElement(mt,null),l().createElement(ft,{value:o,onChangeHandler:i})),l().createElement("div",{className:c.graph},s&&l().createElement(Ge,null,o===st.SIMPLE_NETWORK?l().createElement(ot,p):l().createElement(ut,bt({},p,{layout:o})))))})),xt=(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"}}))),Et=(0,n.memo)((()=>{const e=xt(),t=(0,a.useSelector)(p.ZP.selectors.getEntity),r=(e=>{const{graphLoading:t,data:r,graphTypeUri:l,setGraphTypeUri:o}=(e=>{const[t,r]=(0,n.useState)(null),l=(0,a.useDispatch)(),[o,i]=(0,n.useState)(null),[s,c]=(0,n.useState)(!1),u=null==e?void 0:e.uri,h=(0,d.biM)(e);return(0,n.useEffect)((()=>(!u||(0,d.ZiX)(u)||h||(c(!0),(0,d.ZYI)({uri:u,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,d.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then(i).catch((e=>{i(null),l(p.ui.actions.errorSet((0,d.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{c(!1)}))),()=>{i(null),c(!1)})),[u,h,l,t]),{graphLoading:s,data:o,graphTypeUri:t,setGraphTypeUri:r}})(e),{selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c}=((e,t)=>{const r=(0,f._)(),l=(0,a.useDispatch)(),[o,i]=(0,n.useState)(null),s=(0,n.useRef)({}),[c,u]=(0,n.useState)(!1),h=(0,n.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,d.HvW)(e).then((e=>(s.current=b(s.current,e),e)))}),[]),g=(0,n.useCallback)((e=>{var n;const a=null==t||null===(n=t.entities)||void 0===n?void 0:n.find((0,y.propEq)("uri",e));a&&i(a),u(!0),r(h(e)).then(i).catch((e=>{l(p.ui.actions.errorSet((0,d.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[l,t,r,h]);return(0,n.useEffect)((()=>{null!=e&&e.uri&&(s.current=b({},e),g(e.uri))}),[null==e?void 0:e.uri]),(0,n.useEffect)((()=>{const r=null==t?void 0:t.entities.find((e=>(null==o?void 0:o.uri)===e.uri));r||(null!=e&&e.uri?(s.current=b({},e),g(e.uri)):(s.current={},i(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:o,onEntitySelect:g}})(e,r);return{graphLoading:t,data:r,selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c,graphTypeUri:l,setGraphTypeUri:o,relationshipTable:E(r,null==i?void 0:i.uri,l)}})(t),{graphLoading:o}=r;return l().createElement(w.Provider,{value:r},l().createElement("div",{className:e.perspectiveView},o&&l().createElement(u.Z,null),(null==t?void 0:t.uri)&&l().createElement("div",{className:e.graphContainer},l().createElement("div",{className:e.graphWrapper},l().createElement(L,null),l().createElement(vt,null)),l().createElement(We,null))))}));Et.displayName="GraphPerspectiveView";const wt=Et,St=(0,o.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Tt=e=>{let{store:t}=e;return l().createElement(a.Provider,{store:t},l().createElement(o.StylesProvider,{generateClassName:St},l().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},l().createElement(wt,null),l().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8911],{44938:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),l=r.n(n),a=r(50166),o=r(44443),i=r(18435);const s=(0,r(79692).Z)({item:{overflow:"hidden"}});function c(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){p(e,t,r[t])}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const u=(0,n.memo)((e=>{let{width:t=0,height:r=0,defaultItemSize:p,data:u,children:d,itemKey:h,showNotMeasuredItems:m,listRef:y}=e;const f=s(),g=(0,n.useRef)({}),[b,v]=(0,n.useState)({}),x=(0,n.useCallback)((0,i.DsO)((()=>{v(c({},g.current))})),[]),E=(0,n.useCallback)(((e,t)=>h?h(t,e):t),[h]),w=(0,n.useRef)(),S=y||w;S.current&&S.current.resetAfterIndex(0,!1);const T=(0,n.useMemo)((()=>e=>{let{data:t,index:r,style:n}=e;const a=E(t,r);return l().createElement("div",{style:n,className:f.item},l().createElement("div",{style:m?void 0:{visibility:a in b?void 0:"hidden"}},l().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[a]!==t&&(((e,t)=>{g.current=c({},g.current,{[e]:t})})(a,t),x())}}),d({data:t,index:r})))}),[d,m,E,x,!m&&b]);return l().createElement(a.VariableSizeList,{ref:S,width:t,height:r,itemCount:u.length,itemData:u,itemSize:e=>b[(e=>E(u,e))(e)]||p,itemKey:h},T)}))},68977:(e,t,r)=>{r.d(t,{U:()=>c});var n=r(24328),l=r.n(n),a=r(87918),o=r.n(a),i=r(18435),s=r(72108);const c=(0,n.memo)((e=>{let{relationTypes:t,selectedRelationTypes:r,single:a,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d={},ListLabelProps:h={},disabled:m=!1}=e;const y=(0,n.useMemo)((()=>t.filter(i.Tt2)),[t]);return l().createElement(s.S,{items:y,selectedItemsUris:r,single:a,placeholder:c,enableEmptyValueUnderline:p,onChange:u,classes:d,ListLabelProps:h,disabled:m,label:o().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:o().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,r)=>{r.d(t,{G:()=>h});var n=r(24328),l=r.n(n),a=r(71153),o=r.n(a),i=r(39475),s=r(79692),c=r(41128);const p=(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 u(){return u=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},u.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}const h=e=>{let{buttonsProps:t,activeIndexId:r,className:n,onButtonClick:a,classes:s={}}=e;const c=p(),{active:h,buttonWrapper:m}=s,y=d(s,["active","buttonWrapper"]);return l().createElement("div",{className:o()(c.container,n)},t.map((e=>{let{id:t}=e,n=d(e,["id"]);return l().createElement(i.k,u({},n,{classes:y,size:"S",key:t,className:o()({[o()(c.active,h)]:r===t},c.buttonWrapper,m),onClick:()=>a(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,r)=>{r.d(t,{h:()=>o});var n=r(24328),l=r.n(n);const a=(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})}}))),o=e=>{let{width:t,open:r,children:n}=e;const o=a();return l().createElement("div",{className:o.contentWrapper,style:{width:`${r?t:0}px`}},r&&l().createElement(l().Fragment,null,n))}},38911:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Tt});var n=r(24328),l=r.n(n),a=r(52730),o=r(36138),i=r(97333),s=r(22664),c=r(52844),p=r(89810),u=r(87378),d=r(18435),h=r(87918),m=r.n(h),y=r(17440),f=r(29627);function g(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){g(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},v=[25,50,100],x=(e,t,r)=>{const{startObject:n,endObject:l,type:a}=t,{directionalLabel:o}=(0,d.nqN)(t)===r?n:l;return o||(0,d.Lmx)(e,a)},E=(e,t,r)=>{const[l,o]=(0,n.useState)({field:"",order:"asc"}),[i,s]=(0,n.useState)(0),[c,u]=(0,n.useState)(v[0]),[h,m]=(0,n.useState)([]),f=(0,a.useSelector)(p.ZP.selectors.getMetadata),g=(0,n.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,y.zipObj)(t.map((0,y.prop)("uri")),t)}),[null==e?void 0:e.entities]),b=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((0,y.either)((0,y.pipe)(d.nqN,(0,y.equals)(t)),(0,y.pipe)(d.j5q,(0,y.equals)(t)))),(0,y.uniqBy)((0,y.prop)("uri")),(0,y.map)((e=>{const r=g[((e,t)=>{const r=(0,d.nqN)(t),n=(0,d.j5q)(t);return r===e?n:r})(t,e)];return{relation:e,entity:r,entityLabel:(0,d.idV)(r.label),entityTypeLabel:(0,d.jFi)(f,r),relationTypeLabel:x(f,e,r.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,g,f]),{searchText:E,onChangeSearchText:w,filters:S,onFilter:T,relationTypesOptions:O,entityTypesOptions:C}=(e=>{const[t,r]=(0,n.useState)(""),[l,o]=(0,n.useState)({entityTypesUris:[],relationTypesUris:[]}),i=(0,a.useSelector)(p.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:r,filters:l,onFilter:o,entityTypesOptions:(0,n.useMemo)((()=>(0,y.pipe)((0,y.map)((e=>{let{entity:t}=e;return t.type})),y.uniq,(0,y.map)((0,d.nt9)(i)))(e)),[e,i]),relationTypesOptions:(0,n.useMemo)((()=>(0,y.pipe)((0,y.map)((e=>{let{relation:t}=e;return t.type})),y.uniq,(0,y.map)((0,d.V3K)(i)))(e)),[e,i])}})(b),R=(0,n.useMemo)((()=>(0,y.pipe)((0,y.filter)((e=>{let{entityLabel:t,entity:r,relation:n}=e;const{entityTypesUris:l,relationTypesUris:a}=S;return t.toLowerCase().includes(E)&&(0,y.ifElse)((0,y.prop)("length"),(0,y.includes)(n.type),y.T)(a)&&(0,y.ifElse)((0,y.prop)("length"),(0,y.includes)(r.type),y.T)(l)})),l.field?(0,y.sort)(((e,t)=>d.P6Y.strings.sort(l.order,e[l.field],t[l.field]))):y.identity)(b)),[b,l,E,S]),N=(0,n.useMemo)((()=>R.slice(i*c,i*c+c)),[R,i,c]),P=(0,n.useCallback)((e=>{m((t=>[...t,e]))}),[]),k=(0,n.useCallback)((e=>{m((t=>(0,y.without)([e],t)))}),[]);return(0,n.useEffect)((()=>{s(0),w(""),T({entityTypesUris:[],relationTypesUris:[]})}),[t,r,w,T]),(0,n.useEffect)((()=>{s(0)}),[l,E,S]),{rowsData:N,onSort:o,sorting:l,searchText:E,onChangeSearchText:w,filters:S,onFilter:T,entityTypesOptions:C,relationTypesOptions:O,editingRelations:h,onStartRelationEditing:P,onFinishRelationEditing:k,total:R.length,page:i,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:u}},w=l().createContext({graphLoading:!1,data:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});w.displayName="GraphStateContext";var S=r(71153),T=r.n(S),O=r(33109),C=r(62901),R=r(72316),N=r(95544),P=r(79692);const k=(0,P.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),j=(0,n.memo)((e=>{let{className:t}=e;const r=k(),n=(0,a.useSelector)(p.ZP.selectors.getEntity);return l().createElement(O.Z,{className:T()(t,C.U),entity:n},l().createElement(N.Z,{className:r.comments},l().createElement(R.Z,{uri:n.uri,relatedObjectUris:(0,d.wp9)(d.q7e.ENTITY,{entityUri:n.uri}),objectType:d.q7e.ENTITY})))}));j.displayName="GraphProfileBand";const L=j;var Z=r(11821),I=r(28101),U=r(82726);const z=(0,P.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});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)}const B=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["styles"]);return l().createElement("svg",D({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l().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 A=r(50548);const H=(0,A.l)(w,(0,y.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return l().createElement(O.Z,{entity:t})}));var V=r(15177);const M=(0,P.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),W=(0,A.l)(w,(0,y.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:r}=e;const n=M();return l().createElement("div",{className:n.wrapper},r&&l().createElement(u.Z,null),l().createElement(V.Z,{entity:t,caption:m().text("Entity details"),className:n.noShadowBlock}))}));var F=r(90436),G=r(42011),_=r(44443),q=r(44938),K=r(79573);const X="1px solid rgba(0, 0, 0, 0.05)",Y=(0,P.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:X},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},headRow:{borderBottom:X}});function $(){return $=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},$.apply(this,arguments)}const Q=(0,n.memo)((e=>{let{columnsData:t,sorting:r,onSort:n}=e;const a=Y();return l().createElement("div",{className:T()(a.tableRow,a.headRow)},t.map((e=>{const{id:t,sortable:a,headCellRenderer:o,columnClassName:i}=e,s=o,c=a?{sortField:r.field,sortOrder:r.order,sortHandler:()=>{n({field:t,order:r.field===t?(0,K.Dh)(r.order):"asc"})}}:{};return l().createElement("div",{key:t,className:i},l().createElement(s,$({headCellData:e},c)))})))})),J=(0,n.forwardRef)(((e,t)=>{let{classes:r,columnsData:a,rowsData:o,sorting:i,onSort:s,getRowKey:c,ExpandedRowRenderer:p,defaultRowHeight:u}=e;const d=Y(),[h,m]=(0,n.useState)({width:0,height:0}),y=(0,n.useCallback)((e=>{let{data:t,index:n}=e;const o=t[n];return l().createElement("div",{className:T()(d.tableRowWrapper,null==r?void 0:r.tableRowWrapper)},l().createElement("div",{className:T()(d.tableRow,null==r?void 0:r.tableRow)},a.map((e=>{let{id:t,rowCellValueRenderer:r,columnClassName:n}=e;const a=r;return l().createElement("div",{key:t,className:n},l().createElement(a,{value:o[t],rowValue:o}))}))),o.expanded&&p&&l().createElement(p,{open:o.expanded,rowValue:o}))}),[a,p]),f=(0,n.useCallback)(((e,t)=>{m({width:e,height:t})}),[]),g=(0,n.useRef)(null);return(0,n.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=g.current)||void 0===e||e.scrollTo(0)}}))),l().createElement("div",{className:d.table},l().createElement(Q,{columnsData:a,sorting:i,onSort:s}),l().createElement("div",{className:d.tableBodyWrapper},l().createElement(_.Z,{handleHeight:!0,handleWidth:!0,onResize:f}),l().createElement("div",{className:d.tableBody},l().createElement(q.Z,{listRef:g,width:h.width,height:h.height,data:o,defaultItemSize:u,itemKey:c,showNotMeasuredItems:!0},y))))})),ee=(0,n.memo)(J);var te=r(92332),re=r(83088);const ne="rgba(238, 238, 238, 1)",le=(0,P.Z)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{width:"200px"},relationshipTypeColumn:{width:"130px"},entityTypeColumn:{width:"140px"},row:{position:"relative","&:hover":{background:ne}}});function ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oe={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},ie=".collapsibleTableRow:hover &",se=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){ae(e,t,r[t])}))}return e}({},oe,{[ie]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${ne} 100%)`}}),ce=(0,P.Z)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":oe},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":se},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[ie]:{visibility:"visible",background:ne}},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"}})));function pe(){return pe=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},pe.apply(this,arguments)}function ue(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){de(e,t,r[t])}))}return e}function de(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const he=e=>{let{className:t,headCellData:r}=e,n=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["className","headCellData"]);const a=ce();return l().createElement("div",{className:T()(a.headCell,t)},l().createElement(te.default,pe({},n,{headCellData:ue({},r,{label:l().createElement(re.C,{value:r.label},l().createElement("div",{className:a.headLabel},r.label))})})))},me=(0,n.memo)((e=>{let{value:t="",tooltip:r,onClick:n,className:a}=e;const o=ce();return r=r||t,l().createElement(re.C,{value:r},l().createElement("div",{className:T()(o.defaultCell,a,{[o.clickable]:!!n}),onClick:n},t))}));var ye=r(37573);const fe=(0,A.l)(w,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:r},className:n,onClick:a}=e;const o=ce(),i=l().createElement(l().Fragment,null,l().createElement(ye.Z,{entity:r,avatarClassName:o.entityAvatar}),t);return l().createElement(me,{value:i,tooltip:t,className:T()(o.profileCell,n),onClick:()=>a(r.uri)})})),ge=(0,n.memo)((e=>{let{open:t,rowValue:r}=e;return t?l().createElement("div",{style:{padding:"6px 16px",fontSize:"13px"}},r.relation.uri):null}));var be=r(39475),ve=r(27604),xe=r(22983);const Ee=(0,A.l)(w,(e=>{let{relationshipTable:{onStartRelationEditing:t,onFinishRelationEditing:r}}=e;return{onEdit:t,onDelete:r}}),(e=>{let{rowValue:{relation:{uri:t}},className:r,onEdit:n,onDelete:a}=e;const o=ce();return l().createElement("div",{className:T()(o.controlsCell,r)},l().createElement(be.k,{className:o.editButton,icon:ve.Z,size:"XXS",tooltipTitle:m().text("Edit"),onClick:()=>n(t)}),l().createElement(be.k,{icon:xe.Z,size:"XXS",tooltipTitle:m().text("Delete"),onClick:()=>a(t)}))}));function we(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){Se(e,t,r[t])}))}return e}function Se(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Te=(e,t)=>t[e].relation.uri||`${e}`,Oe=(0,A.l)(w,(e=>{let{relationshipTable:t}=e;return we({},t)}),(e=>{let{rowsData:t,sorting:r,onSort:a,total:o,page:i,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:p,editingRelations:u}=e;const d=le(),h=(0,n.useMemo)((()=>[{id:"entityLabel",label:m().text("Profile"),headCellRenderer:he,rowCellValueRenderer:fe,sortable:!0,columnClassName:d.profileColumn},{id:"relationTypeLabel",label:m().text("Relationship type"),headCellRenderer:he,rowCellValueRenderer:me,sortable:!0,columnClassName:d.relationshipTypeColumn},{id:"entityTypeLabel",label:m().text("Entity Type"),headCellRenderer:he,rowCellValueRenderer:me,sortable:!0,columnClassName:d.entityTypeColumn},{id:"controls",label:"",headCellRenderer:he,rowCellValueRenderer:Ee}]),[d]),y=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e;null===(e=y.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const f=(0,n.useMemo)((()=>t.map((e=>{var t;return null!=u&&u.includes(null==e||null===(t=e.relation)||void 0===t?void 0:t.uri)?we({},e,{expanded:!0}):e}))),[t,u]),g=(0,n.useMemo)((()=>({tableRow:T()(d.row,"collapsibleTableRow")})),[d]);return l().createElement("div",{className:d.tableWithPagination},l().createElement("div",{className:d.tableContainer},l().createElement(ee,{ref:y,columnsData:h,rowsData:f,sorting:r,onSort:a,getRowKey:Te,ExpandedRowRenderer:ge,defaultRowHeight:28,classes:g})),o>v[0]&&l().createElement(G.Z,{count:o,rowsPerPageOptions:v,rowsPerPage:s,onChangeRowsPerPage:p,page:i,onChangePage:c,basicTableRef:y}))}));var Ce=r(36444),Re=r(61837),Ne=r(33662);const Pe=(0,P.Z)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),ke=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:r}=e;const n=Pe();return l().createElement(Ne.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:r,placeholder:m().text("Search profiles"),classes:{input:n.input}})}));var je=r(92934),Le=r(68977),Ze=r(77277),Ie=r(8629);const Ue=(0,P.Z)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),ze=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:r,filters:a,onFilter:o,entityTypesOptions:i,relationTypesOptions:s}=e;const c=Ue(),[p,u]=(0,n.useState)([]),[d,h]=(0,n.useState)([]),y=()=>{u(a.entityTypesUris),h(a.relationTypesUris),r()};return(0,n.useEffect)((()=>{u(a.entityTypesUris),h(a.relationTypesUris)}),[a.entityTypesUris,a.relationTypesUris]),l().createElement(Ie.Z,{classes:{paper:c.dialogPaper},onClose:y,open:t},l().createElement(F.Z,{className:c.title},m().text("Filter")),l().createElement(je.Q,{classes:{root:c.entityTypesSelector},entityTypes:i,selectedEntityTypes:p,enableEmptyValueUnderline:!0,onChange:u}),l().createElement(Le.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:d,enableEmptyValueUnderline:!0,onChange:h}),l().createElement("div",{className:c.footer},l().createElement(Ze.Z,{className:c.clearAllButton,onClick:()=>{u([]),h([])}},m().text("Clear All")),l().createElement(Ze.Z,{className:c.cancelButton,onClick:y},m().text("Cancel")),l().createElement(Ze.Z,{onClick:()=>{o({entityTypesUris:p,relationTypesUris:d}),r()},color:"primary"},m().text("Apply"))))})),De=(0,P.Z)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),Be=(0,A.l)(w,(0,y.pipe)((0,y.prop)("relationshipTable"),(0,y.pick)(["filters"])),(e=>{let{filters:t}=e;const r=De(),[a,o]=(0,n.useState)(!1),{entityTypesUris:i,relationTypesUris:s}=t,c=i.length||s.length;return l().createElement("div",{className:r.wrapper},l().createElement(ke,null),l().createElement(Re.Z,{className:r.iconButton,onClick:()=>o(!0)},l().createElement(Ce.Z,{className:c?r.activeFiltersIcon:r.inactiveFiltersIcon})),l().createElement(ze,{open:a,onClose:()=>o(!1)}))})),Ae=(0,P.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),He=()=>{const e=Ae();return l().createElement("div",{className:e.wrapper},l().createElement(F.Z,{className:e.caption,variant:"subtitle1"},m().text("Relationships")),l().createElement(Be,null),l().createElement(Oe,null))};let Ve;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(Ve||(Ve={}));const Me=(0,n.memo)((()=>{var e;const t=z(),[r,a]=(0,n.useState)(null),o=(0,n.useCallback)((e=>{a((t=>t===e?null:e))}),[]),i=null!==r,s=(0,n.useMemo)((()=>[{buttonProps:{id:Ve.Relationship,icon:B,tooltipTitle:m().text("Relationship")},content:l().createElement(He,null)},{buttonProps:{id:Ve.EntityDetails,icon:U.Z,tooltipTitle:m().text("Entity Details")},content:l().createElement(W,null)}]),[]);return l().createElement("div",{className:t.wrapper},l().createElement(Z.h,{open:i,width:480},l().createElement(H,null),null===(e=s[r])||void 0===e?void 0:e.content),l().createElement(I.G,{buttonsProps:(0,y.pluck)("buttonProps",s),onButtonClick:o,activeIndexId:r}))}));Me.displayName="GraphRightSidePanel";const We=Me;var Fe=r(4986);const Ge=e=>{let{children:t}=e;return l().createElement(Fe.SigmaContainer,{style:{background:"transparent"}},t)};var _e=r(28833),qe=r.n(_e),Ke=r(3660),Xe=r.n(Ke),Ye=r(98996),$e=r.n(Ye),Qe=r(60715),Je=r(35174),et=r(30284);const tt=.6,rt=(e,t,r,n,l)=>{if(t.loop){const{size:n,color:l}=t,a=r.x,o=r.y,i=r.size,s=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(r+n),y1:t,x2:e,y2:t+7*(r+n)}}(a,o,.6*i);if(e.strokeStyle=l,e.lineWidth=n,"arrow"===t.type){const{aX:t,aY:r,vX:n,vY:c}=((e,t,r,n)=>{const l=Math.max(.5*n,5),a=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(r-e.y1,2));return{aX:e.x1+(t-e.x1)*(a-l-n)/a,aY:e.y1+(r-e.y1)*(a-l-n)/a,vX:(t-e.x1)*l/a,vY:(r-e.y1)*l/a}})(s,a,o,i);e.beginPath(),e.moveTo(a,o),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,r),e.stroke(),e.fillStyle=l,e.beginPath(),e.moveTo(t+n,r+c),e.lineTo(t+c*tt,r-n*tt),e.lineTo(t-c*tt,r+n*tt),e.lineTo(t+n,r+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(a,o),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,a,o),e.stroke()}(0,et.default)(e,t,r,n,l)};function nt(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){lt(e,t,r[t])}))}return e}function lt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const at=e=>{let{data:t,arrangeNodes:r,selectedNode:l,onNodeClick:o}=e;const i=(0,Fe.useSigma)(),s=(0,Fe.useLoadGraph)(),c=(0,Fe.useRegisterEvents)(),u=(0,Fe.useSetSettings)(),d=(0,a.useSelector)(p.ZP.selectors.getEntity),[h,m]=(0,n.useState)({hoverNode:void 0,hoverNeighbours:void 0}),[y,f]=(0,n.useState)(null),[g,b]=(0,n.useState)({});(0,n.useEffect)((()=>{const e=new($e());t.nodes.forEach((t=>{e.addNode(t.id,{label:t.name,size:21,color:"#0072CE"})})),t.edges.forEach((t=>{if(!e.hasEdge(t.from,t.to)){const r=t.from===t.to;e.addEdge(t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:r,loop:r})}})),r(e),s(e),f((0,Je.toUndirected)(e)),i.getCamera().setState({ratio:1.2})}),[s,t,i,r]);const v=(0,n.useCallback)((e=>{const t=i.getGraph(),r=null==d?void 0:d.uri;if(t&&y&&r&&e&&r!==e){const n=(0,Qe.Ar)(y,r,e),l=((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:l,nodes:n}}return{}}),[i,null==d?void 0:d.uri,y]);(0,n.useEffect)((()=>{b(v(l))}),[l,v]),(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;o(t)}})}),[i,c,o]),(0,n.useEffect)((()=>{u({nodeReducer:(e,t)=>{const r=nt({},t),n=(g.nodes||[]).includes(e);return!h.hoverNeighbours||h.hoverNeighbours.includes(e)||h.hoverNode===e||n||(r.label="",r.color="#f6f6f6"),e===l&&(r.color="red"),e===(null==d?void 0:d.uri)&&(r.color="green"),r},edgeReducer:(e,t)=>{const r=i.getGraph(),n=nt({},t,{hidden:!1}),l=(g.edges||[]).includes(e);return!h.hoverNode||r.hasExtremity(e,h.hoverNode)||l||(n.hidden=!0),l&&(n.color="#0072CE",n.size=4),n},renderEdgeLabels:!0,edgeLabelRenderer:rt})}),[i,u,h,l,g,null==d?void 0:d.uri])},ot=e=>{let{data:t,selectedNode:r,onNodeClick:l}=e;const a=(0,n.useCallback)((e=>{qe().assign(e);const t=Xe().inferSettings(e);Xe().assign(e,{settings:t,iterations:600})}),[]);return at({arrangeNodes:a,data:t,selectedNode:r,onNodeClick:l}),null};var it=r(36039);let st;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy TB",e.VERTICAL_BT="Vertical hierarchy BT",e.HORIZONTAL_LR="Horizontal hierarchy LR",e.HORIZONTAL_RL="Horizontal hierarchy RL"}(st||(st={}));const ct=(e,t,r,n)=>{const l=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{r.add(t),n.forEach((n=>{n.from!==t||e.has(n.to)||r.has(n.to)||l.add(n.to)}))})),l.size&&t.push(Array.from(l)),((e,t,r)=>{const n=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||r.has(t.to)||n.add(t.to)}))})),!!n.size})(l,n,r)?ct(l,t,r,n):t},pt=(e,t,r,n)=>{if(e.length<10&&(t[n]=[...e]),e.length>10){const l=e.slice(10),a=e.slice(0,10);t[n]=a,t[n+1]=r[n+1]?[...r[n+1],...l]:l}if(t[n+1]||r[n+1]){const e=t[++n]||r[n];return pt(e,t,r,n)}return t},ut=e=>{let{data:t,selectedNode:r,layout:l,onNodeClick:a}=e;const o=(0,n.useCallback)((e=>{const n=(e=>{switch(e){case st.VERTICAL_TB:return 180;case st.VERTICAL_BT:return 0;case st.HORIZONTAL_LR:return 270;case st.HORIZONTAL_RL:return 90}})(l),a=((e,t)=>{const r=e.nodes,n=e.edges.filter((e=>e.from!==e.to)),l=((e,t,r)=>{const n=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||n.add(t.id)})),n.size||n.add(r),n})(n,r,t),a=ct(l,[],new Set,n);return pt(a[0],[],a,0)})(t,r),o=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(a);for(let t=0;t<a.length;++t)for(let r=0;r<a[t].length;++r)e.setNodeAttribute(a[t][r],"x",(s=r,(i=a[t].length)===(c=o)?5*s:1===i?5*(c-1)/2:5*(c-1)/(i+1)*(s+1))),e.setNodeAttribute(a[t][r],"y",0+10*t);var i,s,c;it.rotation.assign(e,n,{degrees:!0})}),[t,l,r]);return at({arrangeNodes:o,data:t,selectedNode:r,onNodeClick:a}),null};var dt=r(84425);const ht=(0,P.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),mt=(0,A.l)(w,(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;return{setGraphTypeUri:r,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:r}=e;const o=ht(),i=(0,a.useSelector)(p.ZP.selectors.getMetadata),s=(0,a.useSelector)(p.ZP.selectors.getEntity),c=(0,n.useMemo)((()=>[{label:m().text("All"),value:null},...(0,d.mmY)(i,s.type).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}}))]),[s,i]),u=(0,n.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return l().createElement(dt.Z,{classes:{valueContainer:o.valueContainer},className:o.graphTypeSelector,height:42,label:m().text("Graph type"),value:u,options:c,onChange:e=>r(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:o.filledInputRoot}}}})})),yt=(0,P.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),ft=(0,n.memo)((e=>{let{value:t,onChangeHandler:r}=e;const n=yt(),a=[{label:m().text("Simple network"),value:st.SIMPLE_NETWORK},{label:m().text("Vertical hierarchy TB"),value:st.VERTICAL_TB},{label:m().text("Vertical hierarchy BT"),value:st.VERTICAL_BT},{label:m().text("Horizontal hierarchy LR"),value:st.HORIZONTAL_LR},{label:m().text("Horizontal hierarchy RL"),value:st.HORIZONTAL_RL}];return l().createElement(dt.Z,{className:n.graphLayoutSelector,label:m().text("Graph layout"),value:a.find((0,y.propEq)("value",t)),options:a,onChange:e=>r(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:n.filledInputRoot}}}})})),gt=(0,P.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function bt(){return bt=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},bt.apply(this,arguments)}const vt=(0,A.l)(w,(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:a}=e;const[o,i]=(0,n.useState)(st.SIMPLE_NETWORK),s=(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 l=e.entities.map((e=>({id:e.uri,name:e.label}))),a=[];return n.forEach((e=>{const t=e.split("--");a.push({from:t[0],to:t[1]})})),{nodes:l,edges:a}})(t)),[t]),c=gt(),p={data:s,selectedNode:r,onNodeClick:a};return l().createElement("div",{className:c.wrapper},l().createElement("div",{className:c.selectors},l().createElement(mt,null),l().createElement(ft,{value:o,onChangeHandler:i})),l().createElement("div",{className:c.graph},s&&l().createElement(Ge,null,o===st.SIMPLE_NETWORK?l().createElement(ot,p):l().createElement(ut,bt({},p,{layout:o})))))})),xt=(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"}}))),Et=(0,n.memo)((()=>{const e=xt(),t=(0,a.useSelector)(p.ZP.selectors.getEntity),r=(e=>{const{graphLoading:t,data:r,graphTypeUri:l,setGraphTypeUri:o}=(e=>{const[t,r]=(0,n.useState)(null),l=(0,a.useDispatch)(),[o,i]=(0,n.useState)(null),[s,c]=(0,n.useState)(!1),u=null==e?void 0:e.uri,h=(0,d.biM)(e);return(0,n.useEffect)((()=>(!u||(0,d.ZiX)(u)||h||(c(!0),(0,d.ZYI)({uri:u,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,d.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then(i).catch((e=>{i(null),l(p.ui.actions.errorSet((0,d.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{c(!1)}))),()=>{i(null),c(!1)})),[u,h,l,t]),{graphLoading:s,data:o,graphTypeUri:t,setGraphTypeUri:r}})(e),{selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c}=((e,t)=>{const r=(0,f._)(),l=(0,a.useDispatch)(),[o,i]=(0,n.useState)(null),s=(0,n.useRef)({}),[c,u]=(0,n.useState)(!1),h=(0,n.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,d.HvW)(e).then((e=>(s.current=b(s.current,e),e)))}),[]),g=(0,n.useCallback)((e=>{var n;const a=null==t||null===(n=t.entities)||void 0===n?void 0:n.find((0,y.propEq)("uri",e));a&&i(a),u(!0),r(h(e)).then(i).catch((e=>{l(p.ui.actions.errorSet((0,d.xU7)(e,m().text("Something went wrong"))))})).finally((()=>{u(!1)}))}),[l,t,r,h]);return(0,n.useEffect)((()=>{null!=e&&e.uri&&(s.current=b({},e),g(e.uri))}),[null==e?void 0:e.uri]),(0,n.useEffect)((()=>{const r=null==t?void 0:t.entities.find((e=>(null==o?void 0:o.uri)===e.uri));r||(null!=e&&e.uri?(s.current=b({},e),g(e.uri)):(s.current={},i(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:o,onEntitySelect:g}})(e,r);return{graphLoading:t,data:r,selectedEntity:i,onEntitySelect:s,selectedEntityLoading:c,graphTypeUri:l,setGraphTypeUri:o,relationshipTable:E(r,null==i?void 0:i.uri,l)}})(t),{graphLoading:o}=r;return l().createElement(w.Provider,{value:r},l().createElement("div",{className:e.perspectiveView},o&&l().createElement(u.Z,null),(null==t?void 0:t.uri)&&l().createElement("div",{className:e.graphContainer},l().createElement("div",{className:e.graphWrapper},l().createElement(L,null),l().createElement(vt,null)),l().createElement(We,null))))}));Et.displayName="GraphPerspectiveView";const wt=Et,St=(0,o.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Tt=e=>{let{store:t}=e;return l().createElement(a.Provider,{store:t},l().createElement(o.StylesProvider,{generateClassName:St},l().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},l().createElement(wt,null),l().createElement(i.Z,{showErrorFromStore:!0}))))}}}]);
|
package/9019.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9019],{37573:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),l=n.n(r),i=n(52730),a=n(71153),o=n.n(a),s=n(43434),c=n(76444),u=n(89810);const d=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const a=(0,i.useSelector)(u.ZP.selectors.getMetadata),d=(0,i.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",p=(0,c.uie)(a,d,t),m=(0,c.vPL)(d,(0,c.XH2)(a,t.type)),h=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return l().createElement(s.Z,{className:o()(n,r),src:p,imgProps:{onError:h}},l().createElement("img",{className:r,src:m,alt:"fallback entity avatar",onError:h}))}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),l=n.n(r),i=n(52730),a=n(71153),o=n.n(a),s=n(90436),c=n(76444),u=n(89810);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,i.useSelector)(u.ZP.selectors.getMetadata),m=t.type,h=(0,c.nt9)(p,m)||{},f=(0,c.VD3)(p,h,"typeColor")||c.rSc.palette.primary.main;return l().createElement(s.Z,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:o()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(76444),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:i,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const f=(0,r.useMemo)((()=>t.filter(o.oDv)),[t]);return l().createElement(s.S,{items:f,selectedItemsUris:n,single:i,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:a().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:a().text("Select entity types")})}));c.displayName="EntityTypesSelector"},94792:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(24328),l=n.n(r);const i=(0,n(79692).Z)({highlight:{fontWeight:600}}),a=e=>{let{text:t="",highlight:n="",className:r}=e;const a=i(),o=n&&t.split(new RegExp(`(${n})`,"gi"));return l().createElement("span",null,n?o.map(((e,t)=>l().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||a.highlight:""},e))):t)}},87378:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(67358);const s=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const i=s();return l().createElement(l().Fragment,null,l().createElement("div",{className:a()(i.loadingOverlay,r,{[i.transparent]:t,[i.relativePosition]:n})},l().createElement(o.Z,{color:"secondary"})))}},72108:(e,t,n)=>{n.d(t,{S:()=>Z});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(17440),s=n(76444),c=n(86619),u=n(83543),d=n(80030),p=n(79692);const m=(0,p.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),h=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:l}=t;if(n.length>0){const[t]=Array.from(n),i=document.createRange();i.setStart(t,0);for(let n=0;n<e.length;n++){i.setEnd(t,i.endOffset+e[n].length);const{width:a}=i.getBoundingClientRect();if(r+a>l)return n;n!==e.length-1&&i.setEnd(t,i.endOffset+", ".length)}}return-1},f=e=>e.join(", "),g=e=>`calc(${(0,o.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const i=m(),a=(0,r.useRef)(),[o,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=h(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,a.current))}),[t]);const c=f(t),u=o>0,p=u?f(t.slice(0,-o)):c;return l().createElement(d.ZP,{title:u?c:""},l().createElement("div",{className:i.listLabelContainer},l().createElement("div",{style:{width:g(n)},className:i.listLabel,ref:a},c),l().createElement("div",{className:i.visibleItemsLabel},p),u&&l().createElement("div",{className:i.hiddenCount},`+${o}`)))};var y=n(40435),x=n(22311),C=n(26638),v=n(33117),w=n(94792),I=n(63485);function O(){return O=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},O.apply(this,arguments)}const E=(0,o.always)(32),S=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:i,height:a}=e,o=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return l().createElement(I.Z,O({getItemSize:E,renderItem:(e,i,a)=>{let{item:o}=i;const s=!!t.find((e=>o.uri===e)),c=a===r;return l().createElement(v.Z,{key:o.uri,onClick:n,checked:s,data:o,label:l().createElement(w.Z,{text:o.label,highlight:o.filterText}),labelInText:o.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:o.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:i,height:a},o))}));S.displayName="SelectMetadataTypesList";const k=(0,p.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function L(){return L=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},L.apply(this,arguments)}function P(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){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:i,selectedItemsUris:d,onChange:p,ListLabelProps:m={},disabled:h,enableEmptyValueUnderline:f,single:g,label:v,dataReltioId:w,selectionPopupTitle:I}=e;const O=k(),[E,R]=(0,r.useState)(!1),Z=(0,r.useCallback)((()=>R(!0)),[]),T=(0,r.useCallback)((()=>R(!1)),[]),[N,j]=(0,r.useState)(""),z=(0,r.useCallback)((()=>j("")),[]),D=(0,r.useCallback)((0,o.pipe)(z,T),[T,z]),F=i.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,N)})).map(((e,t)=>({item:{item:P({},e,{filterText:N})},index:t}))),H=(0,r.useMemo)((()=>d.map((e=>i.find((0,o.propEq)("uri",e)))).map((0,o.prop)("label"))),[d,i]),M=(0,r.useCallback)(((e,t)=>{g?(p(t?[e.uri]:[]),D()):p(t?d.concat(e.uri):d.filter((t=>t!==e.uri)))}),[d,p,g,D]),W=(0,r.useCallback)((e=>{let{item:t}=e;const n=!d.includes(t.uri);M(t,n)}),[d,M]),{focusIndex:B,handleKeyDown:U}=(0,C.t)({items:F,open:E,onSelectFocusedItem:W,selectedItems:d,onClose:D}),A=(0,r.useRef)(),$=A.current?A.current.getBoundingClientRect().width:0,K=Math.max($,255),q=0===d.length;return l().createElement(l().Fragment,null,l().createElement(c.Z,{label:v,ref:A,InputProps:{startAdornment:q&&!t?null:l().createElement("div",{className:a()(O.inputText,n.inputText)},q?l().createElement("div",null,t):l().createElement(b,L({},m,{list:H}))),classes:{root:O.inputRoot,input:a()(O.input,n.input,{[O.emptyInput]:q&&!t}),disabled:a()(O.disabledInput,{[O.disabledPointer]:h}),underline:O.disabledUnderline},endAdornment:l().createElement(y.Z,{size:"L",icon:u.Z,iconClassName:a()(O.icon,{[O["popup-opened-icon"]]:E}),disabled:h}),readOnly:!0,disabled:!0,disableUnderline:q&&!f},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:a()(O.inputLabel,n.label)}},value:"",onClick:h?void 0:Z,classes:{root:a()(O.root,n.root)},margin:"dense",variant:"filled",disabled:h,"data-reltio-id":w}),l().createElement(x.Z,{open:E,anchorEl:A.current,onClose:D,onSearch:j,title:I,containerWidth:K,containerHeight:355,searchInputOnKeyDown:U,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},l().createElement(S,{items:F,onItemClick:M,selectedItems:d,width:K,height:245,focusIndex:B})))}));Z.displayName="MetadataTypesSelector"},4270:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),l=n.n(r),i=n(77277),a=n(38592),o=n(71153),s=n.n(o),c=n(78223),u=n(79692),d=n(41128);const p=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,d.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.primary.main,.24)}}}))),m=(0,c.Z)(i.Z),h=e=>{let{className:t,classes:n={},modes:r=[],modeId:i,onChange:o}=e;const c=p();return l().createElement(a.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:a,Icon:u}=e;return l().createElement(m,{key:String(t),className:s()(c.button,{[c.current]:i===t},n.button),tooltipTitle:a,onClick:(d=t,()=>o(d)),"data-reltio-id":`reltio-search-mode-${t}`},u&&l().createElement(u,{className:c.icon}),r&&l().createElement("div",{className:c.title},r));var d})))}},33662:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(71153),l=n.n(r),i=n(17440),a=n(24328),o=n.n(a),s=n(87918),c=n.n(s),u=n(29611),d=n(50581),p=n(87685),m=n(21853),h=n(79573),f=n(40435),g=n(15311);function b(){return b=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},b.apply(this,arguments)}function y(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){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=(0,a.memo)((e=>{let{value:t,autofocus:n,onSearch:r=h.ZT,rootRef:s,classes:x={},height:C,placeholder:v=c().text("Search")}=e,w=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const I=(0,g.y)({height:C}),[O,E]=(0,a.useState)(""),S=(0,i.pipe)((0,i.tap)(r),E),k=(0,i.isNil)(t)?O:t;return o().createElement(u.Z,b({startAdornment:o().createElement(d.Z,{position:"start"},o().createElement(m.default,{className:I.icon})),endAdornment:o().createElement(d.Z,{position:"end"},k.length>0&&o().createElement(f.Z,{icon:p.default,className:I.clearButton,onClick:()=>S("")})),autoFocus:n,classes:y({},x,{input:l()(I.input,x.input),root:l()(I.container,x.root)}),placeholder:v,value:k,onChange:(0,i.pipe)(h.NA,S),disableUnderline:!0,ref:s},w))}))},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(87918),s=n.n(o),c=n(79784),u=n(54275),d=n(33662);function p(){return p=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},p.apply(this,arguments)}const m=e=>{let{title:t,className:n,onSearch:r,hideTitle:i,hideSearchInput:o,headerPlacement:m="top",containerWidth:h,containerHeight:f,searchInputOnKeyDown:g,children:b,searchInputRef:y,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:C={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:h,containerHeight:f}),I=l().createElement(l().Fragment,null,!i&&l().createElement("div",{className:w.header},t),!o&&l().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:g,inputRef:y,classes:{root:w.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return l().createElement(c.ZP,p({anchorOrigin:x,transformOrigin:C},v),l().createElement("div",{className:a()(w.container,n),style:{width:h}},"top"===m&&I,l().createElement("div",{className:w.list},b),"bottom"===m&&I))}},26638:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(24328),l=n(17440),i=n(63485);const a=e=>{let{items:t,open:n,onSelectFocusedItem:a,selectedItems:o,onClose:s}=e;const[c,u]=(0,r.useState)(null),d=(0,r.useRef)(!1),p=(0,r.useCallback)((e=>{let n=null===e?p(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,i.c)(t[n]));)n+=1;return n!==t.length?n:p(-1)}),[t]),m=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,i.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),h=(0,r.useCallback)((()=>{if(!(0,l.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&a({item:e.item,groupData:e})}}),[a,t,c]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(p),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(m),e.preventDefault(),!1;case"Enter":d.current=!0,h();break;case"Tab":s&&s(e);break;default:return}}),[t,p,m,h,s]);return(0,r.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,o]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(79692);const l=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,n)=>{n.d(t,{Z:()=>m,c:()=>d});var r=n(24328),l=n.n(r),i=n(13980),a=n.n(i),o=n(50166),s=n(44443);const c=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const d=e=>e.titleItemIndex===e.index,p=e=>{let{items:t,getItemSize:n,renderItem:i,renderGroupTitle:a,width:p="100%",height:m,fixedTitle:h=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:g,hideSubtitles:b,focusIndex:y=null,onInnerContainerResize:x}=e;const C=c(),v=(0,r.useRef)(null),w=(0,r.useRef)(null),I=(0,r.useRef)(null),O=(0,r.useRef)([0]),E={topMargin:0},S=(0,r.useMemo)((()=>!b||(t||[]).some((e=>null!==e.titleItemIndex))),[t,b]),k=(0,r.useCallback)((e=>{const r=O.current.length;let l=0;t.slice(r-1,e+1).forEach(((e,t)=>{const i=r+t-1;t>0&&(O.current[i]=O.current[i-1]+l),l=n(i,e.item)}))}),[n,t]),L=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),P=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),R();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){k(t);const e=L(t);return{offset:O.current[t],titleHeight:n(e,P(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,n=e.offset-t;(n<v.current.state.scrollOffset||n>v.current.state.scrollOffset+m)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(n-(m-t)/2)}))}}),[k,P,n,L,m,O,t,v]);const R=()=>{I.current&&w.current&&(I.current.style.width=w.current.offsetWidth+"px")},Z=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,l)=>{k(l+10);const i=O.current[l+1];return e>=r&&e<i&&(n={index:l,offset:r,listItem:t}),r=i,n})),n}),[k,O,t]),T=(0,r.useCallback)((e=>n(e,P(e).item)),[P,n]),N=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const l=P(t);return l.item&&(d(l)&&a(n,l.item)||i(n,l.item,t,r))}),[P,a,i]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:v}),z=(0,r.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>l().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},a({height:n(e.index,e.item)},e.item)))(e)))),[n,t,a]);return l().createElement(l().Fragment,null,l().createElement("div",{ref:I,className:C.stickyTitlesWrapper},h&&z()),x&&w.current&&l().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),l().createElement(o.VariableSizeList,{ref:v,itemCount:t.length,itemSize:T,width:p,height:m,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:l}=e;if(!h||!S)return;const i=Z(r),a=i&&L(i.index);var o;null!==a&&(o=a,I.current&&[...I.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===o.toString()?(e.style.visibility="visible",E.index=o):e.style.visibility="hidden"}))),R();const s=null!==a&&n(a,P(a).item),c=Z(r+s+E.topMargin);let u=0;if(c){switch(l){case"forward":c.offset-r>0&&d(c.listItem)&&(u=s-(c.offset-r));break;case"backward":{const e=a>-1&&(p=a,t.findIndex(((e,t)=>d(e)&&p<t))),n=(e=>(k(e),O.current[e]))(e);e>-1&&r<n&&s>=n-r&&(u=s-(n-r))}}(e=>{I.current&&(E.topMargin=-e,I.current.style.top=-e+"px")})(u)}var p},style:g?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},N))};p.propTypes={items:a().arrayOf(a().object).isRequired,getItemSize:a().func.isRequired,renderItem:a().func.isRequired,width:a().oneOfType([a().number,a().string]),height:a().number.isRequired,renderGroupTitle:a().func,fixedTitle:a().bool,hideSubtitles:a().bool,itemKey:a().func,disableHorizontalScrollbar:a().bool,focusIndex:a().number,onInnerContainerResize:a().func};const m=p},41008:(e,t,n)=>{n.d(t,{LG:()=>i,LW:()=>a});var r=n(17440),l=n(24328);const i=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},a=e=>{let{focusIndex:t,listRef:n,items:r}=e;const i=(0,l.useRef)(null),a=(0,l.useRef)(null),o=(0,l.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;i.current=t,a.current=n}),[]);return(0,l.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(i.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(a.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:o}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[9019],{37573:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),l=n.n(r),i=n(52730),a=n(71153),o=n.n(a),s=n(43434),c=n(18435),u=n(89810);const d=e=>{let{entity:t,avatarClassName:n,imageClassName:r}=e;const a=(0,i.useSelector)(u.ZP.selectors.getMetadata),d=(0,i.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",p=(0,c.uie)(a,d,t),m=(0,c.vPL)(d,(0,c.XH2)(a,t.type)),h=e=>{e.target.onError=null,e.target.src=(0,c.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return l().createElement(s.Z,{className:o()(n,r),src:p,imgProps:{onError:h}},l().createElement("img",{className:r,src:m,alt:"fallback entity avatar",onError:h}))}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),l=n.n(r),i=n(52730),a=n(71153),o=n.n(a),s=n(90436),c=n(18435),u=n(89810);const d=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const a=d(),p=(0,i.useSelector)(u.ZP.selectors.getMetadata),m=t.type,h=(0,c.nt9)(p,m)||{},f=(0,c.VD3)(p,h,"typeColor")||c.rSc.palette.primary.main;return l().createElement(s.Z,{style:{backgroundColor:f,color:c.P6Y.Colors.getColor(f)?"#FFFFFF":"#212121"},className:o()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(18435),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:i,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const f=(0,r.useMemo)((()=>t.filter(o.oDv)),[t]);return l().createElement(s.S,{items:f,selectedItemsUris:n,single:i,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:a().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:a().text("Select entity types")})}));c.displayName="EntityTypesSelector"},94792:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(24328),l=n.n(r);const i=(0,n(79692).Z)({highlight:{fontWeight:600}}),a=e=>{let{text:t="",highlight:n="",className:r}=e;const a=i(),o=n&&t.split(new RegExp(`(${n})`,"gi"));return l().createElement("span",null,n?o.map(((e,t)=>l().createElement("span",{key:t,className:e.toLocaleLowerCase()===n.toLocaleLowerCase()?r||a.highlight:""},e))):t)}},87378:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(67358);const s=(0,n(79692).Z)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,opacity:.37,zIndex:10,backgroundColor:"#fff"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:n=!1,className:r}=e;const i=s();return l().createElement(l().Fragment,null,l().createElement("div",{className:a()(i.loadingOverlay,r,{[i.transparent]:t,[i.relativePosition]:n})},l().createElement(o.Z,{color:"secondary"})))}},72108:(e,t,n)=>{n.d(t,{S:()=>Z});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(17440),s=n(18435),c=n(86619),u=n(83543),d=n(80030),p=n(79692);const m=(0,p.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),h=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:l}=t;if(n.length>0){const[t]=Array.from(n),i=document.createRange();i.setStart(t,0);for(let n=0;n<e.length;n++){i.setEnd(t,i.endOffset+e[n].length);const{width:a}=i.getBoundingClientRect();if(r+a>l)return n;n!==e.length-1&&i.setEnd(t,i.endOffset+", ".length)}}return-1},f=e=>e.join(", "),g=e=>`calc(${(0,o.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const i=m(),a=(0,r.useRef)(),[o,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=h(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,a.current))}),[t]);const c=f(t),u=o>0,p=u?f(t.slice(0,-o)):c;return l().createElement(d.ZP,{title:u?c:""},l().createElement("div",{className:i.listLabelContainer},l().createElement("div",{style:{width:g(n)},className:i.listLabel,ref:a},c),l().createElement("div",{className:i.visibleItemsLabel},p),u&&l().createElement("div",{className:i.hiddenCount},`+${o}`)))};var y=n(40435),x=n(22311),C=n(26638),v=n(33117),w=n(94792),I=n(63485);function O(){return O=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},O.apply(this,arguments)}const E=(0,o.always)(32),S=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:i,height:a}=e,o=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return l().createElement(I.Z,O({getItemSize:E,renderItem:(e,i,a)=>{let{item:o}=i;const s=!!t.find((e=>o.uri===e)),c=a===r;return l().createElement(v.Z,{key:o.uri,onClick:n,checked:s,data:o,label:l().createElement(w.Z,{text:o.label,highlight:o.filterText}),labelInText:o.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:o.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:i,height:a},o))}));S.displayName="SelectMetadataTypesList";const k=(0,p.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function L(){return L=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},L.apply(this,arguments)}function P(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){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:i,selectedItemsUris:d,onChange:p,ListLabelProps:m={},disabled:h,enableEmptyValueUnderline:f,single:g,label:v,dataReltioId:w,selectionPopupTitle:I}=e;const O=k(),[E,R]=(0,r.useState)(!1),Z=(0,r.useCallback)((()=>R(!0)),[]),T=(0,r.useCallback)((()=>R(!1)),[]),[N,j]=(0,r.useState)(""),z=(0,r.useCallback)((()=>j("")),[]),D=(0,r.useCallback)((0,o.pipe)(z,T),[T,z]),F=i.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,N)})).map(((e,t)=>({item:{item:P({},e,{filterText:N})},index:t}))),H=(0,r.useMemo)((()=>d.map((e=>i.find((0,o.propEq)("uri",e)))).map((0,o.prop)("label"))),[d,i]),M=(0,r.useCallback)(((e,t)=>{g?(p(t?[e.uri]:[]),D()):p(t?d.concat(e.uri):d.filter((t=>t!==e.uri)))}),[d,p,g,D]),W=(0,r.useCallback)((e=>{let{item:t}=e;const n=!d.includes(t.uri);M(t,n)}),[d,M]),{focusIndex:B,handleKeyDown:U}=(0,C.t)({items:F,open:E,onSelectFocusedItem:W,selectedItems:d,onClose:D}),A=(0,r.useRef)(),$=A.current?A.current.getBoundingClientRect().width:0,K=Math.max($,255),q=0===d.length;return l().createElement(l().Fragment,null,l().createElement(c.Z,{label:v,ref:A,InputProps:{startAdornment:q&&!t?null:l().createElement("div",{className:a()(O.inputText,n.inputText)},q?l().createElement("div",null,t):l().createElement(b,L({},m,{list:H}))),classes:{root:O.inputRoot,input:a()(O.input,n.input,{[O.emptyInput]:q&&!t}),disabled:a()(O.disabledInput,{[O.disabledPointer]:h}),underline:O.disabledUnderline},endAdornment:l().createElement(y.Z,{size:"L",icon:u.Z,iconClassName:a()(O.icon,{[O["popup-opened-icon"]]:E}),disabled:h}),readOnly:!0,disabled:!0,disableUnderline:q&&!f},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:a()(O.inputLabel,n.label)}},value:"",onClick:h?void 0:Z,classes:{root:a()(O.root,n.root)},margin:"dense",variant:"filled",disabled:h,"data-reltio-id":w}),l().createElement(x.Z,{open:E,anchorEl:A.current,onClose:D,onSearch:j,title:I,containerWidth:K,containerHeight:355,searchInputOnKeyDown:U,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},l().createElement(S,{items:F,onItemClick:M,selectedItems:d,width:K,height:245,focusIndex:B})))}));Z.displayName="MetadataTypesSelector"},4270:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),l=n.n(r),i=n(77277),a=n(38592),o=n(71153),s=n.n(o),c=n(78223),u=n(79692),d=n(41128);const p=(0,u.Z)((e=>({button:{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",borderColor:"rgba(0,0,0,0.12)"},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px",marginRight:"8px"},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,d.U1)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.primary.main,.24)}}}))),m=(0,c.Z)(i.Z),h=e=>{let{className:t,classes:n={},modes:r=[],modeId:i,onChange:o}=e;const c=p();return l().createElement(a.Z,{className:t},r.map((e=>{let{id:t,title:r,tooltipTitle:a,Icon:u}=e;return l().createElement(m,{key:String(t),className:s()(c.button,{[c.current]:i===t},n.button),tooltipTitle:a,onClick:(d=t,()=>o(d)),"data-reltio-id":`reltio-search-mode-${t}`},u&&l().createElement(u,{className:c.icon}),r&&l().createElement("div",{className:c.title},r));var d})))}},33662:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(71153),l=n.n(r),i=n(17440),a=n(24328),o=n.n(a),s=n(87918),c=n.n(s),u=n(29611),d=n(50581),p=n(87685),m=n(21853),h=n(79573),f=n(40435),g=n(15311);function b(){return b=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},b.apply(this,arguments)}function y(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){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=(0,a.memo)((e=>{let{value:t,autofocus:n,onSearch:r=h.ZT,rootRef:s,classes:x={},height:C,placeholder:v=c().text("Search")}=e,w=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const I=(0,g.y)({height:C}),[O,E]=(0,a.useState)(""),S=(0,i.pipe)((0,i.tap)(r),E),k=(0,i.isNil)(t)?O:t;return o().createElement(u.Z,b({startAdornment:o().createElement(d.Z,{position:"start"},o().createElement(m.default,{className:I.icon})),endAdornment:o().createElement(d.Z,{position:"end"},k.length>0&&o().createElement(f.Z,{icon:p.default,className:I.clearButton,onClick:()=>S("")})),autoFocus:n,classes:y({},x,{input:l()(I.input,x.input),root:l()(I.container,x.root)}),placeholder:v,value:k,onChange:(0,i.pipe)(h.NA,S),disableUnderline:!0,ref:s},w))}))},15311:(e,t,n)=>{n.d(t,{y:()=>r});const r=(0,n(79692).Z)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),l=n.n(r),i=n(71153),a=n.n(i),o=n(87918),s=n.n(o),c=n(79784),u=n(54275),d=n(33662);function p(){return p=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},p.apply(this,arguments)}const m=e=>{let{title:t,className:n,onSearch:r,hideTitle:i,hideSearchInput:o,headerPlacement:m="top",containerWidth:h,containerHeight:f,searchInputOnKeyDown:g,children:b,searchInputRef:y,anchorOrigin:x={vertical:"top",horizontal:"right"},transformOrigin:C={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const w=(0,u.Z)({containerWidth:h,containerHeight:f}),I=l().createElement(l().Fragment,null,!i&&l().createElement("div",{className:w.header},t),!o&&l().createElement(d.Z,{onSearch:r,autofocus:!0,onKeyDown:g,inputRef:y,classes:{root:w.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return l().createElement(c.ZP,p({anchorOrigin:x,transformOrigin:C},v),l().createElement("div",{className:a()(w.container,n),style:{width:h}},"top"===m&&I,l().createElement("div",{className:w.list},b),"bottom"===m&&I))}},26638:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(24328),l=n(17440),i=n(63485);const a=e=>{let{items:t,open:n,onSelectFocusedItem:a,selectedItems:o,onClose:s}=e;const[c,u]=(0,r.useState)(null),d=(0,r.useRef)(!1),p=(0,r.useCallback)((e=>{let n=null===e?p(-1):e;for(;null!==e&&n<t.length&&(n<=e||n>=0&&(0,i.c)(t[n]));)n+=1;return n!==t.length?n:p(-1)}),[t]),m=(0,r.useCallback)((e=>{let n=null===e?t.length-1:e;for(;null!==e&&n>=0&&(n>=e||(0,i.c)(t[n]));)n-=1;return n<0?t.length-1:n}),[t]),h=(0,r.useCallback)((()=>{if(!(0,l.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&a({item:e.item,groupData:e})}}),[a,t,c]),f=(0,r.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return u(p),e.preventDefault(),!1;case"Up":case"ArrowUp":return u(m),e.preventDefault(),!1;case"Enter":d.current=!0,h();break;case"Tab":s&&s(e);break;default:return}}),[t,p,m,h,s]);return(0,r.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&u(e)}else u(null)}),[t,n,o]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(79692);const l=(0,r.Z)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:n}=e;return{display:"flex",flexDirection:"column",height:t,width:n,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,n)=>{n.d(t,{Z:()=>m,c:()=>d});var r=n(24328),l=n.n(r),i=n(13980),a=n.n(i),o=n(50166),s=n(44443);const c=(0,n(79692).Z)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var u=n(41008);const d=e=>e.titleItemIndex===e.index,p=e=>{let{items:t,getItemSize:n,renderItem:i,renderGroupTitle:a,width:p="100%",height:m,fixedTitle:h=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:g,hideSubtitles:b,focusIndex:y=null,onInnerContainerResize:x}=e;const C=c(),v=(0,r.useRef)(null),w=(0,r.useRef)(null),I=(0,r.useRef)(null),O=(0,r.useRef)([0]),E={topMargin:0},S=(0,r.useMemo)((()=>!b||(t||[]).some((e=>null!==e.titleItemIndex))),[t,b]),k=(0,r.useCallback)((e=>{const r=O.current.length;let l=0;t.slice(r-1,e+1).forEach(((e,t)=>{const i=r+t-1;t>0&&(O.current[i]=O.current[i-1]+l),l=n(i,e.item)}))}),[n,t]),L=(0,r.useCallback)((e=>t[e].titleItemIndex),[t]),P=(0,r.useCallback)((e=>t[e]),[t]);(0,r.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,r.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),R();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){k(t);const e=L(t);return{offset:O.current[t],titleHeight:n(e,P(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,n=e.offset-t;(n<v.current.state.scrollOffset||n>v.current.state.scrollOffset+m)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(n-(m-t)/2)}))}}),[k,P,n,L,m,O,t,v]);const R=()=>{I.current&&w.current&&(I.current.style.width=w.current.offsetWidth+"px")},Z=(0,r.useCallback)((e=>{let n=null,r=0;return t.some(((t,l)=>{k(l+10);const i=O.current[l+1];return e>=r&&e<i&&(n={index:l,offset:r,listItem:t}),r=i,n})),n}),[k,O,t]),T=(0,r.useCallback)((e=>n(e,P(e).item)),[P,n]),N=(0,r.useCallback)((e=>{let{index:t,style:n,data:r}=e;const l=P(t);return l.item&&(d(l)&&a(n,l.item)||i(n,l.item,t,r))}),[P,a,i]),{handleOnItemsRendered:j}=(0,u.LW)({items:t,focusIndex:y,listRef:v}),z=(0,r.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>l().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},a({height:n(e.index,e.item)},e.item)))(e)))),[n,t,a]);return l().createElement(l().Fragment,null,l().createElement("div",{ref:I,className:C.stickyTitlesWrapper},h&&z()),x&&w.current&&l().createElement(s.Z,{handleHeight:!0,onResize:x,targetDomEl:w.current}),l().createElement(o.VariableSizeList,{ref:v,itemCount:t.length,itemSize:T,width:p,height:m,itemKey:f,innerRef:w,onScroll:e=>{let{scrollOffset:r,scrollDirection:l}=e;if(!h||!S)return;const i=Z(r),a=i&&L(i.index);var o;null!==a&&(o=a,I.current&&[...I.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===o.toString()?(e.style.visibility="visible",E.index=o):e.style.visibility="hidden"}))),R();const s=null!==a&&n(a,P(a).item),c=Z(r+s+E.topMargin);let u=0;if(c){switch(l){case"forward":c.offset-r>0&&d(c.listItem)&&(u=s-(c.offset-r));break;case"backward":{const e=a>-1&&(p=a,t.findIndex(((e,t)=>d(e)&&p<t))),n=(e=>(k(e),O.current[e]))(e);e>-1&&r<n&&s>=n-r&&(u=s-(n-r))}}(e=>{I.current&&(E.topMargin=-e,I.current.style.top=-e+"px")})(u)}var p},style:g?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:j},N))};p.propTypes={items:a().arrayOf(a().object).isRequired,getItemSize:a().func.isRequired,renderItem:a().func.isRequired,width:a().oneOfType([a().number,a().string]),height:a().number.isRequired,renderGroupTitle:a().func,fixedTitle:a().bool,hideSubtitles:a().bool,itemKey:a().func,disableHorizontalScrollbar:a().bool,focusIndex:a().number,onInnerContainerResize:a().func};const m=p},41008:(e,t,n)=>{n.d(t,{LG:()=>i,LW:()=>a});var r=n(17440),l=n(24328);const i=e=>{const t=e=>(0,r.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let n=null;return t(e).map(((e,t)=>(e&&e.items&&(n=t),{item:e,index:t,titleItemIndex:n})))},a=e=>{let{focusIndex:t,listRef:n,items:r}=e;const i=(0,l.useRef)(null),a=(0,l.useRef)(null),o=(0,l.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:n}=e;i.current=t,a.current=n}),[]);return(0,l.useEffect)((()=>{n.current&&null!==t&&0!==r.length&&(t<Math.max(i.current+3,0)?n.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(a.current-3,r.length-1)&&n.current.scrollToItem(Math.min(t+3,r.length-1),"end"))}),[t,r.length,n]),{handleOnItemsRendered:o}}}}]);
|