forked from LuvDaSun/angular-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-hal.min.js.map
1 lines (1 loc) · 44.2 KB
/
angular-hal.min.js.map
1
{"version":3,"sources":["utility/utility.module.js","utility/resolve-url.factory.js","utility/normalize-link.factory.js","utility/extend-read-only.factory.js","utility/define-read-only.factory.js","url-generator/url-generator.module.js","url-generator/url-generator.service.js","resource/resource.module.js","resource/resource.factory.js","resource/hal-resource-client.factory.js","http-interception/http-interception.module.js","http-interception/response-transformer.service.js","http-interception/resource-http-interceptor.factory.js","http-interception/http-interception.config.js","content-type/content-type.module.js","content-type/content-type.service.js","configuration/configuration.module.js","configuration/hal-configuration.provider.js","client/client.module.js","client/link-header.factory.js","client/hal-client.service.js","angular-hal.module.js"],"names":["angular","module","ResolveUrlFactory","resolveUrl","baseUrl","path","resultHref","reFullUrl","baseHrefMatch","exec","hrefMatch","partIndex","factory","$inject","extend","NormalizeLinkFactory","$resolveUrl","normalizeLink","link","Array","isArray","map","item","href","newLink","ExtendReadOnlyFactory","extendReadOnly","target","copy","key","Object","defineProperty","configurable","enumerable","value","DefineReadOnlyFactory","defineReadOnly","writable","UrlGeneratorFactory","$window","searchRfc6570","rfc6570","require","Error","generate","template","parameters","UriTemplate","stringify","ResourceFactory","HalResourceClient","$generateUrl","$extendReadOnly","$defineReadOnly","$normalizeLink","$halConfiguration","Resource","data","response","initializeData","propertyName","hasOwnProperty","isMetaProperty","self","initializeLinks","linksAttribute","keys","forEach","rel","links","config","url","initializeEmbedded","embeddedAttribute","embedResource","inititalizeClient","client","embedded","resources","resource","push","i","ignoreAttributePrefixes","length","substr","$hasLink","$hasEmbedded","$has","$href","subLink","subHref","templated","urlTransformer","$link","$meta","name","fullName","$response","$request","this","merge","HalResourceClientFactory","$q","$injector","method","urlParams","body","options","promises","selfLink","resolve","all","j","$http","reject","$get","undefined","$post","$put","$patch","$delete","headers","Link","toStringItem","$unlink","toString","get","$del","ResponseToResourceTransformerFactory","transform","ResourceHttpInterceptorFactory","$transformResponseToResource","$contentType","transformRequest","request","Accept","CONTENT_TYPE","join","transformResponse","match","forceHal","forceJSONResource","HttpInterceptorConfiguration","$httpProvider","interceptors","ContentType","searchContentType","contentType","type","parse","HalConfigurationProvider","setLinksAttribute","newLinksAttribute","setEmbeddedAttribute","newEmbeddedAttribute","setIgnoreAttributePrefixes","newIgnoreAttributePrefixes","addIgnoreAttributePrefix","ignoreAttributePrefix","setSelfLink","newSelfLink","setForceJSONResource","newForceJSONResource","setUrlTransformer","newUrlTransformer","noopUrlTransformer","$log","log","freeze","provider","LinkHeaderFactory","LinkHeader","uriReference","linkParams","anchor","rev","hreflang","media","title","result","params","paramValue","paramName","HalClientService","linkHeaders","service"],"mappings":"CAAA,SACEA,GAEA,YAGAA,GAAQC,OAAO,2BAGfD;CCTF,SACEC,GAEA,YAWA,SAASC,KAUP,QAASC,GAAWC,EAASC,GAM3B,IAAK,GALDC,GAAa,GACbC,EAAY,+CACZC,EAAgBD,EAAUE,KAAKL,GAC/BM,EAAYH,EAAUE,KAAKJ,GAEtBM,EAAY,EAAe,EAAZA,EAAeA,IAEnCL,GADEI,EAAUC,GACED,EAAUC,GAEVH,EAAcG,EAIhC,OAAOL,GAvBT,MAAOH,GATTF,EAAOW,QAAQ,cAAeV,GAG9BA,EAAkBW,YAiClBb,QAAQC,OAAO;CC1CjB,SACEA,EACAa,GAEA,YAaA,SAASC,GAAqBC,GAQ5B,QAASC,GAAcb,EAASc,GAC9B,MAAIC,OAAMC,QAAQF,GACTA,EAAKG,IAAI,SAAUC,GACxB,MAAOL,GAAcb,EAASkB,KAGf,gBAATJ,IAENK,KAAMP,EAAYZ,EAASc,IAGP,gBAAdA,GAAKK,MACbL,EAAKK,KAAOP,EAAYZ,EAASc,EAAKK,MAC/BL,GAENC,MAAMC,QAAQF,EAAKK,MACbL,EAAKK,KAAKF,IAAI,SAAUE,GAC7B,GAAIC,GAAUV,KAAWI,GACvBK,KAAMA,GAER,OAAON,GAAcb,EAASoB,MAI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IAAI,SAASH,GAAQ,MAAOA,GAAK2G,aAC7D3B,EAAS,SAAU3E,EAAMoF,GAGlC,QAAST,GAASM,EAAQjF,EAAMoF,EAASlD,GAGvC,MAFAkD,GAAUA,MACV2D,EAAKC,IAAI,2EACFtD,EAAMb,EAAMO,GACjBH,OAAQA,EACRjC,IAAKhB,EAAkBqC,eAAerE,GACtCkC,KAAMA,KA5DV,GAAIM,GAAOoC,MAKV,WACGrF,EAAOiD,GACLoD,KAAMA,EACNE,MAAOA,EACPC,KAAMA,EACNC,OAAQA,EACRC,QAASA,EACTO,KAAMP,EACN3B,MAAOA,EACP+B,QAASA,EACT+C,WAAYA,OAlCpB1K,EAAOwL,QAAQ,YAAaF,GAC5BtL,EAAOwL,QAAQ,aAAcF,GAG7BA,EAAiB1K,SACf,OACA,QACA,aACA,sBA4EFb,QAAQC,OAAO,sBACfD,QAAQc,OACRd,QAAQoG;CC9FV,SACEpG,GAEA,YAGAA,GAAQC,OAAO,eACb,4BACA,2BACA,gCACA,qBACA,QAIFD","file":"angular-hal.min.js","sourcesContent":["(function(\n angular\n) {\n 'use strict';\n\n // Add new module for utilities\n angular.module('angular-hal.utility', []);\n\n})(\n angular\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Regirster NormalizeLinkFactory\n module.factory('$resolveUrl', ResolveUrlFactory);\n\n // Inject Dependencies\n ResolveUrlFactory.$inject = [];\n\n /**\n * Factory for Url Resolver\n */\n function ResolveUrlFactory() {\n return resolveUrl;\n\n /**\n * Resolve whole URL\n * \n * @param {String} baseUrl\n * @param {String} path\n * @return {String}\n */\n function resolveUrl(baseUrl, path) {\n var resultHref = ''\n , reFullUrl = /^((?:\\w+\\:)?)((?:\\/\\/)?)([^\\/]*)((?:\\/.*)?)$/\n , baseHrefMatch = reFullUrl.exec(baseUrl)\n , hrefMatch = reFullUrl.exec(path);\n\n for (var partIndex = 1; partIndex < 5; partIndex++) {\n if (hrefMatch[partIndex]) {\n resultHref += hrefMatch[partIndex];\n } else {\n resultHref += baseHrefMatch[partIndex];\n }\n }\n\n return resultHref;\n }\n }\n})(\n angular.module('angular-hal.utility')\n);\n","(function(\n module,\n extend\n) {\n 'use strict';\n\n // Regirster NormalizeLinkFactory\n module.factory('$normalizeLink', NormalizeLinkFactory);\n\n // Inject Dependencies\n NormalizeLinkFactory.$inject = [\n '$resolveUrl',\n ];\n\n /**\n * Factory for Link Normalizer\n */\n function NormalizeLinkFactory($resolveUrl) {\n return normalizeLink;\n\n /**\n * @param {String} baseUrl\n * @param {mixed} link\n * @return {Object}\n */\n function normalizeLink(baseUrl, link) {\n if (Array.isArray(link)) {\n return link.map(function (item) {\n return normalizeLink(baseUrl, item);\n });\n }\n if(typeof link === 'string') {\n return {\n href: $resolveUrl(baseUrl, link),\n };\n }\n if(typeof link.href === 'string') {\n link.href = $resolveUrl(baseUrl, link.href);\n return link;\n }\n if(Array.isArray(link.href)) {\n return link.href.map(function (href) {\n var newLink = extend({}, link, {\n href: href,\n });\n return normalizeLink(baseUrl, newLink);\n });\n }\n return {\n href: baseUrl,\n };\n }\n }\n})(\n angular.module('angular-hal.utility'),\n angular.extend\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Regirster ExtendReadOnlyFactory\n module.factory('$extendReadOnly', ExtendReadOnlyFactory);\n\n // Inject Dependencies\n ExtendReadOnlyFactory.$inject = [];\n\n /**\n * Factory for Extend Read Only\n */\n function ExtendReadOnlyFactory() {\n return extendReadOnly;\n\n /**\n * Extend properties from copy read-only to target\n * @param {Object} target\n * @param {Object} copy\n */\n function extendReadOnly(target, copy) {\n for(var key in copy) {\n Object.defineProperty(target, key, {\n configurable: false,\n enumerable: false,\n value: copy[key],\n });\n }\n }\n }\n})(\n angular.module('angular-hal.utility')\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Regirster DefineReadOnlyFactory\n module.factory('$defineReadOnly', DefineReadOnlyFactory);\n\n // Inject Dependencies\n DefineReadOnlyFactory.$inject = [];\n\n /**\n * Factory for Define Read Only\n */\n function DefineReadOnlyFactory() {\n return defineReadOnly;\n\n /**\n * Define read-only property in target\n * @param {Object} target\n * @param {String} key\n * @param {mixed} value\n */\n function defineReadOnly(target, key, value) {\n Object.defineProperty(target, key, {\n configurable: false,\n enumerable: true,\n value: value,\n writable: true,\n });\n }\n }\n})(\n angular.module('angular-hal.utility')\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for url generator\n angular.module('angular-hal.url-generator', []);\n\n})(\n angular\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Regirster UrlGeneratorFactory\n module.factory('$generateUrl', UrlGeneratorFactory);\n\n // Inject Dependencies\n UrlGeneratorFactory.$inject = [\n '$window',\n ];\n\n /**\n * Factory for URL Generator\n */\n function UrlGeneratorFactory($window) {\n var rfc6570;\n\n /**\n * Initialize Everything\n */\n (function init() {\n rfc6570 = searchRfc6570();\n })();\n\n return generate;\n\n /**\n * Search for RFC6570\n */\n function searchRfc6570() {\n if(typeof $window.rfc6570 != 'undefined') {\n return $window.rfc6570;\n }\n \n if(!rfc6570 &&\n typeof require !== 'undefined') {\n return require('rfc6570/src/main');\n }\n\n throw new Error('Could not find rfc6570 library.');\n }\n\n /**\n * Generate url from template\n * \n * @param {String} template\n * @param {Object} parameters\n * @return {String}\n */\n function generate(template, parameters) {\n return new rfc6570.UriTemplate(template).stringify(parameters);\n }\n }\n})(\n angular.module('angular-hal.url-generator')\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for resource\n angular.module('angular-hal.resource', [\n 'angular-hal.utility',\n 'angular-hal.configuration',\n\t]);\n\n})(\n angular\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Add factory for Resource\n module.factory('Resource', ResourceFactory);\n\n // Inject Dependencies\n ResourceFactory.$inject = [\n 'HalResourceClient',\n '$generateUrl',\n '$extendReadOnly',\n '$defineReadOnly',\n '$normalizeLink',\n '$halConfiguration',\n ];\n\n /**\n * Factory for Resource\n * \n * @param {Function} HalResourceClient\n * @param {Function} $generateUrl\n * @param {Function} $extendReadOnly\n * @param {Function} $defineReadOnly\n * @param {Function} $normalizeLink\n * @param {Object} $halConfiguration\n */\n function ResourceFactory(\n HalResourceClient,\n $generateUrl,\n $extendReadOnly,\n $defineReadOnly,\n $normalizeLink,\n $halConfiguration\n ) {\n return Resource;\n\n /**\n * @param {Object} data\n * @param {Object} response\n */\n function Resource(data, response) {\n var self = this\n , links = {}\n , embedded = {}\n , client;\n\n /**\n * Initialize the Resource\n */\n (function init() {\n if(typeof data !== 'object' ||\n data === null) {\n data = {};\n }\n initializeData();\n initializeEmbedded();\n initializeLinks();\n inititalizeClient();\n\n $extendReadOnly(self, {\n $hasLink: $hasLink,\n $hasEmbedded: $hasEmbedded,\n $has: $has,\n $href: $href,\n $meta: $meta,\n $link: $link,\n $request: $request,\n $response: $response,\n });\n })();\n\n /**\n * Add all data from data to itself\n */\n function initializeData() {\n for(var propertyName in data) {\n if(!data.hasOwnProperty(propertyName)) {\n continue;\n }\n if(isMetaProperty(propertyName)) {\n continue;\n }\n $defineReadOnly(self, propertyName, data[propertyName]);\n }\n }\n\n /**\n * Normalize all Links\n */\n function initializeLinks() {\n if(typeof data[$halConfiguration.linksAttribute] !== 'object') {\n return;\n }\n\n Object\n .keys(data[$halConfiguration.linksAttribute])\n .forEach(function(rel) {\n var link = data[$halConfiguration.linksAttribute][rel];\n links[rel] = $normalizeLink(response.config.url, link);\n });\n }\n\n /**\n * Normalize Embedded Contents\n */\n function initializeEmbedded() {\n if(typeof data[$halConfiguration.embeddedAttribute] !== 'object') {\n return;\n }\n\n Object\n .keys(data[$halConfiguration.embeddedAttribute])\n .forEach(function(rel) {\n embedResource(rel, data[$halConfiguration.embeddedAttribute][rel]);\n });\n }\n\n /**\n * Initialize the HTTP CLIENT\n */\n function inititalizeClient() {\n client = new HalResourceClient(self, embedded);\n }\n\n /**\n * Embed a resource(s)\n * \n * @param {String} rel\n * @param {Object|Object[]} resources\n */\n function embedResource(rel, resources) {\n if (Array.isArray(resources)) {\n embedded[rel] = [];\n resources.forEach(function (resource) {\n embedded[rel].push(new Resource(resource, response));\n });\n return;\n }\n embedded[rel] = new Resource(resources, response);\n }\n\n /**\n * Determine if a property name is a meta property\n * @param {String} propertyName\n * @return {Boolean}\n */\n function isMetaProperty(propertyName) {\n for(var i = 0; i < $halConfiguration.ignoreAttributePrefixes.length; i++) {\n if(propertyName.substr(0, 1) === $halConfiguration.ignoreAttributePrefixes[i]) {\n return true;\n }\n if(propertyName === $halConfiguration.linksAttribute ||\n propertyName === $halConfiguration.embeddedAttribute) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * @param {String} rel\n * @return {Boolean}\n */\n function $hasLink(rel) {\n return typeof links[rel] !== 'undefined';\n }\n\n /**\n * @param {String} rel\n * @return {Boolean}\n */\n function $hasEmbedded(rel) {\n return typeof embedded[rel] !== 'undefined';\n }\n\n /**\n * @param {String} rel\n * @return {Boolean}\n */\n function $has(rel) {\n return $hasLink(rel) || $hasEmbedded(rel);\n }\n\n /**\n * Get the href of a Link\n * \n * @param {String} rel\n * @param {Object} parameters\n * @return {String}\n */\n function $href(rel, parameters) {\n if(!$hasLink(rel)) {\n throw new Error('link \"' + rel + '\" is undefined');\n }\n\n var link = links[rel]\n , href = link.href;\n\n if(Array.isArray(link)) {\n href = [];\n for(var i = 0; i < link.length; i++) {\n var subLink = link[i]\n , subHref = subLink.href;\n if(typeof subLink.templated !== 'undefined' &&\n subLink.templated) {\n subHref = $generateUrl(subLink.href, parameters);\n }\n subHref = $halConfiguration.urlTransformer(subHref);\n href.push(subHref);\n }\n } else {\n if(typeof link.templated !== 'undefined' &&\n link.templated) {\n href = $generateUrl(link.href, parameters);\n }\n\n href = $halConfiguration.urlTransformer(href);\n }\n\n return href;\n }\n\n /**\n * Get a link\n *\n * !! To get a href, use $href instead !!\n * \n * @param {String} rel\n * @return {Object}\n */\n function $link(rel) {\n if(!$hasLink(rel)) {\n throw new Error('link \"' + rel + '\" is undefined');\n }\n var link = links[rel];\n return link;\n }\n\n /**\n * Get meta properties\n *\n * !! To get a href, use $href instead !!\n * !! To get a link, use $link instead !!\n * !! To get an embedded resource, use $request().$get(rel) instead !!\n * \n * @param {String} rel\n * @return {Object}\n */\n function $meta(name) {\n for(var i = 0; i < $halConfiguration.ignoreAttributePrefixes.length; i++) {\n var fullName = $halConfiguration.ignoreAttributePrefixes[i] + name;\n return data[fullName];\n }\n }\n\n /**\n * Get the Original Response\n *\n * @return {Object)}\n */\n function $response() {\n return response;\n }\n\n /**\n * Get the client to perform requests\n *\n * @return {HalResourceClient)}\n */\n function $request() {\n return client;\n }\n }\n }\n})(\n angular.module('angular-hal.resource')\n);\n","(function(\n module,\n merge,\n extend\n) {\n 'use strict';\n\n // Add factory for HalResourceClient\n module.factory('HalResourceClient', HalResourceClientFactory);\n\n // Inject Dependencies\n HalResourceClientFactory.$inject = [\n '$q',\n '$extendReadOnly',\n '$injector',\n '$halConfiguration',\n ];\n\n /**\n * Factory for HalResourceClient\n * @param {Q} $q\n * @param {Function} $extendReadOnly\n * @param {Injector} $injector Prevent Circular Dependency by injecting $injector instead of $http\n * @param {Object} $halConfiguration\n */\n function HalResourceClientFactory($q, $extendReadOnly, $injector, $halConfiguration) {\n return HalResourceClient;\n\n /**\n * @param {Resource} resource\n * @param {Object} links\n * @param {Object} embedded\n */\n function HalResourceClient(resource, embedded) {\n var self = this\n , $http = $injector.get('$http');\n\n /**\n * Initialize the client\n */\n (function init() {\n $extendReadOnly(self, {\n $request: $request,\n $get: $get,\n $post: $post,\n $put: $put,\n $patch: $patch,\n $delete: $delete,\n $del: $delete,\n $link: $link,\n $unlink: $unlink,\n });\n })();\n\n /**\n * Execute a HTTP request against a link\n * \n * @param {String} method\n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {mixed|null} body\n * @param {Object} options\n * @return {Promise}\n */\n function $request(method, rel, urlParams, body, options) {\n var promises;\n\n method = method || 'GET';\n rel = rel || $halConfiguration.selfLink;\n urlParams = urlParams || {};\n body = body || null;\n options = options || {};\n\n if(method === 'GET' &&\n rel === $halConfiguration.selfLink) {\n return $q.resolve(resource);\n }\n\n if(resource.$hasEmbedded(rel) &&\n Array.isArray(embedded[rel])) {\n promises = [];\n for(var i = 0; i < embedded[rel].length; i++) {\n promises.push(embedded[rel][i].$request().$request(method, 'self', urlParams, body, options));\n }\n return $q.all(promises);\n }\n\n if(resource.$hasEmbedded(rel)) {\n return embedded[rel].$request().$request(method, 'self', urlParams, body, options);\n }\n\n if(resource.$hasLink(rel)) {\n var url = resource.$href(rel, urlParams);\n\n extend(options, {\n method: method,\n data: body,\n });\n\n if(Array.isArray(url)) {\n promises = [];\n for(var j = 0; j < url.length; j++) {\n promises.push($http(merge(options, {url: url[j]})));\n }\n return $q.all(promises);\n }\n\n return $http(merge(options, {\n url: resource.$href(rel, urlParams),\n }));\n }\n\n return $q.reject(new Error('link \"' + rel + '\" is undefined'));\n }\n\n /**\n * Execute a HTTP GET request against a link or\n * load an embedded resource\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {Object} options\n * @return {Promise}\n */\n function $get(rel, urlParams, options) {\n return $request('GET', rel, urlParams, undefined, options);\n }\n\n /**\n * Execute a HTTP POST request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {mixed|null} body\n * @param {Object} options\n * @return {Promise}\n */\n function $post(rel, urlParams, body, options) {\n return $request('POST', rel, urlParams, body, options);\n }\n\n /**\n * Execute a HTTP PUT request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {mixed|null} body\n * @param {Object} options\n * @return {Promise}\n */\n function $put(rel, urlParams, body, options) {\n return $request('PUT', rel, urlParams, body, options);\n }\n\n /**\n * Execute a HTTP PATCH request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {mixed|null} body\n * @param {Object} options\n * @return {Promise}\n */\n function $patch(rel, urlParams, body, options) {\n return $request('PATCH', rel, urlParams, body, options);\n }\n\n /**\n * Execute a HTTP DELEET request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {Object} options\n * @return {Promise}\n */\n function $delete(rel, urlParams, options) {\n return $request('DELETE', rel, urlParams, undefined, options);\n }\n\n /**\n * Execute a HTTP LINK request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {LinkHeader[]} body\n * @param {Object} options\n * @return {Promise}\n */\n function $link(rel, urlParams, links, options) {\n options = options || {};\n options.headers = options.headers || {};\n options.headers.Link = links.map(toStringItem);\n return $request('LINK', rel, urlParams, undefined, options);\n }\n\n /**\n * Execute a HTTP UNLINK request against a link\n * \n * @param {String} rel\n * @param {Object|null} urlParams\n * @param {LinkHeader[]} body\n * @param {Object} options\n * @return {Promise}\n */\n function $unlink(rel, urlParams, links, options) {\n options = options || {};\n options.headers = options.headers || {};\n options.headers.Link = links.map(toStringItem);\n return $request('UNLINK', rel, urlParams, undefined, options);\n }\n\n /**\n * @param {mixed} item\n * @return {String}\n */\n function toStringItem(item) {\n return item.toString();\n }\n }\n }\n})(\n angular.module('angular-hal.resource'),\n angular.merge,\n angular.extend\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for http interception\n angular.module('angular-hal.http-interception', [\n 'angular-hal.resource',\n 'angular-hal.configuration',\n ]);\n\n})(\n angular\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Add factory for $transformResponseToResource\n module.factory('$transformResponseToResource', ResponseToResourceTransformerFactory);\n\n // Inject Dependencies\n ResponseToResourceTransformerFactory.$inject = [\n 'Resource',\n ];\n\n /**\n * @param {Function} Resource\n */\n function ResponseToResourceTransformerFactory(Resource) {\n return transform;\n\n /**\n * @param {Response}\n * @return {Resource}\n */\n function transform(response) {\n return new Resource(response.data, response);\n }\n }\n})(\n angular.module('angular-hal.http-interception')\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Add Factory for ResourceHttpInterceptorFactory\n module.factory('ResourceHttpInterceptor', ResourceHttpInterceptorFactory);\n\n // Inject Dependencies\n ResourceHttpInterceptorFactory.$inject = [\n '$transformResponseToResource',\n '$halConfiguration',\n\t'$contentType'\n ];\n\n /**\n * @param {Function} $transformResponseToResource\n * @return {Object}\n */\n function ResourceHttpInterceptorFactory($transformResponseToResource, $halConfiguration, $contentType) {\n var CONTENT_TYPE = 'application/hal+json';\n\n return {\n request: transformRequest,\n response: transformResponse,\n };\n\n /**\n * Add Hal Json As an accepted format\n * @param {Request} request\n * @return {Request}\n */\n function transformRequest(request) {\n if(typeof request.headers.Accept === 'undefined') {\n request.headers.Accept = CONTENT_TYPE;\n } else {\n request.headers.Accept = [\n CONTENT_TYPE,\n request.headers.Accept\n ].join(', ');\n }\n\n return request;\n }\n\n /**\n * Transform Response\n * \n * @param {Response} response\n * @return {Response|Resource}\n */\n function transformResponse(response) {\n if($contentType.match(response.headers('Content-Type'), CONTENT_TYPE)) {\n return $transformResponseToResource(response);\n }\n if(response.config.forceHal) {\n return $transformResponseToResource(response);\n }\n if((\n response.headers('Content-Type') === 'application/json' ||\n response.headers('Content-Type') === null\n ) &&\n $halConfiguration.forceJSONResource) {\n return $transformResponseToResource(response);\n }\n \n return response;\n }\n }\n})(\n angular.module('angular-hal.http-interception')\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Configure Http Interception\n module.config(HttpInterceptorConfiguration);\n\n // Inject Dependencies\n HttpInterceptorConfiguration.$inject = [\n '$httpProvider',\n ];\n\n /**\n * @param {HttpProvider} $httpProvider\n */\n function HttpInterceptorConfiguration($httpProvider) {\n $httpProvider.interceptors.push('ResourceHttpInterceptor');\n }\n\n})(\n angular.module('angular-hal.http-interception')\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for content type checker\n angular.module('angular-hal.content-type', []);\n\n})(\n angular\n);\n","(function (module) {\n\t'use strict';\n\n\t// Regirster ContentType\n\tmodule.factory('$contentType', ContentType);\n\n\t// Inject Dependencies\n\tContentType.$inject = ['$window'];\n\n\t/**\n\t * Factory for Content-Type parser\n\t */\n\tfunction ContentType($window) {\n\t\tvar contentType;\n\n\t\t/**\n\t\t * Initialize Everything\n\t\t */\n\t\t(function init() {\n\t\t\tcontentType = searchContentType();\n\t\t})();\n\n\t\treturn match;\n\n\t\t/**\n\t\t * Search for content-type lib\n\t\t */\n\t\tfunction searchContentType() {\n\t\t\tif (typeof $window.contentType != 'undefined') {\n\t\t\t\treturn $window.contentType;\n\t\t\t}\n\n\t\t\tif (!contentType &&\n\t\t\t\ttypeof require !== 'undefined') {\n\t\t\t\treturn require('content-type');\n\t\t\t}\n\n\t\t\tthrow new Error('Could not find content-type library.');\n\t\t}\n\n\t\t/**\n\t\t * Check content-type matching\n\t\t *\n\t\t * @param {String} contentType\n\t\t * @param {String} type\n\t\t * @return {Boolean}\n\t\t */\n\t\tfunction match(contentType, type) {\n\t\t\treturn contentType.parse(contentType).type === type;\n\t\t}\n\n\t\t// @TODO: Add parse and format methods (?)\n\t}\n})(angular.module('angular-hal.content-type'));\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for configuration\n angular.module('angular-hal.configuration', []);\n\n})(\n angular\n);\n","(function(\n module\n) {\n 'use strict';\n\n // Add Factory for ResourceHttpInterceptorFactory\n module.provider('$halConfiguration', HalConfigurationProvider);\n\n // Inject Dependencies\n HalConfigurationProvider.$inject = [];\n\n /**\n * @return {Object}\n */\n function HalConfigurationProvider() {\n var linksAttribute = '_links'\n , embeddedAttribute = '_embedded'\n , ignoreAttributePrefixes = [\n '_',\n '$',\n ]\n , selfLink = 'self'\n , forceJSONResource = false\n , urlTransformer = noopUrlTransformer;\n\n // Inject Dependencies\n $get.$inject = [\n '$log',\n ];\n\n return {\n setLinksAttribute: setLinksAttribute,\n setEmbeddedAttribute: setEmbeddedAttribute,\n setIgnoreAttributePrefixes: setIgnoreAttributePrefixes,\n addIgnoreAttributePrefix: addIgnoreAttributePrefix,\n setSelfLink: setSelfLink,\n setForceJSONResource: setForceJSONResource,\n setUrlTransformer: setUrlTransformer,\n $get: $get,\n };\n\n /**\n * @param {String} newLinksAttribute\n */\n function setLinksAttribute(newLinksAttribute) {\n linksAttribute = newLinksAttribute;\n }\n\n /**\n * @param {String} newEmbeddedAttribute\n */\n function setEmbeddedAttribute(newEmbeddedAttribute) {\n embeddedAttribute = newEmbeddedAttribute;\n }\n\n /**\n * @param {String[]} newIgnoreAttributePrefixes\n */\n function setIgnoreAttributePrefixes(newIgnoreAttributePrefixes) {\n ignoreAttributePrefixes = newIgnoreAttributePrefixes;\n }\n\n /**\n * @param {String} ignoreAttributePrefix\n */\n function addIgnoreAttributePrefix(ignoreAttributePrefix) {\n ignoreAttributePrefixes.push(ignoreAttributePrefix);\n }\n\n /**\n * @param {String} newSelfLink\n */\n function setSelfLink(newSelfLink) {\n selfLink = newSelfLink;\n }\n\n /**\n * @param {Boolean} newForceJSONResource\n */\n function setForceJSONResource(newForceJSONResource) {\n forceJSONResource = newForceJSONResource;\n }\n\n /**\n * @param {Function}\n * @deprecated $halConfigurationProvider.setUrlTransformer is deprecated. Please write a http interceptor instead.\n * @see https://docs.angularjs.org/api/ng/service/$http#interceptors\n */\n function setUrlTransformer(newUrlTransformer) {\n urlTransformer = newUrlTransformer;\n }\n\n /**\n * @param {String}\n * @return {String}\n */\n function noopUrlTransformer(url) {\n return url;\n }\n\n /**\n * @return {Object}\n */\n function $get($log) {\n if(urlTransformer !== noopUrlTransformer) {\n $log.log('$halConfigurationProvider.setUrlTransformer is deprecated. Please write a http interceptor instead.');\n }\n\n return Object.freeze({\n linksAttribute: linksAttribute,\n embeddedAttribute: embeddedAttribute,\n ignoreAttributePrefixes: ignoreAttributePrefixes,\n selfLink: selfLink,\n forceJSONResource: forceJSONResource,\n urlTransformer: urlTransformer,\n });\n }\n }\n})(\n angular.module('angular-hal.configuration')\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Add module for client\n angular.module('angular-hal.client', [\n 'angular-hal.utility',\n ]);\n\n})(\n angular\n);\n","(function(\n module,\n merge,\n forEach\n) {\n 'use strict';\n\n // Add factory for LinkHeader\n module.factory('LinkHeader', LinkHeaderFactory);\n\n // Inject Dependencies\n LinkHeaderFactory.$inject = [];\n\n /**\n * Factory for LinkHeader\n */\n function LinkHeaderFactory() {\n return LinkHeader;\n\n /**\n * Link Header\n *\n * @param {String} uriReference The Link Value\n * @param {Object} linkParams The Link Params\n * @constructor\n */\n function LinkHeader(uriReference, linkParams) {\n var self = this;\n\n /**\n * Initialize the LinkHeader\n *\n * @return void\n */\n (function init() {\n merge(self, {\n uriReference: uriReference,\n linkParams: angular.merge(\n {\n rel: null,\n anchor: null,\n rev: null,\n hreflang: null,\n media: null,\n title: null,\n type: null,\n },\n linkParams\n ),\n });\n })();\n\n /**\n * Convert LinkHeader to String\n *\n * @return {String}\n */\n self.toString = function toString() {\n var result = '<' + self.uriReference + '>'\n , params = [];\n\n forEach(\n self.linkParams,\n function(paramValue, paramName) {\n if(paramValue) {\n params.push(paramName + '=\"' + paramValue + '\"');\n }\n }\n );\n\n if(params.length < 1) {\n return result;\n }\n\n result = result + ';' + params.join(';');\n\n return result;\n };\n\n return this;\n }\n }\n})(\n angular.module('angular-hal.client'),\n angular.merge,\n angular.forEach\n);\n","(function(\n module,\n extend,\n merge\n) {\n 'use strict';\n\n // Add halCLient service\n module.service('halClient', HalClientService);\n module.service('$halClient', HalClientService);\n\n // Inject Dependencies\n HalClientService.$inject = [\n '$log',\n '$http',\n 'LinkHeader',\n '$halConfiguration',\n ];\n\n /**\n * @param {Log} $log\n * @param {Http} $http\n * @param {Function} LinkHeader\n * @param {Object} $halConfiguration\n * @deprecated The halClient service is deprecated. Please use $http directly instead.\n */\n function HalClientService($log, $http, LinkHeader, $halConfiguration) {\n var self = this;\n\n /**\n * @return Initialize halClient\n */\n (function init() {\n extend(self, {\n $get: $get,\n $post: $post,\n $put: $put,\n $patch: $patch,\n $delete: $delete,\n $del: $delete,\n $link: $link,\n $unlink: $unlink,\n LinkHeader: LinkHeader,\n });\n })();\n\n /* @ngNoInject */\n function $get(href, options) {\n return $request('GET', href, options);\n }\n\n function $post(href, options, data) {\n return $request('POST', href, options, data);\n }\n\n function $put(href, options, data) {\n return $request('PUT', href, options, data);\n }\n\n function $patch(href, options, data) {\n return $request('PATCH', href, options, data);\n }\n\n function $delete(href, options) {\n return $request('DELETE', href, options);\n }\n\n function $link(href, options, linkHeaders) {\n options = options || {};\n options.headers = options.headers || {};\n options.headers.Link = linkHeaders.map(function(link) { return link.toString(); });\n return $request('LINK', href, options);\n }\n\n function $unlink(href, options, linkHeaders) {\n options = options || {};\n options.headers = options.headers || {};\n options.headers.Link = linkHeaders.map(function(link) { return link.toString(); });\n return $request('UNLINK', href, options);\n }\n\n function $request(method, href, options, data) {\n options = options || {};\n $log.log('The halClient service is deprecated. Please use $http directly instead.');\n return $http(merge(options, {\n method: method,\n url: $halConfiguration.urlTransformer(href),\n data: data,\n }));\n }\n }\n})(\n angular.module('angular-hal.client'),\n angular.extend,\n angular.merge\n);\n","(function(\n angular\n) {\n 'use strict';\n\n // Combine needed Modules\n angular.module('angular-hal', [\n 'angular-hal.url-generator',\n 'angular-hal.content-type',\n 'angular-hal.http-interception',\n 'angular-hal.client',\n 'ng',\n ]);\n\n})(\n angular\n);\n"],"sourceRoot":"/source/"}