@mybricks/comlib-core
Advanced tools
Comparing version 0.0.29 to 0.0.30-beta0
@@ -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["mybricks.core-comlib"]=t(require("react")):e["mybricks.core-comlib"]=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 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:()=>l,getCom:()=>m});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&&"object"==typeof e)try{return e instanceof FormData?e:JSON.parse(JSON.stringify(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 a({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 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"}}]}'),s=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.defined-com","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"自定义组件","icon":"./icon.png","data":"./data.json","runtime":"./runtime.ts","editors":"./editors.ts"}');var _=__webpack_require__(359);const 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 a=r(e);n.changed(a,!0),i(a),o.return(a)})),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?a({env:e,data:t,outputs:n}):r.call((r=>{a({env:e,data:t,outputs:n,onError:o},r)})))}}),d({comDef:c,rt:function({env:e,data:t,inputs:r,outputs:n}){e.runtime&&r.getCurValue(((e,t)=>{t.return(e)}))}}),d({comDef:s,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}){return(0,_.useMemo)((()=>{const{toJSON:o}=t;return e.renderCom(o,{ref(t){if(e.runtime){const{inputs:e,outputs:i}=o;e.forEach((({id:e})=>{r[e]((r=>{t.inputs[e](r)}))})),i.forEach((({id:e})=>{t.outputs(e,n[e])}))}t.run()},disableAutoRun:!0})}),[])}})]},l=p;function m(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["mybricks.core-comlib"]=t():e["mybricks.core-comlib"]=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:()=>p,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&&"object"==typeof e)try{return e instanceof FormData?e:JSON.parse(JSON.stringify(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 a({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 s=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.defined-com","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"自定义组件","icon":"./icon.png","data":"./data.json","runtime":"./runtime.ts","editors":"./editors.ts"}'),_={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 a=r(e);n.changed(a,!0),i(a),o.return(a)})),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?a({env:e,data:t,outputs:n}):r.call((r=>{a({env:e,data:t,outputs:n,onError:o},r)})))}}),d({comDef:s,rt:function({env:e,data:t,inputs:r,outputs:n}){e.runtime&&r.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.getDefinedComJSON(t.definedId);return e.renderCom(o,{ref(t){if(e.runtime){const{inputs:e,outputs:i}=o;e.forEach((({id:e})=>{r[e]((r=>{t.inputs[e](r)}))})),i.forEach((({id:e})=>{t.outputs(e,n[e])}))}t.run()},disableAutoRun:!0})}})]},p=_;function l(e){return _.comAray.find((t=>t.namespace===e))}function d({comDef:e,rt:t,data:r}){return Object.assign(e,{runtime:t,data:r})}})(),__webpack_exports__})())); |
{ | ||
"name": "@mybricks/comlib-core", | ||
"version": "0.0.29", | ||
"version": "0.0.30-beta0", | ||
"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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
0
10955