@reltio/remotes 1.4.1146 → 1.4.1149
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/1176.js +1 -1
- package/1196.js +1 -1
- package/1920.js +1 -1
- package/1957.js +1 -1
- package/2454.js +1 -1
- package/2890.js +1 -1
- package/2899.js +1 -1
- package/350.js +1 -1
- package/366.js +1 -0
- package/3745.js +1 -1
- package/4361.js +1 -1
- package/4676.js +1 -1
- package/4689.js +1 -1
- package/4779.js +1 -1
- package/4843.js +1 -1
- package/4889.js +1 -1
- package/5400.js +1 -1
- package/5609.js +1 -0
- package/5709.js +1 -1
- package/5720.js +1 -1
- package/5884.js +1 -1
- package/597.js +1 -1
- package/6186.js +1 -1
- package/6250.js +1 -1
- package/6596.js +1 -1
- package/6940.js +1 -1
- package/6971.js +1 -1
- package/8308.js +1 -0
- package/8387.js +1 -1
- package/8421.js +1 -1
- package/8442.js +1 -1
- package/9431.js +1 -1
- package/9551.js +1 -1
- package/9630.js +1 -1
- package/9838.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/2864.js +0 -1
- package/7990.js +0 -1
- package/9678.js +0 -1
package/3745.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3745],{60894:(e,t,n)=>{n.d(t,{Z:()=>b});var i=n(24328),r=n.n(i),s=n(13980),l=n.n(s),o=n(94656);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(this,arguments)}const c=e=>r().createElement("svg",a({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var h=n(8818),u=n(17440),d=n(47458),p=n(87918),f=n.n(p),g=n(85657);const m=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:s,title:l,tooltipTitle:o}=e;const[a,p]=(0,i.useState)(null),m=(0,i.useCallback)((e=>{const t=(0,u.pipe)(g.JJ,(0,u.pluck)("id"))(e),i=(0,g.u)(n,e);s(i?(0,u.difference)(n,t):(0,u.uniq)((0,u.concat)(n,t)))}),[n,s]);return r().createElement(r().Fragment,null,r().createElement(h.k,{tooltipTitle:o||f().text("Show/hide columns"),size:"L",icon:c,onClick:e=>p(e.currentTarget)}),r().createElement(d.G,{onColumnClick:m,anchorEl:a,columnsData:t,onClose:()=>p(null),title:l,selectedColumns:n}))};m.propTypes={columnsData:o.uz,selectedColumns:l().arrayOf(l().string),onChangeColumns:l().func,title:l().string,tooltipTitle:l().string};const b=m},47458:(e,t,n)=>{n.d(t,{G:()=>C});var i=n(24328),r=n.n(i),s=n(87918),l=n.n(s),o=n(17440),a=n(99493),c=n(44890),h=n(97820),u=n(85657),d=n(56656),p=n(54763),f=n(13980),g=n.n(f),m=n(7785),b=n(27239),v=n(71153),y=n.n(v);const k=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),x=e=>{let{item:t,onClick:n,checked:i,level:s,style:l,isFocused:o,isGroupItem:a,hideCheckBox:c}=e;const h=k();return r().createElement(m.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:i,level:s,data:t,label:r().createElement(b.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:l,isFocused:o,hideIcon:a,className:y()({[h.groupItem]:a})})};x.propTypes={item:g().shape({label:g().string,filterText:g().string}),level:g().number,onClick:g().func,checked:g().bool,style:g().object,isGroupItem:g().bool,isFocused:g().bool,hideCheckBox:g().bool};const P=x,C=e=>{let{anchorEl:t,onClose:n,title:s,columnsData:f,onColumnClick:g,selectedColumns:m,hideCheckBox:b}=e;const v=k(),[y,x]=(0,i.useState)(""),C=(0,i.useMemo)((()=>(0,u.eX)(f,y)),[f,y]),O=(0,i.useMemo)((()=>(0,d.LG)(C)),[C]),E=(0,a.fW1)("label")(C)||308,S=(0,i.useCallback)((e=>{let{item:t}=e;return g(t)}),[g]),{focusIndex:w,handleKeyDown:T}=(0,p.t)({items:O,open:!0,onSelectFocusedItem:S,selectedItems:m,onClose:n}),D=(0,i.useCallback)((0,o.pipe)(n,(()=>x(""))),[n]),I=Math.min(300,32*O.length),q=Math.max(140,I+108);return r().createElement(h.Z,{className:v.popup,open:!!t,anchorEl:t,onClose:D,onSearch:x,title:s||l().text("Show/hide columns"),containerWidth:E,containerHeight:q,searchInputOnKeyDown:T},r().createElement(c.Z,{fixedTitle:!1,height:I,renderItem:(e,t,n)=>{let{item:i,level:s=0}=t;return r().createElement(P,{hideCheckBox:b,style:e,item:i,level:s,isFocused:w===n,checked:(0,u.u)(m,i),isGroupItem:(0,u.yf)(i),onClick:b?(0,o.pipe)(g,D):g})},items:O,getItemSize:()=>32,focusIndex:w}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>b,JJ:()=>v,yf:()=>o,u:()=>y});var i=n(17440),r=n(99493);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o=e=>e.id===e.groupId,a=(0,i.curry)(((e,t)=>{let{id:n,groupId:i}=e;return t.groupId===i&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,i.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),h=(0,i.propOr)(!0,"hideable"),u=(e,t)=>{const n=((e,t)=>e.find((0,i.either)(c(t),a(t))))(e,t);return n?(n.children=u(n.children||[],t),e):e.concat(t)},d=(0,i.curry)(((e,t)=>r.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),p=(0,i.reduce)(((e,t)=>u(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),f=(0,i.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,i.pipe)((0,i.filter)(d(e)),(0,i.chain)((t=>[{item:s({},t,{filterText:e}),level:n},...t.children?f(e,t.children,n+1):[]])))(t)})),g=(0,i.has)("columns"),m=e=>{let{id:t,label:n,columns:r}=e;return[{id:t,groupId:t,label:n},...r.map((0,i.assoc)("groupId",t))]},b=(e,t)=>(0,i.pipe)((0,i.chain)((0,i.when)(g,m)),(0,i.filter)((0,i.either)(o,h)),p,f(t))(e),v=e=>e.children?(0,i.chain)(v,e.children):[e],y=(e,t)=>{const n=v(t),i=t=>e.includes(t.id);return o(t)?n.every(i):n.some(i)}},93873:(e,t,n)=>{n.d(t,{a:()=>T});var i=n(24328),r=n.n(i),s=n(87918),l=n.n(s),o=n(94079),a=n(83348),c=n(8818),h=n(67766),u=n(42767),d=n(99493);const p=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),f=(0,a.Z)(o.Link),g=e=>{let{total:t=0,onPrev:n,onNext:i,onSearchResultsClick:s,isPrevDisabled:o,isNextDisabled:a}=e;const g=p();return r().createElement("div",{className:g.container},r().createElement(f,{className:g.link,component:"button",variant:"caption",onClick:s,underline:"none",tooltipTitle:l().text("Go to search results")},(0,d.k7L)(t,1e6)," ",1===t?l().text("Search result"):l().text("Search results")),r().createElement(c.k,{size:"L",icon:h.Z,tooltipTitle:l().text("Go to previous profile"),onClick:n,disabled:o,showForDisabled:!0}),r().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:l().text("Go to next profile"),onClick:i,disabled:a,showForDisabled:!0}))};var m=n(52730),b=n(59431),v=n(17440),y=n(39450),k=n(67218);function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class C{constructor(e){var t=this;let{data:{query:n,sortField:i,sortOrder:r},tenant:s,searchTenant:l,apiPath:o,dtssPath:a,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[t.getQueryFilter(),...e],r=x({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,d.uqV)({filters:i,options:r,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,d.ZOr)(i,r)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,d.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,d.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=i,this.sortOrder=r,this.tenant=s,this.searchTenant=l,this.apiPath=o,this.dtssPath=a,this.globalSearchRequestOptions=c}}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class S{constructor(e){var t=this;let{data:n,tenant:i,apiPath:r}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[{rawFilter:t.searchBody.filter},...e];return(0,d.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:O({},t.searchBody,{filter:e.length?(0,d.Uqd)()(i):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,d.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,d.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=i,this.apiPath=r}}const w=(e,t)=>(0,v.pipe)((0,v.map)((0,v.prop)("uri")),(0,v.reject)((e=>t.includes(e))))(e),T=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:s,isPrevDisabled:l,isNextDisabled:o}=(()=>{const e=(0,k._)(),t=(0,k._)(),n=(0,k._)(),{uri:r,index:s,total:l,tenant:o,cache:a}=(0,m.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},{type:c,data:h}=(0,m.useSelector)(b.ZP.selectors.getSearchProviderData)||{},u=(0,m.useSelector)(b.ZP.selectors.getTenant),p=(0,m.useSelector)(b.ZP.selectors.getApiPath),f=(0,m.useSelector)(b.ZP.selectors.getDtssPath),g=(0,m.useSelector)((e=>b.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),v=(0,i.useContext)(y.m),x=(0,m.useDispatch)(),[P,O]=(0,i.useState)(!1),E=(0,i.useMemo)((()=>((e,t)=>{switch(e){case"search":return new C(t);case"graphsearch":return new S(t)}})(c,{data:h,tenant:u,searchTenant:o,apiPath:p,dtssPath:f,globalSearchRequestOptions:g})),[c,h,u,o,p,f,g]),T=(0,i.useCallback)((e=>{x(b.yC.actions.updateSearchNavigationDataFields(e))}),[x]),D=(0,i.useCallback)((e=>{const t=u!==o?(0,d.wwR)({uri:e,dataTenant:o}):e;x(b.ui.actions.openEntity({uri:t,viewId:v,source:"navigation"}))}),[x,v,u,o]),I=(0,i.useCallback)((()=>{x(b.ui.actions.openPerspective({perspectiveId:c,viewId:v}))}),[x,c,v]);(0,i.useEffect)((()=>{s>=l?T({index:l-1}):s<0&&T({index:0})}),[l,s,T]);const q=(0,i.useCallback)(((e,i,r)=>{O(!0),t(E.requestTotal()).then((e=>T({total:e})));const s=r+1;return n(E.requestEntities(15,s)).then((t=>{if(t){if(t.length){const n=w(t,e);if(n.length>0)return T({cache:e.concat(n),uri:n[0],index:s+t.length-n.length}),void D(n[0]);if(r+t.length<i-1)return q(e,i-t.length,r+t.length)}T({index:s})}})).finally((()=>{O(!1)}))}),[E,T,D]),j=(0,i.useCallback)(((e,i)=>{O(!0),t(E.requestTotal()).then((e=>T({total:e})));const r=i-1,s=Math.max(0,i-15),l=15+Math.min(0,i-15);return n(E.requestEntities(l,s)).then((t=>{if(t){if(t.length){const n=w(t,e);if(n.length>0)return T({cache:n.concat(e),uri:n[n.length-1],index:r-(t.length-n.length)}),void D(n[n.length-1]);if(i-t.length>0)return j(e,i-t.length)}T({index:0})}})).finally((()=>{O(!1)}))}),[E,T,D]),Z=(0,i.useCallback)(((t,n,i,r)=>{if(n<t.length){const s=t[n];return O(!0),e(E.checkEntity(s)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),Z(e,n,i-1,r)}T({index:r+1,uri:s,cache:t,total:i}),D(s)})).finally((()=>{O(!1)}))}if(!(r>=i-1))return q(t,i,r);T({cache:t,total:i,index:i-1})}),[E,T,D,q]),F=(0,i.useCallback)(((t,n,i,r)=>{if(n>-1){const s=t[n];return O(!0),e(E.checkEntity(s)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),F(e,n-1,i-1,r-1)}T({index:r-1,uri:s,cache:t,total:i}),D(s)})).finally((()=>{O(!1)}))}if(!(r<=0))return j(t,r);T({index:0,cache:t,total:i})}),[E,T,D,j]),N=(0,i.useCallback)((()=>{if(a&&r){const e=a.indexOf(r)-1;F(a,e,l,s)}}),[F,a,r,l,s]),z=(0,i.useCallback)((()=>{if(a&&r){const e=a.indexOf(r)+1;Z(a,e,l,s)}}),[Z,a,r,l,s]);return{total:l,onPrev:N,onNext:z,onSearchResultsClick:I,isPrevDisabled:P||s<=0,isNextDisabled:P||s>=l-1}})();return(()=>{const{cache:e}=(0,m.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},t=(0,m.useSelector)(b.ZP.selectors.getMode),n=(0,m.useSelector)(b.ZP.selectors.getEntity);return(0,d.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?r().createElement(g,{total:e,onPrev:t,onNext:n,onSearchResultsClick:s,isPrevDisabled:l,isNextDisabled:o}):null}},51229:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(24328),r=n.n(i);const s=()=>r().createElement("div",{style:{flex:1}})}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[3745],{60894:(e,t,n)=>{n.d(t,{Z:()=>b});var i=n(24328),r=n.n(i),s=n(13980),l=n.n(s),o=n(94656);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(this,arguments)}const c=e=>r().createElement("svg",a({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var h=n(8818),u=n(17440),d=n(47458),p=n(87918),f=n.n(p),g=n(85657);const m=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:s,title:l,tooltipTitle:o}=e;const[a,p]=(0,i.useState)(null),m=(0,i.useCallback)((e=>{const t=(0,u.pipe)(g.JJ,(0,u.pluck)("id"))(e),i=(0,g.u)(n,e);s(i?(0,u.difference)(n,t):(0,u.uniq)((0,u.concat)(n,t)))}),[n,s]);return r().createElement(r().Fragment,null,r().createElement(h.k,{tooltipTitle:o||f().text("Show/hide columns"),size:"L",icon:c,onClick:e=>p(e.currentTarget)}),r().createElement(d.G,{onColumnClick:m,anchorEl:a,columnsData:t,onClose:()=>p(null),title:l,selectedColumns:n}))};m.propTypes={columnsData:o.uz,selectedColumns:l().arrayOf(l().string),onChangeColumns:l().func,title:l().string,tooltipTitle:l().string};const b=m},47458:(e,t,n)=>{n.d(t,{G:()=>C});var i=n(24328),r=n.n(i),s=n(87918),l=n.n(s),o=n(17440),a=n(58991),c=n(44890),h=n(97820),u=n(85657),d=n(56656),p=n(54763),f=n(13980),g=n.n(f),m=n(7785),b=n(27239),v=n(71153),y=n.n(v);const k=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),x=e=>{let{item:t,onClick:n,checked:i,level:s,style:l,isFocused:o,isGroupItem:a,hideCheckBox:c}=e;const h=k();return r().createElement(m.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:i,level:s,data:t,label:r().createElement(b.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:l,isFocused:o,hideIcon:a,className:y()({[h.groupItem]:a})})};x.propTypes={item:g().shape({label:g().string,filterText:g().string}),level:g().number,onClick:g().func,checked:g().bool,style:g().object,isGroupItem:g().bool,isFocused:g().bool,hideCheckBox:g().bool};const P=x,C=e=>{let{anchorEl:t,onClose:n,title:s,columnsData:f,onColumnClick:g,selectedColumns:m,hideCheckBox:b}=e;const v=k(),[y,x]=(0,i.useState)(""),C=(0,i.useMemo)((()=>(0,u.eX)(f,y)),[f,y]),O=(0,i.useMemo)((()=>(0,d.LG)(C)),[C]),E=(0,a.fW1)("label")(C)||308,S=(0,i.useCallback)((e=>{let{item:t}=e;return g(t)}),[g]),{focusIndex:w,handleKeyDown:T}=(0,p.t)({items:O,open:!0,onSelectFocusedItem:S,selectedItems:m,onClose:n}),D=(0,i.useCallback)((0,o.pipe)(n,(()=>x(""))),[n]),I=Math.min(300,32*O.length),q=Math.max(140,I+108);return r().createElement(h.Z,{className:v.popup,open:!!t,anchorEl:t,onClose:D,onSearch:x,title:s||l().text("Show/hide columns"),containerWidth:E,containerHeight:q,searchInputOnKeyDown:T},r().createElement(c.Z,{fixedTitle:!1,height:I,renderItem:(e,t,n)=>{let{item:i,level:s=0}=t;return r().createElement(P,{hideCheckBox:b,style:e,item:i,level:s,isFocused:w===n,checked:(0,u.u)(m,i),isGroupItem:(0,u.yf)(i),onClick:b?(0,o.pipe)(g,D):g})},items:O,getItemSize:()=>32,focusIndex:w}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>b,JJ:()=>v,yf:()=>o,u:()=>y});var i=n(17440),r=n(58991);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o=e=>e.id===e.groupId,a=(0,i.curry)(((e,t)=>{let{id:n,groupId:i}=e;return t.groupId===i&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,i.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),h=(0,i.propOr)(!0,"hideable"),u=(e,t)=>{const n=((e,t)=>e.find((0,i.either)(c(t),a(t))))(e,t);return n?(n.children=u(n.children||[],t),e):e.concat(t)},d=(0,i.curry)(((e,t)=>r.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),p=(0,i.reduce)(((e,t)=>u(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),f=(0,i.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,i.pipe)((0,i.filter)(d(e)),(0,i.chain)((t=>[{item:s({},t,{filterText:e}),level:n},...t.children?f(e,t.children,n+1):[]])))(t)})),g=(0,i.has)("columns"),m=e=>{let{id:t,label:n,columns:r}=e;return[{id:t,groupId:t,label:n},...r.map((0,i.assoc)("groupId",t))]},b=(e,t)=>(0,i.pipe)((0,i.chain)((0,i.when)(g,m)),(0,i.filter)((0,i.either)(o,h)),p,f(t))(e),v=e=>e.children?(0,i.chain)(v,e.children):[e],y=(e,t)=>{const n=v(t),i=t=>e.includes(t.id);return o(t)?n.every(i):n.some(i)}},93873:(e,t,n)=>{n.d(t,{a:()=>T});var i=n(24328),r=n.n(i),s=n(87918),l=n.n(s),o=n(94079),a=n(83348),c=n(8818),h=n(67766),u=n(42767),d=n(58991);const p=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),f=(0,a.Z)(o.Link),g=e=>{let{total:t=0,onPrev:n,onNext:i,onSearchResultsClick:s,isPrevDisabled:o,isNextDisabled:a}=e;const g=p();return r().createElement("div",{className:g.container},r().createElement(f,{className:g.link,component:"button",variant:"caption",onClick:s,underline:"none",tooltipTitle:l().text("Go to search results")},(0,d.k7L)(t,1e6)," ",1===t?l().text("Search result"):l().text("Search results")),r().createElement(c.k,{size:"L",icon:h.Z,tooltipTitle:l().text("Go to previous profile"),onClick:n,disabled:o,showForDisabled:!0}),r().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:l().text("Go to next profile"),onClick:i,disabled:a,showForDisabled:!0}))};var m=n(52730),b=n(59431),v=n(17440),y=n(39450),k=n(67218);function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class C{constructor(e){var t=this;let{data:{query:n,sortField:i,sortOrder:r},tenant:s,searchTenant:l,apiPath:o,dtssPath:a,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[t.getQueryFilter(),...e],r=x({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,d.uqV)({filters:i,options:r,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,d.ZOr)(i,r)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,d.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,d.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=i,this.sortOrder=r,this.tenant=s,this.searchTenant=l,this.apiPath=o,this.dtssPath=a,this.globalSearchRequestOptions=c}}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class S{constructor(e){var t=this;let{data:n,tenant:i,apiPath:r}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[{rawFilter:t.searchBody.filter},...e];return(0,d.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:O({},t.searchBody,{filter:e.length?(0,d.Uqd)()(i):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,d.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,d.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=i,this.apiPath=r}}const w=(e,t)=>(0,v.pipe)((0,v.map)((0,v.prop)("uri")),(0,v.reject)((e=>t.includes(e))))(e),T=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:s,isPrevDisabled:l,isNextDisabled:o}=(()=>{const e=(0,k._)(),t=(0,k._)(),n=(0,k._)(),{uri:r,index:s,total:l,tenant:o,cache:a}=(0,m.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},{type:c,data:h}=(0,m.useSelector)(b.ZP.selectors.getSearchProviderData)||{},u=(0,m.useSelector)(b.ZP.selectors.getTenant),p=(0,m.useSelector)(b.ZP.selectors.getApiPath),f=(0,m.useSelector)(b.ZP.selectors.getDtssPath),g=(0,m.useSelector)((e=>b.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),v=(0,i.useContext)(y.m),x=(0,m.useDispatch)(),[P,O]=(0,i.useState)(!1),E=(0,i.useMemo)((()=>((e,t)=>{switch(e){case"search":return new C(t);case"graphsearch":return new S(t)}})(c,{data:h,tenant:u,searchTenant:o,apiPath:p,dtssPath:f,globalSearchRequestOptions:g})),[c,h,u,o,p,f,g]),T=(0,i.useCallback)((e=>{x(b.yC.actions.updateSearchNavigationDataFields(e))}),[x]),D=(0,i.useCallback)((e=>{const t=u!==o?(0,d.wwR)({uri:e,dataTenant:o}):e;x(b.ui.actions.openEntity({uri:t,viewId:v,source:"navigation"}))}),[x,v,u,o]),I=(0,i.useCallback)((()=>{x(b.ui.actions.openPerspective({perspectiveId:c,viewId:v}))}),[x,c,v]);(0,i.useEffect)((()=>{s>=l?T({index:l-1}):s<0&&T({index:0})}),[l,s,T]);const q=(0,i.useCallback)(((e,i,r)=>{O(!0),t(E.requestTotal()).then((e=>T({total:e})));const s=r+1;return n(E.requestEntities(15,s)).then((t=>{if(t){if(t.length){const n=w(t,e);if(n.length>0)return T({cache:e.concat(n),uri:n[0],index:s+t.length-n.length}),void D(n[0]);if(r+t.length<i-1)return q(e,i-t.length,r+t.length)}T({index:s})}})).finally((()=>{O(!1)}))}),[E,T,D]),j=(0,i.useCallback)(((e,i)=>{O(!0),t(E.requestTotal()).then((e=>T({total:e})));const r=i-1,s=Math.max(0,i-15),l=15+Math.min(0,i-15);return n(E.requestEntities(l,s)).then((t=>{if(t){if(t.length){const n=w(t,e);if(n.length>0)return T({cache:n.concat(e),uri:n[n.length-1],index:r-(t.length-n.length)}),void D(n[n.length-1]);if(i-t.length>0)return j(e,i-t.length)}T({index:0})}})).finally((()=>{O(!1)}))}),[E,T,D]),Z=(0,i.useCallback)(((t,n,i,r)=>{if(n<t.length){const s=t[n];return O(!0),e(E.checkEntity(s)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),Z(e,n,i-1,r)}T({index:r+1,uri:s,cache:t,total:i}),D(s)})).finally((()=>{O(!1)}))}if(!(r>=i-1))return q(t,i,r);T({cache:t,total:i,index:i-1})}),[E,T,D,q]),F=(0,i.useCallback)(((t,n,i,r)=>{if(n>-1){const s=t[n];return O(!0),e(E.checkEntity(s)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),F(e,n-1,i-1,r-1)}T({index:r-1,uri:s,cache:t,total:i}),D(s)})).finally((()=>{O(!1)}))}if(!(r<=0))return j(t,r);T({index:0,cache:t,total:i})}),[E,T,D,j]),N=(0,i.useCallback)((()=>{if(a&&r){const e=a.indexOf(r)-1;F(a,e,l,s)}}),[F,a,r,l,s]),z=(0,i.useCallback)((()=>{if(a&&r){const e=a.indexOf(r)+1;Z(a,e,l,s)}}),[Z,a,r,l,s]);return{total:l,onPrev:N,onNext:z,onSearchResultsClick:I,isPrevDisabled:P||s<=0,isNextDisabled:P||s>=l-1}})();return(()=>{const{cache:e}=(0,m.useSelector)(b.ZP.selectors.getSearchNavigationData)||{},t=(0,m.useSelector)(b.ZP.selectors.getMode),n=(0,m.useSelector)(b.ZP.selectors.getEntity);return(0,d.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?r().createElement(g,{total:e,onPrev:t,onNext:n,onSearchResultsClick:s,isPrevDisabled:l,isNextDisabled:o}):null}},51229:(e,t,n)=>{n.d(t,{Z:()=>s});var i=n(24328),r=n.n(i);const s=()=>r().createElement("div",{style:{flex:1}})}}]);
|
package/4361.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4361],{14361:(e,t,n)=>{n.r(t),n.d(t,{RelationshipsTableView:()=>Xe});var o=n(8598),a=n(13980),r=n.n(a),l=n(24328),i=n.n(l),c=n(44443),s=n(17440),u=n(52730),p=n(59431),d=n(65549),m=n(94079),g=n(87918),h=n.n(g),f=n(79692);const y=(0,f.Z)({addButton:{marginLeft:"12px",padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},label:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),b=e=>{let{onClick:t}=e;const n=y();return i().createElement(m.Button,{color:"primary",className:n.addButton,onClick:t},i().createElement(d.Z,{classes:{root:n.icon}}),i().createElement("div",{className:n.label},h().text("Add")))};b.propTypes={onClick:r().func};const v=b;var C=n(71153),w=n.n(C),E=n(99493);const R={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},x={color:"rgba(0,0,0,.54)"},O=(0,f.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},entityCell:{display:"flex",alignItems:"center",height:"100%"},entityLabel:{fontSize:"15px",color:e.palette.secondary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap","$row-cell--removed &":R,"$row-cell--inactive &":x},entityAvatar:{transform:"scale(0.7)",margin:"0 10px"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell--removed":{pointerEvents:"none","& > :not($entityCell)":R},"row-cell--inactive":x})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},P.apply(this,arguments)}const T=e=>{let{cell:t,CellValueRenderer:n,rowValue:{connection:o},isSorted:a}=e,r=function(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["cell","CellValueRenderer","rowValue","isSorted"]);const l=O(),c=(0,E.$qe)(o),s=(0,E.Fn9)(o.relation)&&(0,E.Fn9)(o.entity);return i().createElement("div",{className:w()({[l["row-cell--sorted"]]:a,[l["row-cell--removed"]]:c,[l["row-cell--inactive"]]:!s},l.rowCell)},t.values.map(((e,t)=>i().createElement(n,P({key:t,value:e},r)))))};T.propTypes={rowValue:r().object,cell:r().object,CellValueRenderer:r().elementType,isSorted:r().bool};const S=T;var j=n(85709),k=n(94656),N=n(39450),I=n(31254),D=n(88611);const Z=e=>{let{value:{entityType:t,entity:n}}=e;const o=(0,u.useDispatch)(),a=(0,l.useContext)(N.m),r=O(),c=(0,E.idV)(n.entityLabel),d=(0,E.wwR)({uri:n.entityUri,dataTenant:n.dataTenant});return i().createElement("div",{className:r.entityCell},i().createElement(I.Z,{className:r.entityAvatar,entityType:t}),i().createElement(D.C,{value:c},i().createElement("span",{className:r.entityLabel,onClick:(0,s.pipe)((0,s.always)({uri:d,viewId:a}),p.ui.actions.openEntity,o)},c)))};Z.propTypes={value:r().shape({entity:r().shape({entityUri:r().string,entityLabel:r().string}),entityType:E.p8l})};const A=Z;var F=n(92332);const z=(0,n(67353).Z)((e=>{const t=O();return i().createElement("div",{className:t.headCell},i().createElement(F.default,e))}));var _=n(64091);const L=(0,s.pipe)((0,s.map)((e=>e.uri||e)),s.uniq);function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const V=(0,s.pipe)((0,s.split)("."),(0,s.slice)(2,1/0)),B=e=>{if(e.startsWith("relation.attributes")){const t=V(e);return t.length>1?t.slice(0,-1):null}return null},M=(0,s.map)((e=>{return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){U(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:B(e.id),headCellRenderer:z,rowCellValueRenderer:(t=e.id,"entity.label"===t?A:_.Z)});var t})),W=(0,f.Z)({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}}});var H=n(27604),Q=n(22983);const q=e=>{let{canUpdate:t,canRemove:n,handleEditRelation:o,handleRemoveRelation:a}=e;return i().createElement(i().Fragment,null,t&&i().createElement(m.Tooltip,{title:h().text("Edit")},i().createElement(m.IconButton,{onClick:o},i().createElement(H.Z,null))),n&&i().createElement(m.Tooltip,{title:h().text("Remove")},i().createElement(m.IconButton,{onClick:a},i().createElement(Q.Z,null))))};q.propTypes={canUpdate:r().bool,canRemove:r().bool,handleEditRelation:r().func,handleRemoveRelation:r().func};const G=q;function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$.apply(this,arguments)}const Y=e=>{let{mode:t,columnsData:n,connections:o,metadata:a,sorting:r,onSort:c,filters:u,onFilter:d,onEditRelation:m,onRemoveRelation:g,basicTableRef:h,allowOnlyCreateNew:f}=e;const y=(0,l.useMemo)((()=>((e,t,n)=>e.map((e=>(0,s.pipe)((0,s.reduce)(((t,o)=>{let{id:a}=o;return(0,s.assoc)(a,((e,t,n)=>{let{entity:o,relation:a}=t;switch(e){case"entity.label":return{entity:o,entityType:(0,E.nt9)(n,o.entityType)};case"relation.label":return a.relationLabel||(0,E.Lmx)(n,a.relationType);case"relation.activeness.startDate":return a.startDate;case"relation.activeness.endDate":return a.endDate;default:return((e,t)=>(0,s.pipe)((0,s.path)(["object","attributes"]),(0,E.tT_)(e))(t))(V(e),a)}})(a,e,n),t)}),{}),(0,s.assoc)("connection",e))(t))))(o,n,a)),[o,n,a]),b=(0,l.useMemo)((()=>M(n)),[n]),v=W(),C=(0,l.useCallback)((e=>i().createElement(S,$({},e,{isSorted:!!r&&r.field===e.columnData.id}))),[r]),[w,R]=(0,l.useState)(null),{canRemove:x,canUpdate:O}=(e=>{let{metadata:t,mode:n,connection:o,onRemoveRelation:a,onEditRelation:r,allowOnlyCreateNew:l}=e;const i=(0,E.xvW)(o);if(p.N5.mode.selectors.getIsEditableMode(n)&&o&&(!l||i)){const{relation:{relationType:e}}=o,l=(0,E.$qe)(o),i=(0,E.V3K)(t,e);return{canRemove:a&&!l&&(0,E.Edd)(n,i),canUpdate:r&&!l&&(0,E.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:t,onRemoveRelation:g,onEditRelation:m,metadata:a,allowOnlyCreateNew:f,connection:(0,s.path)([w,"connection"],y)}),P=(0,l.useCallback)((e=>R(e)),[]),T=(0,l.useCallback)((()=>m((0,s.path)([w,"connection"],y))),[w,m,y]),k=(0,l.useCallback)((()=>g((0,s.path)([w,"connection","relation","relationUri"],y))),[w,g,y]),N=x||O?i().createElement(G,{handleEditRelation:T,handleRemoveRelation:k,canRemove:x,canUpdate:O}):void 0;return i().createElement("div",{className:v.tableContainer},i().createElement(j.Z,{columnsData:b,rowsData:y,sorting:r,onSort:c,filters:u,onFilter:d,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:C,onRowHover:P,hoverRowIndex:w,hoveredRowRightContent:N,classes:{hoveredRowRightContentWrapper:v["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:v["row-cell__buttons-container"]},ref:h}))};Y.propTypes={mode:r().string,columnsData:k.uz,connections:r().arrayOf(E.Rjq),metadata:E.pGS,filters:r().objectOf(k.Dq),onFilter:r().func,sorting:k.nI,onSort:r().func,onEditRelation:r().func,onRemoveRelation:r().func,basicTableRef:r().shape({current:r().object}),allowOnlyCreateNew:r().bool};const J=Y;var K=n(93416),X=n(75512),ee=n(30553),te=n(32152),ne=n(1876),oe=n(60894),ae=n(43054),re=n(8818);const le=(0,f.Z)((()=>({popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),ie=e=>{let{className:t,showInactive:n,onShowInactiveChange:o}=e;const a=le(),r=(0,l.useRef)(),[c,s]=(0,l.useState)(!1),u=()=>s((e=>!e));return i().createElement(i().Fragment,null,i().createElement(re.k,{className:t,ref:r,tooltipTitle:h().text("More"),icon:ae.Z,onClick:u,size:"L"}),i().createElement(m.Popover,{open:c,classes:{paper:a.popupContent},anchorEl:r.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},i().createElement(m.FormControlLabel,{classes:{label:a.checkboxControlLabel},control:i().createElement(m.Checkbox,{className:a.checkboxControlCheckbox,checked:n||!1,onChange:e=>o(e.target.checked)}),label:h().text("Show inactive Relationships")})))},ce=(0,f.Z)({header:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},moreButton:{marginLeft:"-6px"}}),se=e=>{let{title:t,total:n,searchQuery:o,onChangeSearchQuery:a,filtersEnabled:r,onToggleFilters:l,columnsData:c,selectedColumns:s,onChangeColumns:u,showInactive:p,onChangeShowInactive:d}=e;const g=ce();return i().createElement(K.Z,{title:t,className:g.header},i().createElement(X.Z,{widthToHide:500},i().createElement(ee.Z,{height:24,margin:16}),i().createElement(m.Typography,{className:g.totalCaption,variant:"caption"},n>1?h().text("${count} entities",{count:n}):h().text("${count} entity",{count:n}))),i().createElement(te.i,{query:o,onChange:a}),i().createElement(ne.Z,{enabled:r,onClick:l}),i().createElement(ee.Z,{height:24,margin:4}),i().createElement(oe.Z,{columnsData:c,selectedColumns:s,onChangeColumns:u}),i().createElement(ie,{className:g.moreButton,showInactive:p,onShowInactiveChange:d}))};se.propTypes={title:r().string,total:r().number,columnsData:k.uz,selectedColumns:r().arrayOf(r().string),onChangeColumns:r().func,searchQuery:r().string,onChangeSearchQuery:r().func,filtersEnabled:r().bool,onToggleFilters:r().func,showInactive:r().bool,onChangeShowInactive:r().func};const ue=se;var pe=n(26180),de=n(31276);function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){ge(e,t,n[t])}))}return e}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he="CHANGE_SEARCH_QUERY",fe="CHANGE_SHOW_INACTIVE",ye=me({},pe.ZP.actions,{changeSearchQuery:(0,de.zD)(he),changeShowInactive:(0,de.zD)(fe)}),be=(e,t)=>{switch(t.type){case he:return me({},e,{searchQuery:t.payload,page:0});case fe:return me({},e,{showInactive:t.payload});default:return pe.ZP.reducer(e,t)}};var ve=n(26481),Ce=n(37152),we=n(52016),Ee=n(10237),Re=n(11013),xe=n(58662),Oe=n(99136);const Pe=[10,25,50,100],Te=[{id:"entity.label",get label(){return h().text("Entity label")},dataTypeDefinition:{type:E.oS0.TYPE_STRING},hideable:!1},{id:"relation.label",get label(){return h().text("Directional label")},dataTypeDefinition:{type:E.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return h().text("Start date")},dataTypeDefinition:E.PY2.startDate},{id:"relation.activeness.endDate",get label(){return h().text("End date")},dataTypeDefinition:E.PY2.endDate}],Se=(0,s.pipe)(E.Tde,(0,s.concat)("relation.")),je=(0,s.pipe)((0,s.map)((e=>({id:Se(e.uri),label:e.label,dataTypeDefinition:(0,E.PFL)(e)}))),(0,s.uniqBy)((0,s.prop)("id"))),ke=(0,s.pipe)(((e,t)=>{let{content:{inRelations:n=[],outRelations:o=[]}}=e,{relationTypes:a}=t;return(0,s.pipe)(L,(0,s.chain)((e=>(0,s.pipe)((0,s.find)((0,s.propEq)("uri",e)),E.DK$)(a))))([...n,...o])}),je,(0,s.concat)(Te));var Ne=n(99341);function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){De(e,t,n[t])}))}return e}function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=e=>e.uri||e,Ae=e=>t=>Ze(t)===e,Fe=(0,s.curry)(((e,t)=>{const n=(t,o)=>{let a=Ze(o),r=!1;a.startsWith("!")&&(a=a.slice(1),r=!0);const l=e[a]&&(0,E.uGe)(E.BDP.READ,e[a]),i=t.find(Ae(a))||!l?t:t.concat(o.uri?Ie({},o,{uri:a}):a);return r?i:(0,s.keys)(e).reduce(((t,o)=>e[o].extendsTypeURI!==a||t.find(Ae(o))?t:n(t,o)),i)};return t.reduce(n,[])})),ze=(0,s.curry)(((e,t)=>{const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.reduce(((n,o)=>{const a=Ze(o),r=(0,s.path)([a,t,"objectTypeUri"],e);return!r||n.find(Ae(r))?n:n.concat(r)}),[])};return Ie({},t,{entityTypes:[...n("startObject",t.inRelations),...n("endObject",t.outRelations)]})})),_e=(0,s.indexBy)((0,s.prop)("uri")),Le=(0,s.curry)(((e,t)=>{const n=_e(e.relationTypes),o=_e(e.entityTypes),a=e=>(0,s.evolve)({inRelations:Fe(n),outRelations:Fe(n),entityTypes:Fe(o),nextEntry:a},e);return(0,s.pipe)((0,s.unless)((0,s.either)((0,s.prop)("nextEntry"),(0,s.prop)("entityTypes")),ze(n)),a)(t)})),Ue=(0,f.Z)({addArea:{display:"flex",alignItems:"center",height:"48px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),Ve=(0,s.pluck)("id",Te),[Be]=Ve,Me=e=>{let{className:t,config:n,entity:o,metadata:a,connections:r=[],total:c=0,mode:u,relationToAdd:d,relationsToEdit:m=[],checkIfCanAddRelations:g,dispatch:h}=e;const f={searchQuery:"",filters:null,visibleColumns:Ve,sorting:{order:n.sortOrder||"asc",field:n.sortColumn||Be},page:0,rowsPerPage:n.max||15,showInactive:!1},y=Ue(),b=(0,l.useContext)(ve.j)?u:E.fO_.VIEWING,[C,w]=(0,l.useReducer)(be,f),R=(0,s.pipe)(ye.changeSearchQuery,w),x=(0,s.pipe)(ye.changeShowInactive,w);(0,l.useEffect)((()=>{R("")}),[null==o?void 0:o.uri]);const{visibleColumns:O,searchQuery:P,filters:T,sorting:S,page:j,rowsPerPage:k,showInactive:N}=C,I=(0,l.useMemo)((()=>ke(n,a)),[n,a]),D=(0,l.useMemo)((()=>O.map((e=>I.find((0,s.propEq)("id",e))))),[O,I]),Z=(0,l.useMemo)((()=>((e,t,n)=>{const o=E.wSh.fromFalsy(e).map(E.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome(""),a=(0,Ne.Tz)(n,t);return(new E.MEy).addClause(o).addClause(a).build()})(P,T,D)),[T,P]),{isLoading:A}=(0,Ce.a)({sorting:S,filter:Z,page:j,rowsPerPage:k,config:n,entity:o,relationActivityFilter:N?E.YJ7.ALL:E.YJ7.ACTIVE_ONLY,mode:u}),F=(0,l.useMemo)((()=>{return e=f.rowsPerPage,Pe.filter((t=>t!==e)).concat(e).sort(s.subtract);var e}),[]),{handleRowsPerPageChange:z,handlePageChange:_}=(0,l.useMemo)((()=>({handleRowsPerPageChange:(0,s.pipe)(ye.changeRowsPerPage,w),handlePageChange:(0,s.pipe)(ye.changePage,w)})),[]),L=(0,l.useCallback)((()=>{const e=(0,E.vlo)({config:n,mode:b,metadata:a});(0,s.pipe)(p.N5.relations.actions.openRelationEditor(n.id),h)(e)}),[n,b,a,h]),U=(0,l.useCallback)((e=>{h(p.N5.relations.actions.closeRelationEditor(n.id,e)),h(p.N5.relations.actions.removeRelation(n.id,e));const t=r.find((t=>p.N5.relations.selectors.getRelationUriFromConnection(t)===e)),o=p.N5.relations.selectors.getEntityUriFromConnection(t);(0,E.ZiX)(o)&&h(p.N5.modifiedEntities.actions.entityDeleted(o))}),[n,r,h]),V=o&&g,B=d?[d,...m]:m,{canUpdate:M,canDelete:W}=(0,we.l)(),H=M(n),Q=W(n),q=(0,l.useRef)(null);return i().createElement(Ee.Z,{className:t},i().createElement(ue,{title:n.caption,total:c,columnsData:I,selectedColumns:O,onChangeColumns:(0,s.pipe)(ye.changeColumns,w),searchQuery:P,onChangeSearchQuery:R,filtersEnabled:!!T,onToggleFilters:(0,s.pipe)(ye.toggleFilters,w),showInactive:N,onChangeShowInactive:x}),V&&i().createElement("div",{className:y.addArea},i().createElement(v,{onClick:L})),B.map((e=>i().createElement(Re.Z,{key:p.N5.relations.selectors.getRelationUriFromConnection(e),connection:e,config:n,mode:b,metadata:a}))),i().createElement("div",{style:{position:"relative"}},i().createElement(J,{mode:b,columnsData:D,connections:r,metadata:a,filters:T,onFilter:(0,s.pipe)(ye.changeFilter,w),sorting:S,onSort:(0,s.pipe)(ye.toggleSort,w),onEditRelation:H?(0,s.pipe)(p.N5.relations.actions.openRelationEditor(n.id),h):null,onRemoveRelation:Q?U:null,basicTableRef:q,allowOnlyCreateNew:n.allowOnlyCreateNew}),i().createElement(xe.Z,{count:c,rowsPerPageOptions:F,rowsPerPage:k,onChangeRowsPerPage:z,page:j,onChangePage:_,basicTableRef:q}),A&&i().createElement(Oe.Z,null)))};Me.propTypes={className:r().string,config:E.PiC,entity:E.pyR,metadata:E.pGS,connections:r().arrayOf(E.Rjq),total:r().number,mode:r().string,relationToAdd:r().object,relationsToEdit:r().array,dispatch:r().func,checkIfCanAddRelations:r().bool};const We=Me;function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qe=(0,s.memoizeWith)(((e,t)=>t.id),((e,t)=>(0,s.evolve)({content:Le(e)},t))),qe=(0,u.connect)(((e,t)=>{const{config:n}=t;return{connections:p.ZP.selectors.getConnectionsWithDraftsByViewId(e,n.id),total:p.ZP.selectors.getTotalByViewId(e,n.id),entity:p.ZP.selectors.getEntity(e),metadata:p.ZP.selectors.getMetadata(e),mode:p.ZP.selectors.getMode(e),relationToAdd:p.ZP.selectors.getRelationToAddByViewId(e,n.id),relationsToEdit:p.ZP.selectors.getRelationsToEditByViewId(e,n.id),checkIfCanAddRelations:p.ZP.selectors.getCheckIfCanAddRelations(e,n.content)}}),void 0,((e,t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){He(e,t,n[t])}))}return e}({},e,t,n,{config:Qe(e.metadata,n.config)})))(We);var Ge=n(36138),$e=n(22664),Ye=n(585);const Je=(0,Ge.createGenerateClassName)({productionPrefix:"relTable",disableGlobal:!0}),Ke=e=>{let{config:t,store:n,onResize:a=s.identity,className:r}=e;return i().createElement(u.Provider,{store:n},i().createElement(N.m.Provider,{value:t.id},i().createElement(Ge.StylesProvider,{generateClassName:Je},i().createElement($e.MuiPickersUtilsProvider,{utils:o.Z},i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>a(Math.floor(e),Math.floor(t))}),t&&i().createElement(qe,{config:t,className:r}),i().createElement(Ye.Z,null)))))};Ke.propTypes={config:E.PiC,store:r().object,onResize:r().func,className:r().string};const Xe=Ke}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4361],{14361:(e,t,n)=>{n.r(t),n.d(t,{RelationshipsTableView:()=>Xe});var o=n(8598),a=n(13980),r=n.n(a),l=n(24328),i=n.n(l),c=n(44443),s=n(17440),u=n(52730),p=n(59431),d=n(65549),m=n(94079),g=n(87918),h=n.n(g),f=n(79692);const y=(0,f.Z)({addButton:{marginLeft:"12px",padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)"},label:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),b=e=>{let{onClick:t}=e;const n=y();return i().createElement(m.Button,{color:"primary",className:n.addButton,onClick:t},i().createElement(d.Z,{classes:{root:n.icon}}),i().createElement("div",{className:n.label},h().text("Add")))};b.propTypes={onClick:r().func};const v=b;var C=n(71153),w=n.n(C),E=n(58991);const R={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},x={color:"rgba(0,0,0,.54)"},O=(0,f.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},entityCell:{display:"flex",alignItems:"center",height:"100%"},entityLabel:{fontSize:"15px",color:e.palette.secondary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap","$row-cell--removed &":R,"$row-cell--inactive &":x},entityAvatar:{transform:"scale(0.7)",margin:"0 10px"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell--removed":{pointerEvents:"none","& > :not($entityCell)":R},"row-cell--inactive":x})));function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},P.apply(this,arguments)}const T=e=>{let{cell:t,CellValueRenderer:n,rowValue:{connection:o},isSorted:a}=e,r=function(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["cell","CellValueRenderer","rowValue","isSorted"]);const l=O(),c=(0,E.$qe)(o),s=(0,E.Fn9)(o.relation)&&(0,E.Fn9)(o.entity);return i().createElement("div",{className:w()({[l["row-cell--sorted"]]:a,[l["row-cell--removed"]]:c,[l["row-cell--inactive"]]:!s},l.rowCell)},t.values.map(((e,t)=>i().createElement(n,P({key:t,value:e},r)))))};T.propTypes={rowValue:r().object,cell:r().object,CellValueRenderer:r().elementType,isSorted:r().bool};const S=T;var j=n(85709),k=n(94656),N=n(39450),I=n(31254),D=n(88611);const Z=e=>{let{value:{entityType:t,entity:n}}=e;const o=(0,u.useDispatch)(),a=(0,l.useContext)(N.m),r=O(),c=(0,E.idV)(n.entityLabel),d=(0,E.wwR)({uri:n.entityUri,dataTenant:n.dataTenant});return i().createElement("div",{className:r.entityCell},i().createElement(I.Z,{className:r.entityAvatar,entityType:t}),i().createElement(D.C,{value:c},i().createElement("span",{className:r.entityLabel,onClick:(0,s.pipe)((0,s.always)({uri:d,viewId:a}),p.ui.actions.openEntity,o)},c)))};Z.propTypes={value:r().shape({entity:r().shape({entityUri:r().string,entityLabel:r().string}),entityType:E.p8l})};const A=Z;var F=n(92332);const z=(0,n(67353).Z)((e=>{const t=O();return i().createElement("div",{className:t.headCell},i().createElement(F.default,e))}));var _=n(64091);const L=(0,s.pipe)((0,s.map)((e=>e.uri||e)),s.uniq);function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const V=(0,s.pipe)((0,s.split)("."),(0,s.slice)(2,1/0)),B=e=>{if(e.startsWith("relation.attributes")){const t=V(e);return t.length>1?t.slice(0,-1):null}return null},M=(0,s.map)((e=>{return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){U(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:B(e.id),headCellRenderer:z,rowCellValueRenderer:(t=e.id,"entity.label"===t?A:_.Z)});var t})),W=(0,f.Z)({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}}});var H=n(27604),Q=n(22983);const q=e=>{let{canUpdate:t,canRemove:n,handleEditRelation:o,handleRemoveRelation:a}=e;return i().createElement(i().Fragment,null,t&&i().createElement(m.Tooltip,{title:h().text("Edit")},i().createElement(m.IconButton,{onClick:o},i().createElement(H.Z,null))),n&&i().createElement(m.Tooltip,{title:h().text("Remove")},i().createElement(m.IconButton,{onClick:a},i().createElement(Q.Z,null))))};q.propTypes={canUpdate:r().bool,canRemove:r().bool,handleEditRelation:r().func,handleRemoveRelation:r().func};const G=q;function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},$.apply(this,arguments)}const Y=e=>{let{mode:t,columnsData:n,connections:o,metadata:a,sorting:r,onSort:c,filters:u,onFilter:d,onEditRelation:m,onRemoveRelation:g,basicTableRef:h,allowOnlyCreateNew:f}=e;const y=(0,l.useMemo)((()=>((e,t,n)=>e.map((e=>(0,s.pipe)((0,s.reduce)(((t,o)=>{let{id:a}=o;return(0,s.assoc)(a,((e,t,n)=>{let{entity:o,relation:a}=t;switch(e){case"entity.label":return{entity:o,entityType:(0,E.nt9)(n,o.entityType)};case"relation.label":return a.relationLabel||(0,E.Lmx)(n,a.relationType);case"relation.activeness.startDate":return a.startDate;case"relation.activeness.endDate":return a.endDate;default:return((e,t)=>(0,s.pipe)((0,s.path)(["object","attributes"]),(0,E.tT_)(e))(t))(V(e),a)}})(a,e,n),t)}),{}),(0,s.assoc)("connection",e))(t))))(o,n,a)),[o,n,a]),b=(0,l.useMemo)((()=>M(n)),[n]),v=W(),C=(0,l.useCallback)((e=>i().createElement(S,$({},e,{isSorted:!!r&&r.field===e.columnData.id}))),[r]),[w,R]=(0,l.useState)(null),{canRemove:x,canUpdate:O}=(e=>{let{metadata:t,mode:n,connection:o,onRemoveRelation:a,onEditRelation:r,allowOnlyCreateNew:l}=e;const i=(0,E.xvW)(o);if(p.N5.mode.selectors.getIsEditableMode(n)&&o&&(!l||i)){const{relation:{relationType:e}}=o,l=(0,E.$qe)(o),i=(0,E.V3K)(t,e);return{canRemove:a&&!l&&(0,E.Edd)(n,i),canUpdate:r&&!l&&(0,E.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:t,onRemoveRelation:g,onEditRelation:m,metadata:a,allowOnlyCreateNew:f,connection:(0,s.path)([w,"connection"],y)}),P=(0,l.useCallback)((e=>R(e)),[]),T=(0,l.useCallback)((()=>m((0,s.path)([w,"connection"],y))),[w,m,y]),k=(0,l.useCallback)((()=>g((0,s.path)([w,"connection","relation","relationUri"],y))),[w,g,y]),N=x||O?i().createElement(G,{handleEditRelation:T,handleRemoveRelation:k,canRemove:x,canUpdate:O}):void 0;return i().createElement("div",{className:v.tableContainer},i().createElement(j.Z,{columnsData:b,rowsData:y,sorting:r,onSort:c,filters:u,onFilter:d,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:C,onRowHover:P,hoverRowIndex:w,hoveredRowRightContent:N,classes:{hoveredRowRightContentWrapper:v["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:v["row-cell__buttons-container"]},ref:h}))};Y.propTypes={mode:r().string,columnsData:k.uz,connections:r().arrayOf(E.Rjq),metadata:E.pGS,filters:r().objectOf(k.Dq),onFilter:r().func,sorting:k.nI,onSort:r().func,onEditRelation:r().func,onRemoveRelation:r().func,basicTableRef:r().shape({current:r().object}),allowOnlyCreateNew:r().bool};const J=Y;var K=n(93416),X=n(75512),ee=n(30553),te=n(32152),ne=n(1876),oe=n(60894),ae=n(43054),re=n(8818);const le=(0,f.Z)((()=>({popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),ie=e=>{let{className:t,showInactive:n,onShowInactiveChange:o}=e;const a=le(),r=(0,l.useRef)(),[c,s]=(0,l.useState)(!1),u=()=>s((e=>!e));return i().createElement(i().Fragment,null,i().createElement(re.k,{className:t,ref:r,tooltipTitle:h().text("More"),icon:ae.Z,onClick:u,size:"L"}),i().createElement(m.Popover,{open:c,classes:{paper:a.popupContent},anchorEl:r.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},i().createElement(m.FormControlLabel,{classes:{label:a.checkboxControlLabel},control:i().createElement(m.Checkbox,{className:a.checkboxControlCheckbox,checked:n||!1,onChange:e=>o(e.target.checked)}),label:h().text("Show inactive Relationships")})))},ce=(0,f.Z)({header:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},moreButton:{marginLeft:"-6px"}}),se=e=>{let{title:t,total:n,searchQuery:o,onChangeSearchQuery:a,filtersEnabled:r,onToggleFilters:l,columnsData:c,selectedColumns:s,onChangeColumns:u,showInactive:p,onChangeShowInactive:d}=e;const g=ce();return i().createElement(K.Z,{title:t,className:g.header},i().createElement(X.Z,{widthToHide:500},i().createElement(ee.Z,{height:24,margin:16}),i().createElement(m.Typography,{className:g.totalCaption,variant:"caption"},n>1?h().text("${count} entities",{count:n}):h().text("${count} entity",{count:n}))),i().createElement(te.i,{query:o,onChange:a}),i().createElement(ne.Z,{enabled:r,onClick:l}),i().createElement(ee.Z,{height:24,margin:4}),i().createElement(oe.Z,{columnsData:c,selectedColumns:s,onChangeColumns:u}),i().createElement(ie,{className:g.moreButton,showInactive:p,onShowInactiveChange:d}))};se.propTypes={title:r().string,total:r().number,columnsData:k.uz,selectedColumns:r().arrayOf(r().string),onChangeColumns:r().func,searchQuery:r().string,onChangeSearchQuery:r().func,filtersEnabled:r().bool,onToggleFilters:r().func,showInactive:r().bool,onChangeShowInactive:r().func};const ue=se;var pe=n(26180),de=n(31276);function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){ge(e,t,n[t])}))}return e}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he="CHANGE_SEARCH_QUERY",fe="CHANGE_SHOW_INACTIVE",ye=me({},pe.ZP.actions,{changeSearchQuery:(0,de.zD)(he),changeShowInactive:(0,de.zD)(fe)}),be=(e,t)=>{switch(t.type){case he:return me({},e,{searchQuery:t.payload,page:0});case fe:return me({},e,{showInactive:t.payload});default:return pe.ZP.reducer(e,t)}};var ve=n(26481),Ce=n(37152),we=n(52016),Ee=n(10237),Re=n(11013),xe=n(58662),Oe=n(99136);const Pe=[10,25,50,100],Te=[{id:"entity.label",get label(){return h().text("Entity label")},dataTypeDefinition:{type:E.oS0.TYPE_STRING},hideable:!1},{id:"relation.label",get label(){return h().text("Directional label")},dataTypeDefinition:{type:E.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return h().text("Start date")},dataTypeDefinition:E.PY2.startDate},{id:"relation.activeness.endDate",get label(){return h().text("End date")},dataTypeDefinition:E.PY2.endDate}],Se=(0,s.pipe)(E.Tde,(0,s.concat)("relation.")),je=(0,s.pipe)((0,s.map)((e=>({id:Se(e.uri),label:e.label,dataTypeDefinition:(0,E.PFL)(e)}))),(0,s.uniqBy)((0,s.prop)("id"))),ke=(0,s.pipe)(((e,t)=>{let{content:{inRelations:n=[],outRelations:o=[]}}=e,{relationTypes:a}=t;return(0,s.pipe)(L,(0,s.chain)((e=>(0,s.pipe)((0,s.find)((0,s.propEq)("uri",e)),E.DK$)(a))))([...n,...o])}),je,(0,s.concat)(Te));var Ne=n(99341);function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){De(e,t,n[t])}))}return e}function De(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=e=>e.uri||e,Ae=e=>t=>Ze(t)===e,Fe=(0,s.curry)(((e,t)=>{const n=(t,o)=>{let a=Ze(o),r=!1;a.startsWith("!")&&(a=a.slice(1),r=!0);const l=e[a]&&(0,E.uGe)(E.BDP.READ,e[a]),i=t.find(Ae(a))||!l?t:t.concat(o.uri?Ie({},o,{uri:a}):a);return r?i:(0,s.keys)(e).reduce(((t,o)=>e[o].extendsTypeURI!==a||t.find(Ae(o))?t:n(t,o)),i)};return t.reduce(n,[])})),ze=(0,s.curry)(((e,t)=>{const n=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.reduce(((n,o)=>{const a=Ze(o),r=(0,s.path)([a,t,"objectTypeUri"],e);return!r||n.find(Ae(r))?n:n.concat(r)}),[])};return Ie({},t,{entityTypes:[...n("startObject",t.inRelations),...n("endObject",t.outRelations)]})})),_e=(0,s.indexBy)((0,s.prop)("uri")),Le=(0,s.curry)(((e,t)=>{const n=_e(e.relationTypes),o=_e(e.entityTypes),a=e=>(0,s.evolve)({inRelations:Fe(n),outRelations:Fe(n),entityTypes:Fe(o),nextEntry:a},e);return(0,s.pipe)((0,s.unless)((0,s.either)((0,s.prop)("nextEntry"),(0,s.prop)("entityTypes")),ze(n)),a)(t)})),Ue=(0,f.Z)({addArea:{display:"flex",alignItems:"center",height:"48px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),Ve=(0,s.pluck)("id",Te),[Be]=Ve,Me=e=>{let{className:t,config:n,entity:o,metadata:a,connections:r=[],total:c=0,mode:u,relationToAdd:d,relationsToEdit:m=[],checkIfCanAddRelations:g,dispatch:h}=e;const f={searchQuery:"",filters:null,visibleColumns:Ve,sorting:{order:n.sortOrder||"asc",field:n.sortColumn||Be},page:0,rowsPerPage:n.max||15,showInactive:!1},y=Ue(),b=(0,l.useContext)(ve.j)?u:E.fO_.VIEWING,[C,w]=(0,l.useReducer)(be,f),R=(0,s.pipe)(ye.changeSearchQuery,w),x=(0,s.pipe)(ye.changeShowInactive,w);(0,l.useEffect)((()=>{R("")}),[null==o?void 0:o.uri]);const{visibleColumns:O,searchQuery:P,filters:T,sorting:S,page:j,rowsPerPage:k,showInactive:N}=C,I=(0,l.useMemo)((()=>ke(n,a)),[n,a]),D=(0,l.useMemo)((()=>O.map((e=>I.find((0,s.propEq)("id",e))))),[O,I]),Z=(0,l.useMemo)((()=>((e,t,n)=>{const o=E.wSh.fromFalsy(e).map(E.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome(""),a=(0,Ne.Tz)(n,t);return(new E.MEy).addClause(o).addClause(a).build()})(P,T,D)),[T,P]),{isLoading:A}=(0,Ce.a)({sorting:S,filter:Z,page:j,rowsPerPage:k,config:n,entity:o,relationActivityFilter:N?E.YJ7.ALL:E.YJ7.ACTIVE_ONLY,mode:u}),F=(0,l.useMemo)((()=>{return e=f.rowsPerPage,Pe.filter((t=>t!==e)).concat(e).sort(s.subtract);var e}),[]),{handleRowsPerPageChange:z,handlePageChange:_}=(0,l.useMemo)((()=>({handleRowsPerPageChange:(0,s.pipe)(ye.changeRowsPerPage,w),handlePageChange:(0,s.pipe)(ye.changePage,w)})),[]),L=(0,l.useCallback)((()=>{const e=(0,E.vlo)({config:n,mode:b,metadata:a});(0,s.pipe)(p.N5.relations.actions.openRelationEditor(n.id),h)(e)}),[n,b,a,h]),U=(0,l.useCallback)((e=>{h(p.N5.relations.actions.closeRelationEditor(n.id,e)),h(p.N5.relations.actions.removeRelation(n.id,e));const t=r.find((t=>p.N5.relations.selectors.getRelationUriFromConnection(t)===e)),o=p.N5.relations.selectors.getEntityUriFromConnection(t);(0,E.ZiX)(o)&&h(p.N5.modifiedEntities.actions.entityDeleted(o))}),[n,r,h]),V=o&&g,B=d?[d,...m]:m,{canUpdate:M,canDelete:W}=(0,we.l)(),H=M(n),Q=W(n),q=(0,l.useRef)(null);return i().createElement(Ee.Z,{className:t},i().createElement(ue,{title:n.caption,total:c,columnsData:I,selectedColumns:O,onChangeColumns:(0,s.pipe)(ye.changeColumns,w),searchQuery:P,onChangeSearchQuery:R,filtersEnabled:!!T,onToggleFilters:(0,s.pipe)(ye.toggleFilters,w),showInactive:N,onChangeShowInactive:x}),V&&i().createElement("div",{className:y.addArea},i().createElement(v,{onClick:L})),B.map((e=>i().createElement(Re.Z,{key:p.N5.relations.selectors.getRelationUriFromConnection(e),connection:e,config:n,mode:b,metadata:a}))),i().createElement("div",{style:{position:"relative"}},i().createElement(J,{mode:b,columnsData:D,connections:r,metadata:a,filters:T,onFilter:(0,s.pipe)(ye.changeFilter,w),sorting:S,onSort:(0,s.pipe)(ye.toggleSort,w),onEditRelation:H?(0,s.pipe)(p.N5.relations.actions.openRelationEditor(n.id),h):null,onRemoveRelation:Q?U:null,basicTableRef:q,allowOnlyCreateNew:n.allowOnlyCreateNew}),i().createElement(xe.Z,{count:c,rowsPerPageOptions:F,rowsPerPage:k,onChangeRowsPerPage:z,page:j,onChangePage:_,basicTableRef:q}),A&&i().createElement(Oe.Z,null)))};Me.propTypes={className:r().string,config:E.PiC,entity:E.pyR,metadata:E.pGS,connections:r().arrayOf(E.Rjq),total:r().number,mode:r().string,relationToAdd:r().object,relationsToEdit:r().array,dispatch:r().func,checkIfCanAddRelations:r().bool};const We=Me;function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qe=(0,s.memoizeWith)(((e,t)=>t.id),((e,t)=>(0,s.evolve)({content:Le(e)},t))),qe=(0,u.connect)(((e,t)=>{const{config:n}=t;return{connections:p.ZP.selectors.getConnectionsWithDraftsByViewId(e,n.id),total:p.ZP.selectors.getTotalByViewId(e,n.id),entity:p.ZP.selectors.getEntity(e),metadata:p.ZP.selectors.getMetadata(e),mode:p.ZP.selectors.getMode(e),relationToAdd:p.ZP.selectors.getRelationToAddByViewId(e,n.id),relationsToEdit:p.ZP.selectors.getRelationsToEditByViewId(e,n.id),checkIfCanAddRelations:p.ZP.selectors.getCheckIfCanAddRelations(e,n.content)}}),void 0,((e,t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){He(e,t,n[t])}))}return e}({},e,t,n,{config:Qe(e.metadata,n.config)})))(We);var Ge=n(36138),$e=n(22664),Ye=n(585);const Je=(0,Ge.createGenerateClassName)({productionPrefix:"relTable",disableGlobal:!0}),Ke=e=>{let{config:t,store:n,onResize:a=s.identity,className:r}=e;return i().createElement(u.Provider,{store:n},i().createElement(N.m.Provider,{value:t.id},i().createElement(Ge.StylesProvider,{generateClassName:Je},i().createElement($e.MuiPickersUtilsProvider,{utils:o.Z},i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>a(Math.floor(e),Math.floor(t))}),t&&i().createElement(qe,{config:t,className:r}),i().createElement(Ye.Z,null)))))};Ke.propTypes={config:E.PiC,store:r().object,onResize:r().func,className:r().string};const Xe=Ke}}]);
|
package/4676.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4676,3745],{27815:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(71153),s=n.n(a),c=n(17440),u=n(52730),p=n(59431),d=n(99493),h=n(94079),f=n(92575),E=n(37285),m=n(96808),g=n(7785),y=n(79692);function b(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){v(e,t,n[t])}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T={input:e=>b({},e,{fontSize:"14px"}),menuPortal:e=>b({},e,{zIndex:1300})},O=(0,y.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const I=e=>{let{entityType:t,selectedAttributes:n,className:l,onChange:a,title:y,disableUnderline:b,menuPlacement:v="bottom"}=e;const I=(0,u.useSelector)(p.ZP.selectors.getMetadata),x=O(),S=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const o=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:o,level:t});const l=(0,d.EUG)(I,r);return e.concat(l?S(l,t+1,o):[])}),[])}),[I]),N=(0,r.useMemo)((()=>S((null==t?void 0:t.attributes)||[])),[t,S]);return o().createElement("div",{className:s()(x.root,l)},o().createElement(h.Typography,{className:x.title,variant:"subtitle1"},y||i().text("Attribute")),o().createElement(f.Z,{value:n,options:N,TextFieldProps:{InputProps:{disableUnderline:b},classes:{root:x.dropDownInput}},components:{DropdownIndicator:m.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["data"]);return o().createElement(E.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:l,innerProps:i}=e;return o().createElement("div",i,o().createElement(g.Z,{checked:n,level:r.level,data:r,label:l,labelInText:l,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),a),styles:T,classes:x,menuPlacement:v,menuPortalTarget:document.body}))}},60894:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),l=n(13980),i=n.n(l),a=n(94656);function s(){return s=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},s.apply(this,arguments)}const c=e=>o().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),p=n(17440),d=n(47458),h=n(87918),f=n.n(h),E=n(85657);const m=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:i,tooltipTitle:a}=e;const[s,h]=(0,r.useState)(null),m=(0,r.useCallback)((e=>{const t=(0,p.pipe)(E.JJ,(0,p.pluck)("id"))(e),r=(0,E.u)(n,e);l(r?(0,p.difference)(n,t):(0,p.uniq)((0,p.concat)(n,t)))}),[n,l]);return o().createElement(o().Fragment,null,o().createElement(u.k,{tooltipTitle:a||f().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),o().createElement(d.G,{onColumnClick:m,anchorEl:s,columnsData:t,onClose:()=>h(null),title:i,selectedColumns:n}))};m.propTypes={columnsData:a.uz,selectedColumns:i().arrayOf(i().string),onChangeColumns:i().func,title:i().string,tooltipTitle:i().string};const g=m},47458:(e,t,n)=>{n.d(t,{G:()=>I});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(17440),s=n(99493),c=n(44890),u=n(97820),p=n(85657),d=n(56656),h=n(54763),f=n(13980),E=n.n(f),m=n(7785),g=n(27239),y=n(71153),b=n.n(y);const v=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),T=e=>{let{item:t,onClick:n,checked:r,level:l,style:i,isFocused:a,isGroupItem:s,hideCheckBox:c}=e;const u=v();return o().createElement(m.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:l,data:t,label:o().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:i,isFocused:a,hideIcon:s,className:b()({[u.groupItem]:s})})};T.propTypes={item:E().shape({label:E().string,filterText:E().string}),level:E().number,onClick:E().func,checked:E().bool,style:E().object,isGroupItem:E().bool,isFocused:E().bool,hideCheckBox:E().bool};const O=T,I=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:f,onColumnClick:E,selectedColumns:m,hideCheckBox:g}=e;const y=v(),[b,T]=(0,r.useState)(""),I=(0,r.useMemo)((()=>(0,p.eX)(f,b)),[f,b]),x=(0,r.useMemo)((()=>(0,d.LG)(I)),[I]),S=(0,s.fW1)("label")(I)||308,N=(0,r.useCallback)((e=>{let{item:t}=e;return E(t)}),[E]),{focusIndex:C,handleKeyDown:P}=(0,h.t)({items:x,open:!0,onSelectFocusedItem:N,selectedItems:m,onClose:n}),D=(0,r.useCallback)((0,a.pipe)(n,(()=>T(""))),[n]),_=Math.min(300,32*x.length),R=Math.max(140,_+108);return o().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:D,onSearch:T,title:l||i().text("Show/hide columns"),containerWidth:S,containerHeight:R,searchInputOnKeyDown:P},o().createElement(c.Z,{fixedTitle:!1,height:_,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return o().createElement(O,{hideCheckBox:g,style:e,item:r,level:l,isFocused:C===n,checked:(0,p.u)(m,r),isGroupItem:(0,p.yf)(r),onClick:g?(0,a.pipe)(E,D):E})},items:x,getItemSize:()=>32,focusIndex:C}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>a,u:()=>b});var r=n(17440),o=n(99493);function l(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){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),p=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=p(n.children||[],t),e):e.concat(t)},d=(0,r.curry)(((e,t)=>o.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),h=(0,r.reduce)(((e,t)=>p(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),f=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(d(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?f(e,t.children,n+1):[]])))(t)})),E=(0,r.has)("columns"),m=e=>{let{id:t,label:n,columns:o}=e;return[{id:t,groupId:t,label:n},...o.map((0,r.assoc)("groupId",t))]},g=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(E,m)),(0,r.filter)((0,r.either)(a,u)),h,f(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],b=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return a(t)?n.every(r):n.some(r)}},39621:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),o=n.n(r),l=n(17440),i=n(87918),a=n.n(i),s=n(6782),c=n(94079),u=n(31517),p=n(31276);const d=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),h=[a().text("minutes"),a().text("hours"),a().text("days"),a().text("weeks"),a().text("months"),a().text("years")],f=e=>{let{interval:[t,n],onChange:r,onFocus:i}=e;const a=d(),f=(0,l.pipe)(p.NA,parseInt,(e=>[e,n]),r),E=(0,l.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return o().createElement("div",{className:a.root},o().createElement(c.TextField,{type:"number",value:t||"",onChange:f,inputProps:{min:1,onFocus:i},InputProps:{classes:{root:a.input}},className:a.inputNumber}),o().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:a.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:h.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:E,TextFieldProps:{inputProps:{onFocus:i},InputProps:{classes:{root:a.input}}}}))}},93873:(e,t,n)=>{n.d(t,{a:()=>P});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(94079),s=n(83348),c=n(8818),u=n(67766),p=n(42767),d=n(99493);const h=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),f=(0,s.Z)(a.Link),E=e=>{let{total:t=0,onPrev:n,onNext:r,onSearchResultsClick:l,isPrevDisabled:a,isNextDisabled:s}=e;const E=h();return o().createElement("div",{className:E.container},o().createElement(f,{className:E.link,component:"button",variant:"caption",onClick:l,underline:"none",tooltipTitle:i().text("Go to search results")},(0,d.k7L)(t,1e6)," ",1===t?i().text("Search result"):i().text("Search results")),o().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:i().text("Go to previous profile"),onClick:n,disabled:a,showForDisabled:!0}),o().createElement(c.k,{size:"L",icon:p.Z,tooltipTitle:i().text("Go to next profile"),onClick:r,disabled:s,showForDisabled:!0}))};var m=n(52730),g=n(59431),y=n(17440),b=n(39450),v=n(67218);function T(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){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class I{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:l,searchTenant:i,apiPath:a,dtssPath:s,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=T({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,d.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,d.ZOr)(r,o)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,d.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,d.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=l,this.searchTenant=i,this.apiPath=a,this.dtssPath=s,this.globalSearchRequestOptions=c}}function x(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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class N{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,d.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:x({},t.searchBody,{filter:e.length?(0,d.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,d.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,d.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const C=(e,t)=>(0,y.pipe)((0,y.map)((0,y.prop)("uri")),(0,y.reject)((e=>t.includes(e))))(e),P=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:i,isNextDisabled:a}=(()=>{const e=(0,v._)(),t=(0,v._)(),n=(0,v._)(),{uri:o,index:l,total:i,tenant:a,cache:s}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},{type:c,data:u}=(0,m.useSelector)(g.ZP.selectors.getSearchProviderData)||{},p=(0,m.useSelector)(g.ZP.selectors.getTenant),h=(0,m.useSelector)(g.ZP.selectors.getApiPath),f=(0,m.useSelector)(g.ZP.selectors.getDtssPath),E=(0,m.useSelector)((e=>g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),y=(0,r.useContext)(b.m),T=(0,m.useDispatch)(),[O,x]=(0,r.useState)(!1),S=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new I(t);case"graphsearch":return new N(t)}})(c,{data:u,tenant:p,searchTenant:a,apiPath:h,dtssPath:f,globalSearchRequestOptions:E})),[c,u,p,a,h,f,E]),P=(0,r.useCallback)((e=>{T(g.yC.actions.updateSearchNavigationDataFields(e))}),[T]),D=(0,r.useCallback)((e=>{const t=p!==a?(0,d.wwR)({uri:e,dataTenant:a}):e;T(g.ui.actions.openEntity({uri:t,viewId:y,source:"navigation"}))}),[T,y,p,a]),_=(0,r.useCallback)((()=>{T(g.ui.actions.openPerspective({perspectiveId:c,viewId:y}))}),[T,c,y]);(0,r.useEffect)((()=>{l>=i?P({index:i-1}):l<0&&P({index:0})}),[i,l,P]);const R=(0,r.useCallback)(((e,r,o)=>{x(!0),t(S.requestTotal()).then((e=>P({total:e})));const l=o+1;return n(S.requestEntities(15,l)).then((t=>{if(t){if(t.length){const n=C(t,e);if(n.length>0)return P({cache:e.concat(n),uri:n[0],index:l+t.length-n.length}),void D(n[0]);if(o+t.length<r-1)return R(e,r-t.length,o+t.length)}P({index:l})}})).finally((()=>{x(!1)}))}),[S,P,D]),w=(0,r.useCallback)(((e,r)=>{x(!0),t(S.requestTotal()).then((e=>P({total:e})));const o=r-1,l=Math.max(0,r-15),i=15+Math.min(0,r-15);return n(S.requestEntities(i,l)).then((t=>{if(t){if(t.length){const n=C(t,e);if(n.length>0)return P({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void D(n[n.length-1]);if(r-t.length>0)return w(e,r-t.length)}P({index:0})}})).finally((()=>{x(!1)}))}),[S,P,D]),M=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const l=t[n];return x(!0),e(S.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),M(e,n,r-1,o)}P({index:o+1,uri:l,cache:t,total:r}),D(l)})).finally((()=>{x(!1)}))}if(!(o>=r-1))return R(t,r,o);P({cache:t,total:r,index:r-1})}),[S,P,D,R]),A=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const l=t[n];return x(!0),e(S.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),A(e,n-1,r-1,o-1)}P({index:o-1,uri:l,cache:t,total:r}),D(l)})).finally((()=>{x(!1)}))}if(!(o<=0))return w(t,o);P({index:0,cache:t,total:r})}),[S,P,D,w]),k=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)-1;A(s,e,i,l)}}),[A,s,o,i,l]),L=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)+1;M(s,e,i,l)}}),[M,s,o,i,l]);return{total:i,onPrev:k,onNext:L,onSearchResultsClick:_,isPrevDisabled:O||l<=0,isNextDisabled:O||l>=i-1}})();return(()=>{const{cache:e}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},t=(0,m.useSelector)(g.ZP.selectors.getMode),n=(0,m.useSelector)(g.ZP.selectors.getEntity);return(0,d.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(E,{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:i,isNextDisabled:a}):null}},92575:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),o=n.n(r),l=n(13980),i=n.n(l),a=n(17440),s=n(70347);const c=(0,n(5407).Z)(s.ZP);var u=n(5190),p=n(18461),d=n(94079),h=n(71153),f=n.n(h),E=n(88611);function m(){return m=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},m.apply(this,arguments)}function g(e){const{innerProps:t,innerRef:n,children:r,isFocused:l,isSelected:i,selectProps:{classes:a},label:s}=e;return o().createElement(d.MenuItem,m({className:f()(a.option,{[a["option--selected"]]:i}),ref:n,selected:l,component:"div"},t),o().createElement(d.Checkbox,{color:"primary",checked:i}),o().createElement(E.C,{value:s},o().createElement("div",{className:a["option--item"]},r)))}g.propTypes={children:i().node,innerProps:i().shape({id:i().string.isRequired,key:i().string,onClick:i().func.isRequired,onMouseMove:i().func.isRequired,onMouseOver:i().func.isRequired,tabIndex:i().number.isRequired}).isRequired,innerRef:i().oneOfType([i().oneOf([null]),i().func,i().shape({current:i().any.isRequired})]),isFocused:i().bool.isRequired,isSelected:i().bool.isRequired,label:i().string,selectProps:i().shape({classes:i().shape({option:i().string})})};const y={Option:g};var b=n(79692),v=n(31276);function T(){return T=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},T.apply(this,arguments)}function O(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){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=(0,b.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let S=0;function N(e){const{label:t,creatable:n,getOptions:l,loadingIndicator:i,components:s,classes:d,styles:h,onChange:f,onInputChange:E,menuPlacement:m="auto"}=e,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),b=n?c:l?p.Z:u.Z,[I,N]=(0,r.useState)(""),C=x((0,a.omit)(["classes"],e)),P="custom-select-"+S++,D=O({},y,s),_=(0,v.ze)(C,d),R=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:i?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},h),w=t?{inputId:P,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:P,shrink:!(!e.value||!e.value.length)||void 0,className:_.label}},e.TextFieldProps)}:{};return o().createElement(b,T({isMulti:!0,inputId:P,inputValue:I,onChange:function(e,t){f(e,t),"create-option"===t.action&&(N(""),E("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;E(e,{action:n}),"set-value"!==n&&N(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:_,components:D,styles:R,menuPlacement:m,loadOptions:l},w,g))}N.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},N.propTypes={creatable:i().bool,cacheOptions:i().bool,defaultOptions:i().bool,value:i().arrayOf(i().shape({label:i().string.isRequired,value:i().any})),options:i().arrayOf(i().shape({label:i().string.isRequired,value:i().any})),onChange:i().func,onInputChange:i().func,placeholder:i().string,label:i().string,loadingIndicator:i().bool,components:i().shape({ClearIndicator:i().func,Control:i().func,DropdownIndicator:i().func,DownChevron:i().func,CrossIcon:i().func,Group:i().func,GroupHeading:i().func,IndicatorsContainer:i().func,IndicatorSeparator:i().func,Input:i().func,LoadingIndicator:i().func,Menu:i().func,MenuList:i().func,MenuPortal:i().func,LoadingMessage:i().func,NoOptionsMessage:i().func,MultiValue:i().func,MultiValueContainer:i().func,MultiValueLabel:i().func,MultiValueRemove:i().func,Option:i().func,Placeholder:i().func,SelectContainer:i().func,SingleValue:i().func,ValueContainer:i().func}),classes:i().shape({control:i().string,valueContainer:i().string,multiValue:i().string,noOptionsMessage:i().string,singleValue:i().string,placeholder:i().string,menu:i().string,clearIndicator:i().string,dropdownIndicator:i().string,option:i().string,"option--selected":i().string,label:i().string}),styles:i().shape({clearIndicator:i().func,container:i().func,control:i().func,dropdownIndicator:i().func,group:i().func,groupHeading:i().func,indicatorsContainer:i().func,indicatorSeparator:i().func,input:i().func,loadingIndicator:i().func,loadingMessage:i().func,menu:i().func,menuList:i().func,menuPortal:i().func,multiValue:i().func,multiValueLabel:i().func,multiValueRemove:i().func,noOptionsMessage:i().func,option:i().func,placeholder:i().func,singleValue:i().func,valueContainer:i().func}),TextFieldProps:i().object,getOptions:i().func,menuPlacement:i().string,menuPortalTarget:i().object,getOptionValue:i().func,isSearchable:i().bool};const C=N},39827:(e,t,n)=>{n.d(t,{G:()=>h});var r=n(24328),o=n.n(r),l=n(71153),i=n.n(l),a=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function 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)}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const h=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:h,buttonWrapper:f}=s,E=d(s,["active","buttonWrapper"]);return o().createElement("div",{className:i()(c.container,r)},t.map((e=>{let{id:t}=e,r=d(e,["id"]);return o().createElement(a.k,p({},r,{classes:E,size:"S",key:t,className:i()({[i()(c.active,h)]:n===t},c.buttonWrapper,f),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},10159:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),o=n.n(r),l=n(94079);function i(){return i=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},i.apply(this,arguments)}const a=e=>o().createElement("svg",i({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),o().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},o().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),o().createElement("g",{mask:"url(#AttributesList_svg__a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),o().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),o().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),o().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=a,text:n,secondaryText:r}=e;const i=s();return o().createElement("div",{className:i.root},o().createElement(t,{className:i.logo}),o().createElement("div",{className:i.textBox},o().createElement(l.Typography,{className:i.text},n),r&&o().createElement(l.Typography,{className:i.secondaryText},r)))}},51229:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);const l=()=>o().createElement("div",{style:{flex:1}})},85451:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(24328),o=n.n(r),l=n(52730),i=n(87918),a=n.n(i),s=n(17440),c=n(71153),u=n.n(c),p=n(94079),d=n(92575),h=n(96808),f=n(99493),E=n(59431),m=n(79692);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b={input:e=>g({},e,{fontSize:"14px"}),loadingMessage:e=>g({},e,{fontSize:"14px"}),menuPortal:e=>g({},e,{zIndex:1300})},v=(0,m.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),T=e=>{let{selectedUsers:t,onChange:n,className:i,disableUnderline:c}=e;const m=v(),g=e=>({value:e,label:e}),y=e=>e.map(g),T=(0,l.useSelector)(E.ZP.selectors.getTenant),O=(0,l.useSelector)(E.ZP.selectors.getServicesPath),I=(0,r.useRef)();return o().createElement("div",{className:u()(m.root,i)},o().createElement(p.Typography,{className:m.title,variant:"subtitle1"},a().text("User")),o().createElement(d.Z,{value:y(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(I.current||(I.current=(0,f.kz_)({tenant:T,servicesPath:O})),I.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>f.P6Y.strings.search(t,e))):t)(e),y))),TextFieldProps:{InputProps:{disableUnderline:c},className:m.dropDownInput},components:{DropdownIndicator:h.Z},styles:b,classes:m,menuPortalTarget:document.body}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>p,_V:()=>d,Xr:()=>h});var r=n(17440),o=n(87918),l=n.n(o),i=n(31537);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(i.I))),p=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),d=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(d).join(", "):(0,r.is)(Object,e)?d("value"in e?e.value:Object.values(e)):e.toString(),h=e=>({[i.I.COMMENT_ADDED]:l().text("Comment added"),[i.I.COMMENT_DELETED]:l().text("Comment deleted"),[i.I.COMMENT_UPDATED]:l().text("Comment updated"),[i.I.ENTITIES_MERGED]:l().text("Profile merged"),[i.I.ENTITIES_MERGED_MANUALLY]:l().text("Profile merged manually"),[i.I.ENTITIES_MERGED_ON_THE_FLY]:l().text("Profile merged on the fly"),[i.I.ENTITIES_SPLITTED]:l().text("Profile un-merged"),[i.I.ENTITY_CHANGED]:l().text("Profile updated"),[i.I.ENTITY_CREATED]:l().text("Profile created"),[i.I.ENTITY_LOST_MERGE]:l().text("Profile lost merge"),[i.I.ENTITY_REMOVED]:l().text("Profile removed"),[i.I.GROUP_CHANGED]:l().text("Group updated"),[i.I.GROUP_CREATED]:l().text("Group created"),[i.I.GROUP_REMOVED]:l().text("Group removed"),[i.I.MODEL_UPDATED]:l().text("Model was updated"),[i.I.NOT_MATCHES_RESET]:l().text("Not matches reset"),[i.I.NOT_MATCHES_SET]:l().text("Not matches set"),[i.I.PERIODIC_TASK_SCHEDULED]:l().text("Periodic task was scheduled"),[i.I.POTENTIAL_MATCHES_FOUND]:l().text("Potential matches found"),[i.I.POTENTIAL_MATCHES_REMOVED]:l().text("Potential matches removed"),[i.I.RELATIONSHIP_CHANGED]:l().text("Relationship updated"),[i.I.RELATIONSHIP_CREATED]:l().text("Relationship created"),[i.I.RELATIONSHIP_REMOVED]:l().text("Relationship removed"),[i.I.USER_LOGIN]:l().text("Logged in"),[i.I.USER_LOGOUT]:l().text("Logged out"),[i.I.USER_PROFILE_VIEW]:l().text("Profile viewed"),[i.I.USER_SEARCH]:l().text("Searched"),[i.I.ANALYTICS_ATTRIBUTES_CHANGED]:l().text("Analytics attribute changed"),[i.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:l().text("SFDC connector synchronization issue")}[e]||"")},51843:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),l=n(95038),i=n.n(l),a=n(87918),s=n.n(a),c=n(17440),u=n(99493),p=n(94079),d=n(96808),h=n(37699);const f=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),E=i().localeData().longDateFormat("L"),m=e=>{let{values:t,onChange:n,onFocus:l}=e;const i=E,a=(0,r.useRef)(null),[m,g]=(0,r.useState)(!1),y=f(),b=(0,r.useCallback)((()=>{g((e=>!e)),l()}),[l]),v=()=>{g(!1)};return o().createElement("div",{className:y.root},o().createElement(p.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,i))).join(" — "),onClick:b,variant:"filled",ref:a,InputProps:{endAdornment:o().createElement(d.Z,{selectProps:{classes:y,menuIsOpen:m},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${i} — ${i}`)}),o().createElement(p.Menu,{variant:"menu",open:m,autoFocus:!1,classes:{paper:y.paper},anchorEl:a.current,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:m,style:{width:"100%"}}},o().createElement(h.Z,{values:t,onCancel:v,onApply:e=>{n(e),g(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},91515:(e,t,n)=>{n.d(t,{Z:()=>J});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(94079),s=n(17440),c=n(51229),u=n(36444),p=n(22385),d=n(48465),h=n(85451),f=n(27815),E=n(71153),m=n.n(E),g=n(31517),y=n(67885);const b=[y.K.WITHIN,y.K.AGO,y.K.BETWEEN],v=e=>({[y.K.WITHIN]:i().text("Within the last"),[y.K.AGO]:i().text("More than"),[y.K.BETWEEN]:i().text("Date range")}[e]||"");var T=n(39621),O=n(20562),I=n(51843),x=n(79692);const S=(0,x.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),N=[null,null],C=[null,"hours"],P=e=>{let{value:t,onChange:n,className:l}=e;const s=S(),c=e=>e===y.K.WITHIN||e===y.K.AGO,u=e=>e===y.K.BETWEEN,p=u(null==t?void 0:t.type)?t.period:N,d=c(null==t?void 0:t.type)?t.period:C,[h,f]=(0,r.useState)(p),[E,x]=(0,r.useState)(d),P=(null==t?void 0:t.type)||y.K.WITHIN,D=e=>c(e)?E:u(e)?h:void 0,_=e=>{n({type:P,period:e})};return(0,O.D)((()=>{t?c(t.type)?x(t.period):u(t.type)&&f(t.period):(f(N),x(C))}),[t]),o().createElement("div",{className:m()(s.root,l)},o().createElement(a.Typography,{className:s.title,variant:"subtitle1"},i().text("Date")),o().createElement("div",{className:s.intervalContainer},o().createElement(g.Z,{label:"",className:s.typeInput,value:{value:P,label:v(P)},options:b.map((e=>({value:e,label:v(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:D(r),type:r})}}),c(P)?o().createElement(T.Z,{interval:E,onChange:_}):o().createElement(I.Z,{values:h,onChange:_})))};var D=n(92575),_=n(96808),R=n(65942);const w=[R.M.UPDATE,R.M.MERGE,R.M.UNMERGE];function M(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){A(e,t,n[t])}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={input:e=>M({},e,{fontSize:"14px"}),menuPortal:e=>M({},e,{zIndex:1300})},L=(0,x.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),j=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const l=L(),c=e=>{return{value:e,label:(t=e,{[R.M.UPDATE]:i().text("Update"),[R.M.MERGE]:i().text("Merge"),[R.M.UNMERGE]:i().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),p=u(w);return o().createElement("div",{className:m()(l.root,r)},o().createElement(a.Typography,{className:l.title,variant:"subtitle1"},i().text("Activity")),o().createElement(D.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),options:p,TextFieldProps:{classes:{root:l.dropDownInput}},components:{DropdownIndicator:_.Z},styles:k,classes:l,menuPlacement:"bottom",menuPortalTarget:document.body}))},H=(0,x.Z)({popup:{width:500,height:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px 0",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const U=e=>{let{className:t,filter:n,onApplyFilter:l,onClearFilter:c,entityType:E}=e;const m=H(),[g,y]=(0,r.useState)(null),b=()=>y(null),[v,T]=(0,r.useState)(n);(0,r.useEffect)((()=>{T(n)}),[n]);const O=(0,s.curry)(((e,t)=>{T((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){G(e,t,n[t])}))}return e}({},n,{[e]:t})))})),{activities:I=[],attributes:x=[],dateRange:S=null,users:N=[]}=v||{};return o().createElement(o().Fragment,null,o().createElement(p.Z,{icon:u.Z,size:"L",onClick:e=>y(e.currentTarget),className:t}),o().createElement(a.Popover,{classes:{paper:m.popup},open:!!g,anchorEl:g,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement("div",{className:m.filterContainer},o().createElement(a.Typography,{variant:"h6"},i().text("Filter")),o().createElement("div",{className:m.filterContainerScrollable},o().createElement(P,{value:S,onChange:O("dateRange"),className:m.filterItem}),o().createElement(h.Z,{selectedUsers:N,onChange:O("users"),className:m.filterItem}),o().createElement(j,{selectedHistoryActivityTypes:I,onChange:O("activities"),className:m.filterItem}),o().createElement(f.Z,{selectedAttributes:x,entityType:E,onChange:O("attributes"),className:m.filterItem,title:i().text("Attribute updated")}))),o().createElement("div",{className:m.filterControls},o().createElement(a.Button,{onClick:c,className:m.clearButton},i().text("Clear all")),o().createElement(a.Button,{onClick:b},i().text("Cancel")),o().createElement(a.Button,{color:"primary",onClick:()=>{S&&(0,d.R)(S)?l(v):l((0,s.dissoc)("dateRange",v)),b()}},i().text("Apply")))))};var F=n(52730),Z=n(43054),B=n(59431),z=n(55847),V=n(98281),Y=n(31276);const W=(0,x.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),$=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=Y.ZT}=e;const l=W(),{text:i,selected:s,onClick:c}=n;return o().createElement(a.MenuItem,{classes:{root:l.menuItem},onClick:e=>{r(),c(e)},ref:t},s&&o().createElement(V.Z,{className:l.checkIcon}),o().createElement(a.Typography,{classes:{root:l.menuText}},i))}));$.displayName="MenuItemRenderer";const q=$,K=()=>{const e=(0,F.useSelector)(B.ZP.selectors.getHistoryMode),t=(0,F.useDispatch)(),n=e=>{t(B.N5.history.actions.setHistoryMode(e))},r=[{text:i().text("Compare to Current view"),selected:e===B.Z9.Current,onClick:()=>n(B.Z9.Current)},{text:i().text("Compare to Previous view"),selected:e===B.Z9.Previous,onClick:()=>n(B.Z9.Previous)}];return o().createElement(z.Z,{MenuItemRenderer:q,buttonComponent:p.Z,buttonProps:{icon:Z.Z,size:"L"},menuId:"history-menu",menuItems:r})},X=(0,x.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),J=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:l,onClearFilter:u}=e;const p=X();return o().createElement("div",{className:p.root},o().createElement(a.Typography,{variant:"h6"},i().text("History")),!(0,s.isNil)(t)&&o().createElement(o().Fragment,null,o().createElement(a.Divider,{orientation:"vertical",flexItem:!0,className:p.divider}),o().createElement(a.Typography,{variant:"body1",color:"textSecondary",className:p.count},1===t?i().text("${count} contributing profile",{count:t}):i().text("${count} contributing profiles",{count:t}))),o().createElement(c.Z,null),o().createElement(U,{className:p.filterButton,entityType:n,filter:r,onApplyFilter:l,onClearFilter:u}),o().createElement(K,null))}},6674:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(10159);const s=()=>o().createElement(a.Z,{text:i().text("History in the making"),secondaryText:i().text("When you create an event or perform an activity, it will show up here.")})},54362:(e,t,n)=>{n.d(t,{Z:()=>H});var r=n(24328),o=n.n(r),l=n(52730),i=n(44443),a=n(87918),s=n.n(a),c=n(17440),u=n(71153),p=n.n(u),d=n(99493),h=n(59431),f=n(94079),E=n(34606),m=n(79692);const g=(0,m.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),y=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:l}=e;const{uri:i,type:a,matchGroups:c,user:u,timestamp:h}=t,m=(0,d.GtP)(i),y=g({color:m});return o().createElement("div",{className:p()(y.historyRow,{[y.selected]:r}),onClick:l},o().createElement("div",{className:y.rowHeader},o().createElement("div",{className:y.badge}),o().createElement(f.Typography,{className:p()(y.title,{bold:n})},n?s().text("Current view"):(0,E.Xr)(a)),!n&&o().createElement(f.Typography,{className:y.date},s().date(h,"L LT"))),c&&o().createElement(f.Typography,{className:y.title},s().text("Match rule:")," ",c.join(", ")),o().createElement(f.Typography,{className:y.user},u))};var b=n(55912);const v=e=>e===b.b.FAKE_FILTERED_INCOMING||e===b.b.FAKE_FILTERED_OUTGOING,T=e=>{let{x:t,y:n,toX:r,toY:l,color:i,isDashed:a}=e;const s=((e,t,n,r)=>{const o=t>r,l=e<n,i=o?-6:6;return`M${e} ${t} L${l?n-12:n+12} ${t} ${l?`c 6 0 12 ${i} 12`:`c -6 0 -12 ${i} -12`} ${o?-12:12} L${n} ${r}`})(t,n,r,l);return o().createElement("path",{d:s,stroke:i,strokeWidth:2,fill:"none",strokeDasharray:a?"3,3":void 0})};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 I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:l,isDashed:i,isCollapsed:a,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const p=s?6:3;return o().createElement("g",O({},u,{ref:t}),c&&o().createElement("rect",{id:"line",x:n-p-4,y:r-p-4,width:2*p+8,height:2,fill:l}),o().createElement("circle",{cx:n,cy:r,r:p,fill:i?"#fff":l,stroke:l,strokeDasharray:i?"1,1":void 0,strokeWidth:2}),s&&o().createElement("g",{id:"icon"},o().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),a&&o().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const x=(0,n(83348).Z)(I),S=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:l}=t,i=[16],{links:a,rowLines:s,circles:c}=l.reduce(((e,t,a)=>{let{uri:s,height:c,uris:u,type:p,fakeType:h,index:f,timestamp:E,label:m}=t;const g=16*r[s].index+24,y=i[a];i.push(y+c);const O=v(h),I=O?u[0]:s,S=!(null!=u&&u.some((e=>r[e])));e.circles.push(o().createElement(x,{tooltipTitle:m,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${I}-${a}`,x:g,y,color:(0,d.GtP)(I),isDashed:O,isCollapsed:S,showCollapseIcon:!!u,showLine:h===b.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(o().createElement("rect",{key:`${I}-${f}`,x:g,y:y-8,width:"100%",height:16,fill:(0,d.GtP)(I),opacity:.06}));const N=p===b.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const i=l[a].height,s=16*n.index+24,c=N?y-i:y+i;g!==s&&e.links.push(o().createElement(T,{key:`link-${t}-${f}`,x:g,y,toX:s,toY:c,isDashed:v(h),color:(0,d.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,p=i[i.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:p,end:h}=e;if((null===(u=l[null==h?void 0:h.index])||void 0===u?void 0:u.type)===b.b.ENTITIES_SPLITTED)return;const f=(null==p?void 0:p.type)===b.b.ENTITIES_SPLITTED?(null==p?void 0:p.index)-1:null==p?void 0:p.index,E=(null==h?void 0:h.type)===b.b.ENTITIES_MERGED_MANUALLY||(null==h?void 0:h.type)===b.b.ENTITIES_MERGED?(null==h?void 0:h.index)+1:null==h?void 0:h.index,m=i[f]||i[i.length-2],g=i[E]||16;if(m<=g)return;const y=(0,d.GtP)(t);!h&&n.index>0&&c.push(o().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y:g,color:y,showLine:!0})),a.unshift(o().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${m} L${r} ${g}`,stroke:y,strokeWidth:2}))}))})),o().createElement("svg",{className:"chart",width:u,height:p},o().createElement("g",{id:"rowLines"},s),o().createElement("g",{id:"links"},a),o().createElement("g",{id:"circles"},c))}));var N=n(99136);const C=(0,m.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});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){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{historyData:t,isLoading:n,canLoadMore:a,onLoadMore:u,entityUri:E,historyEvent:m,findPreviousChange:g}=e;const b=C(),v=(0,l.useDispatch)(),T=(0,l.useSelector)(h.ZP.selectors.getIsEditableMode),O=(0,l.useSelector)(h.ZP.selectors.getMetadata),[I,x]=(0,r.useState)({historyLanes:{},rows:[]}),[D,_]=(0,r.useState)(!1),[R,w]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(m))return void w(0);const e=e=>(null==e?void 0:e.uri)===((null==m?void 0:m.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==m?void 0:m.aStamp),n=-1!==R?t.rows[R]:null,r=t.rows.findIndex((t=>e(t)));w(e(n)?R:r)}),[t.rows,m]);const M=(0,r.useRef)(null),A=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return P({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));x({historyLanes:t.historyLanes,rows:r})}}),[t]),k=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==M?void 0:M.current)||{};_(n<e-t)};return o().createElement("div",{className:b.historyTree},n&&o().createElement(N.Z,null),o().createElement("div",{className:p()(b.graph,{[b.shadow]:D}),onScroll:k,ref:M},o().createElement(S,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(I.rows[n].label)){const r={time:t,select:"crosswalks"};(0,d.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,d.s5)(O,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");x((e=>P({},e,{rows:e.rows.map((e=>e.index===n?P({},e,{label:r}):e))})))}))}},graphData:I}),o().createElement(i.Z,{handleWidth:!0,onResize:k})),o().createElement("div",{ref:A,className:b.history},t.rows.map(((e,t)=>{const n=t===R,r=0===t;return o().createElement(y,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(T){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;v(h.N5.mode.actions.modeUpdated(d.ARY.Viewing))}if(r&&!n||!r&&n)v(h.N5.history.actions.clearHistoryEvent()),w(0);else if(!r&&!n){const n=g(e-1,t.uri||E),r=g(e,t.uri||E),o=null==n?void 0:n.timestamp,l=null==r?void 0:r.timestamp,i=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;v(h.N5.history.actions.setHistoryEvent({aStamp:o,bStamp:l,overrideUri:i})),w(e)}})(t,e,n,r)})}))),a&&o().createElement("div",{className:b.buttonContainer},o().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},R=(0,m.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),w=(0,m.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),M=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const l=(0,d.GtP)(t),i=w({color:l});return o().createElement("div",{className:p()(i.icon,{[i.inactive]:!n,[i.active]:n,[i.clickable]:!!r}),onClick:r})},A=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:l,className:i}=e;const a=R();return o().createElement("div",{className:p()(a.root,i)},o().createElement(M,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>o().createElement(M,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?l((0,c.without)([e],n)):l([...n||[],e])})(e)}))))};function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const L=(e,t)=>e.reduce(((e,n,r)=>{let{start:o,end:l}=n;if(o){const n=t-o.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(l){const n=t-l.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),j=(0,m.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),H=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:l,entityUri:i,canLoadMore:a,onLoadMore:s,historyEvent:u}=e;const p=j(),[d,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(l)}),[l]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:o}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],l=(0,c.curry)(((e,n,r)=>{const o=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==b.b.ENTITY_LOST_MERGE)return null;if(e.includes(o))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var l;if(o===e||n&&null!==(l=r.uris)&&void 0!==l&&l.includes(e))return r}return null})),i=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(l(t,r)))(n),a=t=>(e[t]||o&&!o.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==b.b.ENTITY_CREATED||t.type!==b.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},p=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},d=[];return null==n||n.forEach(((n,o)=>{var l;switch(n.type){case b.b.ENTITIES_SPLITTED:if(!i(o,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=i(o,t,!0);if(r&&(!e||e===r.uri))return}break;case b.b.ENTITY_LOST_MERGE:case b.b.RELATIONSHIP_CREATED:case b.b.RELATIONSHIP_REMOVED:case b.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(l=n.uris)||void 0===l||l.forEach((e=>{a(e)||(c=!0)}));const h=a(n.uri||t);if(!h)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}({},n);((t,n)=>{var o,l;switch(n.type){case b.b.ENTITY_CREATED:s(t,n);break;case b.b.ENTITIES_MERGED_ON_THE_FLY:case b.b.ENTITY_CHANGED:u(t,n);break;case b.b.ENTITY_LOST_MERGE:case b.b.ENTITY_REMOVED:p(t,n);break;case b.b.ENTITIES_SPLITTED:u(t,n),null===(o=n.uris)||void 0===o||o.forEach((t=>{const o=e[t];if(!o)return;const l=o.lifeTime.length;l?s(o.lifeTime,n):p(o.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:l?b.b.FAKE_UPDATE:b.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case b.b.ENTITIES_MERGED:case b.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const r=e[t];r&&p(r.lifeTime,n)}))}})(h.lifeTime,f),c&&d.push(f),r.push(f)})),d.forEach((t=>{t.uris.forEach((o=>{e[o]||n.forEach((n=>{let{uri:l,uris:i,timestamp:a,user:s,type:u}=n;l===o&&(null==i||i.forEach((n=>{const o=e[n];if(!o)return;let l=null;switch(u){case b.b.ENTITIES_MERGED:case b.b.ENTITIES_MERGED_MANUALLY:l=b.b.FAKE_FILTERED_INCOMING;break;case b.b.ENTITIES_SPLITTED:l=b.b.FAKE_FILTERED_OUTGOING;break;default:return}const i={fakeType:l,uri:t.uri,uris:[n],type:u,user:s,timestamp:a},p=L(o.lifeTime,t.timestamp);l===b.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(p.endIndex)||(o.lifeTime[p.endIndex].end=i):(0,c.isNil)(p.startIndex)||(o.lifeTime[p.startIndex].start=i),r.splice(r.indexOf(t),0,i)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(l(t,!1)))(r)}}),[t,n,o])})({entityUri:i,historyChanges:null==n?void 0:n.changes,selectedUris:d});return o().createElement("div",{className:p.root},o().createElement(A,{values:l,selectedValues:d,onSelectValues:h,entityUri:i,className:p.borderBottom}),o().createElement(_,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:a,entityUri:i,historyEvent:u,findPreviousChange:E}))}))},3409:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),l=n(52730),i=n(59431),a=n(94079),s=n(17440),c=n(87918),u=n.n(c);const p=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),d=()=>{const e=p(),t=(0,l.useSelector)(i.ZP.selectors.getHistoryEvent),n=(0,l.useDispatch)(),r=(0,s.pipe)(i.N5.history.actions.clearHistoryEvent,n);return t?o().createElement("div",{className:e.root},o().createElement(a.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",o().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),o().createElement(a.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},85890:(e,t,n)=>{n.d(t,{k:()=>p});var r=n(24328),o=n(99493),l=n(65942),i=n(48465),a=n(67218);function s(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){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={activities:[l.M.MERGE,l.M.UNMERGE,l.M.UPDATE]},p=e=>{let{entity:t,enabled:n}=e;const[l,c]=(0,r.useState)(u),[p,d]=(0,r.useState)(0),h=(0,r.useMemo)((()=>(0,i.Z)(l)),[l]),[f,E]=(0,r.useState)(null),[m,g]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),v=(0,a._)(),T=null==t?void 0:t.uri,O={max:32,order:"desc"},I=(0,o.O27)(null==l?void 0:l.attributes)||void 0;(0,r.useEffect)((()=>{T&&n&&(b(!0),v((0,o.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:I},O))).then(g).catch((e=>{console.warn("Failed to load history data",e),g(null)})).finally((()=>{b(!1)})))}),[h,I,f]),(0,r.useEffect)((()=>{T&&n&&(b(!0),v((0,o.wdF)({entityUri:T})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{b(!1)})),d(0))}),[T,null==t?void 0:t.updatedTime,n]);const x=(0,r.useCallback)((e=>{T&&f&&n&&(b(!0),v((0,o.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:I,offset:e},O))).then((e=>{g((t=>s({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{b(!1)})))}),[f,h,n]),S=(0,r.useMemo)((()=>32*(p+1)<(null==m?void 0:m.total)),[m,p]),N=(0,r.useCallback)((e=>{d(0),c(e)}),[]),C=(0,r.useCallback)((()=>{N(s({},u))}),[]),P=(0,r.useCallback)((()=>{S&&(x(32*(p+1)),d(p+1))}),[x,p,S]);return{isLoading:y,canLoadMore:S,onLoadMore:P,onApplyFilter:N,onClearFilter:C,historicUris:f,historyWithTotal:m,historyFilter:l}}},71820:(e,t,n)=>{n.d(t,{C:()=>l});var r=n(24328),o=n(99493);const l=e=>{let{isHistoryTabActive:t,entity:n}=e;const[l,i]=(0,r.useState)(!1),a=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||i(!1)}),[a]),(0,r.useEffect)((()=>{t&&i(!0)}),[t]);const s=a&&!(0,o.ZiX)(a)&&!(0,o.biM)(n);return{isHistoryEnabled:l&&s,isProfilePersisted:s}}},57730:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),o=n(52730),l=n(59431),i=n(99493),a=n(67218);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,o.useSelector)(l.ZP.selectors.getHistorySlice),p=(0,o.useDispatch)(),d=(0,a._)(),{aStamp:h,bStamp:f,overrideUri:E}=n||{},m=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&m&&(c(!0),d(Promise.all([(0,i.lrH)(m,h),f&&1!==f?(0,i.lrH)(m,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;p(l.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[h,f,m]),{isLoading:s,historySlice:u}}},55912:(e,t,n)=>{n.d(t,{b:()=>i});var r,o=n(31537);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},o.I,r)},65942:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},48465:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),o=n.n(r),l=n(17440),i=n(99493),a=n(65942),s=n(31537),c=n(67885);const u=e=>(0,l.pipe)((0,l.map)(e),(0,l.join)(" or ")),p=e=>{const[t,n]=e;return o()().subtract(t,n).valueOf()},d=(0,l.chain)((0,l.cond)([[(0,l.equals)(a.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,l.equals)(a.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,l.equals)(a.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),h=(0,l.pipe)((0,l.defaultTo)([]),d,(0,l.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,l.pipe)((0,l.defaultTo)({}),(0,l.reject)(i.O27),(0,l.evolve)({users:u((e=>`equals(user, '${(0,i.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,i.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${p(n)})`;case c.K.AGO:return`lte(timestamp, ${p(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${o()(t).endOf("date").valueOf()})`}default:return""}}}),(0,l.over)((0,l.lensProp)("activities"),h),l.values,(0,l.reject)(i.O27),(0,l.append)("not equals(user, 'collaboration-service')"),(0,l.map)((e=>`(${e})`)),(0,l.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,l.type)(t)&&"String"===(0,l.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}},67885:(e,t,n)=>{let r,o;n.d(t,{K:()=>r,o:()=>o}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(o||(o={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4676,3745],{27815:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(71153),s=n.n(a),c=n(17440),u=n(52730),p=n(59431),d=n(58991),h=n(94079),f=n(92575),E=n(37285),m=n(96808),g=n(7785),y=n(79692);function b(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){v(e,t,n[t])}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T={input:e=>b({},e,{fontSize:"14px"}),menuPortal:e=>b({},e,{zIndex:1300})},O=(0,y.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const I=e=>{let{entityType:t,selectedAttributes:n,className:l,onChange:a,title:y,disableUnderline:b,menuPlacement:v="bottom"}=e;const I=(0,u.useSelector)(p.ZP.selectors.getMetadata),x=O(),S=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const o=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:o,level:t});const l=(0,d.EUG)(I,r);return e.concat(l?S(l,t+1,o):[])}),[])}),[I]),N=(0,r.useMemo)((()=>S((null==t?void 0:t.attributes)||[])),[t,S]);return o().createElement("div",{className:s()(x.root,l)},o().createElement(h.Typography,{className:x.title,variant:"subtitle1"},y||i().text("Attribute")),o().createElement(f.Z,{value:n,options:N,TextFieldProps:{InputProps:{disableUnderline:b},classes:{root:x.dropDownInput}},components:{DropdownIndicator:m.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["data"]);return o().createElement(E.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:l,innerProps:i}=e;return o().createElement("div",i,o().createElement(g.Z,{checked:n,level:r.level,data:r,label:l,labelInText:l,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),a),styles:T,classes:x,menuPlacement:v,menuPortalTarget:document.body}))}},60894:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),o=n.n(r),l=n(13980),i=n.n(l),a=n(94656);function s(){return s=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},s.apply(this,arguments)}const c=e=>o().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),p=n(17440),d=n(47458),h=n(87918),f=n.n(h),E=n(85657);const m=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:i,tooltipTitle:a}=e;const[s,h]=(0,r.useState)(null),m=(0,r.useCallback)((e=>{const t=(0,p.pipe)(E.JJ,(0,p.pluck)("id"))(e),r=(0,E.u)(n,e);l(r?(0,p.difference)(n,t):(0,p.uniq)((0,p.concat)(n,t)))}),[n,l]);return o().createElement(o().Fragment,null,o().createElement(u.k,{tooltipTitle:a||f().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),o().createElement(d.G,{onColumnClick:m,anchorEl:s,columnsData:t,onClose:()=>h(null),title:i,selectedColumns:n}))};m.propTypes={columnsData:a.uz,selectedColumns:i().arrayOf(i().string),onChangeColumns:i().func,title:i().string,tooltipTitle:i().string};const g=m},47458:(e,t,n)=>{n.d(t,{G:()=>I});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(17440),s=n(58991),c=n(44890),u=n(97820),p=n(85657),d=n(56656),h=n(54763),f=n(13980),E=n.n(f),m=n(7785),g=n(27239),y=n(71153),b=n.n(y);const v=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),T=e=>{let{item:t,onClick:n,checked:r,level:l,style:i,isFocused:a,isGroupItem:s,hideCheckBox:c}=e;const u=v();return o().createElement(m.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:l,data:t,label:o().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:i,isFocused:a,hideIcon:s,className:b()({[u.groupItem]:s})})};T.propTypes={item:E().shape({label:E().string,filterText:E().string}),level:E().number,onClick:E().func,checked:E().bool,style:E().object,isGroupItem:E().bool,isFocused:E().bool,hideCheckBox:E().bool};const O=T,I=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:f,onColumnClick:E,selectedColumns:m,hideCheckBox:g}=e;const y=v(),[b,T]=(0,r.useState)(""),I=(0,r.useMemo)((()=>(0,p.eX)(f,b)),[f,b]),x=(0,r.useMemo)((()=>(0,d.LG)(I)),[I]),S=(0,s.fW1)("label")(I)||308,N=(0,r.useCallback)((e=>{let{item:t}=e;return E(t)}),[E]),{focusIndex:C,handleKeyDown:P}=(0,h.t)({items:x,open:!0,onSelectFocusedItem:N,selectedItems:m,onClose:n}),D=(0,r.useCallback)((0,a.pipe)(n,(()=>T(""))),[n]),_=Math.min(300,32*x.length),R=Math.max(140,_+108);return o().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:D,onSearch:T,title:l||i().text("Show/hide columns"),containerWidth:S,containerHeight:R,searchInputOnKeyDown:P},o().createElement(c.Z,{fixedTitle:!1,height:_,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return o().createElement(O,{hideCheckBox:g,style:e,item:r,level:l,isFocused:C===n,checked:(0,p.u)(m,r),isGroupItem:(0,p.yf)(r),onClick:g?(0,a.pipe)(E,D):E})},items:x,getItemSize:()=>32,focusIndex:C}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>a,u:()=>b});var r=n(17440),o=n(58991);function l(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){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),p=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=p(n.children||[],t),e):e.concat(t)},d=(0,r.curry)(((e,t)=>o.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),h=(0,r.reduce)(((e,t)=>p(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),f=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(d(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?f(e,t.children,n+1):[]])))(t)})),E=(0,r.has)("columns"),m=e=>{let{id:t,label:n,columns:o}=e;return[{id:t,groupId:t,label:n},...o.map((0,r.assoc)("groupId",t))]},g=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(E,m)),(0,r.filter)((0,r.either)(a,u)),h,f(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],b=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return a(t)?n.every(r):n.some(r)}},39621:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),o=n.n(r),l=n(17440),i=n(87918),a=n.n(i),s=n(6782),c=n(94079),u=n(31517),p=n(31276);const d=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),h=[a().text("minutes"),a().text("hours"),a().text("days"),a().text("weeks"),a().text("months"),a().text("years")],f=e=>{let{interval:[t,n],onChange:r,onFocus:i}=e;const a=d(),f=(0,l.pipe)(p.NA,parseInt,(e=>[e,n]),r),E=(0,l.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return o().createElement("div",{className:a.root},o().createElement(c.TextField,{type:"number",value:t||"",onChange:f,inputProps:{min:1,onFocus:i},InputProps:{classes:{root:a.input}},className:a.inputNumber}),o().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:a.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:h.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:E,TextFieldProps:{inputProps:{onFocus:i},InputProps:{classes:{root:a.input}}}}))}},93873:(e,t,n)=>{n.d(t,{a:()=>P});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(94079),s=n(83348),c=n(8818),u=n(67766),p=n(42767),d=n(58991);const h=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),f=(0,s.Z)(a.Link),E=e=>{let{total:t=0,onPrev:n,onNext:r,onSearchResultsClick:l,isPrevDisabled:a,isNextDisabled:s}=e;const E=h();return o().createElement("div",{className:E.container},o().createElement(f,{className:E.link,component:"button",variant:"caption",onClick:l,underline:"none",tooltipTitle:i().text("Go to search results")},(0,d.k7L)(t,1e6)," ",1===t?i().text("Search result"):i().text("Search results")),o().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:i().text("Go to previous profile"),onClick:n,disabled:a,showForDisabled:!0}),o().createElement(c.k,{size:"L",icon:p.Z,tooltipTitle:i().text("Go to next profile"),onClick:r,disabled:s,showForDisabled:!0}))};var m=n(52730),g=n(59431),y=n(17440),b=n(39450),v=n(67218);function T(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){O(e,t,n[t])}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class I{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:o},tenant:l,searchTenant:i,apiPath:a,dtssPath:s,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],o=T({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,d.uqV)({filters:r,options:o,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,d.ZOr)(r,o)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,d.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,d.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=o,this.tenant=l,this.searchTenant=i,this.apiPath=a,this.dtssPath=s,this.globalSearchRequestOptions=c}}function x(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){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class N{constructor(e){var t=this;let{data:n,tenant:r,apiPath:o}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,d.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:x({},t.searchBody,{filter:e.length?(0,d.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,d.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,d.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=o}}const C=(e,t)=>(0,y.pipe)((0,y.map)((0,y.prop)("uri")),(0,y.reject)((e=>t.includes(e))))(e),P=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:i,isNextDisabled:a}=(()=>{const e=(0,v._)(),t=(0,v._)(),n=(0,v._)(),{uri:o,index:l,total:i,tenant:a,cache:s}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},{type:c,data:u}=(0,m.useSelector)(g.ZP.selectors.getSearchProviderData)||{},p=(0,m.useSelector)(g.ZP.selectors.getTenant),h=(0,m.useSelector)(g.ZP.selectors.getApiPath),f=(0,m.useSelector)(g.ZP.selectors.getDtssPath),E=(0,m.useSelector)((e=>g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),y=(0,r.useContext)(b.m),T=(0,m.useDispatch)(),[O,x]=(0,r.useState)(!1),S=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new I(t);case"graphsearch":return new N(t)}})(c,{data:u,tenant:p,searchTenant:a,apiPath:h,dtssPath:f,globalSearchRequestOptions:E})),[c,u,p,a,h,f,E]),P=(0,r.useCallback)((e=>{T(g.yC.actions.updateSearchNavigationDataFields(e))}),[T]),D=(0,r.useCallback)((e=>{const t=p!==a?(0,d.wwR)({uri:e,dataTenant:a}):e;T(g.ui.actions.openEntity({uri:t,viewId:y,source:"navigation"}))}),[T,y,p,a]),_=(0,r.useCallback)((()=>{T(g.ui.actions.openPerspective({perspectiveId:c,viewId:y}))}),[T,c,y]);(0,r.useEffect)((()=>{l>=i?P({index:i-1}):l<0&&P({index:0})}),[i,l,P]);const R=(0,r.useCallback)(((e,r,o)=>{x(!0),t(S.requestTotal()).then((e=>P({total:e})));const l=o+1;return n(S.requestEntities(15,l)).then((t=>{if(t){if(t.length){const n=C(t,e);if(n.length>0)return P({cache:e.concat(n),uri:n[0],index:l+t.length-n.length}),void D(n[0]);if(o+t.length<r-1)return R(e,r-t.length,o+t.length)}P({index:l})}})).finally((()=>{x(!1)}))}),[S,P,D]),w=(0,r.useCallback)(((e,r)=>{x(!0),t(S.requestTotal()).then((e=>P({total:e})));const o=r-1,l=Math.max(0,r-15),i=15+Math.min(0,r-15);return n(S.requestEntities(i,l)).then((t=>{if(t){if(t.length){const n=C(t,e);if(n.length>0)return P({cache:n.concat(e),uri:n[n.length-1],index:o-(t.length-n.length)}),void D(n[n.length-1]);if(r-t.length>0)return w(e,r-t.length)}P({index:0})}})).finally((()=>{x(!1)}))}),[S,P,D]),M=(0,r.useCallback)(((t,n,r,o)=>{if(n<t.length){const l=t[n];return x(!0),e(S.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),M(e,n,r-1,o)}P({index:o+1,uri:l,cache:t,total:r}),D(l)})).finally((()=>{x(!1)}))}if(!(o>=r-1))return R(t,r,o);P({cache:t,total:r,index:r-1})}),[S,P,D,R]),A=(0,r.useCallback)(((t,n,r,o)=>{if(n>-1){const l=t[n];return x(!0),e(S.checkEntity(l)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),A(e,n-1,r-1,o-1)}P({index:o-1,uri:l,cache:t,total:r}),D(l)})).finally((()=>{x(!1)}))}if(!(o<=0))return w(t,o);P({index:0,cache:t,total:r})}),[S,P,D,w]),k=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)-1;A(s,e,i,l)}}),[A,s,o,i,l]),L=(0,r.useCallback)((()=>{if(s&&o){const e=s.indexOf(o)+1;M(s,e,i,l)}}),[M,s,o,i,l]);return{total:i,onPrev:k,onNext:L,onSearchResultsClick:_,isPrevDisabled:O||l<=0,isNextDisabled:O||l>=i-1}})();return(()=>{const{cache:e}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},t=(0,m.useSelector)(g.ZP.selectors.getMode),n=(0,m.useSelector)(g.ZP.selectors.getEntity);return(0,d.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?o().createElement(E,{total:e,onPrev:t,onNext:n,onSearchResultsClick:l,isPrevDisabled:i,isNextDisabled:a}):null}},92575:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),o=n.n(r),l=n(13980),i=n.n(l),a=n(17440),s=n(70347);const c=(0,n(5407).Z)(s.ZP);var u=n(5190),p=n(18461),d=n(94079),h=n(71153),f=n.n(h),E=n(88611);function m(){return m=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},m.apply(this,arguments)}function g(e){const{innerProps:t,innerRef:n,children:r,isFocused:l,isSelected:i,selectProps:{classes:a},label:s}=e;return o().createElement(d.MenuItem,m({className:f()(a.option,{[a["option--selected"]]:i}),ref:n,selected:l,component:"div"},t),o().createElement(d.Checkbox,{color:"primary",checked:i}),o().createElement(E.C,{value:s},o().createElement("div",{className:a["option--item"]},r)))}g.propTypes={children:i().node,innerProps:i().shape({id:i().string.isRequired,key:i().string,onClick:i().func.isRequired,onMouseMove:i().func.isRequired,onMouseOver:i().func.isRequired,tabIndex:i().number.isRequired}).isRequired,innerRef:i().oneOfType([i().oneOf([null]),i().func,i().shape({current:i().any.isRequired})]),isFocused:i().bool.isRequired,isSelected:i().bool.isRequired,label:i().string,selectProps:i().shape({classes:i().shape({option:i().string})})};const y={Option:g};var b=n(79692),v=n(31276);function T(){return T=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},T.apply(this,arguments)}function O(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){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=(0,b.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let S=0;function N(e){const{label:t,creatable:n,getOptions:l,loadingIndicator:i,components:s,classes:d,styles:h,onChange:f,onInputChange:E,menuPlacement:m="auto"}=e,g=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),b=n?c:l?p.Z:u.Z,[I,N]=(0,r.useState)(""),C=x((0,a.omit)(["classes"],e)),P="custom-select-"+S++,D=O({},y,s),_=(0,v.ze)(C,d),R=O({indicatorSeparator:e=>O({},e,{margin:"10px 0"}),loadingIndicator:e=>O({},e,{display:i?e.display:"none"}),loadingMessage:e=>O({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},h),w=t?{inputId:P,TextFieldProps:O({label:t,InputLabelProps:{htmlFor:P,shrink:!(!e.value||!e.value.length)||void 0,className:_.label}},e.TextFieldProps)}:{};return o().createElement(b,T({isMulti:!0,inputId:P,inputValue:I,onChange:function(e,t){f(e,t),"create-option"===t.action&&(N(""),E("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;E(e,{action:n}),"set-value"!==n&&N(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:_,components:D,styles:R,menuPlacement:m,loadOptions:l},w,g))}N.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},N.propTypes={creatable:i().bool,cacheOptions:i().bool,defaultOptions:i().bool,value:i().arrayOf(i().shape({label:i().string.isRequired,value:i().any})),options:i().arrayOf(i().shape({label:i().string.isRequired,value:i().any})),onChange:i().func,onInputChange:i().func,placeholder:i().string,label:i().string,loadingIndicator:i().bool,components:i().shape({ClearIndicator:i().func,Control:i().func,DropdownIndicator:i().func,DownChevron:i().func,CrossIcon:i().func,Group:i().func,GroupHeading:i().func,IndicatorsContainer:i().func,IndicatorSeparator:i().func,Input:i().func,LoadingIndicator:i().func,Menu:i().func,MenuList:i().func,MenuPortal:i().func,LoadingMessage:i().func,NoOptionsMessage:i().func,MultiValue:i().func,MultiValueContainer:i().func,MultiValueLabel:i().func,MultiValueRemove:i().func,Option:i().func,Placeholder:i().func,SelectContainer:i().func,SingleValue:i().func,ValueContainer:i().func}),classes:i().shape({control:i().string,valueContainer:i().string,multiValue:i().string,noOptionsMessage:i().string,singleValue:i().string,placeholder:i().string,menu:i().string,clearIndicator:i().string,dropdownIndicator:i().string,option:i().string,"option--selected":i().string,label:i().string}),styles:i().shape({clearIndicator:i().func,container:i().func,control:i().func,dropdownIndicator:i().func,group:i().func,groupHeading:i().func,indicatorsContainer:i().func,indicatorSeparator:i().func,input:i().func,loadingIndicator:i().func,loadingMessage:i().func,menu:i().func,menuList:i().func,menuPortal:i().func,multiValue:i().func,multiValueLabel:i().func,multiValueRemove:i().func,noOptionsMessage:i().func,option:i().func,placeholder:i().func,singleValue:i().func,valueContainer:i().func}),TextFieldProps:i().object,getOptions:i().func,menuPlacement:i().string,menuPortalTarget:i().object,getOptionValue:i().func,isSearchable:i().bool};const C=N},39827:(e,t,n)=>{n.d(t,{G:()=>h});var r=n(24328),o=n.n(r),l=n(71153),i=n.n(l),a=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function 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)}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const h=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:h,buttonWrapper:f}=s,E=d(s,["active","buttonWrapper"]);return o().createElement("div",{className:i()(c.container,r)},t.map((e=>{let{id:t}=e,r=d(e,["id"]);return o().createElement(a.k,p({},r,{classes:E,size:"S",key:t,className:i()({[i()(c.active,h)]:n===t},c.buttonWrapper,f),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},10159:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),o=n.n(r),l=n(94079);function i(){return i=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},i.apply(this,arguments)}const a=e=>o().createElement("svg",i({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),o().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},o().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),o().createElement("g",{mask:"url(#AttributesList_svg__a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),o().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),o().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),o().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),o().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),o().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),o().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),o().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),o().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:.01}),o().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=a,text:n,secondaryText:r}=e;const i=s();return o().createElement("div",{className:i.root},o().createElement(t,{className:i.logo}),o().createElement("div",{className:i.textBox},o().createElement(l.Typography,{className:i.text},n),r&&o().createElement(l.Typography,{className:i.secondaryText},r)))}},51229:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);const l=()=>o().createElement("div",{style:{flex:1}})},85451:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(24328),o=n.n(r),l=n(52730),i=n(87918),a=n.n(i),s=n(17440),c=n(71153),u=n.n(c),p=n(94079),d=n(92575),h=n(96808),f=n(58991),E=n(59431),m=n(79692);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b={input:e=>g({},e,{fontSize:"14px"}),loadingMessage:e=>g({},e,{fontSize:"14px"}),menuPortal:e=>g({},e,{zIndex:1300})},v=(0,m.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),T=e=>{let{selectedUsers:t,onChange:n,className:i,disableUnderline:c}=e;const m=v(),g=e=>({value:e,label:e}),y=e=>e.map(g),T=(0,l.useSelector)(E.ZP.selectors.getTenant),O=(0,l.useSelector)(E.ZP.selectors.getServicesPath),I=(0,r.useRef)();return o().createElement("div",{className:u()(m.root,i)},o().createElement(p.Typography,{className:m.title,variant:"subtitle1"},a().text("User")),o().createElement(d.Z,{value:y(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(I.current||(I.current=(0,f.kz_)({tenant:T,servicesPath:O})),I.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>f.P6Y.strings.search(t,e))):t)(e),y))),TextFieldProps:{InputProps:{disableUnderline:c},className:m.dropDownInput},components:{DropdownIndicator:h.Z},styles:b,classes:m,menuPortalTarget:document.body}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>p,_V:()=>d,Xr:()=>h});var r=n(17440),o=n(87918),l=n.n(o),i=n(31537);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(i.I))),p=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),d=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(d).join(", "):(0,r.is)(Object,e)?d("value"in e?e.value:Object.values(e)):e.toString(),h=e=>({[i.I.COMMENT_ADDED]:l().text("Comment added"),[i.I.COMMENT_DELETED]:l().text("Comment deleted"),[i.I.COMMENT_UPDATED]:l().text("Comment updated"),[i.I.ENTITIES_MERGED]:l().text("Profile merged"),[i.I.ENTITIES_MERGED_MANUALLY]:l().text("Profile merged manually"),[i.I.ENTITIES_MERGED_ON_THE_FLY]:l().text("Profile merged on the fly"),[i.I.ENTITIES_SPLITTED]:l().text("Profile un-merged"),[i.I.ENTITY_CHANGED]:l().text("Profile updated"),[i.I.ENTITY_CREATED]:l().text("Profile created"),[i.I.ENTITY_LOST_MERGE]:l().text("Profile lost merge"),[i.I.ENTITY_REMOVED]:l().text("Profile removed"),[i.I.GROUP_CHANGED]:l().text("Group updated"),[i.I.GROUP_CREATED]:l().text("Group created"),[i.I.GROUP_REMOVED]:l().text("Group removed"),[i.I.MODEL_UPDATED]:l().text("Model was updated"),[i.I.NOT_MATCHES_RESET]:l().text("Not matches reset"),[i.I.NOT_MATCHES_SET]:l().text("Not matches set"),[i.I.PERIODIC_TASK_SCHEDULED]:l().text("Periodic task was scheduled"),[i.I.POTENTIAL_MATCHES_FOUND]:l().text("Potential matches found"),[i.I.POTENTIAL_MATCHES_REMOVED]:l().text("Potential matches removed"),[i.I.RELATIONSHIP_CHANGED]:l().text("Relationship updated"),[i.I.RELATIONSHIP_CREATED]:l().text("Relationship created"),[i.I.RELATIONSHIP_REMOVED]:l().text("Relationship removed"),[i.I.USER_LOGIN]:l().text("Logged in"),[i.I.USER_LOGOUT]:l().text("Logged out"),[i.I.USER_PROFILE_VIEW]:l().text("Profile viewed"),[i.I.USER_SEARCH]:l().text("Searched"),[i.I.ANALYTICS_ATTRIBUTES_CHANGED]:l().text("Analytics attribute changed"),[i.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:l().text("SFDC connector synchronization issue")}[e]||"")},51843:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),l=n(95038),i=n.n(l),a=n(87918),s=n.n(a),c=n(17440),u=n(58991),p=n(94079),d=n(96808),h=n(37699);const f=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),E=i().localeData().longDateFormat("L"),m=e=>{let{values:t,onChange:n,onFocus:l}=e;const i=E,a=(0,r.useRef)(null),[m,g]=(0,r.useState)(!1),y=f(),b=(0,r.useCallback)((()=>{g((e=>!e)),l()}),[l]),v=()=>{g(!1)};return o().createElement("div",{className:y.root},o().createElement(p.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,i))).join(" — "),onClick:b,variant:"filled",ref:a,InputProps:{endAdornment:o().createElement(d.Z,{selectProps:{classes:y,menuIsOpen:m},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${i} — ${i}`)}),o().createElement(p.Menu,{variant:"menu",open:m,autoFocus:!1,classes:{paper:y.paper},anchorEl:a.current,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:m,style:{width:"100%"}}},o().createElement(h.Z,{values:t,onCancel:v,onApply:e=>{n(e),g(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},91515:(e,t,n)=>{n.d(t,{Z:()=>J});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(94079),s=n(17440),c=n(51229),u=n(36444),p=n(22385),d=n(48465),h=n(85451),f=n(27815),E=n(71153),m=n.n(E),g=n(31517),y=n(67885);const b=[y.K.WITHIN,y.K.AGO,y.K.BETWEEN],v=e=>({[y.K.WITHIN]:i().text("Within the last"),[y.K.AGO]:i().text("More than"),[y.K.BETWEEN]:i().text("Date range")}[e]||"");var T=n(39621),O=n(20562),I=n(51843),x=n(79692);const S=(0,x.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),N=[null,null],C=[null,"hours"],P=e=>{let{value:t,onChange:n,className:l}=e;const s=S(),c=e=>e===y.K.WITHIN||e===y.K.AGO,u=e=>e===y.K.BETWEEN,p=u(null==t?void 0:t.type)?t.period:N,d=c(null==t?void 0:t.type)?t.period:C,[h,f]=(0,r.useState)(p),[E,x]=(0,r.useState)(d),P=(null==t?void 0:t.type)||y.K.WITHIN,D=e=>c(e)?E:u(e)?h:void 0,_=e=>{n({type:P,period:e})};return(0,O.D)((()=>{t?c(t.type)?x(t.period):u(t.type)&&f(t.period):(f(N),x(C))}),[t]),o().createElement("div",{className:m()(s.root,l)},o().createElement(a.Typography,{className:s.title,variant:"subtitle1"},i().text("Date")),o().createElement("div",{className:s.intervalContainer},o().createElement(g.Z,{label:"",className:s.typeInput,value:{value:P,label:v(P)},options:b.map((e=>({value:e,label:v(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:D(r),type:r})}}),c(P)?o().createElement(T.Z,{interval:E,onChange:_}):o().createElement(I.Z,{values:h,onChange:_})))};var D=n(92575),_=n(96808),R=n(65942);const w=[R.M.UPDATE,R.M.MERGE,R.M.UNMERGE];function M(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){A(e,t,n[t])}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={input:e=>M({},e,{fontSize:"14px"}),menuPortal:e=>M({},e,{zIndex:1300})},L=(0,x.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),j=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const l=L(),c=e=>{return{value:e,label:(t=e,{[R.M.UPDATE]:i().text("Update"),[R.M.MERGE]:i().text("Merge"),[R.M.UNMERGE]:i().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),p=u(w);return o().createElement("div",{className:m()(l.root,r)},o().createElement(a.Typography,{className:l.title,variant:"subtitle1"},i().text("Activity")),o().createElement(D.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),options:p,TextFieldProps:{classes:{root:l.dropDownInput}},components:{DropdownIndicator:_.Z},styles:k,classes:l,menuPlacement:"bottom",menuPortalTarget:document.body}))},H=(0,x.Z)({popup:{width:500,height:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px 0",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const U=e=>{let{className:t,filter:n,onApplyFilter:l,onClearFilter:c,entityType:E}=e;const m=H(),[g,y]=(0,r.useState)(null),b=()=>y(null),[v,T]=(0,r.useState)(n);(0,r.useEffect)((()=>{T(n)}),[n]);const O=(0,s.curry)(((e,t)=>{T((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){G(e,t,n[t])}))}return e}({},n,{[e]:t})))})),{activities:I=[],attributes:x=[],dateRange:S=null,users:N=[]}=v||{};return o().createElement(o().Fragment,null,o().createElement(p.Z,{icon:u.Z,size:"L",onClick:e=>y(e.currentTarget),className:t}),o().createElement(a.Popover,{classes:{paper:m.popup},open:!!g,anchorEl:g,onClose:b,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement("div",{className:m.filterContainer},o().createElement(a.Typography,{variant:"h6"},i().text("Filter")),o().createElement("div",{className:m.filterContainerScrollable},o().createElement(P,{value:S,onChange:O("dateRange"),className:m.filterItem}),o().createElement(h.Z,{selectedUsers:N,onChange:O("users"),className:m.filterItem}),o().createElement(j,{selectedHistoryActivityTypes:I,onChange:O("activities"),className:m.filterItem}),o().createElement(f.Z,{selectedAttributes:x,entityType:E,onChange:O("attributes"),className:m.filterItem,title:i().text("Attribute updated")}))),o().createElement("div",{className:m.filterControls},o().createElement(a.Button,{onClick:c,className:m.clearButton},i().text("Clear all")),o().createElement(a.Button,{onClick:b},i().text("Cancel")),o().createElement(a.Button,{color:"primary",onClick:()=>{S&&(0,d.R)(S)?l(v):l((0,s.dissoc)("dateRange",v)),b()}},i().text("Apply")))))};var F=n(52730),Z=n(43054),B=n(59431),z=n(55847),V=n(98281),Y=n(31276);const W=(0,x.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),$=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=Y.ZT}=e;const l=W(),{text:i,selected:s,onClick:c}=n;return o().createElement(a.MenuItem,{classes:{root:l.menuItem},onClick:e=>{r(),c(e)},ref:t},s&&o().createElement(V.Z,{className:l.checkIcon}),o().createElement(a.Typography,{classes:{root:l.menuText}},i))}));$.displayName="MenuItemRenderer";const q=$,K=()=>{const e=(0,F.useSelector)(B.ZP.selectors.getHistoryMode),t=(0,F.useDispatch)(),n=e=>{t(B.N5.history.actions.setHistoryMode(e))},r=[{text:i().text("Compare to Current view"),selected:e===B.Z9.Current,onClick:()=>n(B.Z9.Current)},{text:i().text("Compare to Previous view"),selected:e===B.Z9.Previous,onClick:()=>n(B.Z9.Previous)}];return o().createElement(z.Z,{MenuItemRenderer:q,buttonComponent:p.Z,buttonProps:{icon:Z.Z,size:"L"},menuId:"history-menu",menuItems:r})},X=(0,x.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),J=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:l,onClearFilter:u}=e;const p=X();return o().createElement("div",{className:p.root},o().createElement(a.Typography,{variant:"h6"},i().text("History")),!(0,s.isNil)(t)&&o().createElement(o().Fragment,null,o().createElement(a.Divider,{orientation:"vertical",flexItem:!0,className:p.divider}),o().createElement(a.Typography,{variant:"body1",color:"textSecondary",className:p.count},1===t?i().text("${count} contributing profile",{count:t}):i().text("${count} contributing profiles",{count:t}))),o().createElement(c.Z,null),o().createElement(U,{className:p.filterButton,entityType:n,filter:r,onApplyFilter:l,onClearFilter:u}),o().createElement(K,null))}},6674:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n.n(r),l=n(87918),i=n.n(l),a=n(10159);const s=()=>o().createElement(a.Z,{text:i().text("History in the making"),secondaryText:i().text("When you create an event or perform an activity, it will show up here.")})},54362:(e,t,n)=>{n.d(t,{Z:()=>H});var r=n(24328),o=n.n(r),l=n(52730),i=n(44443),a=n(87918),s=n.n(a),c=n(17440),u=n(71153),p=n.n(u),d=n(58991),h=n(59431),f=n(94079),E=n(34606),m=n(79692);const g=(0,m.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),y=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:l}=e;const{uri:i,type:a,matchGroups:c,user:u,timestamp:h}=t,m=(0,d.GtP)(i),y=g({color:m});return o().createElement("div",{className:p()(y.historyRow,{[y.selected]:r}),onClick:l},o().createElement("div",{className:y.rowHeader},o().createElement("div",{className:y.badge}),o().createElement(f.Typography,{className:p()(y.title,{bold:n})},n?s().text("Current view"):(0,E.Xr)(a)),!n&&o().createElement(f.Typography,{className:y.date},s().date(h,"L LT"))),c&&o().createElement(f.Typography,{className:y.title},s().text("Match rule:")," ",c.join(", ")),o().createElement(f.Typography,{className:y.user},u))};var b=n(55912);const v=e=>e===b.b.FAKE_FILTERED_INCOMING||e===b.b.FAKE_FILTERED_OUTGOING,T=e=>{let{x:t,y:n,toX:r,toY:l,color:i,isDashed:a}=e;const s=((e,t,n,r)=>{const o=t>r,l=e<n,i=o?-6:6;return`M${e} ${t} L${l?n-12:n+12} ${t} ${l?`c 6 0 12 ${i} 12`:`c -6 0 -12 ${i} -12`} ${o?-12:12} L${n} ${r}`})(t,n,r,l);return o().createElement("path",{d:s,stroke:i,strokeWidth:2,fill:"none",strokeDasharray:a?"3,3":void 0})};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 I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:l,isDashed:i,isCollapsed:a,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const p=s?6:3;return o().createElement("g",O({},u,{ref:t}),c&&o().createElement("rect",{id:"line",x:n-p-4,y:r-p-4,width:2*p+8,height:2,fill:l}),o().createElement("circle",{cx:n,cy:r,r:p,fill:i?"#fff":l,stroke:l,strokeDasharray:i?"1,1":void 0,strokeWidth:2}),s&&o().createElement("g",{id:"icon"},o().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),a&&o().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const x=(0,n(83348).Z)(I),S=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:l}=t,i=[16],{links:a,rowLines:s,circles:c}=l.reduce(((e,t,a)=>{let{uri:s,height:c,uris:u,type:p,fakeType:h,index:f,timestamp:E,label:m}=t;const g=16*r[s].index+24,y=i[a];i.push(y+c);const O=v(h),I=O?u[0]:s,S=!(null!=u&&u.some((e=>r[e])));e.circles.push(o().createElement(x,{tooltipTitle:m,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${I}-${a}`,x:g,y,color:(0,d.GtP)(I),isDashed:O,isCollapsed:S,showCollapseIcon:!!u,showLine:h===b.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(o().createElement("rect",{key:`${I}-${f}`,x:g,y:y-8,width:"100%",height:16,fill:(0,d.GtP)(I),opacity:.06}));const N=p===b.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const i=l[a].height,s=16*n.index+24,c=N?y-i:y+i;g!==s&&e.links.push(o().createElement(T,{key:`link-${t}-${f}`,x:g,y,toX:s,toY:c,isDashed:v(h),color:(0,d.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,p=i[i.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:p,end:h}=e;if((null===(u=l[null==h?void 0:h.index])||void 0===u?void 0:u.type)===b.b.ENTITIES_SPLITTED)return;const f=(null==p?void 0:p.type)===b.b.ENTITIES_SPLITTED?(null==p?void 0:p.index)-1:null==p?void 0:p.index,E=(null==h?void 0:h.type)===b.b.ENTITIES_MERGED_MANUALLY||(null==h?void 0:h.type)===b.b.ENTITIES_MERGED?(null==h?void 0:h.index)+1:null==h?void 0:h.index,m=i[f]||i[i.length-2],g=i[E]||16;if(m<=g)return;const y=(0,d.GtP)(t);!h&&n.index>0&&c.push(o().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y:g,color:y,showLine:!0})),a.unshift(o().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${m} L${r} ${g}`,stroke:y,strokeWidth:2}))}))})),o().createElement("svg",{className:"chart",width:u,height:p},o().createElement("g",{id:"rowLines"},s),o().createElement("g",{id:"links"},a),o().createElement("g",{id:"circles"},c))}));var N=n(99136);const C=(0,m.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});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){D(e,t,n[t])}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{historyData:t,isLoading:n,canLoadMore:a,onLoadMore:u,entityUri:E,historyEvent:m,findPreviousChange:g}=e;const b=C(),v=(0,l.useDispatch)(),T=(0,l.useSelector)(h.ZP.selectors.getIsEditableMode),O=(0,l.useSelector)(h.ZP.selectors.getMetadata),[I,x]=(0,r.useState)({historyLanes:{},rows:[]}),[D,_]=(0,r.useState)(!1),[R,w]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(m))return void w(0);const e=e=>(null==e?void 0:e.uri)===((null==m?void 0:m.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==m?void 0:m.aStamp),n=-1!==R?t.rows[R]:null,r=t.rows.findIndex((t=>e(t)));w(e(n)?R:r)}),[t.rows,m]);const M=(0,r.useRef)(null),A=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return P({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));x({historyLanes:t.historyLanes,rows:r})}}),[t]),k=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==M?void 0:M.current)||{};_(n<e-t)};return o().createElement("div",{className:b.historyTree},n&&o().createElement(N.Z,null),o().createElement("div",{className:p()(b.graph,{[b.shadow]:D}),onScroll:k,ref:M},o().createElement(S,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(I.rows[n].label)){const r={time:t,select:"crosswalks"};(0,d.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,d.s5)(O,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");x((e=>P({},e,{rows:e.rows.map((e=>e.index===n?P({},e,{label:r}):e))})))}))}},graphData:I}),o().createElement(i.Z,{handleWidth:!0,onResize:k})),o().createElement("div",{ref:A,className:b.history},t.rows.map(((e,t)=>{const n=t===R,r=0===t;return o().createElement(y,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(T){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;v(h.N5.mode.actions.modeUpdated(d.ARY.Viewing))}if(r&&!n||!r&&n)v(h.N5.history.actions.clearHistoryEvent()),w(0);else if(!r&&!n){const n=g(e-1,t.uri||E),r=g(e,t.uri||E),o=null==n?void 0:n.timestamp,l=null==r?void 0:r.timestamp,i=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;v(h.N5.history.actions.setHistoryEvent({aStamp:o,bStamp:l,overrideUri:i})),w(e)}})(t,e,n,r)})}))),a&&o().createElement("div",{className:b.buttonContainer},o().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},R=(0,m.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),w=(0,m.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),M=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const l=(0,d.GtP)(t),i=w({color:l});return o().createElement("div",{className:p()(i.icon,{[i.inactive]:!n,[i.active]:n,[i.clickable]:!!r}),onClick:r})},A=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:l,className:i}=e;const a=R();return o().createElement("div",{className:p()(a.root,i)},o().createElement(M,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>o().createElement(M,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?l((0,c.without)([e],n)):l([...n||[],e])})(e)}))))};function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const L=(e,t)=>e.reduce(((e,n,r)=>{let{start:o,end:l}=n;if(o){const n=t-o.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(l){const n=t-l.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),j=(0,m.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),H=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:l,entityUri:i,canLoadMore:a,onLoadMore:s,historyEvent:u}=e;const p=j(),[d,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(l)}),[l]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:o}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],l=(0,c.curry)(((e,n,r)=>{const o=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==b.b.ENTITY_LOST_MERGE)return null;if(e.includes(o))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var l;if(o===e||n&&null!==(l=r.uris)&&void 0!==l&&l.includes(e))return r}return null})),i=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(l(t,r)))(n),a=t=>(e[t]||o&&!o.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==b.b.ENTITY_CREATED||t.type!==b.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},p=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},d=[];return null==n||n.forEach(((n,o)=>{var l;switch(n.type){case b.b.ENTITIES_SPLITTED:if(!i(o,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=i(o,t,!0);if(r&&(!e||e===r.uri))return}break;case b.b.ENTITY_LOST_MERGE:case b.b.RELATIONSHIP_CREATED:case b.b.RELATIONSHIP_REMOVED:case b.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(l=n.uris)||void 0===l||l.forEach((e=>{a(e)||(c=!0)}));const h=a(n.uri||t);if(!h)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){k(e,t,n[t])}))}return e}({},n);((t,n)=>{var o,l;switch(n.type){case b.b.ENTITY_CREATED:s(t,n);break;case b.b.ENTITIES_MERGED_ON_THE_FLY:case b.b.ENTITY_CHANGED:u(t,n);break;case b.b.ENTITY_LOST_MERGE:case b.b.ENTITY_REMOVED:p(t,n);break;case b.b.ENTITIES_SPLITTED:u(t,n),null===(o=n.uris)||void 0===o||o.forEach((t=>{const o=e[t];if(!o)return;const l=o.lifeTime.length;l?s(o.lifeTime,n):p(o.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:l?b.b.FAKE_UPDATE:b.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case b.b.ENTITIES_MERGED:case b.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const r=e[t];r&&p(r.lifeTime,n)}))}})(h.lifeTime,f),c&&d.push(f),r.push(f)})),d.forEach((t=>{t.uris.forEach((o=>{e[o]||n.forEach((n=>{let{uri:l,uris:i,timestamp:a,user:s,type:u}=n;l===o&&(null==i||i.forEach((n=>{const o=e[n];if(!o)return;let l=null;switch(u){case b.b.ENTITIES_MERGED:case b.b.ENTITIES_MERGED_MANUALLY:l=b.b.FAKE_FILTERED_INCOMING;break;case b.b.ENTITIES_SPLITTED:l=b.b.FAKE_FILTERED_OUTGOING;break;default:return}const i={fakeType:l,uri:t.uri,uris:[n],type:u,user:s,timestamp:a},p=L(o.lifeTime,t.timestamp);l===b.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(p.endIndex)||(o.lifeTime[p.endIndex].end=i):(0,c.isNil)(p.startIndex)||(o.lifeTime[p.startIndex].start=i),r.splice(r.indexOf(t),0,i)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(l(t,!1)))(r)}}),[t,n,o])})({entityUri:i,historyChanges:null==n?void 0:n.changes,selectedUris:d});return o().createElement("div",{className:p.root},o().createElement(A,{values:l,selectedValues:d,onSelectValues:h,entityUri:i,className:p.borderBottom}),o().createElement(_,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:a,entityUri:i,historyEvent:u,findPreviousChange:E}))}))},3409:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),l=n(52730),i=n(59431),a=n(94079),s=n(17440),c=n(87918),u=n.n(c);const p=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),d=()=>{const e=p(),t=(0,l.useSelector)(i.ZP.selectors.getHistoryEvent),n=(0,l.useDispatch)(),r=(0,s.pipe)(i.N5.history.actions.clearHistoryEvent,n);return t?o().createElement("div",{className:e.root},o().createElement(a.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",o().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),o().createElement(a.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},85890:(e,t,n)=>{n.d(t,{k:()=>p});var r=n(24328),o=n(58991),l=n(65942),i=n(48465),a=n(67218);function s(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){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={activities:[l.M.MERGE,l.M.UNMERGE,l.M.UPDATE]},p=e=>{let{entity:t,enabled:n}=e;const[l,c]=(0,r.useState)(u),[p,d]=(0,r.useState)(0),h=(0,r.useMemo)((()=>(0,i.Z)(l)),[l]),[f,E]=(0,r.useState)(null),[m,g]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),v=(0,a._)(),T=null==t?void 0:t.uri,O={max:32,order:"desc"},I=(0,o.O27)(null==l?void 0:l.attributes)||void 0;(0,r.useEffect)((()=>{T&&n&&(b(!0),v((0,o.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:I},O))).then(g).catch((e=>{console.warn("Failed to load history data",e),g(null)})).finally((()=>{b(!1)})))}),[h,I,f]),(0,r.useEffect)((()=>{T&&n&&(b(!0),v((0,o.wdF)({entityUri:T})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{b(!1)})),d(0))}),[T,null==t?void 0:t.updatedTime,n]);const x=(0,r.useCallback)((e=>{T&&f&&n&&(b(!0),v((0,o.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:I,offset:e},O))).then((e=>{g((t=>s({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{b(!1)})))}),[f,h,n]),S=(0,r.useMemo)((()=>32*(p+1)<(null==m?void 0:m.total)),[m,p]),N=(0,r.useCallback)((e=>{d(0),c(e)}),[]),C=(0,r.useCallback)((()=>{N(s({},u))}),[]),P=(0,r.useCallback)((()=>{S&&(x(32*(p+1)),d(p+1))}),[x,p,S]);return{isLoading:y,canLoadMore:S,onLoadMore:P,onApplyFilter:N,onClearFilter:C,historicUris:f,historyWithTotal:m,historyFilter:l}}},71820:(e,t,n)=>{n.d(t,{C:()=>l});var r=n(24328),o=n(58991);const l=e=>{let{isHistoryTabActive:t,entity:n}=e;const[l,i]=(0,r.useState)(!1),a=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||i(!1)}),[a]),(0,r.useEffect)((()=>{t&&i(!0)}),[t]);const s=a&&!(0,o.ZiX)(a)&&!(0,o.biM)(n);return{isHistoryEnabled:l&&s,isProfilePersisted:s}}},57730:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),o=n(52730),l=n(59431),i=n(58991),a=n(67218);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,o.useSelector)(l.ZP.selectors.getHistorySlice),p=(0,o.useDispatch)(),d=(0,a._)(),{aStamp:h,bStamp:f,overrideUri:E}=n||{},m=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&m&&(c(!0),d(Promise.all([(0,i.lrH)(m,h),f&&1!==f?(0,i.lrH)(m,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;p(l.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[h,f,m]),{isLoading:s,historySlice:u}}},55912:(e,t,n)=>{n.d(t,{b:()=>i});var r,o=n(31537);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},o.I,r)},65942:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},48465:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),o=n.n(r),l=n(17440),i=n(58991),a=n(65942),s=n(31537),c=n(67885);const u=e=>(0,l.pipe)((0,l.map)(e),(0,l.join)(" or ")),p=e=>{const[t,n]=e;return o()().subtract(t,n).valueOf()},d=(0,l.chain)((0,l.cond)([[(0,l.equals)(a.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,l.equals)(a.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,l.equals)(a.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),h=(0,l.pipe)((0,l.defaultTo)([]),d,(0,l.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,l.pipe)((0,l.defaultTo)({}),(0,l.reject)(i.O27),(0,l.evolve)({users:u((e=>`equals(user, '${(0,i.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,i.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${p(n)})`;case c.K.AGO:return`lte(timestamp, ${p(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${o()(t).endOf("date").valueOf()})`}default:return""}}}),(0,l.over)((0,l.lensProp)("activities"),h),l.values,(0,l.reject)(i.O27),(0,l.append)("not equals(user, 'collaboration-service')"),(0,l.map)((e=>`(${e})`)),(0,l.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,l.type)(t)&&"String"===(0,l.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}},67885:(e,t,n)=>{let r,o;n.d(t,{K:()=>r,o:()=>o}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(o||(o={}))}}]);
|
package/4689.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4689],{7785:(e,t,n)=>{n.d(t,{Z:()=>k});var r=n(24328),o=n.n(r),a=n(71153),l=n.n(a),i=n(87918),s=n.n(i),c=n(38402),p=n(94079),u=n(88611),d=n(99493),h=n(83348),g=n(55299),m=n(31276),f=n(71543);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)}const x=e=>o().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function v(){return v=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},v.apply(this,arguments)}const y=e=>o().createElement("svg",v({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),w=(0,n(79692).Z)({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),O=e=>{let{attrType:t={}}=e;const n=w(),r=(e=>{switch(e.type){case d.oS0.TYPE_IMAGE:case d.oS0.TYPE_NESTED:return f.Z;case d.oS0.TYPE_REFERENCE:return x;default:return y}})(t);return o().createElement(r,{className:n.icon})};var E=n(31269);function I(){return I=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},I.apply(this,arguments)}const P=(0,h.Z)((e=>o().createElement("svg",I({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),o().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),o().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),o().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),o().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),k=(0,r.memo)((e=>{let{groupId:t,data:n,checked:r=!1,isFocused:a=!1,isRequired:i=!1,label:h,labelInText:f,level:b,onClick:x=m.ZT,hideCheckBox:v=!1,hideIcon:y=!1,notSelectable:I=!1,disableHorizontalScrollbar:k=!1,style:C={},subItemMargin:j=20,LogoIcon:T,className:F}=e;const S=w(),{attrType:L}=n||{},Z=!(v&&(0,d.QZu)(L)||I),R=!!T;return o().createElement(u.C,{value:f||h,className:S.itemTooltip,placement:"bottom-end"},o().createElement(c.Z,{className:l()(S.container,S.listItem,{[S.defaultCursor]:!Z},F),onClick:Z?()=>x(n,!r,t):void 0,style:C,dense:!0,button:Z,classes:{focusVisible:S.listItemFocus,selected:S.listItemFocus},selected:a,tabIndex:-1},!v&&o().createElement(p.Checkbox,{checked:r,disableRipple:!0,disabled:!Z,className:l()(S.checkbox,{[S.checked]:r}),tabIndex:-1}),o().createElement(E.Z,{margin:j,level:b,className:S.marginWrapper},o().createElement(o().Fragment,null,!y&&(e=>"recommended"===t?o().createElement(P,{className:S.recommendedIcon,tooltipTitle:s().text("Recommended"),showForDisabled:!0}):o().createElement(O,{attrType:e}))(L),o().createElement("div",{className:l()(S.itemTextWrapper,{[S.marginText]:y})},R&&o().createElement(T,{className:S.logoIcon}),o().createElement(p.ListItemText,{primary:o().createElement(o().Fragment,null,h,i&&o().createElement(g.Z,null)),className:S.itemText})))),Z&&k&&o().createElement("div",{className:S.itemAfter})))}))},24737:(e,t,n)=>{n.d(t,{Z:()=>V});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),p=n(94113),u=n(65549),d=n(79692);const h=(0,d.Z)((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),g=(0,d.Z)({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"21px"}});var m=n(36179);const f=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:r,components:a},children:l}=e,i=h();return o().createElement(m.Z,e,l,n&&!(0,c.prop)("Group",a)&&o().createElement("span",{className:i.addLabel,onClick:()=>t(r)},o().createElement(u.Z,{className:i.addIcon}),n))};f.propTypes={children:l().element.isRequired,selectProps:l().object.isRequired};const b=f;var x=n(18461),v=n(5190),y=n(31276),w=n(99493),O=n(72436),E=n(94079);function I(){return I=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},I.apply(this,arguments)}function P(e){const{selectProps:{menuIsOpen:t},innerProps:n,children:r}=e,a=g();return!t&&o().createElement(E.Typography,I({className:a.singleValue},n),r)}function k(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){C(e,t,n[t])}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}P.propTypes={children:l().node,innerProps:l().object};const j=(0,d.Z)({control:{height:"auto"},dropdownIndicator:{transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",lineHeight:"16px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),T={menu:e=>k({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>k({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>k({},e,{padding:"0 0 8px 0"}),input:e=>k({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>k({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},F={menuList:e=>k({},e,{padding:0})},S={input:e=>k({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};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 Z(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 N=e=>{let{value:t,label:n,createLabel:a,getOptions:l,options:i,height:u=46,onChange:d=c.identity,onCreate:h,onClear:g=c.identity,components:m,textFieldInputRef:f,TextFieldProps:E,classes:I}=e,k=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","createLabel","getOptions","options","height","onChange","onCreate","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const C=j({height:u}),R=(0,O.a6)(),[N,z]=(0,r.useState)(!1),V=(0,r.useRef)(null),B=l?x.Z:v.Z,H=(0,c.prop)("ClearIndicator",m)?{}:{IndicatorSeparator:y.Vd,ClearIndicator:y.Vd},M=h?(e,t)=>{h(e,t),z(!1)}:void 0,W=(0,c.prop)("Group",m)?F:{},D=(0,c.isEmpty)(n)?S:{},_=Z({},T,W,D),q=Z({},C,I);return o().createElement(B,L({placeholder:"",defaultOptions:!0},k,{value:(0,c.defaultTo)(null,t),loadOptions:l,options:i,cacheOptions:!0,onChange:d,onCreate:M,onClear:g,createLabel:a,classes:q,styles:_,components:Z({DropdownIndicator:p.Z,LoadingIndicator:y.Vd,SingleValue:P,Menu:b},H,m),menuPlacement:"auto",TextFieldProps:Z({},E,{label:n,variant:"filled",margin:"dense",classes:Z({},(0,c.prop)("classes",E),{root:s()(C.formControl,(0,c.path)(["classes","root"],E))}),inputProps:Z({},(0,c.prop)("inputProps",E)),InputProps:Z({},(0,c.prop)("InputProps",E),{classes:Z({},(0,c.path)(["InputProps","classes"],E),{root:s()(C.filledInputRoot,(0,c.path)(["InputProps","classes","root"],E)),underline:s()({[R.filledInputUnderline]:(0,w.O27)(t)},(0,c.path)(["InputProps","classes","underline"],E)),focused:s()("focused",(0,c.path)(["InputProps","classes","focused"],E))})}),InputLabelProps:Z({},(0,c.prop)("InputLabelProps",E),{classes:Z({},(0,c.path)(["InputLabelProps","classes"],E),{root:s()(C.inputLabel,(0,c.path)(["InputLabelProps","classes","root"],E)),shrink:s()("shrink",(0,c.path)(["InputLabelProps","classes","shrink"],E))}),shrink:!(0,w.O27)(t)||void 0}),ref:f||V}),inputRef:f||V,menuIsOpen:N,onMenuOpen:()=>z(!0),onMenuClose:()=>z(!1)}))},z={value:l().oneOfType([l().object,l().array]),label:l().string.isRequired,getOptions:l().func,options:l().array,onChange:l().func,onCreate:l().func,onClear:l().func,createLabel:l().string,components:l().object,textFieldInputRef:l().object,TextFieldProps:l().object,height:l().number,classes:l().object};N.propTypes=z;const V=N},31039:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(52730),l=n(39450),i=n(59431),s=n(99493);const c=(0,r.forwardRef)(((e,t)=>{let{value:n,children:c,className:p}=e;const u=(0,a.useDispatch)(),d=(0,r.useContext)(l.m),h=(0,a.useSelector)(i.ZP.selectors.getUIPath),g=(0,r.useCallback)((()=>{u(i.ui.actions.openEntity({uri:n,viewId:d}))}),[d,n,u]);return o().createElement("a",{ref:t,href:(m=n,(0,s.ChB)({uiPath:h,uri:m})),onClick:e=>{g(),e.stopPropagation(),e.preventDefault()},className:p},c);var m}));c.displayName="EntityUriLink";const p=c},5190:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(5407),o=n(44711);const a=(0,r.Z)(o.ZP)},55299:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);const a=(0,n(79692).Z)({mark:{color:"red"}}),l=()=>{const e=a();return o().createElement("span",{className:e.mark},"*")}},31517:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),o=n.n(r),a=n(24737),l=n(13980),i=n.n(l),s=n(94079);const c=(0,n(79692).Z)({value:{color:"rgba(0, 0, 0, 0.87)"},placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}}),p=e=>{let{selectProps:{menuIsOpen:t},data:{label:n}}=e;const r=c();return!t&&o().createElement(s.Typography,{variant:"body2",classes:{root:r.value}},n)};p.propTypes={selectProps:i().shape({menuIsOpen:i().bool}),data:i().shape({label:i().string})};const u=p;function d(){return d=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},d.apply(this,arguments)}const h=e=>{const t=c(),{innerProps:n={},children:r}=e;return o().createElement(s.Typography,d({className:t.placeholder},n),r)};function g(){return g=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},g.apply(this,arguments)}h.propTypes={children:i().node,innerProps:i().object,selectProps:i().object.isRequired};const m={SingleValue:u,Placeholder:h},f=(0,r.memo)((e=>{let t=g({},e);return o().createElement(a.Z,g({components:m},t))}))},39450:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(24328);const o=n.n(r)().createContext(null);o.displayName="ViewIdContext"},71543:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);function a(){return a=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},a.apply(this,arguments)}const l=e=>o().createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4689],{7785:(e,t,n)=>{n.d(t,{Z:()=>k});var r=n(24328),o=n.n(r),a=n(71153),l=n.n(a),i=n(87918),s=n.n(i),c=n(38402),p=n(94079),u=n(88611),d=n(58991),h=n(83348),g=n(55299),m=n(31276),f=n(71543);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)}const x=e=>o().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M10 18h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1H8V8H6a1 1 0 01-1-1V3a1 1 0 011-1h6a1 1 0 011 1v4a1 1 0 01-1 1h-2v3h3v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v5z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}));function v(){return v=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},v.apply(this,arguments)}const y=e=>o().createElement("svg",v({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("rect",{fill:"#000",x:9,y:9,width:6,height:6,rx:1,stroke:"none",strokeWidth:1,fillRule:"evenodd"})),w=(0,n(79692).Z)({container:{"& > $marginWrapper:first-child":{paddingLeft:"4px"}},listItem:{paddingLeft:"1px",paddingTop:"2px",paddingBottom:"2px",transition:"none","&:hover":{"& $itemAfter":{background:"linear-gradient(to right, rgba(235, 235, 235, 0.2), rgba(235, 235, 235, 1) 100%)"}},"&$listItemFocus":{"& $itemAfter":{background:"linear-gradient(to right, rgba(219, 219, 219, 0.2), rgba(219, 219, 219, 1) 100%)"}},"&:focus":{outline:"none"}},listItemFocus:{},icon:{opacity:.29,width:"16px",height:"16px",flexShrink:0,marginRight:"6px",marginLeft:"8px"},recommendedIcon:{width:"18px",height:"18px",marginRight:"5px",marginLeft:"7px",flexShrink:0},logoIcon:{width:"18px",height:"18px",flexShrink:0,marginRight:"4px"},itemAfter:{position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)"},itemText:{padding:"0",margin:0,"& span":{fontSize:"0.8125rem",letterSpacing:"normal",whiteSpace:"nowrap"}},checkbox:{opacity:.34,padding:0,marginLeft:"14px","&$checked":{opacity:1,background:"none"}},checked:{},marginWrapper:{display:"flex",alignItems:"center"},defaultCursor:{cursor:"default"},itemTooltip:{margin:"4px 0"},marginText:{marginLeft:"21px"},itemTextWrapper:{display:"flex",alignItems:"center"}}),O=e=>{let{attrType:t={}}=e;const n=w(),r=(e=>{switch(e.type){case d.oS0.TYPE_IMAGE:case d.oS0.TYPE_NESTED:return f.Z;case d.oS0.TYPE_REFERENCE:return x;default:return y}})(t);return o().createElement(r,{className:n.icon})};var E=n(31269);function I(){return I=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},I.apply(this,arguments)}const P=(0,h.Z)((e=>o().createElement("svg",I({width:13,height:18,viewBox:"0 0 13 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("g",{transform:"translate(-3 -1)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},o().createElement("path",{fill:"#FF4081",d:"M5.833 10h3.75v6.667l-3.75 1.666z"}),o().createElement("path",{fill:"#CE0C4E",d:"M13.333 10v8.333l-3.75-1.666V10z"}),o().createElement("circle",{fill:"#FFC058",cx:9.583,cy:7.917,r:6.25}),o().createElement("circle",{fill:"#FFCD7B",cx:9.583,cy:7.917,r:5.417}),o().createElement("path",{fill:"#FFFBB5",d:"M8.333 11.667L5 8.462l.933-.898 2.4 2.308L13.4 5l.933.897z"}))))),k=(0,r.memo)((e=>{let{groupId:t,data:n,checked:r=!1,isFocused:a=!1,isRequired:i=!1,label:h,labelInText:f,level:b,onClick:x=m.ZT,hideCheckBox:v=!1,hideIcon:y=!1,notSelectable:I=!1,disableHorizontalScrollbar:k=!1,style:C={},subItemMargin:j=20,LogoIcon:T,className:F}=e;const S=w(),{attrType:L}=n||{},Z=!(v&&(0,d.QZu)(L)||I),R=!!T;return o().createElement(u.C,{value:f||h,className:S.itemTooltip,placement:"bottom-end"},o().createElement(c.Z,{className:l()(S.container,S.listItem,{[S.defaultCursor]:!Z},F),onClick:Z?()=>x(n,!r,t):void 0,style:C,dense:!0,button:Z,classes:{focusVisible:S.listItemFocus,selected:S.listItemFocus},selected:a,tabIndex:-1},!v&&o().createElement(p.Checkbox,{checked:r,disableRipple:!0,disabled:!Z,className:l()(S.checkbox,{[S.checked]:r}),tabIndex:-1}),o().createElement(E.Z,{margin:j,level:b,className:S.marginWrapper},o().createElement(o().Fragment,null,!y&&(e=>"recommended"===t?o().createElement(P,{className:S.recommendedIcon,tooltipTitle:s().text("Recommended"),showForDisabled:!0}):o().createElement(O,{attrType:e}))(L),o().createElement("div",{className:l()(S.itemTextWrapper,{[S.marginText]:y})},R&&o().createElement(T,{className:S.logoIcon}),o().createElement(p.ListItemText,{primary:o().createElement(o().Fragment,null,h,i&&o().createElement(g.Z,null)),className:S.itemText})))),Z&&k&&o().createElement("div",{className:S.itemAfter})))}))},24737:(e,t,n)=>{n.d(t,{Z:()=>V});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),p=n(94113),u=n(65549),d=n(79692);const h=(0,d.Z)((e=>({addLabel:{display:"flex",padding:"0 7px",height:"35px",alignItems:"center",fontSize:"13px",fontWeight:"500",color:e.palette.primary.main,cursor:"pointer",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",borderTop:"solid 1px rgba(0, 0, 0, 0.14)",backgroundColor:"rgba(0, 0, 0, 0.03)"},addIcon:{height:"18px",width:"18px",padding:"0 9px"}}))),g=(0,d.Z)({singleValue:{fontSize:"14px",lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"21px"}});var m=n(36179);const f=e=>{const{selectProps:{onCreate:t,createLabel:n,inputValue:r,components:a},children:l}=e,i=h();return o().createElement(m.Z,e,l,n&&!(0,c.prop)("Group",a)&&o().createElement("span",{className:i.addLabel,onClick:()=>t(r)},o().createElement(u.Z,{className:i.addIcon}),n))};f.propTypes={children:l().element.isRequired,selectProps:l().object.isRequired};const b=f;var x=n(18461),v=n(5190),y=n(31276),w=n(58991),O=n(72436),E=n(94079);function I(){return I=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},I.apply(this,arguments)}function P(e){const{selectProps:{menuIsOpen:t},innerProps:n,children:r}=e,a=g();return!t&&o().createElement(E.Typography,I({className:a.singleValue},n),r)}function k(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){C(e,t,n[t])}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}P.propTypes={children:l().node,innerProps:l().object};const j=(0,d.Z)({control:{height:"auto"},dropdownIndicator:{transition:"transform .15s ease",padding:e=>(e.height-24)/2+"px 12px",cursor:"pointer",color:"rgba(0, 0, 0, 0.54)"},valueContainer:{marginLeft:"16px",width:0},formControl:{margin:0},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},filledInputUnderline:{"&:before":{display:"none"}},inputLabel:{color:"rgba(0,0,0,0.6)",fontSize:"14px",lineHeight:"16px",paddingLeft:"4px","&.shrink":{paddingLeft:"4px"}}}),T={menu:e=>k({},e,{borderRadius:"0 0 4px 4px",backgroundColor:"#FFFFFFFF",boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",margin:0}),menuList:e=>k({},e,{maxHeight:"208px",padding:"8px 0"}),group:e=>k({},e,{padding:"0 0 8px 0"}),input:e=>k({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:"16px 0 0",padding:0}),option:e=>k({},e,{fontSize:"13px",lineHeight:"15px",height:"32px"})},F={menuList:e=>k({},e,{padding:0})},S={input:e=>k({},e,{height:"16px",color:"rgba(0, 0, 0, 0.87)",fontSize:"14px",lineHeight:"16px",margin:0,padding:0})};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 Z(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 N=e=>{let{value:t,label:n,createLabel:a,getOptions:l,options:i,height:u=46,onChange:d=c.identity,onCreate:h,onClear:g=c.identity,components:m,textFieldInputRef:f,TextFieldProps:E,classes:I}=e,k=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","label","createLabel","getOptions","options","height","onChange","onCreate","onClear","components","textFieldInputRef","TextFieldProps","classes"]);const C=j({height:u}),R=(0,O.a6)(),[N,z]=(0,r.useState)(!1),V=(0,r.useRef)(null),B=l?x.Z:v.Z,H=(0,c.prop)("ClearIndicator",m)?{}:{IndicatorSeparator:y.Vd,ClearIndicator:y.Vd},M=h?(e,t)=>{h(e,t),z(!1)}:void 0,W=(0,c.prop)("Group",m)?F:{},D=(0,c.isEmpty)(n)?S:{},_=Z({},T,W,D),q=Z({},C,I);return o().createElement(B,L({placeholder:"",defaultOptions:!0},k,{value:(0,c.defaultTo)(null,t),loadOptions:l,options:i,cacheOptions:!0,onChange:d,onCreate:M,onClear:g,createLabel:a,classes:q,styles:_,components:Z({DropdownIndicator:p.Z,LoadingIndicator:y.Vd,SingleValue:P,Menu:b},H,m),menuPlacement:"auto",TextFieldProps:Z({},E,{label:n,variant:"filled",margin:"dense",classes:Z({},(0,c.prop)("classes",E),{root:s()(C.formControl,(0,c.path)(["classes","root"],E))}),inputProps:Z({},(0,c.prop)("inputProps",E)),InputProps:Z({},(0,c.prop)("InputProps",E),{classes:Z({},(0,c.path)(["InputProps","classes"],E),{root:s()(C.filledInputRoot,(0,c.path)(["InputProps","classes","root"],E)),underline:s()({[R.filledInputUnderline]:(0,w.O27)(t)},(0,c.path)(["InputProps","classes","underline"],E)),focused:s()("focused",(0,c.path)(["InputProps","classes","focused"],E))})}),InputLabelProps:Z({},(0,c.prop)("InputLabelProps",E),{classes:Z({},(0,c.path)(["InputLabelProps","classes"],E),{root:s()(C.inputLabel,(0,c.path)(["InputLabelProps","classes","root"],E)),shrink:s()("shrink",(0,c.path)(["InputLabelProps","classes","shrink"],E))}),shrink:!(0,w.O27)(t)||void 0}),ref:f||V}),inputRef:f||V,menuIsOpen:N,onMenuOpen:()=>z(!0),onMenuClose:()=>z(!1)}))},z={value:l().oneOfType([l().object,l().array]),label:l().string.isRequired,getOptions:l().func,options:l().array,onChange:l().func,onCreate:l().func,onClear:l().func,createLabel:l().string,components:l().object,textFieldInputRef:l().object,TextFieldProps:l().object,height:l().number,classes:l().object};N.propTypes=z;const V=N},31039:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(52730),l=n(39450),i=n(59431),s=n(58991);const c=(0,r.forwardRef)(((e,t)=>{let{value:n,children:c,className:p}=e;const u=(0,a.useDispatch)(),d=(0,r.useContext)(l.m),h=(0,a.useSelector)(i.ZP.selectors.getUIPath),g=(0,r.useCallback)((()=>{u(i.ui.actions.openEntity({uri:n,viewId:d}))}),[d,n,u]);return o().createElement("a",{ref:t,href:(m=n,(0,s.ChB)({uiPath:h,uri:m})),onClick:e=>{g(),e.stopPropagation(),e.preventDefault()},className:p},c);var m}));c.displayName="EntityUriLink";const p=c},5190:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(5407),o=n(44711);const a=(0,r.Z)(o.ZP)},55299:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);const a=(0,n(79692).Z)({mark:{color:"red"}}),l=()=>{const e=a();return o().createElement("span",{className:e.mark},"*")}},31517:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),o=n.n(r),a=n(24737),l=n(13980),i=n.n(l),s=n(94079);const c=(0,n(79692).Z)({value:{color:"rgba(0, 0, 0, 0.87)"},placeholder:{color:"rgba(0, 0, 0, 0.38)",fontSize:"14px !important"}}),p=e=>{let{selectProps:{menuIsOpen:t},data:{label:n}}=e;const r=c();return!t&&o().createElement(s.Typography,{variant:"body2",classes:{root:r.value}},n)};p.propTypes={selectProps:i().shape({menuIsOpen:i().bool}),data:i().shape({label:i().string})};const u=p;function d(){return d=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},d.apply(this,arguments)}const h=e=>{const t=c(),{innerProps:n={},children:r}=e;return o().createElement(s.Typography,d({className:t.placeholder},n),r)};function g(){return g=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},g.apply(this,arguments)}h.propTypes={children:i().node,innerProps:i().object,selectProps:i().object.isRequired};const m={SingleValue:u,Placeholder:h},f=(0,r.memo)((e=>{let t=g({},e);return o().createElement(a.Z,g({components:m},t))}))},39450:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(24328);const o=n.n(r)().createContext(null);o.displayName="ViewIdContext"},71543:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),o=n.n(r);function a(){return a=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},a.apply(this,arguments)}const l=e=>o().createElement("svg",a({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M14 11v-1a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-1h-3v1a1 1 0 01-1 1H6a1 1 0 01-1-1v-4a1 1 0 011-1h4a1 1 0 011 1v1h3z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd"}))}}]);
|