You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.4 KiB
1 line
5.4 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[85160],{85160:function(t,e,r){r.d(e,{FI:function(){return s}});var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},a(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}Object.create;Object.create;var n=r(12378),o=r(59301),s=function(t){function e(e){var r=t.call(this,e)||this;return r.wasCleared=!1,r.modelChangedListener=null,r.divRef=o.createRef(),r}return i(e,t),e.prototype.getDiagram=function(){return null===this.divRef.current?null:n.Diagram.fromDiv(this.divRef.current)},e.prototype.clear=function(){var t=this.getDiagram();null!==t&&(t.clear(),this.wasCleared=!0)},e.prototype.componentDidMount=function(){var t=this;if(null!==this.divRef.current){var e=this.props.initDiagram();e.div=this.divRef.current,this.modelChangedListener=function(e){if(e.isTransactionFinished&&e.model&&!e.model.isReadOnly&&t.props.onModelChange){var r=e.model.toIncrementalData(e);null!==r&&t.props.onModelChange(r)}},e.addModelChangedListener(this.modelChangedListener),e.delayInitialization((function(){t.mergeData(e,!0)}))}},e.prototype.componentWillUnmount=function(){var t=this.getDiagram();null!==t&&(t.div=null,null!==this.modelChangedListener&&(t.removeModelChangedListener(this.modelChangedListener),this.modelChangedListener=null))},e.prototype.shouldComponentUpdate=function(t,e){return t.divClassName!==this.props.divClassName||t.style!==this.props.style||!t.skipsDiagramUpdate&&(t.nodeDataArray!==this.props.nodeDataArray||t.linkDataArray!==this.props.linkDataArray||t.modelData!==this.props.modelData)},e.prototype.componentDidUpdate=function(t,e){var r=this;if(t.nodeDataArray!==this.props.nodeDataArray||t.linkDataArray!==this.props.linkDataArray||t.modelData!==this.props.modelData){var a=this.getDiagram();null!==a&&(this.wasCleared?a.delayInitialization((function(){r.mergeData(a,!0),r.wasCleared=!1})):this.mergeData(a,!1))}},e.prototype.mergeData=function(t,e){var r=this;t.model.commit((function(t){void 0!==r.props.modelData&&t.assignAllDataProperties(t.modelData,r.props.modelData),t.mergeNodeDataArray(r.props.nodeDataArray),void 0!==r.props.linkDataArray&&t instanceof n.GraphLinksModel&&t.mergeLinkDataArray(r.props.linkDataArray)}),e?"initial merge":"merge data")},e.prototype.render=function(){return o.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},e}(o.Component);(function(t){function e(e){var r=t.call(this,e)||this;return r.divRef=o.createRef(),r}i(e,t),e.prototype.getOverview=function(){return null===this.divRef.current?null:n.Diagram.fromDiv(this.divRef.current)},e.prototype.componentDidMount=function(){var t;null!==this.divRef.current&&(void 0!==this.props.initOverview?t=this.props.initOverview():(t=new n.Overview).contentAlignment=n.Spot.Center,t.div=this.divRef.current,t.observed=this.props.observedDiagram)},e.prototype.componentWillUnmount=function(){var t=this.getOverview();null!==t&&(t.div=null,t.observed=null)},e.prototype.shouldComponentUpdate=function(t,e){return t.divClassName!==this.props.divClassName||t.style!==this.props.style||t.observedDiagram!==this.props.observedDiagram},e.prototype.componentDidUpdate=function(t,e){if(t.observedDiagram!==this.props.observedDiagram){var r=this.getOverview();null!==r&&(r.observed=this.props.observedDiagram)}},e.prototype.render=function(){return o.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})}})(o.Component),function(t){function e(e){var r=t.call(this,e)||this;return r.wasCleared=!1,r.divRef=o.createRef(),r}i(e,t),e.prototype.getPalette=function(){return null===this.divRef.current?null:n.Diagram.fromDiv(this.divRef.current)},e.prototype.clear=function(){var t=this.getPalette();null!==t&&(t.clear(),this.wasCleared=!0)},e.prototype.componentDidMount=function(){var t=this;if(null!==this.divRef.current){var e=this.props.initPalette();e.div=this.divRef.current,e.delayInitialization((function(){t.mergeData(e,!0)}))}},e.prototype.componentWillUnmount=function(){var t=this.getPalette();null!==t&&(t.div=null)},e.prototype.shouldComponentUpdate=function(t,e){return t.divClassName!==this.props.divClassName||t.style!==this.props.style||(t.nodeDataArray!==this.props.nodeDataArray||t.linkDataArray!==this.props.linkDataArray||t.modelData!==this.props.modelData)},e.prototype.componentDidUpdate=function(t,e){var r=this;if(t.nodeDataArray!==this.props.nodeDataArray||t.linkDataArray!==this.props.linkDataArray||t.modelData!==this.props.modelData){var a=this.getPalette();null!==a&&(this.wasCleared?a.delayInitialization((function(){r.mergeData(a,!0),r.wasCleared=!1})):this.mergeData(a,!1))}},e.prototype.mergeData=function(t,e){var r=this;t.model.commit((function(t){void 0!==r.props.modelData&&t.assignAllDataProperties(t.modelData,r.props.modelData),t.mergeNodeDataArray(r.props.nodeDataArray),void 0!==r.props.linkDataArray&&t instanceof n.GraphLinksModel&&t.mergeLinkDataArray(r.props.linkDataArray)}),e?"initial merge":"merge data")},e.prototype.render=function(){return o.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})}}(o.Component)}}]); |