@reltio/remotes 1.4.1269 → 1.4.1271
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/1920.js +1 -1
- package/2114.js +1 -1
- package/2114.js.map +1 -1
- package/{9838.css → 2192.css} +1 -1
- package/{9838.css.map → 2192.css.map} +1 -1
- package/{9838.js → 2192.js} +2 -2
- package/2192.js.map +1 -0
- package/2689.js +2 -0
- package/2689.js.map +1 -0
- package/2768.js +1 -1
- package/2890.js +1 -1
- package/350.js +1 -1
- package/350.js.map +1 -1
- package/3540.js +1 -1
- package/3540.js.map +1 -1
- package/3745.js +1 -1
- package/3786.js +1 -1
- package/4361.js +1 -1
- package/4621.js +1 -1
- package/4689.js +1 -1
- package/4771.js +1 -1
- package/4843.js +1 -1
- package/4889.js +1 -1
- package/5400.js +1 -1
- package/5709.js +1 -1
- package/5720.js +1 -1
- package/5884.js +1 -1
- package/5953.js +1 -1
- package/621.js +1 -1
- package/6217.js +1 -1
- package/6499.js +1 -1
- package/6596.js +1 -1
- package/6710.js +1 -1
- package/6971.js +1 -1
- package/7147.js +1 -1
- package/7383.js +1 -1
- package/7952.js +1 -1
- package/8174.js +1 -1
- package/8337.js +1 -1
- package/8439.js +1 -1
- package/9431.js +1 -1
- package/9630.js +1 -1
- package/9983.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/8695.js +0 -2
- package/8695.js.map +0 -1
- package/9838.js.map +0 -1
package/621.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[621],{10159:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(94079);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const o=e=>l().createElement("svg",a({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),l().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},l().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),l().createElement("g",{mask:"url(#AttributesList_svg__a)"},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),l().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),l().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),l().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),l().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),l().createElement("defs",null,l().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),l().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),l().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopOpacity:.01}),l().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=o,text:n,secondaryText:r}=e;const a=s();return l().createElement("div",{className:a.root},l().createElement(t,{className:a.logo}),l().createElement("div",{className:a.textBox},l().createElement(i.Typography,{className:a.text},n),r&&l().createElement(i.Typography,{className:a.secondaryText},r)))}},91515:(e,t,n)=>{n.d(t,{Z:()=>ee});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(94079),s=n(17440),c=n(51229),u=n(36444),d=n(22385),p=n(48465),m=n(85451),f=n(27815),E=n(71153),h=n.n(E),y=n(31517),v=n(67885);const g=[v.K.WITHIN,v.K.AGO,v.K.BETWEEN],b=e=>({[v.K.WITHIN]:a().text("Within the last"),[v.K.AGO]:a().text("More than"),[v.K.BETWEEN]:a().text("Date range")}[e]||"");var x=n(39621),T=n(20562),I=n(51843),N=n(79692);const w=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),O=[null,null],C=[null,"hours"],S=e=>{let{value:t,onChange:n,className:i}=e;const s=w(),c=e=>e===v.K.WITHIN||e===v.K.AGO,u=e=>e===v.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:O,p=c(null==t?void 0:t.type)?t.period:C,[m,f]=(0,r.useState)(d),[E,N]=(0,r.useState)(p),S=(null==t?void 0:t.type)||v.K.WITHIN,R=e=>c(e)?E:u(e)?m:void 0,D=e=>{n({type:S,period:e})};return(0,T.D)((()=>{t?c(t.type)?N(t.period):u(t.type)&&f(t.period):(f(O),N(C))}),[t]),l().createElement("div",{className:h()(s.root,i)},l().createElement(o.Typography,{className:s.title,variant:"subtitle1"},a().text("Date")),l().createElement("div",{className:s.intervalContainer},l().createElement(y.Z,{label:"",className:s.typeInput,value:{value:S,label:b(S)},options:g.map((e=>({value:e,label:b(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:R(r),type:r})}}),c(S)?l().createElement(x.Z,{interval:E,onChange:D}):l().createElement(I.Z,{values:m,onChange:D})))};var R=n(92575),D=n(96808),M=n(65942);const _=[M.M.UPDATE,M.M.MERGE,M.M.UNMERGE];function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){L(e,t,n[t])}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A={input:e=>k({},e,{fontSize:"14px"}),menuPortal:e=>k({},e,{zIndex:1300})},P=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),H=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const i=P(),c=e=>{return{value:e,label:(t=e,{[M.M.UPDATE]:a().text("Update"),[M.M.MERGE]:a().text("Merge"),[M.M.UNMERGE]:a().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),d=u(_);return l().createElement("div",{className:h()(i.root,r)},l().createElement(o.Typography,{className:i.title,variant:"subtitle1"},a().text("Activity")),l().createElement(R.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:D.Z},styles:A,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))};var G=n(85890);const j=(0,N.Z)({popup:{width:500,minHeight:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B=e=>{let{className:t,filter:n,onApplyFilter:i,entityType:c}=e;const E=j(),h=(0,r.useRef)(),[y,v]=(0,r.useState)(!1),[g,b]=(0,r.useState)(n),{activities:x=[],attributes:T=[],dateRange:I=null,users:N=[]}=g||{},w=(0,G.FE)(n)?"inherit":"primary";(0,r.useEffect)((()=>{y&&b(n)}),[n,y]);const O=(0,s.curry)(((e,t)=>{b((n=>F({},n,{[e]:t})))})),C=(0,r.useCallback)((()=>{v((e=>!e))}),[]),R=(0,r.useCallback)((()=>{I&&(0,p.R)(I)?i(g):i((0,s.dissoc)("dateRange",g)),C()}),[g,I,i,C]),D=(0,r.useCallback)((()=>{b(F({},G.tO))}),[]);return l().createElement(l().Fragment,null,l().createElement(d.Z,{ref:h,color:w,icon:u.Z,size:"L",onClick:C,className:t}),l().createElement(o.Popover,{classes:{paper:E.popup},open:y,anchorEl:h.current,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:E.filterContainer},l().createElement(o.Typography,{variant:"h6"},a().text("Filter")),l().createElement("div",{className:E.filterContainerScrollable},l().createElement(S,{value:I,onChange:O("dateRange"),className:E.filterItem}),l().createElement(m.Z,{selectedUsers:N,onChange:O("users"),className:E.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:x,onChange:O("activities"),className:E.filterItem}),l().createElement(f.Z,{selectedAttributes:T,entityType:c,onChange:O("attributes"),className:E.filterItem,title:a().text("Attribute updated")}))),l().createElement("div",{className:E.filterControls},l().createElement(o.Button,{onClick:D,className:E.clearButton},a().text("Clear all")),l().createElement(o.Button,{onClick:C},a().text("Cancel")),l().createElement(o.Button,{color:"primary",onClick:R},a().text("Apply")))))};var Z=n(52730),z=n(43054),$=n(59431),K=n(55847),W=n(98281),Y=n(31276);const V=(0,N.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),q=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=Y.ZT}=e;const i=V(),{text:a,selected:s,onClick:c}=n;return l().createElement(o.MenuItem,{classes:{root:i.menuItem},onClick:e=>{r(),c(e)},ref:t},s&&l().createElement(W.Z,{className:i.checkIcon}),l().createElement(o.Typography,{classes:{root:i.menuText}},a))}));q.displayName="MenuItemRenderer";const X=q,J=()=>{const e=(0,Z.useSelector)($.ZP.selectors.getHistoryMode),t=(0,Z.useDispatch)(),n=e=>{t($.N5.history.actions.setHistoryMode(e))},r=[{text:a().text("Compare to Current view"),selected:e===$.Z9.Current,onClick:()=>n($.Z9.Current)},{text:a().text("Compare to Previous view"),selected:e===$.Z9.Previous,onClick:()=>n($.Z9.Previous)}];return l().createElement(K.Z,{MenuItemRenderer:X,buttonComponent:d.Z,buttonProps:{icon:z.Z,size:"L"},menuId:"history-menu",menuItems:r})},Q=(0,N.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),ee=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:i}=e;const u=Q();return l().createElement("div",{className:u.root},l().createElement(o.Typography,{variant:"h6"},a().text("History")),!(0,s.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(o.Divider,{orientation:"vertical",flexItem:!0,className:u.divider}),l().createElement(o.Typography,{variant:"body1",color:"textSecondary",className:u.count},1===t?a().text("${count} contributing profile",{count:t}):a().text("${count} contributing profiles",{count:t}))),l().createElement(c.Z,null),l().createElement(B,{className:u.filterButton,entityType:n,filter:r,onApplyFilter:i}),l().createElement(J,null))}},6674:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(10159);const s=()=>l().createElement(o.Z,{text:a().text("History in the making"),secondaryText:a().text("When you create an event or perform an activity, it will show up here.")})},54362:(e,t,n)=>{n.d(t,{Z:()=>G});var r=n(24328),l=n.n(r),i=n(52730),a=n(44443),o=n(87918),s=n.n(o),c=n(17440),u=n(71153),d=n.n(u),p=n(99831),m=n(59431),f=n(94079),E=n(34606),h=n(79692);const y=(0,h.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),v=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:i}=e;const{uri:a,type:o,matchGroups:c,user:u,timestamp:m}=t,h=(0,p.GtP)(a),v=y({color:h});return l().createElement("div",{className:d()(v.historyRow,{[v.selected]:r}),onClick:i},l().createElement("div",{className:v.rowHeader},l().createElement("div",{className:v.badge}),l().createElement(f.Typography,{className:d()(v.title,{bold:n})},n?s().text("Current view"):(0,E.Xr)(o)),!n&&l().createElement(f.Typography,{className:v.date},s().date(m,"L LT"))),c&&l().createElement(f.Typography,{className:v.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(f.Typography,{className:v.user},u))};var g=n(55912);const b=e=>e===g.b.FAKE_FILTERED_INCOMING||e===g.b.FAKE_FILTERED_OUTGOING,x=e=>{let{x:t,y:n,toX:r,toY:i,color:a,isDashed:o}=e;const s=((e,t,n,r)=>{const l=t>r,i=e<n,a=l?-6:6;return`M${e} ${t} L${i?n-12:n+12} ${t} ${i?`c 6 0 12 ${a} 12`:`c -6 0 -12 ${a} -12`} ${l?-12:12} L${n} ${r}`})(t,n,r,i);return l().createElement("path",{d:s,stroke:a,strokeWidth:2,fill:"none",strokeDasharray:o?"3,3":void 0})};function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}const I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:i,isDashed:a,isCollapsed:o,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",T({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:n-d-4,y:r-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:n,cy:r,r:d,fill:a?"#fff":i,stroke:i,strokeDasharray:a?"1,1":void 0,strokeWidth:2}),s&&l().createElement("g",{id:"icon"},l().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),o&&l().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const N=(0,n(83348).Z)(I),w=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:i}=t,a=[16],{links:o,rowLines:s,circles:c}=i.reduce(((e,t,o)=>{let{uri:s,height:c,uris:u,type:d,fakeType:m,index:f,timestamp:E,label:h}=t;const y=16*r[s].index+24,v=a[o];a.push(v+c);const T=b(m),I=T?u[0]:s,w=!(null!=u&&u.some((e=>r[e])));e.circles.push(l().createElement(N,{tooltipTitle:h,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${I}-${o}`,x:y,y:v,color:(0,p.GtP)(I),isDashed:T,isCollapsed:w,showCollapseIcon:!!u,showLine:m===g.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${I}-${f}`,x:y,y:v-8,width:"100%",height:16,fill:(0,p.GtP)(I),opacity:.06}));const O=d===g.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const a=i[o].height,s=16*n.index+24,c=O?v-a:v+a;y!==s&&e.links.push(l().createElement(x,{key:`link-${t}-${f}`,x:y,y:v,toX:s,toY:c,isDashed:b(m),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,d=a[a.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:m}=e;if((null===(u=i[null==m?void 0:m.index])||void 0===u?void 0:u.type)===g.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===g.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==m?void 0:m.type)===g.b.ENTITIES_MERGED_MANUALLY||(null==m?void 0:m.type)===g.b.ENTITIES_MERGED?(null==m?void 0:m.index)+1:null==m?void 0:m.index,h=a[f]||a[a.length-2],y=a[E]||16;if(h<=y)return;const v=(0,p.GtP)(t);!m&&n.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y,color:v,showLine:!0})),o.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${h} L${r} ${y}`,stroke:v,strokeWidth:2}))}))})),l().createElement("svg",{className:"chart",width:u,height:d},l().createElement("g",{id:"rowLines"},s),l().createElement("g",{id:"links"},o),l().createElement("g",{id:"circles"},c))}));var O=n(99136);const C=(0,h.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=e=>{let{historyData:t,isLoading:n,canLoadMore:o,onLoadMore:u,entityUri:E,historyEvent:h,findPreviousChange:y}=e;const g=C(),b=(0,i.useDispatch)(),x=(0,i.useSelector)(m.ZP.selectors.getIsEditableMode),T=(0,i.useSelector)(m.ZP.selectors.getMetadata),[I,N]=(0,r.useState)({historyLanes:{},rows:[]}),[R,D]=(0,r.useState)(!1),[M,_]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(h))return void _(0);const e=e=>(null==e?void 0:e.uri)===((null==h?void 0:h.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==h?void 0:h.aStamp),n=-1!==M?t.rows[M]:null,r=t.rows.findIndex((t=>e(t)));_(e(n)?M:r)}),[t.rows,h]);const k=(0,r.useRef)(null),L=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return S({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));N({historyLanes:t.historyLanes,rows:r})}}),[t]),A=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==k?void 0:k.current)||{};D(n<e-t)};return l().createElement("div",{className:g.historyTree},n&&l().createElement(O.Z,null),l().createElement("div",{className:d()(g.graph,{[g.shadow]:R}),onScroll:A,ref:k},l().createElement(w,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(I.rows[n].label)){const r={time:t,select:"crosswalks"};(0,p.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(T,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");N((e=>S({},e,{rows:e.rows.map((e=>e.index===n?S({},e,{label:r}):e))})))}))}},graphData:I}),l().createElement(a.Z,{handleWidth:!0,onResize:A})),l().createElement("div",{ref:L,className:g.history},t.rows.map(((e,t)=>{const n=t===M,r=0===t;return l().createElement(v,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(x){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;b(m.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(r&&!n||!r&&n)b(m.N5.history.actions.clearHistoryEvent()),_(0);else if(!r&&!n){const n=y(e-1,t.uri||E),r=y(e,t.uri||E),l=null==n?void 0:n.timestamp,i=null==r?void 0:r.timestamp,a=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;b(m.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:a})),_(e)}})(t,e,n,r)})}))),o&&l().createElement("div",{className:g.buttonContainer},l().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},M=(0,h.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),_=(0,h.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),k=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const i=(0,p.GtP)(t),a=_({color:i});return l().createElement("div",{className:d()(a.icon,{[a.inactive]:!n,[a.active]:n,[a.clickable]:!!r}),onClick:r})},L=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:i,className:a}=e;const o=M();return l().createElement("div",{className:d()(o.root,a)},l().createElement(k,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(k,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?i((0,c.without)([e],n)):i([...n||[],e])})(e)}))))};function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=(e,t)=>e.reduce(((e,n,r)=>{let{start:l,end:i}=n;if(l){const n=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(i){const n=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),H=(0,h.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:i,entityUri:a,canLoadMore:o,onLoadMore:s,historyEvent:u}=e;const d=H(),[p,m]=(0,r.useState)(null);(0,r.useEffect)((()=>{m(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:l}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,n,r)=>{const l=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==g.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var i;if(l===e||n&&null!==(i=r.uris)&&void 0!==i&&i.includes(e))return r}return null})),a=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,r)))(n),o=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==g.b.ENTITY_CREATED||t.type!==g.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},p=[];return null==n||n.forEach(((n,l)=>{var i;switch(n.type){case g.b.ENTITIES_SPLITTED:if(!a(l,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=a(l,t,!0);if(r&&(!e||e===r.uri))return}break;case g.b.ENTITY_LOST_MERGE:case g.b.RELATIONSHIP_CREATED:case g.b.RELATIONSHIP_REMOVED:case g.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=n.uris)||void 0===i||i.forEach((e=>{o(e)||(c=!0)}));const m=o(n.uri||t);if(!m)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){A(e,t,n[t])}))}return e}({},n);((t,n)=>{var l,i;switch(n.type){case g.b.ENTITY_CREATED:s(t,n);break;case g.b.ENTITIES_MERGED_ON_THE_FLY:case g.b.ENTITY_CHANGED:u(t,n);break;case g.b.ENTITY_LOST_MERGE:case g.b.ENTITY_REMOVED:d(t,n);break;case g.b.ENTITIES_SPLITTED:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,n):d(l.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:i?g.b.FAKE_UPDATE:g.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(i=n.uris)||void 0===i||i.forEach((t=>{const r=e[t];r&&d(r.lifeTime,n)}))}})(m.lifeTime,f),c&&p.push(f),r.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||n.forEach((n=>{let{uri:i,uris:a,timestamp:o,user:s,type:u}=n;i===l&&(null==a||a.forEach((n=>{const l=e[n];if(!l)return;let i=null;switch(u){case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:i=g.b.FAKE_FILTERED_INCOMING;break;case g.b.ENTITIES_SPLITTED:i=g.b.FAKE_FILTERED_OUTGOING;break;default:return}const a={fakeType:i,uri:t.uri,uris:[n],type:u,user:s,timestamp:o},d=P(l.lifeTime,t.timestamp);i===g.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(d.endIndex)||(l.lifeTime[d.endIndex].end=a):(0,c.isNil)(d.startIndex)||(l.lifeTime[d.startIndex].start=a),r.splice(r.indexOf(t),0,a)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(r)}}),[t,n,l])})({entityUri:a,historyChanges:null==n?void 0:n.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(L,{values:i,selectedValues:p,onSelectValues:m,entityUri:a,className:d.borderBottom}),l().createElement(D,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:o,entityUri:a,historyEvent:u,findPreviousChange:E}))}))},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),l=n.n(r),i=n(52730),a=n(59431),o=n(94079),s=n(17440),c=n(87918),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,i.useSelector)(a.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,s.pipe)(a.N5.history.actions.clearHistoryEvent,n);return t?l().createElement("div",{className:e.root},l().createElement(o.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",l().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),l().createElement(o.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},85890:(e,t,n)=>{n.d(t,{tO:()=>d,FE:()=>p,k6:()=>m});var r=n(24328),l=n(99831),i=n(17440),a=n(65942),o=n(48465),s=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={activities:[a.M.MERGE,a.M.UNMERGE,a.M.UPDATE]},p=e=>(0,i.pipe)((0,i.evolve)({activities:(0,i.difference)(d.activities)}),(0,i.reject)((0,i.either)(i.isNil,i.isEmpty)),i.isEmpty)(e||{}),m=e=>{let{entity:t,enabled:n}=e;const[i,a]=(0,r.useState)(d),[u,p]=(0,r.useState)(0),m=(0,r.useMemo)((()=>(0,o.Z)(i)),[i]),[f,E]=(0,r.useState)(null),[h,y]=(0,r.useState)(null),[v,g]=(0,r.useState)(!1),b=(0,s._)(),x=null==t?void 0:t.uri,T={max:32,order:"desc"},I=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I},T))).then(y).catch((e=>{console.warn("Failed to load history data",e),y(null)})).finally((()=>{g(!1)})))}),[m,I,f]),(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.wdF)({entityUri:x})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{g(!1)})),p(0))}),[x,null==t?void 0:t.updatedTime,n]);const N=(0,r.useCallback)((e=>{x&&f&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I,offset:e},T))).then((e=>{y((t=>c({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{g(!1)})))}),[f,m,n]),w=(0,r.useMemo)((()=>32*(u+1)<(null==h?void 0:h.total)),[h,u]),O=(0,r.useCallback)((e=>{p(0),a(e)}),[]),C=(0,r.useCallback)((()=>{O(c({},d))}),[]),S=(0,r.useCallback)((()=>{w&&(N(32*(u+1)),p(u+1))}),[N,u,w]);return{isLoading:v,canLoadMore:w,onLoadMore:S,onApplyFilter:O,onClearFilter:C,historicUris:f,historyWithTotal:h,historyFilter:i}}},71820:(e,t,n)=>{n.d(t,{C:()=>i});var r=n(24328),l=n(99831);const i=e=>{let{isHistoryTabActive:t,entity:n}=e;const[i,a]=(0,r.useState)(!1),o=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||a(!1)}),[o]),(0,r.useEffect)((()=>{t&&a(!0)}),[t]);const s=o&&!(0,l.ZiX)(o)&&!(0,l.biM)(n);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},57730:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),l=n(52730),i=n(59431),a=n(99831),o=n(85229);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,o._)(),{aStamp:m,bStamp:f,overrideUri:E}=n||{},h=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&h&&(c(!0),p(Promise.all([(0,a.lrH)(h,m),f&&1!==f?(0,a.lrH)(h,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[m,f,h]),{isLoading:s,historySlice:u}}},55912:(e,t,n)=>{n.d(t,{b:()=>a});var r,l=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},l.I,r)},65942:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},48465:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),l=n.n(r),i=n(17440),a=n(99831),o=n(65942),s=n(31537),c=n(67885);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},p=(0,i.chain)((0,i.cond)([[(0,i.equals)(o.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,i.equals)(o.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,i.equals)(o.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),m=(0,i.pipe)((0,i.defaultTo)([]),p,(0,i.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,i.pipe)((0,i.defaultTo)({}),(0,i.reject)(a.O27),(0,i.evolve)({users:u((e=>`equals(user, '${(0,a.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,a.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(n)})`;case c.K.AGO:return`lte(timestamp, ${d(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),m),i.values,(0,i.reject)(a.O27),(0,i.append)("not equals(user, 'collaboration-service')"),(0,i.map)((e=>`(${e})`)),(0,i.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[621],{10159:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(94079);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const o=e=>l().createElement("svg",a({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),l().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},l().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),l().createElement("g",{mask:"url(#AttributesList_svg__a)"},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),l().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),l().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),l().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),l().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),l().createElement("defs",null,l().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),l().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),l().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopOpacity:.01}),l().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=o,text:n,secondaryText:r}=e;const a=s();return l().createElement("div",{className:a.root},l().createElement(t,{className:a.logo}),l().createElement("div",{className:a.textBox},l().createElement(i.Typography,{className:a.text},n),r&&l().createElement(i.Typography,{className:a.secondaryText},r)))}},91515:(e,t,n)=>{n.d(t,{Z:()=>ee});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(94079),s=n(17440),c=n(51229),u=n(36444),d=n(22385),p=n(48465),m=n(85451),f=n(27815),E=n(71153),h=n.n(E),y=n(31517),v=n(67885);const g=[v.K.WITHIN,v.K.AGO,v.K.BETWEEN],b=e=>({[v.K.WITHIN]:a().text("Within the last"),[v.K.AGO]:a().text("More than"),[v.K.BETWEEN]:a().text("Date range")}[e]||"");var x=n(39621),T=n(20562),I=n(51843),N=n(79692);const w=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),O=[null,null],C=[null,"hours"],S=e=>{let{value:t,onChange:n,className:i}=e;const s=w(),c=e=>e===v.K.WITHIN||e===v.K.AGO,u=e=>e===v.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:O,p=c(null==t?void 0:t.type)?t.period:C,[m,f]=(0,r.useState)(d),[E,N]=(0,r.useState)(p),S=(null==t?void 0:t.type)||v.K.WITHIN,R=e=>c(e)?E:u(e)?m:void 0,D=e=>{n({type:S,period:e})};return(0,T.D)((()=>{t?c(t.type)?N(t.period):u(t.type)&&f(t.period):(f(O),N(C))}),[t]),l().createElement("div",{className:h()(s.root,i)},l().createElement(o.Typography,{className:s.title,variant:"subtitle1"},a().text("Date")),l().createElement("div",{className:s.intervalContainer},l().createElement(y.Z,{label:"",className:s.typeInput,value:{value:S,label:b(S)},options:g.map((e=>({value:e,label:b(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:R(r),type:r})}}),c(S)?l().createElement(x.Z,{interval:E,onChange:D}):l().createElement(I.Z,{values:m,onChange:D})))};var R=n(92575),D=n(96808),M=n(65942);const _=[M.M.UPDATE,M.M.MERGE,M.M.UNMERGE];function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){L(e,t,n[t])}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A={input:e=>k({},e,{fontSize:"14px"}),menuPortal:e=>k({},e,{zIndex:1300})},P=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),H=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const i=P(),c=e=>{return{value:e,label:(t=e,{[M.M.UPDATE]:a().text("Update"),[M.M.MERGE]:a().text("Merge"),[M.M.UNMERGE]:a().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),d=u(_);return l().createElement("div",{className:h()(i.root,r)},l().createElement(o.Typography,{className:i.title,variant:"subtitle1"},a().text("Activity")),l().createElement(R.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:D.Z},styles:A,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))};var G=n(85890);const j=(0,N.Z)({popup:{width:500,minHeight:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){U(e,t,n[t])}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B=e=>{let{className:t,filter:n,onApplyFilter:i,entityType:c}=e;const E=j(),h=(0,r.useRef)(),[y,v]=(0,r.useState)(!1),[g,b]=(0,r.useState)(n),{activities:x=[],attributes:T=[],dateRange:I=null,users:N=[]}=g||{},w=(0,G.FE)(n)?"inherit":"primary";(0,r.useEffect)((()=>{y&&b(n)}),[n,y]);const O=(0,s.curry)(((e,t)=>{b((n=>F({},n,{[e]:t})))})),C=(0,r.useCallback)((()=>{v((e=>!e))}),[]),R=(0,r.useCallback)((()=>{I&&(0,p.R)(I)?i(g):i((0,s.dissoc)("dateRange",g)),C()}),[g,I,i,C]),D=(0,r.useCallback)((()=>{b(F({},G.tO))}),[]);return l().createElement(l().Fragment,null,l().createElement(d.Z,{ref:h,color:w,icon:u.Z,size:"L",onClick:C,className:t}),l().createElement(o.Popover,{classes:{paper:E.popup},open:y,anchorEl:h.current,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:E.filterContainer},l().createElement(o.Typography,{variant:"h6"},a().text("Filter")),l().createElement("div",{className:E.filterContainerScrollable},l().createElement(S,{value:I,onChange:O("dateRange"),className:E.filterItem}),l().createElement(m.Z,{selectedUsers:N,onChange:O("users"),className:E.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:x,onChange:O("activities"),className:E.filterItem}),l().createElement(f.Z,{selectedAttributes:T,entityType:c,onChange:O("attributes"),className:E.filterItem,title:a().text("Attribute updated")}))),l().createElement("div",{className:E.filterControls},l().createElement(o.Button,{onClick:D,className:E.clearButton},a().text("Clear all")),l().createElement(o.Button,{onClick:C},a().text("Cancel")),l().createElement(o.Button,{color:"primary",onClick:R},a().text("Apply")))))};var Z=n(52730),z=n(43054),$=n(59431),K=n(55847),W=n(98281),Y=n(31276);const V=(0,N.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),q=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=Y.ZT}=e;const i=V(),{text:a,selected:s,onClick:c}=n;return l().createElement(o.MenuItem,{classes:{root:i.menuItem},onClick:e=>{r(),c(e)},ref:t},s&&l().createElement(W.Z,{className:i.checkIcon}),l().createElement(o.Typography,{classes:{root:i.menuText}},a))}));q.displayName="MenuItemRenderer";const X=q,J=()=>{const e=(0,Z.useSelector)($.ZP.selectors.getHistoryMode),t=(0,Z.useDispatch)(),n=e=>{t($.N5.history.actions.setHistoryMode(e))},r=[{text:a().text("Compare to Current view"),selected:e===$.Z9.Current,onClick:()=>n($.Z9.Current)},{text:a().text("Compare to Previous view"),selected:e===$.Z9.Previous,onClick:()=>n($.Z9.Previous)}];return l().createElement(K.Z,{MenuItemRenderer:X,buttonComponent:d.Z,buttonProps:{icon:z.Z,size:"L"},menuId:"history-menu",menuItems:r})},Q=(0,N.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),ee=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:i}=e;const u=Q();return l().createElement("div",{className:u.root},l().createElement(o.Typography,{variant:"h6"},a().text("History")),!(0,s.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(o.Divider,{orientation:"vertical",flexItem:!0,className:u.divider}),l().createElement(o.Typography,{variant:"body1",color:"textSecondary",className:u.count},1===t?a().text("${count} contributing profile",{count:t}):a().text("${count} contributing profiles",{count:t}))),l().createElement(c.Z,null),l().createElement(B,{className:u.filterButton,entityType:n,filter:r,onApplyFilter:i}),l().createElement(J,null))}},6674:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),l=n.n(r),i=n(87918),a=n.n(i),o=n(10159);const s=()=>l().createElement(o.Z,{text:a().text("History in the making"),secondaryText:a().text("When you create an event or perform an activity, it will show up here.")})},54362:(e,t,n)=>{n.d(t,{Z:()=>G});var r=n(24328),l=n.n(r),i=n(52730),a=n(44443),o=n(87918),s=n.n(o),c=n(17440),u=n(71153),d=n.n(u),p=n(93228),m=n(59431),f=n(94079),E=n(34606),h=n(79692);const y=(0,h.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),v=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:i}=e;const{uri:a,type:o,matchGroups:c,user:u,timestamp:m}=t,h=(0,p.GtP)(a),v=y({color:h});return l().createElement("div",{className:d()(v.historyRow,{[v.selected]:r}),onClick:i},l().createElement("div",{className:v.rowHeader},l().createElement("div",{className:v.badge}),l().createElement(f.Typography,{className:d()(v.title,{bold:n})},n?s().text("Current view"):(0,E.Xr)(o)),!n&&l().createElement(f.Typography,{className:v.date},s().date(m,"L LT"))),c&&l().createElement(f.Typography,{className:v.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(f.Typography,{className:v.user},u))};var g=n(55912);const b=e=>e===g.b.FAKE_FILTERED_INCOMING||e===g.b.FAKE_FILTERED_OUTGOING,x=e=>{let{x:t,y:n,toX:r,toY:i,color:a,isDashed:o}=e;const s=((e,t,n,r)=>{const l=t>r,i=e<n,a=l?-6:6;return`M${e} ${t} L${i?n-12:n+12} ${t} ${i?`c 6 0 12 ${a} 12`:`c -6 0 -12 ${a} -12`} ${l?-12:12} L${n} ${r}`})(t,n,r,i);return l().createElement("path",{d:s,stroke:a,strokeWidth:2,fill:"none",strokeDasharray:o?"3,3":void 0})};function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}const I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:i,isDashed:a,isCollapsed:o,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",T({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:n-d-4,y:r-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:n,cy:r,r:d,fill:a?"#fff":i,stroke:i,strokeDasharray:a?"1,1":void 0,strokeWidth:2}),s&&l().createElement("g",{id:"icon"},l().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),o&&l().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const N=(0,n(83348).Z)(I),w=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:i}=t,a=[16],{links:o,rowLines:s,circles:c}=i.reduce(((e,t,o)=>{let{uri:s,height:c,uris:u,type:d,fakeType:m,index:f,timestamp:E,label:h}=t;const y=16*r[s].index+24,v=a[o];a.push(v+c);const T=b(m),I=T?u[0]:s,w=!(null!=u&&u.some((e=>r[e])));e.circles.push(l().createElement(N,{tooltipTitle:h,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${I}-${o}`,x:y,y:v,color:(0,p.GtP)(I),isDashed:T,isCollapsed:w,showCollapseIcon:!!u,showLine:m===g.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${I}-${f}`,x:y,y:v-8,width:"100%",height:16,fill:(0,p.GtP)(I),opacity:.06}));const O=d===g.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const a=i[o].height,s=16*n.index+24,c=O?v-a:v+a;y!==s&&e.links.push(l().createElement(x,{key:`link-${t}-${f}`,x:y,y:v,toX:s,toY:c,isDashed:b(m),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,d=a[a.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:m}=e;if((null===(u=i[null==m?void 0:m.index])||void 0===u?void 0:u.type)===g.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===g.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==m?void 0:m.type)===g.b.ENTITIES_MERGED_MANUALLY||(null==m?void 0:m.type)===g.b.ENTITIES_MERGED?(null==m?void 0:m.index)+1:null==m?void 0:m.index,h=a[f]||a[a.length-2],y=a[E]||16;if(h<=y)return;const v=(0,p.GtP)(t);!m&&n.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y,color:v,showLine:!0})),o.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${h} L${r} ${y}`,stroke:v,strokeWidth:2}))}))})),l().createElement("svg",{className:"chart",width:u,height:d},l().createElement("g",{id:"rowLines"},s),l().createElement("g",{id:"links"},o),l().createElement("g",{id:"circles"},c))}));var O=n(99136);const C=(0,h.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=e=>{let{historyData:t,isLoading:n,canLoadMore:o,onLoadMore:u,entityUri:E,historyEvent:h,findPreviousChange:y}=e;const g=C(),b=(0,i.useDispatch)(),x=(0,i.useSelector)(m.ZP.selectors.getIsEditableMode),T=(0,i.useSelector)(m.ZP.selectors.getMetadata),[I,N]=(0,r.useState)({historyLanes:{},rows:[]}),[R,D]=(0,r.useState)(!1),[M,_]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(h))return void _(0);const e=e=>(null==e?void 0:e.uri)===((null==h?void 0:h.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==h?void 0:h.aStamp),n=-1!==M?t.rows[M]:null,r=t.rows.findIndex((t=>e(t)));_(e(n)?M:r)}),[t.rows,h]);const k=(0,r.useRef)(null),L=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return S({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));N({historyLanes:t.historyLanes,rows:r})}}),[t]),A=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==k?void 0:k.current)||{};D(n<e-t)};return l().createElement("div",{className:g.historyTree},n&&l().createElement(O.Z,null),l().createElement("div",{className:d()(g.graph,{[g.shadow]:R}),onScroll:A,ref:k},l().createElement(w,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(I.rows[n].label)){const r={time:t,select:"crosswalks"};(0,p.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(T,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");N((e=>S({},e,{rows:e.rows.map((e=>e.index===n?S({},e,{label:r}):e))})))}))}},graphData:I}),l().createElement(a.Z,{handleWidth:!0,onResize:A})),l().createElement("div",{ref:L,className:g.history},t.rows.map(((e,t)=>{const n=t===M,r=0===t;return l().createElement(v,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(x){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;b(m.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(r&&!n||!r&&n)b(m.N5.history.actions.clearHistoryEvent()),_(0);else if(!r&&!n){const n=y(e-1,t.uri||E),r=y(e,t.uri||E),l=null==n?void 0:n.timestamp,i=null==r?void 0:r.timestamp,a=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;b(m.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:a})),_(e)}})(t,e,n,r)})}))),o&&l().createElement("div",{className:g.buttonContainer},l().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},M=(0,h.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),_=(0,h.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),k=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const i=(0,p.GtP)(t),a=_({color:i});return l().createElement("div",{className:d()(a.icon,{[a.inactive]:!n,[a.active]:n,[a.clickable]:!!r}),onClick:r})},L=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:i,className:a}=e;const o=M();return l().createElement("div",{className:d()(o.root,a)},l().createElement(k,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(k,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?i((0,c.without)([e],n)):i([...n||[],e])})(e)}))))};function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=(e,t)=>e.reduce(((e,n,r)=>{let{start:l,end:i}=n;if(l){const n=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(i){const n=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),H=(0,h.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:i,entityUri:a,canLoadMore:o,onLoadMore:s,historyEvent:u}=e;const d=H(),[p,m]=(0,r.useState)(null);(0,r.useEffect)((()=>{m(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:l}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,n,r)=>{const l=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==g.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var i;if(l===e||n&&null!==(i=r.uris)&&void 0!==i&&i.includes(e))return r}return null})),a=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,r)))(n),o=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==g.b.ENTITY_CREATED||t.type!==g.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},p=[];return null==n||n.forEach(((n,l)=>{var i;switch(n.type){case g.b.ENTITIES_SPLITTED:if(!a(l,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=a(l,t,!0);if(r&&(!e||e===r.uri))return}break;case g.b.ENTITY_LOST_MERGE:case g.b.RELATIONSHIP_CREATED:case g.b.RELATIONSHIP_REMOVED:case g.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=n.uris)||void 0===i||i.forEach((e=>{o(e)||(c=!0)}));const m=o(n.uri||t);if(!m)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){A(e,t,n[t])}))}return e}({},n);((t,n)=>{var l,i;switch(n.type){case g.b.ENTITY_CREATED:s(t,n);break;case g.b.ENTITIES_MERGED_ON_THE_FLY:case g.b.ENTITY_CHANGED:u(t,n);break;case g.b.ENTITY_LOST_MERGE:case g.b.ENTITY_REMOVED:d(t,n);break;case g.b.ENTITIES_SPLITTED:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,n):d(l.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:i?g.b.FAKE_UPDATE:g.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(i=n.uris)||void 0===i||i.forEach((t=>{const r=e[t];r&&d(r.lifeTime,n)}))}})(m.lifeTime,f),c&&p.push(f),r.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||n.forEach((n=>{let{uri:i,uris:a,timestamp:o,user:s,type:u}=n;i===l&&(null==a||a.forEach((n=>{const l=e[n];if(!l)return;let i=null;switch(u){case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:i=g.b.FAKE_FILTERED_INCOMING;break;case g.b.ENTITIES_SPLITTED:i=g.b.FAKE_FILTERED_OUTGOING;break;default:return}const a={fakeType:i,uri:t.uri,uris:[n],type:u,user:s,timestamp:o},d=P(l.lifeTime,t.timestamp);i===g.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(d.endIndex)||(l.lifeTime[d.endIndex].end=a):(0,c.isNil)(d.startIndex)||(l.lifeTime[d.startIndex].start=a),r.splice(r.indexOf(t),0,a)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(r)}}),[t,n,l])})({entityUri:a,historyChanges:null==n?void 0:n.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(L,{values:i,selectedValues:p,onSelectValues:m,entityUri:a,className:d.borderBottom}),l().createElement(D,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:o,entityUri:a,historyEvent:u,findPreviousChange:E}))}))},3409:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),l=n.n(r),i=n(52730),a=n(59431),o=n(94079),s=n(17440),c=n(87918),u=n.n(c);const d=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),p=()=>{const e=d(),t=(0,i.useSelector)(a.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,s.pipe)(a.N5.history.actions.clearHistoryEvent,n);return t?l().createElement("div",{className:e.root},l().createElement(o.Typography,{component:"div"},u().text("You are viewing a historic slice:")," ",l().createElement("span",{className:e.slice},u().date(t.aStamp,"llll"))),l().createElement(o.Button,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},u().text("Cancel"))):null}},85890:(e,t,n)=>{n.d(t,{tO:()=>d,FE:()=>p,k6:()=>m});var r=n(24328),l=n(93228),i=n(17440),a=n(65942),o=n(48465),s=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={activities:[a.M.MERGE,a.M.UNMERGE,a.M.UPDATE]},p=e=>(0,i.pipe)((0,i.evolve)({activities:(0,i.difference)(d.activities)}),(0,i.reject)((0,i.either)(i.isNil,i.isEmpty)),i.isEmpty)(e||{}),m=e=>{let{entity:t,enabled:n}=e;const[i,a]=(0,r.useState)(d),[u,p]=(0,r.useState)(0),m=(0,r.useMemo)((()=>(0,o.Z)(i)),[i]),[f,E]=(0,r.useState)(null),[h,y]=(0,r.useState)(null),[v,g]=(0,r.useState)(!1),b=(0,s._)(),x=null==t?void 0:t.uri,T={max:32,order:"desc"},I=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I},T))).then(y).catch((e=>{console.warn("Failed to load history data",e),y(null)})).finally((()=>{g(!1)})))}),[m,I,f]),(0,r.useEffect)((()=>{x&&n&&(g(!0),b((0,l.wdF)({entityUri:x})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{g(!1)})),p(0))}),[x,null==t?void 0:t.updatedTime,n]);const N=(0,r.useCallback)((e=>{x&&f&&n&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I,offset:e},T))).then((e=>{y((t=>c({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{g(!1)})))}),[f,m,n]),w=(0,r.useMemo)((()=>32*(u+1)<(null==h?void 0:h.total)),[h,u]),O=(0,r.useCallback)((e=>{p(0),a(e)}),[]),C=(0,r.useCallback)((()=>{O(c({},d))}),[]),S=(0,r.useCallback)((()=>{w&&(N(32*(u+1)),p(u+1))}),[N,u,w]);return{isLoading:v,canLoadMore:w,onLoadMore:S,onApplyFilter:O,onClearFilter:C,historicUris:f,historyWithTotal:h,historyFilter:i}}},71820:(e,t,n)=>{n.d(t,{C:()=>i});var r=n(24328),l=n(93228);const i=e=>{let{isHistoryTabActive:t,entity:n}=e;const[i,a]=(0,r.useState)(!1),o=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||a(!1)}),[o]),(0,r.useEffect)((()=>{t&&a(!0)}),[t]);const s=o&&!(0,l.ZiX)(o)&&!(0,l.biM)(n);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},57730:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),l=n(52730),i=n(59431),a=n(93228),o=n(85229);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,o._)(),{aStamp:m,bStamp:f,overrideUri:E}=n||{},h=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&h&&(c(!0),p(Promise.all([(0,a.lrH)(h,m),f&&1!==f?(0,a.lrH)(h,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[m,f,h]),{isLoading:s,historySlice:u}}},55912:(e,t,n)=>{n.d(t,{b:()=>a});var r,l=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},l.I,r)},65942:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},48465:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),l=n.n(r),i=n(17440),a=n(93228),o=n(65942),s=n(31537),c=n(67885);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},p=(0,i.chain)((0,i.cond)([[(0,i.equals)(o.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,i.equals)(o.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,i.equals)(o.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),m=(0,i.pipe)((0,i.defaultTo)([]),p,(0,i.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,i.pipe)((0,i.defaultTo)({}),(0,i.reject)(a.O27),(0,i.evolve)({users:u((e=>`equals(user, '${(0,a.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,a.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(n)})`;case c.K.AGO:return`lte(timestamp, ${d(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),m),i.values,(0,i.reject)(a.O27),(0,i.append)("not equals(user, 'collaboration-service')"),(0,i.map)((e=>`(${e})`)),(0,i.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}}}]);
|
|
2
2
|
//# sourceMappingURL=621.js.map
|