Files
openmaxio-object-browser/portal-ui/build/static/js/2983.66cf0ad4.chunk.js
2022-04-25 15:41:06 -07:00

2 lines
13 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[2983],{34866:function(e,n,t){var o=t(1413),r=t(72791),i=t(61889),c=t(94454),l=t(30829),a=t(20068),s=t(11135),d=t(25787),u=t(23814),h=t(84570),g=t(80184);n.Z=(0,d.Z)((function(e){return(0,s.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u.YI),u.Hr),u.lM),{},{fieldContainer:(0,o.Z)((0,o.Z)({},u.YI.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial",flexWrap:"nowrap"}),noTopMargin:{marginTop:0}}))}))((function(e){var n=e.label,t=e.onChange,o=e.value,s=e.id,d=e.name,u=e.checked,x=void 0!==u&&u,p=e.disabled,v=void 0!==p&&p,f=e.noTopMargin,m=void 0!==f&&f,w=e.tooltip,b=void 0===w?"":w,j=e.overrideLabelClasses,C=void 0===j?"":j,y=e.classes;return(0,g.jsx)(r.Fragment,{children:(0,g.jsxs)(i.ZP,{item:!0,xs:12,className:"".concat(y.fieldContainer," ").concat(m?y.noTopMargin:""),children:[(0,g.jsx)("div",{children:(0,g.jsx)(c.Z,{name:d,id:s,value:o,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:x,onChange:t,checkedIcon:(0,g.jsx)("span",{className:y.checkedIcon}),icon:(0,g.jsx)("span",{className:y.unCheckedIcon}),disabled:v})}),""!==n&&(0,g.jsxs)(l.Z,{htmlFor:s,className:"".concat(y.noMinWidthLabel," ").concat(C),children:[(0,g.jsx)("span",{children:n}),""!==b&&(0,g.jsx)("div",{className:y.tooltipContainer,children:(0,g.jsx)(a.Z,{title:b,placement:"top-start",children:(0,g.jsx)("div",{className:y.tooltip,children:(0,g.jsx)(h.Z,{})})})})]})]})})}))},92983:function(e,n,t){t.d(n,{Z:function(){return W}});var o=t(29439),r=t(93433),i=t(1413),c=t(72791),l=t(26181),a=t.n(l),s=t(26769),d=t.n(s),u=t(20890),h=t(13400),g=t(15473),x=t(61889),p=t(10703),v=t(40986),f=t(94454),m=t(5171),w=t(11135),b=t(25787),j=t(97911),C=t(26759),y=t(70366),S=t(91523),Z=t(20068),k="#081C42",N="#081C42",F=t(80184),T=function(e){var n=e.active,t=void 0!==n&&n;return(0,F.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,F.jsx)("path",{fill:t?N:k,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})},A=function(e){var n=e.active,t=void 0!==n&&n;return(0,F.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,F.jsx)("path",{fill:t?N:k,d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z"})})},B=function(e){var n=e.active,t=void 0!==n&&n;return(0,F.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",children:(0,F.jsx)("path",{fill:t?N:k,d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"})})},R=function(e){return(0,F.jsx)("svg",(0,i.Z)((0,i.Z)({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",className:"min-icon",fill:"currentcolor"},e),{},{children:(0,F.jsx)("path",{d:"M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"})}))},z=t(33548),I=t(54599),M=t(92388),P=t(67186),D=(0,b.Z)((function(){return(0,w.Z)({spacing:{margin:"0 8px"},buttonDisabled:{"&.MuiButtonBase-root.Mui-disabled":{cursor:"not-allowed",filter:"grayscale(100%)",opacity:"30%"}}})}))((function(e){var n=e.type,t=e.onClick,o=e.valueToSend,r=e.idField,i=e.selected,c=e.to,l=e.sendOnlyId,a=void 0!==l&&l,s=e.disabled,u=void 0!==s&&s,g=e.classes,x=e.label,p=a?o[r]:o,v="string"===typeof n?function(e,n){switch(e){case"view":case"preview":return(0,F.jsx)(M.P9,{});case"edit":return(0,F.jsx)(z.Z,{});case"delete":return(0,F.jsx)(I.Z,{});case"description":return(0,F.jsx)(M.v4,{});case"share":return(0,F.jsx)(M.aA,{});case"cloud":return(0,F.jsx)(T,{active:n});case"console":return(0,F.jsx)(A,{active:n});case"download":return(0,F.jsx)(P.Z,{});case"disable":return(0,F.jsx)(B,{active:n});case"format":return(0,F.jsx)(R,{})}return null}(n,i):n,f=(0,F.jsx)(h.Z,{"aria-label":"string"===typeof n?n:"",size:"small",className:"".concat(g.spacing," ").concat(u?g.buttonDisabled:""),disabled:u,onClick:t?function(e){e.stopPropagation(),u?e.preventDefault():t(p)}:function(){return null},children:v});return x&&""!==x&&(f=(0,F.jsx)(Z.Z,{title:x,children:f})),t?f:d()(c)?u?f:(0,F.jsx)(S.rU,{to:"".concat(c,"/").concat(p),onClick:function(e){e.stopPropagation()},children:f}):null})),H=t(34866),L=t(62666),K=t(23814),_=t(72401),O=function(e,n,t,o,i,l,s,u,h,g,x){var p=function(e,n,t,o,i,c,l){var a=(0,r.Z)(e);c&&(a=e.filter((function(e){return l.includes(e.elementKey)})));var s=n;return o&&(s-=45),i&&(s-=t),a.reduce((function(e,n){return n.width?e-n.width:e}),s)/a.filter((function(e){return!e.width})).length}(e,n,t,o,i,u,h);return e.map((function(e,n){if(u&&!h.includes(e.elementKey))return null;var t=!e.enableSort||!e.enableSort;return(0,F.jsx)(m.sg,{dataKey:e.elementKey,headerClassName:"titleHeader ".concat(e.headerTextAlign?"text-".concat(e.headerTextAlign):""),headerRenderer:function(){return(0,F.jsxs)(c.Fragment,{children:[g===e.elementKey&&(0,F.jsx)(c.Fragment,{children:"ASC"===x?(0,F.jsx)(y.Z,{}):(0,F.jsx)(C.Z,{})}),e.label]})},className:e.contentTextAlign?"text-".concat(e.contentTextAlign):"",cellRenderer:function(n){var t=n.rowData,o=!!l&&l.includes(d()(t)?t:t[s]);return function(e,n,t){var o=d()(e)?e:a()(e,n.elementKey,null),r=n.renderFullObject?e:o,i=n.renderFunction?n.renderFunction(r):r;return(0,F.jsx)(c.Fragment,{children:(0,F.jsx)("span",{className:t?"selected":"",children:i})})}(t,e,o)},width:e.width||p,disableSort:t,defaultSortDirection:"ASC"},"col-tb-".concat(n.toString()))}))},W=(0,b.Z)((function(){return(0,w.Z)((0,i.Z)((0,i.Z)({paper:{display:"flex",overflow:"auto",flexDirection:"column",padding:"0 16px 8px",boxShadow:"none",border:"#EAEDEE 1px solid",borderRadius:3,minHeight:200,overflowY:"scroll",position:"relative","&::-webkit-scrollbar":{width:0,height:3}},noBackground:{backgroundColor:"transparent",border:0},disabled:{backgroundColor:"#fbfafa",color:"#cccccc"},defaultPaperHeight:{height:"calc(100vh - 205px)"},loadingBox:{paddingTop:"100px",paddingBottom:"100px"},overlayColumnSelection:{position:"absolute",right:0,top:0},popoverContent:{maxHeight:250,overflowY:"auto",padding:"0 10px 10px"},shownColumnsLabel:{color:"#9c9c9c",fontSize:12,padding:10,borderBottom:"#eaeaea 1px solid",width:"100%"},checkAllWrapper:{marginTop:-16},"@global":{".rowLine":{borderBottom:"1px solid ".concat("#9c9c9c80"),height:40,color:"#393939",fontSize:14,transitionDuration:.3,"&:focus":{outline:"initial"},"&:hover:not(.ReactVirtualized__Table__headerRow)":{userSelect:"none",backgroundColor:"#ececec",fontWeight:600,"&.canClick":{cursor:"pointer"},"&.canSelectText":{userSelect:"text"}},"& .selected":{color:"#081C42",fontWeight:600}},".headerItem":{userSelect:"none",fontWeight:700,fontSize:14,fontStyle:"initial",display:"flex",alignItems:"center",outline:"none"},".ReactVirtualized__Table__headerRow":{fontWeight:700,fontSize:14,borderColor:"#39393980",textTransform:"initial"},".optionsAlignment":{textAlign:"center","& .min-icon":{width:16,height:16}},".text-center":{textAlign:"center"},".text-right":{textAlign:"right"},".progress-enabled":{paddingTop:3,display:"inline-block",margin:"0 10px",position:"relative",width:18,height:18},".progress-enabled > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},K.lM),K.FU))}))((function(e){var n=e.itemActions,t=e.columns,r=e.onSelect,i=e.records,l=e.isLoading,s=e.loadingMessage,w=void 0===s?(0,F.jsx)(u.Z,{component:"h3",children:"Loading..."}):s,b=e.entityName,C=e.selectedItems,y=e.idField,S=e.classes,Z=e.radioSelection,k=void 0!==Z&&Z,N=e.customEmptyMessage,T=void 0===N?"":N,A=e.customPaperHeight,B=void 0===A?"":A,R=e.noBackground,z=void 0!==R&&R,I=e.columnsSelector,M=void 0!==I&&I,P=e.textSelectable,W=void 0!==P&&P,E=e.columnsShown,V=void 0===E?[]:E,Y=e.onColumnChange,U=void 0===Y?function(e,n){}:Y,q=e.infiniteScrollConfig,G=e.sortConfig,J=e.autoScrollToBottom,Q=void 0!==J&&J,X=e.disabled,$=void 0!==X&&X,ee=e.onSelectAll,ne=e.rowStyle,te=(0,c.useState)(!1),oe=(0,o.Z)(te,2),re=oe[0],ie=oe[1],ce=c.useState(null),le=(0,o.Z)(ce,2),ae=le[0],se=le[1],de=n?n.find((function(e){return"view"===e.type})):null,ue=function(e){ie(!re),se(e.currentTarget)},he=function(){ie(!1),se(null)};return(0,F.jsx)(x.ZP,{item:!0,xs:12,children:(0,F.jsxs)(p.Z,{className:"".concat(S.paper," ").concat(z?S.noBackground:"","\n ").concat($?S.disabled:""," \n ").concat(""!==B?B:S.defaultPaperHeight),children:[l&&(0,F.jsxs)(x.ZP,{container:!0,className:S.loadingBox,children:[(0,F.jsx)(x.ZP,{item:!0,xs:12,style:{textAlign:"center"},children:w}),(0,F.jsx)(x.ZP,{item:!0,xs:12,children:(0,F.jsx)(v.Z,{})})]}),M&&!l&&i.length>0&&(0,F.jsx)("div",{className:S.overlayColumnSelection,children:function(e){return(0,F.jsxs)(c.Fragment,{children:[(0,F.jsx)(h.Z,{"aria-describedby":"columnsSelector",color:"primary",onClick:ue,size:"large",children:(0,F.jsx)(j.Z,{fontSize:"inherit"})}),(0,F.jsxs)(g.ZP,{anchorEl:ae,id:"columnsSelector",open:re,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:he,children:[(0,F.jsx)("div",{className:S.shownColumnsLabel,children:"Shown Columns"}),(0,F.jsx)("div",{className:S.popoverContent,children:e.map((function(e){return(0,F.jsx)(H.Z,{label:e.label,checked:V.includes(e.elementKey),onChange:function(n){U(e.elementKey,n.target.checked)},id:"chbox-".concat(e.label),name:"chbox-".concat(e.label),value:e.label},"tableColumns-".concat(e.label))}))})]})]})}(t)}),i&&!l&&i.length>0?(0,F.jsx)(m.b2,{isRowLoaded:function(e){var n=e.index;return!!i[n]},loadMoreRows:q?q.loadMoreRecords:function(){return new Promise((function(){return!0}))},rowCount:q?q.recordsCount:i.length,children:function(e){var o=e.onRowsRendered,l=e.registerChild;return(0,F.jsx)(m.qj,{children:function(e){var s=e.width,u=e.height,h=function(e,n){var t=45*n+15;return t<80?80:t>e?e:t}(s,n?n.filter((function(e){return"view"!==e.type})).length:0),g=!(!r||!C),x=!!(n&&n.length>1||n&&1===n.length&&"view"!==n[0].type);return(0,F.jsxs)(m.iA,{ref:l,disableHeader:!1,headerClassName:"headerItem",headerHeight:40,height:u,noRowsRenderer:function(){return(0,F.jsx)(c.Fragment,{children:""!==T?T:"There are no ".concat(b," yet.")})},overscanRowCount:10,rowHeight:40,width:s,rowCount:i.length,rowGetter:function(e){var n=e.index;return i[n]},onRowClick:function(e){!function(e){if(de){var n=de.sendOnlyId?e[y]:e,t=!1;if(de.disableButtonFunction&&de.disableButtonFunction(n)&&(t=!0),de.to&&!t)return void L.Z.push("".concat(de.to,"/").concat(n));de.onClick&&!t&&de.onClick(n)}}(e.rowData)},rowClassName:"rowLine ".concat(de?"canClick":""," ").concat(!de&&W?"canSelectText":""),onRowsRendered:o,sort:G?G.triggerSort:void 0,sortBy:G?G.currentSort:void 0,sortDirection:G?G.currentDirection:void 0,scrollToIndex:Q?i.length-1:-1,rowStyle:function(e){if(ne){var n=ne(e);return"string"===typeof n?a()(K.xS,n,{}):n}return{}},children:[g&&(0,F.jsx)(m.sg,{headerRenderer:function(){return(0,F.jsx)(c.Fragment,{children:ee?(0,F.jsx)("div",{className:S.checkAllWrapper,children:(0,F.jsx)(H.Z,{label:"",onChange:ee,value:"all",id:"selectAll",name:"selectAll",checked:(null===C||void 0===C?void 0:C.length)===i.length})}):(0,F.jsx)(c.Fragment,{children:"Select"})})},dataKey:"select-".concat(y),width:45,disableSort:!0,cellRenderer:function(e){var n=e.rowData,t=!!C&&C.includes(d()(n)?n:n[y]);return(0,F.jsx)(f.Z,{value:d()(n)?n:n[y],color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:t,onChange:r,onClick:function(e){e.stopPropagation()},checkedIcon:(0,F.jsx)("span",{className:k?S.radioSelectedIcon:S.checkedIcon}),icon:(0,F.jsx)("span",{className:k?S.radioUnselectedIcon:S.unCheckedIcon})})}}),O(t,s,h,g,x,C||[],y,M,V,G?G.currentSort:"",G?G.currentDirection:void 0),x&&(0,F.jsx)(m.sg,{headerRenderer:function(){return(0,F.jsx)(c.Fragment,{children:"Options"})},dataKey:y,width:h,headerClassName:"optionsAlignment",className:"optionsAlignment",cellRenderer:function(e){var t=e.rowData,o=!!C&&C.includes(d()(t)?t:t[y]);return function(e,n,t,o){return e.map((function(e,r){if("view"===e.type)return null;var i="string"===typeof n?n:n[o],c=!1;return e.disableButtonFunction&&e.disableButtonFunction(i)&&(c=!0),e.showLoaderFunction&&e.showLoaderFunction(i)?(0,F.jsx)("div",{className:"progress-enabled",children:(0,F.jsx)(_.Z,{style:{width:18,height:18}},"actions-loader-".concat(e.type,"-").concat(r.toString()))}):(0,F.jsx)(D,{label:e.label,type:e.type,onClick:e.onClick,to:e.to,valueToSend:n,selected:t,idField:o,sendOnlyId:!!e.sendOnlyId,disabled:c},"actions-".concat(e.type,"-").concat(r.toString()))}))}(n||[],t,o,y)}})]})}})}}):(0,F.jsx)(c.Fragment,{children:!l&&(0,F.jsx)("div",{children:""!==T?T:"There are no ".concat(b," yet.")})})]})})}))}}]);
//# sourceMappingURL=2983.66cf0ad4.chunk.js.map