diff --git a/dist/sanji-rest-ui.js b/dist/sanji-rest-ui.js new file mode 100644 index 0000000..4f5b27d --- /dev/null +++ b/dist/sanji-rest-ui.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("angular"),require("ng-file-upload")):"function"==typeof define&&define.amd?define(["angular","ng-file-upload"],t):"object"==typeof exports?exports.sjRest=t(require("angular"),require("ng-file-upload")):e.sjRest=t(e.angular,e.ngFileUpload)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:{},o=e.defer(),c=JSON.parse(JSON.stringify(u)),f=c.basePath||a.basePath,l=[f+n];return t=t.toLowerCase(),t.match(/post|put/)&&l.push(r),t.match(/delete/)&&(c.data=r,c.headers?c.headers["Content-Type"]="application/json":c.headers={"Content-Type":"application/json"}),l.push(c),i[t](l).then(function(e){o.resolve(e)}).catch(function(e){o.reject(e)}),o.promise}var a=this.config,i=n.get(a.service);return{configure:function(e){return Object.assign(a,e)},get:function(e,t){return o("get",e,null,t)},post:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("http"===a.service&&Array.isArray(n)){var c=i.basePath||a.basePath,f={url:c+e,method:"POST",data:{}};return u(f,t,n),r.upload(Object.assign(f,i))}return o("post",e,t,i)},put:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("http"===a.service&&Array.isArray(n)){i=i||{};var c=i.basePath||a.basePath,f={url:c+e,method:"PUT",data:{}};return u(f,t,n),r.upload(Object.assign(f,i))}return o("put",e,t,i)},delete:function(e,t,n){return o("delete",e,t,n)}}}]}]),e}();o.$inject=u,t.default=o},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.sjRest=void 0;var u=n(2),o=r(u),a=n(3),i=r(a),c=n(0),f=r(c),l=n(1),s=r(l),p=o.default.module("sanji.rest",[i.default]).service("http",f.default).provider("rest",s.default).name;t.sjRest=p}])}); \ No newline at end of file diff --git a/package.json b/package.json index 49c685b..8362d6c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "sanji-rest-ui", "author": "Zack Yang (https://github.com/zack9433)", "description": "sanji-rest-ui UI", - "version": "0.0.0-semantic-released", + "version": "1.4.2", "main": "dist/sanji-rest-ui.js", "config": { "ghooks": {