@reltio/activity-log 1.4.1644 → 1.4.1646

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.
Files changed (2) hide show
  1. package/bundle.js +1 -1
  2. package/package.json +3 -3
package/bundle.js CHANGED
@@ -125,4 +125,4 @@
125
125
  `),sC))),mC=(0,Ct.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${(0,Ht.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((({ownerState:e,theme:t})=>(0,o.Z)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==e.variant&&{backgroundColor:"inherit"===e.color?"currentColor":(t.vars||t).palette[e.color].main},"inherit"===e.color&&{opacity:.3},"buffer"===e.variant&&{backgroundColor:uC(t,e.color),transition:"transform .4s linear"})),(({ownerState:e})=>("indeterminate"===e.variant||"query"===e.variant)&&(0,Uu.iv)(aC||(aC=iC`
126
126
  width: auto;
127
127
  animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
128
- `),lC))),hC=e.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:s,valueBuffer:u,variant:d="indeterminate"}=n,p=(0,a.Z)(n,JO),f=(0,o.Z)({},n,{color:i,variant:d}),m=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,Ht.Z)(r)}`,n],dashed:["dashed",`dashedColor${(0,Ht.Z)(r)}`],bar1:["bar",`barColor${(0,Ht.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&`barColor${(0,Ht.Z)(r)}`,"buffer"===n&&`color${(0,Ht.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,St.Z)(o,QO,t)})(f),h=(0,ca.Z)(),v={},g={bar1:{},bar2:{}};if(("determinate"===d||"buffer"===d)&&void 0!==s){v["aria-valuenow"]=Math.round(s),v["aria-valuemin"]=0,v["aria-valuemax"]=100;let e=s-100;"rtl"===h.direction&&(e=-e),g.bar1.transform=`translateX(${e}%)`}if("buffer"===d&&void 0!==u){let e=(u||0)-100;"rtl"===h.direction&&(e=-e),g.bar2.transform=`translateX(${e}%)`}return(0,c.jsxs)(dC,(0,o.Z)({className:(0,wt.Z)(m.root,r),ownerState:f,role:"progressbar"},v,{ref:t},p,{children:["buffer"===d?(0,c.jsx)(pC,{className:m.dashed,ownerState:f}):null,(0,c.jsx)(fC,{className:m.bar1,ownerState:f,style:g.bar1}),"determinate"===d?null:(0,c.jsx)(mC,{className:m.bar2,ownerState:f,style:g.bar2})]}))})),vC=(0,z.Z)({loader:{width:"100%",top:0,left:0,position:"absolute",borderRadius:"2px"}}),gC=()=>{const e=vC();return t().createElement(hC,{color:"primary",className:e.loader})},bC=[10,25,50,100],[yC]=bC,xC=(0,z.Z)((()=>({viewContent:{overflow:"hidden",position:"relative",padding:"0",display:"flex",height:"100%",flexDirection:"column"},activityLog:{height:"100%",flexGrow:1,overflowY:"auto"},headerRoot:{padding:"8px 12px 8px 24px",borderBottom:"1px solid rgba(0,0,0,0.12)"},headerTitle:{flexShrink:0},noData:{padding:"16px 24px"},basicView:{top:0,bottom:0,left:0,right:0,display:"flex",alignItems:"stretch",height:"100%",boxShadow:"none"},activityLogContainer:{height:"100%",position:"relative",overflow:"hidden"}}))),wC=(0,e.memo)((n=>{let{config:r}=n;const{exportTypes:o,caption:a}=r,i=xC(),s=(0,HO.useSelector)(WO().selectors.getMetadata),l=(0,HO.useSelector)(WO().selectors.getEntity),c=(0,D.getEntityType)(s,null==l?void 0:l.type),u=null==l?void 0:l.uri,[d,p]=(0,e.useState)(0),[f,m]=(0,e.useState)(yC),h=(0,e.useMemo)((()=>{return e=yC,bC.filter((t=>t!==e)).concat(e).sort(C.subtract);var e}),[]),[v,g]=(0,e.useState)({users:[],activities:[],attributes:[],sources:[],dateRange:{type:D.DateRangeTypes.WITHIN,period:[4,"months"]}}),{state:b,data:y,total:x,reload:w}=(t=>{let{filter:n,max:r,offset:o,entityUri:a}=t;const[i,s]=(0,e.useState)([]),[l,c]=(0,e.useState)(0),[u,d]=(0,e.useState)(lt.INIT),p=function(){let{cancelPrevious:t=!0,cancelOnUnmount:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,e.useRef)(Sr),o=()=>r.current();return(0,e.useEffect)((()=>()=>{n&&o()}),[]),(0,e.useCallback)((e=>(t&&o(),new Promise(((t,n)=>{r.current=()=>n("canceled"),e.then(t,n)})).catch((function(e){if("canceled"===e)return UO;throw e})))),[])}(),f=e=>{console.error(e),d(lt.ERROR),s([]),c(0)},m=(t=>{let{filter:n,max:r,offset:o,entityUri:a}=t;return(0,e.useCallback)((async()=>{const e=Cs(n),t=await(0,D.getProfileActivities)({filter:e,max:r,offset:o,entityUri:a}),{total:i}=await(0,D.getProfileActivitiesTotal)({filter:e,entityUri:a});return{data:t,total:i}}),[n,r,o,a])})({filter:n,max:r,offset:o,entityUri:a}),h=(0,e.useCallback)((()=>{if(!a)return;d(lt.LOADING);const e=(0,C.pipe)(m,p,(0,C.andThen)((e=>{let{data:t,total:n}=e;d(lt.LOADED),s(t),c(n)})),(0,C.otherwise)(f));e()}),[m]),v=()=>{try{h()}catch(e){f(e)}};return(0,e.useEffect)((()=>{v()}),[h]),{state:u,data:i,total:l,reload:v}})({filter:v,max:f,offset:d*f,entityUri:u}),S=(0,e.useCallback)((e=>{g(e),p(0)}),[]);return t().createElement(Ao,{className:i.basicView,"data-reltio-id":"profile-activity-log"},t().createElement(Bo,{title:a||E().text("Activity Log"),classes:{root:i.headerRoot,title:i.headerTitle}},t().createElement(Ho,{height:28,margin:28}),t().createElement(tO,{value:v,onChange:S,entityType:c,entityUri:u,exportTypes:o})),t().createElement(oO,{className:i.viewContent},t().createElement("div",{className:i.activityLogContainer},(()=>{switch(b){case lt.LOADED:return y&&0!==y.length?t().createElement(vt,{error:t().createElement(XO,{message:E().text("Something went wrong")})},t().createElement("div",{className:i.activityLog,"data-reltio-id":"profile-activity-log-container"},t().createElement(st,{handleWidth:!0,handleHeight:!0},(e=>{let{width:n=0,height:r=0}=e;return t().createElement(Po,{width:n,height:r,activities:y})})))):t().createElement(ht,{className:i.noData});case lt.LOADING:return t().createElement(gC,null);case lt.ERROR:return t().createElement(XO,{message:E().text("Error Loading Data"),onRefresh:w})}})()),!!x&&t().createElement(zO,{count:x,onChangePage:p,page:d,rowsPerPage:f,onChangeRowsPerPage:m,rowsPerPageOptions:h,labelRowsPerPage:E().text("Events per page:")})))})),SC=(0,n.Z)({productionPrefix:"profileActivityLog",disableGlobal:!0,seed:"pAL"}),OC=e=>{let{config:n,onResize:o}=e;return t().createElement(w.Provider,{value:n.id},t().createElement(r.ZP,{generateClassName:SC},t().createElement(m,{dateAdapter:x},t().createElement(st,{handleHeight:!0,onResize:(e,t)=>null==o?void 0:o(Math.floor(e),Math.floor(t))}),t().createElement(wC,{config:n}),t().createElement(q,null))))}})(),f})()}));
128
+ `),lC))),hC=e.forwardRef((function(e,t){const n=(0,l.Z)({props:e,name:"MuiLinearProgress"}),{className:r,color:i="primary",value:s,valueBuffer:u,variant:d="indeterminate"}=n,p=(0,a.Z)(n,JO),f=(0,o.Z)({},n,{color:i,variant:d}),m=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,Ht.Z)(r)}`,n],dashed:["dashed",`dashedColor${(0,Ht.Z)(r)}`],bar1:["bar",`barColor${(0,Ht.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&`barColor${(0,Ht.Z)(r)}`,"buffer"===n&&`color${(0,Ht.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,St.Z)(o,QO,t)})(f),h=(0,ca.Z)(),v={},g={bar1:{},bar2:{}};if(("determinate"===d||"buffer"===d)&&void 0!==s){v["aria-valuenow"]=Math.round(s),v["aria-valuemin"]=0,v["aria-valuemax"]=100;let e=s-100;"rtl"===h.direction&&(e=-e),g.bar1.transform=`translateX(${e}%)`}if("buffer"===d&&void 0!==u){let e=(u||0)-100;"rtl"===h.direction&&(e=-e),g.bar2.transform=`translateX(${e}%)`}return(0,c.jsxs)(dC,(0,o.Z)({className:(0,wt.Z)(m.root,r),ownerState:f,role:"progressbar"},v,{ref:t},p,{children:["buffer"===d?(0,c.jsx)(pC,{className:m.dashed,ownerState:f}):null,(0,c.jsx)(fC,{className:m.bar1,ownerState:f,style:g.bar1}),"determinate"===d?null:(0,c.jsx)(mC,{className:m.bar2,ownerState:f,style:g.bar2})]}))})),vC=(0,z.Z)({loader:{width:"100%",top:0,left:0,position:"absolute",borderRadius:"2px"}}),gC=()=>{const e=vC();return t().createElement(hC,{color:"primary",className:e.loader})},bC=[10,25,50,100],[yC]=bC,xC=(0,z.Z)((()=>({viewContent:{overflow:"hidden",position:"relative",padding:"0",display:"flex",height:"100%",flexDirection:"column"},activityLog:{height:"100%",flexGrow:1,overflowY:"auto"},headerRoot:{padding:"8px 12px 8px 24px",borderBottom:"1px solid rgba(0,0,0,0.12)"},headerTitle:{flexShrink:0},noData:{padding:"16px 24px"},basicView:{top:0,bottom:0,left:0,right:0,display:"flex",alignItems:"stretch",height:"100%",boxShadow:"none"},activityLogContainer:{height:"100%",position:"relative",overflow:"hidden"}}))),wC=(0,e.memo)((n=>{let{config:r}=n;const{exportTypes:o,caption:a}=r,i=xC(),s=(0,HO.useSelector)(WO().selectors.getMetadata),l=(0,HO.useSelector)(WO().selectors.getEntity),c=(0,D.getEntityType)(s,null==l?void 0:l.type),u=null==l?void 0:l.uri,[d,p]=(0,e.useState)(0),[f,m]=(0,e.useState)(yC),h=(0,e.useMemo)((()=>{return e=yC,bC.filter((t=>t!==e)).concat(e).sort(C.subtract);var e}),[]),[v,g]=(0,e.useState)({users:[],activities:[],attributes:[],sources:[],dateRange:{type:D.DateRangeTypes.WITHIN,period:[3,"months"]}}),{state:b,data:y,total:x,reload:w}=(t=>{let{filter:n,max:r,offset:o,entityUri:a}=t;const[i,s]=(0,e.useState)([]),[l,c]=(0,e.useState)(0),[u,d]=(0,e.useState)(lt.INIT),p=function(){let{cancelPrevious:t=!0,cancelOnUnmount:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,e.useRef)(Sr),o=()=>r.current();return(0,e.useEffect)((()=>()=>{n&&o()}),[]),(0,e.useCallback)((e=>(t&&o(),new Promise(((t,n)=>{r.current=()=>n("canceled"),e.then(t,n)})).catch((function(e){if("canceled"===e)return UO;throw e})))),[])}(),f=e=>{console.error(e),d(lt.ERROR),s([]),c(0)},m=(t=>{let{filter:n,max:r,offset:o,entityUri:a}=t;return(0,e.useCallback)((async()=>{const e=Cs(n),t=await(0,D.getProfileActivities)({filter:e,max:r,offset:o,entityUri:a}),{total:i}=await(0,D.getProfileActivitiesTotal)({filter:e,entityUri:a});return{data:t,total:i}}),[n,r,o,a])})({filter:n,max:r,offset:o,entityUri:a}),h=(0,e.useCallback)((()=>{if(!a)return;d(lt.LOADING);const e=(0,C.pipe)(m,p,(0,C.andThen)((e=>{let{data:t,total:n}=e;d(lt.LOADED),s(t),c(n)})),(0,C.otherwise)(f));e()}),[m]),v=()=>{try{h()}catch(e){f(e)}};return(0,e.useEffect)((()=>{v()}),[h]),{state:u,data:i,total:l,reload:v}})({filter:v,max:f,offset:d*f,entityUri:u}),S=(0,e.useCallback)((e=>{g(e),p(0)}),[]);return t().createElement(Ao,{className:i.basicView,"data-reltio-id":"profile-activity-log"},t().createElement(Bo,{title:a||E().text("Activity Log"),classes:{root:i.headerRoot,title:i.headerTitle}},t().createElement(Ho,{height:28,margin:28}),t().createElement(tO,{value:v,onChange:S,entityType:c,entityUri:u,exportTypes:o})),t().createElement(oO,{className:i.viewContent},t().createElement("div",{className:i.activityLogContainer},(()=>{switch(b){case lt.LOADED:return y&&0!==y.length?t().createElement(vt,{error:t().createElement(XO,{message:E().text("Something went wrong")})},t().createElement("div",{className:i.activityLog,"data-reltio-id":"profile-activity-log-container"},t().createElement(st,{handleWidth:!0,handleHeight:!0},(e=>{let{width:n=0,height:r=0}=e;return t().createElement(Po,{width:n,height:r,activities:y})})))):t().createElement(ht,{className:i.noData});case lt.LOADING:return t().createElement(gC,null);case lt.ERROR:return t().createElement(XO,{message:E().text("Error Loading Data"),onRefresh:w})}})()),!!x&&t().createElement(zO,{count:x,onChangePage:p,page:d,rowsPerPage:f,onChangeRowsPerPage:m,rowsPerPageOptions:h,labelRowsPerPage:E().text("Events per page:")})))})),SC=(0,n.Z)({productionPrefix:"profileActivityLog",disableGlobal:!0,seed:"pAL"}),OC=e=>{let{config:n,onResize:o}=e;return t().createElement(w.Provider,{value:n.id},t().createElement(r.ZP,{generateClassName:SC},t().createElement(m,{dateAdapter:x},t().createElement(st,{handleHeight:!0,onResize:(e,t)=>null==o?void 0:o(Math.floor(e),Math.floor(t))}),t().createElement(wC,{config:n}),t().createElement(q,null))))}})(),f})()}));
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@reltio/activity-log",
3
- "version": "1.4.1644",
3
+ "version": "1.4.1646",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "bundle.js",
6
6
  "dependencies": {
7
7
  "@date-io/moment": "^1.3.5",
8
- "@reltio/mdm-module": "^1.4.1644",
9
- "@reltio/mdm-sdk": "^1.4.1644",
8
+ "@reltio/mdm-module": "^1.4.1646",
9
+ "@reltio/mdm-sdk": "^1.4.1646",
10
10
  "classnames": "^2.2.5",
11
11
  "object-hash": "^2.1.1",
12
12
  "prop-types": "^15.6.2",