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

assets.DomainRouter.9bf1d89926b9972b5b0a.js Maven / Gradle / Ivy

There is a newer version: 1.6.0-rc1
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[900],{2916:function(e,t,n){var a=n(8081),i=n.n(a),r=n(23645),l=n.n(r)()(i());l.push([e.id,'/*\n *  Copyright 2023 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.domain-form-container {\n  margin: 16px auto 0;\n  padding-bottom: 16px;\n}\n.domain-form-container .form-item-horizontal {\n  margin-bottom: 8px;\n}\n',""]),t.Z=l},25019:function(e,t,n){n.r(t),n.d(t,{default:function(){return se}});var a=n(67294),i=n(15137),r=n(62761),l=n(46481),s=n(7161),c=n(12981),m=n(70655),o=n(56256),u=n(19650),d=n(68432),p=n(19697),f=n(34005),h=n(48038),E=n(93895),v=n(96840),N=n(46321),b=n(89011),y=n(36169),Z=n(55587),g=n(32280),A=n(93379),I=n.n(A),x=n(7795),C=n.n(x),D=n(90569),w=n.n(D),O=n(3565),T=n.n(O),k=n(19216),M=n.n(k),S=n(44589),L=n.n(S),R=n(2916),P={};P.styleTagTransform=L(),P.setAttributes=T(),P.insert=w().bind(null,"head"),P.domAPI=C(),P.insertStyleElement=M(),I()(R.Z,P),R.Z&&R.Z.locals&&R.Z.locals;var _=function(){var e=(0,d.$)().t,t=(0,i.k6)(),n=(0,m.CR)((0,a.useState)(!1),2),l=n[0],s=n[1],c=(0,f.z)(),A=c.updateDomainLoading,I=c.updateDomains,x=(0,a.useCallback)((function(){return(0,m.mG)(void 0,void 0,void 0,(function(){var e;return(0,m.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),A(!0),[4,(0,h.i7)({limit:r.RW,fields:"parent"})];case 1:return e=t.sent().data,I(e),[3,4];case 2:return t.sent(),[3,4];case 3:return A(!1),[7];case 4:return[2]}}))}))}),[]),C=function(e){void 0===e&&(e=""),t.push((0,v.eY)(e))},D=(0,a.useCallback)((function(){C()}),[]),w=[{name:e("label.domain"),url:(0,v.eY)()},{name:e("label.add-entity",{entity:e("label.domain")}),url:"",activeTitle:!0}],O=(0,a.useCallback)((function(t){return(0,m.mG)(void 0,void 0,void 0,(function(){var n,a,i;return(0,m.Jh)(this,(function(l){switch(l.label){case 0:s(!0),l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,(0,h.UC)(t)];case 2:return n=l.sent(),x(),C(null!==(i=n.fullyQualifiedName)&&void 0!==i?i:""),[3,5];case 3:return a=l.sent(),(0,N.Eo)((0,E.B)(a,r.c9.alreadyExist)?e("server.entity-already-exist",{entity:e("label.domain"),entityPlural:e("label.domain-lowercase-plural"),name:t.name}):a,e("server.add-entity-error",{entity:e("label.domain-lowercase")})),[3,5];case 4:return s(!1),[7];case 5:return[2]}}))}))}),[]),T=a.createElement("div",{"data-testid":"right-panel"},a.createElement(o.Z.Title,{level:3},e("label.configure-entity",{entity:e("label.domain")})),a.createElement(o.Z.Text,{className:"mb-5"},e("message.create-new-domain-guide")),a.createElement(o.Z.Title,{level:4},e("label.domain-type")),a.createElement(o.Z.Text,{className:"mb-5"},e("message.domain-type-guide")),a.createElement(u.Z,{className:"m-t-md",direction:"vertical",size:"middle"},p.i.map((function(e){var t=e.type,n=e.description;return a.createElement(a.Fragment,{key:t},a.createElement(u.Z,{direction:"vertical",size:0},a.createElement(o.Z.Title,{level:5},t+" :"),a.createElement(o.Z.Paragraph,{className:"m-0"},n)))}))));return a.createElement(b.Z,{className:"content-height-with-resizable-panel",firstPanel:{className:"content-resizable-panel-container",children:a.createElement("div",{className:"max-width-md w-9/10 domain-form-container"},a.createElement(y.Z,{titleLinks:w}),a.createElement(o.Z.Title,{className:"m-t-md","data-testid":"form-heading",level:5},e("label.add-entity",{entity:e("label.domain")})),a.createElement(Z.Z,{isFormInDialog:!1,loading:l,type:g._.DOMAIN,onCancel:D,onSubmit:O})),minWidth:700,flex:.7},pageTitle:e("label.add-entity",{entity:e("label.domain")}),secondPanel:{children:T,className:"p-md p-t-xl content-resizable-panel-container",minWidth:400,flex:.3}})},W=n(34901),B=n(96486),Y=n(26396),G=n(76709),z=n(61105),Q=n(64632),q=n(72819),J=n(66537),U=n(35850),X=(n(82345),n(89108)),V=n(71230),F=n(15746),H=n(71577),K=n(28682),$=n(34962),j=n(57599),ee=n(88816),te=n(24671),ne=n(69959),ae=n(75883),ie=function(e){var t=e.domains,n=(0,d.$)().t,u=(0,l.BL)().permissions,p=(0,J.f)().fqn,f=(0,i.k6)(),h=(0,a.useMemo)((function(){return(0,c.P_)(q.OX.Create,s.A.DOMAIN,u)}),[u]),E=(0,a.useMemo)((function(){return p?ne.Z.split(p)[0]:t[0].fullyQualifiedName}),[p]),N=(0,a.useMemo)((function(){return t.reduce((function(e,t){var n;return(0,m.ev)((0,m.ev)([],(0,m.CR)(e)),[{key:null!==(n=t.fullyQualifiedName)&&void 0!==n?n:"",label:(0,te.C_)(t),icon:a.createElement($.ReactComponent,{height:16,width:16})}])}),[])}),[t]);return a.createElement(ee.Z,{id:"domain"},a.createElement(ae.Z,{loading:0===t.length},a.createElement(V.Z,{className:"p-y-xs",gutter:[0,16]},a.createElement(F.Z,{className:"p-x-sm",span:24},a.createElement(o.Z.Text,{strong:!0,className:"m-b-0"},n("label.domain-plural"))),h&&a.createElement(F.Z,{className:"p-x-sm",span:24},a.createElement(H.Z,{block:!0,className:"text-primary","data-testid":"add-domain",onClick:function(){f.push(r.Z6.ADD_DOMAIN)}},a.createElement("div",{className:"flex-center"},a.createElement(j.ReactComponent,{className:"anticon m-r-xss"}),n("label.add")))),a.createElement(F.Z,{span:24},N.length?a.createElement(K.Z,{className:"custom-menu","data-testid":"domain-left-panel",items:N,mode:"inline",selectedKeys:[E],onClick:function(e){f.push((0,v.eY)(e.key))}}):a.createElement("p",{className:"text-grey-muted text-center"},a.createElement("span",null,n("label.no-glossary-found")))))))},re=function(){var e=(0,d.$)().t,t=(0,J.f)().fqn,n=(0,i.k6)(),o=(0,l.BL)().permissions,u=(0,f.z)(),p=u.domains,E=u.updateDomains,b=u.domainLoading,y=u.updateDomainLoading,Z=(0,m.CR)((0,a.useState)(!1),2),g=Z[0],A=Z[1],I=(0,m.CR)((0,a.useState)(),2),x=I[0],C=I[1],D=(0,a.useMemo)((function(){return p.filter((function(e){return null==e.parent}))}),[p]),w=(0,a.useCallback)((function(){return(0,m.mG)(void 0,void 0,void 0,(function(){var e;return(0,m.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),y(!0),[4,(0,h.i7)({limit:r.RW,fields:"parent"})];case 1:return e=t.sent().data,E(e),[3,4];case 2:return t.sent(),[3,4];case 3:return y(!1),[7];case 4:return[2]}}))}))}),[]),O=(0,m.CR)((0,a.useMemo)((function(){return[(0,c.P_)(q.OX.Create,s.A.DOMAIN,o),(0,c.P_)(q.OX.ViewBasic,s.A.DOMAIN,o),(0,c.P_)(q.OX.ViewAll,s.A.DOMAIN,o)]}),[o]),3),T=O[0],k=O[1],M=O[2],S=function(e){return(0,m.mG)(void 0,void 0,void 0,(function(){var t,a,i,r;return(0,m.Jh)(this,(function(l){switch(l.label){case 0:if(!x)return[3,4];t=(0,W.qu)(x,e),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,(0,h.Y1)(x.id,t)];case 2:return a=l.sent(),C(a),i=D.map((function(e){return e.name===a.name?a:e})),E(i,!1),(null==x?void 0:x.name)!==e.name&&(n.push((0,v.eY)(a.fullyQualifiedName)),w()),[3,4];case 3:return r=l.sent(),(0,N.Eo)(r),[3,4];case 4:return[2]}}))}))},L=function(e){var t=D.find((function(t){return t.id!==e})),a=t?(0,v.eY)(t.fullyQualifiedName):(0,v.eY)();w(),n.push(a)},R=(0,a.useMemo)((function(){return g?a.createElement(U.Z,null):x?a.createElement(X.Z,{domain:x,onDelete:L,onUpdate:S}):a.createElement(Y.Z,null)}),[g,x,S,L]);return(0,a.useEffect)((function(){t&&function(e){(0,m.mG)(void 0,void 0,void 0,(function(){var t,n;return(0,m.Jh)(this,(function(a){switch(a.label){case 0:A(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(0,h.P1)(e,{fields:[Q.GB.CHILDREN,Q.GB.OWNERS,Q.GB.PARENT,Q.GB.EXPERTS]})];case 2:return t=a.sent(),C(t),[3,5];case 3:return n=a.sent(),(0,N.Eo)(n),[3,5];case 4:return A(!1),[7];case 5:return[2]}}))}))}(t)}),[t]),(0,a.useEffect)((function(){D.length>0&&!t&&!b&&n.push((0,v.eY)(D[0].fullyQualifiedName))}),[D,t]),b?a.createElement(U.Z,null):k||M?(0,B.isEmpty)(D)?a.createElement(Y.Z,{buttonId:"add-domain",className:"mt-0-important",heading:e("label.domain"),permission:T,type:T?z.Wx.CREATE:z.Wx.CUSTOM,onClick:function(){n.push(r.Z6.ADD_DOMAIN)}},e("message.domains-not-configured")):a.createElement(G.Z,{className:"domain-parent-page-layout",leftPanel:a.createElement(ie,{domains:D}),pageTitle:e("label.domain")},R):a.createElement(Y.Z,{className:"mt-0-important",type:z.Wx.PERMISSION})},le=n(21559),se=function(){var e=(0,l.BL)().permissions,t=(0,a.useMemo)((function(){return c.NE.hasViewPermissions(s.A.DOMAIN,e)}),[e]);return a.createElement(i.rs,null,a.createElement(i.AW,{exact:!0,component:_,path:r.Z6.ADD_DOMAIN}),a.createElement(le.Z,{exact:!0,component:re,hasPermission:t,path:r.Z6.DOMAIN}),a.createElement(le.Z,{exact:!0,component:re,hasPermission:t,path:[r.Z6.DOMAIN_DETAILS,r.Z6.DOMAIN_DETAILS_WITH_TAB]}))}},88816:function(e,t,n){var a=n(94184),i=n.n(a),r=n(96486),l=n(67294);t.Z=function(e){var t=e.children,n=e.id,a=e.className;return l.createElement("div",{className:i()(a,"left-panel-card"),"data-testid":(0,r.lowerCase)(n)+"-left-panel"},t)}},75883:function(e,t,n){var a=n(19586),i=n(71230),r=n(15746),l=n(96486),s=n(67294),c=n(97638),m=n(70866);t.Z=function(e){var t=e.loading,n=e.children;return t?s.createElement("div",{className:"m-b-md p-md"},s.createElement(a.Z,{active:!0,paragraph:{rows:0}}),s.createElement(i.Z,{gutter:32,justify:"space-between"},s.createElement(r.Z,{span:24},s.createElement(m.Z,null)),s.createElement(r.Z,{className:"m-t-md",span:24},s.createElement(m.Z,null)),s.createElement(r.Z,{className:"m-t-md",span:24},(0,c.kK)().map((function(){return s.createElement(m.Z,{className:"p-xs",key:(0,l.uniqueId)()})}))))):n}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy