@ibiz-template/core 0.0.1-alpha.4 → 0.0.1-alpha.40

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.
Files changed (114) hide show
  1. package/dist/system/index.system.js +1 -0
  2. package/out/constant/http-status-message/http-status-message.d.ts +5 -0
  3. package/out/constant/http-status-message/http-status-message.d.ts.map +1 -0
  4. package/out/constant/http-status-message/http-status-message.js +20 -0
  5. package/out/constant/index.d.ts +4 -0
  6. package/out/constant/index.d.ts.map +1 -1
  7. package/out/constant/index.js +4 -0
  8. package/out/constant/login-mode/login-mode.d.ts +23 -0
  9. package/out/constant/login-mode/login-mode.d.ts.map +1 -0
  10. package/out/constant/login-mode/login-mode.js +24 -0
  11. package/out/constant/menu-permission-mode/menu-permission-mode.d.ts +23 -0
  12. package/out/constant/menu-permission-mode/menu-permission-mode.d.ts.map +1 -0
  13. package/out/constant/menu-permission-mode/menu-permission-mode.js +24 -0
  14. package/out/constant/util/util.d.ts +5 -0
  15. package/out/constant/util/util.d.ts.map +1 -0
  16. package/out/constant/util/util.js +5 -0
  17. package/out/context/index.d.ts +2 -39
  18. package/out/context/index.d.ts.map +1 -1
  19. package/out/context/index.js +34 -65
  20. package/out/environment/environment.d.ts.map +1 -1
  21. package/out/environment/environment.js +11 -1
  22. package/out/error/http-error/http-error.d.ts +18 -0
  23. package/out/error/http-error/http-error.d.ts.map +1 -0
  24. package/out/error/http-error/http-error.js +36 -0
  25. package/out/error/index.d.ts +3 -0
  26. package/out/error/index.d.ts.map +1 -0
  27. package/out/error/index.js +2 -0
  28. package/out/error/runtime-error/runtime-error.d.ts +15 -0
  29. package/out/error/runtime-error/runtime-error.d.ts.map +1 -0
  30. package/out/error/runtime-error/runtime-error.js +15 -0
  31. package/out/factory-center.d.ts +11 -0
  32. package/out/factory-center.d.ts.map +1 -0
  33. package/out/factory-center.js +10 -0
  34. package/out/ibizsys.d.ts +8 -1
  35. package/out/ibizsys.d.ts.map +1 -1
  36. package/out/ibizsys.js +8 -1
  37. package/out/index.d.ts +3 -1
  38. package/out/index.d.ts.map +1 -1
  39. package/out/index.js +3 -1
  40. package/out/install.d.ts.map +1 -1
  41. package/out/install.js +4 -2
  42. package/out/interface/click-outside/click-outside.d.ts +70 -0
  43. package/out/interface/click-outside/click-outside.d.ts.map +1 -0
  44. package/out/interface/click-outside/click-outside.js +1 -0
  45. package/out/interface/i-environment/i-environment.d.ts +76 -0
  46. package/out/interface/i-environment/i-environment.d.ts.map +1 -1
  47. package/out/interface/index.d.ts +1 -0
  48. package/out/interface/index.d.ts.map +1 -1
  49. package/out/interface/index.js +1 -1
  50. package/out/types.d.ts +20 -0
  51. package/out/types.d.ts.map +1 -1
  52. package/out/utils/click-outside/click-outside.d.ts +14 -0
  53. package/out/utils/click-outside/click-outside.d.ts.map +1 -0
  54. package/out/utils/click-outside/click-outside.js +85 -0
  55. package/out/utils/event/event.d.ts +34 -0
  56. package/out/utils/event/event.d.ts.map +1 -0
  57. package/out/utils/event/event.js +60 -0
  58. package/out/utils/index.d.ts +5 -1
  59. package/out/utils/index.d.ts.map +1 -1
  60. package/out/utils/index.js +5 -1
  61. package/out/utils/interceptor/core-interceptor.d.ts +15 -0
  62. package/out/utils/interceptor/core-interceptor.d.ts.map +1 -0
  63. package/out/utils/interceptor/core-interceptor.js +30 -0
  64. package/out/utils/interceptor/index.d.ts +3 -0
  65. package/out/utils/interceptor/index.d.ts.map +1 -0
  66. package/out/utils/interceptor/index.js +2 -0
  67. package/out/utils/interceptor/interceptor.d.ts +74 -3
  68. package/out/utils/interceptor/interceptor.d.ts.map +1 -1
  69. package/out/utils/interceptor/interceptor.js +73 -22
  70. package/out/utils/logger/logger.d.ts +3 -0
  71. package/out/utils/logger/logger.d.ts.map +1 -0
  72. package/out/utils/logger/logger.js +2 -0
  73. package/out/utils/net/http-response.d.ts +4 -9
  74. package/out/utils/net/http-response.d.ts.map +1 -1
  75. package/out/utils/net/http-response.js +0 -7
  76. package/out/utils/net/net.d.ts +82 -31
  77. package/out/utils/net/net.d.ts.map +1 -1
  78. package/out/utils/net/net.js +145 -50
  79. package/out/utils/url-helper/url-helper.d.ts +51 -0
  80. package/out/utils/url-helper/url-helper.d.ts.map +1 -0
  81. package/out/utils/url-helper/url-helper.js +59 -0
  82. package/out/utils/util/util.d.ts +45 -0
  83. package/out/utils/util/util.d.ts.map +1 -1
  84. package/out/utils/util/util.js +96 -0
  85. package/package.json +18 -7
  86. package/src/constant/http-status-message/http-status-message.ts +20 -0
  87. package/src/constant/index.ts +4 -0
  88. package/src/constant/login-mode/login-mode.ts +23 -0
  89. package/src/constant/menu-permission-mode/menu-permission-mode.ts +23 -0
  90. package/src/constant/util/util.ts +5 -0
  91. package/src/context/index.ts +35 -69
  92. package/src/environment/environment.ts +11 -1
  93. package/src/error/http-error/http-error.ts +43 -0
  94. package/src/error/index.ts +2 -0
  95. package/src/error/runtime-error/runtime-error.ts +14 -0
  96. package/src/factory-center.ts +9 -0
  97. package/src/ibizsys.ts +9 -1
  98. package/src/index.ts +3 -1
  99. package/src/install.ts +4 -2
  100. package/src/interface/click-outside/click-outside.ts +71 -0
  101. package/src/interface/i-environment/i-environment.ts +86 -0
  102. package/src/interface/index.ts +1 -0
  103. package/src/types.ts +21 -0
  104. package/src/utils/click-outside/click-outside.ts +110 -0
  105. package/src/utils/event/event.ts +77 -0
  106. package/src/utils/index.ts +5 -1
  107. package/src/utils/interceptor/core-interceptor.ts +35 -0
  108. package/src/utils/interceptor/index.ts +2 -0
  109. package/src/utils/interceptor/interceptor.ts +109 -22
  110. package/src/utils/logger/logger.ts +3 -0
  111. package/src/utils/net/http-response.ts +6 -9
  112. package/src/utils/net/net.ts +175 -61
  113. package/src/utils/url-helper/url-helper.ts +62 -0
  114. package/src/utils/util/util.ts +115 -0
@@ -0,0 +1 @@
1
+ System.register(["lodash-es","qx-util","axios","qs","pluralize"],(function(e){"use strict";var t,n,o,r,i,s,c;return{setters:[function(e){t=e.debounce,n=e.merge},function(e){o=e.getCookie,r=e.notNilEmpty},function(e){i=e.default},function(e){s=e.stringify},function(e){c=e.default}],execute:function(){function a(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}e({debounceAndAsyncMerge:function(e,n,o){var r,i=this,s=[],c=t((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return w(i,void 0,void 0,(function(){var n;return b(this,(function(o){switch(o.label){case 0:return r=void 0,[4,e.apply(void 0,R([],m(t),!1))];case 1:return n=o.sent(),s.forEach((function(e){e.resolve(n)})),s=[],[2,n]}}))}))}),o);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return w(i,void 0,void 0,(function(){var t;return b(this,(function(o){return t=e,r&&(t=n(r,t)),r=t,c.apply(void 0,R([],m(t),!1)),[2,new Promise((function(e,t){s.push({resolve:e,reject:t})}))]}))}))}},debounceAndMerge:function(e,n,o){var r,i=t((function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r=void 0,e.apply(void 0,R([],m(t),!1))}),o);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=e;return r&&(o=n(r,o)),r=o,i.apply(void 0,R([],m(o),!1))}},eventPath:I,getToken:E,install:function(){if(window.ibiz)throw new Error("ibiz 已经存在, 无需重复安装");window.ibiz=new q,window.___fc=new B,ibiz.net.addInterceptor("CoreInterceptor",new L)},isEventInside:N,isOverlap:function(e,t){return Array.from(new Set(R(R([],m(e),!1),m(t),!1))).length!==e.length+t.length},listenJSEvent:_,onClickOutside:function(e,t,n){void 0===n&&(n={});var o=n.window,r=void 0===o?M:o,i=n.ignore,s=void 0===i?[]:i,c=n.capture,a=void 0===c||c;if(!e)throw new y("target元素不存在");if(!r)throw new y("找不到window");var u,l=!0,f=function(t){return!R([e],m(s),!1).some((function(e){return N(t,e)}))},p=!1,h=function(e){p||(r.clearTimeout(u),l&&f(e)&&t(e))},d=[_(r,"click",h,{passive:!0,capture:a}),_(r,"pointerdown",(function(e){p||(l=f(e))}),{passive:!0}),_(r,"pointerup",(function(e){if(!p&&0===e.button){var t=I(e);e.composedPath=function(){return t},u=r.setTimeout((function(){return h(e)}),50)}}),{passive:!0})].filter(Boolean);return{stop:function(){return d.forEach((function(e){return e()}))},pause:function(){p=!0},proceed:function(){p=!1}}},plural:S,pluralLower:function(e){return S(e).toLowerCase()}});var u,l,f=e("CoreConst",function(){function e(){}return e.DEFAULT_MODEL_SERVICE_TAG="default",e.TOKEN="access_token",e}()),p=e("NOOP",(function(){})),h=e("HttpStatusMessageConst",{200:"服务器成功返回请求的数据。",201:"新建或修改数据成功。",202:"一个请求已经进入后台排队(异步任务)。",204:"删除数据成功。",400:"发出的请求有错误,服务器没有进行新建或修改数据的操作。",401:"用户没有权限(令牌、用户名、密码错误)。",403:"用户得到授权,但是访问是被禁止的。",404:"发出的请求针对的是不存在的记录,服务器没有进行操作。",406:"请求的格式不可得。",410:"请求的资源被永久删除,且不会再得到的。",422:"当创建一个对象时,发生一个验证错误。",500:"服务器发生错误,请检查服务器。",502:"网关错误。",503:"服务不可用,服务器暂时过载或维护。",504:"网关超时。"});e("LoginMode",u),function(e){e.DEFAULT="DEFAULT",e.CUSTOM="CUSTOM",e.CAS="CAS"}(u||e("LoginMode",u={})),e("MenuPermissionMode",l),function(e){e.MIXIN="MIXIN",e.RESOURCE="RESOURCE",e.RT="RT"}(l||e("MenuPermissionMode",l={}));e("IBizContext",(function(e,t){if(void 0===e&&(e={}),t){var n=this;Object.defineProperty(this,"_context",{enumerable:!1,value:{}});var o={};Object.keys(t).forEach((function(e){o[e]={enumerable:!0,set:function(t){n._context[e]=null==t?null:t},get:function(){return void 0!==n._context[e]?n._context[e]:t[e]}}})),Object.defineProperties(this,o)}Object.assign(this,e)}));var d=e("Environment",{dev:!1,logLevel:"ERROR",jsCdn:"https://cdn.jsdelivr.net",baseUrl:"",pluginBaseUrl:"./plugins",remoteModelUrl:"/remotemodel",assetsUrl:"./assets",dcSystem:"",ExportFile:"/ibizutil/download",UploadFile:"/ibizutil/upload",casLoginUrl:"",loginMode:u.DEFAULT,menuPermissionMode:l.MIXIN,enablePermission:!0}),v=e("HttpError",(function(e){this.name="HttpError";var t=e.response;this.response=e.response,t?(t.data?this.message=t.data.message:this.message=t.statusText,this.message||(this.message=h[t.status]),this.message||(this.message="网络异常,请稍后重试!"),this.status=t.status):(this.message=e.message,this.status=500)})),y=e("RuntimeError",(function(e){this.message=e,this.name="Runtime Error"})),g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},g(e,t)};function w(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{a(o.next(e))}catch(e){i(e)}}function c(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,c)}a((o=o.apply(e,t||[])).next())}))}function b(e,t){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s}function R(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function E(){return o(f.TOKEN)}var T,O,P,C=e("Interceptor",function(){function e(){}return e.prototype.onBeforeRequest=function(e){return w(this,void 0,void 0,(function(){return b(this,(function(t){return[2,e]}))}))},e.prototype.onRequestError=function(e){return Promise.reject(e)},e.prototype.onResponseSuccess=function(e){return w(this,void 0,void 0,(function(){return b(this,(function(t){return[2,e]}))}))},e.prototype.onResponseError=function(e){return Promise.reject(e)},e.prototype.use=function(e){this.requestTag=e.interceptors.request.use(this.onBeforeRequest,this.onRequestError),this.responseTag=e.interceptors.response.use(this.onResponseSuccess,this.onResponseError)},e.prototype.eject=function(e){this.requestTag&&e.interceptors.request.eject(this.requestTag),this.responseTag&&e.interceptors.response.eject(this.responseTag)},e}()),L=e("CoreInterceptor",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onBeforeRequest=function(t){return w(this,void 0,void 0,(function(){var n;return b(this,(function(o){switch(o.label){case 0:return[4,e.prototype.onBeforeRequest.call(this,t)];case 1:return o.sent(),t.headers||(t.headers={}),t.headers.Authorization="Bearer ".concat(E()),(n=ibiz.orgData)&&(n.systemid&&(t.headers.srfsystemid=n.systemid),n.orgid&&(t.headers.srforgid=n.orgid)),[2,t]}}))}))},t}(C)),k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},U={exports:{}};O=k,P=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(o){return"debug"===o&&(o="log"),typeof console!==t&&("trace"===o&&n?i:void 0!==console[o]?r(console,o):void 0!==console.log?r(console,"log"):e)}function c(t,n){for(var r=0;r<o.length;r++){var i=o[r];this[i]=r<t?e:this.methodFactory(i,t,n)}this.log=this.debug}function a(e,n,o){return function(){typeof console!==t&&(c.call(this,n,o),this[e].apply(this,arguments))}}function u(e,t,n){return s(e)||a.apply(this,arguments)}function l(e,n,r){var i,s=this;n=null==n?"WARN":n;var a="loglevel";function l(){var e;if(typeof window!==t&&a){try{e=window.localStorage[a]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,o=n.indexOf(encodeURIComponent(a)+"=");-1!==o&&(e=/^([^;]+)/.exec(n.slice(o))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}"string"==typeof e?a+=":"+e:"symbol"==typeof e&&(a=void 0),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=r||u,s.getLevel=function(){return i},s.setLevel=function(n,r){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==r&&function(e){var n=(o[e]||"silent").toUpperCase();if(typeof window!==t&&a){try{return void(window.localStorage[a]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(a)+"="+n+";"}catch(e){}}}(n),c.call(s,n,e),typeof console===t&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){n=e,l()||s.setLevel(e,!1)},s.resetLevel=function(){s.setLevel(n,!1),function(){if(typeof window!==t&&a){try{return void window.localStorage.removeItem(a)}catch(e){}try{window.document.cookie=encodeURIComponent(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var f=l();null==f&&(f=n),s.setLevel(f,!1)}var f=new l,p={};f.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=p[e];return t||(t=p[e]=new l(e,f.getLevel(),f.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return f.noConflict=function(){return typeof window!==t&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return p},f.default=f,f},(T=U).exports?T.exports=P():O.log=P();var A=a({__proto__:null,default:U.exports},[U.exports]);e("Logger",A);function j(e,t,n,o,r){var i="".concat(e,"-").concat(t);return n&&(i+="-".concat(n)),o&&(i+="__".concat(o)),r&&(i+="--".concat(r)),i}e("Namespace",function(){function e(e,t){this.block=e,this.namespace=t||"ibiz"}return e.prototype.b=function(e){return void 0===e&&(e=""),j(this.namespace,this.block,e,"","")},e.prototype.e=function(e){return e?j(this.namespace,this.block,"",e,""):""},e.prototype.m=function(e){return e?j(this.namespace,this.block,"","",e):""},e.prototype.be=function(e,t){return e&&t?j(this.namespace,this.block,e,t,""):""},e.prototype.em=function(e,t){return e&&t?j(this.namespace,this.block,"",e,t):""},e.prototype.bm=function(e,t){return e&&t?j(this.namespace,this.block,e,"",t):""},e.prototype.bem=function(e,t,n){return e&&t&&n?j(this.namespace,this.block,e,t,n):""},e.prototype.is=function(e,t){return e&&t?"".concat("is-").concat(e):""},e.prototype.cssVar=function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarName(n)]=e[n]);return t},e.prototype.cssVarBlock=function(e){var t={};for(var n in e)e[n]&&(t[this.cssVarBlockName(n)]=e[n]);return t},e.prototype.cssVarName=function(e){return"--".concat(this.namespace,"-").concat(e)},e.prototype.cssVarBlockName=function(e){return"--".concat(this.namespace,"-").concat(this.block,"-").concat(e)},e}()),e("HttpResponse",(function(e,t,n){this.local=!0,this.ok=!1,this.headers={},this.config={},this.data=e,this.status=t||200,this.statusText=n||"",this.status>=200&&this.status<300&&(this.ok=!0)}));var x=e("Net",function(){function e(e){this.interceptors=new Map,this.instance=i.create(e)}return e.prototype.addInterceptor=function(e,t){t.use(this.instance),this.interceptors.set(e,t)},e.prototype.removeInterceptor=function(e){var t=this.interceptors.get(e);t&&(t.eject(this.instance),this.interceptors.delete(e))},Object.defineProperty(e.prototype,"presetConfig",{get:function(){return{baseURL:this.instance.defaults.baseURL||ibiz.env.baseUrl,headers:{"Content-Type":"application/json;charset=UTF-8",Accept:"application/json"}}},enumerable:!1,configurable:!0}),e.prototype.mergeConfig=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this.presetConfig:n.apply(void 0,R([this.presetConfig],m(e),!1))},e.prototype.post=function(e,t,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),w(this,void 0,void 0,(function(){var r,i;return b(this,(function(s){switch(s.label){case 0:e=this.handleAppPresetParam(e,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(e,{method:"post",data:t,headers:o})];case 2:return r=s.sent(),[2,this.doResponseResult(r)];case 3:throw i=s.sent(),new v(i);case 4:return[2]}}))}))},e.prototype.get=function(e,t,o,r){return void 0===t&&(t={}),void 0===o&&(o={}),void 0===r&&(r={}),w(this,void 0,void 0,(function(){var i,s;return b(this,(function(c){switch(c.label){case 0:e=this.attachUrlParam(e,t),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.request(e,n({method:"get",headers:o},r))];case 2:return i=c.sent(),[2,this.doResponseResult(i)];case 3:throw s=c.sent(),new v(s);case 4:return[2]}}))}))},e.prototype.delete=function(e,t,n){return void 0===n&&(n={}),w(this,void 0,void 0,(function(){var o,r;return b(this,(function(i){switch(i.label){case 0:e=this.handleAppPresetParam(e,t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.request(e,{method:"delete",headers:n})];case 2:return o=i.sent(),[2,this.doResponseResult(o)];case 3:throw r=i.sent(),new v(r);case 4:return[2]}}))}))},e.prototype.put=function(e,t,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),w(this,void 0,void 0,(function(){var r,i;return b(this,(function(s){switch(s.label){case 0:e=this.handleAppPresetParam(e,n),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.request(e,{method:"put",data:t,headers:o})];case 2:return r=s.sent(),[2,this.doResponseResult(r)];case 3:throw i=s.sent(),new v(i);case 4:return[2]}}))}))},e.prototype.getModel=function(e,t){return void 0===t&&(t={}),w(this,void 0,void 0,(function(){var n,o;return b(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.get(e,{headers:t})];case 1:return n=r.sent(),[2,this.doResponseResult(n)];case 2:throw o=r.sent(),new v(o);case 3:return[2]}}))}))},e.prototype.request=function(e,t){return void 0===t&&(t={}),w(this,void 0,void 0,(function(){var n,o;return b(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instance.request(this.mergeConfig({url:e},t))];case 1:return n=r.sent(),[2,this.doResponseResult(n)];case 2:throw o=r.sent(),new v(o);case 3:return[2]}}))}))},e.prototype.doResponseResult=function(e){var t=e;return t.status>=200&&t.status<=299&&(t.ok=!0),t},e.prototype.handleAppPresetParam=function(e,t){if(t){var n=Object.keys(t),o={};return n.forEach((function(e){e.startsWith("srf")&&r(t[e])&&(o[e]=t[e])})),this.attachUrlParam(e,t)}return e},e.prototype.attachUrlParam=function(e,t){var n=s(t);return r(n)&&(e=e.endsWith("?")||-1!==e.indexOf("?")&&e.endsWith("&")?"".concat(e).concat(n):-1===e.indexOf("?")||e.endsWith("&")?"".concat(e,"?").concat(n):"".concat(e,"&").concat(n)),e},e}());function S(e){return c(e)}e("UrlHelper",function(){function e(){}return Object.defineProperty(e,"routeBase",{get:function(){return"".concat(this.appBase,"/#")},enumerable:!1,configurable:!0}),Object.defineProperty(e,"appBase",{get:function(){var e=window.location,t=e.origin,n=e.pathname;return"".concat(t).concat(n).replace(/\/$/,"")},enumerable:!1,configurable:!0}),Object.defineProperty(e,"routePath",{get:function(){return window.location.hash.replace("#","")},enumerable:!1,configurable:!0}),Object.defineProperty(e,"fullPath",{get:function(){return window.location.href},enumerable:!1,configurable:!0}),e}());function I(e){var t=e.composedPath&&e.composedPath()||e.path;if(null!=t)return t;return[e.target].concat(function e(t,n){void 0===n&&(n=[]);var o=t.parentNode;return o?e(o,n.concat([o])):n}(e.target))}function _(e,t,n,o){void 0===o&&(o={}),e.addEventListener(t,n,o);var r=function(){e.removeEventListener(t,n,o),r=p};return function(){r()}}function N(e,t){return t&&(e.target===t||I(e).includes(t))}var M="undefined"!=typeof window?window:void 0;var q=e("IBizSys",(function(){this.env=d,this.log=A,this.net=new x})),B=e("FactoryCenter",(function(){}))}}}));
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 请求状态码文本
3
+ */
4
+ export declare const HttpStatusMessageConst: Record<number, string>;
5
+ //# sourceMappingURL=http-status-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-status-message.d.ts","sourceRoot":"","sources":["../../../src/constant/http-status-message/http-status-message.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgBzD,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 请求状态码文本
3
+ */
4
+ export const HttpStatusMessageConst = {
5
+ 200: '服务器成功返回请求的数据。',
6
+ 201: '新建或修改数据成功。',
7
+ 202: '一个请求已经进入后台排队(异步任务)。',
8
+ 204: '删除数据成功。',
9
+ 400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
10
+ 401: '用户没有权限(令牌、用户名、密码错误)。',
11
+ 403: '用户得到授权,但是访问是被禁止的。',
12
+ 404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
13
+ 406: '请求的格式不可得。',
14
+ 410: '请求的资源被永久删除,且不会再得到的。',
15
+ 422: '当创建一个对象时,发生一个验证错误。',
16
+ 500: '服务器发生错误,请检查服务器。',
17
+ 502: '网关错误。',
18
+ 503: '服务不可用,服务器暂时过载或维护。',
19
+ 504: '网关超时。',
20
+ };
@@ -1,2 +1,6 @@
1
1
  export { CoreConst } from './core/core';
2
+ export * from './util/util';
3
+ export { HttpStatusMessageConst } from './http-status-message/http-status-message';
4
+ export { LoginMode } from './login-mode/login-mode';
5
+ export { MenuPermissionMode } from './menu-permission-mode/menu-permission-mode';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC"}
@@ -1 +1,5 @@
1
1
  export { CoreConst } from './core/core';
2
+ export * from './util/util';
3
+ export { HttpStatusMessageConst } from './http-status-message/http-status-message';
4
+ export { LoginMode } from './login-mode/login-mode';
5
+ export { MenuPermissionMode } from './menu-permission-mode/menu-permission-mode';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 登录模式
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-12 14:10:56
6
+ * @export
7
+ * @enum {number}
8
+ */
9
+ export declare enum LoginMode {
10
+ /**
11
+ * 默认标准登录
12
+ */
13
+ DEFAULT = "DEFAULT",
14
+ /**
15
+ * 自定义登录
16
+ */
17
+ CUSTOM = "CUSTOM",
18
+ /**
19
+ * 中央认证登录
20
+ */
21
+ CAS = "CAS"
22
+ }
23
+ //# sourceMappingURL=login-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-mode.d.ts","sourceRoot":"","sources":["../../../src/constant/login-mode/login-mode.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,GAAG,QAAQ;CACZ"}
@@ -0,0 +1,24 @@
1
+ /* eslint-disable no-shadow */
2
+ /**
3
+ * 登录模式
4
+ *
5
+ * @author lxm
6
+ * @date 2022-10-12 14:10:56
7
+ * @export
8
+ * @enum {number}
9
+ */
10
+ export var LoginMode;
11
+ (function (LoginMode) {
12
+ /**
13
+ * 默认标准登录
14
+ */
15
+ LoginMode["DEFAULT"] = "DEFAULT";
16
+ /**
17
+ * 自定义登录
18
+ */
19
+ LoginMode["CUSTOM"] = "CUSTOM";
20
+ /**
21
+ * 中央认证登录
22
+ */
23
+ LoginMode["CAS"] = "CAS";
24
+ })(LoginMode || (LoginMode = {}));
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 菜单权限校验模式
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-12 14:10:56
6
+ * @export
7
+ * @enum {number}
8
+ */
9
+ export declare enum MenuPermissionMode {
10
+ /**
11
+ * 混合模式(默认)
12
+ */
13
+ MIXIN = "MIXIN",
14
+ /**
15
+ * 统一资源模式
16
+ */
17
+ RESOURCE = "RESOURCE",
18
+ /**
19
+ * RT模式
20
+ */
21
+ RT = "RT"
22
+ }
23
+ //# sourceMappingURL=menu-permission-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-permission-mode.d.ts","sourceRoot":"","sources":["../../../src/constant/menu-permission-mode/menu-permission-mode.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,QAAQ,aAAa;IACrB;;OAEG;IACH,EAAE,OAAO;CACV"}
@@ -0,0 +1,24 @@
1
+ /* eslint-disable no-shadow */
2
+ /**
3
+ * 菜单权限校验模式
4
+ *
5
+ * @author lxm
6
+ * @date 2022-10-12 14:10:56
7
+ * @export
8
+ * @enum {number}
9
+ */
10
+ export var MenuPermissionMode;
11
+ (function (MenuPermissionMode) {
12
+ /**
13
+ * 混合模式(默认)
14
+ */
15
+ MenuPermissionMode["MIXIN"] = "MIXIN";
16
+ /**
17
+ * 统一资源模式
18
+ */
19
+ MenuPermissionMode["RESOURCE"] = "RESOURCE";
20
+ /**
21
+ * RT模式
22
+ */
23
+ MenuPermissionMode["RT"] = "RT";
24
+ })(MenuPermissionMode || (MenuPermissionMode = {}));
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 无操作函数
3
+ */
4
+ export declare const NOOP: () => void;
5
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/constant/util/util.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,IAAI,YAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-function */
2
+ /**
3
+ * 无操作函数
4
+ */
5
+ export const NOOP = () => { };
@@ -1,15 +1,3 @@
1
- /**
2
- * 上下文代理处理
3
- *
4
- * @author chitanda
5
- * @date 2022-07-14 10:07:45
6
- * @class IBizContextProxyHandle
7
- * @implements {ProxyHandler<IBizContext>}
8
- */
9
- export declare class IBizContextProxyHandle implements ProxyHandler<IBizContext> {
10
- set(target: IBizContext, p: string | symbol, value: unknown): boolean;
11
- get(target: IBizContext, p: string | symbol, _receiver: unknown): unknown;
12
- }
13
1
  /**
14
2
  * 上下文处理类
15
3
  *
@@ -19,41 +7,16 @@ export declare class IBizContextProxyHandle implements ProxyHandler<IBizContext>
19
7
  * @class IBizContext
20
8
  */
21
9
  export declare class IBizContext implements IContext {
22
- context: IContext;
23
10
  [key: string | symbol]: any;
24
- /**
25
- * 父上下文
26
- *
27
- * @author chitanda
28
- * @date 2022-07-14 10:07:06
29
- * @protected
30
- * @type {(IBizContext | null)}
31
- */
32
- protected _parent: IBizContext | null;
11
+ protected _context: IContext;
33
12
  /**
34
13
  * Creates an instance of IBizContext.
35
14
  *
36
15
  * @author chitanda
37
16
  * @date 2022-07-14 10:07:15
38
- * @param {IContext} [context={}]
17
+ * @param {IContext} [context={}] 自身的上下文
39
18
  * @param {IBizContext} [parent]
40
19
  */
41
20
  constructor(context?: IContext, parent?: IBizContext);
42
- /**
43
- * 创建代理
44
- *
45
- * @author chitanda
46
- * @date 2022-07-14 11:07:37
47
- * @protected
48
- * @return {*} {IBizContext}
49
- */
50
- protected createProxy(): IBizContext;
51
- /**
52
- * 销毁上下文,避免内存泄漏
53
- *
54
- * @author chitanda
55
- * @date 2022-07-14 11:07:45
56
- */
57
- destroy(): void;
58
21
  }
59
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,qBAAa,sBAAuB,YAAW,YAAY,CAAC,WAAW,CAAC;IACtE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO;IAKrE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO;CAa1E;AAED;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,QAAQ;IAsBvB,OAAO,EAAE,QAAQ;IApBpC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAQ;IAE7C;;;;;;;OAOG;gBACgB,OAAO,GAAE,QAAa,EAAE,MAAM,CAAC,EAAE,WAAW;IAO/D;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;OAKG;IACH,OAAO,IAAI,IAAI;CAIhB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,QAAQ;IAE1C,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B,SAAS,CAAC,QAAQ,EAAG,QAAQ,CAAC;IAE9B;;;;;;;OAOG;gBAES,OAAO,GAAE,QAAa,EAAE,MAAM,CAAC,EAAE,WAAW;CAmCzD"}
@@ -1,34 +1,3 @@
1
- /* eslint-disable no-param-reassign */
2
- /* eslint-disable no-constructor-return */
3
- /* eslint-disable no-underscore-dangle */
4
- /* eslint-disable max-classes-per-file */
5
- /**
6
- * 上下文代理处理
7
- *
8
- * @author chitanda
9
- * @date 2022-07-14 10:07:45
10
- * @class IBizContextProxyHandle
11
- * @implements {ProxyHandler<IBizContext>}
12
- */
13
- export class IBizContextProxyHandle {
14
- set(target, p, value) {
15
- target.context[p] = value;
16
- return true;
17
- }
18
- get(target, p, _receiver) {
19
- if (target[p] !== undefined) {
20
- return target[p];
21
- }
22
- if (target.context[p] !== undefined) {
23
- return target.context[p];
24
- }
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- if (target._parent && target._parent[p] !== undefined) {
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
- return target._parent[p];
29
- }
30
- }
31
- }
32
1
  /**
33
2
  * 上下文处理类
34
3
  *
@@ -43,44 +12,44 @@ export class IBizContext {
43
12
  *
44
13
  * @author chitanda
45
14
  * @date 2022-07-14 10:07:15
46
- * @param {IContext} [context={}]
15
+ * @param {IContext} [context={}] 自身的上下文
47
16
  * @param {IBizContext} [parent]
48
17
  */
18
+ // eslint-disable-next-line default-param-last
49
19
  constructor(context = {}, parent) {
50
- this.context = context;
51
- /**
52
- * 父上下文
53
- *
54
- * @author chitanda
55
- * @date 2022-07-14 10:07:06
56
- * @protected
57
- * @type {(IBizContext | null)}
58
- */
59
- this._parent = null;
60
20
  if (parent) {
61
- this._parent = parent;
21
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
22
+ const self = this;
23
+ // 定义私有变量,用于存储父已有上下文,方便覆盖
24
+ Object.defineProperty(this, '_context', {
25
+ enumerable: false,
26
+ value: {},
27
+ });
28
+ // 监控父上下文参数,自身不存在时从父取
29
+ const properties = {};
30
+ const keys = Object.keys(parent);
31
+ keys.forEach(key => {
32
+ properties[key] = {
33
+ enumerable: true,
34
+ set(val) {
35
+ if (val == null) {
36
+ self._context[key] = null;
37
+ }
38
+ else {
39
+ self._context[key] = val;
40
+ }
41
+ },
42
+ get() {
43
+ if (self._context[key] !== undefined) {
44
+ return self._context[key];
45
+ }
46
+ return parent[key];
47
+ },
48
+ };
49
+ });
50
+ Object.defineProperties(this, properties);
62
51
  }
63
- return this.createProxy();
64
- }
65
- /**
66
- * 创建代理
67
- *
68
- * @author chitanda
69
- * @date 2022-07-14 11:07:37
70
- * @protected
71
- * @return {*} {IBizContext}
72
- */
73
- createProxy() {
74
- return new Proxy(this, new IBizContextProxyHandle());
75
- }
76
- /**
77
- * 销毁上下文,避免内存泄漏
78
- *
79
- * @author chitanda
80
- * @date 2022-07-14 11:07:45
81
- */
82
- destroy() {
83
- this.context = {};
84
- this._parent = null;
52
+ // 合并给入上下文
53
+ Object.assign(this, context);
85
54
  }
86
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAMzB,CAAC"}
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment/environment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAezB,CAAC"}
@@ -1,10 +1,20 @@
1
+ import { LoginMode, MenuPermissionMode } from '../constant';
1
2
  /**
2
3
  * 环境变量
3
4
  */
4
5
  export const Environment = {
6
+ dev: false,
7
+ logLevel: 'ERROR',
8
+ jsCdn: 'https://cdn.jsdelivr.net',
5
9
  baseUrl: '',
6
- assetsUrl: './assets/',
10
+ pluginBaseUrl: './plugins',
11
+ remoteModelUrl: '/remotemodel',
12
+ assetsUrl: './assets',
7
13
  dcSystem: '',
8
14
  ExportFile: '/ibizutil/download',
9
15
  UploadFile: '/ibizutil/upload',
16
+ casLoginUrl: '',
17
+ loginMode: LoginMode.DEFAULT,
18
+ menuPermissionMode: MenuPermissionMode.MIXIN,
19
+ enablePermission: true,
10
20
  };
@@ -0,0 +1,18 @@
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
+ /**
3
+ * 请求异常
4
+ *
5
+ * @author chitanda
6
+ * @date 2022-09-18 17:09:10
7
+ * @export
8
+ * @class HttpError
9
+ * @implements {Error}
10
+ */
11
+ export declare class HttpError implements Error {
12
+ name: string;
13
+ message: string;
14
+ status: number;
15
+ response?: AxiosResponse;
16
+ constructor(err: AxiosError);
17
+ }
18
+ //# sourceMappingURL=http-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-error.d.ts","sourceRoot":"","sources":["../../../src/error/http-error/http-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGlD;;;;;;;;GAQG;AACH,qBAAa,SAAU,YAAW,KAAK;IACrC,IAAI,EAAE,MAAM,CAAe;IAE3B,OAAO,EAAE,MAAM,CAAC;IAEhB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,CAAC,EAAE,aAAa,CAAC;gBAEb,GAAG,EAAE,UAAU;CAqB5B"}
@@ -0,0 +1,36 @@
1
+ import { HttpStatusMessageConst } from '../../constant';
2
+ /**
3
+ * 请求异常
4
+ *
5
+ * @author chitanda
6
+ * @date 2022-09-18 17:09:10
7
+ * @export
8
+ * @class HttpError
9
+ * @implements {Error}
10
+ */
11
+ export class HttpError {
12
+ constructor(err) {
13
+ this.name = 'HttpError';
14
+ const res = err.response;
15
+ this.response = err.response;
16
+ if (res) {
17
+ if (res.data) {
18
+ this.message = res.data.message;
19
+ }
20
+ else {
21
+ this.message = res.statusText;
22
+ }
23
+ if (!this.message) {
24
+ this.message = HttpStatusMessageConst[res.status];
25
+ }
26
+ if (!this.message) {
27
+ this.message = '网络异常,请稍后重试!';
28
+ }
29
+ this.status = res.status;
30
+ }
31
+ else {
32
+ this.message = err.message;
33
+ this.status = 500;
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,3 @@
1
+ export { HttpError } from './http-error/http-error';
2
+ export { RuntimeError } from './runtime-error/runtime-error';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { HttpError } from './http-error/http-error';
2
+ export { RuntimeError } from './runtime-error/runtime-error';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 运行时异常
3
+ *
4
+ * @author lxm
5
+ * @date 2022-09-21 18:09:09
6
+ * @export
7
+ * @class RuntimeError
8
+ * @implements {Error}
9
+ */
10
+ export declare class RuntimeError implements Error {
11
+ message: string;
12
+ name: string;
13
+ constructor(message: string);
14
+ }
15
+ //# sourceMappingURL=runtime-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-error.d.ts","sourceRoot":"","sources":["../../../src/error/runtime-error/runtime-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,qBAAa,YAAa,YAAW,KAAK;IAGrB,OAAO,EAAE,MAAM;IAFlC,IAAI,EAAE,MAAM,CAAmB;gBAEZ,OAAO,EAAE,MAAM;CACnC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 运行时异常
3
+ *
4
+ * @author lxm
5
+ * @date 2022-09-21 18:09:09
6
+ * @export
7
+ * @class RuntimeError
8
+ * @implements {Error}
9
+ */
10
+ export class RuntimeError {
11
+ constructor(message) {
12
+ this.message = message;
13
+ this.name = 'Runtime Error';
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 工厂类挂载中心,挂载各种解耦用创建工厂
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-17 15:10:04
6
+ * @export
7
+ * @class FactoryCenter
8
+ */
9
+ export declare class FactoryCenter {
10
+ }
11
+ //# sourceMappingURL=factory-center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory-center.d.ts","sourceRoot":"","sources":["../src/factory-center.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,aAAa;CAAG"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 工厂类挂载中心,挂载各种解耦用创建工厂
3
+ *
4
+ * @author lxm
5
+ * @date 2022-10-17 15:10:04
6
+ * @export
7
+ * @class FactoryCenter
8
+ */
9
+ export class FactoryCenter {
10
+ }
package/out/ibizsys.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { OrgData } from './interface';
2
- import { Net } from './utils';
2
+ import { Logger, Net } from './utils';
3
3
  /**
4
4
  * 全局对象
5
5
  *
@@ -16,6 +16,13 @@ export declare class IBizSys {
16
16
  * @date 2022-07-19 18:07:04
17
17
  */
18
18
  env: import("./interface").IEnvironment;
19
+ /**
20
+ * 日志对象
21
+ *
22
+ * @author chitanda
23
+ * @date 2022-10-25 20:10:22
24
+ */
25
+ log: Logger.RootLogger;
19
26
  /**
20
27
  * 网络请求工具类
21
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ibizsys.d.ts","sourceRoot":"","sources":["../src/ibizsys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAE9B;;;;;;;GAOG;AACH,qBAAa,OAAO;IAClB;;;;;OAKG;IACH,GAAG,qCAAe;IAElB;;;;;;OAMG;IACH,GAAG,EAAE,GAAG,CAAa;IAErB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB"}
1
+ {"version":3,"file":"ibizsys.d.ts","sourceRoot":"","sources":["../src/ibizsys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;;;GAOG;AACH,qBAAa,OAAO;IAClB;;;;;OAKG;IACH,GAAG,qCAAe;IAElB;;;;;OAKG;IACH,GAAG,oBAAU;IAEb;;;;;;OAMG;IACH,GAAG,EAAE,GAAG,CAAa;IAErB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB"}
package/out/ibizsys.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Environment } from './environment/environment';
2
- import { Net } from './utils';
2
+ import { Logger, Net } from './utils';
3
3
  /**
4
4
  * 全局对象
5
5
  *
@@ -17,6 +17,13 @@ export class IBizSys {
17
17
  * @date 2022-07-19 18:07:04
18
18
  */
19
19
  this.env = Environment;
20
+ /**
21
+ * 日志对象
22
+ *
23
+ * @author chitanda
24
+ * @date 2022-10-25 20:10:22
25
+ */
26
+ this.log = Logger;
20
27
  /**
21
28
  * 网络请求工具类
22
29
  *
package/out/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import './types';
2
2
  export * from './constant';
3
- export { IBizContext, IBizContextProxyHandle } from './context';
3
+ export { IBizContext } from './context';
4
4
  export { Environment } from './environment/environment';
5
+ export * from './error';
5
6
  export * from './interface';
6
7
  export * from './utils';
7
8
  export { IBizSys } from './ibizsys';
9
+ export { FactoryCenter } from './factory-center';
8
10
  export { install } from './install';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AAEjB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AAEjB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
package/out/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import './types';
2
2
  export * from './constant';
3
- export { IBizContext, IBizContextProxyHandle } from './context';
3
+ export { IBizContext } from './context';
4
4
  export { Environment } from './environment/environment';
5
+ export * from './error';
5
6
  export * from './interface';
6
7
  export * from './utils';
7
8
  export { IBizSys } from './ibizsys';
9
+ export { FactoryCenter } from './factory-center';
8
10
  export { install } from './install';