Files
object-browser/portal-ui/build/static/js/1705.b90dd0eb.chunk.js
Daniel Valdivia 62a8bf05bb Release v0.15.9 (#1801)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2022-04-05 12:30:58 -07:00

2 lines
3.0 KiB
JavaScript

"use strict";(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1705],{71705:function(e,n,t){t.r(n);var l=t(29439),o=t(72791),s=t(9505),a=t(64554),c=t(56087),i=t(38442),u=t(26181),r=t.n(u),d=t(81918),f=t(29823),v=t(42419),h=t(75578),p=t(72401),Z=t(80184),x=(0,h.Z)(o.lazy((function(){return Promise.all([t.e(3772),t.e(247)]).then(t.bind(t,40247))}))),m=(0,h.Z)(o.lazy((function(){return Promise.all([t.e(3772),t.e(2442),t.e(2763)]).then(t.bind(t,22763))})));n.default=function(e){var n=e.setErrorSnackMessage,t=e.bucketName,u=(0,o.useState)(null),h=(0,l.Z)(u,2),j=h[0],T=h[1],k=(0,o.useState)(!1),b=(0,l.Z)(k,2),g=b[0],G=b[1],_=(0,o.useState)([]),C=(0,l.Z)(_,2),S=C[0],y=C[1],A=(0,o.useState)(["",""]),E=(0,l.Z)(A,2),U=E[0],z=E[1],N=(0,o.useState)(!1),P=(0,l.Z)(N,2),I=P[0],w=P[1],F=(0,s.Z)((function(e){var n,t;null!=e&&null!=(null===e||void 0===e?void 0:e.details)&&(T(null===e||void 0===e||null===(n=e.details)||void 0===n?void 0:n.tags),y(Object.keys(null===e||void 0===e||null===(t=e.details)||void 0===t?void 0:t.tags)))}),(function(e){n(e)})),B=(0,l.Z)(F,2),K=B[0],M=B[1],O=function(){M("GET","/api/v1/buckets/".concat(t))};return(0,o.useEffect)((function(){O()}),[t]),(0,Z.jsxs)(a.Z,{children:[K?(0,Z.jsx)(p.Z,{style:{width:16,height:16}}):null,(0,Z.jsx)(i.s,{scopes:[c.Ft.S3_GET_BUCKET_TAGGING],resource:t,children:(0,Z.jsxs)(a.Z,{sx:{display:"flex",flexFlow:"column"},children:[(0,Z.jsx)(a.Z,{children:S&&S.map((function(e,n){var l=r()(j,"".concat(e),"");return""!==l?(0,Z.jsx)(i.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:t,matchAll:!0,errorProps:{deleteIcon:null,onDelete:null},children:(0,Z.jsx)(d.Z,{style:{textTransform:"none",marginRight:"5px"},size:"small",label:"".concat(e," : ").concat(l),color:"primary",deleteIcon:(0,Z.jsx)(f.Z,{}),onDelete:function(){!function(e,n){z([e,n]),w(!0)}(e,l)}})},"chip-".concat(n)):null}))}),(0,Z.jsx)(i.s,{scopes:[c.Ft.S3_PUT_BUCKET_TAGGING],resource:t,errorProps:{disabled:!0,onClick:null},children:(0,Z.jsx)(d.Z,{style:{maxWidth:80,marginTop:"10px"},icon:(0,Z.jsx)(v.Z,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){G(!0)}})})]})}),g&&(0,Z.jsx)(x,{modalOpen:g,currentTags:j,bucketName:t,onCloseAndUpdate:function(e){G(!1),e&&O()}}),I&&(0,Z.jsx)(m,{deleteOpen:I,currentTags:j,bucketName:t,onCloseAndUpdate:function(e){w(!1),e&&O()},selectedTag:U})]})}},9505:function(e,n,t){var l=t(29439),o=t(72791),s=t(81207);n.Z=function(e,n){var t=(0,o.useState)(!1),a=(0,l.Z)(t,2),c=a[0],i=a[1];return[c,function(t,l,o){i(!0),s.Z.invoke(t,l,o).then((function(n){i(!1),e(n)})).catch((function(e){i(!1),n(e)}))}]}},42419:function(e,n,t){var l=t(95318);n.Z=void 0;var o=l(t(45649)),s=t(80184),a=(0,o.default)((0,s.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");n.Z=a},29823:function(e,n,t){var l=t(95318);n.Z=void 0;var o=l(t(45649)),s=t(80184),a=(0,o.default)((0,s.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");n.Z=a}}]);
//# sourceMappingURL=1705.b90dd0eb.chunk.js.map