Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mybricks/comlib-core

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mybricks/comlib-core - npm Package Compare versions

Comparing version 0.0.50 to 0.0.51

3

build/webpack.config.js

@@ -13,2 +13,3 @@ /**

module.exports = {
target: ["web", "es5"],
mode: 'production',

@@ -33,3 +34,3 @@ entry: {

module: 'es6',
target: 'es6'
target: 'es5'
}

@@ -36,0 +37,0 @@ }

@@ -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,(()=>(()=>{"use strict";var __webpack_modules__={356:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{function __WEBPACK_DEFAULT_EXPORT__({data,outputs,inputs,onError}){inputs.from(((val,relOutpus)=>{var _a;const script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){let fn,returnVal,isOk;try{eval(`fn = ${script}`),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError(`数据转换错误:${e.message}`,e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:()=>__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=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>_,getCom:()=>l});const 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){if(e)try{const 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}const 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}]}');var o=__webpack_require__(356);const i=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 s({env:e,data:t,outputs:r,onError:n},o={}){if(t.connector)try{e.callConnector(t.connector,o,t.connectorConfig).then((e=>{r.then(e)})).catch((e=>{r.catch(e)}))}catch(e){console.error(e),r.catch(`执行错误 ${e.message||e}`)}else r.catch("没有选择接口")}const a=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"}}]}'),c=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"}}]}'),u=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={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[d({comDef:e,rt:function({inputs:e,outputs:t}){}}),d({comDef:t,rt:function({env:e,data:t,outputs:n,inputs:o,_notifyBindings:i}){o.get(((e,n)=>{const o=r(void 0!==t.val?t.val:t.initValue);n.return(o)})),o.set(((e,o)=>{t.val=e;const s=r(e);n.changed(s,!0),i(s),o.return(s)})),o.reset((()=>{const e=t.initValue;t.val=e;const o=r(e);n.changed(o,!0),i(o)}))}}),d({comDef:n,rt:o.Z}),d({comDef:i,rt:function({env:e,data:t,inputs:r,outputs:n,onError:o}){e.runtime&&(t.immediate?s({env:e,data:t,outputs:n}):r.call((r=>{s({env:e,data:t,outputs:n,onError:o},r)})))}}),d({comDef:a,rt:function({env:e,inputs:t}){e.runtime&&t.getCurValue(((e,t)=>{t.return(e)}))}}),d({comDef:c,rt:function({env:e,data:t,inputs:r,_inputs:n,_inputsCallable:o}){r.open((r=>{e.canvas.open(t._sceneId,r,"popup"===t._sceneShowType?null:t.openType),o._open(r)}))}}),d({comDef:u,rt:function({env:e,data:t,inputs:r,outputs:n}){const o=e.getModuleJSON(t.definedId);return e.renderModule(o,{ref(e){const{inputs:i,outputs:s}=o;i.forEach((({id:t})=>{r[t]((r=>{e.inputs[t](r)}))})),s.forEach((({id:t})=>{e.outputs(t,n[t])}));const a=t.configs;for(let t in a)e.inputs[t](a[t]);e.run()},disableAutoRun:!0})}})]},_=p;function l(e){return p.comAray.find((t=>t.namespace===e))}function d({comDef:e,rt:t,data:r}){return Object.assign(e,{runtime:t,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 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 p},getCom:function(){return l}});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"}}]}'),_={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[d({comDef:e,rt:function(e){e.inputs,e.outputs}}),d({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)}))}}),d({comDef:r,rt:i.Z}),d({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)})))}}),d({comDef:c,rt:function(e){var t=e.env,n=e.inputs;t.runtime&&n.getCurValue((function(e,t){t.return(e)}))}}),d({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)}))}}),d({comDef:s,rt:function(e){var t=e.env,n=e.data,r=e.inputs,i=e.outputs,o=t.getModuleJSON(n.definedId);return t.renderModule(o,{ref:function(e){var t=o.inputs,a=o.outputs;t.forEach((function(t){var n=t.id;r[n]((function(t){e.inputs[n](t)}))})),a.forEach((function(t){var n=t.id;e.outputs(n,i[n])}));var c=n.configs;for(var u in c)e.inputs[u](c[u]);e.run()},disableAutoRun:!0})}})]},p=_;function l(e){return _.comAray.find((function(t){return t.namespace===e}))}function d(e){var t=e.comDef,n=e.rt,r=e.data;return Object.assign(t,{runtime:n,data:r})}}(),__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,(__WEBPACK_EXTERNAL_MODULE__359__=>(()=>{"use strict";var __webpack_modules__={356:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{function __WEBPACK_DEFAULT_EXPORT__({data,outputs,inputs,onError}){inputs.from(((val,relOutpus)=>{var _a;const script=null===(_a=data.exchange)||void 0===_a?void 0:_a.script;if(script){let fn,returnVal,isOk;try{eval(`fn = ${script}`),returnVal=fn(val),isOk=!0}catch(e){console.error(e),onError(`数据转换错误:${e.message}`,e)}isOk&&outputs.to(returnVal)}else onError("未配置转换规则")}))}__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__})},359: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 o=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](o,o.exports,__webpack_require__),o.exports}__webpack_require__.d=(e,t)=>{for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{function e(e){if(e)try{const 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:()=>n});var t=__webpack_require__(356);function o({env:e,data:t,outputs:o,onError:r},n={}){if(t.connector)try{e.callConnector(t.connector,n,t.connectorConfig).then((e=>{o.then(e)})).catch((e=>{o.catch(e)}))}catch(e){console.error(e),o.catch(`执行错误 ${e.message||e}`)}else o.catch("没有选择接口")}var r=__webpack_require__(359);const n={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({inputs:e,outputs:t}){},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.var",version:"1.0.0",runtime:function({env:t,data:o,outputs:r,inputs:n,_notifyBindings:u}){n.get(((t,r)=>{const n=e(void 0!==o.val?o.val:o.initValue);r.return(n)})),n.set(((t,n)=>{o.val=t;const c=e(t);r.changed(c,!0),u(c),n.return(c)})),n.reset((()=>{const t=o.initValue;o.val=t;const n=e(t);r.changed(n,!0),u(n)}))},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({env:e,data:t,inputs:r,outputs:n,onError:u}){e.runtime&&(t.immediate?o({env:e,data:t,outputs:n}):r.call((r=>{o({env:e,data:t,outputs:n,onError:u},r)})))},data:{},inputs:["call"],outputs:["then","catch"]},{namespace:"mybricks.core-comlib.frame-input",version:"1.0.0",runtime:function({env:e,inputs:t}){e.runtime&&t.getCurValue(((e,t)=>{t.return(e)}))},data:{},inputs:["getCurValue"],outputs:["return"]},{namespace:"mybricks.core-comlib.scenes",version:"1.0.0",runtime:function({env:e,data:t,inputs:o,_inputs:r,_inputsCallable:n}){o.open((o=>{e.canvas.open(t._sceneId,o,"popup"===t._sceneShowType?null:t.openType),n._open(o)}))},data:{_sceneId:null,_sceneShowType:null,openType:"blank"},inputs:["open"],outputs:[]},{namespace:"mybricks.core-comlib.module",version:"1.0.0",runtime:function({id:e,env:t,data:o,style:n,inputs:u,outputs:c}){const[i,s]=(0,r.useState)(),a=(0,r.useMemo)((()=>{const r=t.getModuleJSON(o.definedId);return t.renderModule(r,{ref(e){if(s(e),t.edit){const t=e.style;t&&(n.widthAuto=t.widthAuto,n.widthFull=t.widthFull,n.heightAuto=t.heightAuto,n.heightFull=t.heightFull)}if(t.runtime){const{inputs:t,outputs:n,pinRels:i}=r,s={},a={};Object.entries(i).forEach((([e,t])=>{const o=e.split("_rootFrame_-")[1];if(o){const e=t[0];s[o]=e,a[e]=!0}}));const _=o.configs;for(let t in _)e.inputs[t](_[t]);n.forEach((({id:t})=>{a[t]||e.outputs(t,c[t])})),t.forEach((({id:t})=>{u[t](((o,r)=>{const n=s[t];n&&e.outputs(n,(e=>{r[n](e)})),e.inputs[t](o)}))}))}e.run()},disableAutoRun:!0,outputs:c,rootId:e})}),[]);return(0,r.useMemo)((()=>{if(i&&t.edit){const e=o.configs;for(let t in e)i.inputs[t](e[t])}}),[o.configs,i]),a},data:{},inputs:["show","hide","showOrHide"],outputs:["click"]},{namespace:"mybricks.core-comlib.group",version:"1.0.0",runtime:function({slots:e,outputs:t}){const o=(0,r.useCallback)((()=>{t.click()}),[]),n=(0,r.useCallback)((()=>{t.dblClick()}),[]);return React.createElement("div",{style:{width:"100%",height:"100%"},onClick:o,onDoubleClick:n},e.content.render())},data:{},inputs:["show","hide","showOrHide"],outputs:["click","dblClick"]},{namespace:"mybricks.core-comlib.service",version:"1.0.0",runtime:function({inputs:e,outputs:t}){},data:{},inputs:[],outputs:[]},{namespace:"mybricks.core-comlib.frame-output",version:"1.0.0",runtime:function({env:e,data:t,inputs:o,outputs:r}){e.runtime&&o.output((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(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__}()}));
{
"name": "@mybricks/comlib-core",
"version": "0.0.50",
"version": "0.0.51",
"description": "MyBricks核心组件库",

@@ -21,2 +21,3 @@ "main": "index.js",

"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.24.7",
"@types/node": "^18.0.6",

@@ -23,0 +24,0 @@ "@types/react": "^18.0.15",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc