@reltio/remotes 1.4.1574 → 1.4.1576

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/5400.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5400],{79821:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),l=r(52730),i=r(86051),a=r(81559),s=r(97991);const c=(0,r(79692).Z)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:r}=e;const n=c(),u=(0,l.useSelector)(i.ZP.selectors.getAbsoluteImagePath),p=(0,a.XH8)(r,{type:t.id}),d=(0,a.vPL)(u,p);return o().createElement(s.Z,{className:n.icon,icon:d,avatarText:t.title[0]})}},99757:(e,t,r)=>{r.d(t,{Z:()=>V});var n=r(24328),o=r.n(n),l=r(2507),i=r.n(l),a=r(71153),s=r.n(a),c=r(50914),u=r(97820),p=r(54763),d=r(45767),m=r(95613),b=r(22385),f=r(79692);const h=(0,f.Z)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),g=(0,c.either)((0,c.prop)("title"),(0,c.prop)("fieldName")),y=e=>{let{value:t,getLabel:r=g,onSelectAttributeClick:n,disabled:l=!1}=e;const a=h(),c=t&&r(t);return o().createElement("div",{onClick:l?void 0:n,className:s()(a.attribute,{[a.attributeWithValue]:!!c},{[a.disabled]:l})},o().createElement(m.Z,{value:c},o().createElement("div",{className:s()(a.name,{[a.disabled]:l})},c||o().createElement("span",{className:a.noSelect},i().text("Select attribute")))),o().createElement(b.Z,{size:"M",icon:d.Z,disabled:l}))};var x=r(81559);function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){v(e,t,r[t])}))}return e}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const O=(0,c.eqBy)((0,c.pick)(["fieldName","uri","entityTypeUri"])),C=(e,t)=>t&&!!t.find(O(e)),S=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),I=(e,t)=>S(e,t)||(e.children||[]).some((e=>I(e,t))),E=(e,t)=>e.findIndex(O(t)),k=(0,x.fW1)("title"),j=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const i=S(e,n);return[{item:n?w({},e,{filterText:n}):e,level:o,groupId:t,groupName:r}].concat(e.children?e.children.filter((e=>l||i||I(e,n))).flatMap((e=>j(e,t,r,n,o+1,l||i))):[]).flat()},P=(0,c.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>I(t,e))).map((r=>j(r,t.id,t.title,e)))}))).filter((e=>e.items.length))));var T=r(52730),N=r(94079),L=r(86051),R=r(7785),Z=r(44890),D=r(27239),A=r(79821);const F=(0,f.Z)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$(e,t,r[t])}))}return e}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const z=(0,n.memo)((e=>{let{selectedAttributes:t,onItemClick:r,focusIndex:n,hideCheckBox:l}=e,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const a=F(),s=(0,T.useSelector)(L.ZP.selectors.getMetadata);return o().createElement(Z.Z,B({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,i,a)=>{let{item:s,level:c,groupId:u,groupName:p}=i;const d=C(s,t),m=a===n;return o().createElement(R.Z,{key:`item-${u}-${s.fieldName}`,onClick:r,checked:d,data:W({},s,{groupName:p}),notSelectable:s.notSelectable,hideCheckBox:l,label:o().createElement(D.Z,{text:s.title,highlight:s.filterText}),labelInText:s.title,level:c,style:e,isFocused:m,groupId:u,LogoIcon:s.LogoIcon})},renderGroupTitle:(e,t)=>o().createElement(N.ListItem,{component:"div",className:a.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&o().createElement(A.Z,{group:t.item,metadata:s}),t.item.title),focusIndex:n},i))}));var M=r(56656);const H=(0,f.Z)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),V=(0,n.memo)((e=>{let{className:t,itemsGroups:r,value:l,getLabel:a,onSelect:d,onRestoreFocus:m=c.identity,onOpenPopup:b=c.identity,disableRestoreFocus:f=!1,disableEnforceFocus:h=!1,single:g=!1,ungroup:x=!1,disabled:v=!1,hideCheckBox:S=!1}=e;const I=H(),[j,T]=(0,n.useState)(null),N=(0,n.useCallback)((()=>T(null)),[]),L=!!j,[R,Z]=(0,n.useState)(""),D=(0,n.useCallback)((()=>Z("")),[]),[A,F]=(0,n.useState)([]),B=(0,n.useCallback)((()=>F([])),[]),W=(0,n.useMemo)((()=>P(R,r)),[r,R]),$=(0,n.useMemo)((()=>(0,c.pipe)((0,c.when)((0,c.always)(x),(0,c.chain)((0,c.pipe)((0,c.prop)("items"),c.flatten,(0,c.map)((0,c.pick)(["item","level"]))))),M.LG)(W)),[x,W]),V=(0,n.useMemo)((()=>Math.max(k(W),308)),[W]),G=(0,c.pipe)((0,c.tap)((0,c.pipe)(B,D,N)),m),U=(0,n.useRef)(),K=(0,n.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?A.length:E(A,e),selectedAttributes:A}),g?(F(t?[e]:[]),G({})):(F((e=>{let{attribute:t,selectedAttributes:r,checked:n}=e;return n?r.concat(t):r.filter((e=>!O(t,e)))})({selectedAttributes:A,attribute:e,checked:t})),U.current&&U.current.focus())}),[A,d,g,G,U]),X=(0,n.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:r}=e;return e=>{let{item:n,groupData:o}=e;const l=C(n,r);t(w({},n,{groupName:o.groupName}),!l)}})({onListItemClick:K,selectedAttributes:A}),[K,A]),{focusIndex:_,handleKeyDown:q}=(0,p.t)({items:$,open:L,onSelectFocusedItem:X,selectedItems:A,onClose:G});return o().createElement("div",{className:s()(I.selector,t),"data-reltio-id":"attribute-selector"},o().createElement(y,{value:l,getLabel:a,onSelectAttributeClick:e=>{b(),T(e.currentTarget)},disabled:v}),o().createElement(u.Z,{open:L,anchorEl:j,onClose:G,onSearch:Z,title:i().text("Select attribute"),containerWidth:V,containerHeight:507,searchInputOnKeyDown:q,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:U,disableRestoreFocus:f,disableEnforceFocus:h},o().createElement(z,{items:$,onItemClick:K,selectedAttributes:A,width:V,height:400,focusIndex:_,hideCheckBox:S})))}))},74566:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(73038),s=r(58241),c=r(71153),u=r.n(c);const p=(0,r(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:r,className:l}=e;const i=p(),{toggleRowCollapse:c,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,n.useContext)(a.x),b=d(r),f=m(t);return o().createElement(s.Z,{className:u()(l,{[i.hidden]:!b}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};d.propTypes={rowIndex:i().number,rowValue:i().object,className:i().string};const m=d},43290:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),l=r(71153),i=r.n(l),a=r(50914);const s=(0,r(79692).Z)((e=>({bar:{backgroundColor:e.palette.secondary.main,opacity:.12,position:"absolute",minHeight:"20px",minWidth:"5px",borderRadius:"2px",top:0,left:0,height:"100%"}}))),c=e=>(0,a.is)(Number,e),u=e=>{let{className:t,width:r=0,maxWidth:l}=e;const a=s(),u=(0,n.useCallback)((e=>(l?100*e/l:0)+"%"),[l]);return r?o().createElement("div",{className:i()(a.bar,t),style:{width:c(r)?u(r):r}}):null}},89119:(e,t,r)=>{r.d(t,{Z:()=>S});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(2507),s=r.n(a),c=r(71153),u=r.n(c),p=r(50914),d=r(81559),m=r(97820),b=r(7785),f=r(56656),h=r(44890),g=r(54763),y=r(27239);const x=(0,r(79692).Z)((()=>({popupContainer:{},container:{"&$popupContainer":{height:"408px",minWidth:"200px"}}})));function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w.apply(this,arguments)}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const C=e=>{let{open:t,anchorEl:r,data:l,onSearch:i,onClose:a,titleText:s,filterText:c,onListItemClick:O,selected:C,hideCheckBox:S,renderGroupTitle:I}=e,E=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["open","anchorEl","data","onSearch","onClose","titleText","filterText","onListItemClick","selected","hideCheckBox","renderGroupTitle"]);const k=(0,n.useCallback)((e=>e.label.toLowerCase().includes(c.toLowerCase())),[c]),j=(0,n.useCallback)((e=>k(e)||(e.children||[]).some(j)),[k]),P=(0,n.useMemo)((()=>{const e=(0,p.curry)(((e,r,n,o)=>[{item:v({},r,{filterText:c}),level:e,groupId:n,groupName:o},...t(r.children||[],n,o,e+1)])),t=function(t,r,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const l=t=>e(o,t,r,n),i=t.filter(j);return(I?p.map:p.chain)(l,i)};return t}),[c,I,j]),T=(0,n.useCallback)((e=>e.map((e=>({item:e,items:P(e.attributes,e.id,e.label)}))).filter((e=>e.items.length))),[P]),N=(0,n.useCallback)((e=>{let{item:t}=e;O(t,!C.find((e=>e.id===t.id||e.id.includes(`${t.id}.`))))}),[O,C]),L=(0,n.useMemo)((()=>(I?T:P)(l)),[l,I,T,P]),R=(0,n.useMemo)((()=>(0,f.LG)(L)),[L]),{focusIndex:Z,handleKeyDown:D}=(0,g.t)({items:R,open:t,onSelectFocusedItem:N,selectedItems:C}),A=(0,n.useRef)(null);A.current=Z;const F=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:l=0}=t;const i=!!C.find((e=>e.id===n.id||e.id.includes(`${n.id}.`))),a=A.current===r;return o().createElement(b.Z,{key:n.id,onClick:O,checked:i,level:l,data:n,label:o().createElement(y.Z,{text:n.label,highlight:n.filterText}),labelInText:n.label,style:e,hideCheckBox:S,isFocused:a,notSelectable:n.notSelectable,LogoIcon:n.LogoIcon})}),[S,O,C]),B=(0,d.fW1)("label")(L)||308,W=x();return o().createElement(m.Z,w({open:t,className:u()(W.container,W.popupContainer),anchorEl:r,onClose:a,onSearch:i,title:s,containerWidth:B,searchInputOnKeyDown:D},E),o().createElement(h.Z,{height:300,renderItem:F,items:R,hideSubtitles:!0,getItemSize:()=>32,containerWidth:B,focusIndex:Z,renderGroupTitle:I}))};C.propTypes={open:i().bool,hideCheckBox:i().bool,anchorEl:i().any,selected:i().array,data:i().array,filterText:i().string,titleText:i().string,onClose:i().func,onListItemClick:i().func,onSearch:i().func,renderGroupTitle:i().func},C.defaultProps={data:[],selected:[],titleText:s().text("Show/hide columns"),filterText:""};const S=C},27652:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),o=r.n(n),l=r(4190),i=r(60364);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}const s=e=>{let{open:t=!0,children:r}=e,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["open","children"]);const[c,u]=(0,n.useState)(t),p=(0,i.Z)().transitions.duration.leavingScreen;return(0,n.useEffect)((()=>{if(t!==c){if(!t){const e=setTimeout((()=>{u(!1)}),p);return()=>clearTimeout(e)}u(!0)}}),[t,p,c]),o().createElement(l.ZP,a({open:t},s),c&&r)};s.displayName="Drawer";const c=s},59725:(e,t,r)=>{r.d(t,{Q:()=>c});var n=r(24328),o=r.n(n),l=r(2507),i=r.n(l),a=r(81559),s=r(42520);const c=(0,n.memo)((e=>{let{entityTypes:t,selectedEntityTypes:r,single:l,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d={},ListLabelProps:m={},disabled:b=!1}=e;const f=(0,n.useMemo)((()=>t.filter(a.oDv)),[t]);return o().createElement(s.S,{items:f,selectedItemsUris:r,single:l,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d,ListLabelProps:m,disabled:b,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},42520:(e,t,r)=>{r.d(t,{S:()=>T});var n=r(24328),o=r.n(n),l=r(71153),i=r.n(l),a=r(50914),s=r(81559),c=r(94079),u=r(83543),p=r(79692);const d=(0,p.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),m=(e,t)=>{const{childNodes:r,clientLeft:n,clientWidth:o}=t;if(r.length>0){const[t]=Array.from(r),l=document.createRange();l.setStart(t,0);for(let r=0;r<e.length;r++){l.setEnd(t,l.endOffset+e[r].length);const{width:i}=l.getBoundingClientRect();if(n+i>o)return r;r!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},b=e=>e.join(", "),f=e=>`calc(${(0,a.isNil)(e)?"100%":`${e}px`} - 35px)`,h=e=>{let{list:t,maxWidth:r}=e;const l=d(),i=(0,n.useRef)(),[a,s]=(0,n.useState)(0);(0,n.useEffect)((()=>{s(((e,t)=>{const r=e.length,n=((e,t)=>{if(t){const r=m(e,t);return-1===r?0:e.length-r}return 0})(e,t);return r-Math.max(1,r-n)})(t,i.current))}),[t]);const u=b(t),p=a>0,h=p?b(t.slice(0,-a)):u;return o().createElement(c.Tooltip,{title:p?u:""},o().createElement("div",{className:l.listLabelContainer},o().createElement("div",{style:{width:f(r)},className:l.listLabel,ref:i},u),o().createElement("div",{className:l.visibleItemsLabel},h),p&&o().createElement("div",{className:l.hiddenCount},`+${a}`)))};var g=r(22385),y=r(97820),x=r(54763),w=r(7785),v=r(27239),O=r(44890);function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}const S=(0,a.always)(32),I=(0,n.memo)((e=>{let{selectedItems:t,onItemClick:r,focusIndex:n,width:l,height:i}=e,a=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return o().createElement(O.Z,C({getItemSize:S,renderItem:(e,l,i)=>{let{item:a}=l;const s=!!t.find((e=>a.uri===e)),c=i===n;return o().createElement(w.Z,{key:a.uri,onClick:r,checked:s,data:a,label:o().createElement(v.Z,{text:a.label,highlight:a.filterText}),labelInText:a.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:a.LogoIcon})},focusIndex:n,fixedTitle:!1,disableHorizontalScrollbar:!0,width:l,height:i},a))}));I.displayName="SelectMetadataTypesList";const E=(0,p.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k.apply(this,arguments)}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){P(e,t,r[t])}))}return e}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=(0,n.memo)((e=>{let{placeholder:t,classes:r={},items:l,selectedItemsUris:p,onChange:d,ListLabelProps:m={},disabled:b,enableEmptyValueUnderline:f,single:w,label:v,dataReltioId:O,selectionPopupTitle:C}=e;const S=E(),[P,T]=(0,n.useState)(!1),N=(0,n.useCallback)((()=>T(!0)),[]),L=(0,n.useCallback)((()=>T(!1)),[]),[R,Z]=(0,n.useState)(""),D=(0,n.useCallback)((()=>Z("")),[]),A=(0,n.useCallback)((0,a.pipe)(D,L),[L,D]),F=l.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,R)})).map(((e,t)=>({item:{item:j({},e,{filterText:R})},index:t}))),B=(0,n.useMemo)((()=>p.map((e=>l.find((0,a.propEq)("uri",e)))).map((0,a.prop)("label"))),[p,l]),W=(0,n.useCallback)(((e,t)=>{w?(d(t?[e.uri]:[]),A()):d(t?p.concat(e.uri):p.filter((t=>t!==e.uri)))}),[p,d,w,A]),$=(0,n.useCallback)((e=>{let{item:t}=e;const r=!p.includes(t.uri);W(t,r)}),[p,W]),{focusIndex:z,handleKeyDown:M}=(0,x.t)({items:F,open:P,onSelectFocusedItem:$,selectedItems:p,onClose:A}),H=(0,n.useRef)(),V=H.current?H.current.getBoundingClientRect().width:0,G=Math.max(V,255),U=0===p.length;return o().createElement(o().Fragment,null,o().createElement(c.TextField,{label:v,ref:H,InputProps:{startAdornment:U&&!t?null:o().createElement("div",{className:i()(S.inputText,r.inputText)},U?o().createElement("div",null,t):o().createElement(h,k({},m,{list:B}))),classes:{root:S.inputRoot,input:i()(S.input,r.input,{[S.emptyInput]:U&&!t}),disabled:i()(S.disabledInput,{[S.disabledPointer]:b}),underline:S.disabledUnderline},endAdornment:o().createElement(g.Z,{size:"L",icon:u.Z,iconClassName:i()(S.icon,{[S["popup-opened-icon"]]:P}),disabled:b}),readOnly:!0,disabled:!0,disableUnderline:U&&!f},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:i()(S.inputLabel,r.label)}},value:"",onClick:b?void 0:N,classes:{root:i()(S.root,r.root)},margin:"dense",variant:"filled",disabled:b,"data-reltio-id":O}),o().createElement(y.Z,{open:P,anchorEl:H.current,onClose:A,onSearch:Z,title:C,containerWidth:G,containerHeight:355,searchInputOnKeyDown:M,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${O}-popup`}},o().createElement(I,{items:F,onItemClick:W,selectedItems:p,width:G,height:245,focusIndex:z})))}));T.displayName="MetadataTypesSelector"},17349:(e,t,r)=>{r.d(t,{Z:()=>O});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(71153),s=r.n(a),c=r(2507),u=r.n(c),p=r(6782),d=r(79692);const m="46px",b=(0,d.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:m},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:m}}))),f=e=>{let{className:t,rowData:r}=e;const n=b();return o().createElement("div",{className:s()(n.readOnlyLogicOperatorContainer,t)},r&&r.operator?(0,p.Z)(r.operator):u().text("Where"))};f.propTypes={className:i().string,rowData:i().object};const h=f;var g=r(81559);const y=e=>{let{className:t,rowData:r}=e;const n=b();return o().createElement("div",{className:s()(n.readOnlyFilter,t)},r&&r.filter?(0,g.XS2)(r.filter):u().text("equals"))};var x=r(94656);const w=(0,d.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));const v=e=>{let{classes:t={},rowData:r,previousRowData:n,LogicOperatorComponent:l=h,AttributeSelectorComponent:i,FilterSelectorComponent:a=y,ValuesEditorComponent:c,ActionsComponent:u,filterSelectorRef:p,attributeSelectorProps:d={}}=e,m=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const b=w();return o().createElement("div",{className:s()(b.row,t.root),"data-reltio-id":"query-builder-row"},o().createElement(l,{className:t.logicOperatorContainer,rowContext:m,rowData:n}),o().createElement("div",{className:s()(b.rowItem,t.attributeSelectorContainer)},o().createElement(i,{attributeSelectorProps:d,rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,t.filterSelectorContainer)},o().createElement(a,{textFieldInputRef:p,rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,b.fullWidth,t.valuesEditorContainer)},o().createElement(c,{rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,t.actionsContainer,{[b.hidden]:!r})},o().createElement(u,{rowContext:m,rowData:r})))};v.propTypes={classes:i().shape({root:i().string,logicOperatorContainer:i().string,attributeSelectorContainer:i().string,filterSelectorContainer:i().string,valuesEditorContainer:i().string,actionsContainer:i().string}),rowData:x.Xw,previousRowData:x.Xw,LogicOperatorComponent:i().elementType,AttributeSelectorComponent:i().elementType,FilterSelectorComponent:i().elementType,ValuesEditorComponent:i().elementType,ActionsComponent:i().elementType,filterSelectorRef:i().object,attributeSelectorProps:i().shape({onRestoreFocus:i().func,onOpen:i().func,disablePopoverRestoreFocus:i().bool})};const O=(0,n.memo)(v)},41315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(50914),s=r(17349),c=r(94656);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:r,rowsData:n,lastRowAttributeSelectorProps:l,filterSelectorRef:i,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,n)=>{const d=t>0?(0,a.path)([t-1],n):null,m=t===n.length?{attributeSelectorProps:l}:{};return o().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:r,filterSelectorRef:t===c?i:void 0},p,m))};return o().createElement("div",{className:t},n.map(d),d(null,n.length,n))};p.propTypes={className:i().string,rowClasses:i().shape({root:i().string,logicOperatorContainer:i().string,attributeSelectorContainer:i().string,filterSelectorContainer:i().string,valuesEditorContainer:i().string,actionsContainer:i().string}),rowsData:i().arrayOf(c.Xw),LogicOperatorComponent:i().elementType,AttributeSelectorComponent:i().elementType,FilterSelectorComponent:i().elementType,ValuesEditorComponent:i().elementType,ActionsComponent:i().elementType,filterSelectorRef:i().object,filterSelectorRefIndex:i().number,lastRowAttributeSelectorProps:i().shape({onRestoreFocus:i().func,onOpen:i().func,disablePopoverRestoreFocus:i().bool})};const d=(0,n.memo)(p)},50905:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(54573),o=r(50914);const l={BY_LABEL:(0,n.c)({stringify:(0,o.prop)("label")})}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5400],{79821:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),l=r(52730),i=r(86051),a=r(88832),s=r(97991);const c=(0,r(79692).Z)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:r}=e;const n=c(),u=(0,l.useSelector)(i.ZP.selectors.getAbsoluteImagePath),p=(0,a.XH8)(r,{type:t.id}),d=(0,a.vPL)(u,p);return o().createElement(s.Z,{className:n.icon,icon:d,avatarText:t.title[0]})}},99757:(e,t,r)=>{r.d(t,{Z:()=>V});var n=r(24328),o=r.n(n),l=r(2507),i=r.n(l),a=r(71153),s=r.n(a),c=r(50914),u=r(97820),p=r(54763),d=r(45767),m=r(95613),b=r(22385),f=r(79692);const h=(0,f.Z)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),g=(0,c.either)((0,c.prop)("title"),(0,c.prop)("fieldName")),y=e=>{let{value:t,getLabel:r=g,onSelectAttributeClick:n,disabled:l=!1}=e;const a=h(),c=t&&r(t);return o().createElement("div",{onClick:l?void 0:n,className:s()(a.attribute,{[a.attributeWithValue]:!!c},{[a.disabled]:l})},o().createElement(m.Z,{value:c},o().createElement("div",{className:s()(a.name,{[a.disabled]:l})},c||o().createElement("span",{className:a.noSelect},i().text("Select attribute")))),o().createElement(b.Z,{size:"M",icon:d.Z,disabled:l}))};var x=r(88832);function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){v(e,t,r[t])}))}return e}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const O=(0,c.eqBy)((0,c.pick)(["fieldName","uri","entityTypeUri"])),C=(e,t)=>t&&!!t.find(O(e)),S=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),I=(e,t)=>S(e,t)||(e.children||[]).some((e=>I(e,t))),E=(e,t)=>e.findIndex(O(t)),k=(0,x.fW1)("title"),j=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const i=S(e,n);return[{item:n?w({},e,{filterText:n}):e,level:o,groupId:t,groupName:r}].concat(e.children?e.children.filter((e=>l||i||I(e,n))).flatMap((e=>j(e,t,r,n,o+1,l||i))):[]).flat()},P=(0,c.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>I(t,e))).map((r=>j(r,t.id,t.title,e)))}))).filter((e=>e.items.length))));var T=r(52730),N=r(94079),L=r(86051),R=r(7785),Z=r(44890),D=r(27239),A=r(79821);const F=(0,f.Z)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}function W(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){$(e,t,r[t])}))}return e}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const z=(0,n.memo)((e=>{let{selectedAttributes:t,onItemClick:r,focusIndex:n,hideCheckBox:l}=e,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const a=F(),s=(0,T.useSelector)(L.ZP.selectors.getMetadata);return o().createElement(Z.Z,B({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,i,a)=>{let{item:s,level:c,groupId:u,groupName:p}=i;const d=C(s,t),m=a===n;return o().createElement(R.Z,{key:`item-${u}-${s.fieldName}`,onClick:r,checked:d,data:W({},s,{groupName:p}),notSelectable:s.notSelectable,hideCheckBox:l,label:o().createElement(D.Z,{text:s.title,highlight:s.filterText}),labelInText:s.title,level:c,style:e,isFocused:m,groupId:u,LogoIcon:s.LogoIcon})},renderGroupTitle:(e,t)=>o().createElement(N.ListItem,{component:"div",className:a.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&o().createElement(A.Z,{group:t.item,metadata:s}),t.item.title),focusIndex:n},i))}));var M=r(56656);const H=(0,f.Z)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),V=(0,n.memo)((e=>{let{className:t,itemsGroups:r,value:l,getLabel:a,onSelect:d,onRestoreFocus:m=c.identity,onOpenPopup:b=c.identity,disableRestoreFocus:f=!1,disableEnforceFocus:h=!1,single:g=!1,ungroup:x=!1,disabled:v=!1,hideCheckBox:S=!1}=e;const I=H(),[j,T]=(0,n.useState)(null),N=(0,n.useCallback)((()=>T(null)),[]),L=!!j,[R,Z]=(0,n.useState)(""),D=(0,n.useCallback)((()=>Z("")),[]),[A,F]=(0,n.useState)([]),B=(0,n.useCallback)((()=>F([])),[]),W=(0,n.useMemo)((()=>P(R,r)),[r,R]),$=(0,n.useMemo)((()=>(0,c.pipe)((0,c.when)((0,c.always)(x),(0,c.chain)((0,c.pipe)((0,c.prop)("items"),c.flatten,(0,c.map)((0,c.pick)(["item","level"]))))),M.LG)(W)),[x,W]),V=(0,n.useMemo)((()=>Math.max(k(W),308)),[W]),G=(0,c.pipe)((0,c.tap)((0,c.pipe)(B,D,N)),m),U=(0,n.useRef)(),K=(0,n.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?A.length:E(A,e),selectedAttributes:A}),g?(F(t?[e]:[]),G({})):(F((e=>{let{attribute:t,selectedAttributes:r,checked:n}=e;return n?r.concat(t):r.filter((e=>!O(t,e)))})({selectedAttributes:A,attribute:e,checked:t})),U.current&&U.current.focus())}),[A,d,g,G,U]),X=(0,n.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:r}=e;return e=>{let{item:n,groupData:o}=e;const l=C(n,r);t(w({},n,{groupName:o.groupName}),!l)}})({onListItemClick:K,selectedAttributes:A}),[K,A]),{focusIndex:_,handleKeyDown:q}=(0,p.t)({items:$,open:L,onSelectFocusedItem:X,selectedItems:A,onClose:G});return o().createElement("div",{className:s()(I.selector,t),"data-reltio-id":"attribute-selector"},o().createElement(y,{value:l,getLabel:a,onSelectAttributeClick:e=>{b(),T(e.currentTarget)},disabled:v}),o().createElement(u.Z,{open:L,anchorEl:j,onClose:G,onSearch:Z,title:i().text("Select attribute"),containerWidth:V,containerHeight:507,searchInputOnKeyDown:q,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:U,disableRestoreFocus:f,disableEnforceFocus:h},o().createElement(z,{items:$,onItemClick:K,selectedAttributes:A,width:V,height:400,focusIndex:_,hideCheckBox:S})))}))},74566:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(73038),s=r(58241),c=r(71153),u=r.n(c);const p=(0,r(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:r,className:l}=e;const i=p(),{toggleRowCollapse:c,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,n.useContext)(a.x),b=d(r),f=m(t);return o().createElement(s.Z,{className:u()(l,{[i.hidden]:!b}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};d.propTypes={rowIndex:i().number,rowValue:i().object,className:i().string};const m=d},43290:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),o=r.n(n),l=r(71153),i=r.n(l),a=r(50914);const s=(0,r(79692).Z)((e=>({bar:{backgroundColor:e.palette.secondary.main,opacity:.12,position:"absolute",minHeight:"20px",minWidth:"5px",borderRadius:"2px",top:0,left:0,height:"100%"}}))),c=e=>(0,a.is)(Number,e),u=e=>{let{className:t,width:r=0,maxWidth:l}=e;const a=s(),u=(0,n.useCallback)((e=>(l?100*e/l:0)+"%"),[l]);return r?o().createElement("div",{className:i()(a.bar,t),style:{width:c(r)?u(r):r}}):null}},89119:(e,t,r)=>{r.d(t,{Z:()=>S});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(2507),s=r.n(a),c=r(71153),u=r.n(c),p=r(50914),d=r(88832),m=r(97820),b=r(7785),f=r(56656),h=r(44890),g=r(54763),y=r(27239);const x=(0,r(79692).Z)((()=>({popupContainer:{},container:{"&$popupContainer":{height:"408px",minWidth:"200px"}}})));function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w.apply(this,arguments)}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const C=e=>{let{open:t,anchorEl:r,data:l,onSearch:i,onClose:a,titleText:s,filterText:c,onListItemClick:O,selected:C,hideCheckBox:S,renderGroupTitle:I}=e,E=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["open","anchorEl","data","onSearch","onClose","titleText","filterText","onListItemClick","selected","hideCheckBox","renderGroupTitle"]);const k=(0,n.useCallback)((e=>e.label.toLowerCase().includes(c.toLowerCase())),[c]),j=(0,n.useCallback)((e=>k(e)||(e.children||[]).some(j)),[k]),P=(0,n.useMemo)((()=>{const e=(0,p.curry)(((e,r,n,o)=>[{item:v({},r,{filterText:c}),level:e,groupId:n,groupName:o},...t(r.children||[],n,o,e+1)])),t=function(t,r,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const l=t=>e(o,t,r,n),i=t.filter(j);return(I?p.map:p.chain)(l,i)};return t}),[c,I,j]),T=(0,n.useCallback)((e=>e.map((e=>({item:e,items:P(e.attributes,e.id,e.label)}))).filter((e=>e.items.length))),[P]),N=(0,n.useCallback)((e=>{let{item:t}=e;O(t,!C.find((e=>e.id===t.id||e.id.includes(`${t.id}.`))))}),[O,C]),L=(0,n.useMemo)((()=>(I?T:P)(l)),[l,I,T,P]),R=(0,n.useMemo)((()=>(0,f.LG)(L)),[L]),{focusIndex:Z,handleKeyDown:D}=(0,g.t)({items:R,open:t,onSelectFocusedItem:N,selectedItems:C}),A=(0,n.useRef)(null);A.current=Z;const F=(0,n.useCallback)(((e,t,r)=>{let{item:n,level:l=0}=t;const i=!!C.find((e=>e.id===n.id||e.id.includes(`${n.id}.`))),a=A.current===r;return o().createElement(b.Z,{key:n.id,onClick:O,checked:i,level:l,data:n,label:o().createElement(y.Z,{text:n.label,highlight:n.filterText}),labelInText:n.label,style:e,hideCheckBox:S,isFocused:a,notSelectable:n.notSelectable,LogoIcon:n.LogoIcon})}),[S,O,C]),B=(0,d.fW1)("label")(L)||308,W=x();return o().createElement(m.Z,w({open:t,className:u()(W.container,W.popupContainer),anchorEl:r,onClose:a,onSearch:i,title:s,containerWidth:B,searchInputOnKeyDown:D},E),o().createElement(h.Z,{height:300,renderItem:F,items:R,hideSubtitles:!0,getItemSize:()=>32,containerWidth:B,focusIndex:Z,renderGroupTitle:I}))};C.propTypes={open:i().bool,hideCheckBox:i().bool,anchorEl:i().any,selected:i().array,data:i().array,filterText:i().string,titleText:i().string,onClose:i().func,onListItemClick:i().func,onSearch:i().func,renderGroupTitle:i().func},C.defaultProps={data:[],selected:[],titleText:s().text("Show/hide columns"),filterText:""};const S=C},27652:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),o=r.n(n),l=r(4190),i=r(60364);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}const s=e=>{let{open:t=!0,children:r}=e,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["open","children"]);const[c,u]=(0,n.useState)(t),p=(0,i.Z)().transitions.duration.leavingScreen;return(0,n.useEffect)((()=>{if(t!==c){if(!t){const e=setTimeout((()=>{u(!1)}),p);return()=>clearTimeout(e)}u(!0)}}),[t,p,c]),o().createElement(l.ZP,a({open:t},s),c&&r)};s.displayName="Drawer";const c=s},59725:(e,t,r)=>{r.d(t,{Q:()=>c});var n=r(24328),o=r.n(n),l=r(2507),i=r.n(l),a=r(88832),s=r(42520);const c=(0,n.memo)((e=>{let{entityTypes:t,selectedEntityTypes:r,single:l,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d={},ListLabelProps:m={},disabled:b=!1}=e;const f=(0,n.useMemo)((()=>t.filter(a.oDv)),[t]);return o().createElement(s.S,{items:f,selectedItemsUris:r,single:l,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d,ListLabelProps:m,disabled:b,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},42520:(e,t,r)=>{r.d(t,{S:()=>T});var n=r(24328),o=r.n(n),l=r(71153),i=r.n(l),a=r(50914),s=r(88832),c=r(94079),u=r(83543),p=r(79692);const d=(0,p.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),m=(e,t)=>{const{childNodes:r,clientLeft:n,clientWidth:o}=t;if(r.length>0){const[t]=Array.from(r),l=document.createRange();l.setStart(t,0);for(let r=0;r<e.length;r++){l.setEnd(t,l.endOffset+e[r].length);const{width:i}=l.getBoundingClientRect();if(n+i>o)return r;r!==e.length-1&&l.setEnd(t,l.endOffset+", ".length)}}return-1},b=e=>e.join(", "),f=e=>`calc(${(0,a.isNil)(e)?"100%":`${e}px`} - 35px)`,h=e=>{let{list:t,maxWidth:r}=e;const l=d(),i=(0,n.useRef)(),[a,s]=(0,n.useState)(0);(0,n.useEffect)((()=>{s(((e,t)=>{const r=e.length,n=((e,t)=>{if(t){const r=m(e,t);return-1===r?0:e.length-r}return 0})(e,t);return r-Math.max(1,r-n)})(t,i.current))}),[t]);const u=b(t),p=a>0,h=p?b(t.slice(0,-a)):u;return o().createElement(c.Tooltip,{title:p?u:""},o().createElement("div",{className:l.listLabelContainer},o().createElement("div",{style:{width:f(r)},className:l.listLabel,ref:i},u),o().createElement("div",{className:l.visibleItemsLabel},h),p&&o().createElement("div",{className:l.hiddenCount},`+${a}`)))};var g=r(22385),y=r(97820),x=r(54763),w=r(7785),v=r(27239),O=r(44890);function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}const S=(0,a.always)(32),I=(0,n.memo)((e=>{let{selectedItems:t,onItemClick:r,focusIndex:n,width:l,height:i}=e,a=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return o().createElement(O.Z,C({getItemSize:S,renderItem:(e,l,i)=>{let{item:a}=l;const s=!!t.find((e=>a.uri===e)),c=i===n;return o().createElement(w.Z,{key:a.uri,onClick:r,checked:s,data:a,label:o().createElement(v.Z,{text:a.label,highlight:a.filterText}),labelInText:a.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:a.LogoIcon})},focusIndex:n,fixedTitle:!1,disableHorizontalScrollbar:!0,width:l,height:i},a))}));I.displayName="SelectMetadataTypesList";const E=(0,p.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k.apply(this,arguments)}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){P(e,t,r[t])}))}return e}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=(0,n.memo)((e=>{let{placeholder:t,classes:r={},items:l,selectedItemsUris:p,onChange:d,ListLabelProps:m={},disabled:b,enableEmptyValueUnderline:f,single:w,label:v,dataReltioId:O,selectionPopupTitle:C}=e;const S=E(),[P,T]=(0,n.useState)(!1),N=(0,n.useCallback)((()=>T(!0)),[]),L=(0,n.useCallback)((()=>T(!1)),[]),[R,Z]=(0,n.useState)(""),D=(0,n.useCallback)((()=>Z("")),[]),A=(0,n.useCallback)((0,a.pipe)(D,L),[L,D]),F=l.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,R)})).map(((e,t)=>({item:{item:j({},e,{filterText:R})},index:t}))),B=(0,n.useMemo)((()=>p.map((e=>l.find((0,a.propEq)("uri",e)))).map((0,a.prop)("label"))),[p,l]),W=(0,n.useCallback)(((e,t)=>{w?(d(t?[e.uri]:[]),A()):d(t?p.concat(e.uri):p.filter((t=>t!==e.uri)))}),[p,d,w,A]),$=(0,n.useCallback)((e=>{let{item:t}=e;const r=!p.includes(t.uri);W(t,r)}),[p,W]),{focusIndex:z,handleKeyDown:M}=(0,x.t)({items:F,open:P,onSelectFocusedItem:$,selectedItems:p,onClose:A}),H=(0,n.useRef)(),V=H.current?H.current.getBoundingClientRect().width:0,G=Math.max(V,255),U=0===p.length;return o().createElement(o().Fragment,null,o().createElement(c.TextField,{label:v,ref:H,InputProps:{startAdornment:U&&!t?null:o().createElement("div",{className:i()(S.inputText,r.inputText)},U?o().createElement("div",null,t):o().createElement(h,k({},m,{list:B}))),classes:{root:S.inputRoot,input:i()(S.input,r.input,{[S.emptyInput]:U&&!t}),disabled:i()(S.disabledInput,{[S.disabledPointer]:b}),underline:S.disabledUnderline},endAdornment:o().createElement(g.Z,{size:"L",icon:u.Z,iconClassName:i()(S.icon,{[S["popup-opened-icon"]]:P}),disabled:b}),readOnly:!0,disabled:!0,disableUnderline:U&&!f},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:i()(S.inputLabel,r.label)}},value:"",onClick:b?void 0:N,classes:{root:i()(S.root,r.root)},margin:"dense",variant:"filled",disabled:b,"data-reltio-id":O}),o().createElement(y.Z,{open:P,anchorEl:H.current,onClose:A,onSearch:Z,title:C,containerWidth:G,containerHeight:355,searchInputOnKeyDown:M,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${O}-popup`}},o().createElement(I,{items:F,onItemClick:W,selectedItems:p,width:G,height:245,focusIndex:z})))}));T.displayName="MetadataTypesSelector"},17349:(e,t,r)=>{r.d(t,{Z:()=>O});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(71153),s=r.n(a),c=r(2507),u=r.n(c),p=r(6782),d=r(79692);const m="46px",b=(0,d.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:m},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:m}}))),f=e=>{let{className:t,rowData:r}=e;const n=b();return o().createElement("div",{className:s()(n.readOnlyLogicOperatorContainer,t)},r&&r.operator?(0,p.Z)(r.operator):u().text("Where"))};f.propTypes={className:i().string,rowData:i().object};const h=f;var g=r(88832);const y=e=>{let{className:t,rowData:r}=e;const n=b();return o().createElement("div",{className:s()(n.readOnlyFilter,t)},r&&r.filter?(0,g.XS2)(r.filter):u().text("equals"))};var x=r(94656);const w=(0,d.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));const v=e=>{let{classes:t={},rowData:r,previousRowData:n,LogicOperatorComponent:l=h,AttributeSelectorComponent:i,FilterSelectorComponent:a=y,ValuesEditorComponent:c,ActionsComponent:u,filterSelectorRef:p,attributeSelectorProps:d={}}=e,m=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const b=w();return o().createElement("div",{className:s()(b.row,t.root),"data-reltio-id":"query-builder-row"},o().createElement(l,{className:t.logicOperatorContainer,rowContext:m,rowData:n}),o().createElement("div",{className:s()(b.rowItem,t.attributeSelectorContainer)},o().createElement(i,{attributeSelectorProps:d,rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,t.filterSelectorContainer)},o().createElement(a,{textFieldInputRef:p,rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,b.fullWidth,t.valuesEditorContainer)},o().createElement(c,{rowContext:m,rowData:r})),o().createElement("div",{className:s()(b.rowItem,t.actionsContainer,{[b.hidden]:!r})},o().createElement(u,{rowContext:m,rowData:r})))};v.propTypes={classes:i().shape({root:i().string,logicOperatorContainer:i().string,attributeSelectorContainer:i().string,filterSelectorContainer:i().string,valuesEditorContainer:i().string,actionsContainer:i().string}),rowData:x.Xw,previousRowData:x.Xw,LogicOperatorComponent:i().elementType,AttributeSelectorComponent:i().elementType,FilterSelectorComponent:i().elementType,ValuesEditorComponent:i().elementType,ActionsComponent:i().elementType,filterSelectorRef:i().object,attributeSelectorProps:i().shape({onRestoreFocus:i().func,onOpen:i().func,disablePopoverRestoreFocus:i().bool})};const O=(0,n.memo)(v)},41315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),o=r.n(n),l=r(13980),i=r.n(l),a=r(50914),s=r(17349),c=r(94656);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:r,rowsData:n,lastRowAttributeSelectorProps:l,filterSelectorRef:i,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,n)=>{const d=t>0?(0,a.path)([t-1],n):null,m=t===n.length?{attributeSelectorProps:l}:{};return o().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:r,filterSelectorRef:t===c?i:void 0},p,m))};return o().createElement("div",{className:t},n.map(d),d(null,n.length,n))};p.propTypes={className:i().string,rowClasses:i().shape({root:i().string,logicOperatorContainer:i().string,attributeSelectorContainer:i().string,filterSelectorContainer:i().string,valuesEditorContainer:i().string,actionsContainer:i().string}),rowsData:i().arrayOf(c.Xw),LogicOperatorComponent:i().elementType,AttributeSelectorComponent:i().elementType,FilterSelectorComponent:i().elementType,ValuesEditorComponent:i().elementType,ActionsComponent:i().elementType,filterSelectorRef:i().object,filterSelectorRefIndex:i().number,lastRowAttributeSelectorProps:i().shape({onRestoreFocus:i().func,onOpen:i().func,disablePopoverRestoreFocus:i().bool})};const d=(0,n.memo)(p)},50905:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(54573),o=r(50914);const l={BY_LABEL:(0,n.c)({stringify:(0,o.prop)("label")})}}}]);
2
2
  //# sourceMappingURL=5400.js.map
package/5605.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5605],{30739:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(50166),o=n(44443),i=n(81559);const c=(0,n(79692).Z)({item:{overflow:"hidden"}});function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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}const m=(0,a.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:m,children:u,itemKey:d,showNotMeasuredItems:E,listRef:h}=e;const f=c(),g=(0,a.useRef)({}),[v,y]=(0,a.useState)({}),b=(0,a.useCallback)((0,i.DsO)((()=>{y(s({},g.current))})),[]),T=(0,a.useCallback)(((e,t)=>d?d(t,e):t),[d]),I=(0,a.useRef)(),x=h||I;x.current&&x.current.resetAfterIndex(0,!1);const O=(0,a.useMemo)((()=>e=>{let{data:t,index:n,style:a}=e;const l=T(t,n);return r().createElement("div",{style:a,className:f.item},r().createElement("div",{style:E?void 0:{visibility:l in v?void 0:"hidden"}},r().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[l]!==t&&(((e,t)=>{g.current=s({},g.current,{[e]:t})})(l,t),b())}}),u({data:t,index:n})))}),[u,E,T,b,!E&&v]);return r().createElement(l.VariableSizeList,{ref:x,width:t,height:n,itemCount:m.length,itemData:m,itemSize:e=>v[(e=>T(m,e))(e)]||p,itemKey:d},O)}))},4094:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l);const i=(0,n(79692).Z)({"basic-view-content":{flex:"1 1 auto",padding:"0 24px 24px","&:first-child":{paddingTop:"24px"}}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}const s=e=>{let{children:t,className:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=i();return r().createElement("div",c({className:o()(l["basic-view-content"],n)},a),t)}},88234:(e,t,n)=>{n.d(t,{Z:()=>Ve});var a=n(94079),r=n(24328),l=n.n(r),o=n(58662),i=n(2507),c=n.n(i),s=n(30739),p=n(50914),m=n(95038),u=n.n(m);const d=(0,p.pipe)((0,p.groupBy)((e=>{let{timestamp:t}=e;return u()(t).startOf("day")})),p.toPairs,(0,p.map)((e=>{let[t,n]=e;return{timestamp:u()(t).valueOf(),collapsed:!1,children:n}}))),E=(0,p.addIndex)(p.chain)(((e,t)=>{let{children:n,collapsed:a,timestamp:r}=e;const l={collapsed:a,timestamp:r,index:t};return a?[l]:[l,...n]})),h=(0,p.has)("collapsed"),f=(e,t)=>{const n=t[e];return"uri"in n?n.uri:`${n.index}`};var g=n(34606),v=n(51229),y=n(58241),b=n(81559),T=n(79692);const I=(0,T.Z)({groupItem:{display:"flex",height:"40px",alignItems:"center",paddingTop:"10px",boxSizing:"border-box"},groupIcon:{marginLeft:"-5px",marginRight:"22px",width:"10px",height:"10px",background:"white",border:"2px solid #D8D8D8",borderRadius:"50%",boxSizing:"border-box",flexShrink:0},groupTitle:{fontWeight:500}}),x=e=>{let{item:{index:t,timestamp:n,collapsed:r},onToggle:o}=e;const i=I();return l().createElement("div",{className:i.groupItem},l().createElement("div",{className:i.groupIcon}),l().createElement(a.Typography,{className:i.groupTitle,variant:"subtitle1"},(0,b.zkt)(n)?c().text("Today"):c().date(n,"LL")),l().createElement(v.Z,null),l().createElement(y.Z,{isOpen:!r,onClick:()=>o(t)}))};var O=n(31537);const N=(0,T.Z)((e=>({activityTitle:{display:"block",fontWeight:500,fontSize:13,lineHeight:"15px",color:e.palette.text.primary,marginBottom:8,marginRight:70},activityType:{flexShrink:0,marginRight:8,whiteSpace:"nowrap"}}))),w=e=>{let{type:t,children:n}=e;const a=N();return l().createElement("span",{className:a.activityTitle},l().createElement("span",{className:a.activityType},(0,g.Xr)(t)),n)},C=e=>{let{type:t}=e;return l().createElement(w,{type:t})};var S=n(52730),R=n(86051);const D=(0,T.Z)((e=>({link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400,cursor:"pointer"},objectLabel:{color:e.palette.text.secondary,lineHeight:"15px",fontWeight:400},relationUri:{color:e.palette.text.primary,fontWeight:400}}))),P=e=>{var t,n;let{data:a,type:r}=e;const o=D(),i=(0,S.useSelector)(R.ZP.selectors.getMetadata),c=(0,b.T6O)(i,null===(t=a.items)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.objectType);return l().createElement(w,{type:r},l().createElement("span",{className:o.objectLabel},(0,b.idV)(c)))},_=3,A=(0,r.createContext)(null),L=e=>{let{children:t}=e;const[n,a]=(0,r.useState)([]);return l().createElement(A.Provider,{value:{expandedItems:n,addExpandedItems:e=>{n.includes(e)||a((t=>[...t,e]))}}},t)},M=e=>{let{itemsId:t,items:n=[],limit:a=_}=e;const{expandedItems:l,addExpandedItems:o}=(0,r.useContext)(A),i=(0,r.useCallback)((()=>o(t)),[t]),c=l.includes(t),s=n.slice(0,c?n.length:a);return{onExpand:i,itemsToShow:s,collapsedItemsCount:n.length-s.length}};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H.apply(this,arguments)}const U=e=>{let{itemsCount:t,itemsLabel:n}=e,r=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["itemsCount","itemsLabel"]);return l().createElement(a.Link,H({component:"button",variant:"caption"},r,{underline:"none"}),l().createElement("span",null,c().text("${itemsCount} more",{itemsCount:t})," ",n))},j=e=>{let{RecordComponent:t,items:n,activityUri:a}=e;const{onExpand:r,itemsToShow:o,collapsedItemsCount:i}=M({itemsId:a,items:n});return l().createElement(l().Fragment,null,o.map((e=>l().createElement(t,{key:e.id,item:e}))),i?l().createElement(U,{itemsCount:i,itemsLabel:1===i?c().text("record"):c().text("records"),onClick:r}):null)};var k=n(71153),Z=n.n(k),z=n(31039);const G=(0,T.Z)((e=>({link:{fontSize:13,lineHeight:"15px",color:e.palette.primary.main,textDecoration:"none",fontWeight:400,"&.removed":{pointerEvents:"none",color:e.palette.text.secondary}}}))),V=e=>{let{item:t}=e;const n=G(),{objectLabel:a,objectUri:r,data:o}=t,i=(null==o?void 0:o.type)===O.I.ENTITY_REMOVED;return l().createElement(z.Z,{className:Z()(n.link,{removed:i}),value:r},(0,b.idV)(a))},W=(0,T.Z)((e=>({field:{fontSize:12,lineHeight:"20px",color:e.palette.text.primary,marginTop:4,display:"block"},fieldName:{color:e.palette.text.secondary,marginRight:8},link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400}}))),B=(0,T.Z)((e=>({arrow:{margin:"0 8px",fontSize:12,color:e.palette.text.primary},chip:{height:20,width:53,fontSize:10,fontWeight:500,lineHeight:"16px",marginLeft:9,flexShrink:0,textTransform:"capitalize","& span":{padding:0},"&.edited":{color:"#6973C2",borderColor:"#6973C2"},"&.added":{color:"#75C378",borderColor:"#75C378"},"&.deleted":{color:"#F97061",borderColor:"#F97061"}},expandLabel:{fontSize:12},andLabel:{color:e.palette.text.secondary}}))),F=e=>{let{item:{id:t,data:n}}=e;const a=W(),r=B(),o=(null==n?void 0:n.potentialMatches)||(null==n?void 0:n.newUri),{onExpand:i,collapsedItemsCount:s,itemsToShow:p}=M({itemsId:t,items:o.split(",")}),m=null==n?void 0:n.type;return l().createElement("div",{className:a.field},l().createElement("span",{className:a.fieldName},(e=>({[O.I.POTENTIAL_MATCHES_FOUND]:c().text("Matches found"),[O.I.POTENTIAL_MATCHES_REMOVED]:c().text("Matches removed"),[O.I.NOT_MATCHES_SET]:c().text("Were set"),[O.I.NOT_MATCHES_RESET]:c().text("Were reset"),[O.I.ENTITIES_MERGED_MANUALLY]:c().text("Merged with"),[O.I.ENTITIES_MERGED]:c().text("Merged automatically with"),[O.I.ENTITIES_SPLITTED]:c().text("Un-merged with")}[e]||""))(m),":"),p.map(((e,t)=>l().createElement(z.Z,{key:t,value:e,className:a.link},(0,b.idV)(n[e])))).reduce(((e,t)=>[e,", ",t])),s?l().createElement(l().Fragment,null,l().createElement("span",{className:r.andLabel}," ",c().text("and")," "),l().createElement(U,{itemsCount:s,itemsLabel:1===s?c().text("match"):c().text("matches"),onClick:i,className:r.expandLabel})):null)},K=(0,T.Z)((e=>({record:{background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",boxSizing:"border-box",borderRadius:"3px",padding:"7px 14px",marginBottom:8,position:"relative","&:hover $restoreIcon":{visibility:"visible"}},label:{color:e.palette.text.primary,fontSize:12,lineHeight:"16px"},description:{marginRight:8,flexShrink:0},restoreIcon:{visibility:"hidden",color:e.palette.text.secondary,position:"absolute",right:4,top:3,cursor:"pointer"},moreLabel:{marginTop:4}}))),Y=e=>{let{item:t}=e;const n=K(),{potentialMatches:a,newUri:r}=t.data;return a||r?l().createElement("div",{className:n.record},l().createElement("span",{className:n.label},l().createElement(V,{item:t})),l().createElement(F,{item:t})):null},$=e=>{let{type:t,data:n}=e;const{itemsTotal:a,items:r,uri:o}=n,i=1===a&&!(r[0].data.potentialMatches||r[0].data.newUri);return l().createElement("div",null,l().createElement(w,{type:t},i&&l().createElement(V,{item:r[0]})),!i&&l().createElement(j,{activityUri:o,items:r,RecordComponent:Y}))},q=e=>{let{type:t,data:n}=e;return l().createElement("div",null,l().createElement(w,{type:t}),l().createElement(j,{activityUri:n.uri,items:n.items,RecordComponent:Y}))};var X=n(42668),J=n(27597),Q=n(99601);const ee=e=>{var t,n;let{delta:r}=e;const o=B(),i=W(),c=(0,S.useSelector)(R.ZP.selectors.getMetadata),s=(0,S.useSelector)(R.ZP.selectors.getAttributePresentations),p=(0,b.zeJ)(c,r.attributeType),m=null===(t=r.newValue)||void 0===t?void 0:t.value,u=null===(n=r.oldValue)||void 0===n?void 0:n.value,d=u||m,E=Q.w[r.type],h=e=>(0,g._V)(e,r.attributeType,c,s);return l().createElement("div",{className:i.field},l().createElement("span",{className:i.fieldName},(null==p?void 0:p.label)||(null==p?void 0:p.name),":"),l().createElement("span",null,d&&h(d),m&&u&&l().createElement(l().Fragment,null,l().createElement(J.Z,{className:o.arrow}),h(m))),E&&l().createElement(a.Chip,{variant:"outlined",label:E,className:Z()(o.chip,E)}))},te=e=>{let{updates:t,recordId:n}=e;const a=K(),{onExpand:r,collapsedItemsCount:o,itemsToShow:i}=M({itemsId:n,items:t});return l().createElement(l().Fragment,null,i.map(((e,t)=>l().createElement(ee,{key:t,delta:e}))),o?l().createElement(U,{itemsCount:o,itemsLabel:1===o?c().text("update"):c().text("updates"),onClick:r,className:a.moreLabel}):null)},ne=e=>{var t;let{item:n}=e;const r=K(),o=(0,S.useDispatch)(),i=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta,s=(0,p.path)(["data","type"])(n)===O.I.ENTITY_CHANGED;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!i&&l().createElement("span",{className:r.description},c().text("Profile changed")),l().createElement(V,{item:n})),s&&l().createElement(X.Z,{className:r.restoreIcon,onClick:()=>{(0,b.fAQ)(n.objectUri,n.timestamp).then((e=>{if(-1!==e){const t={aStamp:n.timestamp,bStamp:e};o(R.ui.actions.openHistoryEvent({entityUri:n.objectUri,historyEvent:t}))}})).catch((e=>console.error(e)))}}),l().createElement(te,{updates:i,recordId:n.id}))},ae=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(V,{item:a.items[0]})),!r&&l().createElement(j,{activityUri:a.uri,items:a.items,RecordComponent:ne}))},re=(0,T.Z)((e=>({relationship:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,overflow:"hidden"},link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400},delimiter:{margin:"0 8px"}}))),le=e=>{let{item:t}=e;const n=re(),{startObjectLabel:a,startObjectUri:r,endObjectLabel:o,endObjectUri:i}=t;return l().createElement("span",{className:n.relationship},l().createElement(z.Z,{className:n.link,value:r},(0,b.idV)(a)),l().createElement("span",{className:n.delimiter},c().text("to")),l().createElement(z.Z,{className:n.link,value:i},(0,b.idV)(o)))},oe=e=>{var t;let{item:n}=e;const r=K(),o=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!o&&l().createElement("span",{className:r.description},c().text("Relationship updated")),l().createElement(le,{item:n})),l().createElement(te,{updates:o,recordId:n.id}))},ie=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(le,{item:a.items[0]})),!r&&l().createElement(j,{activityUri:a.uri,items:a.items,RecordComponent:oe}))};var ce=n(31276),se=n(41188);const pe=e=>{let{data:t,type:n}=e;const a=D(),o=(0,S.useDispatch)(),i=(0,r.useMemo)((()=>{const e=(0,ce.Rx)(t.description);return"2.0"===e.version?e.activity.uiState:e}),[t.description]),s=(0,p.pipe)((0,p.always)(i),R.ui.actions.openSearch,o),m=(0,se.v)(i);return l().createElement(w,{type:n},l().createElement("span",{className:a.link,onClick:s},m||c().text("all profiles")))},me=e=>{let{type:t,data:n}=e;const a=D(),r=(0,ce.Rx)(n.description),o=n.itemsTotal;return l().createElement(w,{type:t},r&&l().createElement(z.Z,{className:a.link,value:r.uri},(0,b.idV)(r.label)),o>1&&l().createElement("span",{className:a.objectLabel},c().text("(${itemsTotal} records)",{itemsTotal:o})))},ue=e=>{let{type:t,data:n}=e;const a=D(),r=(0,ce.Rx)(n.description),o=n.itemsTotal,i=n.items[0].objectUri;return l().createElement(w,{type:t},l().createElement(l().Fragment,null,(0,b.bC9)(i)?l().createElement("span",{className:a.relationUri},i):l().createElement(V,{item:n.items[0]}),r&&l().createElement("div",{className:a.objectLabel},r.label)),o>1&&l().createElement("div",{className:a.objectLabel},c().text("(${itemsTotal} records)",{itemsTotal:o})))};function de(){return de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},de.apply(this,arguments)}const Ee=e=>l().createElement("svg",de({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M17.4 13.08h-4.32v4.32h-2.16v-4.32H6.6v-2.16h4.32V6.6h2.16v4.32h4.32v2.16z",fill:"#fff"}));var he=n(12147);function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fe.apply(this,arguments)}const ge=e=>l().createElement("svg",fe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16.35 6h-8.7C6.74 6 6 6.804 6 7.793v5.788c0 .986.737 1.79 1.644 1.793V18l3.472-2.626h5.234c.91 0 1.65-.805 1.65-1.793V7.793C18 6.804 17.26 6 16.35 6zm-1.562 6.726H9.212v-.765h5.576v.765zm0-1.63H9.212v-.765h5.576v.764zm0-1.631H9.212V8.7h5.576v.764z",fill:"#fff"}));function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}const ye=e=>l().createElement("svg",ve({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6 15.15v2.25h2.25l6.636-6.636-2.25-2.25L6.6 15.15zm10.626-6.126a.598.598 0 000-.846l-1.404-1.404a.598.598 0 00-.846 0l-1.098 1.098 2.25 2.25 1.098-1.098z",fill:"#fff"}));function be(){return be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},be.apply(this,arguments)}const Te=e=>l().createElement("svg",be({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M15.6 6H9c-.662 0-1.2.539-1.2 1.2V9H9V7.2h6.6v9.6H9V15H7.8v1.8c0 .662.538 1.2 1.2 1.2h6.6c.662 0 1.2-.538 1.2-1.2V7.2c0-.661-.538-1.2-1.2-1.2z",fill:"#fff"}),l().createElement("path",{d:"M10.975 13.976l.85.848 2.823-2.83-2.824-2.819-.848.85 1.378 1.375H7.2v1.2h5.15l-1.375 1.376z",fill:"#fff"}));function Ie(){return Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ie.apply(this,arguments)}const xe=e=>l().createElement("svg",Ie({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M7.4 6H14c.662 0 1.2.539 1.2 1.2V9H14V7.2H7.4v9.6H14V15h1.2v1.8c0 .662-.538 1.2-1.2 1.2H7.4c-.662 0-1.2-.538-1.2-1.2V7.2c0-.661.538-1.2 1.2-1.2z"}),l().createElement("path",{d:"M15.127 13.976l.85.848 2.823-2.83-2.824-2.819-.849.85 1.379 1.375h-5.154v1.2H16.5l-1.374 1.376z"}));function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Oe.apply(this,arguments)}const Ne=e=>l().createElement("svg",Oe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.764 11.152V9.659l2.334 2.217-2.334 2.217v-1.444H13.12c-1.023 0-1.333.314-1.918 1.632-.797 1.796-1.514 2.52-3.3 2.52h-1.69v-1.495h1.69c1.036 0 1.35-.319 1.937-1.639.348-.784.68-1.363 1.09-1.766-.41-.403-.742-.982-1.09-1.766-.586-1.32-.901-1.64-1.938-1.64H6.213V7H7.9c1.787 0 2.504.725 3.301 2.52.585 1.318.895 1.633 1.918 1.633h2.644z",fill:"#fff"}));function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},we.apply(this,arguments)}const Ce=e=>l().createElement("svg",we({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 15.6V7.2H8.4V6h8.4c.66 0 1.2.54 1.2 1.2v8.4h-1.2zM7.2 18c-.66 0-1.2-.54-1.2-1.2V9.6c0-.66.54-1.2 1.2-1.2h7.2c.66 0 1.2.54 1.2 1.2v7.2c0 .66-.54 1.2-1.2 1.2H7.2zm4.937-2.8l.663-.663-1.337-1.337 1.337-1.337-.663-.663-1.337 1.337L9.463 11.2l-.663.663 1.337 1.337L8.8 14.537l.663.663 1.337-1.337 1.337 1.337z",fill:"#fff"}));function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Se.apply(this,arguments)}const Re=e=>l().createElement("svg",Se({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 7.2v8.4H18V7.2c0-.66-.54-1.2-1.2-1.2H8.4v1.2h8.4zM6 16.8c0 .66.54 1.2 1.2 1.2h7.2c.66 0 1.2-.54 1.2-1.2V9.6c0-.66-.54-1.2-1.2-1.2H7.2c-.66 0-1.2.54-1.2 1.2v7.2z",fill:"#fff"}));function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const Pe=e=>l().createElement("svg",De({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M11.727 5c1.66 0 3 1.376 3 3.08 0 1.704-1.34 3.08-3 3.08s-3-1.376-3-3.08c0-1.704 1.34-3.08 3-3.08zM12 19c-2.5 0-4.71-1.365-6-3.435.03-2.122 4-3.285 6-3.285 1.99 0 5.97 1.163 6 3.285C16.71 17.635 14.5 19 12 19z",fill:"#fff"}));function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_e.apply(this,arguments)}const Ae=e=>l().createElement("svg",_e({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.125 7.583h2.042V8.75H8V7.583h2.042L10.625 7h2.917l.583.583zM9.75 17.5a1.17 1.17 0 01-1.167-1.167v-7h7v7a1.17 1.17 0 01-1.166 1.167H9.75z",fill:"#fff"}));function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Me=e=>l().createElement("svg",Le({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.432 13.358h-.568l-.197-.196a4.627 4.627 0 001.121-3.023 4.65 4.65 0 10-4.649 4.65 4.628 4.628 0 003.022-1.12l.198.195v.567L16.933 18 18 16.934l-3.568-3.576zm-4.293 0a3.218 3.218 0 11.152-.004l-.152.004z",fill:"#fff"}));function He(){return He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},He.apply(this,arguments)}const Ue=e=>l().createElement("svg",He({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.134 7.718L17.8 5.5V7h-1.604c-1.786 0-2.503.725-3.3 2.52-.585 1.318-.895 1.633-1.918 1.633H8.301v1.495h2.677c1.023 0 1.333.314 1.918 1.632.797 1.796 1.514 2.52 3.3 2.52h1.69v-1.495h-1.69c-1.036 0-1.35-.319-1.937-1.639-.348-.784-.68-1.363-1.09-1.766.41-.403.742-.982 1.09-1.766.586-1.32.901-1.639 1.938-1.639H17.8v1.44l2.334-2.217z",fill:"#fff"}));class je{}je.getComponent=e=>{let{type:t,data:n}=e;switch(t){case O.I.COMMENT_ADDED:case O.I.COMMENT_DELETED:case O.I.COMMENT_UPDATED:return l().createElement(C,{data:n,type:t});case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITIES_SPLITTED:case O.I.ENTITY_LOST_MERGE:return l().createElement($,{data:n,type:t});case O.I.POTENTIAL_MATCHES_FOUND:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.NOT_MATCHES_SET:case O.I.NOT_MATCHES_RESET:return l().createElement(q,{data:n,type:t});case O.I.ENTITY_CHANGED:case O.I.ENTITY_CREATED:case O.I.ENTITY_REMOVED:case O.I.ANALYTICS_ATTRIBUTES_CHANGED:return l().createElement(ae,{data:n,type:t});case O.I.RELATIONSHIP_CHANGED:case O.I.RELATIONSHIP_CREATED:case O.I.RELATIONSHIP_REMOVED:return l().createElement(ie,{data:n,type:t});case O.I.USER_SEARCH:return l().createElement(pe,{data:n,type:t});case O.I.GROUP_CHANGED:case O.I.GROUP_CREATED:case O.I.GROUP_REMOVED:return l().createElement(P,{data:n,type:t});case O.I.USER_LOGIN:case O.I.USER_LOGOUT:case O.I.MODEL_UPDATED:case O.I.PERIODIC_TASK_SCHEDULED:case O.I.USER_PROFILE_VIEW:return l().createElement(me,{data:n,type:t});case O.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:return l().createElement(ue,{data:n,type:t});default:return l().createElement("div",null,t," NOT IMPLEMENTED")}},je.getIcon=e=>{switch(e){case O.I.USER_LOGIN:return l().createElement(Te,null);case O.I.USER_LOGOUT:return l().createElement(xe,null);case O.I.USER_PROFILE_VIEW:return l().createElement(Pe,null);case O.I.PERIODIC_TASK_SCHEDULED:return l().createElement(he.Z,null);case O.I.ENTITIES_SPLITTED:return l().createElement(Ue,null);case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITY_LOST_MERGE:return l().createElement(Ne,null);case O.I.ENTITY_CREATED:case O.I.RELATIONSHIP_CREATED:case O.I.GROUP_CREATED:return l().createElement(Ee,null);case O.I.ENTITY_REMOVED:case O.I.RELATIONSHIP_REMOVED:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.GROUP_REMOVED:return l().createElement(Ae,null);case O.I.USER_SEARCH:return l().createElement(Me,null);case O.I.POTENTIAL_MATCHES_FOUND:return l().createElement(Re,null);case O.I.NOT_MATCHES_RESET:case O.I.NOT_MATCHES_SET:return l().createElement(Ce,null);case O.I.COMMENT_ADDED:case O.I.COMMENT_UPDATED:case O.I.COMMENT_DELETED:return l().createElement(ge,null);case O.I.ENTITY_CHANGED:case O.I.MODEL_UPDATED:case O.I.RELATIONSHIP_CHANGED:case O.I.GROUP_CHANGED:default:return l().createElement(ye,null)}};const ke=je,Ze=(0,T.Z)((e=>({activityItem:{display:"flex",minHeight:"40px",padding:"10px 0 5px 0",boxSizing:"border-box"},activityIcon:{marginLeft:"-13px",marginRight:"15px",width:"24px",height:"24px",background:e.palette.primary.main,borderRadius:"50%",border:"1px solid white",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{fill:"white",fontSize:"14px"}},activityInfo:{flex:1,overflow:"hidden",position:"relative"},activityUser:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},activityEvent:{marginTop:"5px"},date:{position:"absolute",right:0,marginTop:"5px",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,marginLeft:"auto",flexShrink:0,paddingLeft:8}}))),ze=e=>{let{item:t}=e;const n=Ze(),r=(0,g.te)(t),o=(0,g.rx)(t);return l().createElement("div",{className:n.activityItem},l().createElement("div",{className:n.activityIcon},ke.getIcon(r)),l().createElement("div",{className:n.activityInfo},l().createElement(a.Typography,{className:n.activityUser},t.user),l().createElement("span",{className:n.date},c().date(t.timestamp,"LT")),o.map(((e,t)=>l().createElement("div",{key:t,className:n.activityEvent},ke.getComponent({type:(0,g.te)(e),data:e}))))))},Ge=(0,T.Z)({rowDivider:{marginLeft:"28px"},listRow:{paddingLeft:"12px","&::before":{content:'""',width:"2px",position:"absolute",height:"100%",top:0,left:"11px",backgroundColor:"#D8D8D8",zIndex:"-1"},overflow:"hidden"},firstRow:{"&$listRow::before":{height:"calc(100% - 20px)",top:"20px"}},lastRow:{"&$listRow::before":{height:"20px"}},singleRow:{"&$listRow::before":{display:"none"}}}),Ve=e=>{let{width:t,height:n,activities:i,count:m,page:u,onChangePage:v,rowsPerPage:y,onChangeRowsPerPage:b,rowsPerPageOptions:T}=e;const I=Ge(),[O,N]=(0,r.useState)([]),w=e=>{N((0,p.adjust)(e,(0,p.evolve)({collapsed:p.not})))};(0,r.useEffect)((()=>{(0,p.pipe)((0,p.map)(g.Io),(0,p.filter)((e=>{let{itemsTotal:t}=e;return 0!==t})),d,N)(i)}),[i]);const C=(0,r.useMemo)((()=>E(O)),[O]),S=(0,r.useCallback)((e=>{let{data:t,index:n}=e;const r=t[n];return l().createElement("div",{className:Z()(I.listRow,{[I.singleRow]:1===t.length,[I.firstRow]:0===n,[I.lastRow]:n===t.length-1})},h(r)?l().createElement(x,{item:r,onToggle:w}):l().createElement(l().Fragment,null,l().createElement(ze,{item:r}),l().createElement(a.Divider,{className:I.rowDivider,light:!0,variant:"inset"})))}),[]);return l().createElement(l().Fragment,null,l().createElement(L,null,l().createElement(s.Z,{width:t,height:n-60,data:C,defaultItemSize:40,itemKey:f},S)),l().createElement(o.Z,{count:m,onChangePage:v,page:u,rowsPerPage:y,onChangeRowsPerPage:b,rowsPerPageOptions:T,labelRowsPerPage:c().text("Events per page:")}))}},46188:(e,t,n)=>{n.d(t,{Z:()=>te});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(52730),c=n(86051),s=n(94079),p=n(28113),m=n(8818),u=n(585),d=n(55847),E=n(81559),h=n(56764),f=n(79692);const g=(0,f.Z)((e=>({snackbar:{maxWidth:500},icon:{margin:"4px"},exportButton:{color:e.palette.primary.main}}))),v=e=>{let{filters:t,exportTypes:n=[]}=e;const l=g(),f=(0,i.useDispatch)(),[v,y]=(0,a.useState)(!1),b=(0,i.useSelector)(c.ZP.selectors.getExportPath),T=(0,i.useSelector)(c.ZP.selectors.getTenant),I=(0,a.useCallback)((e=>{const n={filter:(0,h.U)(t),fileFormat:e};(0,E.CrF)({exportPath:b,tenant:T,options:n}).then((()=>y(!0))).catch(x)}),[t,T,b]),x=e=>{console.error(e),u.Z.addError({title:o().text("Error"),message:(0,E.xU7)(e,o().text("Can't export activities"))})},O=(0,a.useCallback)((()=>{f(c.ui.actions.openConsoleApp("Export"))}),[f]),N=(0,a.useMemo)((()=>n.map((e=>({text:e.toUpperCase(),onClick:()=>I(e)})))),[n,I]);return r().createElement(r().Fragment,null,N.length?r().createElement(d.Z,{buttonComponent:m.k,buttonProps:{icon:p.Z,tooltipTitle:o().text("Export"),size:"L",className:l.icon},menuItems:N,menuId:"export-menu"}):r().createElement(m.k,{icon:p.Z,size:"L",onClick:()=>I(),tooltipTitle:o().text("Export"),className:l.icon}),r().createElement(s.Portal,{container:document.body},r().createElement(s.Snackbar,{open:v,autoHideDuration:5e3,className:l.snackbar,onClose:()=>y(!1),message:o().text("Export operation is currently in progress. You will receive an email notification once completed. Go to Export Application to view the status."),action:r().createElement(s.Button,{className:l.exportButton,onClick:O},o().text("Export application"))})))};var y=n(71153),b=n.n(y),T=n(50914),I=n(36444),x=n(31537);const O=[x.I.ENTITY_CREATED,x.I.ENTITY_CHANGED,x.I.ENTITIES_MERGED,x.I.ENTITIES_SPLITTED,x.I.ENTITY_LOST_MERGE,x.I.RELATIONSHIP_CREATED,x.I.RELATIONSHIP_REMOVED,x.I.RELATIONSHIP_CHANGED,x.I.POTENTIAL_MATCHES_FOUND,x.I.POTENTIAL_MATCHES_REMOVED,x.I.NOT_MATCHES_SET,x.I.NOT_MATCHES_RESET,x.I.ENTITIES_MERGED_MANUALLY,x.I.ENTITIES_MERGED_ON_THE_FLY],N=[x.I.GROUP_CREATED,x.I.GROUP_REMOVED,x.I.GROUP_CHANGED],w=(e,t)=>t?O:(0,T.pipe)(Object.keys,(0,T.filter)((t=>(0,T.has)("groupTypes",e)&&!(0,T.isEmpty)(e.groupTypes)||!(0,T.includes)(t,N))))(x.I);var C=n(92575),S=n(96808),R=n(34606);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 P={input:e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){D(e,t,n[t])}))}return e}({},e,{fontSize:"14px"})},_=(0,f.Z)({container:{padding:16,width:500,boxSizing:"border-box"},labels:{fontSize:"14px"},filterSubtitle:{paddingBottom:"10px",paddingLeft:"5px"},agoLabel:{minWidth:"30px",textAlign:"end",margin:"auto"},dateOption:{display:"flex",marginRight:"30px"},dateOptionAgo:{display:"flex",marginBottom:"10px"},dateOptionWithin:{display:"flex",marginRight:"30px",marginBottom:"10px"},dateOptionLabel:{minWidth:"100px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},filterControls:{display:"flex",paddingTop:"30px"},clearButton:{marginRight:"auto"},selectorWrapper:{marginBottom:"12px"},option:{fontSize:"14px",height:"32px"},selectorsGroup:{display:"flex",flexDirection:"column"},selectorHint:{fontSize:12,lineHeight:"16px",color:"rgba(0,0,0,0.54)"},divider:{marginBottom:12}}),A=e=>{let{activityTypes:t,selectedActivityTypes:n,onChange:a}=e;const l=_(),i=e=>({value:e,label:(0,R.Xr)(e)}),c=e=>e.map(i),p=n.length>1&&n.includes(x.I.ENTITY_CHANGED),m=(0,T.pipe)((0,T.sortBy)((e=>(0,R.Xr)(e))),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Activity")),r().createElement(C.Z,{value:c(n),onChange:(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("value"),a),options:m,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:l,menuPlacement:"bottom"}),p&&r().createElement("span",{className:l.selectorHint},o().text("One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.")))};var L=n(85451),M=n(39621),H=n(31276),U=n(51843),j=n(20562);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 Z=[null,null],z=[null,"minutes"],G=e=>{let{value:t,onChange:n}=e;const l=_(),i=e=>(null==t?void 0:t.type)===e?t.period:e===E.KfU.WITHIN||e===E.KfU.AGO?z:e===E.KfU.BETWEEN?Z:void 0,[c,p]=(0,a.useState)(i(E.KfU.BETWEEN)),[m,u]=(0,a.useState)(i(E.KfU.WITHIN)),[d,h]=(0,a.useState)(i(E.KfU.AGO)),f=e=>e===E.KfU.WITHIN?m:e===E.KfU.AGO?d:e===E.KfU.BETWEEN?c:void 0,g=e=>{(null==t?void 0:t.type)!==e&&n({period:f(e),type:e})},v=e=>{n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){k(e,t,n[t])}))}return e}({},t,{period:e}))};return(0,j.D)((()=>{t?t.type===E.KfU.WITHIN?u(t.period):t.type===E.KfU.AGO?h(t.period):t.type===E.KfU.BETWEEN&&p(t.period):(p(Z),u(z),h(z))}),[t]),r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Date")),r().createElement(s.RadioGroup,{value:(null==t?void 0:t.type)||null,onChange:(0,T.pipe)(H.NA,g)},r().createElement("div",{className:l.dateOptionWithin},r().createElement(s.FormControlLabel,{value:E.KfU.WITHIN,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("Within the last"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(M.Z,{interval:m,onChange:v,onFocus:()=>g(E.KfU.WITHIN)})),r().createElement("div",{className:l.dateOptionAgo},r().createElement(s.FormControlLabel,{value:E.KfU.AGO,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("More than"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(M.Z,{interval:d,onChange:v,onFocus:()=>g(E.KfU.AGO)}),r().createElement(s.Typography,{className:b()(l.agoLabel,l.labels),variant:"subtitle1"},o().text("Ago"))),r().createElement("div",{className:l.dateOption},r().createElement(s.FormControlLabel,{value:E.KfU.BETWEEN,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("Date range"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(U.Z,{values:c,onChange:v,onFocus:()=>g(E.KfU.BETWEEN)}))))};var V=n(27815);const W=e=>{let{entityTypes:t,selectedEntityTypes:n,onChange:a}=e;const l=_(),i=e=>({value:e.uri,label:e.label,entityType:e}),c=e=>e.map(i),p=(0,T.pipe)((0,T.sortBy)((e=>e.label)),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Type")),r().createElement(C.Z,{value:c(n),onChange:(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("entityType"),a),options:p,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:l,menuPlacement:"bottom"}))},B=e=>{let{selectedSources:t,onChange:n}=e;const a=_(),l=(0,i.useSelector)(c.ZP.selectors.getMetadata),p=(0,T.sortBy)((e=>e.label))(l.sources);return r().createElement("div",{className:a.selectorWrapper},r().createElement(s.Typography,{className:b()(a.filterSubtitle,a.labels),variant:"subtitle1"},o().text("Source")),r().createElement(C.Z,{value:t,onChange:(0,T.pipe)((0,T.defaultTo)([]),n),options:p,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:a.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:a,getOptionValue:(0,T.prop)("abbreviation"),menuPlacement:"bottom"}))},F=e=>{let{filter:t,entityType:n,onPropChange:a}=e;const l=_(),o=(0,i.useSelector)(c.ZP.selectors.getMetadata),{attributes:s=[],sources:p=[],entityTypes:m=[]}=t||{},u=(0,E.Ug0)(o,(0,T.map)((0,T.prop)("uri"),m)),d=n||(0,E.nt9)(o,u);return r().createElement("div",{className:l.selectorsGroup},!n&&r().createElement(W,{entityTypes:o.entityTypes,selectedEntityTypes:m,onChange:a("entityTypes")}),r().createElement(V.Z,{selectedAttributes:s,entityType:d,onChange:a("attributes"),className:l.selectorWrapper,disableUnderline:!0}),r().createElement(B,{selectedSources:p,onChange:a("sources")}))},K=e=>{let{value:t,open:n,entityType:l,anchorEl:p,onApply:m,onCancel:u,onClear:d}=e;const E=_(),h=(0,i.useSelector)(c.ZP.selectors.getMetadata),[f,g]=(0,a.useState)(t),v=(0,T.curry)(((e,t)=>{g((0,T.pipe)((0,T.when)((0,T.always)("entityTypes"===e),(0,T.assoc)("attributes",[])),(0,T.when)((0,T.always)("activities"===e),(0,T.mergeLeft)({attributes:[],entityTypes:[],sources:[]})),(0,T.assoc)(e,t)))}));(0,j.D)((()=>{g(t)}),[n,t]);const{activities:y=[],dateRange:b=null,users:I=[]}=f||{},O=1===y.length&&y.includes(x.I.ENTITY_CHANGED);return r().createElement(s.Popover,{open:n,anchorEl:p,onClose:u,classes:{paper:E.container},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},r().createElement(A,{activityTypes:w(h,l),selectedActivityTypes:y,onChange:v("activities")}),O&&r().createElement(F,{filter:f,entityType:l,onPropChange:v}),r().createElement(s.Divider,{light:!0,className:E.divider}),r().createElement(G,{value:b,onChange:v("dateRange")}),r().createElement(s.Divider,{light:!0,className:E.divider}),r().createElement(L.Z,{selectedUsers:I,onChange:v("users"),disableUnderline:!0}),r().createElement("div",{className:E.filterControls},r().createElement(s.Button,{onClick:(0,T.pipe)((()=>g(null)),d),className:E.clearButton},o().text("Clear all")),r().createElement(s.Button,{onClick:u},o().text("Cancel")),r().createElement(s.Button,{color:"primary",onClick:()=>m(f)},o().text("Apply"))))};var Y=n(41128);const $=(0,f.Z)((e=>({icon:{margin:"4px","&.activeIcon":{backgroundColor:(0,Y.U1)(e.palette.primary.main,.12),color:e.palette.primary.main}}})));function q(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=e=>{let{filter:t,entityType:n,onChange:l}=e;const i=$(),c=(0,a.useRef)(),s=(0,a.useRef)(t),[p,u]=(0,a.useState)(!1),d=!(0,T.equals)(t,s.current);return r().createElement(r().Fragment,null,r().createElement(m.k,{ref:c,icon:I.Z,size:"L",onClick:()=>u(!0),tooltipTitle:o().text("Filter"),className:b()(i.icon,{activeIcon:d})}),r().createElement(K,{value:t,open:p,entityType:n,anchorEl:c.current,onApply:e=>{const t=(0,T.pipe)((0,T.mergeRight)(s.current),(0,T.evolve)({dateRange:(0,T.unless)(E.RZp,(0,T.always)(s.current.dateRange))}))(e);l(t),u(!1)},onCancel:()=>u(!1),onClear:()=>l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){q(e,t,n[t])}))}return e}({},s.current))}))},J=(0,f.Z)({header:{width:"auto",display:"flex",alignItems:"center"},label:{paddingLeft:"7px",fontSize:"14px"},buttonsWrapper:{marginLeft:"auto",display:"flex"}});function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ee(e,t,n[t])}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=e=>{let{value:t,entityType:n,entityUri:a,onChange:l,exportTypes:p}=e;const m=J(),u=(e=>{const t=(0,T.curry)(((e,t,n)=>n.length<=1?n[0]:`${n[0]} + ${n.length-1} ${2===n.length?e:t}`)),n=(0,T.pipe)((0,T.map)(R.Xr),t(o().text("activity"),o().text("activities")))(e.activities),a=t(o().text("user"),o().text("users"),e.users),r=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),(0,T.sortBy)(T.identity),t(o().text("type"),o().text("types")))(e.entityTypes),l=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),(0,T.sortBy)(T.identity),t(o().text("attribute"),o().text("attributes")))(e.attributes),i=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),t(o().text("source"),o().text("sources")))(e.sources);return(0,T.pipe)((0,T.reject)(T.isNil),(0,T.join)(" | "))([n,r,l,i,(e=>{const t=e=>`${(0,E.mB6)({dataTypeDefinition:{type:E.oS0.TYPE_ACTIVENESS_DATE}},e)}`;switch(e.type){case E.KfU.WITHIN:return o().text("Within ${amount} ${unit}",{amount:e.period[0],unit:(0,E.wsP)(e.period[1])});case E.KfU.AGO:return o().text("More than ${amount} ${unit} ago",{amount:e.period[0],unit:(0,E.wsP)(e.period[1])});case E.KfU.BETWEEN:return o().text("${startDate} to ${endDate}",{startDate:t(e.period[0]),endDate:t(e.period[1])});default:return null}})(e.dateRange),a])})(t),d=(0,i.useSelector)(c.ZP.selectors.getCanUserMakeActivitiesExport);return r().createElement("div",{className:m.header},r().createElement(s.Typography,{variant:"body2",className:m.label},o().text("Filter:")),r().createElement(s.Tooltip,{title:u},r().createElement(s.Typography,{variant:"body2",className:m.label,color:"textSecondary",display:"block",noWrap:!0},u)),r().createElement("div",{className:m.buttonsWrapper},d&&r().createElement(v,{filters:Q({},t,{entityUri:a}),exportTypes:p}),r().createElement(X,{filter:t,entityType:n,onChange:l})))}},99601:(e,t,n)=>{let a;n.d(t,{w:()=>a}),function(e){e.ATTRIBUTE_CHANGED="edited",e.ATTRIBUTE_ADDED="added",e.ATTRIBUTE_REMOVED="deleted"}(a||(a={}))},56764:(e,t,n)=>{n.d(t,{U:()=>c});var a=n(50914),r=n(81559);const l=e=>e.startsWith("USER_")||e.startsWith("COMMENT_")||e.startsWith("SFDC_")?`startsWith(label, '${e}')`:`equals(items.data.type, ${e})`,o=e=>`equals(items.delta.attributeType, '${e.value}')`,i=(0,a.cond)([[(0,a.equals)("users"),()=>(0,r.NPd)(r.F$g)],[(0,a.equals)("activities"),()=>(0,r.NPd)(l)],[(0,a.equals)("sources"),()=>(0,r.NPd)(r.dwd)],[(0,a.equals)("attributes"),()=>(0,r.NPd)(o)],[(0,a.equals)("entityTypes"),()=>(0,r.NPd)(r.bG8)],[(0,a.equals)("dateRange"),()=>r.lPZ],[(0,a.equals)("entityUri"),()=>r._LJ],[(0,a.equals)("rawFilter"),()=>a.identity]]),c=(0,a.pipe)((0,a.defaultTo)({}),(0,a.reject)(r.O27),a.toPairs,(0,a.append)(["rawFilter","not equals(user, 'collaboration-service')"]),(0,a.map)((e=>{let[t,n]=e;return i(t)(n)})),(0,a.reject)(r.O27),(0,a.map)(r.tM8),(0,a.join)(" and "))},41188:(e,t,n)=>{n.d(t,{v:()=>c});var a=n(24328),r=n(52730),l=n(86051),o=n(81559),i=n(50914);const c=e=>{const t=(0,r.useSelector)(l.ZP.selectors.getMetadata),n=(0,r.useSelector)(l.ZP.selectors.getDataTenants),c=(0,r.useSelector)(l.ZP.selectors.getAttributePresentations),s=(0,r.useSelector)(l.ZP.selectors.getLookups),{map:p}=e,m=(0,o.CL1)(e),u=(0,o.hM2)(t,n,!0,e),d=(0,o.mxe)(u,s),E=(0,r.useDispatch)();return(0,a.useEffect)((()=>{d.length>0&&(0,i.pipe)((0,i.chain)((e=>{let{type:t,codeValues:n}=e;return n.map((e=>({type:t,codeValue:e})))})),o.hK$,(0,i.andThen)((0,i.pipe)(l.N5.lookups.actions.lookupsListResolved,E)))(d)}),[e]),(0,o.ZxB)(t,c,s,u,m,p)}},67885:(e,t,n)=>{let a;n.d(t,{o:()=>a}),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(a||(a={}))}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5605],{30739:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(50166),o=n(44443),i=n(88832);const c=(0,n(79692).Z)({item:{overflow:"hidden"}});function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.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}const m=(0,a.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:m,children:u,itemKey:d,showNotMeasuredItems:E,listRef:h}=e;const f=c(),g=(0,a.useRef)({}),[v,y]=(0,a.useState)({}),b=(0,a.useCallback)((0,i.DsO)((()=>{y(s({},g.current))})),[]),T=(0,a.useCallback)(((e,t)=>d?d(t,e):t),[d]),I=(0,a.useRef)(),x=h||I;x.current&&x.current.resetAfterIndex(0,!1);const O=(0,a.useMemo)((()=>e=>{let{data:t,index:n,style:a}=e;const l=T(t,n);return r().createElement("div",{style:a,className:f.item},r().createElement("div",{style:E?void 0:{visibility:l in v?void 0:"hidden"}},r().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[l]!==t&&(((e,t)=>{g.current=s({},g.current,{[e]:t})})(l,t),b())}}),u({data:t,index:n})))}),[u,E,T,b,!E&&v]);return r().createElement(l.VariableSizeList,{ref:x,width:t,height:n,itemCount:m.length,itemData:m,itemSize:e=>v[(e=>T(m,e))(e)]||p,itemKey:d},O)}))},4094:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l);const i=(0,n(79692).Z)({"basic-view-content":{flex:"1 1 auto",padding:"0 24px 24px","&:first-child":{paddingTop:"24px"}}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(this,arguments)}const s=e=>{let{children:t,className:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=i();return r().createElement("div",c({className:o()(l["basic-view-content"],n)},a),t)}},88234:(e,t,n)=>{n.d(t,{Z:()=>Ve});var a=n(94079),r=n(24328),l=n.n(r),o=n(58662),i=n(2507),c=n.n(i),s=n(30739),p=n(50914),m=n(95038),u=n.n(m);const d=(0,p.pipe)((0,p.groupBy)((e=>{let{timestamp:t}=e;return u()(t).startOf("day")})),p.toPairs,(0,p.map)((e=>{let[t,n]=e;return{timestamp:u()(t).valueOf(),collapsed:!1,children:n}}))),E=(0,p.addIndex)(p.chain)(((e,t)=>{let{children:n,collapsed:a,timestamp:r}=e;const l={collapsed:a,timestamp:r,index:t};return a?[l]:[l,...n]})),h=(0,p.has)("collapsed"),f=(e,t)=>{const n=t[e];return"uri"in n?n.uri:`${n.index}`};var g=n(34606),v=n(51229),y=n(58241),b=n(88832),T=n(79692);const I=(0,T.Z)({groupItem:{display:"flex",height:"40px",alignItems:"center",paddingTop:"10px",boxSizing:"border-box"},groupIcon:{marginLeft:"-5px",marginRight:"22px",width:"10px",height:"10px",background:"white",border:"2px solid #D8D8D8",borderRadius:"50%",boxSizing:"border-box",flexShrink:0},groupTitle:{fontWeight:500}}),x=e=>{let{item:{index:t,timestamp:n,collapsed:r},onToggle:o}=e;const i=I();return l().createElement("div",{className:i.groupItem},l().createElement("div",{className:i.groupIcon}),l().createElement(a.Typography,{className:i.groupTitle,variant:"subtitle1"},(0,b.zkt)(n)?c().text("Today"):c().date(n,"LL")),l().createElement(v.Z,null),l().createElement(y.Z,{isOpen:!r,onClick:()=>o(t)}))};var O=n(31537);const N=(0,T.Z)((e=>({activityTitle:{display:"block",fontWeight:500,fontSize:13,lineHeight:"15px",color:e.palette.text.primary,marginBottom:8,marginRight:70},activityType:{flexShrink:0,marginRight:8,whiteSpace:"nowrap"}}))),w=e=>{let{type:t,children:n}=e;const a=N();return l().createElement("span",{className:a.activityTitle},l().createElement("span",{className:a.activityType},(0,g.Xr)(t)),n)},C=e=>{let{type:t}=e;return l().createElement(w,{type:t})};var S=n(52730),R=n(86051);const D=(0,T.Z)((e=>({link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400,cursor:"pointer"},objectLabel:{color:e.palette.text.secondary,lineHeight:"15px",fontWeight:400},relationUri:{color:e.palette.text.primary,fontWeight:400}}))),P=e=>{var t,n;let{data:a,type:r}=e;const o=D(),i=(0,S.useSelector)(R.ZP.selectors.getMetadata),c=(0,b.T6O)(i,null===(t=a.items)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.objectType);return l().createElement(w,{type:r},l().createElement("span",{className:o.objectLabel},(0,b.idV)(c)))},_=3,A=(0,r.createContext)(null),L=e=>{let{children:t}=e;const[n,a]=(0,r.useState)([]);return l().createElement(A.Provider,{value:{expandedItems:n,addExpandedItems:e=>{n.includes(e)||a((t=>[...t,e]))}}},t)},M=e=>{let{itemsId:t,items:n=[],limit:a=_}=e;const{expandedItems:l,addExpandedItems:o}=(0,r.useContext)(A),i=(0,r.useCallback)((()=>o(t)),[t]),c=l.includes(t),s=n.slice(0,c?n.length:a);return{onExpand:i,itemsToShow:s,collapsedItemsCount:n.length-s.length}};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H.apply(this,arguments)}const U=e=>{let{itemsCount:t,itemsLabel:n}=e,r=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["itemsCount","itemsLabel"]);return l().createElement(a.Link,H({component:"button",variant:"caption"},r,{underline:"none"}),l().createElement("span",null,c().text("${itemsCount} more",{itemsCount:t})," ",n))},j=e=>{let{RecordComponent:t,items:n,activityUri:a}=e;const{onExpand:r,itemsToShow:o,collapsedItemsCount:i}=M({itemsId:a,items:n});return l().createElement(l().Fragment,null,o.map((e=>l().createElement(t,{key:e.id,item:e}))),i?l().createElement(U,{itemsCount:i,itemsLabel:1===i?c().text("record"):c().text("records"),onClick:r}):null)};var k=n(71153),Z=n.n(k),z=n(31039);const G=(0,T.Z)((e=>({link:{fontSize:13,lineHeight:"15px",color:e.palette.primary.main,textDecoration:"none",fontWeight:400,"&.removed":{pointerEvents:"none",color:e.palette.text.secondary}}}))),V=e=>{let{item:t}=e;const n=G(),{objectLabel:a,objectUri:r,data:o}=t,i=(null==o?void 0:o.type)===O.I.ENTITY_REMOVED;return l().createElement(z.Z,{className:Z()(n.link,{removed:i}),value:r},(0,b.idV)(a))},W=(0,T.Z)((e=>({field:{fontSize:12,lineHeight:"20px",color:e.palette.text.primary,marginTop:4,display:"block"},fieldName:{color:e.palette.text.secondary,marginRight:8},link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400}}))),B=(0,T.Z)((e=>({arrow:{margin:"0 8px",fontSize:12,color:e.palette.text.primary},chip:{height:20,width:53,fontSize:10,fontWeight:500,lineHeight:"16px",marginLeft:9,flexShrink:0,textTransform:"capitalize","& span":{padding:0},"&.edited":{color:"#6973C2",borderColor:"#6973C2"},"&.added":{color:"#75C378",borderColor:"#75C378"},"&.deleted":{color:"#F97061",borderColor:"#F97061"}},expandLabel:{fontSize:12},andLabel:{color:e.palette.text.secondary}}))),F=e=>{let{item:{id:t,data:n}}=e;const a=W(),r=B(),o=(null==n?void 0:n.potentialMatches)||(null==n?void 0:n.newUri),{onExpand:i,collapsedItemsCount:s,itemsToShow:p}=M({itemsId:t,items:o.split(",")}),m=null==n?void 0:n.type;return l().createElement("div",{className:a.field},l().createElement("span",{className:a.fieldName},(e=>({[O.I.POTENTIAL_MATCHES_FOUND]:c().text("Matches found"),[O.I.POTENTIAL_MATCHES_REMOVED]:c().text("Matches removed"),[O.I.NOT_MATCHES_SET]:c().text("Were set"),[O.I.NOT_MATCHES_RESET]:c().text("Were reset"),[O.I.ENTITIES_MERGED_MANUALLY]:c().text("Merged with"),[O.I.ENTITIES_MERGED]:c().text("Merged automatically with"),[O.I.ENTITIES_SPLITTED]:c().text("Un-merged with")}[e]||""))(m),":"),p.map(((e,t)=>l().createElement(z.Z,{key:t,value:e,className:a.link},(0,b.idV)(n[e])))).reduce(((e,t)=>[e,", ",t])),s?l().createElement(l().Fragment,null,l().createElement("span",{className:r.andLabel}," ",c().text("and")," "),l().createElement(U,{itemsCount:s,itemsLabel:1===s?c().text("match"):c().text("matches"),onClick:i,className:r.expandLabel})):null)},K=(0,T.Z)((e=>({record:{background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",boxSizing:"border-box",borderRadius:"3px",padding:"7px 14px",marginBottom:8,position:"relative","&:hover $restoreIcon":{visibility:"visible"}},label:{color:e.palette.text.primary,fontSize:12,lineHeight:"16px"},description:{marginRight:8,flexShrink:0},restoreIcon:{visibility:"hidden",color:e.palette.text.secondary,position:"absolute",right:4,top:3,cursor:"pointer"},moreLabel:{marginTop:4}}))),Y=e=>{let{item:t}=e;const n=K(),{potentialMatches:a,newUri:r}=t.data;return a||r?l().createElement("div",{className:n.record},l().createElement("span",{className:n.label},l().createElement(V,{item:t})),l().createElement(F,{item:t})):null},$=e=>{let{type:t,data:n}=e;const{itemsTotal:a,items:r,uri:o}=n,i=1===a&&!(r[0].data.potentialMatches||r[0].data.newUri);return l().createElement("div",null,l().createElement(w,{type:t},i&&l().createElement(V,{item:r[0]})),!i&&l().createElement(j,{activityUri:o,items:r,RecordComponent:Y}))},q=e=>{let{type:t,data:n}=e;return l().createElement("div",null,l().createElement(w,{type:t}),l().createElement(j,{activityUri:n.uri,items:n.items,RecordComponent:Y}))};var X=n(42668),J=n(27597),Q=n(99601);const ee=e=>{var t,n;let{delta:r}=e;const o=B(),i=W(),c=(0,S.useSelector)(R.ZP.selectors.getMetadata),s=(0,S.useSelector)(R.ZP.selectors.getAttributePresentations),p=(0,b.zeJ)(c,r.attributeType),m=null===(t=r.newValue)||void 0===t?void 0:t.value,u=null===(n=r.oldValue)||void 0===n?void 0:n.value,d=u||m,E=Q.w[r.type],h=e=>(0,g._V)(e,r.attributeType,c,s);return l().createElement("div",{className:i.field},l().createElement("span",{className:i.fieldName},(null==p?void 0:p.label)||(null==p?void 0:p.name),":"),l().createElement("span",null,d&&h(d),m&&u&&l().createElement(l().Fragment,null,l().createElement(J.Z,{className:o.arrow}),h(m))),E&&l().createElement(a.Chip,{variant:"outlined",label:E,className:Z()(o.chip,E)}))},te=e=>{let{updates:t,recordId:n}=e;const a=K(),{onExpand:r,collapsedItemsCount:o,itemsToShow:i}=M({itemsId:n,items:t});return l().createElement(l().Fragment,null,i.map(((e,t)=>l().createElement(ee,{key:t,delta:e}))),o?l().createElement(U,{itemsCount:o,itemsLabel:1===o?c().text("update"):c().text("updates"),onClick:r,className:a.moreLabel}):null)},ne=e=>{var t;let{item:n}=e;const r=K(),o=(0,S.useDispatch)(),i=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta,s=(0,p.path)(["data","type"])(n)===O.I.ENTITY_CHANGED;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!i&&l().createElement("span",{className:r.description},c().text("Profile changed")),l().createElement(V,{item:n})),s&&l().createElement(X.Z,{className:r.restoreIcon,onClick:()=>{(0,b.fAQ)(n.objectUri,n.timestamp).then((e=>{if(-1!==e){const t={aStamp:n.timestamp,bStamp:e};o(R.ui.actions.openHistoryEvent({entityUri:n.objectUri,historyEvent:t}))}})).catch((e=>console.error(e)))}}),l().createElement(te,{updates:i,recordId:n.id}))},ae=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(V,{item:a.items[0]})),!r&&l().createElement(j,{activityUri:a.uri,items:a.items,RecordComponent:ne}))},re=(0,T.Z)((e=>({relationship:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,overflow:"hidden"},link:{color:e.palette.primary.main,textDecoration:"none",fontWeight:400},delimiter:{margin:"0 8px"}}))),le=e=>{let{item:t}=e;const n=re(),{startObjectLabel:a,startObjectUri:r,endObjectLabel:o,endObjectUri:i}=t;return l().createElement("span",{className:n.relationship},l().createElement(z.Z,{className:n.link,value:r},(0,b.idV)(a)),l().createElement("span",{className:n.delimiter},c().text("to")),l().createElement(z.Z,{className:n.link,value:i},(0,b.idV)(o)))},oe=e=>{var t;let{item:n}=e;const r=K(),o=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!o&&l().createElement("span",{className:r.description},c().text("Relationship updated")),l().createElement(le,{item:n})),l().createElement(te,{updates:o,recordId:n.id}))},ie=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(le,{item:a.items[0]})),!r&&l().createElement(j,{activityUri:a.uri,items:a.items,RecordComponent:oe}))};var ce=n(31276),se=n(41188);const pe=e=>{let{data:t,type:n}=e;const a=D(),o=(0,S.useDispatch)(),i=(0,r.useMemo)((()=>{const e=(0,ce.Rx)(t.description);return"2.0"===e.version?e.activity.uiState:e}),[t.description]),s=(0,p.pipe)((0,p.always)(i),R.ui.actions.openSearch,o),m=(0,se.v)(i);return l().createElement(w,{type:n},l().createElement("span",{className:a.link,onClick:s},m||c().text("all profiles")))},me=e=>{let{type:t,data:n}=e;const a=D(),r=(0,ce.Rx)(n.description),o=n.itemsTotal;return l().createElement(w,{type:t},r&&l().createElement(z.Z,{className:a.link,value:r.uri},(0,b.idV)(r.label)),o>1&&l().createElement("span",{className:a.objectLabel},c().text("(${itemsTotal} records)",{itemsTotal:o})))},ue=e=>{let{type:t,data:n}=e;const a=D(),r=(0,ce.Rx)(n.description),o=n.itemsTotal,i=n.items[0].objectUri;return l().createElement(w,{type:t},l().createElement(l().Fragment,null,(0,b.bC9)(i)?l().createElement("span",{className:a.relationUri},i):l().createElement(V,{item:n.items[0]}),r&&l().createElement("div",{className:a.objectLabel},r.label)),o>1&&l().createElement("div",{className:a.objectLabel},c().text("(${itemsTotal} records)",{itemsTotal:o})))};function de(){return de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},de.apply(this,arguments)}const Ee=e=>l().createElement("svg",de({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M17.4 13.08h-4.32v4.32h-2.16v-4.32H6.6v-2.16h4.32V6.6h2.16v4.32h4.32v2.16z",fill:"#fff"}));var he=n(12147);function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fe.apply(this,arguments)}const ge=e=>l().createElement("svg",fe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16.35 6h-8.7C6.74 6 6 6.804 6 7.793v5.788c0 .986.737 1.79 1.644 1.793V18l3.472-2.626h5.234c.91 0 1.65-.805 1.65-1.793V7.793C18 6.804 17.26 6 16.35 6zm-1.562 6.726H9.212v-.765h5.576v.765zm0-1.63H9.212v-.765h5.576v.764zm0-1.631H9.212V8.7h5.576v.764z",fill:"#fff"}));function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}const ye=e=>l().createElement("svg",ve({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6 15.15v2.25h2.25l6.636-6.636-2.25-2.25L6.6 15.15zm10.626-6.126a.598.598 0 000-.846l-1.404-1.404a.598.598 0 00-.846 0l-1.098 1.098 2.25 2.25 1.098-1.098z",fill:"#fff"}));function be(){return be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},be.apply(this,arguments)}const Te=e=>l().createElement("svg",be({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M15.6 6H9c-.662 0-1.2.539-1.2 1.2V9H9V7.2h6.6v9.6H9V15H7.8v1.8c0 .662.538 1.2 1.2 1.2h6.6c.662 0 1.2-.538 1.2-1.2V7.2c0-.661-.538-1.2-1.2-1.2z",fill:"#fff"}),l().createElement("path",{d:"M10.975 13.976l.85.848 2.823-2.83-2.824-2.819-.848.85 1.378 1.375H7.2v1.2h5.15l-1.375 1.376z",fill:"#fff"}));function Ie(){return Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ie.apply(this,arguments)}const xe=e=>l().createElement("svg",Ie({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M7.4 6H14c.662 0 1.2.539 1.2 1.2V9H14V7.2H7.4v9.6H14V15h1.2v1.8c0 .662-.538 1.2-1.2 1.2H7.4c-.662 0-1.2-.538-1.2-1.2V7.2c0-.661.538-1.2 1.2-1.2z"}),l().createElement("path",{d:"M15.127 13.976l.85.848 2.823-2.83-2.824-2.819-.849.85 1.379 1.375h-5.154v1.2H16.5l-1.374 1.376z"}));function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Oe.apply(this,arguments)}const Ne=e=>l().createElement("svg",Oe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.764 11.152V9.659l2.334 2.217-2.334 2.217v-1.444H13.12c-1.023 0-1.333.314-1.918 1.632-.797 1.796-1.514 2.52-3.3 2.52h-1.69v-1.495h1.69c1.036 0 1.35-.319 1.937-1.639.348-.784.68-1.363 1.09-1.766-.41-.403-.742-.982-1.09-1.766-.586-1.32-.901-1.64-1.938-1.64H6.213V7H7.9c1.787 0 2.504.725 3.301 2.52.585 1.318.895 1.633 1.918 1.633h2.644z",fill:"#fff"}));function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},we.apply(this,arguments)}const Ce=e=>l().createElement("svg",we({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 15.6V7.2H8.4V6h8.4c.66 0 1.2.54 1.2 1.2v8.4h-1.2zM7.2 18c-.66 0-1.2-.54-1.2-1.2V9.6c0-.66.54-1.2 1.2-1.2h7.2c.66 0 1.2.54 1.2 1.2v7.2c0 .66-.54 1.2-1.2 1.2H7.2zm4.937-2.8l.663-.663-1.337-1.337 1.337-1.337-.663-.663-1.337 1.337L9.463 11.2l-.663.663 1.337 1.337L8.8 14.537l.663.663 1.337-1.337 1.337 1.337z",fill:"#fff"}));function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Se.apply(this,arguments)}const Re=e=>l().createElement("svg",Se({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 7.2v8.4H18V7.2c0-.66-.54-1.2-1.2-1.2H8.4v1.2h8.4zM6 16.8c0 .66.54 1.2 1.2 1.2h7.2c.66 0 1.2-.54 1.2-1.2V9.6c0-.66-.54-1.2-1.2-1.2H7.2c-.66 0-1.2.54-1.2 1.2v7.2z",fill:"#fff"}));function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const Pe=e=>l().createElement("svg",De({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M11.727 5c1.66 0 3 1.376 3 3.08 0 1.704-1.34 3.08-3 3.08s-3-1.376-3-3.08c0-1.704 1.34-3.08 3-3.08zM12 19c-2.5 0-4.71-1.365-6-3.435.03-2.122 4-3.285 6-3.285 1.99 0 5.97 1.163 6 3.285C16.71 17.635 14.5 19 12 19z",fill:"#fff"}));function _e(){return _e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_e.apply(this,arguments)}const Ae=e=>l().createElement("svg",_e({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.125 7.583h2.042V8.75H8V7.583h2.042L10.625 7h2.917l.583.583zM9.75 17.5a1.17 1.17 0 01-1.167-1.167v-7h7v7a1.17 1.17 0 01-1.166 1.167H9.75z",fill:"#fff"}));function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Me=e=>l().createElement("svg",Le({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.432 13.358h-.568l-.197-.196a4.627 4.627 0 001.121-3.023 4.65 4.65 0 10-4.649 4.65 4.628 4.628 0 003.022-1.12l.198.195v.567L16.933 18 18 16.934l-3.568-3.576zm-4.293 0a3.218 3.218 0 11.152-.004l-.152.004z",fill:"#fff"}));function He(){return He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},He.apply(this,arguments)}const Ue=e=>l().createElement("svg",He({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.134 7.718L17.8 5.5V7h-1.604c-1.786 0-2.503.725-3.3 2.52-.585 1.318-.895 1.633-1.918 1.633H8.301v1.495h2.677c1.023 0 1.333.314 1.918 1.632.797 1.796 1.514 2.52 3.3 2.52h1.69v-1.495h-1.69c-1.036 0-1.35-.319-1.937-1.639-.348-.784-.68-1.363-1.09-1.766.41-.403.742-.982 1.09-1.766.586-1.32.901-1.639 1.938-1.639H17.8v1.44l2.334-2.217z",fill:"#fff"}));class je{}je.getComponent=e=>{let{type:t,data:n}=e;switch(t){case O.I.COMMENT_ADDED:case O.I.COMMENT_DELETED:case O.I.COMMENT_UPDATED:return l().createElement(C,{data:n,type:t});case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITIES_SPLITTED:case O.I.ENTITY_LOST_MERGE:return l().createElement($,{data:n,type:t});case O.I.POTENTIAL_MATCHES_FOUND:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.NOT_MATCHES_SET:case O.I.NOT_MATCHES_RESET:return l().createElement(q,{data:n,type:t});case O.I.ENTITY_CHANGED:case O.I.ENTITY_CREATED:case O.I.ENTITY_REMOVED:case O.I.ANALYTICS_ATTRIBUTES_CHANGED:return l().createElement(ae,{data:n,type:t});case O.I.RELATIONSHIP_CHANGED:case O.I.RELATIONSHIP_CREATED:case O.I.RELATIONSHIP_REMOVED:return l().createElement(ie,{data:n,type:t});case O.I.USER_SEARCH:return l().createElement(pe,{data:n,type:t});case O.I.GROUP_CHANGED:case O.I.GROUP_CREATED:case O.I.GROUP_REMOVED:return l().createElement(P,{data:n,type:t});case O.I.USER_LOGIN:case O.I.USER_LOGOUT:case O.I.MODEL_UPDATED:case O.I.PERIODIC_TASK_SCHEDULED:case O.I.USER_PROFILE_VIEW:return l().createElement(me,{data:n,type:t});case O.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:return l().createElement(ue,{data:n,type:t});default:return l().createElement("div",null,t," NOT IMPLEMENTED")}},je.getIcon=e=>{switch(e){case O.I.USER_LOGIN:return l().createElement(Te,null);case O.I.USER_LOGOUT:return l().createElement(xe,null);case O.I.USER_PROFILE_VIEW:return l().createElement(Pe,null);case O.I.PERIODIC_TASK_SCHEDULED:return l().createElement(he.Z,null);case O.I.ENTITIES_SPLITTED:return l().createElement(Ue,null);case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITY_LOST_MERGE:return l().createElement(Ne,null);case O.I.ENTITY_CREATED:case O.I.RELATIONSHIP_CREATED:case O.I.GROUP_CREATED:return l().createElement(Ee,null);case O.I.ENTITY_REMOVED:case O.I.RELATIONSHIP_REMOVED:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.GROUP_REMOVED:return l().createElement(Ae,null);case O.I.USER_SEARCH:return l().createElement(Me,null);case O.I.POTENTIAL_MATCHES_FOUND:return l().createElement(Re,null);case O.I.NOT_MATCHES_RESET:case O.I.NOT_MATCHES_SET:return l().createElement(Ce,null);case O.I.COMMENT_ADDED:case O.I.COMMENT_UPDATED:case O.I.COMMENT_DELETED:return l().createElement(ge,null);case O.I.ENTITY_CHANGED:case O.I.MODEL_UPDATED:case O.I.RELATIONSHIP_CHANGED:case O.I.GROUP_CHANGED:default:return l().createElement(ye,null)}};const ke=je,Ze=(0,T.Z)((e=>({activityItem:{display:"flex",minHeight:"40px",padding:"10px 0 5px 0",boxSizing:"border-box"},activityIcon:{marginLeft:"-13px",marginRight:"15px",width:"24px",height:"24px",background:e.palette.primary.main,borderRadius:"50%",border:"1px solid white",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{fill:"white",fontSize:"14px"}},activityInfo:{flex:1,overflow:"hidden",position:"relative"},activityUser:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},activityEvent:{marginTop:"5px"},date:{position:"absolute",right:0,marginTop:"5px",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,marginLeft:"auto",flexShrink:0,paddingLeft:8}}))),ze=e=>{let{item:t}=e;const n=Ze(),r=(0,g.te)(t),o=(0,g.rx)(t);return l().createElement("div",{className:n.activityItem},l().createElement("div",{className:n.activityIcon},ke.getIcon(r)),l().createElement("div",{className:n.activityInfo},l().createElement(a.Typography,{className:n.activityUser},t.user),l().createElement("span",{className:n.date},c().date(t.timestamp,"LT")),o.map(((e,t)=>l().createElement("div",{key:t,className:n.activityEvent},ke.getComponent({type:(0,g.te)(e),data:e}))))))},Ge=(0,T.Z)({rowDivider:{marginLeft:"28px"},listRow:{paddingLeft:"12px","&::before":{content:'""',width:"2px",position:"absolute",height:"100%",top:0,left:"11px",backgroundColor:"#D8D8D8",zIndex:"-1"},overflow:"hidden"},firstRow:{"&$listRow::before":{height:"calc(100% - 20px)",top:"20px"}},lastRow:{"&$listRow::before":{height:"20px"}},singleRow:{"&$listRow::before":{display:"none"}}}),Ve=e=>{let{width:t,height:n,activities:i,count:m,page:u,onChangePage:v,rowsPerPage:y,onChangeRowsPerPage:b,rowsPerPageOptions:T}=e;const I=Ge(),[O,N]=(0,r.useState)([]),w=e=>{N((0,p.adjust)(e,(0,p.evolve)({collapsed:p.not})))};(0,r.useEffect)((()=>{(0,p.pipe)((0,p.map)(g.Io),(0,p.filter)((e=>{let{itemsTotal:t}=e;return 0!==t})),d,N)(i)}),[i]);const C=(0,r.useMemo)((()=>E(O)),[O]),S=(0,r.useCallback)((e=>{let{data:t,index:n}=e;const r=t[n];return l().createElement("div",{className:Z()(I.listRow,{[I.singleRow]:1===t.length,[I.firstRow]:0===n,[I.lastRow]:n===t.length-1})},h(r)?l().createElement(x,{item:r,onToggle:w}):l().createElement(l().Fragment,null,l().createElement(ze,{item:r}),l().createElement(a.Divider,{className:I.rowDivider,light:!0,variant:"inset"})))}),[]);return l().createElement(l().Fragment,null,l().createElement(L,null,l().createElement(s.Z,{width:t,height:n-60,data:C,defaultItemSize:40,itemKey:f},S)),l().createElement(o.Z,{count:m,onChangePage:v,page:u,rowsPerPage:y,onChangeRowsPerPage:b,rowsPerPageOptions:T,labelRowsPerPage:c().text("Events per page:")}))}},46188:(e,t,n)=>{n.d(t,{Z:()=>te});var a=n(24328),r=n.n(a),l=n(2507),o=n.n(l),i=n(52730),c=n(86051),s=n(94079),p=n(28113),m=n(8818),u=n(585),d=n(55847),E=n(88832),h=n(56764),f=n(79692);const g=(0,f.Z)((e=>({snackbar:{maxWidth:500},icon:{margin:"4px"},exportButton:{color:e.palette.primary.main}}))),v=e=>{let{filters:t,exportTypes:n=[]}=e;const l=g(),f=(0,i.useDispatch)(),[v,y]=(0,a.useState)(!1),b=(0,i.useSelector)(c.ZP.selectors.getExportPath),T=(0,i.useSelector)(c.ZP.selectors.getTenant),I=(0,a.useCallback)((e=>{const n={filter:(0,h.U)(t),fileFormat:e};(0,E.CrF)({exportPath:b,tenant:T,options:n}).then((()=>y(!0))).catch(x)}),[t,T,b]),x=e=>{console.error(e),u.Z.addError({title:o().text("Error"),message:(0,E.xU7)(e,o().text("Can't export activities"))})},O=(0,a.useCallback)((()=>{f(c.ui.actions.openConsoleApp("Export"))}),[f]),N=(0,a.useMemo)((()=>n.map((e=>({text:e.toUpperCase(),onClick:()=>I(e)})))),[n,I]);return r().createElement(r().Fragment,null,N.length?r().createElement(d.Z,{buttonComponent:m.k,buttonProps:{icon:p.Z,tooltipTitle:o().text("Export"),size:"L",className:l.icon},menuItems:N,menuId:"export-menu"}):r().createElement(m.k,{icon:p.Z,size:"L",onClick:()=>I(),tooltipTitle:o().text("Export"),className:l.icon}),r().createElement(s.Portal,{container:document.body},r().createElement(s.Snackbar,{open:v,autoHideDuration:5e3,className:l.snackbar,onClose:()=>y(!1),message:o().text("Export operation is currently in progress. You will receive an email notification once completed. Go to Export Application to view the status."),action:r().createElement(s.Button,{className:l.exportButton,onClick:O},o().text("Export application"))})))};var y=n(71153),b=n.n(y),T=n(50914),I=n(36444),x=n(31537);const O=[x.I.ENTITY_CREATED,x.I.ENTITY_CHANGED,x.I.ENTITIES_MERGED,x.I.ENTITIES_SPLITTED,x.I.ENTITY_LOST_MERGE,x.I.RELATIONSHIP_CREATED,x.I.RELATIONSHIP_REMOVED,x.I.RELATIONSHIP_CHANGED,x.I.POTENTIAL_MATCHES_FOUND,x.I.POTENTIAL_MATCHES_REMOVED,x.I.NOT_MATCHES_SET,x.I.NOT_MATCHES_RESET,x.I.ENTITIES_MERGED_MANUALLY,x.I.ENTITIES_MERGED_ON_THE_FLY],N=[x.I.GROUP_CREATED,x.I.GROUP_REMOVED,x.I.GROUP_CHANGED],w=(e,t)=>t?O:(0,T.pipe)(Object.keys,(0,T.filter)((t=>(0,T.has)("groupTypes",e)&&!(0,T.isEmpty)(e.groupTypes)||!(0,T.includes)(t,N))))(x.I);var C=n(92575),S=n(96808),R=n(34606);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 P={input:e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){D(e,t,n[t])}))}return e}({},e,{fontSize:"14px"})},_=(0,f.Z)({container:{padding:16,width:500,boxSizing:"border-box"},labels:{fontSize:"14px"},filterSubtitle:{paddingBottom:"10px",paddingLeft:"5px"},agoLabel:{minWidth:"30px",textAlign:"end",margin:"auto"},dateOption:{display:"flex",marginRight:"30px"},dateOptionAgo:{display:"flex",marginBottom:"10px"},dateOptionWithin:{display:"flex",marginRight:"30px",marginBottom:"10px"},dateOptionLabel:{minWidth:"100px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},filterControls:{display:"flex",paddingTop:"30px"},clearButton:{marginRight:"auto"},selectorWrapper:{marginBottom:"12px"},option:{fontSize:"14px",height:"32px"},selectorsGroup:{display:"flex",flexDirection:"column"},selectorHint:{fontSize:12,lineHeight:"16px",color:"rgba(0,0,0,0.54)"},divider:{marginBottom:12}}),A=e=>{let{activityTypes:t,selectedActivityTypes:n,onChange:a}=e;const l=_(),i=e=>({value:e,label:(0,R.Xr)(e)}),c=e=>e.map(i),p=n.length>1&&n.includes(x.I.ENTITY_CHANGED),m=(0,T.pipe)((0,T.sortBy)((e=>(0,R.Xr)(e))),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Activity")),r().createElement(C.Z,{value:c(n),onChange:(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("value"),a),options:m,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:l,menuPlacement:"bottom"}),p&&r().createElement("span",{className:l.selectorHint},o().text("One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.")))};var L=n(85451),M=n(39621),H=n(31276),U=n(51843),j=n(20562);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 Z=[null,null],z=[null,"minutes"],G=e=>{let{value:t,onChange:n}=e;const l=_(),i=e=>(null==t?void 0:t.type)===e?t.period:e===E.KfU.WITHIN||e===E.KfU.AGO?z:e===E.KfU.BETWEEN?Z:void 0,[c,p]=(0,a.useState)(i(E.KfU.BETWEEN)),[m,u]=(0,a.useState)(i(E.KfU.WITHIN)),[d,h]=(0,a.useState)(i(E.KfU.AGO)),f=e=>e===E.KfU.WITHIN?m:e===E.KfU.AGO?d:e===E.KfU.BETWEEN?c:void 0,g=e=>{(null==t?void 0:t.type)!==e&&n({period:f(e),type:e})},v=e=>{n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){k(e,t,n[t])}))}return e}({},t,{period:e}))};return(0,j.D)((()=>{t?t.type===E.KfU.WITHIN?u(t.period):t.type===E.KfU.AGO?h(t.period):t.type===E.KfU.BETWEEN&&p(t.period):(p(Z),u(z),h(z))}),[t]),r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Date")),r().createElement(s.RadioGroup,{value:(null==t?void 0:t.type)||null,onChange:(0,T.pipe)(H.NA,g)},r().createElement("div",{className:l.dateOptionWithin},r().createElement(s.FormControlLabel,{value:E.KfU.WITHIN,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("Within the last"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(M.Z,{interval:m,onChange:v,onFocus:()=>g(E.KfU.WITHIN)})),r().createElement("div",{className:l.dateOptionAgo},r().createElement(s.FormControlLabel,{value:E.KfU.AGO,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("More than"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(M.Z,{interval:d,onChange:v,onFocus:()=>g(E.KfU.AGO)}),r().createElement(s.Typography,{className:b()(l.agoLabel,l.labels),variant:"subtitle1"},o().text("Ago"))),r().createElement("div",{className:l.dateOption},r().createElement(s.FormControlLabel,{value:E.KfU.BETWEEN,control:r().createElement(s.Radio,{color:"primary"}),label:o().text("Date range"),classes:{label:b()(l.dateOptionLabel,l.labels)}}),r().createElement(U.Z,{values:c,onChange:v,onFocus:()=>g(E.KfU.BETWEEN)}))))};var V=n(27815);const W=e=>{let{entityTypes:t,selectedEntityTypes:n,onChange:a}=e;const l=_(),i=e=>({value:e.uri,label:e.label,entityType:e}),c=e=>e.map(i),p=(0,T.pipe)((0,T.sortBy)((e=>e.label)),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:b()(l.filterSubtitle,l.labels),variant:"subtitle1"},o().text("Type")),r().createElement(C.Z,{value:c(n),onChange:(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("entityType"),a),options:p,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:l,menuPlacement:"bottom"}))},B=e=>{let{selectedSources:t,onChange:n}=e;const a=_(),l=(0,i.useSelector)(c.ZP.selectors.getMetadata),p=(0,T.sortBy)((e=>e.label))(l.sources);return r().createElement("div",{className:a.selectorWrapper},r().createElement(s.Typography,{className:b()(a.filterSubtitle,a.labels),variant:"subtitle1"},o().text("Source")),r().createElement(C.Z,{value:t,onChange:(0,T.pipe)((0,T.defaultTo)([]),n),options:p,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:a.dropDownInput}},components:{DropdownIndicator:S.Z},styles:P,classes:a,getOptionValue:(0,T.prop)("abbreviation"),menuPlacement:"bottom"}))},F=e=>{let{filter:t,entityType:n,onPropChange:a}=e;const l=_(),o=(0,i.useSelector)(c.ZP.selectors.getMetadata),{attributes:s=[],sources:p=[],entityTypes:m=[]}=t||{},u=(0,E.Ug0)(o,(0,T.map)((0,T.prop)("uri"),m)),d=n||(0,E.nt9)(o,u);return r().createElement("div",{className:l.selectorsGroup},!n&&r().createElement(W,{entityTypes:o.entityTypes,selectedEntityTypes:m,onChange:a("entityTypes")}),r().createElement(V.Z,{selectedAttributes:s,entityType:d,onChange:a("attributes"),className:l.selectorWrapper,disableUnderline:!0}),r().createElement(B,{selectedSources:p,onChange:a("sources")}))},K=e=>{let{value:t,open:n,entityType:l,anchorEl:p,onApply:m,onCancel:u,onClear:d}=e;const E=_(),h=(0,i.useSelector)(c.ZP.selectors.getMetadata),[f,g]=(0,a.useState)(t),v=(0,T.curry)(((e,t)=>{g((0,T.pipe)((0,T.when)((0,T.always)("entityTypes"===e),(0,T.assoc)("attributes",[])),(0,T.when)((0,T.always)("activities"===e),(0,T.mergeLeft)({attributes:[],entityTypes:[],sources:[]})),(0,T.assoc)(e,t)))}));(0,j.D)((()=>{g(t)}),[n,t]);const{activities:y=[],dateRange:b=null,users:I=[]}=f||{},O=1===y.length&&y.includes(x.I.ENTITY_CHANGED);return r().createElement(s.Popover,{open:n,anchorEl:p,onClose:u,classes:{paper:E.container},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},r().createElement(A,{activityTypes:w(h,l),selectedActivityTypes:y,onChange:v("activities")}),O&&r().createElement(F,{filter:f,entityType:l,onPropChange:v}),r().createElement(s.Divider,{light:!0,className:E.divider}),r().createElement(G,{value:b,onChange:v("dateRange")}),r().createElement(s.Divider,{light:!0,className:E.divider}),r().createElement(L.Z,{selectedUsers:I,onChange:v("users"),disableUnderline:!0}),r().createElement("div",{className:E.filterControls},r().createElement(s.Button,{onClick:(0,T.pipe)((()=>g(null)),d),className:E.clearButton},o().text("Clear all")),r().createElement(s.Button,{onClick:u},o().text("Cancel")),r().createElement(s.Button,{color:"primary",onClick:()=>m(f)},o().text("Apply"))))};var Y=n(41128);const $=(0,f.Z)((e=>({icon:{margin:"4px","&.activeIcon":{backgroundColor:(0,Y.U1)(e.palette.primary.main,.12),color:e.palette.primary.main}}})));function q(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=e=>{let{filter:t,entityType:n,onChange:l}=e;const i=$(),c=(0,a.useRef)(),s=(0,a.useRef)(t),[p,u]=(0,a.useState)(!1),d=!(0,T.equals)(t,s.current);return r().createElement(r().Fragment,null,r().createElement(m.k,{ref:c,icon:I.Z,size:"L",onClick:()=>u(!0),tooltipTitle:o().text("Filter"),className:b()(i.icon,{activeIcon:d})}),r().createElement(K,{value:t,open:p,entityType:n,anchorEl:c.current,onApply:e=>{const t=(0,T.pipe)((0,T.mergeRight)(s.current),(0,T.evolve)({dateRange:(0,T.unless)(E.RZp,(0,T.always)(s.current.dateRange))}))(e);l(t),u(!1)},onCancel:()=>u(!1),onClear:()=>l(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){q(e,t,n[t])}))}return e}({},s.current))}))},J=(0,f.Z)({header:{width:"auto",display:"flex",alignItems:"center"},label:{paddingLeft:"7px",fontSize:"14px"},buttonsWrapper:{marginLeft:"auto",display:"flex"}});function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ee(e,t,n[t])}))}return e}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const te=e=>{let{value:t,entityType:n,entityUri:a,onChange:l,exportTypes:p}=e;const m=J(),u=(e=>{const t=(0,T.curry)(((e,t,n)=>n.length<=1?n[0]:`${n[0]} + ${n.length-1} ${2===n.length?e:t}`)),n=(0,T.pipe)((0,T.map)(R.Xr),t(o().text("activity"),o().text("activities")))(e.activities),a=t(o().text("user"),o().text("users"),e.users),r=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),(0,T.sortBy)(T.identity),t(o().text("type"),o().text("types")))(e.entityTypes),l=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),(0,T.sortBy)(T.identity),t(o().text("attribute"),o().text("attributes")))(e.attributes),i=(0,T.pipe)((0,T.defaultTo)([]),(0,T.pluck)("label"),t(o().text("source"),o().text("sources")))(e.sources);return(0,T.pipe)((0,T.reject)(T.isNil),(0,T.join)(" | "))([n,r,l,i,(e=>{const t=e=>`${(0,E.mB6)({dataTypeDefinition:{type:E.oS0.TYPE_ACTIVENESS_DATE}},e)}`;switch(e.type){case E.KfU.WITHIN:return o().text("Within ${amount} ${unit}",{amount:e.period[0],unit:(0,E.wsP)(e.period[1])});case E.KfU.AGO:return o().text("More than ${amount} ${unit} ago",{amount:e.period[0],unit:(0,E.wsP)(e.period[1])});case E.KfU.BETWEEN:return o().text("${startDate} to ${endDate}",{startDate:t(e.period[0]),endDate:t(e.period[1])});default:return null}})(e.dateRange),a])})(t),d=(0,i.useSelector)(c.ZP.selectors.getCanUserMakeActivitiesExport);return r().createElement("div",{className:m.header},r().createElement(s.Typography,{variant:"body2",className:m.label},o().text("Filter:")),r().createElement(s.Tooltip,{title:u},r().createElement(s.Typography,{variant:"body2",className:m.label,color:"textSecondary",display:"block",noWrap:!0},u)),r().createElement("div",{className:m.buttonsWrapper},d&&r().createElement(v,{filters:Q({},t,{entityUri:a}),exportTypes:p}),r().createElement(X,{filter:t,entityType:n,onChange:l})))}},99601:(e,t,n)=>{let a;n.d(t,{w:()=>a}),function(e){e.ATTRIBUTE_CHANGED="edited",e.ATTRIBUTE_ADDED="added",e.ATTRIBUTE_REMOVED="deleted"}(a||(a={}))},56764:(e,t,n)=>{n.d(t,{U:()=>c});var a=n(50914),r=n(88832);const l=e=>e.startsWith("USER_")||e.startsWith("COMMENT_")||e.startsWith("SFDC_")?`startsWith(label, '${e}')`:`equals(items.data.type, ${e})`,o=e=>`equals(items.delta.attributeType, '${e.value}')`,i=(0,a.cond)([[(0,a.equals)("users"),()=>(0,r.NPd)(r.F$g)],[(0,a.equals)("activities"),()=>(0,r.NPd)(l)],[(0,a.equals)("sources"),()=>(0,r.NPd)(r.dwd)],[(0,a.equals)("attributes"),()=>(0,r.NPd)(o)],[(0,a.equals)("entityTypes"),()=>(0,r.NPd)(r.bG8)],[(0,a.equals)("dateRange"),()=>r.lPZ],[(0,a.equals)("entityUri"),()=>r._LJ],[(0,a.equals)("rawFilter"),()=>a.identity]]),c=(0,a.pipe)((0,a.defaultTo)({}),(0,a.reject)(r.O27),a.toPairs,(0,a.append)(["rawFilter","not equals(user, 'collaboration-service')"]),(0,a.map)((e=>{let[t,n]=e;return i(t)(n)})),(0,a.reject)(r.O27),(0,a.map)(r.tM8),(0,a.join)(" and "))},41188:(e,t,n)=>{n.d(t,{v:()=>c});var a=n(24328),r=n(52730),l=n(86051),o=n(88832),i=n(50914);const c=e=>{const t=(0,r.useSelector)(l.ZP.selectors.getMetadata),n=(0,r.useSelector)(l.ZP.selectors.getDataTenants),c=(0,r.useSelector)(l.ZP.selectors.getAttributePresentations),s=(0,r.useSelector)(l.ZP.selectors.getLookups),{map:p}=e,m=(0,o.CL1)(e),u=(0,o.hM2)(t,n,!0,e),d=(0,o.mxe)(u,s),E=(0,r.useDispatch)();return(0,a.useEffect)((()=>{d.length>0&&(0,i.pipe)((0,i.chain)((e=>{let{type:t,codeValues:n}=e;return n.map((e=>({type:t,codeValue:e})))})),o.hK$,(0,i.andThen)((0,i.pipe)(l.N5.lookups.actions.lookupsListResolved,E)))(d)}),[e]),(0,o.ZxB)(t,c,s,u,m,p)}},67885:(e,t,n)=>{let a;n.d(t,{o:()=>a}),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(a||(a={}))}}]);
2
2
  //# sourceMappingURL=5605.js.map