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

@mybricks/comlib-core

Package Overview
Dependencies
Maintainers
9
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.16 to 0.0.17

18

build/webpack.config.js

@@ -21,7 +21,15 @@ /**

test: /\.tsx?$/,
loader: 'ts-loader',
options: {
transpileOnly: true
}
// exclude: /node_modules/
use: [
{
loader: 'ts-loader',
options: {
silent: true,
transpileOnly: true,
compilerOptions: {
module: 'es6',
target: 'es6'
}
}
}
]
},

@@ -28,0 +36,0 @@ {

@@ -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__=>(()=>{var __webpack_modules__={379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},i=[],c=0;c<e.length;c++){var s=e[c],u=n.base?s[0]+n.base:s[0],_=o[u]||0,p="".concat(u," ").concat(_);o[u]=_+1;var l=r(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==l)t[l].references++,t[l].updater(d);else{var m=a(d,n);n.byIndex=c,t.splice(c,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function a(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,a){var o=n(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var c=r(o[i]);t[c].references--}for(var s=n(e,a),u=0;u<o.length;u++){var _=r(o[u]);0===t[_].references&&(t[_].updater(),t.splice(_,1))}o=s}}},569:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var a=void 0!==r.layer;a&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},821:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";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:()=>__WEBPACK_DEFAULT_EXPORT__})},703:(e,t,r)=>{(t=r(361)(!1)).push([e.id,".bg-e16b2 {\n z-index: 10000;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.popup-26cf1 {\n width: 500px;\n display: flex;\n flex-direction: column;\n border: 1px solid #DDD;\n border-radius: 5px;\n padding: 10px;\n background-color: #FFF;\n}\n.popup-26cf1 .header-b9165 {\n display: flex;\n justify-content: space-between;\n}\n.popup-26cf1 .body-0a64a {\n height: fit-content;\n min-height: 100px;\n}\n.popup-26cf1 .body-0a64a > * {\n min-height: 100px !important;\n}\n.popup-26cf1 .toolbar-acc55 {\n display: flex;\n}\n",""]),t.locals={bg:"bg-e16b2",popup:"popup-26cf1",header:"header-b9165",body:"body-0a64a",toolbar:"toolbar-acc55"},e.exports=t},361:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,a,o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"==typeof btoa){var c=(r=i,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(a," */")),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(s).concat([c]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);n&&a[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},359:e=>{"use strict";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]={id:e,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__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})},__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>M,getCom:()=>O});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"}},{"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 JSON.parse(JSON.stringify(e))}catch(t){return e}return e}const n=JSON.parse('{"title":"类型转换","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 a=__webpack_require__(821);const 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 i(e,t){var r=e.env,n=e.data,a=e.outputs;if(e.onError,void 0===t&&(t={}),n.connector)try{r.callConnector(n.connector,t,n.connectorConfig).then((function(e){a.then(e)})).catch((function(e){a.catch(e)}))}catch(e){console.error(e),a.catch("执行错误 ".concat(e.message||e))}else a.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('{"title":"对话框","namespace":"mybricks.core-comlib.popup","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"对话框","icon":"./icon.png","data":"./data.json","runtime":"./runtime.tsx","editors":"./editors.tsx","slots":[{"id":"header","title":"标题栏"},{"id":"body","title":"内容"},{"id":"toolbar","title":"工具栏"}],"outputs":[{"id":"commit","title":"确定"},{"id":"cancel","title":"取消"},{"id":"apply","title":"应用"}]}');var u=__webpack_require__(359),_=__webpack_require__.n(u),p=__webpack_require__(379),l=__webpack_require__.n(p),d=__webpack_require__(795),m=__webpack_require__.n(d),f=__webpack_require__(569),b=__webpack_require__.n(f),v=__webpack_require__(565),h=__webpack_require__.n(v),y=__webpack_require__(216),k=__webpack_require__.n(y),g=__webpack_require__(589),w=__webpack_require__.n(g),x=__webpack_require__(703),E=__webpack_require__.n(x),q={};q.styleTagTransform=w(),q.setAttributes=h(),q.insert=b().bind(null,"head"),q.domAPI=m(),q.insertStyleElement=k(),l()(E(),q);const C=E()&&E().locals?E().locals:void 0;var j={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[S({comDef:e,rt:function(e){e.inputs,e.outputs}}),S({comDef:t,rt:function(e){e.env;var t=e.data,n=e.outputs,a=e.inputs,o=e._notifyBindings;a.get((function(e,n){var a=r(void 0!==t.val?t.val:t.initValue);n.return(a)})),a.set((function(e){t.val=e;var a=r(e);n.changed(a,!0),o(a)})),a.reset((function(){var e=t.initValue;t.val=e;var a=r(e);n.changed(a,!0),o(a)}))}}),S({comDef:n,rt:a.Z}),S({comDef:o,rt:function(e){var t=e.env,r=e.data,n=e.inputs,a=e.outputs,o=e.onError;t.runtime&&(r.immediate?i({env:t,data:r,outputs:a}):n.call((function(e){i({env:t,data:r,outputs:a,onError:o},e)})))}}),S({comDef:c,rt:function(e){var t=e.env,r=(e.data,e.inputs);e.outputs,t.runtime&&r.getCurValue((function(e,t){t.return(e)}))}}),S({comDef:s,rt:function(e){var t=e._env,r=e.env,n=e.data,a=e.outputs,o=e.slots;e.createPortal,(0,u.useMemo)((function(){t.loadCSSLazy(C)}),[]);var i=(0,u.useCallback)((function(){t.currentScenes.close()}),[]),c=(0,u.useCallback)((function(){a.cancel()}),[]),s=(0,u.useCallback)((function(){a.commit()}),[]),p=(0,u.useCallback)((function(){a.apply()}),[]),l=n.buttons,d=_().createElement("div",{className:C.popup},_().createElement("div",{className:C.header},_().createElement("label",null,"对话框的标题"),_().createElement("button",{onClick:i},"×")),_().createElement("div",{className:C.body},o.body.render()),_().createElement("div",{className:C.toolbar},_().createElement("div",{style:{marginRight:"auto"}},l.apply.visible?_().createElement("button",{"data-handler-btn":"apply",style:{marginRight:"auto"},onClick:p},"应用"):null),l.cancel.visible?_().createElement("button",{"data-handler-btn":"cancel",onClick:c},"取消"):null,l.commit.visible?_().createElement("button",{"data-handler-btn":"commit",onClick:s},"确定"):null));return r.runtime?_().createElement("div",{className:C.bg},d):d}})]};const M=j;function O(e){return j.comAray.find((function(t){return t.namespace===e}))}function S(e){var t=e.comDef,r=e.rt,n=e.data;return Object.assign(t,{runtime:r,data:n})}})(),__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["mybricks.core-comlib"]=t(require("react")):e["mybricks.core-comlib"]=t(e.React)}(this,(__WEBPACK_EXTERNAL_MODULE__359__=>(()=>{var __webpack_modules__={379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var a={},i=[],c=0;c<e.length;c++){var s=e[c],u=n.base?s[0]+n.base:s[0],_=a[u]||0,p="".concat(u," ").concat(_);a[u]=_+1;var l=r(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==l)t[l].references++,t[l].updater(d);else{var m=o(d,n);n.byIndex=c,t.splice(c,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var a=n(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=r(a[i]);t[c].references--}for(var s=n(e,o),u=0;u<a.length;u++){var _=r(a[u]);0===t[_].references&&(t[_].updater(),t.splice(_,1))}a=s}}},569:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},356:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";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__})},703:(e,t,r)=>{(t=r(361)(!1)).push([e.id,".bg-e16b2 {\n z-index: 10000;\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.popup-26cf1 {\n width: 500px;\n display: flex;\n flex-direction: column;\n border: 1px solid #DDD;\n border-radius: 5px;\n padding: 10px;\n background-color: #FFF;\n}\n.popup-26cf1 .header-b9165 {\n display: flex;\n justify-content: space-between;\n}\n.popup-26cf1 .body-0a64a {\n height: fit-content;\n min-height: 100px;\n}\n.popup-26cf1 .body-0a64a > * {\n min-height: 100px !important;\n}\n.popup-26cf1 .toolbar-acc55 {\n display: flex;\n}\n",""]),t.locals={bg:"bg-e16b2",popup:"popup-26cf1",header:"header-b9165",body:"body-0a64a",toolbar:"toolbar-acc55"},e.exports=t},361:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r,n,o,a=e[1]||"",i=e[3];if(!i)return a;if(t&&"function"==typeof btoa){var c=(r=i,n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(o," */")),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[a].concat(s).concat([c]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);n&&o[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},359:e=>{"use strict";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]={id:e,exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__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})},__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>M,getCom:()=>O});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"}},{"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 JSON.parse(JSON.stringify(e))}catch(t){return e}return e}const n=JSON.parse('{"title":"类型转换","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 a=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 i({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('{"title":"对话框","namespace":"mybricks.core-comlib.popup","author":"CheMingjun","author_name":"车明君","version":"1.0.0","description":"对话框","icon":"./icon.png","data":"./data.json","runtime":"./runtime.tsx","editors":"./editors.tsx","slots":[{"id":"header","title":"标题栏"},{"id":"body","title":"内容"},{"id":"toolbar","title":"工具栏"}],"outputs":[{"id":"commit","title":"确定"},{"id":"cancel","title":"取消"},{"id":"apply","title":"应用"}]}');var u=__webpack_require__(359),_=__webpack_require__.n(u),p=__webpack_require__(379),l=__webpack_require__.n(p),d=__webpack_require__(795),m=__webpack_require__.n(d),b=__webpack_require__(569),f=__webpack_require__.n(b),h=__webpack_require__(565),y=__webpack_require__.n(h),v=__webpack_require__(216),k=__webpack_require__.n(v),g=__webpack_require__(589),w=__webpack_require__.n(g),x=__webpack_require__(703),E=__webpack_require__.n(x),q={};q.styleTagTransform=w(),q.setAttributes=y(),q.insert=f().bind(null,"head"),q.domAPI=m(),q.insertStyleElement=k(),l()(E(),q);const C=E()&&E().locals?E().locals:void 0,j={id:"mybricks-core-comlib",title:"Mybrics核心组件库",author:"CheMingjun",icon:"",version:"1.0.1",comAray:[S({comDef:e,rt:function({inputs:e,outputs:t}){}}),S({comDef:t,rt:function({env:e,data:t,outputs:n,inputs:o,_notifyBindings:a}){o.get(((e,n)=>{const o=r(void 0!==t.val?t.val:t.initValue);n.return(o)})),o.set((e=>{t.val=e;const o=r(e);n.changed(o,!0),a(o)})),o.reset((()=>{const e=t.initValue;t.val=e;const o=r(e);n.changed(o,!0),a(o)}))}}),S({comDef:n,rt:o.Z}),S({comDef:a,rt:function({env:e,data:t,inputs:r,outputs:n,onError:o}){e.runtime&&(t.immediate?i({env:e,data:t,outputs:n}):r.call((r=>{i({env:e,data:t,outputs:n,onError:o},r)})))}}),S({comDef:c,rt:function({env:e,data:t,inputs:r,outputs:n}){e.runtime&&r.getCurValue(((e,t)=>{t.return(e)}))}}),S({comDef:s,rt:function({_env:e,env:t,data:r,outputs:n,slots:o,createPortal:a}){(0,u.useMemo)((()=>{e.loadCSSLazy(C)}),[]);const i=(0,u.useCallback)((()=>{e.currentScenes.close()}),[]),c=(0,u.useCallback)((()=>{n.cancel()}),[]),s=(0,u.useCallback)((()=>{n.commit()}),[]),p=(0,u.useCallback)((()=>{n.apply()}),[]),l=r.buttons,d=_().createElement("div",{className:C.popup},_().createElement("div",{className:C.header},_().createElement("label",null,"对话框的标题"),_().createElement("button",{onClick:i},"×")),_().createElement("div",{className:C.body},o.body.render()),_().createElement("div",{className:C.toolbar},_().createElement("div",{style:{marginRight:"auto"}},l.apply.visible?_().createElement("button",{"data-handler-btn":"apply",style:{marginRight:"auto"},onClick:p},"应用"):null),l.cancel.visible?_().createElement("button",{"data-handler-btn":"cancel",onClick:c},"取消"):null,l.commit.visible?_().createElement("button",{"data-handler-btn":"commit",onClick:s},"确定"):null));return t.runtime?_().createElement("div",{className:C.bg},d):d}})]},M=j;function O(e){return j.comAray.find((t=>t.namespace===e))}function S({comDef:e,rt:t,data:r}){return Object.assign(e,{runtime:t,data:r})}})(),__webpack_exports__})()));
{
"name": "@mybricks/comlib-core",
"version": "0.0.16",
"version": "0.0.17",
"description": "MyBricks核心组件库",

@@ -5,0 +5,0 @@ "main": "index.js",

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