Files
object-browser/portal-ui/build/static/js/1604.8a9dcedd.chunk.js
Daniel Valdivia 66d0182825 Release v0.25.0 (#2696)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2023-03-08 09:17:03 -08:00

2 lines
8.2 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1604],{1604:function(e,n,t){t.r(n);var i=t(29439),a=t(1413),o=t(72791),l=t(75952),s=t(40986),r=t(11135),c=t(25787),d=t(61889),u=t(23814),m=t(81207),v=t(56028),p=t(83679),x=t(21435),h=t(87995),Z=t(81551),b=t(80184);n.default=(0,c.Z)((function(e){return(0,r.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},u.bK),u.QV),u.DF),u.ID))}))((function(e){var n=e.classes,t=e.open,a=e.bucketName,r=e.closeModalAndRefresh,c=(0,Z.TL)(),u=(0,o.useState)(!1),f=(0,i.Z)(u,2),j=f[0],y=f[1],C=(0,o.useState)(!0),g=(0,i.Z)(C,2),N=g[0],P=g[1],S=(0,o.useState)("compliance"),F=(0,i.Z)(S,2),k=F[0],R=F[1],w=(0,o.useState)("days"),z=(0,i.Z)(w,2),L=z[0],M=z[1],I=(0,o.useState)(1),O=(0,i.Z)(I,2),A=O[0],_=O[1],E=(0,o.useState)(!1),B=(0,i.Z)(E,2),K=B[0],T=B[1];return(0,o.useEffect)((function(){Number.isNaN(A)||A<1?T(!1):T(!0)}),[A]),(0,o.useEffect)((function(){N&&m.Z.invoke("GET","/api/v1/buckets/".concat(a,"/retention")).then((function(e){P(!1),R(e.mode),_(e.validity),M(e.unit)})).catch((function(e){P(!1)}))}),[N,a]),(0,b.jsx)(v.Z,{title:"Set Retention Configuration",modalOpen:t,onClose:function(){r()},children:N?(0,b.jsx)(l.aNw,{style:{width:16,height:16}}):(0,b.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),j||(y(!0),m.Z.invoke("PUT","/api/v1/buckets/".concat(a,"/retention"),{mode:k,unit:L,validity:A}).then((function(){y(!1),r()})).catch((function(e){y(!1),c((0,h.zb)(e))})))},children:(0,b.jsxs)(d.ZP,{container:!0,children:[(0,b.jsxs)(d.ZP,{item:!0,xs:12,className:n.modalFormScrollable,children:[(0,b.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,b.jsx)(p.Z,{currentSelection:k,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){R(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),(0,b.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,b.jsx)(p.Z,{currentSelection:L,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){M(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),(0,b.jsx)(d.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,b.jsx)(x.Z,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){_(e.target.valueAsNumber)},label:"Retention Validity",value:String(A),required:!0,min:"1"})})]}),(0,b.jsxs)(d.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,b.jsx)(l.zxk,{id:"cancel",type:"button",variant:"regular",disabled:j,onClick:function(){r()},label:"Cancel"}),(0,b.jsx)(l.zxk,{id:"set",type:"submit",variant:"callAction",color:"primary",disabled:j||!K,label:"Set"})]}),j&&(0,b.jsx)(d.ZP,{item:!0,xs:12,children:(0,b.jsx)(s.Z,{})})]})})})}))},21435:function(e,n,t){var i=t(29439),a=t(1413),o=t(72791),l=t(27391),s=t(61889),r=t(30829),c=t(20068),d=t(13400),u=t(20165),m=t(3579),v=t(11135),p=t(72455),x=t(25787),h=t(23814),Z=t(75952),b=t(28182),f=t(80184),j=(0,p.Z)((function(e){return(0,v.Z)((0,a.Z)({},h.gM))}));function y(e){var n=j();return(0,f.jsx)(l.Z,(0,a.Z)({InputProps:{classes:n}},e))}n.Z=(0,x.Z)((function(e){return(0,v.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},h.YI),h.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var n=e.label,t=e.onChange,l=e.value,v=e.id,p=e.name,x=e.type,h=void 0===x?"text":x,j=e.autoComplete,C=void 0===j?"off":j,g=e.disabled,N=void 0!==g&&g,P=e.multiline,S=void 0!==P&&P,F=e.tooltip,k=void 0===F?"":F,R=e.index,w=void 0===R?0:R,z=e.error,L=void 0===z?"":z,M=e.required,I=void 0!==M&&M,O=e.placeholder,A=void 0===O?"":O,_=e.min,E=e.max,B=e.overlayId,K=e.overlayIcon,T=void 0===K?null:K,W=e.overlayObject,D=void 0===W?null:W,U=e.extraInputProps,V=void 0===U?{}:U,G=e.overlayAction,H=e.noLabelMinWidth,Y=void 0!==H&&H,q=e.pattern,Q=void 0===q?"":q,J=e.autoFocus,X=void 0!==J&&J,$=e.classes,ee=e.className,ne=void 0===ee?"":ee,te=e.onKeyPress,ie=e.onFocus,ae=e.onPaste,oe=(0,a.Z)({"data-index":w},V),le=(0,o.useState)(!1),se=(0,i.Z)(le,2),re=se[0],ce=se[1];"number"===h&&_&&(oe.min=_),"number"===h&&E&&(oe.max=E),""!==Q&&(oe.pattern=Q);var de=T,ue=h;return"password"===h&&null===T&&(de=re?(0,f.jsx)(u.Z,{}):(0,f.jsx)(m.Z,{}),ue=re?"text":"password"),(0,f.jsx)(o.Fragment,{children:(0,f.jsxs)(s.ZP,{container:!0,className:(0,b.Z)(""!==ne?ne:"",""!==L?$.errorInField:$.inputBoxContainer),children:[""!==n&&(0,f.jsxs)(r.Z,{htmlFor:v,className:Y?$.noMinWidthLabel:$.inputLabel,children:[(0,f.jsxs)("span",{children:[n,I?"*":""]}),""!==k&&(0,f.jsx)("div",{className:$.tooltipContainer,children:(0,f.jsx)(c.Z,{title:k,placement:"top-start",children:(0,f.jsx)("div",{className:$.tooltip,children:(0,f.jsx)(Z.byK,{})})})})]}),(0,f.jsxs)("div",{className:$.textBoxContainer,children:[(0,f.jsx)(y,{id:v,name:p,fullWidth:!0,value:l,autoFocus:X,disabled:N,onChange:t,type:ue,multiline:S,autoComplete:C,inputProps:oe,error:""!==L,helperText:L,placeholder:A,className:$.inputRebase,onKeyPress:te,onFocus:ie,onPaste:ae}),de&&(0,f.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==n?"withLabel":""),children:(0,f.jsx)(d.Z,{onClick:G?function(){G()}:function(){return ce(!re)},id:B,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),D&&(0,f.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==n?"withLabel":""),children:D})]})]})})}))},83679:function(e,n,t){var i=t(4942),a=t(1413),o=(t(72791),t(28182)),l=t(61889),s=t(10765),r=t(85523),c=t(61419),d=t(30829),u=t(20068),m=t(11135),v=t(25787),p=t(72455),x=t(23814),h=t(75952),Z=t(80184),b=(0,p.Z)((0,a.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},x.FU)),f=function(e){var n=b();return(0,Z.jsx)(c.Z,(0,a.Z)({className:n.root,disableRipple:!0,color:"default",checkedIcon:(0,Z.jsx)("span",{className:n.radioSelectedIcon}),icon:(0,Z.jsx)("span",{className:n.radioUnselectedIcon})},e))};n.Z=(0,v.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},x.YI),x.Hr),{},{optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#07193E",fontWeight:700}}}))}))((function(e){var n=e.selectorOptions,t=void 0===n?[]:n,a=e.currentSelection,c=e.label,m=e.id,v=e.name,p=e.onChange,x=e.tooltip,b=void 0===x?"":x,j=e.disableOptions,y=void 0!==j&&j,C=e.classes,g=e.displayInColumn,N=void 0!==g&&g;return(0,Z.jsxs)(l.ZP,{container:!0,spacing:1,children:[(0,Z.jsx)(l.ZP,{item:!0,fontSize:60,children:(0,Z.jsxs)(d.Z,{htmlFor:m,className:C.inputLabel,children:[(0,Z.jsx)("span",{children:c}),""!==b&&(0,Z.jsx)("div",{className:C.tooltipContainer,children:(0,Z.jsx)(u.Z,{title:b,placement:"top-start",children:(0,Z.jsx)("div",{children:(0,Z.jsx)(h.byK,{})})})})]})}),(0,Z.jsx)(l.ZP,{item:!0,children:(0,Z.jsx)(s.Z,{"aria-label":m,id:m,name:v,value:a,onChange:p,row:!N,style:{display:"flex",textAlign:"right"},children:t.map((function(e){return(0,Z.jsx)(r.Z,{value:e.value,control:(0,Z.jsx)(f,{}),label:e.label,disabled:y,className:(0,o.Z)(C.optionLabel,(0,i.Z)({},C.checkedOption,e.value===a))},"rd-".concat(v,"-").concat(e.value))}))})})]})}))},3579:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),o=t(80184),l=(0,a.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");n.Z=l},20165:function(e,n,t){var i=t(64836);n.Z=void 0;var a=i(t(45649)),o=t(80184),l=(0,a.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");n.Z=l}}]);
//# sourceMappingURL=1604.8a9dcedd.chunk.js.map