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

@imedx/ics-imedx-core

Package Overview
Dependencies
Maintainers
15
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imedx/ics-imedx-core - npm Package Compare versions

Comparing version 0.0.1-beta.10 to 0.0.1-beta.11

2

dist/ics-imedx-core.es5.js

@@ -15,3 +15,3 @@ var t=function(){function t(){this.cache={}}return t.prototype.set=function(t,e,r){var n=(new Date).getTime()+1e3*r;this.cache[t]={value:e,expireAt:n}},t.prototype.get=function(t){var e=this.cache[t];return e&&e.expireAt>(new Date).getTime()?e.value:null},t.prototype.remove=function(t){delete this.cache[t]},t.prototype.clear=function(){this.cache={}},t}(),e=function(){return e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)};

and limitations under the License.
***************************************************************************** */function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{p(n.next(t))}catch(t){i(t)}}function s(t){try{p(n.throw(t))}catch(t){i(t)}}function p(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,s)}p((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=function(){function t(){this.interceptors=[]}return t.prototype.use=function(t,e){return this.interceptors.push({resolved:t,rejected:e}),this.interceptors.length-1},t.prototype.reject=function(t){this.interceptors[t]&&(this.interceptors[t]=null)},t}(),i=new(function(){function t(t){var r=void 0===t?{}:t,n=r.headers,i=void 0===n?{}:n,a=r.fetch;this._baseAjaxUrl="http://icreate.com/",this.isChromely=!!window.CefSharp,this.headers=e({},i),this.fetch=a||window.fetch.bind(window),this.interceptors={request:new o,response:new o},this.interceptors.response.use((function(t){return 200===t.code?Promise.resolve(t.data):Promise.reject(t)}))}return t.prototype.command=function(t){return r(this,void 0,void 0,(function(){var e,r;return n(this,(function(n){switch(n.label){case 0:return this.isChromely?window.IMedxAsync?[3,2]:[4,window.CefSharp.BindObjectAsync("IMedxAsync")]:[3,4];case 1:n.sent(),n.label=2;case 2:for(r in e=[],t.data)e.push(r+"="+t.data[r]);return[4,IMedxAsync.command(t.url+(e.length>0?"?"+e.join("&"):""))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}))},t.prototype.function=function(t){return r(this,void 0,void 0,(function(){var o,i,a,s,p,u=this;return n(this,(function(c){for(o=[{resolved:function(o){var i,a;if(!u.isChromely)return Promise.reject({code:500,message:"浏览器下暂时不支持,正在适配中...",data:null});var s=e(e({},o),t);if(s.headers?s.headers["Content-Type"]=s.headers["Content-Type"]||"application/json":s.headers={"Content-Type":"application/json"},"GET"===(null===(i=null==t?void 0:t.method)||void 0===i?void 0:i.toUpperCase())||"HEAD"===(null===(a=null==t?void 0:t.method)||void 0===a?void 0:a.toUpperCase())){var p=[];for(var c in t.data)p.push(c+"="+t.data[c]);t.url=t.url+(p.length>0?"?"+p.join("&"):"")}else"application/json"===s.headers["Content-Type"]?s.body=JSON.stringify(t.data):s.body=t.data;var h=o.fetch(""+o._baseAjaxUrl+t.url.replace(/^\/+/,""),s).then((function(t){return r(u,void 0,void 0,(function(){var e,r,o,i,a;return n(this,(function(n){switch(n.label){case 0:return t.ok?"application/json"!==t.headers.get("Content-Type")?[3,2]:(r=(e=JSON).parse,[4,t.text()]):[3,5];case 1:return[2,r.apply(e,[n.sent()])];case 2:return o={code:200,message:"ok"},[4,t.blob()];case 3:return[2,(o.data=n.sent(),o)];case 4:return[3,7];case 5:return i=null,[4,t.text()];case 6:a=n.sent();try{i=JSON.parse(a)}catch(t){i={message:a}}return[2,Promise.reject(i)];case 7:return[2]}}))}))}));return h},rejected:void 0}],this.interceptors.request.interceptors.forEach((function(t){null!==t&&o.unshift(t)})),this.interceptors.response.interceptors.forEach((function(t){null!==t&&o.push(t)})),i=Promise.resolve(e({},this));o.length;)a=o.shift(),s=a.resolved,p=a.rejected,i=i.then(s,p);return[2,i]}))}))},t}()),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},s=function(){function t(){this.instanceId=(new Date).getTime().toString()}return t.prototype.OperateEx=function(t,e,r){return void 0===r&&(r="GET"),i.function({url:"Report/".concat(t),method:r,data:a(a({},e),{instanceId:this.instanceId})})},t.prototype.clearData=function(){return this.OperateEx("ClearData")},t.prototype.registerData=function(t,e,r){return this.OperateEx("RegisterData",{name:t,data:JSON.stringify(e),field:JSON.stringify(r||{})},"POST")},t.prototype.doublePass=function(t){return this.OperateEx("DoublePass",{value:t})},t.prototype.load=function(t){return this.OperateEx("Load",{fileName:t})},t.prototype.loadFromId=function(t){return this.OperateEx("LoadFromId",{reportId:t})},t.prototype.ExportToPdf=function(t){return t?this.OperateEx("ExportToPdf",{fileName:t}):this.OperateEx("ExportToPdfStream",null,"GET")},t.prototype.exportToHtml=function(t){return this.OperateEx("ExportToHtml",{fileName:t})},t.prototype.prepare=function(t){return void 0===t&&(t=!1),this.OperateEx("Prepare",{append:t})},t.prototype.addParameter=function(t,e){return this.OperateEx("AddParameter",{name:t,value:e})},t.prototype.design=function(){return this.OperateEx("Design")},t.prototype.show=function(t){return this.OperateEx("Show",{printerName:null!=t?t:""})},t.prototype.showPrepared=function(t){return this.OperateEx("ShowPrepared",{printerName:null!=t?t:""})},t.prototype.print=function(t){return this.OperateEx("Print",{printerName:null!=t?t:""})},t.prototype.printPrepared=function(t){return this.OperateEx("PrintPrepared",{printerName:null!=t?t:""})},t.prototype.dispose=function(){return this.OperateEx("Dispose")},t}(),p=function(){function e(){this.__cache=new t,this.__reprot__=new s,this.printName=""}return e.prototype.getPrinterName=function(t,e){var r=this;if(void 0===e&&(e=43200),!t)return Promise.reject("打印报表名称不存在!");var n=this.__cache.get(t),o=sessionStorage.getItem("clientInfo"),i=null;return o&&(i=JSON.parse(o).id),n?Promise.resolve(n):l.request({url:"interface-platform/frx/printer/get",method:"post",data:{clientId:l.clientInfo.id||i,reportName:t}}).then((function(n){return r.__cache.set(t,n.data.name,e),Promise.resolve(n.data.name)}))},e.prototype.clearData=function(){return this.__reprot__.clearData()},e.prototype.registerData=function(t,e,r){return this.__reprot__.registerData(t,e,r)},e.prototype.doublePass=function(t){return this.__reprot__.doublePass(t)},e.prototype.load=function(t){var e=this;return this.getPrinterName(t.replace(".frx","")).then((function(r){return e.printName=r,e.__reprot__.load(t)}))},e.prototype.loadFromId=function(t){var e=this;return this.getPrinterName(t).then((function(r){return e.printName=r,e.__reprot__.loadFromId(t)}))},e.prototype.ExportToPdf=function(t){return this.__reprot__.ExportToPdf(t)},e.prototype.exportToHtml=function(t){return this.__reprot__.exportToHtml(t)},e.prototype.prepare=function(t){return this.__reprot__.prepare(t)},e.prototype.addParameter=function(t,e){return this.__reprot__.addParameter(t,e)},e.prototype.design=function(){return this.__reprot__.design()},e.prototype.show=function(t){return this.__reprot__.show(t||this.printName)},e.prototype.showPrepared=function(t){return this.__reprot__.showPrepared(t||this.printName)},e.prototype.print=function(t){return this.__reprot__.print(t||this.printName)},e.prototype.printPrepared=function(t){return this.__reprot__.printPrepared(t||this.printName)},e.prototype.dispose=function(){return this.printName="",this.__reprot__.dispose()},e}(),u=function(){this.Report=p},c=function(){function e(){this.__cache=new t}return e.prototype.get=function(t,e){var r=this;if(!t)return Promise.reject("参数代码不存在!");var n=this.__cache.get(t);return n?Promise.resolve(n):l.request({url:"basic/param/value/list",method:"post",data:[{code:t}]}).then((function(n){return r.__cache.set(t,n.data[0],e),Promise.resolve(n.data[0])}))},e.prototype.getTradeChannel=function(t,e){var r=this,n="__TRADE_CHANNEL",o=this.__cache.get(n);return o?Promise.resolve(o):l.request({url:"/account/trade-channel/list?tradeType=".concat(t),method:"post"}).then((function(t){return r.__cache.set(n,t.data,e),Promise.resolve(t.data)}))},e}(),h=function(){this.param=new c},l=function(){function t(){}return t.use=function(t){var e=t.request;this.request=e},t.setClient=function(t){this.clientInfo=t},t.setUser=function(t){this.userInfo=t},t.request={},t.system=new h,t.client=new u,t}();export{l as default};
***************************************************************************** */function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{p(n.next(t))}catch(t){i(t)}}function s(t){try{p(n.throw(t))}catch(t){i(t)}}function p(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,s)}p((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=function(){function t(){this.interceptors=[]}return t.prototype.use=function(t,e){return this.interceptors.push({resolved:t,rejected:e}),this.interceptors.length-1},t.prototype.reject=function(t){this.interceptors[t]&&(this.interceptors[t]=null)},t}(),i=new(function(){function t(t){var r=void 0===t?{}:t,n=r.headers,i=void 0===n?{}:n,a=r.fetch;this._baseAjaxUrl="http://icreate.com/",this.isChromely=!!window.CefSharp,this.headers=e({},i),this.fetch=a||window.fetch.bind(window),this.interceptors={request:new o,response:new o},this.interceptors.response.use((function(t){return 200===t.code?Promise.resolve(t.data):Promise.reject(t)}))}return t.prototype.command=function(t){return r(this,void 0,void 0,(function(){var e,r;return n(this,(function(n){switch(n.label){case 0:return this.isChromely?window.IMedxAsync?[3,2]:[4,window.CefSharp.BindObjectAsync("IMedxAsync")]:[3,4];case 1:n.sent(),n.label=2;case 2:for(r in e=[],t.data)e.push(r+"="+t.data[r]);return[4,IMedxAsync.command(t.url+(e.length>0?"?"+e.join("&"):""))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}))},t.prototype.function=function(t){return r(this,void 0,void 0,(function(){var o,i,a,s,p,u=this;return n(this,(function(c){for(o=[{resolved:function(o){var i,a;if(!u.isChromely)return Promise.reject({code:500,message:"浏览器下暂时不支持,正在适配中...",data:null});var s=e(e({},o),t);if(s.headers?s.headers["Content-Type"]=s.headers["Content-Type"]||"application/json":s.headers={"Content-Type":"application/json"},"GET"===(null===(i=null==t?void 0:t.method)||void 0===i?void 0:i.toUpperCase())||"HEAD"===(null===(a=null==t?void 0:t.method)||void 0===a?void 0:a.toUpperCase())){var p=[];for(var c in t.data)p.push(c+"="+t.data[c]);t.url=t.url+(p.length>0?"?"+p.join("&"):"")}else"application/json"===s.headers["Content-Type"]?s.body=JSON.stringify(t.data):s.body=t.data;var h=o.fetch(""+o._baseAjaxUrl+t.url.replace(/^\/+/,""),s).then((function(t){return r(u,void 0,void 0,(function(){var e,r,o,i,a;return n(this,(function(n){switch(n.label){case 0:return t.ok?"application/json"!==t.headers.get("Content-Type")?[3,2]:(r=(e=JSON).parse,[4,t.text()]):[3,5];case 1:return[2,r.apply(e,[n.sent()])];case 2:return o={code:200,message:"ok"},[4,t.blob()];case 3:return[2,(o.data=n.sent(),o)];case 4:return[3,7];case 5:return i=null,[4,t.text()];case 6:a=n.sent();try{i=JSON.parse(a)}catch(t){i={message:a}}return[2,Promise.reject(i)];case 7:return[2]}}))}))}));return h},rejected:void 0}],this.interceptors.request.interceptors.forEach((function(t){null!==t&&o.unshift(t)})),this.interceptors.response.interceptors.forEach((function(t){null!==t&&o.push(t)})),i=Promise.resolve(e({},this));o.length;)a=o.shift(),s=a.resolved,p=a.rejected,i=i.then(s,p);return[2,i]}))}))},t}()),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},s=function(){function t(){this.instanceId=(new Date).getTime().toString()}return t.prototype.OperateEx=function(t,e,r){return void 0===r&&(r="GET"),i.function({url:"Report/".concat(t),method:r,data:a(a({},e),{instanceId:this.instanceId})})},t.prototype.clearData=function(){return this.OperateEx("ClearData")},t.prototype.registerData=function(t,e,r){return this.OperateEx("RegisterData",{name:t,data:JSON.stringify(e),field:JSON.stringify(r||{})},"POST")},t.prototype.doublePass=function(t){return this.OperateEx("DoublePass",{value:t})},t.prototype.load=function(t){return this.OperateEx("Load",{fileName:t})},t.prototype.loadFromId=function(t){return this.OperateEx("LoadFromId",{reportId:t})},t.prototype.ExportToPdf=function(t){return t?this.OperateEx("ExportToPdf",{fileName:t}):this.OperateEx("ExportToPdfStream",null,"GET")},t.prototype.exportToHtml=function(t){return this.OperateEx("ExportToHtml",{fileName:t})},t.prototype.prepare=function(t){return void 0===t&&(t=!1),this.OperateEx("Prepare",{append:t})},t.prototype.addParameter=function(t,e){return this.OperateEx("AddParameter",{name:t,value:e})},t.prototype.design=function(){return this.OperateEx("Design")},t.prototype.show=function(t){return this.OperateEx("Show",{printerName:null!=t?t:""})},t.prototype.showPrepared=function(t){return this.OperateEx("ShowPrepared",{printerName:null!=t?t:""})},t.prototype.print=function(t){return this.OperateEx("Print",{printerName:null!=t?t:""})},t.prototype.printPrepared=function(t){return this.OperateEx("PrintPrepared",{printerName:null!=t?t:""})},t.prototype.dispose=function(){return this.OperateEx("Dispose")},t}(),p=function(){function e(){this.__cache=new t,this.__reprot__=new s,this.printName=""}return e.prototype.getPrinterName=function(t,e){var r,n=this;if(void 0===e&&(e=43200),!t)return Promise.reject("打印报表名称不存在!");var o=this.__cache.get(t),i=sessionStorage.getItem("clientInfo"),a=null;return i&&(a=JSON.parse(i).id),o?Promise.resolve(o):l.request({url:"interface-platform/frx/printer/get",method:"post",data:{clientId:(null===(r=l.clientInfo)||void 0===r?void 0:r.id)||a,reportName:t}}).then((function(r){return n.__cache.set(t,r.data.name,e),Promise.resolve(r.data.name)}))},e.prototype.clearData=function(){return this.__reprot__.clearData()},e.prototype.registerData=function(t,e,r){return this.__reprot__.registerData(t,e,r)},e.prototype.doublePass=function(t){return this.__reprot__.doublePass(t)},e.prototype.load=function(t){var e=this;return this.getPrinterName(t.replace(".frx","")).then((function(r){return e.printName=r,e.__reprot__.load(t)}))},e.prototype.loadFromId=function(t){var e=this;return this.getPrinterName(t).then((function(r){return e.printName=r,e.__reprot__.loadFromId(t)}))},e.prototype.ExportToPdf=function(t){return this.__reprot__.ExportToPdf(t)},e.prototype.exportToHtml=function(t){return this.__reprot__.exportToHtml(t)},e.prototype.prepare=function(t){return this.__reprot__.prepare(t)},e.prototype.addParameter=function(t,e){return this.__reprot__.addParameter(t,e)},e.prototype.design=function(){return this.__reprot__.design()},e.prototype.show=function(t){return this.__reprot__.show(t||this.printName)},e.prototype.showPrepared=function(t){return this.__reprot__.showPrepared(t||this.printName)},e.prototype.print=function(t){return this.__reprot__.print(t||this.printName)},e.prototype.printPrepared=function(t){return this.__reprot__.printPrepared(t||this.printName)},e.prototype.dispose=function(){return this.printName="",this.__reprot__.dispose()},e}(),u=function(){this.Report=p},c=function(){function e(){this.__cache=new t}return e.prototype.get=function(t,e){var r=this;if(!t)return Promise.reject("参数代码不存在!");var n=this.__cache.get(t);return n?Promise.resolve(n):l.request({url:"basic/param/value/list",method:"post",data:[{code:t}]}).then((function(n){return r.__cache.set(t,n.data[0],e),Promise.resolve(n.data[0])}))},e.prototype.getTradeChannel=function(t,e){var r=this,n="__TRADE_CHANNEL",o=this.__cache.get(n);return o?Promise.resolve(o):l.request({url:"/account/trade-channel/list?tradeType=".concat(t),method:"post"}).then((function(t){return r.__cache.set(n,t.data,e),Promise.resolve(t.data)}))},e}(),h=function(){this.param=new c},l=function(){function t(){}return t.use=function(t){var e=t.request;this.request=e},t.setClient=function(t){this.clientInfo=t},t.setUser=function(t){this.userInfo=t},t.request={},t.system=new h,t.client=new u,t}();export{l as default};
//# sourceMappingURL=ics-imedx-core.es5.js.map

@@ -15,3 +15,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).icsImedxCore=e()}(this,(function(){"use strict";var t=function(){function t(){this.cache={}}return t.prototype.set=function(t,e,r){var n=(new Date).getTime()+1e3*r;this.cache[t]={value:e,expireAt:n}},t.prototype.get=function(t){var e=this.cache[t];return e&&e.expireAt>(new Date).getTime()?e.value:null},t.prototype.remove=function(t){delete this.cache[t]},t.prototype.clear=function(){this.cache={}},t}(),e=function(){return e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)};

and limitations under the License.
***************************************************************************** */function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{p(n.next(t))}catch(t){i(t)}}function s(t){try{p(n.throw(t))}catch(t){i(t)}}function p(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,s)}p((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=function(){function t(){this.interceptors=[]}return t.prototype.use=function(t,e){return this.interceptors.push({resolved:t,rejected:e}),this.interceptors.length-1},t.prototype.reject=function(t){this.interceptors[t]&&(this.interceptors[t]=null)},t}(),i=new(function(){function t(t){var r=void 0===t?{}:t,n=r.headers,i=void 0===n?{}:n,a=r.fetch;this._baseAjaxUrl="http://icreate.com/",this.isChromely=!!window.CefSharp,this.headers=e({},i),this.fetch=a||window.fetch.bind(window),this.interceptors={request:new o,response:new o},this.interceptors.response.use((function(t){return 200===t.code?Promise.resolve(t.data):Promise.reject(t)}))}return t.prototype.command=function(t){return r(this,void 0,void 0,(function(){var e,r;return n(this,(function(n){switch(n.label){case 0:return this.isChromely?window.IMedxAsync?[3,2]:[4,window.CefSharp.BindObjectAsync("IMedxAsync")]:[3,4];case 1:n.sent(),n.label=2;case 2:for(r in e=[],t.data)e.push(r+"="+t.data[r]);return[4,IMedxAsync.command(t.url+(e.length>0?"?"+e.join("&"):""))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}))},t.prototype.function=function(t){return r(this,void 0,void 0,(function(){var o,i,a,s,p,u=this;return n(this,(function(c){for(o=[{resolved:function(o){var i,a;if(!u.isChromely)return Promise.reject({code:500,message:"浏览器下暂时不支持,正在适配中...",data:null});var s=e(e({},o),t);if(s.headers?s.headers["Content-Type"]=s.headers["Content-Type"]||"application/json":s.headers={"Content-Type":"application/json"},"GET"===(null===(i=null==t?void 0:t.method)||void 0===i?void 0:i.toUpperCase())||"HEAD"===(null===(a=null==t?void 0:t.method)||void 0===a?void 0:a.toUpperCase())){var p=[];for(var c in t.data)p.push(c+"="+t.data[c]);t.url=t.url+(p.length>0?"?"+p.join("&"):"")}else"application/json"===s.headers["Content-Type"]?s.body=JSON.stringify(t.data):s.body=t.data;var h=o.fetch(""+o._baseAjaxUrl+t.url.replace(/^\/+/,""),s).then((function(t){return r(u,void 0,void 0,(function(){var e,r,o,i,a;return n(this,(function(n){switch(n.label){case 0:return t.ok?"application/json"!==t.headers.get("Content-Type")?[3,2]:(r=(e=JSON).parse,[4,t.text()]):[3,5];case 1:return[2,r.apply(e,[n.sent()])];case 2:return o={code:200,message:"ok"},[4,t.blob()];case 3:return[2,(o.data=n.sent(),o)];case 4:return[3,7];case 5:return i=null,[4,t.text()];case 6:a=n.sent();try{i=JSON.parse(a)}catch(t){i={message:a}}return[2,Promise.reject(i)];case 7:return[2]}}))}))}));return h},rejected:void 0}],this.interceptors.request.interceptors.forEach((function(t){null!==t&&o.unshift(t)})),this.interceptors.response.interceptors.forEach((function(t){null!==t&&o.push(t)})),i=Promise.resolve(e({},this));o.length;)a=o.shift(),s=a.resolved,p=a.rejected,i=i.then(s,p);return[2,i]}))}))},t}()),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},s=function(){function t(){this.instanceId=(new Date).getTime().toString()}return t.prototype.OperateEx=function(t,e,r){return void 0===r&&(r="GET"),i.function({url:"Report/".concat(t),method:r,data:a(a({},e),{instanceId:this.instanceId})})},t.prototype.clearData=function(){return this.OperateEx("ClearData")},t.prototype.registerData=function(t,e,r){return this.OperateEx("RegisterData",{name:t,data:JSON.stringify(e),field:JSON.stringify(r||{})},"POST")},t.prototype.doublePass=function(t){return this.OperateEx("DoublePass",{value:t})},t.prototype.load=function(t){return this.OperateEx("Load",{fileName:t})},t.prototype.loadFromId=function(t){return this.OperateEx("LoadFromId",{reportId:t})},t.prototype.ExportToPdf=function(t){return t?this.OperateEx("ExportToPdf",{fileName:t}):this.OperateEx("ExportToPdfStream",null,"GET")},t.prototype.exportToHtml=function(t){return this.OperateEx("ExportToHtml",{fileName:t})},t.prototype.prepare=function(t){return void 0===t&&(t=!1),this.OperateEx("Prepare",{append:t})},t.prototype.addParameter=function(t,e){return this.OperateEx("AddParameter",{name:t,value:e})},t.prototype.design=function(){return this.OperateEx("Design")},t.prototype.show=function(t){return this.OperateEx("Show",{printerName:null!=t?t:""})},t.prototype.showPrepared=function(t){return this.OperateEx("ShowPrepared",{printerName:null!=t?t:""})},t.prototype.print=function(t){return this.OperateEx("Print",{printerName:null!=t?t:""})},t.prototype.printPrepared=function(t){return this.OperateEx("PrintPrepared",{printerName:null!=t?t:""})},t.prototype.dispose=function(){return this.OperateEx("Dispose")},t}(),p=function(){function e(){this.__cache=new t,this.__reprot__=new s,this.printName=""}return e.prototype.getPrinterName=function(t,e){var r=this;if(void 0===e&&(e=43200),!t)return Promise.reject("打印报表名称不存在!");var n=this.__cache.get(t),o=sessionStorage.getItem("clientInfo"),i=null;return o&&(i=JSON.parse(o).id),n?Promise.resolve(n):l.request({url:"interface-platform/frx/printer/get",method:"post",data:{clientId:l.clientInfo.id||i,reportName:t}}).then((function(n){return r.__cache.set(t,n.data.name,e),Promise.resolve(n.data.name)}))},e.prototype.clearData=function(){return this.__reprot__.clearData()},e.prototype.registerData=function(t,e,r){return this.__reprot__.registerData(t,e,r)},e.prototype.doublePass=function(t){return this.__reprot__.doublePass(t)},e.prototype.load=function(t){var e=this;return this.getPrinterName(t.replace(".frx","")).then((function(r){return e.printName=r,e.__reprot__.load(t)}))},e.prototype.loadFromId=function(t){var e=this;return this.getPrinterName(t).then((function(r){return e.printName=r,e.__reprot__.loadFromId(t)}))},e.prototype.ExportToPdf=function(t){return this.__reprot__.ExportToPdf(t)},e.prototype.exportToHtml=function(t){return this.__reprot__.exportToHtml(t)},e.prototype.prepare=function(t){return this.__reprot__.prepare(t)},e.prototype.addParameter=function(t,e){return this.__reprot__.addParameter(t,e)},e.prototype.design=function(){return this.__reprot__.design()},e.prototype.show=function(t){return this.__reprot__.show(t||this.printName)},e.prototype.showPrepared=function(t){return this.__reprot__.showPrepared(t||this.printName)},e.prototype.print=function(t){return this.__reprot__.print(t||this.printName)},e.prototype.printPrepared=function(t){return this.__reprot__.printPrepared(t||this.printName)},e.prototype.dispose=function(){return this.printName="",this.__reprot__.dispose()},e}(),u=function(){this.Report=p},c=function(){function e(){this.__cache=new t}return e.prototype.get=function(t,e){var r=this;if(!t)return Promise.reject("参数代码不存在!");var n=this.__cache.get(t);return n?Promise.resolve(n):l.request({url:"basic/param/value/list",method:"post",data:[{code:t}]}).then((function(n){return r.__cache.set(t,n.data[0],e),Promise.resolve(n.data[0])}))},e.prototype.getTradeChannel=function(t,e){var r=this,n="__TRADE_CHANNEL",o=this.__cache.get(n);return o?Promise.resolve(o):l.request({url:"/account/trade-channel/list?tradeType=".concat(t),method:"post"}).then((function(t){return r.__cache.set(n,t.data,e),Promise.resolve(t.data)}))},e}(),h=function(){this.param=new c},l=function(){function t(){}return t.use=function(t){var e=t.request;this.request=e},t.setClient=function(t){this.clientInfo=t},t.setUser=function(t){this.userInfo=t},t.request={},t.system=new h,t.client=new u,t}();return l}));
***************************************************************************** */function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{p(n.next(t))}catch(t){i(t)}}function s(t){try{p(n.throw(t))}catch(t){i(t)}}function p(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,s)}p((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o=function(){function t(){this.interceptors=[]}return t.prototype.use=function(t,e){return this.interceptors.push({resolved:t,rejected:e}),this.interceptors.length-1},t.prototype.reject=function(t){this.interceptors[t]&&(this.interceptors[t]=null)},t}(),i=new(function(){function t(t){var r=void 0===t?{}:t,n=r.headers,i=void 0===n?{}:n,a=r.fetch;this._baseAjaxUrl="http://icreate.com/",this.isChromely=!!window.CefSharp,this.headers=e({},i),this.fetch=a||window.fetch.bind(window),this.interceptors={request:new o,response:new o},this.interceptors.response.use((function(t){return 200===t.code?Promise.resolve(t.data):Promise.reject(t)}))}return t.prototype.command=function(t){return r(this,void 0,void 0,(function(){var e,r;return n(this,(function(n){switch(n.label){case 0:return this.isChromely?window.IMedxAsync?[3,2]:[4,window.CefSharp.BindObjectAsync("IMedxAsync")]:[3,4];case 1:n.sent(),n.label=2;case 2:for(r in e=[],t.data)e.push(r+"="+t.data[r]);return[4,IMedxAsync.command(t.url+(e.length>0?"?"+e.join("&"):""))];case 3:n.sent(),n.label=4;case 4:return[2]}}))}))},t.prototype.function=function(t){return r(this,void 0,void 0,(function(){var o,i,a,s,p,u=this;return n(this,(function(c){for(o=[{resolved:function(o){var i,a;if(!u.isChromely)return Promise.reject({code:500,message:"浏览器下暂时不支持,正在适配中...",data:null});var s=e(e({},o),t);if(s.headers?s.headers["Content-Type"]=s.headers["Content-Type"]||"application/json":s.headers={"Content-Type":"application/json"},"GET"===(null===(i=null==t?void 0:t.method)||void 0===i?void 0:i.toUpperCase())||"HEAD"===(null===(a=null==t?void 0:t.method)||void 0===a?void 0:a.toUpperCase())){var p=[];for(var c in t.data)p.push(c+"="+t.data[c]);t.url=t.url+(p.length>0?"?"+p.join("&"):"")}else"application/json"===s.headers["Content-Type"]?s.body=JSON.stringify(t.data):s.body=t.data;var h=o.fetch(""+o._baseAjaxUrl+t.url.replace(/^\/+/,""),s).then((function(t){return r(u,void 0,void 0,(function(){var e,r,o,i,a;return n(this,(function(n){switch(n.label){case 0:return t.ok?"application/json"!==t.headers.get("Content-Type")?[3,2]:(r=(e=JSON).parse,[4,t.text()]):[3,5];case 1:return[2,r.apply(e,[n.sent()])];case 2:return o={code:200,message:"ok"},[4,t.blob()];case 3:return[2,(o.data=n.sent(),o)];case 4:return[3,7];case 5:return i=null,[4,t.text()];case 6:a=n.sent();try{i=JSON.parse(a)}catch(t){i={message:a}}return[2,Promise.reject(i)];case 7:return[2]}}))}))}));return h},rejected:void 0}],this.interceptors.request.interceptors.forEach((function(t){null!==t&&o.unshift(t)})),this.interceptors.response.interceptors.forEach((function(t){null!==t&&o.push(t)})),i=Promise.resolve(e({},this));o.length;)a=o.shift(),s=a.resolved,p=a.rejected,i=i.then(s,p);return[2,i]}))}))},t}()),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)},s=function(){function t(){this.instanceId=(new Date).getTime().toString()}return t.prototype.OperateEx=function(t,e,r){return void 0===r&&(r="GET"),i.function({url:"Report/".concat(t),method:r,data:a(a({},e),{instanceId:this.instanceId})})},t.prototype.clearData=function(){return this.OperateEx("ClearData")},t.prototype.registerData=function(t,e,r){return this.OperateEx("RegisterData",{name:t,data:JSON.stringify(e),field:JSON.stringify(r||{})},"POST")},t.prototype.doublePass=function(t){return this.OperateEx("DoublePass",{value:t})},t.prototype.load=function(t){return this.OperateEx("Load",{fileName:t})},t.prototype.loadFromId=function(t){return this.OperateEx("LoadFromId",{reportId:t})},t.prototype.ExportToPdf=function(t){return t?this.OperateEx("ExportToPdf",{fileName:t}):this.OperateEx("ExportToPdfStream",null,"GET")},t.prototype.exportToHtml=function(t){return this.OperateEx("ExportToHtml",{fileName:t})},t.prototype.prepare=function(t){return void 0===t&&(t=!1),this.OperateEx("Prepare",{append:t})},t.prototype.addParameter=function(t,e){return this.OperateEx("AddParameter",{name:t,value:e})},t.prototype.design=function(){return this.OperateEx("Design")},t.prototype.show=function(t){return this.OperateEx("Show",{printerName:null!=t?t:""})},t.prototype.showPrepared=function(t){return this.OperateEx("ShowPrepared",{printerName:null!=t?t:""})},t.prototype.print=function(t){return this.OperateEx("Print",{printerName:null!=t?t:""})},t.prototype.printPrepared=function(t){return this.OperateEx("PrintPrepared",{printerName:null!=t?t:""})},t.prototype.dispose=function(){return this.OperateEx("Dispose")},t}(),p=function(){function e(){this.__cache=new t,this.__reprot__=new s,this.printName=""}return e.prototype.getPrinterName=function(t,e){var r,n=this;if(void 0===e&&(e=43200),!t)return Promise.reject("打印报表名称不存在!");var o=this.__cache.get(t),i=sessionStorage.getItem("clientInfo"),a=null;return i&&(a=JSON.parse(i).id),o?Promise.resolve(o):l.request({url:"interface-platform/frx/printer/get",method:"post",data:{clientId:(null===(r=l.clientInfo)||void 0===r?void 0:r.id)||a,reportName:t}}).then((function(r){return n.__cache.set(t,r.data.name,e),Promise.resolve(r.data.name)}))},e.prototype.clearData=function(){return this.__reprot__.clearData()},e.prototype.registerData=function(t,e,r){return this.__reprot__.registerData(t,e,r)},e.prototype.doublePass=function(t){return this.__reprot__.doublePass(t)},e.prototype.load=function(t){var e=this;return this.getPrinterName(t.replace(".frx","")).then((function(r){return e.printName=r,e.__reprot__.load(t)}))},e.prototype.loadFromId=function(t){var e=this;return this.getPrinterName(t).then((function(r){return e.printName=r,e.__reprot__.loadFromId(t)}))},e.prototype.ExportToPdf=function(t){return this.__reprot__.ExportToPdf(t)},e.prototype.exportToHtml=function(t){return this.__reprot__.exportToHtml(t)},e.prototype.prepare=function(t){return this.__reprot__.prepare(t)},e.prototype.addParameter=function(t,e){return this.__reprot__.addParameter(t,e)},e.prototype.design=function(){return this.__reprot__.design()},e.prototype.show=function(t){return this.__reprot__.show(t||this.printName)},e.prototype.showPrepared=function(t){return this.__reprot__.showPrepared(t||this.printName)},e.prototype.print=function(t){return this.__reprot__.print(t||this.printName)},e.prototype.printPrepared=function(t){return this.__reprot__.printPrepared(t||this.printName)},e.prototype.dispose=function(){return this.printName="",this.__reprot__.dispose()},e}(),u=function(){this.Report=p},c=function(){function e(){this.__cache=new t}return e.prototype.get=function(t,e){var r=this;if(!t)return Promise.reject("参数代码不存在!");var n=this.__cache.get(t);return n?Promise.resolve(n):l.request({url:"basic/param/value/list",method:"post",data:[{code:t}]}).then((function(n){return r.__cache.set(t,n.data[0],e),Promise.resolve(n.data[0])}))},e.prototype.getTradeChannel=function(t,e){var r=this,n="__TRADE_CHANNEL",o=this.__cache.get(n);return o?Promise.resolve(o):l.request({url:"/account/trade-channel/list?tradeType=".concat(t),method:"post"}).then((function(t){return r.__cache.set(n,t.data,e),Promise.resolve(t.data)}))},e}(),h=function(){this.param=new c},l=function(){function t(){}return t.use=function(t){var e=t.request;this.request=e},t.setClient=function(t){this.clientInfo=t},t.setUser=function(t){this.userInfo=t},t.request={},t.system=new h,t.client=new u,t}();return l}));
//# sourceMappingURL=ics-imedx-core.umd.js.map

@@ -29,2 +29,3 @@ "use strict";

var _this = this;
var _a;
if (expirationTime === void 0) { expirationTime = 12 * 60 * 60; }

@@ -46,3 +47,3 @@ if (!name) {

data: {
clientId: imedx_1.default.clientInfo.id || clientId,
clientId: ((_a = imedx_1.default.clientInfo) === null || _a === void 0 ? void 0 : _a.id) || clientId,
reportName: name

@@ -49,0 +50,0 @@ }

@@ -6,3 +6,3 @@ {

"title": "iMedx",
"version": "0.0.1-beta.10",
"version": "0.0.1-beta.11",
"description": "iMedx核心功能js封装",

@@ -9,0 +9,0 @@ "author": "文贝",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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