@nocobase/plugin-graph-collection-manager 2.0.0-alpha.9 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ "use strict";(self.webpackChunk_nocobase_plugin_graph_collection_manager=self.webpackChunk_nocobase_plugin_graph_collection_manager||[]).push([["67"],{4528:function(e,t,n){n.r(t),n.d(t,{GraphCollectionPane:function(){return t$}});var r,o,i,a,l,c=n(482),u=n(8875),s=n(3772),d=n(8156),p=n.n(d),f=n(3505),m=n(5229),h=n(7584),y=n(2721),g=n(9007),v=n.n(g),b=n(3238),x=(0,d.createContext)(null);x.displayName="GraphCollectionContext";var C=function(e){var t=e.record,n=e.setTargetNode,r=e.node,o=e.handelOpenPorts;return p().createElement(x.Provider,{value:{node:r,record:t,positionTargetNode:function(e){n(e||r)},openPorts:o}},e.children)};function w(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,l,"next",e)}function l(e){w(i,r,o,a,l,"throw",e)}a(void 0)})}}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function P(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var S=function(e,t){var n,r,o=(0,s.useRequest)(function(){return Promise.resolve({data:v()(t)})},(n=E({},e),r=r={manual:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)),i=(0,s.useActionContext)();return(0,d.useEffect)(function(){i.visible&&o.run()},[i.visible]),o};(0,f.observer)(function(){var e=(0,d.useContext)(x).record,t=(0,s.useCompile)();return p().createElement("div",null,p().createElement(y.Select,{popupMatchSelectWidth:!1,disabled:!0,value:e.name,options:[{value:e.name,label:t(e.title)}]}))},{displayName:"SourceCollection"});var A=function(){var e=(0,f.useForm)(),t=(0,s.useActionContext)();return{run:function(){return O(function(){return P(this,function(n){return t.setVisible(!1),e.reset(),[2]})})()}}},k=function(e){var t=(0,f.useForm)(),n=(0,s.useAPIClient)(),r=(0,s.useActionContext)(),o=(0,s.useCollectionManager_deprecated)().refreshCM;return{run:function(){return O(function(){return P(this,function(i){switch(i.label){case 0:return[4,t.submit()];case 1:return i.sent(),[4,n.resource("collections").create({values:t.values})];case 2:return i.sent(),r.setVisible(!1),[4,t.reset()];case 3:return i.sent(),e("last"),[4,o()];case 4:return i.sent(),[2]}})})()}}},j=function(e,t){var n=(0,f.useForm)(),r=(0,s.useAPIClient)(),o=(0,s.useActionContext)(),i=(0,s.useCollectionManager_deprecated)().refreshCM,a=(0,d.useContext)(x),l=a.positionTargetNode,c=a.openPorts,u=(0,s.useCollectionFieldFormValues)().getValues;return{run:function(){return O(function(){var a,s,d,p,f;return P(this,function(f){switch(f.label){case 0:return[4,n.submit()];case 1:return f.sent(),a=u(),s=h.lodash.omit(a,["key","uiSchemaUid","collectionName","autoCreateReverseField","uiSchema.x-uid","reverseField.key","reverseField.uiSchemaUid"]),d=!["obo","oho","o2o","o2m","m2o","m2m","linkTo","id"].includes(a.interface),[4,r.resource("collections.fields",e).create({values:s})];case 2:if(p=f.sent().data.data,!t)return[3,4];return[4,r.resource("fields").move({sourceId:p.key,targetId:t,targetScope:e,method:"insertAfter"})];case 3:f.sent(),f.label=4;case 4:return o.setVisible(!1),[4,n.reset()];case 5:return f.sent(),l(),d&&c&&c(),[4,i()];case 6:return f.sent(),[2]}})})()}}},I=function(e){var t=e.collectionName,n=e.name,r=e.key,o=(0,s.useCollectionManager_deprecated)().refreshCM,i=(0,b.useTranslation)().t,a=(0,f.useForm)(),l=(0,s.useActionContext)(),c=(0,s.useAPIClient)(),u=(0,d.useContext)(x),p=u.positionTargetNode,m=u.node;return{run:function(){return O(function(){var e;return P(this,function(u){switch(u.label){case 0:return[4,a.submit()];case 1:return u.sent(),[4,c.resource("collections.fields",t).update({filterByTk:n,values:a.values})];case 2:return u.sent(),l.setVisible(!1),y.message.success(i("Saved successfully")),p(),o(),m.setPortProp(r,"uiSchema",{title:null==(e=a.values)?void 0:e.uiSchema.title}),[4,a.reset()];case 3:return u.sent(),[2]}})})()}}},N=function(){var e=(0,b.useTranslation)().t,t=(0,f.useForm)(),n=(0,s.useActionContext)(),r=t.values.name,o=(0,s.useAPIClient)(),i=(0,s.useCollectionManager_deprecated)().refreshCM,a=(0,d.useContext)(x).positionTargetNode;return{run:function(){return O(function(){return P(this,function(l){switch(l.label){case 0:return[4,t.submit()];case 1:return l.sent(),[4,o.resource("collections").update({filterByTk:r,values:E({},h.lodash.omit(t.values,["fields"]))})];case 2:return l.sent(),n.setVisible(!1),y.message.success(e("Saved successfully")),[4,t.reset()];case 3:return l.sent(),a(),i(),[2]}})})()}}},T=function(e){var t=(0,s.useAPIClient)(),n=(0,f.useForm)(),r=((null==n?void 0:n.values)||{}).cascade;return{run:function(){return O(function(){return P(this,function(n){switch(n.label){case 0:return[4,t.resource("collections").destroy({filterByTk:e,cascade:r})];case 1:return n.sent(),[4,t.resource("graphPositions").destroy({filter:{collectionName:e}})];case 2:return n.sent(),[2]}})})()}}},B=function(e){var t=T(e.name).run,n=(0,s.useCollectionManager_deprecated)().refreshCM,r=(0,d.useContext)(x).positionTargetNode;return{run:function(){return O(function(){return P(this,function(e){switch(e.label){case 0:return[4,t()];case 1:return e.sent(),r("destory"),[4,n()];case 2:return e.sent(),[2]}})})()}}},M=function(e,t){var n=(0,s.useAPIClient)(),r=(0,d.useContext)(x).positionTargetNode;return{run:function(){return O(function(){return P(this,function(o){switch(o.label){case 0:return[4,n.resource("collections.fields",e).destroy({filterByTk:t})];case 1:return o.sent(),r(),[2]}})})()}}},D=function(e){var t=e.collectionName,n=e.name,r=(0,s.useCollectionManager_deprecated)().refreshCM,o=M(t,n).run;return{run:function(){return O(function(){return P(this,function(e){switch(e.label){case 0:return[4,o()];case 1:return e.sent(),[4,r()];case 2:return e.sent(),[2]}})})()}}},F=function(e){return function(t,n){var r=n.targetScope;t.loading=!0,e(r).then(m.action.bound(function(e){t.dataSource=e,t.loading=!1})).catch(function(e){(0,h.error)(e)})}},L=n(5535),R=n(5666),_=n(655),G=n(3502),V=n(546),z=n(2403),K=n(4964),H=n(1011),U=n.n(H),W=n(467),$=n.n(W),q=n(6128);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function Q(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Y(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var X=$().groupBy,Z=$().reduce,ee=$().uniq,et=$().uniqBy,en=function(){return(0,b.useTranslation)("graph-collection-manager")},er=function(e,t){var n=[],r=function(t){var o=null==e?void 0:e.find(function(e){return e.name===t});if(o){var i=o.inherits;if(i)for(var a=0;a<i.length;a++){var l=i[a];n.push(l),r(l)}}return ee(n)};return r(t)},eo=function(e,t){var n=[],r=function(t){return e.filter(function(e){var n;return null==(n=e.inherits)?void 0:n.includes(t)}).forEach(function(e){var t=e.name;return n.push(e),r(t)}),n};return r(t)},ei=function(e){var t=[],n=[],r=e.map(function(r){var o=[],i=Q(r.fields),a=Z(er(e,r.name),function(t,n){var o,i=null==(o=e.find(function(e){return e.name===n}))?void 0:o.fields.map(function(e){var t,n;return t=J({},e),n=n={sourceCollectionName:r.name},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t});return i?t.concat(i):t},[]);et(i.concat(a),"name").forEach(function(e){e.uiSchema&&o.push(J({id:e.name,group:"list"},e)),["obo","oho","o2o","o2m","m2o","m2m","linkTo","mbm"].includes(e.interface)&&t.push(e)}),n.push(r.name);var l=ea(o);return{id:r.name,shape:"er-rect",name:r.name,title:r.title,width:250,ports:Q(l.initPorts||[]).concat(Q(l.morePorts||[])),item:r}}),o=ec(t,n,r);return{nodesData:r,edgesData:o,inheritEdges:el(e)}},ea=function(e){return X(e,function(e){return e.isForeignKey||e.primaryKey||["obo","oho","o2o","o2m","m2o","m2m","linkTo","id","mbm"].includes(e.interface)?"initPorts":"morePorts"})},el=function(e){var t={attrs:{line:{strokeWidth:1,textAnchor:"middle",textVerticalAnchor:"middle",stroke:"#ddd",sourceMarker:null}},router:{name:"smooth",args:{direction:"H"}},labels:[{markup:[{tagName:"ellipse",selector:"labelBody",style:{cursor:"pointer"}},{tagName:"text",selector:"labelText",style:{cursor:"pointer"}}],attrs:{labelText:{text:"inherits",fill:"rgba(0, 0, 0, 0.3)",textAnchor:"middle",textVerticalAnchor:"middle"},labelBody:{ref:"labelText",refWidth:"100%",refHeight:"100%",fill:"var(--nb-box-bg)"}},position:{distance:.5,args:{keepGradient:!0,ensureLegibility:!0}}}]},n=[];return e.forEach(function(e){var r=e.inherits||[];r.length&&r.forEach(function(r){n.push(J({id:e.name+r,source:{cell:e.name,connectionPoint:"rect"},target:{cell:r,connectionPoint:"rect"},connector:{name:"normal",zIndex:1e3},connectionType:"inherited"},t))})}),n},ec=function(e,t,n){for(var r=function(r){if(t.includes(e[r].target)){var i=n.find(function(t){return t.name===e[r].target}),a=n.find(function(t){return t.name===(e[r].sourceCollectionName||e[r].collectionName)}),l={attrs:{line:{strokeWidth:1,textAnchor:"middle",textVerticalAnchor:"middle",stroke:"#ddd",sourceMarker:null,targetMarker:null}},router:a.id===i.id?{name:"oneSide",args:{side:"left"}}:{name:"er",args:{direction:"H"}},labels:[{markup:[{tagName:"ellipse",selector:"labelBody",style:{cursor:"pointer"}},{tagName:"text",selector:"labelText",style:{cursor:"pointer"}}],attrs:{labelText:{text:eu(e[r].interface)[0],fill:"rgba(0, 0, 0, 0.3)",textAnchor:"middle",textVerticalAnchor:"middle"},labelBody:{ref:"labelText",refWidth:"100%",refHeight:"100%",stroke:"#ddd",fill:"var(--nb-box-bg)",strokeWidth:1,rx:10,ry:10}},position:{distance:.3,args:{keepGradient:!0,ensureLegibility:!0}}},{markup:[{tagName:"ellipse",selector:"labelBody",style:{cursor:"pointer"}},{tagName:"text",selector:"labelText",style:{cursor:"pointer"}}],attrs:{labelText:{text:eu(e[r].interface)[1],fill:"rgba(0, 0, 0, 0.3)",textAnchor:"middle",textVerticalAnchor:"middle"},labelBody:{ref:"labelText",refWidth:"100%",refHeight:"100%",stroke:"#ddd",fill:"var(--nb-box-bg)",rx:10,ry:10,strokeWidth:1}},position:{distance:.7,args:{keepGradient:!0,ensureLegibility:!0}}}],connector:{name:"normal",zIndex:1e3}},c=function(t){var n=o.find(function(e){return e.id===t});return!n||(n.associated.push(e[r].name),!1)};if(["m2m","linkTo"].includes(e[r].interface)){var u=n.find(function(t){return t.name===e[r].through});if(u){var s,d,p,f,m=a.id,h=u.id,y=null==(s=a.ports.find(function(t){return t.name===e[r].sourceKey}))?void 0:s.id,g=null==(d=u.ports.find(function(t){return t.name===e[r].foreignKey}))?void 0:d.id,v=i.id,b=u.id,x=null==(p=i.ports.find(function(t){return t.name===e[r].targetKey}))?void 0:p.id,C=null==(f=u.ports.find(function(t){return t.name===e[r].otherKey}))?void 0:f.id,w=m+y+h+g,O=v+x+b+C;o.push(J({id:w,source:{cell:m,port:y,anchor:{name:"right"}},target:{cell:h,port:g,anchor:{name:"left"}},associated:[e[r].name],m2m:[w,O]},l)),o.push(J({id:O,source:{cell:v,port:x,anchor:{name:"right"}},target:{cell:b,port:C,anchor:{name:"left"}},associated:[e[r].name],m2m:[w,O]},l))}}else{var E,P,S,A=n.find(function(t){return t.name==(e[r].sourceCollectionName||e[r].collectionName)}).ports.find(function(t){return t.name===e[r].foreignKey}),k=a.id,j=i.id,I=null==A?void 0:A.id,N=null==(E=i.ports.find(function(t){return t.name===e[r].targetKey}))?void 0:E.id,T=a.id,B=i.id,M=null==(P=a.ports.find(function(t){return t.name===e[r].sourceKey}))?void 0:P.id,D=null==(S=i.ports.find(function(t){return t.name===e[r].foreignKey}))?void 0:S.id;c(j+N+k+I)&&A&&N&&o.push(J({id:k+I+j+N,source:{cell:k,port:I,anchor:{name:"right"}},target:{cell:j,port:N,anchor:{name:"left"}},associated:[e[r].name]},l)),c(B+D+T+M)&&M&&D&&o.push(J({id:T+M+B+D,source:{cell:T,port:M,anchor:{name:"right"}},target:{cell:B,port:D,anchor:{name:"left"}},associated:[e[r].name]},l))}}},o=[],i=0;i<e.length;i++)r(i);return et(o,"id")},eu=function(e){switch(e){case"m2m":case"linkTo":case"o2m":return["1","N"];case"m2o":return["N","1"];case"obo":case"oho":return["1","1"];case"mbm":return["N","N"];default:return[]}},es=function(e,t){for(var n=function(n){if(t.find(function(t){return t.id===e[n].id})){var r=t.find(function(t){return t.id===e[n].id}),i=null==r?void 0:r.ports.items,a=e[n].ports;if(r){for(var l=function(t){i.find(function(e){return e.id===a[t].id})||o.push({status:"insertPort",node:e[n],port:{index:t,port:a[t]}})},c=function(t){a.find(function(e){return e.id===i[t].id})||o.push({status:"deletePort",node:e[n],port:i[t]})},u=0;u<a.length;u++)l(u);for(var s=0;s<i.length;s++)c(s);r.title!==e[n].title&&o.push({status:"updateNode",node:e[n]})}}else o.push({status:"add",node:e[n]})},r=function(n){e.find(function(e){return e.id===t[n].id})||o.push({status:"delete",node:t[n]})},o=[],i=e.length,a=t.length,l=0;l<i;l++)n(l);for(var c=0;c<a;c++)r(c);return o},ed=function(e,t){for(var n=function(n){t.find(function(t){return t.id===e[n].id})||a.push({status:"add",edge:e[n]})},r=function(n){e.find(function(e){return e.id===t[n].id})||a.push({status:"delete",edge:t[n]})},o=e.length,i=null==t?void 0:t.length,a=[],l=0;l<o;l++)n(l);for(var c=0;c<i;c++)r(c);return a},ep=function(){return i||(i=document.getElementById("graph_container"))},ef=function(){i=null},em={name:"collections",filterTargetKey:"name",targetKey:"name",sortable:!0,fields:[{type:"integer",name:"title",interface:"input",uiSchema:{title:'{{ t("Collection display name") }}',type:"number","x-component":"Input",required:!0}},{type:"string",name:"name",interface:"input",uiSchema:{title:'{{ t("Collection name") }}',type:"string","x-component":"Input",description:'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}'}},{type:"string",name:"template",interface:"input",uiSchema:{title:'{{ t("Collection Template") }}',type:"string","x-component":"Input"}},{type:"hasMany",name:"fields",target:"fields",collectionName:"collections",sourceKey:"name",targetKey:"name",uiSchema:{}},{type:"hasMany",name:"inherits",interface:"select",uiSchema:{title:'{{ t("Inherits") }}',type:"string","x-component":"Select","x-component-props":{mode:"multiple"}}},{type:"string",name:"description",interface:"input",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input"}}]},eh=function(e){var t=e.item;return p().createElement(s.AddCollection,{trigger:["click"],align:{overflow:{adjustY:!1}},item:t,scope:{useCancelAction:A},getContainer:ep},p().createElement(y.Button,{type:"primary"},p().createElement(c.PlusOutlined,null)))};function ey(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ev(){var e=eg(["\n .ant-menu-item {\n height: 32px;\n line-height: 32px;\n }\n "]);return ev=function(){return e},e}function eb(){var e=eg(["\n .ant-popover-inner-content {\n padding: 0;\n }\n "]);return eb=function(){return e},e}var ex=function(e){var t,n=e.onClick,r=en().t,o=[{key:tL.Both,label:"All relationships"},{key:tL.Entity,label:"Entity relationship only"},{key:tL.Inherit,label:"Inheritance relationship only"}],i=p().createElement("div",null,p().createElement(y.Menu,{defaultSelectedKeys:[tL.Both],selectable:!0,className:(0,K.css)(ev()),style:{maxHeight:"70vh",overflowY:"auto",border:"none"},items:[{type:"divider"}].concat(function(e){if(Array.isArray(e))return ey(e)}(t=o.map(function(e){return{key:e.key,label:r(e.label),onClick:function(t){null==n||n(e.key)}}}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return ey(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ey(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));return p().createElement(y.Popover,{content:i,autoAdjustOverflow:!0,placement:"bottomRight",trigger:["click"],getPopupContainer:ep,overlayClassName:(0,K.css)(eb())},p().createElement(y.Button,null,p().createElement(c.ShareAltOutlined,null)))};function eC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ew(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eO(){var e=ew(["\n .ant-menu-item {\n height: 32px;\n line-height: 32px;\n }\n "]);return eO=function(){return e},e}function eE(){var e=ew(["\n .ant-popover-inner-content {\n padding: 0;\n }\n "]);return eE=function(){return e},e}var eP=function(e){var t,n=e.onClick,r=en().t,o=[{key:tF.Both,label:"All directions"},{key:tF.Target,label:"Target index"},{key:tF.Source,label:"Source index"}],i=p().createElement("div",null,p().createElement(y.Menu,{defaultSelectedKeys:[tF.Target],selectable:!0,className:(0,K.css)(eO()),style:{maxHeight:"70vh",overflowY:"auto",border:"none"},items:[{type:"divider"}].concat(function(e){if(Array.isArray(e))return eC(e)}(t=o.map(function(e){return{key:e.key,label:r(e.label),onClick:function(){null==n||n(e.key)}}}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return eC(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eC(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));return p().createElement(y.Popover,{content:i,autoAdjustOverflow:!0,placement:"bottomRight",trigger:["click"],getPopupContainer:ep,overlayClassName:(0,K.css)(eE())},p().createElement(y.Button,null,p().createElement(c.LineHeightOutlined,null)))};function eS(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eA(){var e=eS(["\n .x6-widget-minimap {\n background-color: ",";\n }\n "]);return eA=function(){return e},e}function ek(){var e=eS(["\n flex-shrink: 0;\n padding: 2em 0;\n "]);return ek=function(){return e},e}function ej(){var e=eS(["\n .btn-del {\n border-color: transparent;\n background-color: ",";\n color: ",";\n height: 20px;\n width: 20px;\n &:hover {\n background-color: ",";\n }\n }\n .btn-add {\n background: ",";\n border-color: transparent;\n color: ",";\n width: 20px;\n &:hover {\n background-color: ",";\n }\n }\n .btn-edit {\n color: ",";\n display: flex;\n &:hover {\n background: ",";\n }\n }\n .btn-edit-in-head {\n border-color: transparent;\n color: ",";\n height: 20px;\n width: 22px;\n margin: 0px 5px 4px;\n line-height: 25px;\n &:hover {\n background: ",";\n }\n }\n .btn-inheriedParent {\n background: ",";\n border-color: transparent;\n color: ",";\n width: 20px;\n height: 20px;\n line-height: 25px;\n &:hover {\n background-color: ",";\n }\n }\n .btn-inheriedChild {\n background: ",";\n border-color: transparent;\n color: ",";\n width: 20px;\n height: 20px;\n margin: 0px 5px 4px;\n &:hover {\n background-color: ",";\n }\n }\n width: 250px;\n height: 100%;\n border-radius: ","px;\n background-color: ",";\n border: 0;\n overflow: hidden;\n &:hover {\n box-shadow: ",";\n }\n .body {\n width: 100%;\n height: 100%;\n background-color: ",";\n cursor: pointer;\n .morePorts {\n max-height: 300px;\n overflow: auto;\n }\n .body-item {\n display: inline-table;\n width: 100%;\n max-width: 250px;\n height: 40px;\n font-size: 14px;\n color: ",";\n border-top: 1px solid ",";\n text-overflow: ellipsis;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n\n .field-operator {\n display: none;\n }\n &:hover {\n .field-operator {\n display: flex;\n flex-direction: row-reverse;\n height: 32px;\n line-height: 32px;\n z-index: 999;\n cursor: pointer;\n text-align: right;\n background: ",";\n padding-right: 3px;\n span {\n margin: 3px;\n margin-left: 4px;\n padding: 3px;\n height: 20px;\n width: 20px;\n }\n .btn-override {\n border-color: transparent;\n width: 20px;\n color: ",";\n &:hover {\n background-color: ",";\n }\n }\n .btn-view {\n border-color: transparent;\n color: ",";\n width: 20px;\n }\n .btn-view:hover {\n background: ",";\n }\n .btn-assocition {\n border-color: transparent;\n color: ",";\n width: 20px;\n }\n .btn-assocition:hover {\n background: ",";\n }\n }\n .field_type {\n display: none;\n }\n }\n\n .name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n margin-left: 8px;\n min-width: 50%;\n .ant-badge {\n padding-right: 5px;\n }\n }\n\n .type {\n color: ",";\n margin-right: 8px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n }\n }\n "]);return ej=function(){return e},e}function eI(){var e=eS(["\n height: 50px;\n font-size: 14px;\n font-weight: 500;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n background: ",";\n color: ",";\n padding: 0 8px;\n "]);return eI=function(){return e},e}function eN(){var e=eS(["\n max-width: 80%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n "]);return eN=function(){return e},e}function eT(){var e=eS(["\n display: flex;\n span {\n cursor: pointer;\n }\n "]);return eT=function(){return e},e}function eB(){var e=eS(["\n div.field-content {\n font-size: 14px;\n color: ",";\n opacity: 0.8;\n display: block;\n .field-type {\n color: ",";\n float: right;\n }\n }\n "]);return eB=function(){return e},e}function eM(){var e=eS(["\n .nb-action-bar {\n float: right;\n position: fixed;\n margin-top: 24px;\n right: 24px;\n z-index: 1000;\n .trigger {\n float: right;\n margin: 2px 4px;\n font-size: 16px;\n }\n .ant-input {\n margin: 4px;\n }\n .ant-menu-inline {\n border-top: 1px solid ",";\n }\n .ant-layout-sider {\n margin-top: 24px;\n }\n .ant-menu-item {\n height: 32px;\n }\n .ant-btn {\n border: 0;\n }\n }\n "]);return eM=function(){return e},e}function eD(){var e=eS(["\n overflow: hidden;\n #container {\n height: 100% !important;\n }\n .x6-graph-scroller {\n height: calc(100vh) !important;\n width: calc(100vw) !important;\n }\n "]);return eD=function(){return e},e}var eF=(0,s.createStyles)(function(e){var t=e.token,n=e.css;return{graphMinimap:n(eA(),t.colorBgContainer),addButtonClass:n(ek()),entityContainer:n(ej(),t.colorErrorBg,t.colorErrorText,t.colorErrorBgHover,t.colorSuccessBg,t.colorSuccessText,t.colorSuccessBgHover,t.colorText,t.colorBgTextHover,t.colorText,t.colorBgTextHover,t.colorInfoBg,t.colorInfo,t.colorInfoBgHover,t.colorInfoBg,t.colorInfo,t.colorInfoBgHover,t.borderRadiusLG,t.colorBgContainer,t.boxShadowTertiary,t.colorBgContainer,t.colorText,t.colorBorderSecondary,t.colorBgContainer,t.colorText,t.colorBgTextHover,t.colorText,t.colorBgTextHover,t.colorPrimary,t.colorBgTextHover,t.colorTextTertiary),headClass:n(eI(),t.colorFillAlter,t.colorTextHeading),tableNameClass:n(eN()),tableBtnClass:n(eT()),collectionPopoverClass:n(eB(),t.colorTextSecondary,t.colorText),collectionListClass:n(eM(),t.colorBorderSecondary),graphCollectionContainerClass:n(eD())}});function eL(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}var eR=function(e){var t=j(e.collectionName,e.key).run;return{run:function(){var e;return(e=function(){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,t()];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eL(i,r,o,a,l,"next",e)}function l(e){eL(i,r,o,a,l,"throw",e)}a(void 0)})})()}}},e_=function(e){var t=e.item,n=e.database;return p().createElement(s.AddFieldAction,{trigger:["click"],align:{overflow:{adjustY:!1}},item:t,database:n,scope:{useCancelAction:A,useCreateCollectionField:function(){return eR(t)}},getContainer:ep},p().createElement(c.PlusOutlined,{className:"btn-add",id:"graph_btn_add_field"}))},eG=function(e){var t=e.targetGraph,n=e.item;return p().createElement(c.BranchesOutlined,{className:"btn-assocition",onClick:function(){t.onConnectionAssociation(n)}})},eV=function(e){var t=e.targetGraph,n=e.item,r=en().t,o=(0,(0,s.useCollectionManager_deprecated)().getChildrenCollections)(n.name);return(null==o?void 0:o.some(function(e){var n=e.name;return!t.hasCell(n)}))?p().createElement(y.Tooltip,{title:r("Show child"),getPopupContainer:ep},p().createElement(c.FallOutlined,{className:"btn-inheriedChild",onClick:function(){t.onConnectionChilds(o.map(function(e){return e.name}))}})):""},ez=function(e){var t=e.targetGraph,n=e.item,r=en().t,o=(0,(0,s.useCollectionManager_deprecated)().getInheritCollections)(n.name);return(null==o?void 0:o.some(function(e){return!t.hasCell(e)}))?p().createElement(y.Tooltip,{title:r("Show parent"),getPopupContainer:ep},p().createElement(c.RiseOutlined,{className:"btn-inheriedParent",onClick:function(){t.onConnectionParents(o)}})):""},eK=function(e){var t=e.item,n=e.className,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["item","className"]);return p().createElement(s.DeleteCollection,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({item:t,scope:{useCancelAction:A,useUpdateCollectionActionAndRefreshCM:N,createOnly:!1},getContainer:ep},r),p().createElement(c.DeleteOutlined,{className:n}))},eH=function(e){var t=e.item,n=e.className;return p().createElement(s.EditCollection,{item:t,scope:{useCancelAction:A,useUpdateCollectionActionAndRefreshCM:N,createOnly:!1},getContainer:ep},p().createElement(c.EditOutlined,{className:n}))};function eU(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}var eW=function(e){var t=I({collectionName:e.collectionName,name:e.name,key:e.id}).run;return{run:function(){var e;return(e=function(){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,t()];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eU(i,r,o,a,l,"next",e)}function l(e){eU(i,r,o,a,l,"throw",e)}a(void 0)})})()}}},e$=function(e){var t=e.item,n=e.parentItem;return p().createElement(s.EditFieldAction,{item:t,parentItem:n,scope:{useCancelAction:A,useUpdateCollectionField:function(){return eW(t)}},getContainer:ep},p().createElement(c.EditOutlined,{className:"btn-edit"}))};function eq(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eY(){var e=eq(["\n background: #f6f6f6;\n margin-bottom: 24px;\n padding: 16px;\n "]);return eY=function(){return e},e}function eJ(){var e=eq([""]);return eJ=function(){return e},e}function eQ(){var e=eq(["\n margin-top: 8px;\n color: rgba(0, 0, 0, 0.45);\n "]);return eQ=function(){return e},e}var eX=(0,n(2667).observer)(function(e){var t=e.schemaKey,n=(0,s.useCollectionManager_deprecated)().getInterface,r=(0,s.useCompile)(),o=(0,b.useTranslation)().t,i=n(t);return i?p().createElement("div",{className:(0,s.css)(eY())},p().createElement("div",{className:(0,s.css)(eJ())},o("Field interface"),": ",p().createElement(y.Tag,null,r(i.title))),i.description?p().createElement("div",{className:(0,s.css)(eQ())},r(i.description)):null):null},{displayName:"FieldSummary"});function eZ(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}var e0=function(e){var t=j(e.targetCollection).run;return{run:function(){var e;return(e=function(){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){switch(e.label){case 0:return[4,t()];case 1:return e.sent(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){eZ(i,r,o,a,l,"next",e)}function l(e){eZ(i,r,o,a,l,"throw",e)}a(void 0)})})()}}},e1=function(e){var t=e.item,n=e.parentItem;return p().createElement(s.OverridingFieldAction,{item:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),parentItem:n,scope:{useCancelAction:A,useOverridingCollectionField:function(){return e0(t)}},getContainer:ep},p().createElement(c.CopyOutlined,{className:"btn-override"}))},e2=function(e){var t=e.item,n=e.parentItem;return p().createElement(s.ViewFieldAction,{item:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t),parentItem:n,getContainer:ep},p().createElement(c.EyeOutlined,{className:"btn-view"}))};function e4(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e3(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}function e5(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){e3(i,r,o,a,l,"next",e)}function l(e){e3(i,r,o,a,l,"throw",e)}a(void 0)})}}function e6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){e6(e,t,n[t])})}return e}function e7(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function e9(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e4(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function tt(){var e,t,n=(e=["\n display: block;\n color: #958f8f;\n padding: 10px 5px;\n &:hover {\n color: rgb(99 90 88);\n }\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return tt=function(){return n},n}var tn=p().memo(function(e){var t=e.property,n=e.loadCollections,r=e.collectionData,o=e.setTargetNode,i=e.node,a=e.handelOpenPorts,l=e.title,m=e.name,h=e.targetGraph,y=t.collectionName===m,g=(0,d.useContext)(f.SchemaOptionsContext),v=["hasOne","hasMany","belongsTo","belongsToMany"].includes(t.type)&&!(t.through?h.hasCell(t.through):h.hasCell(t.target)),b=((0,s.useCurrentAppInfo)()||{data:{database:{}}}).data.database;return p().createElement("div",{className:"field-operator"},p().createElement(s.SchemaComponentProvider,{components:e8({Select:function(e){return p().createElement(s.Select,e7(e8({popupMatchSelectWidth:!1},e),{getPopupContainer:ep}))},FieldSummary:eX,AddFieldAction:e_,OverrideFieldAction:e1,ViewFieldAction:e2,EditFieldAction:e$,ConnectAssociationAction:eG},g.components),scope:e8({useAsyncDataSource:F,loadCollections:n,useCancelAction:A,useNewId:function(e){return"".concat(e||"").concat((0,u.uid)())},useCurrentFields:function(){var e=(0,s.useRecord)();return(0,(0,s.useCollectionManager_deprecated)().getCollectionFields)(e.collectionName||e.name)},useValuesFromRecord:S,useUpdateCollectionActionAndRefreshCM:N,isInheritField:y,isShowAssocition:v},g.scope)},p().createElement(C,{record:r.current,setTargetNode:o,node:i,handelOpenPorts:function(){return a(!0)}},p().createElement(s.SchemaComponent,{scope:A,schema:{type:"object",properties:{create:{type:"void","x-action":"create","x-component":"AddFieldAction","x-visible":"{{isInheritField}}","x-component-props":{item:e7(e8({},t),{title:l}),database:b}},update:{type:"void","x-action":"update","x-component":"EditFieldAction","x-visible":"{{isInheritField}}","x-component-props":{item:e7(e8({},t),{title:l}),parentItem:r.current}},delete:{type:"void","x-action":"destroy","x-component":"Action.Link","x-visible":"{{isInheritField}}","x-component-props":{component:c.DeleteOutlined,icon:"DeleteOutlined",className:"btn-del",confirm:{getContainer:ep,title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:function(){return D({collectionName:t.collectionName,name:t.name})}}},override:{type:"void","x-action":"create","x-visible":"{{!isInheritField}}","x-component":"OverrideFieldAction","x-component-props":{icon:"ReconciliationOutlined",item:e7(e8({},t),{title:l,targetCollection:m}),parentItem:r.current}},view:{type:"void","x-action":"view","x-visible":"{{!isInheritField}}","x-component":"ViewFieldAction","x-component-props":{icon:"ReconciliationOutlined",item:e7(e8({},t),{title:l}),parentItem:r.current}},connectAssociation:{type:"void","x-action":"view","x-visible":"{{isShowAssocition}}","x-component":"ConnectAssociationAction","x-component-props":{item:e7(e8({},t),{title:l,__parent:r.current}),targetGraph:h}}}}}))))});tn.displayName="OperationButton";var tr=p().forwardRef(function(e,t){var n,r,o,i,a=e.property,l=e.node,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["property","node"]),u=l.store.data,f=u.title,m=u.name,h=u.sourcePort,g=u.associated,v=u.targetPort,b=(0,s.useCompile)(),x=eF().styles,C=(0,s.useCollectionManager_deprecated)().getInterface,w=e9((0,d.useState)(!1),2),O=w[0],E=w[1],P=p().useCallback(function(e){var t=e.type,n=e.name,r=e.primaryKey,o=e.allowNull,i=e.autoIncrement;return p().createElement("div",{className:x.collectionPopoverClass},p().createElement("div",{className:"field-content"},p().createElement("div",null,p().createElement("span",null,"name"),": ",p().createElement("span",{className:"field-type"},n)),p().createElement("div",null,p().createElement("span",null,"type"),": ",p().createElement("span",{className:"field-type"},t))),p().createElement("p",null,r&&p().createElement(y.Tag,{color:"green"},"PRIMARY"),o&&p().createElement(y.Tag,{color:"geekblue"},"ALLOWNULL"),i&&p().createElement(y.Tag,{color:"purple"},"AUTOINCREMENT")))},[]),S=e8({title:f,name:m,node:l},c);return p().createElement("div",null,p().createElement("div",{className:"body-item",key:a.id,id:a.id,style:{background:v===a.id||h===a.id||(null==g?void 0:g.includes(a.name))?"#e6f7ff":null},onMouseEnter:function(){E(!0)},onMouseLeave:function(){return E(!1)}},p().createElement(s.StablePopover,{content:P(a),getPopupContainer:ep,mouseLeaveDelay:0,title:p().createElement("div",null,b(null==(n=a.uiSchema)?void 0:n.title),p().createElement("span",{style:{color:"#ffa940",float:"right"}},b(null==(r=C(a.interface))?void 0:r.title))),key:a.id,placement:"right"},p().createElement("div",{className:"name"},p().createElement(y.Badge,{color:a.isForeignKey||a.primaryKey||"id"===a.interface?"red":["obo","oho","o2o","o2m","m2o","m2m","linkTo"].includes(a.interface)?"orange":void 0}),b(null==(o=a.uiSchema)?void 0:o.title))),p().createElement("div",{className:"type field_type"},b(null==(i=C(a.interface))?void 0:i.title)),O&&p().createElement(tn,e8({property:a},S))))});tr.displayName="PopoverContent";var to=p().memo(function(e){var t,n,r=e.targetGraph,o=e.collectionData,i=e.setTargetNode,a=e.node,l=e.loadCollections,u=a.store.data,s=u.item,f=u.ports,m=u.data,h=e9((0,d.useState)(!1),2),y=h[0],g=h[1],v=en().t,b=$().groupBy(f.items,function(e){return e.isForeignKey||e.primaryKey||["obo","oho","o2o","o2m","m2o","m2m","linkTo","id","mbm"].includes(e.interface)?"initPorts":"morePorts"}),x=function(e){null==(t=r.getCellById(s.name))||t.toFront(),g(e);var t,n=r.collapseNodes||[];n.push(e6({},s.name,e)),r.collapseNodes=n,r.getCellById(s.name).setData({collapse:!0})},C=y&&(null==m?void 0:m.collapse),w={collectionData:o,setTargetNode:i,loadCollections:l,handelOpenPorts:x,node:a,targetGraph:r};return p().createElement("div",{className:"body"},null==(t=b.initPorts)?void 0:t.map(function(e){return e.uiSchema&&p().createElement(tr,e7(e8({},w),{property:e,key:e.id}))}),p().createElement("div",{className:"morePorts"},C&&(null==(n=b.morePorts)?void 0:n.map(function(e){return e.uiSchema&&p().createElement(tr,e7(e8({},w),{property:e,key:e.id}))}))),p().createElement("a",{className:(0,K.css)(tt()),onClick:function(){return x(!C)}},C?[p().createElement(c.UpOutlined,{style:{margin:"0px 8px 0px 5px"},key:"icon"}),p().createElement("span",{key:"associate"},v("Association Fields"))]:[p().createElement(c.DownOutlined,{style:{margin:"0px 8px 0px 5px"},key:"icon"}),p().createElement("span",{key:"all"},v("All Fields"))]))}),ti=function(e){var t,n,r=eF().styles,o=(0,d.useContext)(f.SchemaOptionsContext),i=e.node,a=e.setTargetNode,l=e.targetGraph,u=i.store.data,m=u.title,h=u.name,g=u.item,v=u.attrs,b=u.select,x=u.actived,w=i.id,O=((0,s.useCurrentAppInfo)()||{data:{database:{}}}).data.database,E=(0,d.useRef)(),P=(0,d.useContext)(s.CollectionCategoriesContext);E.current=e7(e8({},g),{title:m,inherits:g.inherits&&new Proxy(g.inherits,{})});var S=g.category,k=void 0===S?[]:S,j=(0,s.useCompile)(),I=(t=e5(function(e){var t;return te(this,function(e){return[2,null==(t=l.collections)?void 0:t.map(function(e){return{label:j(e.title),value:e.name}})]})}),function(e){return t.apply(this,arguments)}),T=(n=e5(function(){return te(this,function(e){return[2,null==P?void 0:P.data.map(function(e){return{label:j(e.name),value:e.id}})]})}),function(){return n.apply(this,arguments)});return p().createElement("div",{className:r.entityContainer,style:{boxShadow:null==v?void 0:v.boxShadow,border:b?"2px dashed #f5a20a":0}},null==k?void 0:k.map(function(e,t){return p().createElement(y.Badge.Ribbon,{key:t,color:e.color,style:{width:"103%",height:"3px",marginTop:5*t-4,borderRadius:0},placement:"start"})}),p().createElement("div",{className:r.headClass,style:{background:(null==v?void 0:v.hightLight)?"#1890ff":null,paddingTop:3*k.length}},p().createElement("span",{className:r.tableNameClass},j(m)),p().createElement("div",{className:r.tableBtnClass},p().createElement(s.SchemaComponentProvider,null,p().createElement(C,{setTargetNode:a,node:i},p().createElement(s.CollectionProvider_deprecated,{collection:em},p().createElement(s.SchemaComponent,{scope:{useUpdateCollectionActionAndRefreshCM:N,useCancelAction:A,loadCollections:I,loadCategories:T,useAsyncDataSource:F,enableInherits:(null==O?void 0:O.dialect)==="postgres",actived:!0===x},components:e8({EditOutlined:c.EditOutlined,EditCollectionAction:eH,DeleteCollectionAction:eK,ConnectChildAction:eV,ConnectParentAction:ez},o.components),schema:{type:"object",name:i.id,properties:{connectParent:{type:"void","x-visible":"{{actived}}","x-component":"ConnectParentAction","x-component-props":{item:E.current,targetGraph:l}},connectChild:{type:"void","x-component":"ConnectChildAction","x-component-props":{item:E.current,targetGraph:l},"x-visible":"{{actived}}"},update:{type:"void",title:'{{ t("Edit") }}',"x-component":"EditCollectionAction","x-component-props":{type:"primary",item:E.current,className:"btn-edit-in-head"}},delete:{type:"void","x-action":"destroy","x-component":"DeleteCollectionAction","x-component-props":{className:"btn-del",getContainer:ep,item:E.current,useAction:function(){return B({name:h,id:w})}}}}}})))))),p().createElement(to,{targetGraph:l,collectionData:E,setTargetNode:a,node:i,loadCollections:I}))},ta=n(2749);function tl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tc=(0,d.forwardRef)(function(){var e,t=en().t,n=(e=(0,ta.useFullscreen)(document.getElementById("graph_container")),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return tl(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tl(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=n[0],o=n[1].toggleFullscreen;return p().createElement(y.Tooltip,{title:t("Full Screen"),getPopupContainer:ep},p().createElement(y.Button,{onClick:function(){o()}},r?p().createElement(c.FullscreenExitOutlined,null):p().createElement(c.FullscreenOutlined,null)))});function tu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ts(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function td(e,t){if(e){if("string"==typeof e)return tu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tu(e,t)}}function tp(){var e=ts(["\n .ant-menu-item {\n height: 32px;\n line-height: 32px;\n }\n "]);return tp=function(){return e},e}function tf(){var e=ts(["\n .ant-popover-inner-content {\n padding: 0;\n }\n "]);return tf=function(){return e},e}tc.displayName="FullscreenAction";var tm=function(e){var t,n,r=e.handleFiterCollections,o=(0,d.useContext)(tV),i=o.handleSearchCollection,a=o.collectionList,l=(t=(0,d.useState)([]),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,2)||td(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],f=l[1],m=en().t,h=(0,s.useCompile)(),g=p().createElement("div",null,p().createElement(y.Input,{style:{margin:"4px 0"},bordered:!1,placeholder:m("Collection Search"),onChange:i}),p().createElement(y.Menu,{selectedKeys:u,selectable:!0,className:(0,K.css)(tp()),style:{maxHeight:"70vh",overflowY:"auto",border:"none"},items:[{type:"divider"}].concat(function(e){if(Array.isArray(e))return tu(e)}(n=a.map(function(e){return{key:e.name,label:h(e.title),onClick:function(e){e.key!==u[0]?(f([e.key]),r(e.key)):(r(!1),f([]))}}}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||td(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}));return p().createElement(y.Popover,{content:g,autoAdjustOverflow:!0,placement:"bottomRight",trigger:["click"],getPopupContainer:ep,overlayClassName:(0,K.css)(tf())},p().createElement(y.Button,null,p().createElement(c.MenuOutlined,null)))};function th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ty=function(e){var t,n=(0,d.useContext)(tV).collectionList,r=(0,s.useCompile)(),o=(t=(0,q.useSearchParams)(),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return th(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return th(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1],l=i.get("collections"),c=null==l?void 0:l.split(","),u=null==c?void 0:c.filter(function(e){return n.find(function(t){return t.name===e})}),f=(0,d.useMemo)(function(){return n.map(function(e){return{label:r(e.title),value:e.name}})},[n]);return p().createElement(s.Select,{value:u,showSearch:!0,getPopupContainer:ep,mode:"multiple",allowClear:!0,options:f,onChange:function(e){a([["collections",e.toString()]])},style:{minWidth:200,position:"fixed",margin:"24px",zIndex:1e3,maxWidth:"60%"}})};function tg(e,t,n){return(tg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tv(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function tv(e){return(tv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tb(e,t){return(tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tx=function(){return!!e})()}var tC=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=tv(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,tx()?Reflect.construct(e,t||[],tv(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&tb(n,e),t=[{key:"renderMarkup",value:function(){return this.renderJSONMarkup({tagName:"rect",selector:"body"})}},{key:"update",value:function(){var e=this.cell.getAttrs().hightLight?"#1890ff":"gray";tg(tv(n.prototype),"update",this).call(this,{body:{refWidth:"50px",refHeight:"100px",fill:e}})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(L.DK);function tw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tO(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){n(e);return}l.done?t(c):Promise.resolve(c).then(r,o)}function tE(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){tO(i,r,o,a,l,"next",e)}function l(e){tO(i,r,o,a,l,"throw",e)}a(void 0)})}}function tP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tS(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function tA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tw(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tk(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){var c=[i,l];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var tj=$().drop,tI=$().groupBy,tN=$().last,tT=$().maxBy,tB=$().minBy,tM=$().take,tD=$().uniq,tF=((r={}).Both="both",r.Target="target",r.Source="source",r),tL=((o={}).Both="both",o.Inherit="inherited",o.Entity="entity",o),tR=function(e,t){for(var n=[];(null==t?void 0:t.length)>0&&e;)n.push(t.splice(0,e));return n};function t_(){return(t_=tE(function(e,t){var n,r,o,i,c;return tk(this,function(u){switch(u.label){case 0:if(n=a.positions,r=[],o=a.getNodes(),i=a.getEdges(),(c=new(U()).graphlib.Graph).setGraph({rankdir:"TB",nodesep:50,edgesep:50,rankSep:50,align:"DL",controlPoints:!0}),c.setDefaultEdgeLabel(function(){return{}}),o.forEach(function(e,t){var n=32*e.getPorts().length+30;c.setNode(e.id,{width:250,height:n})}),U().layout(c),tR(15,c.nodes()).forEach(function(e,t){e.forEach(function(e,o){var i=a.getCellById(e);if(i){var l=n&&n.find(function(e){return e.collectionName===i.store.data.name})||{},c={x:o%15*325+50,y:400*t+100};i.position(l.x||c.x,l.y||c.y),n&&!n.find(function(e){return e.collectionName===i.store.data.name})&&r.push({collectionName:i.store.data.name,x:c.x,y:c.y})}})}),i.forEach(function(e){tG(e)}),l?"string"==typeof l?a.positionCell(tN(o),"top",{padding:100}):a.positionCell(l,"top",{padding:100}):a.positionCell(o[0],"top-left",{padding:100}),!(r.length>0&&t))return[3,2];return[4,e(r)];case 1:u.sent(),r=[],u.label=2;case 2:return[2]}})})).apply(this,arguments)}function tG(e){var t,n,r=e.store.data.connectionType,o=e.getSource(),i=e.getTarget(),l=null==(t=a.getCellById(o.cell))?void 0:t.position().x,c=null==(n=a.getCellById(i.cell))?void 0:n.position().x,u=r?{name:"topLeft",args:{dy:20}}:{name:"left"},s=r?{name:"topRight",args:{dy:20}}:"right",d=r?"normal":"er";if(e.getVertices().forEach(function(){return e.removeVertexAt(0)}),l-100>c)e.setSource({cell:o.cell,port:o.port,anchor:u}),e.setTarget({cell:i.cell,port:i.port,anchor:s}),e.setRouter(d,{direction:"H"});else if(100>Math.abs(l-c)){var p=a.getCellById(o.cell),f=a.getCellById(i.cell);e.setSource({cell:o.cell,port:o.port,anchor:u}),e.setTarget({cell:i.cell,port:i.port,anchor:u}),r?(e.setVertices([{x:p.position().x-30,y:p.position().y+20},{x:f.position().x-30,y:f.position().y+20}]),e.setRouter("normal")):e.setRouter("oneSide",{side:"left"})}else e.setSource({cell:o.cell,port:o.port,anchor:s}),e.setTarget({cell:i.cell,port:i.port,anchor:u}),e.setRouter(d,{direction:"H"})}var tV=(0,d.createContext)({});tV.displayName="CollapsedContext";var tz=function(){var e=[],t=a.getEdges(),n=a.getNodes();return t.forEach(function(t){e.push(t.getSourceCellId()),e.push(t.getTargetCellId())}),tI(n,function(t){return e.includes(t.id)?"linkNodes":"rawNodes"})},tK=function(e){var t=tz(),n=t.linkNodes,r=void 0===n?[]:n,o=t.rawNodes,i=void 0===o?[]:o,l=a.positions,c=r.concat(i||[]),u=a.getEdges(),s=new(U()).graphlib.Graph,d=[];s.setGraph({rankdir:"TB",nodesep:50,edgesep:50,rankSep:50,align:"DL",controlPoints:!0}),c.forEach(function(e){s.setNode(e.id,{width:250,height:400})}),u.forEach(function(e){var t=e.getSource(),n=e.getTarget();s.setEdge(t.cell,n.cell,{})}),U().layout(s);var p=s.nodes(),f=tM(p,r.length),m=tj(p,r.length);if(f.forEach(function(e){var t,n=a.getCellById(e),r=null==(t=l.find(function(e){return e.collectionName===n.id}))?void 0:t.id;if(n){var o=s.node(e);d.push({id:r,collectionName:n.id,x:o.x,y:o.y}),n.position(null==o?void 0:o.x,null==o?void 0:o.y)}}),f.length){var h,y,g,v,b=a.getCellById(tT(f,function(e){return a.getCellById(e).position().y})).position().y,x=a.getCellById(tB(f,function(e){return a.getCellById(e).position().x})).position().x,C=a.getCellById(tT(f,function(e){return a.getCellById(e).position().x})).position().x,w=f.filter(function(e){return 50>Math.abs(a.getCellById(e).position().y-b)}),O=null==(v=a.getCellById(tT(w,function(e){return a.getCellById(e).position().x})))?void 0:v.position();if(g=Math.round(C/320)||1,h=Math.floor((4500-(C+100-O.x))/280),y=tR(g,i),h>=1){var E=tM(m,h);y=tR(g,tj(m,h)),E.forEach(function(e,t){var n=a.getCellById(e);if(n){var r,o={x:O.x+320*t+280,y:O.y};n.position(o.x,o.y);var i=null==(r=l.find(function(e){return e.collectionName===n.id}))?void 0:r.id;d.push({id:i,collectionName:n.id,x:o.x,y:o.y})}})}}else g=15,h=0,y=tR(15,i),x=50,b=50;if(y.forEach(function(e,t){e.forEach(function(e,n){var r=a.getCellById(e),o=n%g;if(r){var i,c={x:325*o+x,y:300*t+b+300};r.position(c.x,c.y);var u=null==(i=l.find(function(e){return e.collectionName===r.id}))?void 0:i.id;d.push({id:u,collectionName:r.id,x:c.x,y:c.y})}})}),u.forEach(function(e){tG(e)}),a.positionCell(c[0],"top-left",{padding:100}),!e){var P=d.filter(function(e){return e.id}),S=d.filter(function(e){return!e.id});P.length>0&&a.updatePositionAction(P,!0),S.length>0&&a.saveGraphPositionAction(S)}},tH=p().memo(function(){var e,t,n,r,o,i=(0,s.useGlobalTheme)().theme,u=eF().styles,m=tA((0,q.useSearchParams)(),2),h=m[0],g=m[1],v=h.get("collections"),b=(0,d.useContext)(f.SchemaOptionsContext),x=(0,s.useAPIClient)(),C=(0,s.useCompile)(),w=en().t,O=tA((0,d.useState)([]),2),E=O[0],P=O[1],S=tA((0,d.useState)([]),2),A=S[0],j=S[1],I=tA((0,d.useState)(!1),2),N=I[0],T=I[1],B=(0,s.useCollectionManager_deprecated)(),M=(B.collections,B.getCollections),D=(0,d.useContext)(s.CollectionCategoriesContext),H=(0,d.useRef)();H.current=D;var U=(0,s.useDataSourceManager)(),W=(0,s.useCurrentAppInfo)(),$=(0,s.useApp)(),Y=(W||{data:{database:{}}}).data.database,J=tP({},null==b?void 0:b.scope),Q=tP({},null==b?void 0:b.components),X=(e=tE(function(e){return tk(this,function(t){switch(t.label){case 0:return[4,x.resource("graphPositions").create({values:e})];case 1:return t.sent(),[4,ee()];case 2:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)}),Z=(t=tE(function(e){var t,n=arguments;return tk(this,function(r){switch(r.label){case 0:if(t=n.length>1&&void 0!==n[1]&&n[1],v)return[3,6];if(!t)return[3,2];return[4,x.resource("graphPositions").update({values:e})];case 1:return r.sent(),[3,4];case 2:return[4,x.resource("graphPositions").update({filter:{collectionName:e.collectionName},values:tP({},e)})];case 3:r.sent(),r.label=4;case 4:return[4,ee()];case 5:r.sent(),r.label=6;case 6:return[2]}})}),function(e){return t.apply(this,arguments)}),ee=(n=tE(function(){var e;return tk(this,function(t){switch(t.label){case 0:return[4,x.resource("graphPositions").list({paginate:!1})];case 1:return e=t.sent().data,a.positions=e.data,[2,Promise.resolve()]}})}),function(){return n.apply(this,arguments)}),et=function(e){l=e,"destory"===e&&ee()},ea=(r=tE(function(e){var t,n;return tk(this,function(r){return t=M(),a&&(a.collections=t,a.updatePositionAction=Z,a.saveGraphPositionAction=X,n=a.getNodes(),P(t),j(t),!n.length||e?v||eC(t):ew(t)),[2]})}),function(e){return r.apply(this,arguments)}),el=(0,s.useDataSource)(),ec=function(){(a=new L.kJ({container:document.getElementById("container"),moveThreshold:0,virtual:!1,async:!0,connecting:{anchor:{name:"midSide"}},mousewheel:{enabled:!0,modifiers:["ctrl","meta"]},interacting:{magnetConnectable:!1},preventDefaultBlankAction:!0})).connectionType="both",a.direction="target",a.cacheCollection={},a.onConnectionAssociation=eu,a.onConnectionChilds=ey,a.onConnectionParents=eg,L.kJ.registerPortLayout("erPortPosition",function(e){return e.map(function(e,t){return{position:{x:0,y:(t+1)*40},angle:0}})},!0),(0,z.z2)({shape:"er-rect",width:250,height:40,ports:{groups:{list:{markup:[{tagName:"rect",selector:"portBody"}],attrs:{portBody:{width:250,height:40,strokeWidth:1,visibility:"hidden"}},position:"erPortPosition"}}},body:{refWidth:100,refHeight:100},component:function(e){return p().createElement(s.CurrentAppInfoContext.Provider,{value:W},p().createElement(s.DataSourceApplicationProvider,{dataSourceManager:U,dataSource:null==el?void 0:el.key},p().createElement(s.APIClientProvider,{apiClient:x},p().createElement(s.SchemaComponentOptions,{inherit:!0,scope:J,components:Q},p().createElement(s.CollectionCategoriesContext.Provider,{value:H.current},p().createElement(y.ConfigProvider,{theme:i},p().createElement("div",{style:{height:"auto"}},p().createElement(y.App,null,p().createElement(s.ApplicationContext.Provider,{value:$},p().createElement(ti,tS(tP({},e),{setTargetNode:et,targetGraph:a})))))))))))}}),a.use(new _.T({autoResize:!0,enabled:!0,pannable:!0,pageVisible:!0,pageBreak:!1,padding:{top:10,left:500,right:300,bottom:300}})),a.use(new R.a({container:document.getElementById("graph-minimap"),width:300,height:200,padding:10,graphOptions:{async:!0,createCellView:function(e){return e.isEdge()?null:e.isNode()?tC:void 0}}})),a.use(new G.Y({enabled:!1,multiple:!0,rubberband:!0,movable:!0,className:"node-selecting",modifiers:"shift"})),a.use(new V.H({enabled:!0})),a.on("edge:mouseleave",function(e){var t=e.e,n=e.edge;t.stopPropagation(),ev(n)}),a.on("node:mouseleave",function(e){var t=e.e,n=e.node;t.stopPropagation(),n.setProp({actived:!1})}),a.on("node:moved",function(e){var t=e.e,n=e.node;t.stopPropagation();var r=a.getConnectedEdges(n),o=n.position(),i=a.positions.find(function(e){return e.collectionName===n.store.data.name});i?(i.x!==o.x||i.y!==o.y)&&Z(tP({collectionName:n.store.data.name},o)):X(tP({collectionName:n.store.data.name},o)),r.forEach(function(e){tG(e)})}),a.on("cell:mouseenter",function(e){var t=e.e,n=e.cell,r=e.edge,o=e.node;t.stopPropagation(),n.toFront(),o&&n.setProp({actived:!0}),r&&eb(r)}),a.on("blank:click",function(e){var t;(null==a?void 0:a.activeEdge)&&ev(null==a?void 0:a.activeEdge),null==(t=a.collapseNodes)||t.map(function(e){var t=a.getCellById(Object.keys(e)[0]);Object.values(e)[0]&&(null==t||t.setData({collapse:!1}))}),a.cleanSelection()}),a.on("node:selected",function(e){e.e,e.node.setProp({select:!0})}),a.on("node:unselected",function(e){e.e,e.node.setProp({select:!1})})},eu=function(e){var t,n=e.target,r=e.through,o=(null==(t=a.selectedCollections)?void 0:t.split(","))||[];o.push(n),r&&o.push(r);var i=tD(o).toString();g([["collections",i]]),a.selectedCollections=i},ey=function(e){var t=a.selectedCollections.split(",")||[],n=tD(t=t.concat(e)).toString();g([["collections",n]]),a.selectedCollections=n},eg=function(e){var t=a.selectedCollections.split(",")||[],n=tD(t=t.concat(e)).toString();g([["collections",n]]),a.selectedCollections=n},ev=function(e){a.activeEdge=null;var t,n,r=null!=(n=null==(t=e.store)?void 0:t.data)?n:{},o=r.m2m,i=r.connectionType,l=null==o?void 0:o.find(function(t){return t!==e.id}),c=a.getCellById(l),u=function(e){var t=a.getCellById(e.store.data.target.cell),n=a.getCellById(e.store.data.source.cell);t.setProp({targetPort:!1,associated:null}),n.setProp({sourcePort:!1,associated:null}),e.setAttrs({line:{stroke:"#ddd",targetMarker:"inherited"===i?{name:"classic",fill:"#ddd"}:null}}),e.setLabels(e.getLabels().map(function(e){return tS(tP({},e),{attrs:{labelText:tS(tP({},e.attrs.labelText),{fill:"rgba(0, 0, 0, 0.3)"}),labelBody:tS(tP({},e.attrs.labelBody),{stroke:"#ddd"})}})}))};u(e),c&&u(c)},eb=function(e){a.activeEdge=e;var t,n,r=null!=(n=null==(t=e.store)?void 0:t.data)?n:{},o=r.associated,i=r.m2m,l=r.connectionType,c=null==i?void 0:i.find(function(t){return t!==e.id}),u=a.getCellById(c),s=function(e){e.toFront(),e.setAttrs({line:{stroke:"#1890ff",strokeWidth:1,textAnchor:"middle",textVerticalAnchor:"middle",sourceMarker:null,targetMarker:"inherited"===l?{name:"classic",fill:"#1890ff"}:null}}),e.setLabels(e.getLabels().map(function(e){return tS(tP({},e),{attrs:{labelText:tS(tP({},e.attrs.labelText),{fill:"#1890ff"}),labelBody:tS(tP({},e.attrs.labelBody),{stroke:"#1890ff"})}})}));var t=a.getCellById(e.store.data.target.cell),n=a.getCellById(e.store.data.source.cell);t.toFront(),n.toFront(),t.setProp({targetPort:e.store.data.target.port,associated:o}),n.setProp({sourcePort:e.store.data.source.port,associated:o})};s(e),u&&s(u)},eC=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];a.clearCells();var n=ei(e),r=n.nodesData,o=n.edgesData,i=n.inheritEdges;a.data={nodes:r,edges:o},a.fromJSON({nodes:r}),a.addEdges(o),a.addEdges(i),function(e,t){t_.apply(this,arguments)}(X,t)},ew=function(e){var t,n,r,o=a.positions,i=ei(e),c=i.nodesData,u=i.edgesData,s=i.inheritEdges,d=a.getNodes().map(function(e){return e.store.data}),p=tI(a.getEdges().map(function(e){return e.store.data}),function(e){return e.connectionType?"currentInheritEdges":"currentRelateEdges"}),f=es(c,d),m=ed(u,p.currentRelateEdges||[]),h=ed(s,p.currentInheritEdges||[]),y=null==(t=tT(o,"y"))?void 0:t.y,g=null==(n=tB(o,"x"))?void 0:n.x,b=o.filter(function(e){return 100>Math.abs(e.y-y)}),x=tT(b,"x");f.forEach(function(e){var t=e.status,n=e.node,o=e.port,i=a.getCellById(n.id);switch(t){case"add":r=(null==x?void 0:x.x)>4500?{x:g,y:(x=tB(b,"x")).y+400}:{x:(null==x?void 0:x.x)+350,y:null==x?void 0:x.y},l=a.addNode(tS(tP({},n),{position:r})),v||X(tP({collectionName:n.name},r)),a&&a.positionCell(l,"top",{padding:200});break;case"insertPort":i.insertPort(o.index,o.port);break;case"deletePort":i.removePort(o.id);break;case"updateNode":i.setProp({title:n.title});break;case"delete":a.removeCell(n.id);break;default:return null}});var C=function(e){e.forEach(function(e){var t=e.status,n=e.edge,r=a.addEdge(tP({},n));switch(t){case"add":tG(r);break;case"delete":a.removeCell(n.id);break;default:return null}})};setTimeout(function(){C(m.concat(h))},300)},eO=function(e,t){"target"===t?er(a.collections,e).forEach(function(e){var n;null==(n=a.getCellById(e))||n.setAttrs({hightLight:!0,direction:t,connectionType:"inherited"})}):eo(a.collections,e).forEach(function(e){var n;null==(n=a.getCellById(e.name))||n.setAttrs({hightLight:!0,direction:t,connectionType:"inherited"})})},eE=function(e){var t=a.getCellById(e);a.cacheCollection[e]=!0,a.getConnectedEdges(t).filter(function(t){var n;return!(null==(n=t.store.data)?void 0:n.connectionType)&&t.getTargetCellId()===e}).forEach(function(t){t.store.data.m2m&&t.store.data.m2m.forEach(function(t){var n=a.getCellById(t);if(n.getTargetCellId()===e){var r,o=n.getSourceCellId(),i=a.getCellById(o);(null==(r=i.store.data.attrs)?void 0:r.hightLight)||(i.setAttrs({hightLight:!0,direction:"target",connectionType:"entity"}),eE(o))}});var n,r=t.getSourceCellId(),o=a.getCellById(r);(null==(n=o.store.data.attrs)?void 0:n.hightLight)||(o.setAttrs({hightLight:!0,direction:"target",connectionType:"entity"}),eE(r))})},eS=function(e){var t=a.getCellById(e);a.getConnectedEdges(t).filter(function(t){var n;return!(null==(n=t.store.data)?void 0:n.connectionType)&&t.getSourceCellId()===e}).forEach(function(t){t.store.data.m2m&&t.store.data.m2m.forEach(function(t){var n=a.getCellById(t);if(n.getSourceCellId()===e){var r,o=n.getTargetCellId(),i=a.getCellById(o);(null==(r=i.store.data.attrs)?void 0:r.hightLight)||(i.setAttrs({hightLight:!0,direction:"source",connectionType:"entity"}),eS(o))}});var n,r=t.getTargetCellId(),o=a.getCellById(r);(null==(n=o.store.data.attrs)?void 0:n.hightLight)||(o.setAttrs({hightLight:!0,direction:"source",connectionType:"entity"}),eS(r))})},eA=function(e,t){"target"===t?eE(e):eS(e)},ek=function(e,t,n){for(var r=function(r){var i,l,c=o[r].getAttrs(),u=c.direction,s=c.connectionType,d=o[r].id!==e,p=!e||(null==(i=a.filterConfig)?void 0:i.key)!==e||u!==t,f=!e||(null==(l=a.filterConfig)?void 0:l.key)!==e||s!==n;o[r].id!==e&&setTimeout(function(){d&&(p||f)&&o[r].setAttrs({hightLight:!1})},0)},o=a.getNodes().filter(function(e){var t;return null==(t=e.store.data.attrs)?void 0:t.hightLight}),i=o.length,l=0;l<i;l++)r(l)},ej=function(e){var t=a.connectionType,n=a.direction,r=a.filterConfig,o=e===(null==r?void 0:r.key)&&"both"===n,i=e===(null==r?void 0:r.key)&&("both"===t||t===r.connectionType);e?(o&&i||ek(e,n,t),l=a.getCellById(e),a.positionCell(l,"center",{padding:0}),l.setAttrs({hightLight:!0,connectionType:t}),setTimeout(function(){["entity","both"].includes(t)&&("both"===n?(eA(e,"target"),eA(e,"source")):("target"===n&&eA(e,n),"source"===n&&eA(e,n))),["inherited","both"].includes(t)&&("both"===n?(eO(e,"target"),eO(e,"source")):eO(e,n)),a.filterConfig={key:e,direction:n,connectionType:t}},0)):(a.filterConfig=null,ek())},eI=function(e){l=null,a.getEdges().forEach(function(t){var n=t.store.data.connectionType;"entity"===e?n?t.setVisible(!1):t.setVisible(!0):"inherited"===e?n?t.setVisible(!0):t.setVisible(!1):t.setVisible(!0)})};(0,d.useLayoutEffect)(function(){return ec(),function(){a.off("cell:mouseenter"),a.off("edge:mouseleave"),a.off("node:moved"),a.off("blank:click"),a=null,l=null}},[]),(0,d.useEffect)(function(){return el.addReloadCallback(ea),function(){el.removeReloadCallback(ea)}},[]),(0,d.useEffect)(function(){return T(!0),ee().then(tE(function(){var e;return tk(this,function(t){return v&&A.length?(e=null==v?void 0:v.split(","),eC(A.filter(function(t){return e.includes(t.name)}),!1),tK(!0),a.selectedCollections=v):v||ea(!0),T(!1),[2]})})).catch(function(e){throw T(!1),e}),function(){ef()}},[h]);var eN=(o=tE(function(){var e;return tk(this,function(t){return[2,null==(e=a.collections)?void 0:e.map(function(e){return{label:C(e.title),value:e.name}})]})}),function(){return o.apply(this,arguments)});return p().createElement(y.Layout,null,p().createElement("div",{className:u.graphCollectionContainerClass},p().createElement(y.Spin,{spinning:N},p().createElement(s.DataSourceApplicationProvider,{dataSourceManager:U},p().createElement(tV.Provider,{value:{collectionList:A,handleSearchCollection:function(e){var t=e.target.value.toLowerCase();t?j(E.filter(function(e){return C(e.title).toLowerCase().includes(t)})):j(E)}}},p().createElement("div",{className:(0,K.cx)(u.collectionListClass)},p().createElement(s.SchemaComponent,{components:{Select:function(e){return p().createElement(s.Select,tS(tP({popupMatchSelectWidth:!1},e),{getPopupContainer:ep}))},AddCollectionAction:eh,LocateCollectionAction:tm,SelectCollectionsAction:ty,DirectionAction:eP,ConnectorAction:ex,FullscreenAction:tc},schema:{type:"void",properties:{block1:{type:"void","x-collection":"collections","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:em,request:{resource:"collections",action:"list",params:{pageSize:50,filter:{inherit:!1},sort:["sort"],appends:[]}}},properties:{selectCollections:{type:"array","x-component":"SelectCollectionsAction"},actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{fontSize:16}},properties:{create:{type:"void",title:'{{ t("Create collection") }}',"x-component":"AddCollectionAction","x-component-props":{type:"primary"}},fullScreen:{type:"void","x-component":"FullscreenAction"},locateCollection:{type:"void","x-component":"LocateCollectionAction","x-component-props":{handleFiterCollections:ej,icon:"MenuOutlined",useAction:function(){return{run:function(){}}}}},autoLayout:{type:"void","x-component":"Action","x-component-props":{component:function(){return p().createElement(y.Tooltip,{title:w("Auto layout"),getPopupContainer:ep},p().createElement(y.Button,{onClick:function(){tK()}},p().createElement(c.ApartmentOutlined,null)))},useAction:function(){return{run:function(){}}}}},connectionType:{type:"void","x-component":"ConnectorAction","x-component-props":{onClick:function(e){a.connectionType=e;var t=a.filterConfig;t&&ej(t.key),eI(e)},icon:"MenuOutlined",useAction:function(){return{run:function(){}}}}},direction:{type:"void","x-component":"DirectionAction","x-component-props":{onClick:function(e){a.direction=e;var t=a.filterConfig;t&&ej(t.key)}}},selectMode:{type:"void","x-component":function(){return p().createElement(y.Tooltip,{title:w("Selection")},p().createElement(y.Switch,{onChange:function(e){a.toggleSelection()}}))}}}}}}}},scope:{useAsyncDataSource:F,loadCollections:eN,useCreateActionAndRefreshCM:function(){return k(et)},enableInherits:(null==Y?void 0:Y.dialect)==="postgres"}})))),p().createElement("div",{id:"container",style:{width:"100vw"}}),p().createElement("div",{id:"graph-minimap",className:u.graphMinimap,style:{width:"300px",height:"250px",right:"10px",bottom:"20px",position:"fixed"}}))))});function tU(){var e,t,n=(e=["\n height: calc(100vh - 160px);\n overflow: auto;\n margin: calc(var(--nb-spacing) * -1);\n position: relative;\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return tU=function(){return n},n}tH.displayName="GraphDrawPage";var tW=function(e){var t,n,r=(0,s.useActionContext)().visible,o=(0,s.useRequest)(function(){return Promise.resolve({data:{name:"t_".concat((0,u.uid)()),createdBy:!0,updatedBy:!0,sortable:!0,logging:!0,fields:[{name:"id",type:"integer",autoIncrement:!0,primaryKey:!0,allowNull:!1,uiSchema:{type:"number",title:'{{t("ID")}}',"x-component":"InputNumber","x-read-pretty":!0},interface:"id"},{interface:"createdAt",type:"date",field:"createdAt",name:"createdAt",uiSchema:{type:"datetime",title:'{{t("Created at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{interface:"createdBy",type:"belongsTo",target:"users",foreignKey:"createdById",name:"createdBy",uiSchema:{type:"object",title:'{{t("Created by")}}',"x-component":"RecordPicker","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}},{type:"date",field:"updatedAt",name:"updatedAt",interface:"updatedAt",uiSchema:{type:"string",title:'{{t("Last updated at")}}',"x-component":"DatePicker","x-component-props":{},"x-read-pretty":!0}},{type:"belongsTo",target:"users",foreignKey:"updatedById",name:"updatedBy",interface:"updatedBy",uiSchema:{type:"object",title:'{{t("Last updated by")}}',"x-component":"RecordPicker","x-component-props":{fieldNames:{value:"id",label:"nickname"}},"x-read-pretty":!0}}]}})},(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),n=n={manual:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t));return(0,d.useEffect)(function(){r&&o.run()},[r]),o},t$=function(){return p().createElement("div",{className:(0,s.css)(tU()),id:"graph_container"},p().createElement(s.SchemaComponent,{schema:{type:"void","x-component":"div",properties:{editor:{type:"void","x-component":"GraphDrawPage"}}},components:{GraphDrawPage:tH,DeleteOutlined:c.DeleteOutlined},scope:{useCollectionValues:tW,useCreateActionAndRefreshCM:k}}))}}}]);
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
- export declare const FieldSummary: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
10
+ export declare const FieldSummary: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("@emotion/css"),require("@formily/reactive"),require("@formily/react"),require("lodash"),require("@nocobase/utils/client"),require("@ant-design/icons"),require("antd"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-graph-collection-manager",["ahooks","@formily/shared","@nocobase/client","react-router-dom","react","@emotion/css","@formily/reactive","@formily/react","lodash","@nocobase/utils/client","@ant-design/icons","antd","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-graph-collection-manager"]=t(require("ahooks"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("@emotion/css"),require("@formily/reactive"),require("@formily/react"),require("lodash"),require("@nocobase/utils/client"),require("@ant-design/icons"),require("antd"),require("react-i18next")):e["@nocobase/plugin-graph-collection-manager"]=t(e.ahooks,e["@formily/shared"],e["@nocobase/client"],e["react-router-dom"],e.react,e["@emotion/css"],e["@formily/reactive"],e["@formily/react"],e.lodash,e["@nocobase/utils/client"],e["@ant-design/icons"],e.antd,e["react-i18next"])}(self,function(e,t,r,n,o,i,u,c,a,l,s,f,p){return function(){var d,b,h,m,y,g,v={3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=s},4964:function(e){"use strict";e.exports=i},3505:function(e){"use strict";e.exports=c},5229:function(e){"use strict";e.exports=u},8875:function(e){"use strict";e.exports=t},3772:function(e){"use strict";e.exports=r},7584:function(e){"use strict";e.exports=l},2749:function(t){"use strict";t.exports=e},2721:function(e){"use strict";e.exports=f},467:function(e){"use strict";e.exports=a},8156:function(e){"use strict";e.exports=o},3238:function(e){"use strict";e.exports=p},6128:function(e){"use strict";e.exports=n}},_={};function x(e){var t=_[e];if(void 0!==t)return t.exports;var r=_[e]={id:e,loaded:!1,exports:{}};return v[e](r,r.exports,x),r.loaded=!0,r.exports}x.m=v,x.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return x.d(t,{a:t}),t},x.d=function(e,t){for(var r in t)x.o(t,r)&&!x.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},x.f={},x.e=function(e){return Promise.all(Object.keys(x.f).reduce(function(t,r){return x.f[r](e,t),t},[]))},x.u=function(e){return""+({67:"7bc917ebd181cf6d",789:"4b7598f4bc4501ef"})[e]+".js"},x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),x.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d={},b="@nocobase/plugin-graph-collection-manager:",x.l=function(e,t,r,n){if(d[e])return void d[e].push(t);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-webpack")==b+r){o=a;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,x.nc&&o.setAttribute("nonce",x.nc),o.setAttribute("data-webpack",b+r),o.src=e),d[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=d[e];if(delete d[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},x.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},x.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},(h=window.__nocobase_public_path__||"/").endsWith("/")||(h+="/"),x.p=h+"static/plugins/@nocobase/plugin-graph-collection-manager/dist/client/",m={909:0},x.f.j=function(e,t){var r=x.o(m,e)?m[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=m[e]=[t,n]});t.push(r[2]=n);var o=x.p+x.u(e),i=Error();x.l(o,function(t){if(x.o(m,e)&&(0!==(r=m[e])&&(m[e]=void 0),r)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}},"chunk-"+e,e)}},y=function(e,t){var r,n,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==m[e]})){for(r in i)x.o(i,r)&&(x.m[r]=i[r]);u&&u(x)}for(e&&e(t);c<o.length;c++)n=o[c],x.o(m,n)&&m[n]&&m[n][0](),m[n]=0},(g=self.webpackChunk_nocobase_plugin_graph_collection_manager=self.webpackChunk_nocobase_plugin_graph_collection_manager||[]).forEach(y.bind(null,0)),g.push=y.bind(null,g.push.bind(g));var w={};return!function(){"use strict";x.r(w),x.d(w,{PluginGraphCollectionPlugin:function(){return s},default:function(){return f}});var e=x(3772),t="graph-collection-manager",r=x(3581);function n(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){r(e);return}c.done?t(a):Promise.resolve(a).then(n,o)}function o(e,t,r){return(o=a()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=(0,e.lazy)(function(){return r("imported_j4i6h_component",Promise.all([x.e("789"),x.e("67")]).then(x.bind(x,4528)))},"GraphCollectionPane").GraphCollectionPane,s=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=i(e),function(e,t){var r;if(t&&("object"==((r=t)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&u(o,e),r=[{key:"load",value:function(){var e,r=this;return(e=function(){return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var a=[i,c];if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(e){return r.app.pluginSettingsManager.add("data-source-manager/main.graph",{title:'{{t("Graphical interface", { ns: "'.concat(t,'" })}}'),Component:l,topLevelName:"data-source-manager/main",pluginKey:t,skipAclConfigure:!0,aclSnippet:"pm.data-source-manager.graph-collection-manager"}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)})})()}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(o.prototype,r),o}(c(e.Plugin)),f=s}(),w}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("@nocobase/flow-engine"),require("@emotion/css"),require("@formily/reactive"),require("@formily/react"),require("@nocobase/utils/client"),require("lodash"),require("@ant-design/icons"),require("antd"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-graph-collection-manager",["ahooks","@formily/shared","@nocobase/client","react-router-dom","react","@nocobase/flow-engine","@emotion/css","@formily/reactive","@formily/react","@nocobase/utils/client","lodash","@ant-design/icons","antd","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-graph-collection-manager"]=t(require("ahooks"),require("@formily/shared"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("@nocobase/flow-engine"),require("@emotion/css"),require("@formily/reactive"),require("@formily/react"),require("@nocobase/utils/client"),require("lodash"),require("@ant-design/icons"),require("antd"),require("react-i18next")):e["@nocobase/plugin-graph-collection-manager"]=t(e.ahooks,e["@formily/shared"],e["@nocobase/client"],e["react-router-dom"],e.react,e["@nocobase/flow-engine"],e["@emotion/css"],e["@formily/reactive"],e["@formily/react"],e["@nocobase/utils/client"],e.lodash,e["@ant-design/icons"],e.antd,e["react-i18next"])}(self,function(e,t,n,r,o,i,u,c,a,l,s,f,p,d){return function(){var b,h,m,y,g,v,_={3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=f},4964:function(e){"use strict";e.exports=u},3505:function(e){"use strict";e.exports=a},5229:function(e){"use strict";e.exports=c},8875:function(e){"use strict";e.exports=t},3772:function(e){"use strict";e.exports=n},2667:function(e){"use strict";e.exports=i},7584:function(e){"use strict";e.exports=l},2749:function(t){"use strict";t.exports=e},2721:function(e){"use strict";e.exports=p},467:function(e){"use strict";e.exports=s},8156:function(e){"use strict";e.exports=o},3238:function(e){"use strict";e.exports=d},6128:function(e){"use strict";e.exports=r}},x={};function w(e){var t=x[e];if(void 0!==t)return t.exports;var n=x[e]={id:e,loaded:!1,exports:{}};return _[e](n,n.exports,w),n.loaded=!0,n.exports}w.m=_,w.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return w.d(t,{a:t}),t},w.d=function(e,t){for(var n in t)w.o(t,n)&&!w.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},w.f={},w.e=function(e){return Promise.all(Object.keys(w.f).reduce(function(t,n){return w.f[n](e,t),t},[]))},w.u=function(e){return""+({67:"1144e663e94cfc56",789:"054a4efd17fa96dc"})[e]+".js"},w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),w.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},b={},h="@nocobase/plugin-graph-collection-manager:",w.l=function(e,t,n,r){if(b[e])return void b[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-webpack")==h+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,w.nc&&o.setAttribute("nonce",w.nc),o.setAttribute("data-webpack",h+n),o.src=e),b[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=b[e];if(delete b[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},w.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},w.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},(m=window.__nocobase_public_path__||"/").endsWith("/")||(m+="/"),w.p=m+"static/plugins/@nocobase/plugin-graph-collection-manager/dist/client/",y={909:0},w.f.j=function(e,t){var n=w.o(y,e)?y[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=y[e]=[t,r]});t.push(n[2]=r);var o=w.p+w.u(e),i=Error();w.l(o,function(t){if(w.o(y,e)&&(0!==(n=y[e])&&(y[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},g=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==y[e]})){for(n in i)w.o(i,n)&&(w.m[n]=i[n]);u&&u(w)}for(e&&e(t);c<o.length;c++)r=o[c],w.o(y,r)&&y[r]&&y[r][0](),y[r]=0},(v=self.webpackChunk_nocobase_plugin_graph_collection_manager=self.webpackChunk_nocobase_plugin_graph_collection_manager||[]).forEach(g.bind(null,0)),v.push=g.bind(null,v.push.bind(v));var q={};return!function(){"use strict";w.r(q),w.d(q,{PluginGraphCollectionPlugin:function(){return s},default:function(){return f}});var e=w(3772),t="graph-collection-manager",n=w(3581);function r(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=(0,e.lazy)(function(){return n("imported_j4i6h_component",Promise.all([w.e("789"),w.e("67")]).then(w.bind(w,4528)))},"GraphCollectionPane").GraphCollectionPane,s=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function o(){var e,t;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return e=o,t=arguments,e=i(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,a()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&u(o,e),n=[{key:"load",value:function(){var e,n=this;return(e=function(){return function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var a=[i,c];if(n)throw TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(e){return n.app.pluginSettingsManager.add("data-source-manager/main.graph",{title:'{{t("Graphical interface", { ns: "'.concat(t,'" })}}'),Component:l,topLevelName:"data-source-manager/main",pluginKey:t,skipAclConfigure:!0,aclSnippet:"pm.data-source-manager.graph-collection-manager"}),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,i){var u=e.apply(t,n);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(u,o,i,c,a,"throw",e)}c(void 0)})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(o.prototype,n),o}(c(e.Plugin)),f=s}(),q}()});
@@ -10,7 +10,7 @@
10
10
  module.exports = {
11
11
  "@ant-design/icons": "5.6.1",
12
12
  "@formily/shared": "2.3.7",
13
- "@nocobase/client": "2.0.0-alpha.9",
13
+ "@nocobase/client": "2.0.0-beta.2",
14
14
  "react": "18.2.0",
15
15
  "@emotion/css": "11.13.0",
16
16
  "@formily/react": "2.3.7",
@@ -18,9 +18,10 @@ module.exports = {
18
18
  "lodash": "4.17.21",
19
19
  "react-router-dom": "6.30.1",
20
20
  "@formily/reactive": "2.3.7",
21
- "@nocobase/utils": "2.0.0-alpha.9",
21
+ "@nocobase/utils": "2.0.0-beta.2",
22
22
  "react-i18next": "11.18.6",
23
- "@nocobase/server": "2.0.0-alpha.9",
23
+ "@nocobase/server": "2.0.0-beta.2",
24
+ "@nocobase/flow-engine": "2.0.0-beta.2",
24
25
  "ahooks": "3.7.8",
25
- "@nocobase/database": "2.0.0-alpha.9"
26
+ "@nocobase/database": "2.0.0-beta.2"
26
27
  };
@@ -1,16 +1,16 @@
1
1
  {
2
- "Graph Collection": "Graphische Sammlung",
3
- "Collection List": "Sammlungsliste",
4
- "Full Screen": "Vollbild",
5
- "Collection Search": "Sammlungssuche",
6
- "Create Collection": "Sammlung erstellen",
7
2
  "All Fields": "Alle Felder",
3
+ "All relationships": "Alle Beziehungen",
8
4
  "Association Fields": "Assoziationsfelder",
5
+ "Auto layout": "Automatisches Layout",
9
6
  "Choices fields": "Auswahlfelder",
10
- "All relationships": "Alle Beziehungen",
7
+ "Collection List": "Sammlungsliste",
8
+ "Collection Search": "Sammlungssuche",
9
+ "Create Collection": "Sammlung erstellen",
11
10
  "Entity relationship only": "Nur Entitätsbeziehungen",
12
- "Inheritance relationship only": "Nur Vererbungsbeziehungen",
11
+ "Full Screen": "Vollbild",
12
+ "Graph Collection": "Graphische Sammlung",
13
13
  "Graphical interface": "Grafische Benutzeroberfläche",
14
- "Auto layout": "Automatisches Layout",
14
+ "Inheritance relationship only": "Nur Vererbungsbeziehungen",
15
15
  "Selection": "Auswahl"
16
- }
16
+ }
@@ -1,15 +1,16 @@
1
1
  {
2
- "Graph Collection": "Graph Collection",
3
- "Collection List": "Collection List",
4
- "Full Screen": "Full Screen",
5
- "Collection Search": "Collection Search",
6
- "Create Collection": "Create Collection",
7
2
  "All Fields": "All Fields",
3
+ "All relationships": "All relationships",
8
4
  "Association Fields": "Association Fields",
5
+ "Auto layout": "Auto layout",
9
6
  "Choices fields": "Choices fields",
10
- "All relationships": "All relationships",
7
+ "Collection List": "Collection List",
8
+ "Collection Search": "Collection Search",
9
+ "Create Collection": "Create Collection",
11
10
  "Entity relationship only": "Entity relationship only",
12
- "Inheritance relationship only": "Inheritance relationship only",
11
+ "Full Screen": "Full Screen",
12
+ "Graph Collection": "Graph Collection",
13
13
  "Graphical interface": "Graphical interface",
14
+ "Inheritance relationship only": "Inheritance relationship only",
14
15
  "Selection": "Selection"
15
- }
16
+ }
@@ -1,15 +1,17 @@
1
1
  {
2
- "Graph Collection": "Colección de gráficos",
2
+ "All Fields": "Todos los campos",
3
+ "All relationships": "Todas las relaciones",
4
+ "Association Fields": "Campos de asociación",
5
+ "Auto layout": "Auto layout",
6
+ "Choices fields": "Choices fields",
3
7
  "Collection List": "Lista de colecciones",
4
- "Full Screen": "Vista completa",
5
8
  "Collection Search": "Búsqueda de colecciones",
6
9
  "Create Collection": "Crear colección",
7
- "All Fields": "Todos los campos",
8
- "Association Fields": "Campos de asociación",
9
- "Optional fields": "Campos opcionales",
10
- "All relationships": "Todas las relaciones",
11
10
  "Entity relationship only": "Sólo relaciones de entidad",
12
- "Inheritance relationship only": "Sólo relaciones de herencia",
11
+ "Full Screen": "Vista completa",
12
+ "Graph Collection": "Colección de gráficos",
13
13
  "Graphical interface": "Interfaz gráfica",
14
+ "Inheritance relationship only": "Sólo relaciones de herencia",
15
+ "Optional fields": "Campos opcionales",
14
16
  "Selection": "Selección"
15
- }
17
+ }
@@ -1,15 +1,16 @@
1
1
  {
2
- "Graph Collection": "Collection de graphiques",
3
- "Collection List": "Liste des collections",
4
- "Full Screen": "Plein écran",
5
- "Collection Search": "Recherche de collection",
6
- "Create Collection": "Créer une collection",
7
2
  "All Fields": "Tous les champs",
3
+ "All relationships": "Toutes les relations",
8
4
  "Association Fields": "Champs d'association",
5
+ "Auto layout": "Auto layout",
9
6
  "Choices fields": "Champs de choix",
10
- "All relationships": "Toutes les relations",
7
+ "Collection List": "Liste des collections",
8
+ "Collection Search": "Recherche de collection",
9
+ "Create Collection": "Créer une collection",
11
10
  "Entity relationship only": "Uniquement les relations d'entité",
12
- "Inheritance relationship only": "Uniquement les relations d'héritage",
11
+ "Full Screen": "Plein écran",
12
+ "Graph Collection": "Collection de graphiques",
13
13
  "Graphical interface": "Interface graphique",
14
+ "Inheritance relationship only": "Uniquement les relations d'héritage",
14
15
  "Selection": "Sélection"
15
- }
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "All Fields": "Összes mező",
3
+ "All relationships": "Összes kapcsolat",
4
+ "Association Fields": "Asszociációs mezők",
5
+ "Auto layout": "Automatikus elrendezés",
6
+ "Choices fields": "Választó mezők",
7
+ "Collection List": "Gyűjtemény lista",
8
+ "Collection Search": "Gyűjtemény keresés",
9
+ "Create Collection": "Gyűjtemény létrehozása",
10
+ "Entity relationship only": "Csak entitás kapcsolatok",
11
+ "Full Screen": "Teljes képernyő",
12
+ "Graph Collection": "Gráf gyűjtemény",
13
+ "Graphical interface": "Grafikus felület",
14
+ "Inheritance relationship only": "Csak öröklődési kapcsolatok",
15
+ "Selection": "Kiválasztás"
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "All Fields": "Semua Bidang",
3
+ "All relationships": "Semua hubungan",
4
+ "Association Fields": "Bidang Asosiasi",
5
+ "Auto layout": "Tata letak otomatis",
6
+ "Choices fields": "Bidang pilihan",
7
+ "Collection List": "Daftar Koleksi",
8
+ "Collection Search": "Pencarian Koleksi",
9
+ "Create Collection": "Buat Koleksi",
10
+ "Entity relationship only": "Hanya hubungan entitas",
11
+ "Full Screen": "Layar Penuh",
12
+ "Graph Collection": "Koleksi Grafik",
13
+ "Graphical interface": "Antarmuka grafis",
14
+ "Inheritance relationship only": "Hanya hubungan pewarisan",
15
+ "Selection": "Pilihan"
16
+ }
@@ -1,16 +1,16 @@
1
1
  {
2
- "Graph Collection": "Raccolta Grafici",
3
- "Collection List": "Elenco Raccolte",
4
- "Full Screen": "Schermo Intero",
5
- "Collection Search": "Ricerca Raccolta",
6
- "Create Collection": "Crea Raccolta",
7
2
  "All Fields": "Tutti i Campi",
3
+ "All relationships": "Tutte le Relazioni",
8
4
  "Association Fields": "Campi Associazione",
5
+ "Auto layout": "Layout automatico",
9
6
  "Choices fields": "Campi Scelta",
10
- "All relationships": "Tutte le Relazioni",
7
+ "Collection List": "Elenco Raccolte",
8
+ "Collection Search": "Ricerca Raccolta",
9
+ "Create Collection": "Crea Raccolta",
11
10
  "Entity relationship only": "Solo Relazioni Entità",
12
- "Inheritance relationship only": "Solo Relazioni Eredità",
11
+ "Full Screen": "Schermo Intero",
12
+ "Graph Collection": "Raccolta Grafici",
13
13
  "Graphical interface": "Interfaccia Grafica",
14
- "Auto layout": "Layout automatico",
14
+ "Inheritance relationship only": "Solo Relazioni Eredità",
15
15
  "Selection": "Selezione"
16
- }
16
+ }
@@ -1,17 +1,17 @@
1
1
  {
2
- "Graph Collection": "グラフ化データテーブル",
3
- "Collection List": "データテーブルリスト",
4
- "Full Screen": "フルスクリーン",
5
- "Collection Search": "表フィルタ",
6
- "Create Collection": "データテーブルの作成",
7
2
  "All Fields": "すべて",
3
+ "All relationships": "すべての関係",
8
4
  "Association Fields": "関連フィールド",
5
+ "Associations Fields": "関係フィールド",
6
+ "Auto layout": "自動レイアウト",
9
7
  "Choices fields": "選択フィールド",
10
- "All relationships": "すべての関係",
8
+ "Collection List": "データテーブルリスト",
9
+ "Collection Search": "表フィルタ",
10
+ "Create Collection": "データテーブルの作成",
11
11
  "Entity relationship only": "エンティティ関係",
12
- "Inheritance relationship only": "継承関係",
12
+ "Full Screen": "フルスクリーン",
13
+ "Graph Collection": "グラフ化データテーブル",
13
14
  "Graphical interface": "グラフィカルインターフェース",
14
- "Selection": "せんたく",
15
- "Auto layout": "自動レイアウト",
16
- "Associations Fields": "関係フィールド"
17
- }
15
+ "Inheritance relationship only": "継承関係",
16
+ "Selection": "せんたく"
17
+ }
@@ -1,16 +1,16 @@
1
1
  {
2
- "Graph Collection": "그래픽 데이터 테이블",
2
+ "All Fields": "모든 필드",
3
+ "All relationships": "모든 관계",
4
+ "Association Fields": "연관 필드",
5
+ "Auto layout": "자동 레이아웃",
6
+ "Choices fields": "선택 필드",
3
7
  "Collection List": "데이터 테이블 목록",
4
- "Full Screen": "전체 화면",
5
8
  "Collection Search": "테이블 검색",
6
9
  "Create Collection": "데이터 테이블 생성",
7
- "All Fields": "모두",
8
- "Association Fields": "연관 필드",
9
- "Choices fields": "선택 필드",
10
- "All relationships": "모든 관계",
11
10
  "Entity relationship only": "엔터티 관계만",
12
- "Inheritance relationship only": "상속 관계만",
11
+ "Full Screen": "전체 화면",
12
+ "Graph Collection": "그래프 데이터 테이블",
13
13
  "Graphical interface": "그래픽 인터페이스",
14
- "Auto layout": "자동 레이아웃",
15
- "Selection": "선택 모드"
16
- }
14
+ "Inheritance relationship only": "상속 관계만",
15
+ "Selection": "선택 모드"
16
+ }
@@ -1,15 +1,16 @@
1
1
  {
2
- "Graph Collection": "Grafiekcollectie",
3
- "Collection List": "Collectielijst",
4
- "Full Screen": "Volledig scherm",
5
- "Collection Search": "Collectie zoekopdracht",
6
- "Create Collection": "Collectie maken",
7
- "All Fields": "Alle velden",
8
- "Association Fields": "Associatievelden",
9
- "Choices fields": "Keuzevelden",
10
- "All relationships": "Alle relaties",
11
- "Entity relationship only": "Alleen entiteitsrelaties",
12
- "Inheritance relationship only": "Alleen erfelijkheidsrelaties",
13
- "Graphical interface": "Grafische interface",
14
- "Selection": "Selectie"
15
- }
2
+ "All Fields": "Alle velden",
3
+ "All relationships": "Alle relaties",
4
+ "Association Fields": "Associatievelden",
5
+ "Auto layout": "Auto layout",
6
+ "Choices fields": "Keuzevelden",
7
+ "Collection List": "Collectielijst",
8
+ "Collection Search": "Collectie zoekopdracht",
9
+ "Create Collection": "Collectie maken",
10
+ "Entity relationship only": "Alleen entiteitsrelaties",
11
+ "Full Screen": "Volledig scherm",
12
+ "Graph Collection": "Grafiekcollectie",
13
+ "Graphical interface": "Grafische interface",
14
+ "Inheritance relationship only": "Alleen erfelijkheidsrelaties",
15
+ "Selection": "Selectie"
16
+ }
@@ -1,15 +1,16 @@
1
1
  {
2
- "Graph Collection": "Coleção de Gráficos",
3
- "Collection List": "Lista de Coleções",
4
- "Full Screen": "Tela Cheia",
5
- "Collection Search": "Busca de Coleção",
6
- "Create Collection": "Criar Coleção",
7
2
  "All Fields": "Todos os Campos",
3
+ "All relationships": "Todos os relacionamentos",
8
4
  "Association Fields": "Campos de Associação",
5
+ "Auto layout": "Auto layout",
9
6
  "Choices fields": "Campos de opções",
10
- "All relationships": "Todos os relacionamentos",
7
+ "Collection List": "Lista de Coleções",
8
+ "Collection Search": "Busca de Coleção",
9
+ "Create Collection": "Criar Coleção",
11
10
  "Entity relationship only": "Somente relação de Entidade",
12
- "Inheritance relationship only": "Somente relação de Herança",
11
+ "Full Screen": "Tela Cheia",
12
+ "Graph Collection": "Coleção de Gráficos",
13
13
  "Graphical interface": "Interface Gráfica",
14
+ "Inheritance relationship only": "Somente relação de Herança",
14
15
  "Selection": "Seleção"
15
- }
16
+ }