All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.7887.a9d4ee8bf14b00c9f8ed.js Maven / Gradle / Ivy

"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[7887],{45062:function(e,t,n){var i=n(8081),a=n.n(i),r=n(23645),c=n.n(r)()(a());c.push([e.id,'/*\n *  Copyright 2022 Collate.\n *  Licensed under the Apache License, Version 2.0 (the "License");\n *  you may not use this file except in compliance with the License.\n *  You may obtain a copy of the License at\n *  http://www.apache.org/licenses/LICENSE-2.0\n *  Unless required by applicable law or agreed to in writing, software\n *  distributed under the License is distributed on an "AS IS" BASIS,\n *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *  See the License for the specific language governing permissions and\n *  limitations under the License.\n */\n.ant-attribute-modal .ant-modal-body {\n  padding: 16px 8px;\n}\n.ant-attribute-modal .ant-modal-body .ant-row {\n  padding: 16px;\n  cursor: pointer;\n}\n.ant-attribute-modal .ant-modal-body .ant-row.ant-search-box-row {\n  padding-top: 0px;\n}\n.ant-attribute-modal .ant-modal-body .ant-row.selected {\n  background-color: #e6f4ff;\n}\n',""]),t.Z=c},43633:function(e,t,n){var i=n(70655),a=n(71577),r=n(94199),c=n(19650),o=n(56256),s=n(23031),l=n(96486),u=n(67294),d=n(15137),m=n(96605),p=n(90386),f=n(38780),h=n(7873),v=n(99886),E=n(62761),y=n(58369),b=n(31615),Z=n(93895),g=n(24671),w=n(86385),N=n(46321),C=n(59136),k=n(24135);t.Z=function(e){var t=e.className,n=e.header,x=e.hasEditAccess,S=e.onDescriptionEdit,T=e.description,L=void 0===T?"":T,R=e.isEdit,G=e.onCancel,J=e.onDescriptionUpdate,I=e.isReadOnly,F=void 0!==I&&I,O=e.removeBlur,A=void 0!==O&&O,K=e.entityName,$=e.entityFieldThreads,q=e.onThreadLinkSelect,D=e.entityType,U=e.entityFqn,z=e.entityFieldTasks,B=e.reduceDescription,W=(0,d.k6)(),_=null==$?void 0:$[0],j=null==z?void 0:z[0],M=function(){W.push((0,w.Ub)(D,U))},P=function(){W.push((0,w.L6)(D,U))},V=function(){S&&S()},Y=function(){var e=Boolean(L.trim());return w.GZ.includes(D)?u.createElement(a.Z,{className:"w-7 h-7 p-0 flex-center","data-testid":"request-entity-description",type:"text",onClick:e?P:M},u.createElement(r.Z,{placement:"right",title:e?(0,s.t)("message.request-update-description"):(0,s.t)("message.request-description")},u.createElement(h.ReactComponent,(0,i.pi)({name:(0,s.t)("message.request-description")},E.K$)))):null},H=function(e){var t=e.descriptionThread;return(0,l.isUndefined)(t)?u.createElement(u.Fragment,null,(null==L?void 0:L.trim())&&q?u.createElement(a.Z,{className:"w-7 h-7 link-text p-0 flex-center","data-testid":"start-description-thread",icon:u.createElement(m.ReactComponent,(0,i.pi)({},E.K$,{name:"comments"})),type:"text",onClick:function(){return null==q?void 0:q((0,g.ec)(D,U,y.Sn.DESCRIPTION))}}):null):u.createElement(a.Z,{className:"w-9 h-7 p-0","data-testid":"description-thread",type:"text",onClick:function(){return null==q?void 0:q(t.entityLink)}},u.createElement(c.Z,{align:"center",className:"h-full",size:2},u.createElement(p.ReactComponent,(0,i.pi)({},E.K$,{name:"tasks"})),u.createElement(o.Z.Text,{"data-testid":"description-thread-count"},t.count)))};return u.createElement("div",{className:"schema-description relative "+t},u.createElement(c.Z,{align:"end",className:"description-inner-main-container",size:4},u.createElement("div",{className:"relative"},u.createElement("div",{className:"description h-full relative overflow-y-scroll","data-testid":"description",id:"center"},(null==L?void 0:L.trim())?u.createElement(k.Z,{className:B?"max-two-lines":"",enableSeeMoreVariant:!A,markdown:L}):u.createElement("span",{className:"text-grey-muted p-y-xs"},(0,s.t)("label.no-entity",{entity:(0,s.t)("label.description")})))),u.createElement((function(){return F?null:u.createElement(c.Z,{align:"end",size:0},x&&u.createElement(a.Z,{className:"w-7 h-7 p-0 flex-center","data-testid":"edit-description",icon:u.createElement(f.ReactComponent,(0,i.pi)({color:E.MJ},E.K$)),type:"text",onClick:V}),(0,Z.nq)(D)?u.createElement(u.Fragment,null,u.createElement(Y,null),(0,l.isUndefined)(j)?null:u.createElement(a.Z,{className:"w-9 h-7 p-0","data-testid":"description-task",type:"text",onClick:function(){return null==q?void 0:q(j.entityLink,b.Th.Task)}},u.createElement(c.Z,{align:"center",className:"h-full",size:2},u.createElement(v.ReactComponent,(0,i.pi)({},E.K$,{name:"tasks"})),u.createElement(o.Z.Text,{"data-testid":"description-tasks-count"},j.count)))):null,u.createElement(H,{descriptionThread:_}))}),null)),u.createElement(C.p,{header:n||(0,s.t)("label.edit-description-for",{entityName:K}),placeholder:(0,s.t)("label.enter-entity",{entity:(0,s.t)("label.description")}),value:L,visible:Boolean(R),onCancel:G,onSave:function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){var t;return(0,i.Jh)(this,(function(n){switch(n.label){case 0:if(!J||!(0,l.isFunction)(J))return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,J(e)];case 2:return n.sent(),G&&G(),[3,4];case 3:return t=n.sent(),(0,N.Eo)(t),[3,4];case 4:return[2]}}))}))}}))}},88121:function(e,t,n){n.d(t,{Z:function(){return K}});var i=n(70655),a=n(76570),r=n(79508),c=n(50146),o=n(71230),s=n(15746),l=n(4107),u=n(94184),d=n.n(u),m=n(96486),p=n(67294),f=n(68432),h=n(83716),v=n(24135),E=n(69523),y=n(61105),b=n(64632),Z=n(80897),g=n(24671),w=n(46321),N=n(93379),C=n.n(N),k=n(7795),x=n.n(k),S=n(90569),T=n.n(S),L=n(3565),R=n.n(L),G=n(19216),J=n.n(G),I=n(44589),F=n.n(I),O=n(45062),A={};A.styleTagTransform=F(),A.setAttributes=R(),A.insert=T().bind(null,"head"),A.domAPI=x(),A.insertStyleElement=J(),C()(O.Z,A),O.Z&&O.Z.locals&&O.Z.locals;var K=function(e){var t=e.isOpen,n=e.onSave,u=e.onCancel,N=e.title,C=e.type,k=e.selectedKeys,x=e.isModalLoading,S=(0,f.$)().t,T=(0,i.CR)((0,p.useState)([]),2),L=T[0],R=T[1],G=(0,i.CR)((0,p.useState)([]),2),J=G[0],I=G[1],F=(0,i.CR)((0,p.useState)(!1),2),O=F[0],A=F[1],K=(0,i.CR)((0,p.useState)(k),2),$=K[0],q=K[1];return(0,p.useEffect)((function(){(0,i.mG)(void 0,void 0,void 0,(function(){var e,t,n;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:A(!0),i.label=1;case 1:switch(i.trys.push([1,8,9,10]),e={data:[]},C){case b.py.POLICY:return[3,2];case b.py.ROLE:return[3,4]}return[3,6];case 2:return[4,(0,Z.Ko)("",void 0,void 0,100)];case 3:return e=i.sent(),[3,7];case 4:return[4,(0,Z.F3)("",void 0,void 0,!1,100)];case 5:return e=i.sent(),[3,7];case 6:return[3,7];case 7:return t=(e.data||[]).map((function(e){return{id:e.id,name:e.name,displayName:e.displayName,type:C,description:e.description}})),R(t),I(t),[3,10];case 8:return n=i.sent(),(0,w.Eo)(n),[3,10];case 9:return A(!1),[7];case 10:return[2]}}))}))}),[]),p.createElement(c.Z,{centered:!0,className:"ant-attribute-modal",closable:!1,confirmLoading:x,"data-testid":"modal-container",maskClosable:!1,okText:"Submit",open:t,title:p.createElement("span",{"data-testid":"modal-title"},N," ",p.createElement("span",{className:"text-grey-muted text-sm"},"("+$.length+"/"+L.length+" selected)")),width:750,onCancel:u,onOk:function(){return n($)}},O?p.createElement(E.Z,null):p.createElement(p.Fragment,null,p.createElement(o.Z,{className:"ant-search-box-row"},p.createElement(s.Z,{span:24},p.createElement(l.Z,{"data-testid":"search-input",placeholder:S("label.search-entity",{entity:C}),prefix:p.createElement(a.Z,{style:{color:"#37352F4D"}}),onChange:function(e){return t=e.target.value,void I(t?L.filter((function(e){var n,i,a;return(null===(n=e.name)||void 0===n?void 0:n.includes(t))||(null===(i=e.displayName)||void 0===i?void 0:i.includes(t))||(null===(a=e.description)||void 0===a?void 0:a.includes(t))})):L);var t}}))),(0,m.isEmpty)(J)?p.createElement(h.Z,{className:"mt-0-important p-y-lg",type:y.Wx.FILTER}):J.map((function(e){return p.createElement(o.Z,{className:d()({selected:$.includes(e.id)}),"data-testid":"policy-row",gutter:[16,16],key:e.id,onClick:function(){return t=e.id,n=$.includes(t),void q(n?function(e){return e.filter((function(e){return e!==t}))}:function(e){return(0,i.ev)((0,i.ev)([],(0,i.CR)(e)),[t])});var t,n}},p.createElement(s.Z,{span:6},(0,g.C_)(e)),p.createElement(s.Z,{span:16},p.createElement(v.Z,{markdown:e.description||""})),p.createElement(s.Z,{span:2},$.includes(e.id)&&p.createElement(r.Z,{className:"text-primary"})))}))))}},80897:function(e,t,n){n.d(t,{$j:function(){return p},F3:function(){return c},Ko:function(){return o},QW:function(){return h},_d:function(){return u},cN:function(){return f},dV:function(){return v},n5:function(){return s},sZ:function(){return m},u$:function(){return d},u7:function(){return l}});var i=n(70655),a=n(2598),r={headers:{"Content-type":"application/json-patch+json"}},c=function(e,t,n,r,c){return void 0===r&&(r=!1),void 0===c&&(c=10),(0,i.mG)(void 0,void 0,void 0,(function(){var o;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return o={default:r,limit:c,fields:e,after:t,before:n},[4,a.Z.get("/roles",{params:o})];case 1:return[2,i.sent().data]}}))}))},o=function(e,t,n,r){return void 0===r&&(r=10),(0,i.mG)(void 0,void 0,void 0,(function(){var c;return(0,i.Jh)(this,(function(i){switch(i.label){case 0:return c={limit:r,fields:e,after:t,before:n},[4,a.Z.get("/policies",{params:c})];case 1:return[2,i.sent().data]}}))}))},s=function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return[4,a.Z.get("/roles/name/"+e,{params:{fields:t}})];case 1:return[2,n.sent().data]}}))}))},l=function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return[4,a.Z.get("/policies/name/"+e,{params:{fields:t}})];case 1:return[2,n.sent().data]}}))}))},u=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return[4,a.Z.post("/roles",e)];case 1:return[2,t.sent().data]}}))}))},d=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return[4,a.Z.post("/policies",e)];case 1:return[2,t.sent().data]}}))}))},m=function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return[4,a.Z.patch("/roles/"+t,e,r)];case 1:return[2,n.sent().data]}}))}))},p=function(e,t){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(n){switch(n.label){case 0:return[4,a.Z.patch("/policies/"+t,e,r)];case 1:return[2,n.sent().data]}}))}))},f=function(){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return[4,a.Z.get("/policies/resources")];case 1:return[2,e.sent().data]}}))}))},h=function(){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(e){switch(e.label){case 0:return[4,a.Z.get("/policies/functions")];case 1:return[2,e.sent().data]}}))}))},v=function(e){return(0,i.mG)(void 0,void 0,void 0,(function(){return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return[4,a.Z.get("/policies/validation/condition/"+e)];case 1:return[2,t.sent()]}}))}))}}}]);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy