cool-common-utils 1.0.1 → 1.0.3
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/aes.js +1 -1
- package/dist/aes.mjs +1 -1
- package/dist/amap-utils.js +1 -1
- package/dist/amap-utils.mjs +1 -1
- package/dist/commons/vendor-crypto-js-AYnBdXB5.js +18 -0
- package/dist/commons/vendor-crypto-js-Dhi5niDn.js +18 -0
- package/dist/commons/vendor-other-C48Un_So.js +1 -0
- package/dist/commons/vendor-other-oYX07ukn.js +1 -0
- package/dist/commons/vendor-qs-Dasci0ry.js +1 -0
- package/dist/commons/vendor-qs-DpjaCScg.js +1 -0
- package/dist/commons/vendor-socket.io-client-CkipB4mt.js +1 -0
- package/dist/commons/vendor-socket.io-client-DHDwO2X7.js +1 -0
- package/dist/commons/vendor-sweetalert-4FJTrmvX.js +1 -0
- package/dist/commons/vendor-sweetalert-KX8J3Sv0.js +1 -0
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/message.js +1 -1
- package/dist/message.mjs +1 -1
- package/dist/request.js +1 -1
- package/dist/request.mjs +1 -1
- package/dist/socket-io.js +1 -1
- package/dist/socket-io.mjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/websocket.js +1 -1
- package/dist/websocket.mjs +1 -1
- package/package.json +2 -4
- package/dist/commons/crypto-CT1W49ET.js +0 -18
- package/dist/commons/crypto-DuLLVHQr.js +0 -18
- package/dist/commons/mqtt-ClqAR6Iy.js +0 -13
- package/dist/commons/mqtt-CsLh6xMv.js +0 -13
- package/dist/commons/qs-D46UmmL2.js +0 -1
- package/dist/commons/qs-yb498JEx.js +0 -1
- package/dist/commons/socket_io-Bw6JUjpU.js +0 -1
- package/dist/commons/socket_io-CSNhVzSE.js +0 -1
- package/dist/commons/sweetalert-B1ksMzDj.js +0 -1
- package/dist/commons/sweetalert-DMYmZawW.js +0 -1
- package/dist/commons/tslib.es6-BjAlDJRq.js +0 -1
- package/dist/commons/tslib.es6-DVnGIs25.js +0 -1
- package/dist/commons/xlsx_js-D6tizOBX.js +0 -2
- package/dist/commons/xlsx_js-qidrMB31.js +0 -2
- package/dist/excel-xlsx-util.js +0 -1
- package/dist/excel-xlsx-util.mjs +0 -1
- package/dist/mqtt.js +0 -1
- package/dist/mqtt.mjs +0 -1
- package/dist/utils/exports/excel-xlsx-util.d.ts +0 -14
- package/dist/utils/sockets/mqtt.d.ts +0 -21
- /package/dist/commons/{axios-DsdlaZnY.js → vendor-axios-DsdlaZnY.js} +0 -0
- /package/dist/commons/{axios-DxFWCEd0.js → vendor-axios-DxFWCEd0.js} +0 -0
package/dist/excel-xlsx-util.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=require("./commons/tslib.es6-DVnGIs25.js"),e=require("./commons/xlsx_js-qidrMB31.js");require("./commons/crypto-CT1W49ET.js"),require("./commons/socket_io-Bw6JUjpU.js");var t=e.requireXlsx_min();exports.exportExcelXlsx=function(e){void 0===e&&(e={});var n=Object.assign({columns:[],data:[],sheetName:"sheet1",fileName:"excel",fileType:"xlsx"},e);if(0===n.columns.length)return console.log("Add columns!");var a=function(e,t,n){if(void 0===n&&(n=0),t[n]||(t[n]=[]),n){var _=new Array(t[n-1].length-1-t[n].length).fill("");t[n]=r.__spreadArray(r.__spreadArray([],r.__read(t[n]),!1),r.__read(_),!1)}return e.reduce(function(e,_){if(t[n]=r.__spreadArray(r.__spreadArray([],r.__read(t[n]),!1),[_.label],!1),_.children&&_.children.length){var o=a(_.children,t,n+1),l=new Array(o-1).fill("");return t[n]=r.__spreadArray(r.__spreadArray([],r.__read(t[n]),!1),r.__read(l),!1),e+o}return e+1},0)},_=function(e){return e.reduce(function(e,t){return t.children&&t.children.length?r.__spreadArray(r.__spreadArray([],r.__read(e),!1),r.__read(_(t.children)),!1):r.__spreadArray(r.__spreadArray([],r.__read(e),!1),[t],!1)},[])},o=_(n.columns),l=n.data.map(function(r){return o.map(function(e){return{v:String(r[e.field]),t:"s",s:{font:{name:"黑体"},alignment:{vertical:"center",horizontal:"center"},border:{bottom:{style:"thin",color:{rgb:"D0D0D0"}},left:{style:"thin",color:{rgb:"D0D0D0"}},top:{style:"thin",color:{rgb:"D0D0D0"}},right:{style:"thin",color:{rgb:"D0D0D0"}}}}}})}),i=function(){var e=[];a(n.columns,e);var t=Math.max.apply(Math,r.__spreadArray([],r.__read(e.map(function(r){return r.length})),!1));return e.map(function(e){var n=e.map(function(r){return{v:r,t:"s",s:{font:{bold:!0,name:"黑体"},alignment:{vertical:"center",horizontal:"center"},fill:{fgColor:{rgb:"EEEEEE"}},border:{bottom:{style:"thin",color:{rgb:"C2C2C2"}},left:{style:"thin",color:{rgb:"C2C2C2"}},top:{style:"thin",color:{rgb:"C2C2C2"}},right:{style:"thin",color:{rgb:"C2C2C2"}}}}}});if(n.length<t){var a=new Array(t-n.length).fill({v:"",t:"s",s:{font:{bold:!0,name:"黑体"},alignment:{vertical:"center",horizontal:"center"},fill:{fgColor:{rgb:"EEEEEE"}},border:{bottom:{style:"thin",color:{rgb:"C2C2C2"}},left:{style:"thin",color:{rgb:"C2C2C2"}},top:{style:"thin",color:{rgb:"C2C2C2"}},right:{style:"thin",color:{rgb:"C2C2C2"}}}}});n=r.__spreadArray(r.__spreadArray([],r.__read(n),!1),r.__read(a),!1)}return n})}(),s=r.__spreadArray(r.__spreadArray([],r.__read(i),!1),r.__read(l),!1),c=l.reduce(function(e,t){return e.length?e.map(function(e,n){return r.__spreadArray(r.__spreadArray([],r.__read(e),!1),[t[n]],!1)}):r.__spreadArray(r.__spreadArray([],r.__read(e),!1),r.__read(t.map(function(r){return[r]})),!1)},[]).map(function(e){return Math.max.apply(Math,r.__spreadArray([],r.__read(e.map(function(r){return String(r.v).split("").reduce(function(r,e){return r+(function(r){return/[^\dA-Za-z]/.test(r)}(e)?2:1)},0)})),!1))}),d=t.utils.aoa_to_sheet(s);d["!merges"]=i.reduce(function(e,t,n){return n<i.length-1?r.__spreadArray(r.__spreadArray([],r.__read(e),!1),r.__read((_=n,o=i,l=function(e){return o.reduce(function(t,n,a){return a<_?r.__spreadArray(r.__spreadArray([],r.__read(t),!1),[n[e].v],!1):t},[]).filter(function(r){return r}).length},(a=t).reduce(function(e,t,n){return t.v?o[_+1][n].v?a[n+1].v?e:r.__spreadArray(r.__spreadArray([],r.__read(e),!1),[{s:{r:_,c:n}}],!1):r.__spreadArray(r.__spreadArray([],r.__read(e),!1),[{s:{r:_,c:n},e:{r:(i=n,o.reduce(function(r,e,t){return e[i].v?r:t},_)),c:n}}],!1):n===a.length-1&&!l(n)||!l(n)?(e[e.length-1].e={r:_,c:n},e):e;var i},[]))),!1):e;var a,_,o,l},[]),d["!cols"]=c.map(function(r){return{wch:r+4||10}}),d["!rows"]=r.__spreadArray(r.__spreadArray([],r.__read(i.map(function(){return{hpx:20}})),!1),r.__read(l.map(function(){return{hpx:18}})),!1);var u=t.utils.book_new();t.utils.book_append_sheet(u,d,n.sheetName),t.writeFile(u,"".concat(n.fileName,".").concat(n.fileType))};
|
package/dist/excel-xlsx-util.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t,b as r}from"./commons/tslib.es6-BjAlDJRq.js";import{r as n}from"./commons/xlsx_js-D6tizOBX.js";import"./commons/crypto-DuLLVHQr.js";import"./commons/socket_io-CSNhVzSE.js";var e=n(),o=function(n){void 0===n&&(n={});var o=Object.assign({columns:[],data:[],sheetName:"sheet1",fileName:"excel",fileType:"xlsx"},n);if(0===o.columns.length)return console.log("Add columns!");var l=function(n,e,o){if(void 0===o&&(o=0),e[o]||(e[o]=[]),o){var i=new Array(e[o-1].length-1-e[o].length).fill("");e[o]=t(t([],r(e[o]),!1),r(i),!1)}return n.reduce(function(n,i){if(e[o]=t(t([],r(e[o]),!1),[i.label],!1),i.children&&i.children.length){var c=l(i.children,e,o+1),u=new Array(c-1).fill("");return e[o]=t(t([],r(e[o]),!1),r(u),!1),n+c}return n+1},0)},i=function(n){return n.reduce(function(n,e){return e.children&&e.children.length?t(t([],r(n),!1),r(i(e.children)),!1):t(t([],r(n),!1),[e],!1)},[])},c=i(o.columns),u=o.data.map(function(t){return c.map(function(r){return{v:String(t[r.field]),t:"s",s:{font:{name:"黑体"},alignment:{vertical:"center",horizontal:"center"},border:{bottom:{style:"thin",color:{rgb:"D0D0D0"}},left:{style:"thin",color:{rgb:"D0D0D0"}},top:{style:"thin",color:{rgb:"D0D0D0"}},right:{style:"thin",color:{rgb:"D0D0D0"}}}}}})}),a=function(){var n=[];l(o.columns,n);var e=Math.max.apply(Math,t([],r(n.map(function(t){return t.length})),!1));return n.map(function(n){var o=n.map(function(t){return{v:t,t:"s",s:{font:{bold:!0,name:"黑体"},alignment:{vertical:"center",horizontal:"center"},fill:{fgColor:{rgb:"EEEEEE"}},border:{bottom:{style:"thin",color:{rgb:"C2C2C2"}},left:{style:"thin",color:{rgb:"C2C2C2"}},top:{style:"thin",color:{rgb:"C2C2C2"}},right:{style:"thin",color:{rgb:"C2C2C2"}}}}}});if(o.length<e){var l=new Array(e-o.length).fill({v:"",t:"s",s:{font:{bold:!0,name:"黑体"},alignment:{vertical:"center",horizontal:"center"},fill:{fgColor:{rgb:"EEEEEE"}},border:{bottom:{style:"thin",color:{rgb:"C2C2C2"}},left:{style:"thin",color:{rgb:"C2C2C2"}},top:{style:"thin",color:{rgb:"C2C2C2"}},right:{style:"thin",color:{rgb:"C2C2C2"}}}}});o=t(t([],r(o),!1),r(l),!1)}return o})}(),s=t(t([],r(a),!1),r(u),!1),f=u.reduce(function(n,e){return n.length?n.map(function(n,o){return t(t([],r(n),!1),[e[o]],!1)}):t(t([],r(n),!1),r(e.map(function(t){return[t]})),!1)},[]).map(function(n){return Math.max.apply(Math,t([],r(n.map(function(t){return String(t.v).split("").reduce(function(t,r){return t+(function(t){return/[^\dA-Za-z]/.test(t)}(r)?2:1)},0)})),!1))}),h=e.utils.aoa_to_sheet(s);h["!merges"]=a.reduce(function(n,e,o){return o<a.length-1?t(t([],r(n),!1),r((i=o,c=a,u=function(n){return c.reduce(function(e,o,l){return l<i?t(t([],r(e),!1),[o[n].v],!1):e},[]).filter(function(t){return t}).length},(l=e).reduce(function(n,e,o){return e.v?c[i+1][o].v?l[o+1].v?n:t(t([],r(n),!1),[{s:{r:i,c:o}}],!1):t(t([],r(n),!1),[{s:{r:i,c:o},e:{r:(a=o,c.reduce(function(t,r,n){return r[a].v?t:n},i)),c:o}}],!1):o===l.length-1&&!u(o)||!u(o)?(n[n.length-1].e={r:i,c:o},n):n;var a},[]))),!1):n;var l,i,c,u},[]),h["!cols"]=f.map(function(t){return{wch:t+4||10}}),h["!rows"]=t(t([],r(a.map(function(){return{hpx:20}})),!1),r(u.map(function(){return{hpx:18}})),!1);var m=e.utils.book_new();e.utils.book_append_sheet(m,h,o.sheetName),e.writeFile(m,"".concat(o.fileName,".").concat(o.fileType))};export{o as exportExcelXlsx};
|
package/dist/mqtt.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./commons/tslib.es6-DVnGIs25.js"),t=require("./commons/mqtt-CsLh6xMv.js"),i=require("./utils.js"),s={clean:!0,connectTimeout:1e4,resubscribe:!0,reconnectPeriod:1e4,keepalive:1},n=function(){function n(e,t){this._client=null,this._hasInit=!1,this._publishQueueList=new Map,this._subscribeQueueList=new Map,this._unsubscribeQueueList=new Map,this._registerMessageHandlerMap=new Map,this._url=e||"",this._options=t,this.init()}return n.prototype.init=function(){var i,n,r,o,l;this._hasInit||(this._client=t.mqtt.connect(this._url,e.__assign(e.__assign({},s),this._options)),this._hasInit=!0,null===(i=this._client)||void 0===i||i.on("connect",this._onConnect),null===(n=this._client)||void 0===n||n.on("reconnect",this._onReconnect),null===(r=this._client)||void 0===r||r.on("message",this._onMessage),null===(o=this._client)||void 0===o||o.on("error",this._onError),null===(l=this._client)||void 0===l||l.on("close",this._onClose))},n.prototype.publish=function(t,s,n){var r,o;void 0===n&&(n={}),(null===(r=this._client)||void 0===r?void 0:r.connected)?null===(o=this._client)||void 0===o||o.publish(t,s,e.__assign({qos:2},n),function(e,t){e&&console.log("MQTT发布失败",t)}):this._publishQueueList.set("".concat(t,"-").concat(i.UUID(8,16)),{topic:t,body:s,opt:n})},n.prototype.subscribe=function(e,t){var i,s,n=this;(null===(i=this._client)||void 0===i?void 0:i.connected)?null===(s=this._client)||void 0===s||s.subscribe(e,function(i,s){i?console.log("MQTT订阅失败",s):n._registerMessageHandlerMap.set(e,t)}):this._subscribeQueueList.set(e,{topic:e,callback:t})},n.prototype.unsubscribe=function(e){var t,i;(null===(t=this._client)||void 0===t?void 0:t.connected)?null===(i=this._client)||void 0===i||i.unsubscribe(e):this._unsubscribeQueueList.set(e,{topic:e})},n.prototype.destroyed=function(){var e;null===(e=this._client)||void 0===e||e.end(),this._publishQueueList.clear(),this._subscribeQueueList.clear(),this._unsubscribeQueueList.clear(),this._registerMessageHandlerMap.clear(),this._client=null,this._hasInit=!1},n.prototype._onConnect=function(){var t,i,s,n,r,o,l,u,c;try{for(var a=e.__values(this._subscribeQueueList),_=a.next();!_.done;_=a.next()){var h=e.__read(_.value,2),d=h[0],b=h[1];null===(l=this._client)||void 0===l||l.subscribe(b.topic,b.callback),this._subscribeQueueList.delete(d)}}catch(e){t={error:e}}finally{try{_&&!_.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}try{for(var p=e.__values(this._publishQueueList),v=p.next();!v.done;v=p.next()){var f=e.__read(v.value,2);d=f[0],b=f[1];null===(u=this._client)||void 0===u||u.publish(b.topic,b.body,e.__assign({qos:2},b.opt)),this._publishQueueList.delete(d)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(s)throw s.error}}try{for(var y=e.__values(this._unsubscribeQueueList),Q=y.next();!Q.done;Q=y.next()){var g=e.__read(Q.value,2);d=g[0],b=g[1];null===(c=this._client)||void 0===c||c.unsubscribe(b.topic),this._unsubscribeQueueList.delete(d),this._registerMessageHandlerMap.delete(d)}}catch(e){r={error:e}}finally{try{Q&&!Q.done&&(o=y.return)&&o.call(y)}finally{if(r)throw r.error}}console.log("MQTT连接成功")},n.prototype._onReconnect=function(){var t,i,s,n,r,o,l,u,c;try{for(var a=e.__values(this._subscribeQueueList),_=a.next();!_.done;_=a.next()){var h=e.__read(_.value,2),d=h[0],b=h[1];null===(l=this._client)||void 0===l||l.subscribe(b.topic),this._subscribeQueueList.delete(d)}}catch(e){t={error:e}}finally{try{_&&!_.done&&(i=a.return)&&i.call(a)}finally{if(t)throw t.error}}try{for(var p=e.__values(this._publishQueueList),v=p.next();!v.done;v=p.next()){var f=e.__read(v.value,2);d=f[0],b=f[1];null===(u=this._client)||void 0===u||u.publish(b.topic,b.body,e.__assign({qos:0},b.opt)),this._publishQueueList.delete(d)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(s)throw s.error}}try{for(var y=e.__values(this._unsubscribeQueueList),Q=y.next();!Q.done;Q=y.next()){var g=e.__read(Q.value,2);d=g[0],b=g[1];null===(c=this._client)||void 0===c||c.unsubscribe(b.topic),this._unsubscribeQueueList.delete(d),this._registerMessageHandlerMap.delete(d)}}catch(e){r={error:e}}finally{try{Q&&!Q.done&&(o=y.return)&&o.call(y)}finally{if(r)throw r.error}}console.log("MQTT重连成功")},n.prototype._onMessage=function(e,t){var i;null===(i=this._registerMessageHandlerMap.get(e))||void 0===i||i(t)},n.prototype._onClose=function(){console.log("MQTT关闭成功")},n.prototype._onError=function(e){console.log("MQTT连接失败",e)},n}();exports.MQTTClient=n;
|
package/dist/mqtt.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t,b as i}from"./commons/tslib.es6-BjAlDJRq.js";import{m as s}from"./commons/mqtt-ClqAR6Iy.js";import{UUID as n}from"./utils.mjs";var o={clean:!0,connectTimeout:1e4,resubscribe:!0,reconnectPeriod:1e4,keepalive:1},r=function(){function r(e,t){this._client=null,this._hasInit=!1,this._publishQueueList=new Map,this._subscribeQueueList=new Map,this._unsubscribeQueueList=new Map,this._registerMessageHandlerMap=new Map,this._url=e||"",this._options=t,this.init()}return r.prototype.init=function(){var t,i,n,r,l;this._hasInit||(this._client=s.connect(this._url,e(e({},o),this._options)),this._hasInit=!0,null===(t=this._client)||void 0===t||t.on("connect",this._onConnect),null===(i=this._client)||void 0===i||i.on("reconnect",this._onReconnect),null===(n=this._client)||void 0===n||n.on("message",this._onMessage),null===(r=this._client)||void 0===r||r.on("error",this._onError),null===(l=this._client)||void 0===l||l.on("close",this._onClose))},r.prototype.publish=function(t,i,s){var o,r;void 0===s&&(s={}),(null===(o=this._client)||void 0===o?void 0:o.connected)?null===(r=this._client)||void 0===r||r.publish(t,i,e({qos:2},s),function(e,t){e&&console.log("MQTT发布失败",t)}):this._publishQueueList.set("".concat(t,"-").concat(n(8,16)),{topic:t,body:i,opt:s})},r.prototype.subscribe=function(e,t){var i,s,n=this;(null===(i=this._client)||void 0===i?void 0:i.connected)?null===(s=this._client)||void 0===s||s.subscribe(e,function(i,s){i?console.log("MQTT订阅失败",s):n._registerMessageHandlerMap.set(e,t)}):this._subscribeQueueList.set(e,{topic:e,callback:t})},r.prototype.unsubscribe=function(e){var t,i;(null===(t=this._client)||void 0===t?void 0:t.connected)?null===(i=this._client)||void 0===i||i.unsubscribe(e):this._unsubscribeQueueList.set(e,{topic:e})},r.prototype.destroyed=function(){var e;null===(e=this._client)||void 0===e||e.end(),this._publishQueueList.clear(),this._subscribeQueueList.clear(),this._unsubscribeQueueList.clear(),this._registerMessageHandlerMap.clear(),this._client=null,this._hasInit=!1},r.prototype._onConnect=function(){var s,n,o,r,l,u,c,a,h;try{for(var _=t(this._subscribeQueueList),b=_.next();!b.done;b=_.next()){var p=i(b.value,2),d=p[0],v=p[1];null===(c=this._client)||void 0===c||c.subscribe(v.topic,v.callback),this._subscribeQueueList.delete(d)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(s)throw s.error}}try{for(var f=t(this._publishQueueList),y=f.next();!y.done;y=f.next()){var Q=i(y.value,2);d=Q[0],v=Q[1];null===(a=this._client)||void 0===a||a.publish(v.topic,v.body,e({qos:2},v.opt)),this._publishQueueList.delete(d)}}catch(e){o={error:e}}finally{try{y&&!y.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}try{for(var M=t(this._unsubscribeQueueList),g=M.next();!g.done;g=M.next()){var L=i(g.value,2);d=L[0],v=L[1];null===(h=this._client)||void 0===h||h.unsubscribe(v.topic),this._unsubscribeQueueList.delete(d),this._registerMessageHandlerMap.delete(d)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=M.return)&&u.call(M)}finally{if(l)throw l.error}}console.log("MQTT连接成功")},r.prototype._onReconnect=function(){var s,n,o,r,l,u,c,a,h;try{for(var _=t(this._subscribeQueueList),b=_.next();!b.done;b=_.next()){var p=i(b.value,2),d=p[0],v=p[1];null===(c=this._client)||void 0===c||c.subscribe(v.topic),this._subscribeQueueList.delete(d)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(n=_.return)&&n.call(_)}finally{if(s)throw s.error}}try{for(var f=t(this._publishQueueList),y=f.next();!y.done;y=f.next()){var Q=i(y.value,2);d=Q[0],v=Q[1];null===(a=this._client)||void 0===a||a.publish(v.topic,v.body,e({qos:0},v.opt)),this._publishQueueList.delete(d)}}catch(e){o={error:e}}finally{try{y&&!y.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}try{for(var M=t(this._unsubscribeQueueList),g=M.next();!g.done;g=M.next()){var L=i(g.value,2);d=L[0],v=L[1];null===(h=this._client)||void 0===h||h.unsubscribe(v.topic),this._unsubscribeQueueList.delete(d),this._registerMessageHandlerMap.delete(d)}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=M.return)&&u.call(M)}finally{if(l)throw l.error}}console.log("MQTT重连成功")},r.prototype._onMessage=function(e,t){var i;null===(i=this._registerMessageHandlerMap.get(e))||void 0===i||i(t)},r.prototype._onClose=function(){console.log("MQTT关闭成功")},r.prototype._onError=function(e){console.log("MQTT连接失败",e)},r}();export{r as MQTTClient};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface ColumnsType {
|
|
2
|
-
label: string;
|
|
3
|
-
field?: string;
|
|
4
|
-
children?: ColumnsType[];
|
|
5
|
-
}
|
|
6
|
-
interface ExcelXlsxOptions {
|
|
7
|
-
columns?: ColumnsType[];
|
|
8
|
-
data?: Record<string, any>[];
|
|
9
|
-
sheetName?: string;
|
|
10
|
-
fileName?: string;
|
|
11
|
-
fileType?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const exportExcelXlsx: (options?: ExcelXlsxOptions) => void;
|
|
14
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare class MQTTClient {
|
|
2
|
-
private _client;
|
|
3
|
-
private readonly _url;
|
|
4
|
-
private readonly _options?;
|
|
5
|
-
private _hasInit;
|
|
6
|
-
private _publishQueueList;
|
|
7
|
-
private _subscribeQueueList;
|
|
8
|
-
private _unsubscribeQueueList;
|
|
9
|
-
private _registerMessageHandlerMap;
|
|
10
|
-
constructor(url: string, options?: any);
|
|
11
|
-
private init;
|
|
12
|
-
publish(topic: string, body: any, opt?: any): void;
|
|
13
|
-
subscribe(topic: string, callback: any): void;
|
|
14
|
-
unsubscribe(topic: string): void;
|
|
15
|
-
destroyed(): void;
|
|
16
|
-
private _onConnect;
|
|
17
|
-
private _onReconnect;
|
|
18
|
-
private _onMessage;
|
|
19
|
-
private _onClose;
|
|
20
|
-
private _onError;
|
|
21
|
-
}
|
|
File without changes
|
|
File without changes
|