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

assets.1383.407f13e2550dcbabcf44.js Maven / Gradle / Ivy

There is a newer version: 1.5.4
Show newest version
"use strict";(self.webpackChunkopen_metadata=self.webpackChunkopen_metadata||[]).push([[1383],{3765:function(e,t,n){var i=n(8081),a=n.n(i),r=n(23645),s=n.n(r)()(a());s.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/*\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/* navbar+tab_height+padding = 64+46+12  */\n.service-doc-panel {\n  background: #fff;\n  padding-bottom: 8px;\n}\n.service-doc-panel .toastui-editor-contents h1:first-child {\n  padding-top: 8px !important;\n}\n.service-doc-panel .toastui-editor-contents > * {\n  padding: 5px 35px !important;\n}\n',""]),t.Z=s},81383:function(e,t,n){n.r(t),n.d(t,{default:function(){return L}});var i,a=n(70655),r=n(49409),s=n(71230),l=n(15746),o=n(71577),c=n(23031),u=n(96486),d=n(67294),p=n(15137),m=n(62761),f=n(96162),h=n(16139),v=n(85071);!function(e){e.Entity="entity",e.Field="field"}(i||(i={}));var y=n(17309),b=n(226),g=n(30996),E=n(23575),w=n(96840),T=n(46321),S=n(79686),C=n(86879),k=n(26387),L=function(){var e=(0,p.UO)().entityTypeFQN,t=(0,p.k6)(),n=(0,a.CR)((0,d.useState)(),2),L=n[0],I=n[1],Z=(0,a.CR)((0,d.useState)([]),2),N=Z[0],A=Z[1],R=(0,a.CR)((0,d.useState)(""),2),O=R[0],U=R[1],x=(0,a.CR)((0,d.useState)(!1),2),F=x[0],q=x[1],P=(0,d.useMemo)((function(){return[{name:(0,c.t)("label.setting-plural"),url:(0,w.si)()},{name:(0,c.t)("label.custom-attribute-plural"),url:(0,w.si)(f.CZ.CUSTOM_ATTRIBUTES,(0,E.cE)(e))},{name:(0,c.t)("label.add-entity",{entity:(0,c.t)("label.custom-property")}),url:""}]}),[e]),W=(0,d.useMemo)((function(){var e=N.filter((function(e){return m.UT.includes(e.name)}));return(0,u.map)(e,(function(e){var t;return{key:e.name,label:(0,u.startCase)(null!==(t=e.displayName)&&void 0!==t?t:e.name),value:e.id}}))}),[N]),J=(0,d.useCallback)((function(){return t.goBack()}),[t]),B=(0,d.useCallback)((function(e){var t=e.target.classList.contains("ProseMirror");U(t?"root/description":e.target.id)}),[]);(0,d.useEffect)((function(){var t;t=e,(0,a.mG)(void 0,void 0,void 0,(function(){var e,n;return(0,a.Jh)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,b.ov)(t)];case 1:return e=i.sent(),I(e),[3,3];case 2:return n=i.sent(),(0,T.Eo)(n),[3,3];case 3:return[2]}}))}))}),[e]),(0,d.useEffect)((function(){(0,a.mG)(void 0,void 0,void 0,(function(){var e,t;return(0,a.Jh)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,b.Qe)(i.Field)];case 1:return e=n.sent(),A(e.data),[3,3];case 2:return t=n.sent(),(0,T.Eo)(t),[3,3];case 3:return[2]}}))}))}),[]);var D=[{name:"name",required:!0,label:(0,c.t)("label.name"),id:"root/name",type:y.U.TEXT,props:{"data-testid":"name",autoComplete:"off"},placeholder:(0,c.t)("label.name"),rules:[{pattern:h.YZ,message:(0,c.t)("message.custom-property-name-validation")}]},{name:"propertyType",required:!0,label:(0,c.t)("label.type"),id:"root/propertyType",type:y.U.SELECT,props:{"data-testid":"propertyType",options:W,placeholder:""+(0,c.t)("label.select-field",{field:(0,c.t)("label.type")})}},{name:"description",required:!0,label:(0,c.t)("label.description"),id:"root/description",type:y.U.DESCRIPTION,props:{"data-testid":"description",initialValue:""}}],G=d.createElement("div",{className:"max-width-md w-9/10 service-form-container"},d.createElement(k.Z,{titleLinks:P}),d.createElement(r.Z,{className:"m-t-md","data-testid":"custom-property-form",layout:"vertical",onFinish:function(e){return(0,a.mG)(void 0,void 0,void 0,(function(){var n,i;return(0,a.Jh)(this,(function(r){switch(r.label){case 0:if((0,u.isUndefined)(L))return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),q(!0),[4,(0,b.q8)(null!==(i=null==L?void 0:L.id)&&void 0!==i?i:"",(0,a.pi)((0,a.pi)({},e),{propertyType:{id:e.propertyType,type:"type"}}))];case 2:return r.sent(),t.goBack(),[3,5];case 3:return n=r.sent(),(0,T.Eo)(n),[3,5];case 4:return q(!1),[7];case 5:return[2]}}))}))},onFocus:B},(0,g.GL)(D),d.createElement(s.Z,{justify:"end"},d.createElement(l.Z,null,d.createElement(o.Z,{"data-testid":"back-button",type:"link",onClick:J},(0,c.t)("label.back"))),d.createElement(l.Z,null,d.createElement(o.Z,{"data-testid":"create-button",htmlType:"submit",loading:F,type:"primary"},(0,c.t)("label.create")))))),M=d.createElement(C.Z,{activeField:O,serviceName:v.uR,serviceType:v.rn});return d.createElement(S.Z,{firstPanel:{children:G,minWidth:700,flex:.7},pageTitle:(0,c.t)("label.add-entity",{entity:(0,c.t)("label.custom-property")}),secondPanel:{children:M,className:"service-doc-panel",minWidth:60,overlay:{displayThreshold:200,header:(0,c.t)("label.setup-guide"),rotation:"counter-clockwise"}}})}},86879:function(e,t,n){n.d(t,{Z:function(){return Z}});var i=n(70655),a=n(71230),r=n(15746),s=n(96486),l=n(67294),o=n(68432),c=n(16139),u=n(39117),d=n(73975),p=n(69523),m=n(24135),f=n(93379),h=n.n(f),v=n(7795),y=n.n(v),b=n(90569),g=n.n(b),E=n(3565),w=n.n(E),T=n(19216),S=n.n(T),C=n(44589),k=n.n(C),L=n(3765),I={};I.styleTagTransform=k(),I.setAttributes=w(),I.insert=g().bind(null,"head"),I.domAPI=y(),I.insertStyleElement=S(),h()(L.Z,I),L.Z&&L.Z.locals&&L.Z.locals;var Z=function(e){var t=e.serviceType,n=e.serviceName,f=e.activeField,h=e.isWorkflow,v=e.workflowType,y=(0,o.$)().i18n,b=(0,i.CR)((0,l.useState)(!1),2),g=b[0],E=b[1],w=(0,i.CR)((0,l.useState)(""),2),T=w[0],S=w[1],C=(0,l.useCallback)((function(e){var t;if(e){var n=e.split("/");if(c.JJ.test(e))return n[1];var i=null!==(t=(0,s.last)(n))&&void 0!==t?t:"";return c.X$.test(i)?(0,s.first)(i.split("_")):i}}),[]);return(0,l.useEffect)((function(){(0,i.mG)(void 0,void 0,void 0,(function(){var e,a,r,s,l,o,c;return(0,i.Jh)(this,(function(p){switch(p.label){case 0:E(!0),p.label=1;case 1:return p.trys.push([1,3,4,5]),e="",a=y.language===d.Qv.English,r=y.language+"/"+t+"/"+n+".md",s=d.Qv.English+"/"+t+"/"+n+".md",h&&v&&(r=y.language+"/"+t+"/workflows/"+v+".md",s=d.Qv.English+"/"+t+"/workflows/"+v+".md"),[4,Promise.allSettled([(0,u.bA)(r),a?Promise.reject(""):(0,u.bA)(s)])];case 2:return l=i.CR.apply(void 0,[p.sent(),2]),o=l[0],c=l[1],"fulfilled"===o.status&&(e=o.value),a||"fulfilled"!==c.status||(e=c.value),S(e),[3,5];case 3:return p.sent(),S(""),[3,5];case 4:return E(!1),[7];case 5:return[2]}}))}))}),[n,t]),(0,l.useEffect)((function(){var e=C(f);if(e){var t=document.querySelector('[data-id="'+e+'"]');t&&(t.scrollIntoView({block:"center",behavior:"smooth",inline:"center"}),t.setAttribute("data-highlighted","true"))}}),[f,C]),g?l.createElement(p.Z,null):l.createElement(a.Z,{"data-testid":"service-requirements"},l.createElement(r.Z,{span:24},l.createElement(m.Z,{enableSeeMoreVariant:!1,markdown:T})))}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy