aldehyde 0.0.1 → 0.0.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.
- package/dist/aldehyde.js +1 -2
- package/dist/chemstruc-graph.js +1 -1
- package/dist/html-editor-draft.js +1 -2
- package/dist/signature.js +1 -2
- package/package.json +22 -10
- package/src/components/detail/edit/modal-dtmpl-edit.tsx +1 -1
- package/src/components/module/ltmpl-page.tsx +1 -1
- package/src/components/units/index.tsx +4 -14
- package/src/index.js +3 -2
- package/dist/163.js +0 -2
- package/dist/163.js.LICENSE.txt +0 -43
- package/dist/41.js +0 -1
- package/dist/aldehyde.js.LICENSE.txt +0 -122
- package/dist/css/163-24392163d3c7b54ea806.css +0 -11
- package/dist/css/290-5e8e152675ab7d201c00.css +0 -886
- package/dist/html-editor-draft.js.LICENSE.txt +0 -5
- package/dist/signature.js.LICENSE.txt +0 -17
package/dist/chemstruc-graph.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[590],{3197:function(e,t,n){
|
|
1
|
+
"use strict";(self.webpackChunkaldehyde=self.webpackChunkaldehyde||[]).push([[590],{3197:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var r=n(4322),a=n.n(r),o=n(9755),c=n(237),i=n(5337),l=n(9576),s=n(1378),u=n(9905),f=n(6689),d=n.n(f),p=n(5725),h=n(8203),v=n(9277),m=(n(6878),n(8399),n(4720)),w=n(7066);var y=function(e){(0,l.Z)(y,e);var t,r,f=(t=y,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=(0,u.Z)(t);if(r){var a=(0,u.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function y(){var e;(0,c.Z)(this,y);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=f.call.apply(f,[this].concat(r))).state={modalVisible:!1,molFileLoaded:!1,molFile:void 0},e.loadData=(0,o.Z)(a().mark((function t(){var r,o,c;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.props.value)){t.next=13;break}if(1!=(o=JSON.parse(r)).valid){t.next=9;break}return t.next=6,m.Z.loadFileTxt(o.base.path);case 6:c=t.sent,t.next=10;break;case 9:c="new"==o.valid?o.body:void 0;case 10:console.log("molFile:",c),n.g.ketcher.setMolecule(c),e.setState({molFile:c});case 13:case"end":return t.stop()}}),t)}))),e.saveMolfile=(0,o.Z)(a().mark((function t(){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.g.ketcher.getKet();case 2:r=t.sent,console.log("ket value:",r),e.triggerChange(r),e.setState({modalVisible:!1});case 6:case"end":return t.stop()}}),t)}))),e.triggerChange=function(t){var n=e.props.onChange;n&&n(JSON.stringify({valid:"new",body:t}))},e.showView=(0,o.Z)(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loadData();case 2:e.setState({modalVisible:!0});case 3:case"end":return t.stop()}}),t)}))),e.onCancel=function(){e.setState({modalVisible:!1})},e}return(0,i.Z)(y,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this,t=this.props,r=t.disabled,c=t.viewOrEdit,i=(t.value,this.state.molFile,new h.RemoteStructServiceProvider(""));return d().createElement(d().Fragment,null,d().createElement(p.Button,{onClick:this.showView},d().createElement(w.DeploymentUnitOutlined,null)," ","view"==c?"查 看":" 编 辑"),d().createElement(p.Modal,{closable:!1,visible:this.state.modalVisible,forceRender:!0,centered:!0,style:{maxWidth:"calc(100vw - 62px)",maxHeight:"calc(100vw - 50px)"},width:1200,onCancel:function(){e.onCancel()},footer:r?[d().createElement(p.Button,{key:1,onClick:function(){e.onCancel()}},"取消")]:[d().createElement(p.Popconfirm,{key:2,placement:"top",title:"确定要取消本次编辑的数据吗?",onConfirm:this.onCancel,okText:"确定",cancelText:"取消"},d().createElement(p.Button,null,"取消")),d().createElement(p.Button,{key:3,onClick:function(){e.saveMolfile()},type:"primary"},"确定")],bodyStyle:{width:"1200px"}},d().createElement(p.Row,{style:{height:"430px",border:"1px solid #00f",maxWidth:"calc(100vw - 92px)",maxHeight:"calc(100vw - 80px)"}},d().createElement(p.Col,{key:1,span:24,style:{height:"430px"}},d().createElement(v.Editor,{onInit:function(){var e=(0,o.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.g.ketcher=t;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),staticResourcesUrl:"ketcher",structServiceProvider:i,errorHandler:void 0})))))}}]),y}(d().PureComponent);y.defaultProps={viewOrEdit:"view"}}}]);
|