mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[7146],{57146:function(e,n,t){t.r(n),t.d(n,{default:function(){return A}});var a=t(23430),i=t(18489),r=t(50390),o=t(34424),s=t(86509),l=t(4285),c=t(38342),d=t.n(c),u=t(87248),m=t.n(u),x=t(25594),p=t(98280),f=t(72462),Z=t(44149),h=t(30324),v=t(66946),g=t(81378),b=t(76352),y=t(66964),j=t(92440),_=t(65703),C=t(67754),S=t(27207),k=t(62559),N={setModalErrorSnackMessage:Z.zb},F=(0,o.$j)(null,N),P=(0,l.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({dateSelector:{"& div":{borderBottom:0,marginBottom:0,"& div:nth-child(2)":{border:"1px solid #EAEAEA",paddingLeft:5,"& div":{border:0}}}}},f.bK),f.ID),f.DF),f.QV))}))(F((function(e){var n=e.classes,t=e.closeModalAndRefresh,o=e.selectedBucket,s=e.lifecycle,l=e.open,c=e.setModalErrorSnackMessage,u=(0,r.useState)(!0),m=(0,a.Z)(u,2),f=m[0],Z=m[1],N=(0,r.useState)(!1),F=(0,a.Z)(N,2),P=F[0],I=F[1],E=(0,r.useState)(""),T=(0,a.Z)(E,2),R=T[0],w=T[1],L=(0,r.useState)(!1),M=(0,a.Z)(L,2),O=M[0],D=M[1],A=(0,r.useState)([]),B=(0,a.Z)(A,2),V=B[0],G=B[1],H=(0,r.useState)(""),K=(0,a.Z)(H,2),q=K[0],z=K[1],U=(0,r.useState)(""),Y=(0,a.Z)(U,2),W=Y[0],Q=Y[1],$=(0,r.useState)(""),J=(0,a.Z)($,2),X=J[0],ee=J[1],ne=(0,r.useState)(!1),te=(0,a.Z)(ne,2),ae=te[0],ie=te[1],re=(0,r.useState)("0"),oe=(0,a.Z)(re,2),se=oe[0],le=oe[1],ce=(0,r.useState)("0"),de=(0,a.Z)(ce,2),ue=de[0],me=de[1],xe=(0,r.useState)("expiry"),pe=(0,a.Z)(xe,2),fe=pe[0],Ze=pe[1],he=(0,r.useState)("0"),ve=(0,a.Z)(he,2),ge=ve[0],be=ve[1],ye=(0,r.useState)("0"),je=(0,a.Z)(ye,2),_e=je[0],Ce=je[1],Se=(0,r.useState)(!1),ke=(0,a.Z)(Se,2),Ne=ke[0],Fe=ke[1];(0,r.useEffect)((function(){f&&h.Z.invoke("GET","/api/v1/admin/tiers").then((function(e){var n=d()(e,"items",[]);if(null!==n&&n.length>=1){var t=n.map((function(e){var n=e.type,t=d()(e,"".concat(n,".name"),"");return{label:t,value:t}}));G(t),t.length>0&&Q(t[0].value)}Z(!1)})).catch((function(e){Z(!1)}))}),[f]),(0,r.useEffect)((function(){var e=!0;"expiry"!==fe&&""===W&&(e=!1),Fe(e)}),[fe,ge,_e,W]),(0,r.useEffect)((function(){var e;console.log("lifecycle::",s),"Enabled"===s.status&&D(!0);var n,t,a,i,r,o,l=!1;(s.transition&&(s.transition.days&&0!==s.transition.days&&(Ce(s.transition.days.toString()),Ze("transition"),l=!0),s.transition.date&&"0001-01-01T00:00:00Z"!==s.transition.date&&(Ze("transition"),l=!0)),s.expiration&&(s.expiration.days&&0!==s.expiration.days&&(be(s.expiration.days.toString()),Ze("expiry"),l=!1),s.expiration.date&&"0001-01-01T00:00:00Z"!==s.expiration.date&&(Ze("expiry"),l=!1)),l)?(Q((null===(n=s.transition)||void 0===n?void 0:n.storage_class)||""),me((null===(t=s.transition)||void 0===t||null===(a=t.noncurrent_transition_days)||void 0===a?void 0:a.toString())||"0"),ee((null===(i=s.transition)||void 0===i?void 0:i.noncurrent_storage_class)||"")):le((null===(r=s.expiration)||void 0===r||null===(o=r.noncurrent_expiration_days)||void 0===o?void 0:o.toString())||"0");if(ie(!(null===(e=s.expiration)||void 0===e||!e.delete_marker)),z(s.prefix||""),s.tags){var c=s.tags.reduce((function(e,n,t){return"".concat(e).concat(0!==t?"&":"").concat(n.key,"=").concat(n.value)}),"");w(c)}}),[s]);return(0,k.jsx)(b.Z,{onClose:function(){t(!1)},modalOpen:l,title:"Edit Lifecycle Configuration",titleIcon:(0,k.jsx)(p.QI,{}),children:(0,k.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!P&&(I(!0),null!==o&&null!==s)){var n={};if("expiry"===fe){var a={expiry_days:parseInt(ge)};n=(0,i.Z)((0,i.Z)({},a),{},{noncurrentversion_expiration_days:parseInt(se)})}else{var r={transition_days:parseInt(_e)};n=(0,i.Z)((0,i.Z)({},r),{},{noncurrentversion_transition_days:parseInt(ue),noncurrentversion_transition_storage_class:X,storage_class:W})}var l=(0,i.Z)({type:fe,disable:!O,prefix:q,tags:R,expired_object_delete_marker:ae},n);h.Z.invoke("PUT","/api/v1/buckets/".concat(o,"/lifecycle/").concat(s.id),l).then((function(e){I(!1),t(!0)})).catch((function(e){I(!1),c(e)}))}}(e)},children:(0,k.jsxs)(x.ZP,{container:!0,children:[(0,k.jsxs)(x.ZP,{item:!0,xs:12,className:n.formScrollable,children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{id:"id",name:"id",label:"Id",value:s.id,onChange:function(){},disabled:!0})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(j.Z,{label:"Rule State",indicatorLabels:["Enabled","Disabled"],checked:O,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){D(e.target.checked)}})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsxs)("fieldset",{className:n.fieldGroup,children:[(0,k.jsx)("legend",{className:n.descriptionText,children:"Lifecycle Configuration"}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(S.Z,{currentSelection:fe,id:"quota_type",name:"quota_type",label:"ILM Rule",selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}],onChange:function(){},disableOptions:!0})}),"expiry"===fe?(0,k.jsxs)(r.Fragment,{children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){be(e.target.value)},label:"Expiry Days",value:ge,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){le(e.target.value)},label:"Non-current Expiration Days",value:se,min:"0"})})]}):(0,k.jsxs)(r.Fragment,{children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){Ce(e.target.value)},label:"Transition Days",value:_e,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){me(e.target.value)},label:"Non-current Transition Days",value:ue,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(y.Z,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){ee(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:X})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsx)(C.Z,{label:"Storage Class",id:"storage_class",name:"storage_class",value:W,onChange:function(e){Q(e.target.value)},options:V})})]})]})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:n.formFieldRow,children:(0,k.jsxs)("fieldset",{className:n.fieldGroup,children:[(0,k.jsx)("legend",{className:n.descriptionText,children:"File Configuration"}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(y.Z,{id:"prefix",name:"prefix",onChange:function(e){z(e.target.value)},label:"Prefix",value:q})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(_.Z,{name:"tags",label:"Tags",elements:R,onChange:function(e){w(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(j.Z,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:ae,onChange:function(e){ie(e.target.checked)},label:"Expired Object Delete Marker"})})]})})]}),(0,k.jsxs)(x.ZP,{item:!0,xs:12,className:n.modalButtonBar,children:[(0,k.jsx)(v.Z,{type:"button",variant:"outlined",color:"primary",disabled:P,onClick:function(){t(!1)},children:"Cancel"}),(0,k.jsx)(v.Z,{type:"submit",variant:"contained",color:"primary",disabled:P||!Ne,children:"Save"})]}),P&&(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(g.Z,{})})]})})})}))),I=(0,o.$j)(null,{setModalErrorSnackMessage:Z.zb}),E=(0,l.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({dateSelector:{"& div":{borderBottom:0,marginBottom:0,"& div:nth-child(2)":{border:"1px solid #EAEAEA",paddingLeft:5,"& div":{border:0}}}}},f.bK),f.ID),f.DF),f.QV))}))(I((function(e){var n=e.open,t=e.closeModalAndRefresh,o=e.classes,s=e.bucketName,l=e.setModalErrorSnackMessage,c=(0,r.useState)(!0),u=(0,a.Z)(c,2),m=u[0],f=u[1],Z=(0,r.useState)([]),N=(0,a.Z)(Z,2),F=N[0],P=N[1],I=(0,r.useState)(!1),E=(0,a.Z)(I,2),T=E[0],R=E[1],w=(0,r.useState)(""),L=(0,a.Z)(w,2),M=L[0],O=L[1],D=(0,r.useState)(""),A=(0,a.Z)(D,2),B=A[0],V=A[1],G=(0,r.useState)(""),H=(0,a.Z)(G,2),K=H[0],q=H[1],z=(0,r.useState)(""),U=(0,a.Z)(z,2),Y=U[0],W=U[1],Q=(0,r.useState)(!1),$=(0,a.Z)(Q,2),J=$[0],X=$[1],ee=(0,r.useState)("0"),ne=(0,a.Z)(ee,2),te=ne[0],ae=ne[1],ie=(0,r.useState)("0"),re=(0,a.Z)(ie,2),oe=re[0],se=re[1],le=(0,r.useState)("expiry"),ce=(0,a.Z)(le,2),de=ce[0],ue=ce[1],me=(0,r.useState)("0"),xe=(0,a.Z)(me,2),pe=xe[0],fe=xe[1],Ze=(0,r.useState)("0"),he=(0,a.Z)(Ze,2),ve=he[0],ge=he[1],be=(0,r.useState)(!1),ye=(0,a.Z)(be,2),je=ye[0],_e=ye[1];(0,r.useEffect)((function(){m&&h.Z.invoke("GET","/api/v1/admin/tiers").then((function(e){var n=d()(e,"items",[]);if(null!==n&&n.length>=1){var t=n.map((function(e){var n=e.type,t=d()(e,"".concat(n,".name"),"");return{label:t,value:t}}));P(t),t.length>0&&q(t[0].value)}f(!1)})).catch((function(e){f(!1)}))}),[m]),(0,r.useEffect)((function(){var e=!0;"expiry"!==de&&""===K&&(e=!1),_e(e)}),[de,pe,ve,K]);return(0,k.jsxs)(b.Z,{modalOpen:n,onClose:function(){t(!1)},title:"Add Lifecycle Rule",titleIcon:(0,k.jsx)(p.QI,{}),children:[m&&(0,k.jsx)(x.ZP,{container:!0,className:o.loadingBox,children:(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(g.Z,{})})}),!m&&(0,k.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),R(!0),function(){var e={};if("expiry"===de){var n={expiry_days:parseInt(pe)};e=(0,i.Z)((0,i.Z)({},n),{},{noncurrentversion_expiration_days:parseInt(te)})}else{var a={transition_days:parseInt(ve)};e=(0,i.Z)((0,i.Z)({},a),{},{noncurrentversion_transition_days:parseInt(oe),noncurrentversion_transition_storage_class:Y,storage_class:K})}var r=(0,i.Z)({prefix:M,tags:B,expired_object_delete_marker:J},e);h.Z.invoke("POST","/api/v1/buckets/".concat(s,"/lifecycle"),r).then((function(){R(!1),t(!0)})).catch((function(e){R(!1),l(e)}))}()},children:(0,k.jsxs)(x.ZP,{container:!0,children:[(0,k.jsxs)(x.ZP,{item:!0,xs:12,className:o.formScrollable,children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsxs)("fieldset",{className:o.fieldGroup,children:[(0,k.jsx)("legend",{className:o.descriptionText,children:"Lifecycle Configuration"}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(S.Z,{currentSelection:de,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){ue(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===de?(0,k.jsxs)(r.Fragment,{children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){fe(e.target.value)},label:"Expiry Days",value:pe,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){ae(e.target.value)},label:"Non-current Expiration Days",value:te,min:"0"})})]}):(0,k.jsxs)(r.Fragment,{children:[(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){ge(e.target.value)},label:"Transition Days",value:ve,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(y.Z,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){se(e.target.value)},label:"Non-current Transition Days",value:oe,min:"0"})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(y.Z,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){W(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:Y})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsx)(C.Z,{label:"Storage Class",id:"storage_class",name:"storage_class",value:K,onChange:function(e){q(e.target.value)},options:F})})]})]})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,className:o.formFieldRow,children:(0,k.jsxs)("fieldset",{className:o.fieldGroup,children:[(0,k.jsx)("legend",{className:o.descriptionText,children:"File Configuration"}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(y.Z,{id:"prefix",name:"prefix",onChange:function(e){O(e.target.value)},label:"Prefix",value:M})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(_.Z,{name:"tags",label:"Tags",elements:"",onChange:function(e){V(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(j.Z,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:J,onChange:function(e){X(e.target.checked)},label:"Expired Object Delete Marker"})})]})})]}),(0,k.jsxs)(x.ZP,{item:!0,xs:12,className:o.modalButtonBar,children:[(0,k.jsx)(v.Z,{type:"button",variant:"outlined",color:"primary",disabled:T,onClick:function(){t(!1)},children:"Cancel"}),(0,k.jsx)(v.Z,{type:"submit",variant:"contained",color:"primary",disabled:T||!je,children:"Save"})]}),T&&(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(g.Z,{})})]})})]})}))),T=t(17777),R=t(8235),w=t(48122),L=t(15607),M=t(49495),O=t(53224),D=(0,o.$j)((function(e){return{session:e.console.session,loadingBucket:e.buckets.bucketDetails.loadingBucket,bucketInfo:e.buckets.bucketDetails.bucketInfo}}),{setErrorSnackMessage:Z.Ih}),A=(0,l.Z)((function(e){return(0,s.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.qg),f.OR),{},{twHeight:{minHeight:400}}))}))(D((function(e){var n=e.classes,t=e.match,i=(e.setErrorSnackMessage,e.loadingBucket),o=(e.bucketInfo,(0,r.useState)(!0)),s=(0,a.Z)(o,2),l=s[0],c=s[1],u=(0,r.useState)([]),f=(0,a.Z)(u,2),Z=f[0],v=f[1],g=(0,r.useState)(!1),b=(0,a.Z)(g,2),y=b[0],j=b[1],_=(0,r.useState)(!1),C=(0,a.Z)(_,2),S=C[0],N=C[1],F=(0,r.useState)(null),I=(0,a.Z)(F,2),D=I[0],A=I[1],B=t.params.bucketName,V=(0,L.F)(B,[M.Ft.S3_GET_LIFECYCLE_CONFIGURATION]);(0,r.useEffect)((function(){i&&c(!0)}),[i,c]),(0,r.useEffect)((function(){l&&(V?h.Z.invoke("GET","/api/v1/buckets/".concat(B,"/lifecycle")).then((function(e){var n=d()(e,"lifecycle",[]);v(n||[]),c(!1)})).catch((function(e){console.error(e),c(!1)})):c(!1))}),[l,c,B,V]);var G=[{label:"ID",elementKey:"id"},{label:"Prefix",elementKey:"prefix"},{label:"Status",elementKey:"status"},{label:"Expiration",elementKey:"expiration",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":(0,k.jsx)(m(),{children:e.date})}},{label:"Transition",elementKey:"transition",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":(0,k.jsx)(m(),{children:e.date})}},{label:"Storage Class",elementKey:"storage_class",renderFunction:function(e){return d()(e,"transition.storage_class","")},renderFullObject:!0}],H=[{type:"view",onClick:function(e){A(e),N(!0)}}];return(0,k.jsxs)(r.Fragment,{children:[S&&D&&(0,k.jsx)(P,{open:S,closeModalAndRefresh:function(e){N(!1),A(null),e&&c(!0)},selectedBucket:B,lifecycle:D}),y&&(0,k.jsx)(E,{open:y,bucketName:B,closeModalAndRefresh:function(e){j(!1),e&&c(!0)}}),(0,k.jsxs)(x.ZP,{container:!0,children:[(0,k.jsxs)(x.ZP,{item:!0,xs:12,className:n.actionsTray,children:[(0,k.jsx)(w.Z,{children:"Lifecycle Rules"}),(0,k.jsx)(L.Z,{scopes:[M.Ft.S3_PUT_LIFECYCLE_CONFIGURATION,M.Ft.ADMIN_LIST_TIERS],resource:B,matchAll:!0,errorProps:{disabled:!0},children:(0,k.jsx)(O.Z,{tooltip:"Add Lifecycle Rule",onClick:function(){j(!0)},text:"Add Lifecycle Rule",icon:(0,k.jsx)(p.dt,{}),color:"primary",variant:"contained"})})]}),(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(L.Z,{scopes:[M.Ft.S3_GET_LIFECYCLE_CONFIGURATION],resource:B,errorProps:{disabled:!0},children:(0,k.jsx)(T.Z,{itemActions:H,columns:G,isLoading:l,records:Z,entityName:"Lifecycle",customEmptyMessage:"There are no Lifecycle rules yet",idField:"id",customPaperHeight:n.twHeight})})}),!l&&(0,k.jsx)(x.ZP,{item:!0,xs:12,children:(0,k.jsx)(R.Z,{title:"Lifecycle Rules",iconComponent:(0,k.jsx)(p.y2,{}),help:(0,k.jsxs)(r.Fragment,{children:["MinIO Object Lifecycle Management allows creating rules for time or date based automatic transition or expiry of objects. For object transition, MinIO automatically moves the object to a configured remote storage tier.",(0,k.jsx)("br",{}),(0,k.jsx)("br",{}),"You can learn more at our"," ",(0,k.jsx)("a",{href:"https://docs.min.io/minio/baremetal/lifecycle-management/lifecycle-management-overview.html?ref=con",target:"_blank",rel:"noreferrer",children:"documentation"}),"."]})})})]})]})})))},27207:function(e,n,t){var a=t(36222),i=t(18489),r=(t(50390),t(44977)),o=t(25594),s=t(82420),l=t(66695),c=t(98893),d=t(36554),u=t(94187),m=t(86509),x=t(4285),p=t(62449),f=t(72462),Z=t(97538),h=t(62559),v=(0,p.Z)((0,i.Z)({root:{"&:hover":{backgroundColor:"transparent"}}},f.FU)),g=function(e){var n=v();return(0,h.jsx)(c.Z,(0,i.Z)({className:n.root,disableRipple:!0,color:"default",checkedIcon:(0,h.jsx)("span",{className:n.radioSelectedIcon}),icon:(0,h.jsx)("span",{className:n.radioUnselectedIcon})},e))};n.Z=(0,x.Z)((function(e){return(0,m.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},f.YI),f.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,i=e.currentSelection,c=e.label,m=e.id,x=e.name,p=e.onChange,f=e.tooltip,v=void 0===f?"":f,b=e.disableOptions,y=void 0!==b&&b,j=e.classes,_=e.displayInColumn,C=void 0!==_&&_;return(0,h.jsxs)(o.ZP,{container:!0,alignItems:"center",children:[(0,h.jsx)(o.ZP,{item:!0,xs:!0,children:(0,h.jsxs)(d.Z,{htmlFor:m,className:j.inputLabel,children:[(0,h.jsx)("span",{children:c}),""!==v&&(0,h.jsx)("div",{className:j.tooltipContainer,children:(0,h.jsx)(u.Z,{title:v,placement:"top-start",children:(0,h.jsx)("div",{children:(0,h.jsx)(Z.Z,{})})})})]})}),(0,h.jsx)(o.ZP,{item:!0,xs:!0,className:j.radioOptionsLayout,children:(0,h.jsx)(s.Z,{"aria-label":m,id:m,name:x,value:i,onChange:p,row:!C,style:{display:"block",textAlign:"right"},children:t.map((function(e){return(0,h.jsx)(l.Z,{value:e.value,control:(0,h.jsx)(g,{}),label:e.label,disabled:y,className:(0,r.Z)(j.optionLabel,(0,a.Z)({},j.checkedOption,e.value===i))},"rd-".concat(x,"-").concat(e.value))}))})})]})}))},67754:function(e,n,t){var a=t(18489),i=t(50390),r=t(25594),o=t(46413),s=t(36554),l=t(94187),c=t(47554),d=t(43965),u=t(31680),m=t(86509),x=t(4285),p=t(72462),f=t(97538),Z=t(62559),h=(0,x.Z)((function(e){return(0,m.Z)({root:{height:38,lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{height:38,position:"relative",color:"#07193E",fontSize:13,fontWeight:600,padding:"8px 20px 10px 10px",border:"#e5e5e5 1px solid",borderRadius:4,display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(o.ZP);n.Z=(0,x.Z)((function(e){return(0,m.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},p.YI),p.Hr),{},{inputLabel:(0,a.Z)((0,a.Z)({},p.YI.inputLabel),{},{"& span":{fontWeight:"normal"}}),fieldContainer:{display:"flex","@media (max-width: 600px)":{flexFlow:"column"}}}))}))((function(e){var n=e.classes,t=e.id,a=e.name,o=e.onChange,m=e.options,x=e.label,p=e.tooltip,v=void 0===p?"":p,g=e.value,b=e.disabled,y=void 0!==b&&b;return(0,Z.jsx)(i.Fragment,{children:(0,Z.jsxs)(r.ZP,{item:!0,xs:12,className:n.fieldContainer,children:[""!==x&&(0,Z.jsxs)(s.Z,{htmlFor:t,className:n.inputLabel,children:[(0,Z.jsx)("span",{children:x}),""!==v&&(0,Z.jsx)("div",{className:n.tooltipContainer,children:(0,Z.jsx)(l.Z,{title:v,placement:"top-start",children:(0,Z.jsx)("div",{className:n.tooltip,children:(0,Z.jsx)(f.Z,{})})})})]}),(0,Z.jsx)(c.Z,{fullWidth:!0,children:(0,Z.jsx)(d.Z,{id:t,name:a,value:g,onChange:o,input:(0,Z.jsx)(h,{}),disabled:y,children:m.map((function(e){return(0,Z.jsx)(u.Z,{value:e.value,children:e.label},"select-".concat(a,"-").concat(e.label))}))})})]})})}))},4247:function(e,n,t){t.d(n,{V:function(){return i}});var a=t(10594);function i(e){return(0,a.Z)("MuiDivider",e)}var r=(0,t(43349).Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);n.Z=r},31680:function(e,n,t){t.d(n,{Z:function(){return S}});var a=t(36222),i=t(1048),r=t(32793),o=t(50390),s=t(44977),l=t(50076),c=t(36128),d=t(8208),u=t(15573),m=t(57308),x=t(86875),p=t(40839),f=t(3299),Z=t(4247),h=t(2198),v=t(23586),g=t(10594);function b(e){return(0,g.Z)("MuiMenuItem",e)}var y=(0,t(43349).Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),j=t(62559),_=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex"],C=(0,d.ZP)(x.Z,{shouldForwardProp:function(e){return(0,d.FO)(e)||"classes"===e},name:"MuiMenuItem",slot:"Root",overridesResolver:function(e,n){var t=e.ownerState;return[n.root,t.dense&&n.dense,t.divider&&n.divider,!t.disableGutters&&n.gutters]}})((function(e){var n,t=e.theme,i=e.ownerState;return(0,r.Z)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!i.disableGutters&&{paddingLeft:16,paddingRight:16},i.divider&&{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},(n={"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},(0,a.Z)(n,"&.".concat(y.selected),(0,a.Z)({backgroundColor:(0,c.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)},"&.".concat(y.focusVisible),{backgroundColor:(0,c.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)})),(0,a.Z)(n,"&.".concat(y.selected,":hover"),{backgroundColor:(0,c.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(0,c.Fq)(t.palette.primary.main,t.palette.action.selectedOpacity)}}),(0,a.Z)(n,"&.".concat(y.focusVisible),{backgroundColor:t.palette.action.focus}),(0,a.Z)(n,"&.".concat(y.disabled),{opacity:t.palette.action.disabledOpacity}),(0,a.Z)(n,"& + .".concat(Z.Z.root),{marginTop:t.spacing(1),marginBottom:t.spacing(1)}),(0,a.Z)(n,"& + .".concat(Z.Z.inset),{marginLeft:52}),(0,a.Z)(n,"& .".concat(v.Z.root),{marginTop:0,marginBottom:0}),(0,a.Z)(n,"& .".concat(v.Z.inset),{paddingLeft:36}),(0,a.Z)(n,"& .".concat(h.Z.root),{minWidth:36}),n),!i.dense&&(0,a.Z)({},t.breakpoints.up("sm"),{minHeight:"auto"}),i.dense&&(0,r.Z)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,(0,a.Z)({},"& .".concat(h.Z.root," svg"),{fontSize:"1.25rem"})))})),S=o.forwardRef((function(e,n){var t=(0,u.Z)({props:e,name:"MuiMenuItem"}),a=t.autoFocus,c=void 0!==a&&a,d=t.component,x=void 0===d?"li":d,Z=t.dense,h=void 0!==Z&&Z,v=t.divider,g=void 0!==v&&v,y=t.disableGutters,S=void 0!==y&&y,k=t.focusVisibleClassName,N=t.role,F=void 0===N?"menuitem":N,P=t.tabIndex,I=(0,i.Z)(t,_),E=o.useContext(m.Z),T={dense:h||E.dense||!1,disableGutters:S},R=o.useRef(null);(0,p.Z)((function(){c&&R.current&&R.current.focus()}),[c]);var w,L=(0,r.Z)({},t,{dense:T.dense,divider:g,disableGutters:S}),M=function(e){var n=e.disabled,t=e.dense,a=e.divider,i=e.disableGutters,o=e.selected,s=e.classes,c={root:["root",t&&"dense",n&&"disabled",!i&&"gutters",a&&"divider",o&&"selected"]},d=(0,l.Z)(c,b,s);return(0,r.Z)({},s,d)}(t),O=(0,f.Z)(R,n);return t.disabled||(w=void 0!==P?P:-1),(0,j.jsx)(m.Z.Provider,{value:T,children:(0,j.jsx)(C,(0,r.Z)({ref:O,role:F,tabIndex:w,component:x,focusVisibleClassName:(0,s.Z)(M.focusVisible,k)},I,{ownerState:L,classes:M}))})}))}}]);
|
|
//# sourceMappingURL=7146.699d8257.chunk.js.map
|