@mybricks/comlib-core
Advanced tools
Comparing version 0.0.52-beta.0 to 0.0.52
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fn=t():e.fn=t()}(this,(function(){return function(){"use strict";var __webpack_modules__={356:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){function __WEBPACK_DEFAULT_EXPORT__(_a){var data=_a.data,outputs=_a.outputs,inputs=_a.inputs,onError=_a.onError;inputs.from((function(val,relOutpus){var _a,script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){var fn=void 0,returnVal=void 0,isOk=void 0;try{eval("fn = ".concat(script)),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError("数据转换错误:".concat(e.message),e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return l},getCom:function(){return d}});var e=JSON.parse('{"title":"Fn计算","namespace":"mybricks.core-comlib.fn","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"Fn计算","icon":"./icon.png","runtime":"./Fn.tsx","rtType":"js","visibility":false}'),t=JSON.parse('{"visibility":false,"title":"变量","namespace":"mybricks.core-comlib.var","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"变量","icon":"./icon.png","data":"./data.json","runtime":"./Var.tsx","editors":"./editors.tsx","rtType":"js","inputs":[{"id":"get","title":"读取","schema":{"type":"any"},"rels":["return"]},{"id":"set","title":"赋值","schema":{"type":"follow"},"rels":["return"]},{"id":"reset","title":"重置","schema":{"type":"any"}}],"outputs":[{"id":"return","title":"完成","schema":{"type":"unknown"}},{"id":"changed","title":"当值发生变化","schema":{"type":"unknown"}}]}');function n(e){if(e)try{var t=Object.prototype.toString.call(e);return["[object Object]","[object Array]"].includes(t)?JSON.parse(JSON.stringify(e)):e}catch(t){return e}return e}var r=JSON.parse('{"title":"类型转换","visibility":false,"namespace":"mybricks.core-comlib.type-change","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"类型转换","icon":"./icon.png","runtime":"./rt.tsx","editors":"./editors.tsx","rtType":"js","inputs":[{"id":"from","title":"从","schema":{"type":"follow"},"rels":["to"]}],"outputs":[{"id":"to","title":"到","schema":{"type":"follow"},"conMax":1,"editable":true}]}'),i=__webpack_require__(356),o=JSON.parse('{"deprecated":true,"visibility":false,"title":"连接器","namespace":"mybricks.core-comlib.connector","author":"MyBricks","author_name":"MyBricks","version":"1.0.0","description":"连接器","runtime":"./runtime.ts","editors":"./editors.tsx","icon":"./icon.svg","rtType":"js-autorun","inputs":[{"id":"call","rels":["then","catch"],"title":"调用","schema":{"type":"object"}}],"outputs":[{"id":"then","title":"结果","schema":{"type":"unknown"}},{"id":"catch","title":"发生错误","schema":{"type":"string"}}]}');function a(e,t){var n=e.env,r=e.data,i=e.outputs;if(e.onError,void 0===t&&(t={}),r.connector)try{n.callConnector(r.connector,t,r.connectorConfig).then((function(e){i.then(e)})).catch((function(e){i.catch(e)}))}catch(e){console.error(e),i.catch("执行错误 ".concat(e.message||e))}else i.catch("没有选择接口")}var c=JSON.parse('{"visibility":false,"title":"作用域输入","namespace":"mybricks.core-comlib.frame-input","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"作用域输入","rtType":"js","runtime":"./runtime.ts","editors":"./editor.tsx","inputs":[{"id":"getCurValue","title":"获取","schema":{"type":"any"},"rels":["return"]}],"outputs":[{"id":"return","title":"结果","schema":{"type":"follow"}}]}'),u=JSON.parse('{"visibility":false,"title":"打开对话框","namespace":"mybricks.core-comlib.scenes","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"切换场景","icon":"./icon.png","runtime":"./runtime.ts","data":"./data.json","rtType":"js","inputs":[{"id":"open","title":"打开","schema":{"type":"any"}}]}'),s=JSON.parse('{"title":"模块","namespace":"mybricks.core-comlib.module","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"模块","icon":"./icon.png","data":"./data.json","runtime":"./runtime.tsx","editors":"./editors.ts","outputs":[{"id":"click","title":"单击","description":"点击模块触发的事件","schema":{"type":"any"}}]}'),p=JSON.parse('{"title":"服务Fx","namespace":"mybricks.core-comlib.service","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"服务Fx","icon":"./icon.png","runtime":"./Service.tsx","rtType":"js","visibility":false}'),_={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[f({comDef:e,rt:function(e){e.inputs,e.outputs}}),f({comDef:t,rt:function(e){e.env;var t=e.data,r=e.outputs,i=e.inputs,o=e._notifyBindings;i.get((function(e,r){var i=n(void 0!==t.val?t.val:t.initValue);r.return(i)})),i.set((function(e,i){t.val=e;var a=n(e);r.changed(a,!0),o(a),i.return(a)})),i.reset((function(){var e=t.initValue;t.val=e;var i=n(e);r.changed(i,!0),o(i)}))}}),f({comDef:r,rt:i.Z}),f({comDef:o,rt:function(e){var t=e.env,n=e.data,r=e.inputs,i=e.outputs,o=e.onError;t.runtime&&(n.immediate?a({env:t,data:n,outputs:i}):r.call((function(e){a({env:t,data:n,outputs:i,onError:o},e)})))}}),f({comDef:c,rt:function(e){var t=e.env,n=e.inputs;t.runtime&&n.getCurValue((function(e,t){t.return(e)}))}}),f({comDef:u,rt:function(e){var t=e.env,n=e.data,r=e.inputs,i=(e._inputs,e._inputsCallable);r.open((function(e){t.canvas.open(n._sceneId,e,"popup"===n._sceneShowType?null:n.openType),i._open(e)}))}}),f({comDef:s,rt:function(e){var t=e.id,n=e.env,r=e.data,i=e.inputs,o=e.outputs,a=n.getModuleJSON(r.definedId);return n.renderModule(a,{ref:function(e){var t=a.inputs,n=a.outputs,c=a.pinRels,u={},s={};Object.entries(c).forEach((function(e){var t=e[0],n=e[1],r=t.split("_rootFrame_-")[1];if(r){var i=n[0];u[r]=i,s[i]=!0}}));var p=r.configs;for(var _ in p)e.inputs[_](p[_]);n.forEach((function(t){var n=t.id;s[n]||e.outputs(n,o[n])})),t.forEach((function(t){var n=t.id;i[n]((function(t,r){var i=u[n];i&&e.outputs(i,(function(e){r[i](e)})),e.inputs[n](t)}))})),e.run()},disableAutoRun:!0,outputs:o,rootId:t})}}),f({comDef:p,rt:function(e){e.inputs,e.outputs}})]},l=_;function d(e){return _.comAray.find((function(t){return t.namespace===e}))}function f(e){var t=e.comDef,n=e.rt,r=e.data;return Object.assign(t,{runtime:n,data:r})}}(),__webpack_exports__}()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fn=t():e.fn=t()}(this,(function(){return function(){"use strict";var __webpack_modules__={356:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){function __WEBPACK_DEFAULT_EXPORT__(_a){var data=_a.data,outputs=_a.outputs,inputs=_a.inputs,onError=_a.onError;inputs.from((function(val,relOutpus){var _a,script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){var fn=void 0,returnVal=void 0,isOk=void 0;try{eval("fn = ".concat(script)),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError("数据转换错误:".concat(e.message),e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return l},getCom:function(){return d}});var e=JSON.parse('{"title":"Fn计算","namespace":"mybricks.core-comlib.fn","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"Fn计算","icon":"./icon.png","runtime":"./Fn.tsx","rtType":"js","visibility":false}'),t=JSON.parse('{"visibility":false,"title":"变量","namespace":"mybricks.core-comlib.var","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"变量","icon":"./icon.png","data":"./data.json","runtime":"./Var.tsx","editors":"./editors.tsx","rtType":"js","inputs":[{"id":"get","title":"读取","schema":{"type":"any"},"rels":["return"]},{"id":"set","title":"赋值","schema":{"type":"follow"},"rels":["return"]},{"id":"reset","title":"重置","schema":{"type":"any"}}],"outputs":[{"id":"return","title":"完成","schema":{"type":"unknown"}},{"id":"changed","title":"当值发生变化","schema":{"type":"unknown"}}]}');function r(e,t){void 0===t&&(t=[]);try{var n=Object.prototype.toString.call(e);if(null===e||"object"!=typeof e||n.startsWith("[object HTML")||"[object FormData]"===n)return e;var i=t.filter((function(t){return t.original===e}))[0];if(i)return i.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=r(e[n],t)})),o}catch(t){return e}}var n=JSON.parse('{"title":"类型转换","visibility":false,"namespace":"mybricks.core-comlib.type-change","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"类型转换","icon":"./icon.png","runtime":"./rt.tsx","editors":"./editors.tsx","rtType":"js","inputs":[{"id":"from","title":"从","schema":{"type":"follow"},"rels":["to"]}],"outputs":[{"id":"to","title":"到","schema":{"type":"follow"},"conMax":1,"editable":true}]}'),i=__webpack_require__(356),o=JSON.parse('{"deprecated":true,"visibility":false,"title":"连接器","namespace":"mybricks.core-comlib.connector","author":"MyBricks","author_name":"MyBricks","version":"1.0.0","description":"连接器","runtime":"./runtime.ts","editors":"./editors.tsx","icon":"./icon.svg","rtType":"js-autorun","inputs":[{"id":"call","rels":["then","catch"],"title":"调用","schema":{"type":"object"}}],"outputs":[{"id":"then","title":"结果","schema":{"type":"unknown"}},{"id":"catch","title":"发生错误","schema":{"type":"string"}}]}');function a(e,t){var r=e.env,n=e.data,i=e.outputs;if(e.onError,void 0===t&&(t={}),n.connector)try{r.callConnector(n.connector,t,n.connectorConfig).then((function(e){i.then(e)})).catch((function(e){i.catch(e)}))}catch(e){console.error(e),i.catch("执行错误 ".concat(e.message||e))}else i.catch("没有选择接口")}var c=JSON.parse('{"visibility":false,"title":"作用域输入","namespace":"mybricks.core-comlib.frame-input","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"作用域输入","rtType":"js","runtime":"./runtime.ts","editors":"./editor.tsx","inputs":[{"id":"getCurValue","title":"获取","schema":{"type":"any"},"rels":["return"]}],"outputs":[{"id":"return","title":"结果","schema":{"type":"follow"}}]}'),u=JSON.parse('{"visibility":false,"title":"打开对话框","namespace":"mybricks.core-comlib.scenes","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"切换场景","icon":"./icon.png","runtime":"./runtime.ts","data":"./data.json","rtType":"js","inputs":[{"id":"open","title":"打开","schema":{"type":"any"}}]}'),s=JSON.parse('{"title":"模块","namespace":"mybricks.core-comlib.module","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"模块","icon":"./icon.png","data":"./data.json","runtime":"./runtime.tsx","editors":"./editors.ts","outputs":[{"id":"click","title":"单击","description":"点击模块触发的事件","schema":{"type":"any"}}]}'),p=JSON.parse('{"title":"服务Fx","namespace":"mybricks.core-comlib.service","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"服务Fx","icon":"./icon.png","runtime":"./Service.tsx","rtType":"js","visibility":false}'),_={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[f({comDef:e,rt:function(e){e.inputs,e.outputs}}),f({comDef:t,rt:function(e){e.env;var t=e.data,n=e.outputs,i=e.inputs,o=e._notifyBindings;i.get((function(e,n){var i=r(void 0!==t.val?t.val:t.initValue);n.return(i)})),i.set((function(e,i){t.val=e;var a=r(e);n.changed(a,!0),o(a),i.return(a)})),i.reset((function(){var e=t.initValue;t.val=e;var i=r(e);n.changed(i,!0),o(i)}))}}),f({comDef:n,rt:i.Z}),f({comDef:o,rt:function(e){var t=e.env,r=e.data,n=e.inputs,i=e.outputs,o=e.onError;t.runtime&&(r.immediate?a({env:t,data:r,outputs:i}):n.call((function(e){a({env:t,data:r,outputs:i,onError:o},e)})))}}),f({comDef:c,rt:function(e){var t=e.env,r=e.inputs;t.runtime&&r.getCurValue((function(e,t){t.return(e)}))}}),f({comDef:u,rt:function(e){var t=e.env,r=e.data,n=e.inputs,i=(e._inputs,e._inputsCallable);n.open((function(e){t.canvas.open(r._sceneId,e,"popup"===r._sceneShowType?null:r.openType),i._open(e)}))}}),f({comDef:s,rt:function(e){var t=e.id,r=e.env,n=e.data,i=e.inputs,o=e.outputs,a=r.getModuleJSON(n.definedId);return r.renderModule(a,{ref:function(e){var t=a.inputs,r=a.outputs,c=a.pinRels,u={},s={};Object.entries(c).forEach((function(e){var t=e[0],r=e[1],n=t.split("_rootFrame_-")[1];if(n){var i=r[0];u[n]=i,s[i]=!0}}));var p=n.configs;for(var _ in p)e.inputs[_](p[_]);r.forEach((function(t){var r=t.id;s[r]||e.outputs(r,o[r])})),t.forEach((function(t){var r=t.id;i[r]((function(t,n){var i=u[r];i&&e.outputs(i,(function(e){n[i](e)})),e.inputs[r](t)}))})),e.run()},disableAutoRun:!0,outputs:o,rootId:t})}}),f({comDef:p,rt:function(e){e.inputs,e.outputs}})]},l=_;function d(e){return _.comAray.find((function(t){return t.namespace===e}))}function f(e){var t=e.comDef,r=e.rt,n=e.data;return Object.assign(t,{runtime:r,data:n})}}(),__webpack_exports__}()})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.index=t(require("react")):e.index=t(e.React)}(this,(function(__WEBPACK_EXTERNAL_MODULE__359__){return function(){"use strict";var __webpack_modules__={356:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){function __WEBPACK_DEFAULT_EXPORT__(_a){var data=_a.data,outputs=_a.outputs,inputs=_a.inputs,onError=_a.onError;inputs.from((function(val,relOutpus){var _a,script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){var fn=void 0,returnVal=void 0,isOk=void 0;try{eval("fn = ".concat(script)),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError("数据转换错误:".concat(e.message),e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})},359:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__359__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){function e(e){if(e)try{var t=Object.prototype.toString.call(e);return["[object Object]","[object Array]"].includes(t)?JSON.parse(JSON.stringify(e)):e}catch(t){return e}return e}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return o}});var t=__webpack_require__(356);function n(e,t){var n=e.env,r=e.data,o=e.outputs;if(e.onError,void 0===t&&(t={}),r.connector)try{n.callConnector(r.connector,t,r.connectorConfig).then((function(e){o.then(e)})).catch((function(e){o.catch(e)}))}catch(e){console.error(e),o.catch("执行错误 ".concat(e.message||e))}else o.catch("没有选择接口")}var r=__webpack_require__(359),o={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[{namespace:"mybricks.core-comlib.fn",version:"1.0.0",runtime:function(e){e.inputs,e.outputs},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.var",version:"1.0.0",runtime:function(t){t.env;var n=t.data,r=t.outputs,o=t.inputs,u=t._notifyBindings;o.get((function(t,r){var o=e(void 0!==n.val?n.val:n.initValue);r.return(o)})),o.set((function(t,o){n.val=t;var i=e(t);r.changed(i,!0),u(i),o.return(i)})),o.reset((function(){var t=n.initValue;n.val=t;var o=e(t);r.changed(o,!0),u(o)}))},data:{},inputs:["get","set","reset"],outputs:["return","changed"]},{namespace:"mybricks.core-comlib.type-change",version:"1.0.0",runtime:t.Z,data:{},inputs:["from"],outputs:["to"]},{namespace:"mybricks.core-comlib.connector",version:"1.0.0",runtime:function(e){var t=e.env,r=e.data,o=e.inputs,u=e.outputs,i=e.onError;t.runtime&&(r.immediate?n({env:t,data:r,outputs:u}):o.call((function(e){n({env:t,data:r,outputs:u,onError:i},e)})))},data:{},inputs:["call"],outputs:["then","catch"]},{namespace:"mybricks.core-comlib.frame-input",version:"1.0.0",runtime:function(e){var t=e.env,n=e.inputs;t.runtime&&n.getCurValue((function(e,t){t.return(e)}))},data:{},inputs:["getCurValue"],outputs:["return"]},{namespace:"mybricks.core-comlib.scenes",version:"1.0.0",runtime:function(e){var t=e.env,n=e.data,r=e.inputs,o=(e._inputs,e._inputsCallable);r.open((function(e){t.canvas.open(n._sceneId,e,"popup"===n._sceneShowType?null:n.openType),o._open(e)}))},data:{_sceneId:null,_sceneShowType:null,openType:"blank"},inputs:["open"],outputs:[]},{namespace:"mybricks.core-comlib.module",version:"1.0.0",runtime:function(e){var t=e.id,n=e.env,o=e.data,u=e.style,i=e.inputs,c=e.outputs,a=(0,r.useState)(),_=a[0],s=a[1],p=(0,r.useMemo)((function(){var e=n.getModuleJSON(o.definedId);return n.renderModule(e,{ref:function(t){if(s(t),n.edit){var r=t.style;r&&(u.widthAuto=r.widthAuto,u.widthFull=r.widthFull,u.heightAuto=r.heightAuto,u.heightFull=r.heightFull)}if(n.runtime){var a=e.inputs,_=e.outputs,p=e.pinRels,l={},d={};Object.entries(p).forEach((function(e){var t=e[0],n=e[1],r=t.split("_rootFrame_-")[1];if(r){var o=n[0];l[r]=o,d[o]=!0}}));var f=o.configs;for(var v in f)t.inputs[v](f[v]);_.forEach((function(e){var n=e.id;d[n]||t.outputs(n,c[n])})),a.forEach((function(e){var n=e.id;i[n]((function(e,r){var o=l[n];o&&t.outputs(o,(function(e){r[o](e)})),t.inputs[n](e)}))}))}t.run()},disableAutoRun:!0,outputs:c,rootId:t})}),[]);return(0,r.useMemo)((function(){if(_&&n.edit){var e=o.configs;for(var t in e)_.inputs[t](e[t])}}),[o.configs,_]),p},data:{},inputs:["show","hide","showOrHide"],outputs:["click"]},{namespace:"mybricks.core-comlib.group",version:"1.0.0",runtime:function(e){var t=e.slots,n=e.outputs,o=(0,r.useCallback)((function(){n.click()}),[]),u=(0,r.useCallback)((function(){n.dblClick()}),[]);return React.createElement("div",{style:{width:"100%",height:"100%"},onClick:o,onDoubleClick:u},t.content.render())},data:{},inputs:["show","hide","showOrHide"],outputs:["click","dblClick"]},{namespace:"mybricks.core-comlib.service",version:"1.0.0",runtime:function(e){e.inputs,e.outputs},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.frame-output",version:"1.0.0",runtime:function(e){var t=e.env,n=(e.data,e.inputs);e.outputs,t.runtime&&n.output((function(e){}))},data:{},inputs:["output"],outputs:[]}]}}(),__webpack_exports__}()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.index=t(require("react")):e.index=t(e.React)}(this,(function(__WEBPACK_EXTERNAL_MODULE__359__){return function(){"use strict";var __webpack_modules__={356:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){function __WEBPACK_DEFAULT_EXPORT__(_a){var data=_a.data,outputs=_a.outputs,inputs=_a.inputs,onError=_a.onError;inputs.from((function(val,relOutpus){var _a,script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){var fn=void 0,returnVal=void 0,isOk=void 0;try{eval("fn = ".concat(script)),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError("数据转换错误:".concat(e.message),e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:function(){return __WEBPACK_DEFAULT_EXPORT__}})},359:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__359__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){function e(t,n){void 0===n&&(n=[]);try{var r=Object.prototype.toString.call(t);if(null===t||"object"!=typeof t||r.startsWith("[object HTML")||"[object FormData]"===r)return t;var o=n.filter((function(e){return e.original===t}))[0];if(o)return o.copy;var u=Array.isArray(t)?[]:{};return n.push({original:t,copy:u}),Object.keys(t).forEach((function(r){u[r]=e(t[r],n)})),u}catch(e){return t}}__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return o}});var t=__webpack_require__(356);function n(e,t){var n=e.env,r=e.data,o=e.outputs;if(e.onError,void 0===t&&(t={}),r.connector)try{n.callConnector(r.connector,t,r.connectorConfig).then((function(e){o.then(e)})).catch((function(e){o.catch(e)}))}catch(e){console.error(e),o.catch("执行错误 ".concat(e.message||e))}else o.catch("没有选择接口")}var r=__webpack_require__(359),o={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[{namespace:"mybricks.core-comlib.fn",version:"1.0.0",runtime:function(e){e.inputs,e.outputs},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.var",version:"1.0.0",runtime:function(t){t.env;var n=t.data,r=t.outputs,o=t.inputs,u=t._notifyBindings;o.get((function(t,r){var o=e(void 0!==n.val?n.val:n.initValue);r.return(o)})),o.set((function(t,o){n.val=t;var i=e(t);r.changed(i,!0),u(i),o.return(i)})),o.reset((function(){var t=n.initValue;n.val=t;var o=e(t);r.changed(o,!0),u(o)}))},data:{},inputs:["get","set","reset"],outputs:["return","changed"]},{namespace:"mybricks.core-comlib.type-change",version:"1.0.0",runtime:t.Z,data:{},inputs:["from"],outputs:["to"]},{namespace:"mybricks.core-comlib.connector",version:"1.0.0",runtime:function(e){var t=e.env,r=e.data,o=e.inputs,u=e.outputs,i=e.onError;t.runtime&&(r.immediate?n({env:t,data:r,outputs:u}):o.call((function(e){n({env:t,data:r,outputs:u,onError:i},e)})))},data:{},inputs:["call"],outputs:["then","catch"]},{namespace:"mybricks.core-comlib.frame-input",version:"1.0.0",runtime:function(e){var t=e.env,n=e.inputs;t.runtime&&n.getCurValue((function(e,t){t.return(e)}))},data:{},inputs:["getCurValue"],outputs:["return"]},{namespace:"mybricks.core-comlib.scenes",version:"1.0.0",runtime:function(e){var t=e.env,n=e.data,r=e.inputs,o=(e._inputs,e._inputsCallable);r.open((function(e){t.canvas.open(n._sceneId,e,"popup"===n._sceneShowType?null:n.openType),o._open(e)}))},data:{_sceneId:null,_sceneShowType:null,openType:"blank"},inputs:["open"],outputs:[]},{namespace:"mybricks.core-comlib.module",version:"1.0.0",runtime:function(e){var t=e.id,n=e.env,o=e.data,u=e.style,i=e.inputs,c=e.outputs,a=(0,r.useState)(),_=a[0],s=a[1],p=(0,r.useMemo)((function(){var e=n.getModuleJSON(o.definedId);return n.renderModule(e,{ref:function(t){if(s(t),n.edit){var r=t.style;r&&(u.widthAuto=r.widthAuto,u.widthFull=r.widthFull,u.heightAuto=r.heightAuto,u.heightFull=r.heightFull)}if(n.runtime){var a=e.inputs,_=e.outputs,p=e.pinRels,l={},f={};Object.entries(p).forEach((function(e){var t=e[0],n=e[1],r=t.split("_rootFrame_-")[1];if(r){var o=n[0];l[r]=o,f[o]=!0}}));var d=o.configs;for(var v in d)t.inputs[v](d[v]);_.forEach((function(e){var n=e.id;f[n]||t.outputs(n,c[n])})),a.forEach((function(e){var n=e.id;i[n]((function(e,r){var o=l[n];o&&t.outputs(o,(function(e){r[o](e)})),t.inputs[n](e)}))}))}t.run()},disableAutoRun:!0,outputs:c,rootId:t})}),[]);return(0,r.useMemo)((function(){if(_&&n.edit){var e=o.configs;for(var t in e)_.inputs[t](e[t])}}),[o.configs,_]),p},data:{},inputs:["show","hide","showOrHide"],outputs:["click"]},{namespace:"mybricks.core-comlib.group",version:"1.0.0",runtime:function(e){var t=e.slots,n=e.outputs,o=(0,r.useCallback)((function(){n.click()}),[]),u=(0,r.useCallback)((function(){n.dblClick()}),[]);return React.createElement("div",{style:{width:"100%",height:"100%"},onClick:o,onDoubleClick:u},t.content.render())},data:{},inputs:["show","hide","showOrHide"],outputs:["click","dblClick"]},{namespace:"mybricks.core-comlib.service",version:"1.0.0",runtime:function(e){e.inputs,e.outputs},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.frame-output",version:"1.0.0",runtime:function(e){var t=e.env,n=(e.data,e.inputs);e.outputs,t.runtime&&n.output((function(e){}))},data:{},inputs:["output"],outputs:[]}]}}(),__webpack_exports__}()})); |
{ | ||
"name": "@mybricks/comlib-core", | ||
"version": "0.0.52-beta.0", | ||
"version": "0.0.52", | ||
"description": "MyBricks核心组件库", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20633