@aiot-toolkit/shared-utils 1.0.19-beta.11 → 1.0.19-beta.12

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.
@@ -1,2 +1,2 @@
1
- "use strict";const vdom_pb=require("./vdom_pb");class AIOT{constructor(e){this.funcArr=[],this.chld=[],this.idCount=-1,this.expCell=new vdom_pb.ExportCell,this.aiotf=e,this.optArr=[]}init(e){this.expCell.setTagname(e)}parseObj(e){let t=new vdom_pb.StyleValueArr;for(let r in e){let s=new vdom_pb.StyleKey,i=new vdom_pb.OneStyleValue;s.setValue(r),i.setKey(s);let l=Object.prototype.toString.call(e[r]);if("[object Number]"===l)i.setDoublevl(e[r]);else if("[object String]"===l)i.setStringvl(e[r]);else if("[object Function]"===l)null==this.aiotf?(this.funcArr.push(e[r]),i.setFuncid(this.funcArr.length-1)):(this.aiotf.funcArr.push(e[r]),i.setFuncid(this.aiotf.funcArr.length-1));else if("[object Object]"===l){let t=new vdom_pb.StyleValueArr;t=this.parseObj(e[r]),i.setStylevlarr(t)}else if("[object Array]"===l){let t=new vdom_pb.StringArr;t.setStringvlarrList(e[r]),i.setStringarr(t)}else"[object Boolean]"===l&&i.setBoolvl(e[r]);t.addVlarr(i)}return t}__ce__(e,t,r){let s=new vdom_pb.TemplateOne,i=new vdom_pb.TemplateUnit;if(i.setType("__ce__"),i.setTag(e),Array.isArray(r)&&r.length>0){let e=[];for(let t in r)e.push(r[t].id_);s.setChldsidList(e)}s.setId(++this.idCount);let l=this.parseObj(t.__opts__);return i.setOptsarrList(l.getVlarrList()),s.setCv(i),this.expCell.addTemplatearr(s),{id_:this.idCount,aiot_:this}}__ci__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__ci__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT(this);l.funcArr=this.funcArr,l.optArr=this.optArr;let n=t(l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}return this.funcArr=l.aiotf.funcArr,r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cf__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cf__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,undefined,l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const t=function(e,t){return l.aiotf.funcArr};t.aiotfor=l,t.aiotfor.key=e.__opts__.key,t.aiotfor.value=e.__opts__.value,this.funcArr.push(t),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cc__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cc__"),s.setTag(e),r.setId(++this.idCount);let i=this.parseObj(t.__opts__);return s.setOptsarrList(i.getVlarrList()),r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cb__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cb__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const e=function(e){return l.aiotf.funcArr};e.aiotcb=l,this.funcArr.push(e),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}}module.exports=AIOT;
1
+ "use strict";const vdom_pb=require("./vdom_pb");class AIOT{constructor(e){this.funcArr=[],this.chld=[],this.idCount=-1,this.expCell=new vdom_pb.ExportCell,this.aiotf=e,this.optArr=[]}init(e){this.expCell.setTagname(e)}parseObj(e){let t=new vdom_pb.StyleValueArr;for(let r in e){let s=new vdom_pb.StyleKey,i=new vdom_pb.OneStyleValue;s.setValue(r),i.setKey(s);let l=Object.prototype.toString.call(e[r]);if("[object Number]"===l)i.setDoublevl(e[r]);else if("[object String]"===l)i.setStringvl(e[r]);else if("[object Function]"===l)null==this.aiotf?(this.funcArr.push(e[r]),i.setFuncid(this.funcArr.length-1)):(this.aiotf.funcArr.push(e[r]),i.setFuncid(this.aiotf.funcArr.length-1));else if("[object Object]"===l){let t=new vdom_pb.StyleValueArr;t=this.parseObj(e[r]),i.setStylevlarr(t)}else if("[object Array]"===l){let t=new vdom_pb.StringArr;t.setStringvlarrList(e[r]),i.setStringarr(t)}else"[object Boolean]"===l&&i.setBoolvl(e[r]);t.addVlarr(i)}return t}__cdc__(e,t,r){return this.__ce__(e,t,r,"__cdc__")}__ce__(e,t,r,s="__ce__"){let i=new vdom_pb.TemplateOne,l=new vdom_pb.TemplateUnit;if(l.setType(s),l.setTag(e),Array.isArray(r)&&r.length>0){let e=[];for(let t in r)e.push(r[t].id_);i.setChldsidList(e)}i.setId(++this.idCount);let n=this.parseObj(t.__opts__);return l.setOptsarrList(n.getVlarrList()),i.setCv(l),this.expCell.addTemplatearr(i),{id_:this.idCount,aiot_:this}}__ci__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__ci__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT(this);l.funcArr=this.funcArr,l.optArr=this.optArr;let n=t(l),_=Object.prototype.toString.call(n);if("[object Object]"===_)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===_)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}return this.funcArr=l.aiotf.funcArr,r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cf__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cf__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,undefined,l),_=Object.prototype.toString.call(n);if("[object Object]"===_)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===_)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const t=function(e,t){return l.aiotf.funcArr};t.aiotfor=l,t.aiotfor.key=e.__opts__.key,t.aiotfor.value=e.__opts__.value,this.funcArr.push(t),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cc__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cc__"),s.setTag(e),r.setId(++this.idCount);let i=this.parseObj(t.__opts__);return s.setOptsarrList(i.getVlarrList()),r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cb__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cb__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,l),_=Object.prototype.toString.call(n);if("[object Object]"===_)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===_)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const e=function(e){return l.aiotf.funcArr};e.aiotcb=l,this.funcArr.push(e),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}}module.exports=AIOT;
2
2
  //# sourceMappingURL=protobuf.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/shared-utils",
3
- "version": "1.0.19-beta.11",
3
+ "version": "1.0.19-beta.12",
4
4
  "description": "aiot shared utils",
5
5
  "engines": {
6
6
  "node": ">=8.0.0"
@@ -31,5 +31,5 @@
31
31
  "devDependencies": {
32
32
  "strip-ansi": "^5.2.0"
33
33
  },
34
- "gitHead": "f303e6f2676fd537fef791de0a4f3900759a39c0"
34
+ "gitHead": "3bfa667749aae34a13084484a11f9436d74aeca7"
35
35
  }