diff --git a/dist/index.umd.js b/dist/index.umd.js index b018558..0f57ef5 100644 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -523,7 +523,9 @@ */ function buildScheme(config, options) { var path = config.path, - param = config.param; + param = config.param, + _config$fragment = config.fragment, + fragment = _config$fragment === undefined ? '' : _config$fragment; var customBuildScheme = options.buildScheme; @@ -543,8 +545,9 @@ return key + '=' + param[key]; }).join('&') : ''; var urlQuery = query ? '?' + query : ''; + var urlFragment = fragment && fragment[0] !== '#' ? '#' + fragment : fragment; - return protocol + '://' + hostPort + path + urlQuery; + return protocol + '://' + hostPort + path + urlQuery + urlFragment; } /** diff --git a/dist/index.umd.min.js b/dist/index.umd.min.js index b620273..80cfb95 100644 --- a/dist/index.umd.min.js +++ b/dist/index.umd.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CallApp=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var v=t(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),y=t(function(e){var t=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=t)}),m=(y.version,function(r,o,e){if(function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!")}(r),void 0===o)return r;switch(e){case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}),o=function(e){return"object"==typeof e?null!==e:"function"==typeof e},r=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e},n=function(e){try{return!!e()}catch(e){return!0}},i=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),u=v.document,a=o(u)&&o(u.createElement),c=!i&&!n(function(){return 7!=Object.defineProperty((e="div",a?u.createElement(e):{}),"a",{get:function(){return 7}}).a;var e}),f=Object.defineProperty,s={f:i?Object.defineProperty:function(e,t,n){if(r(e),t=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}(t,!0),r(n),c)try{return f(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},b=i?function(e,t,n){return s.f(e,t,{enumerable:!((r=1)&r),configurable:!(2&r),writable:!(4&r),value:n});var r}:function(e,t,n){return e[t]=n,e},l={}.hasOwnProperty,g=function(e,t){return l.call(e,t)},O="prototype",w=function(e,t,n){var r,o,i,u=e&w.F,a=e&w.G,c=e&w.S,f=e&w.P,s=e&w.B,l=e&w.W,p=a?y:y[t]||(y[t]={}),d=p[O],h=a?v:c?v[t]:(v[t]||{})[O];for(r in a&&(n=t),n)(o=!u&&h&&void 0!==h[r])&&g(p,r)||(i=o?h[r]:n[r],p[r]=a&&"function"!=typeof h[r]?n[r]:s&&o?m(i,v):l&&h[r]==i?function(r){var e=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,n)}return r.apply(this,arguments)};return e[O]=r[O],e}(i):f&&"function"==typeof i?m(Function.call,i):i,f&&((p.virtual||(p.virtual={}))[r]=i,e&w.R&&d&&!d[r]&&b(d,r,i)))};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128;var p,d,h,_=w,k={}.toString,j=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==(t=e,k.call(t).slice(8,-1))?e.split(""):Object(e);var t},S=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},C=function(e){return j(S(e))},M=Math.ceil,T=Math.floor,E=function(e){return isNaN(e=+e)?0:(0o;)g(r,n=t[o++])&&(~q(i,n)||i.push(n));return i}(e,R)},W={f:Object.getOwnPropertySymbols},L={f:{}.propertyIsEnumerable},Y=function(e){return Object(S(e))},G=Object.assign,H=!G||n(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=G({},e)[n]||Object.keys(G({},t)).join("")!=r})?function(e,t){for(var n=Y(e),r=arguments.length,o=1,i=W.f,u=L.f;oo;)g(r,n=t[o++])&&(~q(i,n)||i.push(n));return i}(e,R)},W={f:Object.getOwnPropertySymbols},L={f:{}.propertyIsEnumerable},Y=function(e){return Object(S(e))},G=Object.assign,H=!G||n(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=G({},e)[n]||Object.keys(G({},t)).join("")!=r})?function(e,t){for(var n=Y(e),r=arguments.length,o=1,i=W.f,u=L.f;o `${key}=${param[key]}`).join('&') : ''; const urlQuery = query ? `?${query}` : ''; + const urlFragment = fragment && fragment[0] !== '#' ? '#' + fragment : fragment; - return `${protocol}://${hostPort}${path}${urlQuery}`; + return `${protocol}://${hostPort}${path}${urlQuery}${urlFragment}`; } /**