diff --git a/Gruntfile.js b/Gruntfile.js index 5ec9a23..b1dbadd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,33 +14,48 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), - ngmin: { + ngAnnotate: { + options: { + singleQuotes: true + }, ngForce: { - expand: true, - cwd: 'jsSrc', - src: ['*.js'], - dest: 'buildTmp/' + files: [{ + expand: true, + cwd: 'jsSrc', + ext: '.annotated.js', + src: ['*.js', 'subModules/*.js'], + dest: 'buildTmp' + }] + }, + dependencies: { + files: [{ + expand: true, + ext: '.annotated.js', + cwd: 'lib', + src: ['*.js'], + dest: 'buildTmp/lib' + }], } }, uglify: { options: { sourceMap: true, banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' + - '/*! visit https://noeticpenguin.github.io/ngForce for more info. */\n' + '/*! visit https://noeticpenguin.github.io/ngForce for more info. */\n' }, ngForce: { files: { - 'build/ngForce.min.js': ['buildTmp/*.js'] + 'build/ngForce.min.js': ['buildTmp/*.annotated.js', 'buildTmp/subModules/*.annotated.js'] } }, requirements: { files: { - 'build/ngForce-requirements.min.js': ['lib/*.js'] + 'build/ngForce-dependencies.min.js': ['buildTmp/lib/*.annotated.js'] } }, oneFile: { files: { - 'build/ngForceWithRequirements.min.js': ['lib/*.js', 'buildTmp/*.js'] + 'build/ngForceWithDependencies.min.js': ['build/ngForce-dependencies.min.js', 'build/ngForce.min.js'] } } }, @@ -192,12 +207,13 @@ module.exports = function(grunt) { // run ngMin, then uglify the the source into a single ngForce.min.js file. grunt.registerTask('min', function() { grunt.task.run([ - 'ngmin', + 'ngAnnotate:ngForce', + 'ngAnnotate:dependencies', 'uglify:ngForce', 'uglify:requirements', 'uglify:oneFile', 'clean:buildTmp' - ]); + ]); }); // Show available tasks. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..09474a2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 noeticpenguin/ngForce + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index cb88aba..f546996 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,19 @@ -ngForce -======= +![ngForce Logo](https://raw.githubusercontent.com/noeticpenguin/ngForce/master/images/logo_128x128.png) +ngForce is a set of Angular.js modules that facilitate quick and sustainable Angular.js application development on the Force.com Platform. With the Angular.js modules are a set of Apex classes facilitating Visualforce Remoting. -#Force.com Angular.js framework. +##Installation +To install, all you need to do is run `grunt deploy` and follow the prompts to deploy in sandbox and prod. -ngForce is a set of Angular.js modules that facilitate quick and sustainable Angular.js application development on the Force.com Platform. With the Angular.js modules are a set of Apex classes facilitating Visualforce Remoting. +If you only want to deploy into a sandbox org, run 'grunt deploy:test'. run 'grunt deploy:prod' to deploy into prod only. + +_Note:_ If you run into the following error, make sure to update the API version on the ngForce classes to version *31*: +``` +System.QueryException: No such column 'billingaddress' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. +Stack Trace: Class.ngForceController.sObjectKlone: line 237, column 1 Class.ngForceController_TEST.testSObjectKlone: line 304, column 1 +``` ##Architectural Overview. -ngForce is composed of a number of independent modules that are normally comiled/minified into a single .min.js file for use. However, advanced developers can adopt singular modules from the jsSrc directory, so long as the underlying requirements for ngForce are met: +ngForce is composed of a number of independent modules that are normally compiled/minified into a single .min.js file for use. However, advanced developers can adopt singular modules from the jsSrc directory, so long as the underlying requirements for ngForce are met: 1. Lo-Dash.js (or Underscore, but Lo-Dash is significantly faster) 2. safeApply.js - An Angular module in it's own right, this module provides a fire and forget method of syncing external data retreival with the Angular Run loop. @@ -14,22 +21,22 @@ ngForce is composed of a number of independent modules that are normally comiled #Services Overview. ## /jsSrc/ngForce-visualForceRemoting.js -This service provides methods for interacting with the force.com platform without burning API calls. It does this by providing both a generic Angular-ized wrapper for *Any visualforce remoting annotated method* in your org, as well as a set of pre-wired convienence methods from the acompanying ngForceController.cls. These largely handle CRUD, Bulk Create and Update as well as manipulation of fieldsets. +This service provides methods for interacting with the force.com platform without burning API calls. It does this by providing both a generic Angular-ized wrapper for *Any visualforce remoting annotated method* in your org, as well as a set of pre-wired convienence methods from the acompanying ngForceController.cls. These largely handle CRUD, Bulk Create and Update as well as manipulation of fieldsets. ### Methods of Note: vfr.send() - Send gives you the ability to on-demand generate a function that make a JSRemoting call to any @remoteAction annotated method in your org. This method accepts a fully qualified && namespaced method name specifying the remoteAction method to invoke as well as an Options hash and a boolean parameter determining if the remoteAction method is allowed to return a null response object. (for instance, delete.) *This method returns a function that, when invoked, makes a promised based visualforce remoting call* Using .send() you can: ```javascript - var makeChatterPost = vfr.send('Example.Controller.Method', options, false); + var makeChatterPost = vfr.send('Example.Controller.Method', options, false); ``` -once in your service, controller or app definition. Then you can call the method +once in your service, controller or app definition. Then you can call the method -```javascript +```javascript makeChatterPost("foo bar baz!"); ``` -to trigger the VisualForce Remoting call. -There are a number of convience methods pre-wired into the vfr module such as: +to trigger the VisualForce Remoting call. +There are a number of convience methods pre-wired into the vfr module such as: + bulkCreate + bulkUpdate @@ -52,13 +59,13 @@ There are a number of convience methods pre-wired into the vfr module such as: **Please note, This is a provider and as such, you can override the default "standardOptions" used by .send() and consequently by the convience methods in your app.setup method.** ## /jsSrc/ngForce-sfTemplate.js -This service provides methods for optimizing and "pre-building" Angular views from Visualforce .pages in your org. Salesforce, (as of Spring 14) still injects a number of javascript tags into the .HTML that the Visualforce engine generates. Some of these .js files are not well optimized for compositing complex views from partial templates. While loading any given single partial has a negligable impact on application speed from these scripts, compositing a page out of 15 partials *does*. This service, in conjunction with the AngularTemplateCache service, provides a way to pre-fetch the view, strip the extra .js include tags and push the HTML into the $TemplateCache. There is a noticable improvement in application load times using this. +This service provides methods for optimizing and "pre-building" Angular views from Visualforce .pages in your org. Salesforce, (as of Spring 14) still injects a number of javascript tags into the .HTML that the Visualforce engine generates. Some of these .js files are not well optimized for compositing complex views from partial templates. While loading any given single partial has a negligable impact on application speed from these scripts, compositing a page out of 15 partials *does*. This service, in conjunction with the AngularTemplateCache service, provides a way to pre-fetch the view, strip the extra .js include tags and push the HTML into the $TemplateCache. There is a noticable improvement in application load times using this. * This Method is also a provider, and allows you to reset the standard regex blacklist in the app.setup method. * ###Methods of Note: fromVf() - This method requests the template from Salesforce and utilizes the preset blacklist regex and strips offending js include statements from the fetched templates before inserting the template into the cache. ## /jsSrc/ngForce-sfrQuery -This service is *the* service by which one queries records in Salesforce via the *rest* api. It is entirely promise based and will as soon as the request has been *sent* to Salesforce. +This service is *the* service by which one queries records in Salesforce via the *rest* api. It is entirely promise based and will as soon as the request has been *sent* to Salesforce. ###Methods of Note: Query() - the query method accepts a string representation of a *soql* query. This query is handed - as is - to Salesforce only manipulating the string to ensure url-encodedness. Depending on the Query itself, the result will usually be an object of objects representing the resulting rows from Salesforce. Each of the rows returned is, itself a fully activated objects with the ability to call Update() etc. @@ -66,10 +73,10 @@ Query() - the query method accepts a string representation of a *soql* query. Th QueryAll() - This method is a double edged sword. If you need to have more than 2k records returned, this is the easiest method to do so. On the other hand, without an intentional Upper boundry in the query string itself, you can easily pull down 28k records. This will run your user's box out of memory, freeze their browser and in all likelyhood run you out of API calls if multiple people are using the service. *use wisely* ## /jsSrc/ngForce-sfrBackend -This service facilitates testing by providing custom expectations, mocks and testing utilities. +This service facilitates testing by providing custom expectations, mocks and testing utilities. ## /jsSrc/ngForce-sfrAnalytics.js -This service provides access to the Analytics Rest Api. +This service provides access to the Analytics Rest Api. ### Feel free to submit pull requests with more documentation on this one. @@ -77,8 +84,8 @@ This service provides access to the Analytics Rest Api. This is the main *rest* api service. It provides four main methods: 1. Model: this method returns a restangular object configured - for crud operations via the standard .post .get etc. methods - of restanglar. + for crud operations via the standard .post .get etc. methods + of restanglar. 2. Insert: A convience method, for ... inserting records. 3. Update: A convience method, for ... updating records. 4. Delete: a convience method, for ... deleting records. @@ -86,7 +93,7 @@ This is the main *rest* api service. It provides four main methods: What's important to know about the SFR service is that your queried object results return as a collection of SFR service enabled objects. Given a result set, each record has, for instance, an update() method. ## /jsSrc/ngForce-remoteObjects.js -This service exposes a factory for building Remote Object methods. This is the newest service and as such has had the least amount of real-world testing. +This service exposes a factory for building Remote Object methods. This is the newest service and as such has had the least amount of real-world testing. ## /jsSrc/ngForce-encodeUriQuery.js This service is used internally by the sfrBackground service to enable better testing. @@ -107,13 +114,120 @@ app.controller('oppBoxCtrl', function($scope, $dialog, vfr) ``` Thereafter in the controller you can utilize the ngForce services much like the $http, or $q services in Angular. -vfr, sfr, sfrquery and all the others return promises, and therefore your services can have a clean(er), less call-back-hell flow to them. +vfr, sfr, sfrquery and all the others return promises, and therefore your services can have a clean(er), less call-back-hell flow to them. + +External configuration +====================== + +Since Salesforce will not include merge field values inside static resources and parts of the library requiring these values there is a Visualforce page to facilitate exposing these values as a constant. An example of such a merge field is `{!$Api.Session_ID}`. + +The following values are exposed within the constant: + ++ sessionId ++ sitePrefix ++ resourceUrl + +## Usage +Ensure to include the external configuration Visualforce page immediately after you have included ngForce. + +``` + + +``` + +## Visualforce page +Below is what the external configuration Visualforce page looks like: + +``` + +(function(angular){ + + var sitePrefix = '{!$Site.Prefix}'; + if(sitePrefix === '') sitePrefix ='/apex'; + + angular.module('ngForce.config', []).constant('ngForceConfig', { + sessionId: '{!$Api.Session_ID}', + sitePrefix: sitePrefix, + resourceUrl: '{!URLFOR($Resource.bundle)}' + }); + +})(angular); + +``` + +### Constant - sessionId +This the session ID of the currently logged in user. It is used to connect to the REST and analytics API. + +Although you can use this within your own application, the use of the sessionId within the ngForce library is automatic and requires no configuration. + +Do not remove this from the external configuration as this is mandatory for authenticating with Salesforce. + +### Constant - sitePrefix + +When loading templates which are Visualforce pages use the `ngForceConfig.sitePrefix` constant to create the correct relative path. Normally, pages are loaded using `/apex` prefix, however when loading within a Salesforce site a different prefix maybe in use. For example, if the Salesforce site is named `mySite` then the prefix will be `/mySite`. + +#### Example usage +This is an example of how to use the `ngForceConfig.sitePrefix` constant. + +``` +angular.module('app').config(function($routeProvider, ngForceConfig){ + + $routeProvider. + when('/home', { + templateUrl: ngForceConfig.sitePrefix + '/home', + controller: 'HomeController' + }). + when('/about', { + templateUrl: ngForceConfig.sitePrefix + '/about', + controller: 'AboutController' + }). + otherwise({ redirectTo: '/' }); + +}); +``` + +### Constant - resourceUrl +If you wish to load templates from within a static resource then you can use the `ngForceConfig.resourceUrl` constant to get the full path to the templates folder. + +#### Example usage +This is an example of how to use the `ngForceConfig.resourceUrl` constant. + +``` +angular.module('app').config(function($routeProvider, ngForceConfig){ + + $routeProvider. + when('/home', { + templateUrl: ngForceConfig.resourceUrl + '/views/home.html', + controller: 'HomeController' + }). + when('/about', { + templateUrl: ngForceConfig.resourceUrl + '/views/about.html', + controller: 'AboutController' + }). + otherwise({ redirectTo: '/' }); + +}); +``` + +Grunt tasks +=========== +We use Grunt to not only minify and combine the JS sources, but also to build a .staticResource file and deploy it to Salesforce orgs. In addition to the static resource with the JS files, the grunt deploy tasks push the ngForceController.cls and it's two test classes. The deploy process is interactive, and requires you to know your login, password and Security token. Here's a list of useful grunt tasks, and what they do: + +``` +default => Alias for "min" task. +deploy => Refreshes resources and deploys to selected env (test|prod) +min => Custom task. +ngmin > Annotate AngularJS scripts for minification +refreshResources => Refresh the staticResource.zip files +tasks => Alias for "availabletasks" task. +uglify > Minify files with UglifyJS. (ngForce|requirements|oneFile) +``` Why is this important? ====================== -The Deferred / Promise pattern in Angular is a simplified version of the Q library by Kris Kowal (https://github.com/kriskowal/q) It provides a deferred object prototype with, as of Angular.js 1.1.5, just two methods, resolve and reject; and a singular property: promise. -The promise object held by the deferred object's promise property has a single method, .then() which is used to complete promises. -Finally, Angular provides the $q service, which provides the constructor for building deferred objects, as well as an additional two methods, .all() and .when() +The Deferred / Promise pattern in Angular is a simplified version of the Q library by Kris Kowal (https://github.com/kriskowal/q) It provides a deferred object prototype with, as of Angular.js 1.1.5, just two methods, resolve and reject; and a singular property: promise. +The promise object held by the deferred object's promise property has a single method, .then() which is used to complete promises. +Finally, Angular provides the $q service, which provides the constructor for building deferred objects, as well as an additional two methods, .all() and .when() Semantically, these are combined with the logic that you Defer some *work* with the *promise* to complete it, and *then* once it's complete, you act on it. @@ -126,7 +240,7 @@ pOppQuery.then(function(d) { }); ``` -In our example above, we're calling the vfr service to make a SOQL query. This is our act of *deferring* some work -- querying Salesforce --. Vfr returns a *promise* to complete that work, which we assign to the variable pOppQuery. We call the .then() method to do some work when our promised work has been completed. +In our example above, we're calling the vfr service to make a SOQL query. This is our act of *deferring* some work -- querying Salesforce --. Vfr returns a *promise* to complete that work, which we assign to the variable pOppQuery. We call the .then() method to do some work when our promised work has been completed. Now, if that was the extent of what you could do with Deferred / Promises it'd be a nice improvement over callback hell. However, the fun doesn't end there. If your .then() method returns a promise, you can create chains promise execution -- enforcing order execution amidst asynchronous work. Here's what that looks like: @@ -156,7 +270,7 @@ vfr.query("SELECT Id, Active__c, Site, Type, Industry, Name, AccountNumber, Numb }); ``` -This pattern is extremely useful when you're creating, for instance, an object with several child objects. In the first promise you create the parent object, and in the following promise you create the first child object -- in this second promise you'll have access to the Id of the created object, etc. +This pattern is extremely useful when you're creating, for instance, an object with several child objects. In the first promise you create the parent object, and in the following promise you create the first child object -- in this second promise you'll have access to the Id of the created object, etc. Finally, at the very end of the chain, you can append an error handling function. If any of the promises are rejected the following promises will also be rejected passing the error message on to the error function. @@ -169,12 +283,12 @@ var pQuery2 = vfr.query("Select Id from Contact"); $q.all(pQuery1, pQuery2).then(function{ // Both of these promises are guaranteed to be completed successfully. }); -``` +``` Using the vfr helper methods ======================== -vfr provides some helper methods that are intended to make the developers life simpler. Most of these are self explanitory but a couple of them are a bit more esoteric. +vfr provides some helper methods that are intended to make the developers life simpler. Most of these are self explanitory but a couple of them are a bit more esoteric. Perhaps the most confusing is the bulkCreate method. You can invoke the bulk create method thusly: ```javascript @@ -199,13 +313,13 @@ pBulkCreateCall.then(function(results){ "11":{"propA":3,"End_date__c":"2013-08-21T11:29:27.365Z"} } -// I generated that with: +// I generated that with: var dataRows = {}; for(var i=0; i < 12; i++) { dataRows[i] = {'propA':3, 'End_date__c': new Date()}; } -// Each of the child objects should be independently insertable via the vfr.create method -- +// Each of the child objects should be independently insertable via the vfr.create method -- // ie: should be a json representation of the object. ``` diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..d6263d0 --- /dev/null +++ b/bower.json @@ -0,0 +1,24 @@ +{ + "name": "ngForce", + "version": "3.0.3", + "homepage": "https://github.com/noeticpenguin/ngForce", + "authors": [ + "Kevin Poorman " + ], + "description": "Force.com Angular.js framework.", + "main": [ + "./build/ngForceWithDependencies.min.js" + ], + "keywords": [ + "salesforce", + "angular" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} \ No newline at end of file diff --git a/build/ngForce-dependencies.min.js b/build/ngForce-dependencies.min.js new file mode 100644 index 0000000..2591e44 --- /dev/null +++ b/build/ngForce-dependencies.min.js @@ -0,0 +1,6 @@ +/*! ngForce 2014-12-03 */ +/*! visit https://noeticpenguin.github.io/ngForce for more info. */ + +"use strict";function StringView(a,b,c,d){var e,f,g,h,i,j,k=isFinite(c)?c:0,l=15;b&&(this.encoding=b.toString());a:switch(this.encoding){case"UTF-8":h=StringView.putUTF8CharCode,i=StringView.getUTF8CharLength,e=Uint8Array;break a;case"UTF-16":h=StringView.putUTF16CharCode,i=StringView.getUTF16CharLength,e=Uint16Array;break a;case"UTF-32":e=Uint32Array,l&=14;break a;default:e=Uint8Array,l&=14}a:switch(typeof a){case"string":l&=7;break a;case"object":switch(a.constructor){case StringView:l&=3;break a;case String:l&=7;break a;case ArrayBuffer:f=new e(a),j="UTF-32"===this.encoding?a.byteLength>>>2:"UTF-16"===this.encoding?a.byteLength>>>1:a.byteLength,g=0!==k||isFinite(d)&&d!==j?new e(a,k,isFinite(d)?d:j-k):f;break a;case Uint32Array:case Uint16Array:case Uint8Array:e=a.constructor,j=a.length,f=0===a.byteOffset&&a.length===(e===Uint32Array?a.buffer.byteLength>>>2:e===Uint16Array?a.buffer.byteLength>>>1:a.buffer.byteLength)?a:new e(a.buffer),g=0!==k||isFinite(d)&&d!==j?a.subarray(k,isFinite(d)?k+d:j):a;break a;default:f=new e(a),j=f.length,g=0!==k||isFinite(d)&&d!==j?f.subarray(k,isFinite(d)?k+d:j):f}break a;default:f=g=new e(Number(a)||0)}if(8>l){var m,n,o,p,q,r,s;4&l?(m=a,n=j=m.length,l^="UTF-32"===this.encoding?0:2,k=o=c?Math.max((n+c)%n,0):0,q=p=(Number.isInteger(d)?Math.min(Math.max(d,0)+k,n):n)-1):(m=a.rawData,j=a.makeIndex(),k=o=c?Math.max((j+c)%j,0):0,n=Number.isInteger(d)?Math.min(Math.max(d,0),j-o):j,q=p=n+o,"UTF-8"===a.encoding?(r=StringView.getUTF8CharLength,s=StringView.loadUTF8CharCode):"UTF-16"===a.encoding?(r=StringView.getUTF16CharLength,s=StringView.loadUTF16CharCode):l&=1),(0===n||4>l&&m.encoding===this.encoding&&0===o&&n===j)&&(l=7);a:switch(l){case 0:f=new e(n);for(var t=0;n>t;f[t]=m[k+t++]);break a;case 1:n=0;for(var u=k;q>u;u++)n+=i(m[u]);f=new e(n);for(var u=k,t=0;n>t;u++)t=h(f,m[u],t);break a;case 2:k=0;var v;for(w=0;o>w;w++)v=s(m,k),k+=r(v);f=new e(n);for(var u=k,t=0;n>t;u+=r(v),t++)v=s(m,u),f[t]=v;break a;case 3:n=0;for(var v,w=0,u=0;p>w;u+=r(v))v=s(m,u),w===o&&(k=u),++w>o&&(n+=i(v));f=new e(n);for(var u=k,t=0;n>t;u+=r(v))v=s(m,u),t=h(f,v,t);break a;case 4:f=new e(n);for(var x=0;n>x;x++)f[x]=255&m.charCodeAt(x);break a;case 5:n=0;for(var y=0;j>y;y++)y===o&&(k=n),n+=i(m.charCodeAt(y)),y===p&&(q=n);f=new e(n);for(var t=0,w=0;n>t;w++)t=h(f,m.charCodeAt(w),t);break a;case 6:f=new e(n);for(var x=0;n>x;x++)f[x]=m.charCodeAt(x);break a;case 7:f=new e(n?m:0)}g=l>3&&(k>0||q-1?0:-1:b?0:-1}function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:u+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function d(a){return a.charCodeAt(0)}function e(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}function f(a){var b=-1,d=a.length,e=a[0],f=a[d/2|0],g=a[d-1];if(e&&"object"==typeof e&&f&&"object"==typeof f&&g&&"object"==typeof g)return!1;var h=i();h["false"]=h["null"]=h["true"]=h.undefined=!1;var j=i();for(j.array=a,j.cache=h,j.push=c;++be?0:e);++d=v&&g===a,j=[];if(i){var k=f(d);k?(g=b,d=k):i=!1}for(;++e-1:void 0});return e.pop(),f.pop(),t&&(l(e),l(f)),g}function ib(a,b,c,d,e){(ke(b)?dc:ye)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=ke(b))||ze(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?ke(j)?j:[]:ze(j)?j:{}),d.push(b),e.push(j),l||ib(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function jb(a,b){return a+Od(ee()*(b-a+1))}function kb(c,d,e){var g=-1,i=pb(),j=c?c.length:0,k=[],n=!d&&j>=v&&i===a,o=e||n?h():k;if(n){var p=f(o);i=b,o=p}for(;++g3&&"function"==typeof b[c-2])var d=cb(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(d=b[--c]);for(var e=n(arguments,1,c),f=-1,g=h(),i=h();++fc?be(0,f+c):c)||0,ke(a)?g=e(a,b,c)>-1:"number"==typeof f?g=(Qb(a)?a.indexOf(b,c):e(a,b,c))>-1:ue(a,function(a){return++d>=c?!(g=a===b):void 0}),g}function _b(a,b,c){var d=!0;if(b=q.createCallback(b,c,3),ke(a))for(var e=-1,f=a.length;++ef&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);g>e&&(e=g,f=a)});return f}function ic(a,b,c){var e=1/0,f=e;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&ke(a))for(var g=-1,h=a.length;++gi&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);e>g&&(e=g,f=a)});return f}function jc(a,b,c,d){var e=arguments.length<3;if(b=q.createCallback(b,d,4),ke(a)){var f=-1,g=a.length;for(e&&(c=a[++f]);++fd?be(0,e+d):d||0}else if(d){var f=Hc(b,c);return b[f]===c?f:-1}return a(b,c,d)}function zc(a,b,c){var d=0,e=a?a.length:0;if("number"!=typeof b&&null!=b){var f=e;for(b=q.createCallback(b,c,3);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return n(a,0,ce(be(0,e-d),e))}function Ac(){for(var c=[],d=-1,e=arguments.length,g=h(),i=pb(),j=i===a,k=h();++d=v&&f(d?c[d]:k)))}var o=c[0],p=-1,q=o?o.length:0,r=[];a:for(;++pc?be(0,d+c):ce(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function Dc(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++ce;){var g=e+f>>>1;c(a[g])1?arguments:arguments[0],b=-1,c=a?hc(De(a,"length")):0,d=ud(0>c?0:c);++b2?mb(a,17,n(arguments,2),null,b):mb(a,1,null,null,b)}function Qc(a){for(var b=arguments.length>1?gb(arguments,!0,!1,1):Bb(a),c=-1,d=b.length;++c2?mb(b,19,n(arguments,2),null,a):mb(b,3,null,null,a)}function Sc(){for(var a=arguments,b=a.length;b--;)if(!Kb(a[b]))throw new Ed;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Tc(a,b){return b="number"==typeof b?b:+b||a.length,mb(a,4,null,null,null,b)}function Uc(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!Kb(a))throw new Ed;if(b=be(0,b)||0,c===!0){var n=!0;m=!1}else Lb(c)&&(n=c.leading,l="maxWait"in c&&(be(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-(Fe()-g);if(0>=c){e&&Nd(e);var l=j;e=i=j=p,l&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))}else i=Ud(o,c)},q=function(){i&&Nd(i),e=i=j=p,(m||l!==b)&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=Fe(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var p=l-(g-k),r=0>=p;r?(e&&(e=Nd(e)),k=g,f=a.apply(h,d)):e||(e=Ud(q,p))}return r&&i?i=Nd(i):i||b===l||(i=Ud(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Vc(a){if(!Kb(a))throw new Ed;var b=n(arguments,1);return Ud(function(){a.apply(p,b)},1)}function Wc(a,b){if(!Kb(a))throw new Ed;var c=n(arguments,2);return Ud(function(){a.apply(p,c)},b)}function Xc(a,b){if(!Kb(a))throw new Ed;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):u+arguments[0];return Rd.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Yc(a){var b,c;if(!Kb(a))throw new Ed;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Zc(a){return mb(a,16,n(arguments,1))}function $c(a){return mb(a,32,null,n(arguments,1))}function _c(a,b,c){var d=!0,e=!0;if(!Kb(a))throw new Ed;return c===!1?d=!1:Lb(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),X.leading=d,X.maxWait=b,X.trailing=e,Uc(a,b,X)}function ad(a,b){return mb(b,16,[a])}function bd(a){return function(){return a}}function cd(a,b,c){var d=typeof a;if(null==a||"function"==d)return cb(a,b,c);if("object"!=d)return id(a);var e=me(a),f=e[0],g=a[f];return 1!=e.length||g!==g||Lb(g)?function(b){for(var c=e.length,d=!1;c--&&(d=hb(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function dd(a){return null==a?"":Dd(a).replace(te,ob)}function ed(a){return a}function fd(a,b,c){var d=!0,e=b&&Bb(b);b&&(c||e.length)||(null==c&&(c=b),f=r,b=a,a=q,e=Bb(b)),c===!1?d=!1:Lb(c)&&"chain"in c&&(d=c.chain);var f=a,g=Kb(f);dc(e,function(c){var e=a[c]=b[c];g&&(f.prototype[c]=function(){var b=this.__chain__,c=this.__wrapped__,g=[c];Sd.apply(g,arguments);var h=e.apply(a,g);if(d||b){if(c===h&&Lb(h))return this;h=new f(h),h.__chain__=b}return h})})}function gd(){return c._=Jd,this}function hd(){}function id(a){return function(b){return b[a]}}function jd(a,b,c){var d=null==a,e=null==b;if(null==c&&("boolean"==typeof a&&e?(c=a,a=1):e||"boolean"!=typeof b||(c=b,e=!0)),d&&e&&(b=1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=ee();return ce(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return jb(a,b)}function kd(a,b){if(a){var c=a[b];return Kb(c)?a[b]():c}}function ld(a,b,c){var d=q.templateSettings;a=Dd(a||""),c=we({},c,d);var e,f=we({},c.imports,d.imports),h=me(f),i=Yb(f),j=0,k=c.interpolate||G,l="__p += '",m=Cd((c.escape||G).source+"|"+k.source+"|"+(k===E?B:G).source+"|"+(c.evaluate||G).source+"|$","g");a.replace(m,function(b,c,d,f,h,i){return d||(d=f),l+=a.slice(j,i).replace(I,g),c&&(l+="' +\n__e("+c+") +\n'"),h&&(e=!0,l+="';\n"+h+";\n__p += '"),d&&(l+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),j=i+b.length,b}),l+="';\n";var n=c.variable,o=n;o||(n="obj",l="with ("+n+") {\n"+l+"\n}\n"),l=(e?l.replace(y,""):l).replace(z,"$1").replace(A,"$1;"),l="function("+n+") {\n"+(o?"":n+" || ("+n+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var r="\n/*\n//# sourceURL="+(c.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var s=yd(h,"return "+l+r).apply(p,i)}catch(t){throw t.source=l,t}return b?s(b):(s.source=l,s)}function md(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=ud(a);for(b=cb(b,c,1);++d/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:q}};var ie=function(a){var b="var index, iterable = "+a.firstArg+", result = "+a.init+";\nif (!iterable) return result;\n"+a.top+";";a.array?(b+="\nvar length = iterable.length; index = -1;\nif ("+a.array+") { ",he.unindexedChars&&(b+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),b+="\n while (++index < length) {\n "+a.loop+";\n }\n}\nelse { "):he.nonEnumArgs&&(b+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+a.loop+";\n }\n } else { "),he.enumPrototypes&&(b+="\n var skipProto = typeof iterable == 'function';\n "),he.enumErrorProps&&(b+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var c=[];if(he.enumPrototypes&&c.push('!(skipProto && index == "prototype")'),he.enumErrorProps&&c.push('!(skipErrorProps && (index == "message" || index == "name"))'),a.useHas&&a.keys)b+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ";else if(b+="\n for (index in iterable) {\n",a.useHas&&c.push("hasOwnProperty.call(iterable, index)"),c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ",he.nonEnumShadows){for(b+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;7>k;k++)b+="\n index = '"+a.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",a.useHas||(b+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),b+=") {\n "+a.loop+";\n } ";b+="\n } "}return(a.array||he.nonEnumArgs)&&(b+="\n}"),b+=a.bottom+";\nreturn result"};Yd||(bb=function(){function a(){}return function(b){if(Lb(b)){a.prototype=b;var d=new a;a.prototype=null}return d||c.Object()}}());var je=Xd?function(a,b){Y.value=b,Xd(a,"__bindData__",Y)}:hd;he.argsClass||(tb=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Rd.call(a,"callee")&&!Td.call(a,"callee")||!1});var ke=Zd||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Kd.call(a)==N||!1},le=nb({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),me=ae?function(a){return Lb(a)?he.enumPrototypes&&"function"==typeof a||he.nonEnumArgs&&a.length&&tb(a)?le(a):ae(a):[]}:le,ne={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:me,loop:"if (callback(iterable[index], index, collection) === false) return result"},oe={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:me,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},pe={top:"if (!objectTypes[typeof iterable]) return result;\n"+ne.top,array:!1},qe={"&":"&","<":"<",">":">",'"':""","'":"'"},re=Db(qe),se=Cd("("+me(re).join("|")+")","g"),te=Cd("["+me(qe).join("")+"]","g"),ue=nb(ne),ve=nb(oe,{top:oe.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),we=nb(oe),xe=nb(ne,pe,{useHas:!1}),ye=nb(ne,pe);Kb(/x/)&&(Kb=function(a){return"function"==typeof a&&Kd.call(a)==R});var ze=Qd?function(a){if(!a||Kd.call(a)!=T||!he.argsClass&&tb(a))return!1;var b=a.valueOf,c=qb(b)&&(c=Qd(b))&&Qd(c);return c?a==c||Qd(a)==c:rb(a)}:rb,Ae=lb(function(a,b,c){Rd.call(a,c)?a[c]++:a[c]=1}),Be=lb(function(a,b,c){(Rd.call(a,c)?a[c]:a[c]=[]).push(b)}),Ce=lb(function(a,b,c){a[c]=b}),De=gc,Ee=ac,Fe=qb(Fe=wd.now)&&Fe||function(){return(new wd).getTime()},Ge=8==de(x+"08")?de:function(a,b){return de(Qb(a)?a.replace(F,""):a,b||0)};return q.after=Oc,q.assign=ve,q.at=Zb,q.bind=Pc,q.bindAll=Qc,q.bindKey=Rc,q.chain=pd,q.compact=sc,q.compose=Sc,q.constant=bd,q.countBy=Ae,q.create=wb,q.createCallback=cd,q.curry=Tc,q.debounce=Uc,q.defaults=we,q.defer=Vc,q.delay=Wc,q.difference=tc,q.filter=ac,q.flatten=xc,q.forEach=dc,q.forEachRight=ec,q.forIn=xe,q.forInRight=zb,q.forOwn=ye,q.forOwnRight=Ab,q.functions=Bb,q.groupBy=Be,q.indexBy=Ce,q.initial=zc,q.intersection=Ac,q.invert=Db,q.invoke=fc,q.keys=me,q.map=gc,q.mapValues=Sb,q.max=hc,q.memoize=Xc,q.merge=Tb,q.min=ic,q.omit=Ub,q.once=Yc,q.pairs=Vb,q.partial=Zc,q.partialRight=$c,q.pick=Wb,q.pluck=De,q.property=id,q.pull=Dc,q.range=Ec,q.reject=lc,q.remove=Fc,q.rest=Gc,q.shuffle=nc,q.sortBy=qc,q.tap=qd,q.throttle=_c,q.times=md,q.toArray=rc,q.transform=Xb,q.union=Ic,q.uniq=Jc,q.values=Yb,q.where=Ee,q.without=Kc,q.wrap=ad,q.xor=Lc,q.zip=Mc,q.zipObject=Nc,q.collect=gc,q.drop=Gc,q.each=dc,q.eachRight=ec,q.extend=ve,q.methods=Bb,q.object=Nc,q.select=ac,q.tail=Gc,q.unique=Jc,q.unzip=Mc,fd(q),q.clone=ub,q.cloneDeep=vb,q.contains=$b,q.escape=dd,q.every=_b,q.find=bc,q.findIndex=uc,q.findKey=xb,q.findLast=cc,q.findLastIndex=vc,q.findLastKey=yb,q.has=Cb,q.identity=ed,q.indexOf=yc,q.isArguments=tb,q.isArray=ke,q.isBoolean=Eb,q.isDate=Fb,q.isElement=Gb,q.isEmpty=Hb,q.isEqual=Ib,q.isFinite=Jb,q.isFunction=Kb,q.isNaN=Mb,q.isNull=Nb,q.isNumber=Ob,q.isObject=Lb,q.isPlainObject=ze,q.isRegExp=Pb,q.isString=Qb,q.isUndefined=Rb,q.lastIndexOf=Cc,q.mixin=fd,q.noConflict=gd,q.noop=hd,q.now=Fe,q.parseInt=Ge,q.random=jd,q.reduce=jc,q.reduceRight=kc,q.result=kd,q.runInContext=o,q.size=oc,q.some=pc,q.sortedIndex=Hc,q.template=ld,q.unescape=nd,q.uniqueId=od,q.all=_b,q.any=pc,q.detect=bc,q.findWhere=bc,q.foldl=jc,q.foldr=kc,q.include=$b,q.inject=jc,fd(function(){var a={}; +return ye(q,function(b,c){q.prototype[c]||(a[c]=b)}),a}(),!1),q.first=wc,q.last=Bc,q.sample=mc,q.take=wc,q.head=wc,ye(q,function(a,b){var c="sample"!==b;q.prototype[b]||(q.prototype[b]=function(b,d){var e=this.__chain__,f=a(this.__wrapped__,b,d);return e||null!=b&&(!d||c&&"function"==typeof b)?new r(f,e):f})}),q.VERSION="2.4.1",q.prototype.chain=rd,q.prototype.toString=sd,q.prototype.value=td,q.prototype.valueOf=td,ue(["join","pop","shift"],function(a){var b=Fd[a];q.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new r(c,a):c}}),ue(["push","reverse","sort","unshift"],function(a){var b=Fd[a];q.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),ue(["concat","slice","splice"],function(a){var b=Fd[a];q.prototype[a]=function(){return new r(b.apply(this.__wrapped__,arguments),this.__chain__)}}),he.spliceObjects||ue(["pop","shift","splice"],function(a){var b=Fd[a],c="splice"==a;q.prototype[a]=function(){var a=this.__chain__,d=this.__wrapped__,e=b.apply(d,arguments);return 0===d.length&&delete d[0],a||c?new r(e,a):e}}),q}var p,q=[],r=[],s=0,t={},u=+new Date+"",v=75,w=40,x=" \f \n\r\u2028\u2029 ᠎              ",y=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,A=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,F=RegExp("^["+x+"]*0+(?=.$)"),G=/($^)/,H=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,J=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],K=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],L=0,M="[object Arguments]",N="[object Array]",O="[object Boolean]",P="[object Date]",Q="[object Error]",R="[object Function]",S="[object Number]",T="[object Object]",U="[object RegExp]",V="[object String]",W={};W[R]=!1,W[M]=W[N]=W[O]=W[P]=W[S]=W[T]=W[U]=W[V]=!0;var X={leading:!1,maxWait:0,trailing:!1},Y={configurable:!1,enumerable:!1,value:null,writable:!1},Z={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},$={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},_={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ab=$[typeof window]&&window||this,bb=$[typeof exports]&&exports&&!exports.nodeType&&exports,cb=$[typeof module]&&module&&!module.nodeType&&module,db=cb&&cb.exports===bb&&bb,eb=$[typeof global]&&global;!eb||eb.global!==eb&&eb.window!==eb||(ab=eb);var fb=o();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ab._=fb,define(function(){return fb})):bb&&cb?db?(cb.exports=fb)._=fb:bb._=fb:ab._=fb}).call(this),function(){var a=angular.module("restangular",[]);a.provider("Restangular",function(){var a={};a.init=function(a,b){function c(a,b,c,d){var e={};return _.each(_.keys(d),function(f){var g=d[f];g.params=_.extend({},g.params,a.defaultRequestParams[g.method.toLowerCase()]),_.isEmpty(g.params)&&delete g.params,e[f]=a.isSafe(g.method)?function(){return b(_.extend(g,{url:c}))}:function(a){return b(_.extend(g,{url:c,data:a}))}}),e}a.configuration=b;var d=["get","head","options","trace","getlist"];b.isSafe=function(a){return _.contains(d,a.toLowerCase())};var e=/^https?:\/\//i;b.isAbsoluteUrl=function(a){return _.isUndefined(b.absoluteUrl)||_.isNull(b.absoluteUrl)?a&&e.test(a):b.absoluteUrl},b.absoluteUrl=_.isUndefined(b.absoluteUrl)?!0:b.absoluteUrl,a.setSelfLinkAbsoluteUrl=function(a){b.absoluteUrl=a},b.baseUrl=_.isUndefined(b.baseUrl)?"":b.baseUrl,a.setBaseUrl=function(a){return b.baseUrl=/\/$/.test(a)?a.substring(0,a.length-1):a,this},b.extraFields=b.extraFields||[],a.setExtraFields=function(a){return b.extraFields=a,this},b.defaultHttpFields=b.defaultHttpFields||{},a.setDefaultHttpFields=function(a){return b.defaultHttpFields=a,this},b.withHttpValues=function(a,c){return _.defaults(c,a,b.defaultHttpFields)},b.encodeIds=_.isUndefined(b.encodeIds)?!0:b.encodeIds,a.setEncodeIds=function(a){b.encodeIds=a},b.defaultRequestParams=b.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},a.setDefaultRequestParams=function(a,c){var d=[],e=c||a;return _.isUndefined(c)?d.push("common"):_.isArray(a)?d=a:d.push(a),_.each(d,function(a){b.defaultRequestParams[a]=e}),this},a.requestParams=b.defaultRequestParams,b.defaultHeaders=b.defaultHeaders||{},a.setDefaultHeaders=function(c){return b.defaultHeaders=c,a.defaultHeaders=b.defaultHeaders,this},a.defaultHeaders=b.defaultHeaders,b.methodOverriders=b.methodOverriders||[],a.setMethodOverriders=function(a){var c=_.extend([],a);return b.isOverridenMethod("delete",c)&&c.push("remove"),b.methodOverriders=c,this},b.jsonp=_.isUndefined(b.jsonp)?!1:b.jsonp,a.setJsonp=function(a){b.jsonp=a},b.isOverridenMethod=function(a,c){var d=c||b.methodOverriders;return!_.isUndefined(_.find(d,function(b){return b.toLowerCase()===a.toLowerCase()}))},b.urlCreator=b.urlCreator||"path",a.setUrlCreator=function(a){if(!_.has(b.urlCreatorFactory,a))throw new Error("URL Path selected isn't valid");return b.urlCreator=a,this},b.restangularFields=b.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save"},a.setRestangularFields=function(a){return b.restangularFields=_.extend(b.restangularFields,a),this},b.isRestangularized=function(a){return!!a[b.restangularFields.one]||!!a[b.restangularFields.all]},b.setFieldToElem=function(a,b,c){var d=a.split("."),e=b;return _.each(_.initial(d),function(a){e[a]={},e=e[a]}),e[_.last(d)]=c,this},b.getFieldFromElem=function(a,b){var c=a.split("."),d=b;return _.each(c,function(a){d&&(d=d[a])}),angular.copy(d)},b.setIdToElem=function(a,c){return b.setFieldToElem(b.restangularFields.id,a,c),this},b.getIdFromElem=function(a){return b.getFieldFromElem(b.restangularFields.id,a)},b.isValidId=function(a){return""!==a&&!_.isUndefined(a)&&!_.isNull(a)},b.setUrlToElem=function(a,c){return b.setFieldToElem(b.restangularFields.selfLink,a,c),this},b.getUrlFromElem=function(a){return b.getFieldFromElem(b.restangularFields.selfLink,a)},b.useCannonicalId=_.isUndefined(b.useCannonicalId)?!1:b.useCannonicalId,a.setUseCannonicalId=function(a){return b.useCannonicalId=a,this},b.getCannonicalIdFromElem=function(a){var c=a[b.restangularFields.cannonicalId],d=b.isValidId(c)?c:b.getIdFromElem(a);return d},b.responseInterceptors=b.responseInterceptors||[],b.defaultResponseInterceptor=function(a){return a},b.responseExtractor=function(a,c,d,e,f,g){var h=angular.copy(b.responseInterceptors);h.push(b.defaultResponseInterceptor);var i=a;return _.each(h,function(a){i=a(i,c,d,e,f,g)}),i},a.addResponseInterceptor=function(a){return b.responseInterceptors.push(a),this},a.setResponseInterceptor=a.addResponseInterceptor,a.setResponseExtractor=a.addResponseInterceptor,b.requestInterceptors=b.requestInterceptors||[],b.defaultInterceptor=function(a,b,c,d,e,f,g){return{element:a,headers:e,params:f,httpConfig:g}},b.fullRequestInterceptor=function(a,c,d,e,f,g,h){var i=angular.copy(b.requestInterceptors),j=b.defaultInterceptor(a,c,d,e,f,g,h);return _.reduce(i,function(a,b){return _.extend(a,b(a.element,c,d,e,a.headers,a.params,a.httpConfig))},j)},a.addRequestInterceptor=function(a){return b.requestInterceptors.push(function(b,c,d,e,f,g,h){return{headers:f,params:g,element:a(b,c,d,e),httpConfig:h}}),this},a.setRequestInterceptor=a.addRequestInterceptor,a.addFullRequestInterceptor=function(a){return b.requestInterceptors.push(a),this},a.setFullRequestInterceptor=a.addFullRequestInterceptor,b.errorInterceptor=b.errorInterceptor||function(){},a.setErrorInterceptor=function(a){return b.errorInterceptor=a,this},b.onBeforeElemRestangularized=b.onBeforeElemRestangularized||function(a){return a},a.setOnBeforeElemRestangularized=function(a){return b.onBeforeElemRestangularized=a,this},b.onElemRestangularized=b.onElemRestangularized||function(a){return a},a.setOnElemRestangularized=function(a){return b.onElemRestangularized=a,this},b.shouldSaveParent=b.shouldSaveParent||function(){return!0},a.setParentless=function(a){return _.isArray(a)?b.shouldSaveParent=function(b){return!_.contains(a,b)}:_.isBoolean(a)&&(b.shouldSaveParent=function(){return!a}),this},b.suffix=_.isUndefined(b.suffix)?null:b.suffix,a.setRequestSuffix=function(a){return b.suffix=a,this},b.transformers=b.transformers||{},a.addElementTransformer=function(c,d,e){var f=null,g=null;2===arguments.length?g=d:(g=e,f=d);var h=b.transformers[c];return h||(h=b.transformers[c]=[]),h.push(function(a,b){return _.isNull(f)||a==f?g(b):b}),a},a.extendCollection=function(b,c){return a.addElementTransformer(b,!0,c)},a.extendModel=function(b,c){return a.addElementTransformer(b,!1,c)},b.transformElem=function(a,c,d,e,f){if(!f&&!b.transformLocalElements&&!a[b.restangularFields.fromServer])return a;var g=b.transformers[d],h=a;return g&&_.each(g,function(a){h=a(c,h)}),b.onElemRestangularized(h,c,d,e)},b.transformLocalElements=_.isUndefined(b.transformLocalElements)?!1:b.transformLocalElements,a.setTransformOnlyServerElements=function(a){b.transformLocalElements=!a},b.fullResponse=_.isUndefined(b.fullResponse)?!1:b.fullResponse,a.setFullResponse=function(a){return b.fullResponse=a,this},b.urlCreatorFactory={};var f=function(){};f.prototype.setConfig=function(a){return this.config=a,this},f.prototype.parentsArray=function(a){for(var b=[];a;)b.push(a),a=a[this.config.restangularFields.parentResource];return b.reverse()},f.prototype.resource=function(a,d,e,f,g,h,i,j){var k=_.defaults(g||{},this.config.defaultRequestParams.common),l=_.defaults(f||{},this.config.defaultHeaders);i&&(b.isSafe(j)?l["If-None-Match"]=i:l["If-Match"]=i);var m=this.base(a);if(h){var n="";/\/$/.test(m)||(n+="/"),n+=h,m+=n}return this.config.suffix&&-1===m.indexOf(this.config.suffix,m.length-this.config.suffix.length)&&!this.config.getUrlFromElem(a)&&(m+=this.config.suffix),a[this.config.restangularFields.httpConfig]=void 0,c(this.config,d,m,{getList:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),get:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),jsonp:this.config.withHttpValues(e,{method:"jsonp",params:k,headers:l}),put:this.config.withHttpValues(e,{method:"PUT",params:k,headers:l}),post:this.config.withHttpValues(e,{method:"POST",params:k,headers:l}),remove:this.config.withHttpValues(e,{method:"DELETE",params:k,headers:l}),head:this.config.withHttpValues(e,{method:"HEAD",params:k,headers:l}),trace:this.config.withHttpValues(e,{method:"TRACE",params:k,headers:l}),options:this.config.withHttpValues(e,{method:"OPTIONS",params:k,headers:l}),patch:this.config.withHttpValues(e,{method:"PATCH",params:k,headers:l})})};var g=function(){};g.prototype=new f,g.prototype.base=function(a){var c=this;return _.reduce(this.parentsArray(a),function(a,d){var e,f=c.config.getUrlFromElem(d);if(f){if(c.config.isAbsoluteUrl(f))return f;e=f}else if(e=d[c.config.restangularFields.route],d[c.config.restangularFields.restangularCollection]){var g=d[c.config.restangularFields.ids];g&&(e+="/"+g.join(","))}else{var h;h=c.config.useCannonicalId?c.config.getCannonicalIdFromElem(d):c.config.getIdFromElem(d),b.isValidId(h)&&!d.singleOne&&(e+="/"+(c.config.encodeIds?encodeURIComponent(h):h))}return a.replace(/\/$/,"")+"/"+e},this.config.baseUrl)},g.prototype.fetchUrl=function(a,b){var c=this.base(a);return b&&(c+="/"+b),c},g.prototype.fetchRequestedUrl=function(a,c){function d(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}function e(a,b,c){for(var e=d(a),f=0;f-9007199254740992&&9007199254740992>a&&Math.floor(a)===a}),StringView.loadUTF8CharCode=function(a,b){var c=a.length,d=a[b];return d>251&&254>d&&c>b+5?1073741824*(d-252)+(a[b+1]-128<<24)+(a[b+2]-128<<18)+(a[b+3]-128<<12)+(a[b+4]-128<<6)+a[b+5]-128:d>247&&252>d&&c>b+4?(d-248<<24)+(a[b+1]-128<<18)+(a[b+2]-128<<12)+(a[b+3]-128<<6)+a[b+4]-128:d>239&&248>d&&c>b+3?(d-240<<18)+(a[b+1]-128<<12)+(a[b+2]-128<<6)+a[b+3]-128:d>223&&240>d&&c>b+2?(d-224<<12)+(a[b+1]-128<<6)+a[b+2]-128:d>191&&224>d&&c>b+1?(d-192<<6)+a[b+1]-128:d},StringView.putUTF8CharCode=function(a,b,c){var d=c;return 128>b?a[d++]=b:2048>b?(a[d++]=192+(b>>>6),a[d++]=128+(63&b)):65536>b?(a[d++]=224+(b>>>12),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):2097152>b?(a[d++]=240+(b>>>18),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):67108864>b?(a[d++]=248+(b>>>24),a[d++]=128+(b>>>18&63),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):(a[d++]=252+b/1073741824,a[d++]=128+(b>>>24&63),a[d++]=128+(b>>>18&63),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)),d},StringView.getUTF8CharLength=function(a){return 128>a?1:2048>a?2:65536>a?3:2097152>a?4:67108864>a?5:6},StringView.loadUTF16CharCode=function(a,b){var c=a[b];return c>55231&&b+1b?a[d++]=b:(a[d++]=55232+(b>>>10),a[d++]=56320+(1023&b)),d},StringView.getUTF16CharLength=function(a){return 65536>a?1:2},StringView.b64ToUint6=function(a){return a>64&&91>a?a-65:a>96&&123>a?a-71:a>47&&58>a?a+4:43===a?62:47===a?63:0},StringView.uint6ToB64=function(a){return 26>a?a+65:52>a?a+71:62>a?a-4:62===a?43:63===a?47:65},StringView.bytesToBase64=function(a){for(var b,c="",d=a.length,e=0,f=0;d>f;f++)b=f%3,f>0&&4*f/3%76===0&&(c+="\r\n"),e|=a[f]<<(16>>>b&24),(2===b||a.length-f===1)&&(c+=String.fromCharCode(StringView.uint6ToB64(e>>>18&63),StringView.uint6ToB64(e>>>12&63),StringView.uint6ToB64(e>>>6&63),StringView.uint6ToB64(63&e)),e=0);return c.replace(/A(?=A$|$)/g,"=")},StringView.base64ToBytes=function(a,b){for(var c,d,e=a.replace(/[^A-Za-z0-9\+\/]/g,""),f=e.length,g=b?Math.ceil((3*f+1>>>2)/b)*b:3*f+1>>>2,h=new Uint8Array(g),i=0,j=0,k=0;f>k;k++)if(d=3&k,i|=StringView.b64ToUint6(e.charCodeAt(k))<<18-6*d,3===d||f-k===1){for(c=0;3>c&&g>j;c++,j++)h[j]=i>>>(16>>>c&24)&255;i=0}return h},StringView.makeFromBase64=function(a,b,c,d){return new StringView("UTF-16"===b||"UTF-32"===b?StringView.base64ToBytes(a,"UTF-16"===b?2:4).buffer:StringView.base64ToBytes(a),b,c,d)},StringView.prototype.encoding="UTF-8",StringView.prototype.makeIndex=function(a,b){var c,d=this.rawData,e=d.length,f=b||0,g=f,h=isNaN(a)?1/0:a;if(a+1>d.length)throw new RangeError("StringView.prototype.makeIndex - The offset can't be major than the length of the array - 1.");switch(this.encoding){case"UTF-8":var i;for(c=0;e>g&&h>c;c++)i=d[g],g+=i>251&&254>i&&e>g+5?6:i>247&&252>i&&e>g+4?5:i>239&&248>i&&e>g+3?4:i>223&&240>i&&e>g+2?3:i>191&&224>i&&e>g+1?2:1;break;case"UTF-16":for(c=f;e>g&&h>c;c++)g+=d[g]>55231&&g+1f?f-d:b:f,0===d&&e===f?this:(g?(h=this.makeIndex(d),c=this.makeIndex(e,h)-h):(h=d,c=e-d),"UTF-16"===this.encoding?h<<=1:"UTF-32"===this.encoding&&(h<<=2),new StringView(this.buffer,this.encoding,h,c)))},StringView.prototype.forEachChar=function(a,b,c,d){var e,f,g=this.rawData;if("UTF-8"===this.encoding||"UTF-16"===this.encoding){var h,i;"UTF-8"===this.encoding?(h=StringView.getUTF8CharLength,i=StringView.loadUTF8CharCode):"UTF-16"===this.encoding&&(h=StringView.getUTF16CharLength,i=StringView.loadUTF16CharCode),f=isFinite(c)?this.makeIndex(c):0,e=isFinite(d)?this.makeIndex(d,f):g.length;for(var j,k=0;e>f;k++)j=i(g,f),a.call(b||null,j,k,f,g),f+=h(j)}else for(f=isFinite(c)?c:0,e=isFinite(d)?d+f:g.length,f;e>f;f++)a.call(b||null,g[f],f,f,g)},StringView.prototype.valueOf=StringView.prototype.toString=function(){if("UTF-8"!==this.encoding&&"UTF-16"!==this.encoding)return String.fromCharCode.apply(null,this.rawData);var a,b,c="";"UTF-8"===this.encoding?(b=StringView.getUTF8CharLength,a=StringView.loadUTF8CharCode):"UTF-16"===this.encoding&&(b=StringView.getUTF16CharLength,a=StringView.loadUTF16CharCode);for(var d,e=this.rawData.length,f=0;e>f;f+=b(d))d=a(this.rawData,f),c+=String.fromCharCode(d);return c}; +//# sourceMappingURL=ngForce-dependencies.min.js.map \ No newline at end of file diff --git a/build/ngForce-dependencies.min.js.map b/build/ngForce-dependencies.min.js.map new file mode 100644 index 0000000..5eb56be --- /dev/null +++ b/build/ngForce-dependencies.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ngForce-dependencies.min.js","sources":["../buildTmp/lib/stringview.annotated.js","../buildTmp/lib/lo-dash.annotated.js","../buildTmp/lib/restangular.annotated.js","../buildTmp/lib/safeApply.annotated.js"],"names":["StringView","vInput","sEncoding","nOffset","nLength","fTAView","aWhole","aRaw","fPutOutptCode","fGetOutptChrSize","nInptLen","nStartIdx","isFinite","nTranscrType","this","encoding","toString","encSwitch","putUTF8CharCode","getUTF8CharLength","Uint8Array","putUTF16CharCode","getUTF16CharLength","Uint16Array","Uint32Array","typeSwitch","constructor","String","ArrayBuffer","byteLength","length","byteOffset","buffer","subarray","Number","vSource","nOutptLen","nCharStart","nCharEnd","nEndIdx","fGetInptChrSize","fGetInptChrCode","Math","max","isInteger","min","rawData","makeIndex","loadUTF8CharCode","loadUTF16CharCode","conversionSwitch","nOutptIdx","nInptIdx","nChrCode","nChrIdx","nIdx","charCodeAt","nMapIdx","bufferView","Object","freeze","baseIndexOf","array","value","fromIndex","index","cacheIndexOf","cache","type","key","keyPrefix","cachePush","typeCache","push","charAtCallback","compareAscending","a","b","ac","criteria","bc","other","createCache","first","mid","last","getObject","result","escapeStringChar","match","stringEscapes","getArray","arrayPool","pop","objectPool","false","null","number","object","string","true","undefined","isNode","releaseArray","maxPoolSize","releaseObject","slice","start","end","Array","runInContext","context","lodash","isArray","hasOwnProperty","call","lodashWrapper","chainAll","__chain__","__wrapped__","baseBind","bindData","bound","partialArgs","args","apply","arguments","thisBinding","baseCreate","func","prototype","isObject","thisArg","setBindData","baseClone","isDeep","callback","stackA","stackB","isObj","className","cloneableClasses","support","nodeClass","ctor","ctorByClass","boolClass","dateClass","numberClass","stringClass","regexpClass","source","reFlags","exec","lastIndex","isArr","initedStack","assign","input","baseEach","forOwn","objValue","nativeCreate","baseCreateCallback","argCount","identity","__bindData__","funcNames","name","funcDecomp","fnToString","reFuncName","test","reThis","collection","accumulator","bind","baseCreateWrapper","isBind","partialRightArgs","isCurry","arity","bitmask","isCurryBound","isBindKey","baseDifference","values","indexOf","getIndexOf","isLarge","largeArraySize","baseFlatten","isShallow","isStrict","isArguments","valIndex","valLength","resIndex","baseIsEqual","isWhere","otherType","objectTypes","otherClass","argsClass","objectClass","arrayClass","aWrapped","bWrapped","ctorA","argsObject","ctorB","isFunction","size","forIn","baseMerge","forEach","found","isPlainObject","stackLength","baseRandom","floor","nativeRandom","baseUniq","isSorted","seen","computed","createAggregator","setter","createCallback","createWrapper","isPartial","isPartialRight","TypeError","unshift","creater","createIterator","iteratorData","shadowedProps","bottom","loop","top","init","useHas","firstArg","factory","Function","iteratorTemplate","errorClass","errorProto","indicatorObject","isString","keys","objectProto","nonEnumProps","stringProto","escapeHtmlChar","htmlEscapes","isNative","reNative","shimIsPlainObject","ownLast","unescapeHtmlChar","htmlUnescapes","clone","cloneDeep","create","properties","findKey","findLastKey","forOwnRight","forInRight","pairs","props","functions","sort","has","invert","isBoolean","isDate","isElement","nodeType","isEmpty","splice","isEqual","nativeIsFinite","nativeIsNaN","parseFloat","isNaN","isNumber","isNull","isRegExp","isUndefined","mapValues","merge","sources","omit","pick","transform","proto","at","unindexedChars","split","contains","target","nativeMax","every","filter","find","findLast","forEachRight","iterable","invoke","methodName","isFunc","map","Infinity","current","reduce","noaccum","reduceRight","reject","sample","n","guard","shuffle","nativeMin","rand","some","sortBy","toArray","compact","difference","findIndex","findLastIndex","flatten","sortedIndex","initial","intersection","argsIndex","argsLength","caches","trustIndexOf","outer","lastIndexOf","pull","range","step","ceil","remove","rest","low","high","union","uniq","without","xor","concat","zip","pluck","zipObject","after","bindAll","funcs","bindKey","compose","curry","debounce","wait","options","maxTimeoutId","stamp","timeoutId","trailingCall","lastCalled","maxWait","trailing","leading","delayed","remaining","now","clearTimeout","isCalled","setTimeout","maxDelayed","leadingCall","defer","delay","memoize","resolver","memoized","once","ran","partial","partialRight","throttle","debounceOptions","wrap","wrapper","constant","property","escape","replace","reUnescapedHtml","mixin","chain","methodNames","noConflict","_","oldDash","noop","random","floating","noMin","noMax","template","text","data","settings","templateSettings","defaults","isEvaluating","imports","importsKeys","importsValues","interpolate","reNoMatch","reDelimiters","RegExp","reInterpolate","reEsTemplate","evaluate","escapeValue","interpolateValue","esTemplateValue","evaluateValue","offset","reUnescapedString","variable","hasVariable","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","sourceURL","templateCounter","e","times","unescape","reEscapedHtml","uniqueId","prefix","id","idCounter","tap","interceptor","wrapperChain","wrapperToString","wrapperValueOf","root","contextProps","Boolean","Date","Error","arrayRef","getPrototypeOf","propertyIsEnumerable","defineProperty","o","nativeIsArray","nativeKeys","nativeParseInt","parseInt","funcClass","toLocaleString","valueOf","x","0","y","enumErrorProps","enumPrototypes","WinRTError","nonEnumArgs","nonEnumShadows","spliceObjects","document","obj","__p","conditions","join","k","descriptor","shimKeys","eachIteratorOptions","defaultsIteratorOptions","forOwnIteratorOptions","&","<",">","\"","'","objProto","countBy","groupBy","indexBy","where","getTime","whitespace","radix","reLeadingSpacesAndZeros","collect","drop","each","eachRight","extend","methods","select","tail","unique","unzip","all","any","detect","findWhere","foldl","foldr","include","inject","take","head","callbackable","VERSION","isSplice","configurable","enumerable","writable","boolean","function","\\","\n","\r","\t","
","
","window","freeExports","exports","freeModule","module","moduleExports","freeGlobal","global","define","amd","angular","provider","Configurer","config","RestangularResource","$http","url","configurer","resource","params","defaultRequestParams","method","toLowerCase","isSafe","configuration","safeMethods","operation","absolutePattern","isAbsoluteUrl","absoluteUrl","setSelfLinkAbsoluteUrl","baseUrl","setBaseUrl","newBaseUrl","substring","extraFields","setExtraFields","newExtraFields","defaultHttpFields","setDefaultHttpFields","withHttpValues","httpLocalConfig","encodeIds","setEncodeIds","encode","get","post","put","common","setDefaultRequestParams","param1","param2","requestParams","defaultHeaders","setDefaultHeaders","headers","methodOverriders","setMethodOverriders","overriders","isOverridenMethod","jsonp","setJsonp","active","search","one","urlCreator","setUrlCreator","urlCreatorFactory","restangularFields","route","parentResource","restangularCollection","cannonicalId","etag","selfLink","getList","trace","patch","getRestangularUrl","getRequestedUrl","putElement","addRestangularMethod","getParentList","ids","httpConfig","reqParams","several","oneUrl","allUrl","customPUT","customPOST","customDELETE","customGET","customGETLIST","customOperation","doPUT","doPOST","doDELETE","doGET","doGETLIST","fromServer","withConfig","withHttpConfig","singleOne","plain","save","setRestangularFields","resFields","isRestangularized","setFieldToElem","field","elem","idValue","prop","getFieldFromElem","copy","setIdToElem","getIdFromElem","isValidId","elemId","setUrlToElem","getUrlFromElem","useCannonicalId","setUseCannonicalId","getCannonicalIdFromElem","actualId","responseInterceptors","defaultResponseInterceptor","responseExtractor","what","response","deferred","interceptors","theData","addResponseInterceptor","extractor","setResponseInterceptor","setResponseExtractor","requestInterceptors","defaultInterceptor","element","path","fullRequestInterceptor","defaultRequest","request","addRequestInterceptor","setRequestInterceptor","addFullRequestInterceptor","setFullRequestInterceptor","errorInterceptor","setErrorInterceptor","onBeforeElemRestangularized","setOnBeforeElemRestangularized","onElemRestangularized","setOnElemRestangularized","shouldSaveParent","setParentless","suffix","setRequestSuffix","newSuffix","transformers","addElementTransformer","secondArg","thirdArg","isCollection","transformer","typeTransformers","coll","extendCollection","fn","extendModel","transformElem","Restangular","force","transformLocalElements","changedElem","setTransformOnlyServerElements","fullResponse","setFullResponse","full","BaseCreator","setConfig","parentsArray","parents","reverse","localHttpConfig","callHeaders","callParams","base","add","Path","__this","acum","elemUrl","elemSelfLink","encodeURIComponent","fetchUrl","fetchRequestedUrl","sortedKeys","forEachSorted","iterator","i","encodeUriQuery","val","pctEncodeSpaces","parts","v","toJson","globalConfiguration","$get","$q","createServiceForConfiguration","restangularizeBase","parent","urlHandler","addRestangularMethodFunction","copyRestangularizedElement","stripRestangular","parentId","parentUrl","restangularFieldsForParent","error","restangularizeElem","restangularizeCollection","restangularizePromise","promise","valueToFill","promiseCall","promiseGet","$object","callArgs","filledValue","then","resolve","resolvePromise","addCustomOperation","customFunction","oper","alias","callFunction","callOperation","toUpperCase","fetchFunction","fromElement","toElement","copiedElement","localElem","getFunction","putFunction","postFunction","deleteFunction","headFunction","traceFunction","optionsFunction","patchFunction","service","putElementFunction","getById","restangularizeCollectionAndElements","idx","elemToPut","filledArray","serverElem","newArray","parseResponse","resData","whatFetched","fullParams","processedData","status","elemFunction","resParams","callObj","filledObject","okCallback","errorCallback","isOverrideOperation","X-HTTP-Method-Override","defaultParams","defaultElem","bindedFunction","createdFunction","withConfigurationFunction","newConfig","toService","serv","restangularizeElement","run","$rootScope","$safeApply","$scope","arg","$$phase","$apply","nVal","aChars","nLen","nPart","aTarget","nChar","nPutAt","nFrstChr","b64ToUint6","nChr","uint6ToB64","nUint6","bytesToBase64","aBytes","nMod3","sB64Enc","nUint24","fromCharCode","base64ToBytes","sBase64","nBlockBytes","nMod4","nInLen","nOutLen","nOutIdx","nInIdx","makeFromBase64","sB64Inpt","nByteOffset","nChrLength","nStartFrom","nChrEnd","nRawLength","nIdxEnd","nStopAtChr","RangeError","toBase64","bWholeBuffer","subview","nCharOffset","nCharLength","nChrLen","nStrLen","nStringLength","bVariableLen","nStartOffset","nRawLen","forEachChar","fCallback","oThat","nChrOffset","nRawEnd","nRawIdx","aSource","fGetCode","fGetIncr","sView"],"mappings":";;;AAAA,YA4BA,SAASA,YAAWC,EAAQC,EAA4CC,EAAyBC,GAE7F,GAAIC,GAASC,EAAQC,EAAMC,EAAeC,EAAkBC,EAAUC,EAAYC,SAAST,GAAWA,EAAU,EAC5GU,EAAe,EAEfX,KACAY,KAAKC,SAAWb,EAAUc,WAG9BC,GAAW,OAAQH,KAAKC,UACpB,IAAK,QACDP,EAAgBR,WAAWkB,gBAC3BT,EAAmBT,WAAWmB,kBAC9Bd,EAAUe,UACV,MAAMH,EACV,KAAK,SACDT,EAAgBR,WAAWqB,iBAC3BZ,EAAmBT,WAAWsB,mBAC9BjB,EAAUkB,WACV,MAAMN,EACV,KAAK,SACDZ,EAAUmB,YACVX,GAAgB,EAChB,MAAMI,EACV,SAEIZ,EAAUe,WACVP,GAAgB,GAGxBY,EAAY,aAAexB,IACvB,IAAK,SAEDY,GAAgB,CAChB,MAAMY,EACV,KAAK,SACY,OAAQxB,EAAOyB,aACxB,IAAK1B,YAEDa,GAAgB,CAChB,MAAMY,EACV,KAAKE,QAEDd,GAAgB,CAChB,MAAMY,EACV,KAAKG,aAEDtB,EAAS,GAAID,GAAQJ,GACrBS,EAA6B,WAAlBI,KAAKC,SACZd,EAAO4B,aAAe,EAAsB,WAAlBf,KAAKC,SAC/Bd,EAAO4B,aAAe,EACtB5B,EAAO4B,WACXtB,EAAqB,IAAdI,GAAqBC,SAASR,IAAYA,IAAYM,EAChD,GAAIL,GAAQJ,EAAQU,EAAYC,SAASR,GAAkCA,EAAvBM,EAAWC,GAAxEL,CAEJ,MAAMmB,EACV,KAAKD,aACL,IAAKD,aACL,IAAKH,YAEDf,EAAUJ,EAAOyB,YACjBhB,EAAWT,EAAO6B,OAClBxB,EAA+B,IAAtBL,EAAO8B,YAAoB9B,EAAO6B,UACvCzB,IAAYmB,YACZvB,EAAO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GAAI4xB,GAAMP,EAAOxzB,KAAKgC,QAAQhB,OAAQyB,EAAO,EAAU+wB,EAAP/wB,EAAaA,GAAQo0B,EAAS9C,GAC/EA,EAAO6C,EAAS52B,KAAKgC,QAASS,GAC9Bq0B,GAASj2B,OAAO0zB,aAAaR,EAGjC,OAAO+C"} \ No newline at end of file diff --git a/build/ngForce-requirements.min.js b/build/ngForce-requirements.min.js deleted file mode 100644 index 64f9094..0000000 --- a/build/ngForce-requirements.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! ngForce 2014-06-07 */ -/*! visit https://noeticpenguin.github.io/ngForce for more info. */ - -(function(){function a(a,b,c){for(var d=(c||0)-1,e=a?a.length:0;++d-1?0:-1:b?0:-1}function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:u+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function d(a){return a.charCodeAt(0)}function e(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}function f(a){var b=-1,d=a.length,e=a[0],f=a[d/2|0],g=a[d-1];if(e&&"object"==typeof e&&f&&"object"==typeof f&&g&&"object"==typeof g)return!1;var h=i();h["false"]=h["null"]=h["true"]=h.undefined=!1;var j=i();for(j.array=a,j.cache=h,j.push=c;++be?0:e);++d=v&&g===a,j=[];if(i){var k=f(d);k?(g=b,d=k):i=!1}for(;++e-1:void 0});return e.pop(),f.pop(),t&&(l(e),l(f)),g}function ib(a,b,c,d,e){(ke(b)?dc:ye)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=ke(b))||ze(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?ke(j)?j:[]:ze(j)?j:{}),d.push(b),e.push(j),l||ib(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function jb(a,b){return a+Od(ee()*(b-a+1))}function kb(c,d,e){var g=-1,i=pb(),j=c?c.length:0,k=[],n=!d&&j>=v&&i===a,o=e||n?h():k;if(n){var p=f(o);i=b,o=p}for(;++g3&&"function"==typeof b[c-2])var d=cb(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(d=b[--c]);for(var e=n(arguments,1,c),f=-1,g=h(),i=h();++fc?be(0,f+c):c)||0,ke(a)?g=e(a,b,c)>-1:"number"==typeof f?g=(Qb(a)?a.indexOf(b,c):e(a,b,c))>-1:ue(a,function(a){return++d>=c?!(g=a===b):void 0}),g}function _b(a,b,c){var d=!0;if(b=q.createCallback(b,c,3),ke(a))for(var e=-1,f=a.length;++ef&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);g>e&&(e=g,f=a)});return f}function ic(a,b,c){var e=1/0,f=e;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&ke(a))for(var g=-1,h=a.length;++gi&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);e>g&&(e=g,f=a)});return f}function jc(a,b,c,d){var e=arguments.length<3;if(b=q.createCallback(b,d,4),ke(a)){var f=-1,g=a.length;for(e&&(c=a[++f]);++fd?be(0,e+d):d||0}else if(d){var f=Hc(b,c);return b[f]===c?f:-1}return a(b,c,d)}function zc(a,b,c){var d=0,e=a?a.length:0;if("number"!=typeof b&&null!=b){var f=e;for(b=q.createCallback(b,c,3);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return n(a,0,ce(be(0,e-d),e))}function Ac(){for(var c=[],d=-1,e=arguments.length,g=h(),i=pb(),j=i===a,k=h();++d=v&&f(d?c[d]:k)))}var o=c[0],p=-1,q=o?o.length:0,r=[];a:for(;++pc?be(0,d+c):ce(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function Dc(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++ce;){var g=e+f>>>1;c(a[g])1?arguments:arguments[0],b=-1,c=a?hc(De(a,"length")):0,d=ud(0>c?0:c);++b2?mb(a,17,n(arguments,2),null,b):mb(a,1,null,null,b)}function Qc(a){for(var b=arguments.length>1?gb(arguments,!0,!1,1):Bb(a),c=-1,d=b.length;++c2?mb(b,19,n(arguments,2),null,a):mb(b,3,null,null,a)}function Sc(){for(var a=arguments,b=a.length;b--;)if(!Kb(a[b]))throw new Ed;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Tc(a,b){return b="number"==typeof b?b:+b||a.length,mb(a,4,null,null,null,b)}function Uc(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!Kb(a))throw new Ed;if(b=be(0,b)||0,c===!0){var n=!0;m=!1}else Lb(c)&&(n=c.leading,l="maxWait"in c&&(be(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-(Fe()-g);if(0>=c){e&&Nd(e);var l=j;e=i=j=p,l&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))}else i=Ud(o,c)},q=function(){i&&Nd(i),e=i=j=p,(m||l!==b)&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=Fe(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var p=l-(g-k),r=0>=p;r?(e&&(e=Nd(e)),k=g,f=a.apply(h,d)):e||(e=Ud(q,p))}return r&&i?i=Nd(i):i||b===l||(i=Ud(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Vc(a){if(!Kb(a))throw new Ed;var b=n(arguments,1);return Ud(function(){a.apply(p,b)},1)}function Wc(a,b){if(!Kb(a))throw new Ed;var c=n(arguments,2);return Ud(function(){a.apply(p,c)},b)}function Xc(a,b){if(!Kb(a))throw new Ed;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):u+arguments[0];return Rd.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Yc(a){var b,c;if(!Kb(a))throw new Ed;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Zc(a){return mb(a,16,n(arguments,1))}function $c(a){return mb(a,32,null,n(arguments,1))}function _c(a,b,c){var d=!0,e=!0;if(!Kb(a))throw new Ed;return c===!1?d=!1:Lb(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),X.leading=d,X.maxWait=b,X.trailing=e,Uc(a,b,X)}function ad(a,b){return mb(b,16,[a])}function bd(a){return function(){return a}}function cd(a,b,c){var d=typeof a;if(null==a||"function"==d)return cb(a,b,c);if("object"!=d)return id(a);var e=me(a),f=e[0],g=a[f];return 1!=e.length||g!==g||Lb(g)?function(b){for(var c=e.length,d=!1;c--&&(d=hb(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function dd(a){return null==a?"":Dd(a).replace(te,ob)}function ed(a){return a}function fd(a,b,c){var d=!0,e=b&&Bb(b);b&&(c||e.length)||(null==c&&(c=b),f=r,b=a,a=q,e=Bb(b)),c===!1?d=!1:Lb(c)&&"chain"in c&&(d=c.chain);var f=a,g=Kb(f);dc(e,function(c){var e=a[c]=b[c];g&&(f.prototype[c]=function(){var b=this.__chain__,c=this.__wrapped__,g=[c];Sd.apply(g,arguments);var h=e.apply(a,g);if(d||b){if(c===h&&Lb(h))return this;h=new f(h),h.__chain__=b}return h})})}function gd(){return c._=Jd,this}function hd(){}function id(a){return function(b){return b[a]}}function jd(a,b,c){var d=null==a,e=null==b;if(null==c&&("boolean"==typeof a&&e?(c=a,a=1):e||"boolean"!=typeof b||(c=b,e=!0)),d&&e&&(b=1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=ee();return ce(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return jb(a,b)}function kd(a,b){if(a){var c=a[b];return Kb(c)?a[b]():c}}function ld(a,b,c){var d=q.templateSettings;a=Dd(a||""),c=we({},c,d);var e,f=we({},c.imports,d.imports),h=me(f),i=Yb(f),j=0,k=c.interpolate||G,l="__p += '",m=Cd((c.escape||G).source+"|"+k.source+"|"+(k===E?B:G).source+"|"+(c.evaluate||G).source+"|$","g");a.replace(m,function(b,c,d,f,h,i){return d||(d=f),l+=a.slice(j,i).replace(I,g),c&&(l+="' +\n__e("+c+") +\n'"),h&&(e=!0,l+="';\n"+h+";\n__p += '"),d&&(l+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),j=i+b.length,b}),l+="';\n";var n=c.variable,o=n;o||(n="obj",l="with ("+n+") {\n"+l+"\n}\n"),l=(e?l.replace(y,""):l).replace(z,"$1").replace(A,"$1;"),l="function("+n+") {\n"+(o?"":n+" || ("+n+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var r="\n/*\n//# sourceURL="+(c.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var s=yd(h,"return "+l+r).apply(p,i)}catch(t){throw t.source=l,t}return b?s(b):(s.source=l,s)}function md(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=ud(a);for(b=cb(b,c,1);++d/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:q}};var ie=function(a){var b="var index, iterable = "+a.firstArg+", result = "+a.init+";\nif (!iterable) return result;\n"+a.top+";";a.array?(b+="\nvar length = iterable.length; index = -1;\nif ("+a.array+") { ",he.unindexedChars&&(b+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),b+="\n while (++index < length) {\n "+a.loop+";\n }\n}\nelse { "):he.nonEnumArgs&&(b+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+a.loop+";\n }\n } else { "),he.enumPrototypes&&(b+="\n var skipProto = typeof iterable == 'function';\n "),he.enumErrorProps&&(b+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var c=[];if(he.enumPrototypes&&c.push('!(skipProto && index == "prototype")'),he.enumErrorProps&&c.push('!(skipErrorProps && (index == "message" || index == "name"))'),a.useHas&&a.keys)b+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ";else if(b+="\n for (index in iterable) {\n",a.useHas&&c.push("hasOwnProperty.call(iterable, index)"),c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ",he.nonEnumShadows){for(b+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;7>k;k++)b+="\n index = '"+a.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",a.useHas||(b+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),b+=") {\n "+a.loop+";\n } ";b+="\n } "}return(a.array||he.nonEnumArgs)&&(b+="\n}"),b+=a.bottom+";\nreturn result"};Yd||(bb=function(){function a(){}return function(b){if(Lb(b)){a.prototype=b;var d=new a;a.prototype=null}return d||c.Object()}}());var je=Xd?function(a,b){Y.value=b,Xd(a,"__bindData__",Y)}:hd;he.argsClass||(tb=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Rd.call(a,"callee")&&!Td.call(a,"callee")||!1});var ke=Zd||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Kd.call(a)==N||!1},le=nb({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),me=ae?function(a){return Lb(a)?he.enumPrototypes&&"function"==typeof a||he.nonEnumArgs&&a.length&&tb(a)?le(a):ae(a):[]}:le,ne={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:me,loop:"if (callback(iterable[index], index, collection) === false) return result"},oe={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:me,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},pe={top:"if (!objectTypes[typeof iterable]) return result;\n"+ne.top,array:!1},qe={"&":"&","<":"<",">":">",'"':""","'":"'"},re=Db(qe),se=Cd("("+me(re).join("|")+")","g"),te=Cd("["+me(qe).join("")+"]","g"),ue=nb(ne),ve=nb(oe,{top:oe.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),we=nb(oe),xe=nb(ne,pe,{useHas:!1}),ye=nb(ne,pe);Kb(/x/)&&(Kb=function(a){return"function"==typeof a&&Kd.call(a)==R});var ze=Qd?function(a){if(!a||Kd.call(a)!=T||!he.argsClass&&tb(a))return!1;var b=a.valueOf,c=qb(b)&&(c=Qd(b))&&Qd(c);return c?a==c||Qd(a)==c:rb(a)}:rb,Ae=lb(function(a,b,c){Rd.call(a,c)?a[c]++:a[c]=1}),Be=lb(function(a,b,c){(Rd.call(a,c)?a[c]:a[c]=[]).push(b)}),Ce=lb(function(a,b,c){a[c]=b}),De=gc,Ee=ac,Fe=qb(Fe=wd.now)&&Fe||function(){return(new wd).getTime()},Ge=8==de(x+"08")?de:function(a,b){return de(Qb(a)?a.replace(F,""):a,b||0)};return q.after=Oc,q.assign=ve,q.at=Zb,q.bind=Pc,q.bindAll=Qc,q.bindKey=Rc,q.chain=pd,q.compact=sc,q.compose=Sc,q.constant=bd,q.countBy=Ae,q.create=wb,q.createCallback=cd,q.curry=Tc,q.debounce=Uc,q.defaults=we,q.defer=Vc,q.delay=Wc,q.difference=tc,q.filter=ac,q.flatten=xc,q.forEach=dc,q.forEachRight=ec,q.forIn=xe,q.forInRight=zb,q.forOwn=ye,q.forOwnRight=Ab,q.functions=Bb,q.groupBy=Be,q.indexBy=Ce,q.initial=zc,q.intersection=Ac,q.invert=Db,q.invoke=fc,q.keys=me,q.map=gc,q.mapValues=Sb,q.max=hc,q.memoize=Xc,q.merge=Tb,q.min=ic,q.omit=Ub,q.once=Yc,q.pairs=Vb,q.partial=Zc,q.partialRight=$c,q.pick=Wb,q.pluck=De,q.property=id,q.pull=Dc,q.range=Ec,q.reject=lc,q.remove=Fc,q.rest=Gc,q.shuffle=nc,q.sortBy=qc,q.tap=qd,q.throttle=_c,q.times=md,q.toArray=rc,q.transform=Xb,q.union=Ic,q.uniq=Jc,q.values=Yb,q.where=Ee,q.without=Kc,q.wrap=ad,q.xor=Lc,q.zip=Mc,q.zipObject=Nc,q.collect=gc,q.drop=Gc,q.each=dc,q.eachRight=ec,q.extend=ve,q.methods=Bb,q.object=Nc,q.select=ac,q.tail=Gc,q.unique=Jc,q.unzip=Mc,fd(q),q.clone=ub,q.cloneDeep=vb,q.contains=$b,q.escape=dd,q.every=_b,q.find=bc,q.findIndex=uc,q.findKey=xb,q.findLast=cc,q.findLastIndex=vc,q.findLastKey=yb,q.has=Cb,q.identity=ed,q.indexOf=yc,q.isArguments=tb,q.isArray=ke,q.isBoolean=Eb,q.isDate=Fb,q.isElement=Gb,q.isEmpty=Hb,q.isEqual=Ib,q.isFinite=Jb,q.isFunction=Kb,q.isNaN=Mb,q.isNull=Nb,q.isNumber=Ob,q.isObject=Lb,q.isPlainObject=ze,q.isRegExp=Pb,q.isString=Qb,q.isUndefined=Rb,q.lastIndexOf=Cc,q.mixin=fd,q.noConflict=gd,q.noop=hd,q.now=Fe,q.parseInt=Ge,q.random=jd,q.reduce=jc,q.reduceRight=kc,q.result=kd,q.runInContext=o,q.size=oc,q.some=pc,q.sortedIndex=Hc,q.template=ld,q.unescape=nd,q.uniqueId=od,q.all=_b,q.any=pc,q.detect=bc,q.findWhere=bc,q.foldl=jc,q.foldr=kc,q.include=$b,q.inject=jc,fd(function(){var a={};return ye(q,function(b,c){q.prototype[c]||(a[c]=b)}),a}(),!1),q.first=wc,q.last=Bc,q.sample=mc,q.take=wc,q.head=wc,ye(q,function(a,b){var c="sample"!==b;q.prototype[b]||(q.prototype[b]=function(b,d){var e=this.__chain__,f=a(this.__wrapped__,b,d);return e||null!=b&&(!d||c&&"function"==typeof b)?new r(f,e):f})}),q.VERSION="2.4.1",q.prototype.chain=rd,q.prototype.toString=sd,q.prototype.value=td,q.prototype.valueOf=td,ue(["join","pop","shift"],function(a){var b=Fd[a];q.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new r(c,a):c}}),ue(["push","reverse","sort","unshift"],function(a){var b=Fd[a];q.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),ue(["concat","slice","splice"],function(a){var b=Fd[a];q.prototype[a]=function(){return new r(b.apply(this.__wrapped__,arguments),this.__chain__)}}),he.spliceObjects||ue(["pop","shift","splice"],function(a){var b=Fd[a],c="splice"==a;q.prototype[a]=function(){var a=this.__chain__,d=this.__wrapped__,e=b.apply(d,arguments);return 0===d.length&&delete d[0],a||c?new r(e,a):e}}),q}var p,q=[],r=[],s=0,t={},u=+new Date+"",v=75,w=40,x=" \f \n\r\u2028\u2029 ᠎              ",y=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,A=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,F=RegExp("^["+x+"]*0+(?=.$)"),G=/($^)/,H=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,J=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],K=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],L=0,M="[object Arguments]",N="[object Array]",O="[object Boolean]",P="[object Date]",Q="[object Error]",R="[object Function]",S="[object Number]",T="[object Object]",U="[object RegExp]",V="[object String]",W={}; -W[R]=!1,W[M]=W[N]=W[O]=W[P]=W[S]=W[T]=W[U]=W[V]=!0;var X={leading:!1,maxWait:0,trailing:!1},Y={configurable:!1,enumerable:!1,value:null,writable:!1},Z={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},$={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},_={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ab=$[typeof window]&&window||this,bb=$[typeof exports]&&exports&&!exports.nodeType&&exports,cb=$[typeof module]&&module&&!module.nodeType&&module,db=cb&&cb.exports===bb&&bb,eb=$[typeof global]&&global;!eb||eb.global!==eb&&eb.window!==eb||(ab=eb);var fb=o();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ab._=fb,define(function(){return fb})):bb&&cb?db?(cb.exports=fb)._=fb:bb._=fb:ab._=fb}).call(this),function(){var a=angular.module("restangular",[]);a.provider("Restangular",function(){var a={};a.init=function(a,b){function c(a,b,c,d){var e={};return _.each(_.keys(d),function(f){var g=d[f];g.params=_.extend({},g.params,a.defaultRequestParams[g.method.toLowerCase()]),_.isEmpty(g.params)&&delete g.params,e[f]=a.isSafe(g.method)?function(){return b(_.extend(g,{url:c}))}:function(a){return b(_.extend(g,{url:c,data:a}))}}),e}a.configuration=b;var d=["get","head","options","trace","getlist"];b.isSafe=function(a){return _.contains(d,a.toLowerCase())};var e=/^https?:\/\//i;b.isAbsoluteUrl=function(a){return _.isUndefined(b.absoluteUrl)||_.isNull(b.absoluteUrl)?a&&e.test(a):b.absoluteUrl},b.absoluteUrl=_.isUndefined(b.absoluteUrl)?!0:b.absoluteUrl,a.setSelfLinkAbsoluteUrl=function(a){b.absoluteUrl=a},b.baseUrl=_.isUndefined(b.baseUrl)?"":b.baseUrl,a.setBaseUrl=function(a){return b.baseUrl=/\/$/.test(a)?a.substring(0,a.length-1):a,this},b.extraFields=b.extraFields||[],a.setExtraFields=function(a){return b.extraFields=a,this},b.defaultHttpFields=b.defaultHttpFields||{},a.setDefaultHttpFields=function(a){return b.defaultHttpFields=a,this},b.withHttpValues=function(a,c){return _.defaults(c,a,b.defaultHttpFields)},b.encodeIds=_.isUndefined(b.encodeIds)?!0:b.encodeIds,a.setEncodeIds=function(a){b.encodeIds=a},b.defaultRequestParams=b.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},a.setDefaultRequestParams=function(a,c){var d=[],e=c||a;return _.isUndefined(c)?d.push("common"):_.isArray(a)?d=a:d.push(a),_.each(d,function(a){b.defaultRequestParams[a]=e}),this},a.requestParams=b.defaultRequestParams,b.defaultHeaders=b.defaultHeaders||{},a.setDefaultHeaders=function(c){return b.defaultHeaders=c,a.defaultHeaders=b.defaultHeaders,this},a.defaultHeaders=b.defaultHeaders,b.methodOverriders=b.methodOverriders||[],a.setMethodOverriders=function(a){var c=_.extend([],a);return b.isOverridenMethod("delete",c)&&c.push("remove"),b.methodOverriders=c,this},b.jsonp=_.isUndefined(b.jsonp)?!1:b.jsonp,a.setJsonp=function(a){b.jsonp=a},b.isOverridenMethod=function(a,c){var d=c||b.methodOverriders;return!_.isUndefined(_.find(d,function(b){return b.toLowerCase()===a.toLowerCase()}))},b.urlCreator=b.urlCreator||"path",a.setUrlCreator=function(a){if(!_.has(b.urlCreatorFactory,a))throw new Error("URL Path selected isn't valid");return b.urlCreator=a,this},b.restangularFields=b.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save"},a.setRestangularFields=function(a){return b.restangularFields=_.extend(b.restangularFields,a),this},b.isRestangularized=function(a){return!!a[b.restangularFields.one]||!!a[b.restangularFields.all]},b.setFieldToElem=function(a,b,c){var d=a.split("."),e=b;return _.each(_.initial(d),function(a){e[a]={},e=e[a]}),e[_.last(d)]=c,this},b.getFieldFromElem=function(a,b){var c=a.split("."),d=b;return _.each(c,function(a){d&&(d=d[a])}),angular.copy(d)},b.setIdToElem=function(a,c){return b.setFieldToElem(b.restangularFields.id,a,c),this},b.getIdFromElem=function(a){return b.getFieldFromElem(b.restangularFields.id,a)},b.isValidId=function(a){return""!==a&&!_.isUndefined(a)&&!_.isNull(a)},b.setUrlToElem=function(a,c){return b.setFieldToElem(b.restangularFields.selfLink,a,c),this},b.getUrlFromElem=function(a){return b.getFieldFromElem(b.restangularFields.selfLink,a)},b.useCannonicalId=_.isUndefined(b.useCannonicalId)?!1:b.useCannonicalId,a.setUseCannonicalId=function(a){return b.useCannonicalId=a,this},b.getCannonicalIdFromElem=function(a){var c=a[b.restangularFields.cannonicalId],d=b.isValidId(c)?c:b.getIdFromElem(a);return d},b.responseInterceptors=b.responseInterceptors||[],b.defaultResponseInterceptor=function(a){return a},b.responseExtractor=function(a,c,d,e,f,g){var h=angular.copy(b.responseInterceptors);h.push(b.defaultResponseInterceptor);var i=a;return _.each(h,function(a){i=a(i,c,d,e,f,g)}),i},a.addResponseInterceptor=function(a){return b.responseInterceptors.push(a),this},a.setResponseInterceptor=a.addResponseInterceptor,a.setResponseExtractor=a.addResponseInterceptor,b.requestInterceptors=b.requestInterceptors||[],b.defaultInterceptor=function(a,b,c,d,e,f,g){return{element:a,headers:e,params:f,httpConfig:g}},b.fullRequestInterceptor=function(a,c,d,e,f,g,h){var i=angular.copy(b.requestInterceptors),j=b.defaultInterceptor(a,c,d,e,f,g,h);return _.reduce(i,function(a,b){return _.extend(a,b(a.element,c,d,e,a.headers,a.params,a.httpConfig))},j)},a.addRequestInterceptor=function(a){return b.requestInterceptors.push(function(b,c,d,e,f,g,h){return{headers:f,params:g,element:a(b,c,d,e),httpConfig:h}}),this},a.setRequestInterceptor=a.addRequestInterceptor,a.addFullRequestInterceptor=function(a){return b.requestInterceptors.push(a),this},a.setFullRequestInterceptor=a.addFullRequestInterceptor,b.errorInterceptor=b.errorInterceptor||function(){},a.setErrorInterceptor=function(a){return b.errorInterceptor=a,this},b.onBeforeElemRestangularized=b.onBeforeElemRestangularized||function(a){return a},a.setOnBeforeElemRestangularized=function(a){return b.onBeforeElemRestangularized=a,this},b.onElemRestangularized=b.onElemRestangularized||function(a){return a},a.setOnElemRestangularized=function(a){return b.onElemRestangularized=a,this},b.shouldSaveParent=b.shouldSaveParent||function(){return!0},a.setParentless=function(a){return _.isArray(a)?b.shouldSaveParent=function(b){return!_.contains(a,b)}:_.isBoolean(a)&&(b.shouldSaveParent=function(){return!a}),this},b.suffix=_.isUndefined(b.suffix)?null:b.suffix,a.setRequestSuffix=function(a){return b.suffix=a,this},b.transformers=b.transformers||{},a.addElementTransformer=function(c,d,e){var f=null,g=null;2===arguments.length?g=d:(g=e,f=d);var h=b.transformers[c];return h||(h=b.transformers[c]=[]),h.push(function(a,b){return _.isNull(f)||a==f?g(b):b}),a},a.extendCollection=function(b,c){return a.addElementTransformer(b,!0,c)},a.extendModel=function(b,c){return a.addElementTransformer(b,!1,c)},b.transformElem=function(a,c,d,e,f){if(!f&&!b.transformLocalElements&&!a[b.restangularFields.fromServer])return a;var g=b.transformers[d],h=a;return g&&_.each(g,function(a){h=a(c,h)}),b.onElemRestangularized(h,c,d,e)},b.transformLocalElements=_.isUndefined(b.transformLocalElements)?!1:b.transformLocalElements,a.setTransformOnlyServerElements=function(a){b.transformLocalElements=!a},b.fullResponse=_.isUndefined(b.fullResponse)?!1:b.fullResponse,a.setFullResponse=function(a){return b.fullResponse=a,this},b.urlCreatorFactory={};var f=function(){};f.prototype.setConfig=function(a){return this.config=a,this},f.prototype.parentsArray=function(a){for(var b=[];a;)b.push(a),a=a[this.config.restangularFields.parentResource];return b.reverse()},f.prototype.resource=function(a,d,e,f,g,h,i,j){var k=_.defaults(g||{},this.config.defaultRequestParams.common),l=_.defaults(f||{},this.config.defaultHeaders);i&&(b.isSafe(j)?l["If-None-Match"]=i:l["If-Match"]=i);var m=this.base(a);if(h){var n="";/\/$/.test(m)||(n+="/"),n+=h,m+=n}return this.config.suffix&&-1===m.indexOf(this.config.suffix,m.length-this.config.suffix.length)&&!this.config.getUrlFromElem(a)&&(m+=this.config.suffix),a[this.config.restangularFields.httpConfig]=void 0,c(this.config,d,m,{getList:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),get:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),jsonp:this.config.withHttpValues(e,{method:"jsonp",params:k,headers:l}),put:this.config.withHttpValues(e,{method:"PUT",params:k,headers:l}),post:this.config.withHttpValues(e,{method:"POST",params:k,headers:l}),remove:this.config.withHttpValues(e,{method:"DELETE",params:k,headers:l}),head:this.config.withHttpValues(e,{method:"HEAD",params:k,headers:l}),trace:this.config.withHttpValues(e,{method:"TRACE",params:k,headers:l}),options:this.config.withHttpValues(e,{method:"OPTIONS",params:k,headers:l}),patch:this.config.withHttpValues(e,{method:"PATCH",params:k,headers:l})})};var g=function(){};g.prototype=new f,g.prototype.base=function(a){var c=this;return _.reduce(this.parentsArray(a),function(a,d){var e,f=c.config.getUrlFromElem(d);if(f){if(c.config.isAbsoluteUrl(f))return f;e=f}else if(e=d[c.config.restangularFields.route],d[c.config.restangularFields.restangularCollection]){var g=d[c.config.restangularFields.ids];g&&(e+="/"+g.join(","))}else{var h;h=c.config.useCannonicalId?c.config.getCannonicalIdFromElem(d):c.config.getIdFromElem(d),b.isValidId(h)&&!d.singleOne&&(e+="/"+(c.config.encodeIds?encodeURIComponent(h):h))}return a.replace(/\/$/,"")+"/"+e},this.config.baseUrl)},g.prototype.fetchUrl=function(a,b){var c=this.base(a);return b&&(c+="/"+b),c},g.prototype.fetchRequestedUrl=function(a,c){function d(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}function e(a,b,c){for(var e=d(a),f=0;f","\"","'","objProto","countBy","groupBy","indexBy","where","getTime","whitespace","radix","reLeadingSpacesAndZeros","collect","drop","each","eachRight","extend","methods","select","tail","unique","unzip","all","any","detect","findWhere","foldl","foldr","include","inject","take","head","callbackable","VERSION","isSplice","configurable","enumerable","writable","boolean","function","\\","\n","\r","\t","
","
","window","freeExports","exports","freeModule","module","moduleExports","freeGlobal","global","define","amd","angular","provider","Configurer","config","RestangularResource","$http","url","configurer","resource","params","defaultRequestParams","method","toLowerCase","isSafe","configuration","safeMethods","operation","absolutePattern","isAbsoluteUrl","absoluteUrl","setSelfLinkAbsoluteUrl","baseUrl","setBaseUrl","newBaseUrl","substring","extraFields","setExtraFields","newExtraFields","defaultHttpFields","setDefaultHttpFields","withHttpValues","httpLocalConfig","encodeIds","setEncodeIds","encode","get","post","put","common","setDefaultRequestParams","param1","param2","requestParams","defaultHeaders","setDefaultHeaders","headers","methodOverriders","setMethodOverriders","overriders","isOverridenMethod","jsonp","setJsonp","active","search","one","urlCreator","setUrlCreator","urlCreatorFactory","restangularFields","route","parentResource","restangularCollection","cannonicalId","etag","selfLink","getList","trace","patch","getRestangularUrl","getRequestedUrl","putElement","addRestangularMethod","getParentList","ids","httpConfig","reqParams","several","oneUrl","allUrl","customPUT","customPOST","customDELETE","customGET","customGETLIST","customOperation","doPUT","doPOST","doDELETE","doGET","doGETLIST","fromServer","withConfig","withHttpConfig","singleOne","plain","save","setRestangularFields","resFields","isRestangularized","setFieldToElem","field","elem","idValue","prop","getFieldFromElem","copy","setIdToElem","getIdFromElem","isValidId","elemId","setUrlToElem","getUrlFromElem","useCannonicalId","setUseCannonicalId","getCannonicalIdFromElem","actualId","responseInterceptors","defaultResponseInterceptor","responseExtractor","what","response","deferred","interceptors","theData","addResponseInterceptor","extractor","setResponseInterceptor","setResponseExtractor","requestInterceptors","defaultInterceptor","element","path","fullRequestInterceptor","defaultRequest","request","addRequestInterceptor","setRequestInterceptor","addFullRequestInterceptor","setFullRequestInterceptor","errorInterceptor","setErrorInterceptor","onBeforeElemRestangularized","setOnBeforeElemRestangularized","onElemRestangularized","setOnElemRestangularized","shouldSaveParent","setParentless","suffix","setRequestSuffix","newSuffix","transformers","addElementTransformer","secondArg","thirdArg","isCollection","transformer","typeTransformers","coll","extendCollection","fn","extendModel","transformElem","Restangular","force","transformLocalElements","changedElem","setTransformOnlyServerElements","fullResponse","setFullResponse","full","BaseCreator","setConfig","parentsArray","parents","reverse","localHttpConfig","callHeaders","callParams","base","add","Path","__this","acum","elemUrl","elemSelfLink","encodeURIComponent","fetchUrl","fetchRequestedUrl","sortedKeys","forEachSorted","iterator","i","encodeUriQuery","val","pctEncodeSpaces","parts","v","toJson","globalConfiguration","$get","$q","createServiceForConfiguration","restangularizeBase","parent","urlHandler","addRestangularMethodFunction","copyRestangularizedElement","stripRestangular","parentId","parentUrl","restangularFieldsForParent","error","restangularizeElem","restangularizeCollection","restangularizePromise","promise","valueToFill","promiseCall","promiseGet","$object","callArgs","filledValue","then","resolve","resolvePromise","addCustomOperation","customFunction","oper","alias","callFunction","callOperation","toUpperCase","fetchFunction","fromElement","toElement","copiedElement","localElem","getFunction","putFunction","postFunction","deleteFunction","headFunction","traceFunction","optionsFunction","patchFunction","service","putElementFunction","getById","restangularizeCollectionAndElements","idx","elemToPut","filledArray","serverElem","newArray","parseResponse","resData","whatFetched","fullParams","processedData","status","elemFunction","resParams","callObj","filledObject","okCallback","errorCallback","isOverrideOperation","X-HTTP-Method-Override","defaultParams","defaultElem","bindedFunction","createdFunction","withConfigurationFunction","newConfig","toService","serv","restangularizeElement","run","$rootScope","$safeApply","$scope","arg","$$phase","$apply"],"mappings":";;;CASE,WAyLA,QAASA,GAAYC,EAAOC,EAAOC,GAIjC,IAHA,GAAIC,IAASD,GAAa,GAAK,EAC3BE,EAASJ,EAAQA,EAAMI,OAAS,IAE3BD,EAAQC,GACf,GAAIJ,EAAMG,KAAWF,EACnB,MAAOE,EAGX,OAAO,GAYT,QAASE,GAAaC,EAAOL,GAC3B,GAAIM,SAAcN,EAGlB,IAFAK,EAAQA,EAAMA,MAEF,WAARC,GAA8B,MAATN,EACvB,MAAOK,GAAML,GAAS,EAAI,EAEhB,WAARM,GAA4B,UAARA,IACtBA,EAAO,SAET,IAAIC,GAAc,UAARD,EAAmBN,EAAQQ,EAAYR,CAGjD,OAFAK,IAASA,EAAQA,EAAMC,KAAUD,EAAME,GAExB,UAARD,EACFD,GAASP,EAAYO,EAAOL,GAAS,GAAK,EAAI,GAC9CK,EAAQ,EAAI,GASnB,QAASI,GAAUT,GACjB,GAAIK,GAAQK,KAAKL,MACbC,QAAcN,EAElB,IAAY,WAARM,GAA8B,MAATN,EACvBK,EAAML,IAAS,MACV,CACO,UAARM,GAA4B,UAARA,IACtBA,EAAO,SAET,IAAIC,GAAc,UAARD,EAAmBN,E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E7O,KAAKkpB,EAAW7B,GAEpCA,EAAQ1J,WAAa9O,EAAE7O,KAAKgpB,EAA2B3B,GAEvDA,EAAQ/L,IAAMzM,EAAE7O,KAAKsb,EAAK+L,EAAS,MAEnCA,EAAQvR,IAAMjH,EAAE7O,KAAK8V,EAAKuR,EAAS,MAEnCA,EAAQzK,QAAU/N,EAAE7O,KAAK4c,EAASyK,EAAS,MAE3CA,EAAQxK,OAAShO,EAAE7O,KAAK6c,EAAQwK,EAAS,MAEzCA,EAAQvK,OAASjO,EAAE7O,KAAK8c,EAAQuK,EAAS,MAEzCA,EAAQtC,iBAAmBlW,EAAE7O,KAAK+kB,EAAkBsC,GAEpDA,EAAQ+B,sBAAwBva,EAAE7O,KAAKolB,EAAoBiC,GAE3DA,EAAQhC,yBAA2BxW,EAAE7O,KAAKwnB,EAAqCH,GAExEA,EAGX,MAAO5C,GAA8BH,UC7vC/CtM,QAAQN,OAAO,sBAAuB2R,IAAI,SAASC,GAEjDA,EAAWC,WAAa,WACtB,GAAIC,GAAQzH,EAAII,GAAQ,CACxB,IAAuB,GAApBrlB,UAAUhE,OAAa,CACxB,GAAI2wB,GAAM3sB,UAAU,EACH,mBAAP2sB,GACR1H,EAAK0H,EAGLD,EAASC,MAIXD,GAAS1sB,UAAU,GACnBilB,EAAKjlB,UAAU,GACQ,GAApBA,UAAUhE,SACXqpB,IAAUrlB,UAAU,GAGxB0sB,GAASA,GAAUnwB,KACnB0oB,EAAKA,GAAM,aACRI,IAAUqH,EAAOE,QAClBF,EAAOG,OAASH,EAAOG,OAAO5H,GAAMyH,EAAO3sB,MAAMklB,GAGjDA"} \ No newline at end of file diff --git a/build/ngForce.min.js b/build/ngForce.min.js index ca85ef3..0eba8c9 100644 --- a/build/ngForce.min.js +++ b/build/ngForce.min.js @@ -1,5 +1,5 @@ -/*! ngForce 2014-06-07 */ +/*! ngForce 2014-12-03 */ /*! visit https://noeticpenguin.github.io/ngForce for more info. */ -angular.module("ngForce").factory("encodeUriQuery",function(){function a(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,b?"%20":"+")}return a}),angular.module("ngForce").provider("remoteObjects",["$q","$log",function(a){this.$get=function(){var b="SObjectModel";this.setNamespace=function(a){_.isUndefined(a)||(b=a)};var c={getPromiseObj:function(c){var d={};return d.remoteObj=new b[c],d.retrieve=function(){d.remoteObj.retrieve(opts,this.handleWithPromise)},d.create=function(a){a=a?a:d.remoteObj._props,d.remoteObj.create(a,handleWithPromise)},d.update=function(a,b){angular._isArray(a)||(b=a,a=null),a=a?a:[d.remoteObj._props.Id],b=b?b:d.remoteObj._props,d.remoteObj.update(a,b,handleWithPromise)},d.del=function(a){a=a?a:[d.remoteObj._props.Id],d.remoteObj.del(a,handleWithPromise)},handleWithPromise=function(b,c,d){var e=a.defer();return b?e.reject(b):d?e.resolve(c,d):e.resolve(c),e.promise},d}};return c}}]),angular.module("ngForce").provider("sfTemplate",["$q","$http","$templateCache","$log",function(a,b,c){this.$get=function(){var a=[".ajax4jsf.javascript.AjaxScript","/js/perf/stub.js","/sfdc/JiffyStubs.js"];this.setScriptSymbolBlacklist=function(b){if(!(angular.isArray(b)&&b.length>0))throw new Error("newBlacklist must be an array!");a=b};var d=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},e=function(a){var b=_.map(a,d),c=_.map(b,function(a){return".*"+a+".*?"}),e="("+c.join("|")+")",f='',g=new RegExp(f,"gi");return g},f=function(b){var c=e(a),d=b.replace(c,"");return d},g={fromVf:function(a){var d=b.get(a,{cache:c}).then(function(a){return a.data}).then(f);return d}};return g}}]),angular.module("ngForce").factory("sfr",["$q","$rootScope","Restangular","$log",function(a,b,c,d){var e=[],f=[],g={model:function(a,b){var d,e=c.setDefaultHeaders({Authorization:"Bearer "+window.apiSid}).setBaseUrl("/services/data/v29.0/sobjects/").setRestangularFields({id:"Id",selfLink:"attributes.url"});return d=b?e.one(a,b):e.all(a)},insert:function(b,c,f){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform insert."),g.promise;var h=angular.isDefined(f)?f:!1,i=e[b];return angular.isUndefined(i)&&(i=this.model(b),e[b]=i),i.post(c).then(function(a){return a.success?(d.debug("ngForce: Created new "+b+" record:",a),g.resolve(a),h?i.get(a.id).then(function(a){return d.debug("ngForce: Inserted:",a),a}):g.promise):(g.reject("Insert failed: ["+a.errors+"] Full response: "+a),g.promise)})},update:function(b,c,e){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform an update."),g.promise;var h=angular.isDefined(e)?e:!1,i=c.id||c.Id;if(!angular.isString(i))return g.reject('An "Id" field is required to perform an update.'),g.promise;var j=f[i];angular.isUndefined(j)&&(j=this.model(b,i),f[i]=j);for(var k=["Id","LastReferencedDate","LastModifiedById","LastModifiedDate","LastViewedDate","SystemModstamp","CreatedById","CreatedDate","IsDeleted"],l=0;l0))throw new Error("newBlacklist must be an array!");a=b},this.$get=["$q","$http","$templateCache","$log",function(b,c,d){var e=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},f=function(a){var b=_.map(a,e),c=_.map(b,function(a){return".*"+a+".*?"}),d="("+c.join("|")+")",f='',g=new RegExp(f,"gi");return g},g=function(b){var c=f(a),d=b.replace(c,"");return d},h={fromVf:function(a){var b=c.get(a,{cache:d}).then(function(a){return a.data}).then(g);return b}};return h}]}),angular.module("ngForce").factory("sfr",["$q","$rootScope","Restangular","$log",function(a,b,c,d,e){var f=[],g=[],h={model:function(a,b){var d,f=c.setDefaultHeaders({Authorization:"Bearer "+e.sessionId}).setBaseUrl("/services/data/v29.0/sobjects/").setRestangularFields({id:"Id",selfLink:"attributes.url"});return d=b?f.one(a,b):f.all(a)},insert:function(b,c,e){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform insert."),g.promise;var h=angular.isDefined(e)?e:!1,i=f[b];return angular.isUndefined(i)&&(i=this.model(b),f[b]=i),i.post(c).then(function(a){return a.success?(d.debug("ngForce: Created new "+b+" record:",a),g.resolve(a),h?i.get(a.id).then(function(a){return d.debug("ngForce: Inserted:",a),a}):g.promise):(g.reject("Insert failed: ["+a.errors+"] Full response: "+a),g.promise)})},update:function(b,c,e){var f=a.defer();if(!angular.isString(b))return f.reject("An sObject name is required to perform an update."),f.promise;var h=angular.isDefined(e)?e:!1,i=c.id||c.Id;if(!angular.isString(i))return f.reject('An "Id" field is required to perform an update.'),f.promise;var j=g[i];angular.isUndefined(j)&&(j=this.model(b,i),g[i]=j);for(var k=["Id","LastReferencedDate","LastModifiedById","LastModifiedDate","LastViewedDate","SystemModstamp","CreatedById","CreatedDate","IsDeleted"],l=0;l0;if(e===!0){var f=a.defer();return this.metadata(b).then(function(a){var e=a.reportMetadata;("string"==typeof c.reportBooleanFilter||null===c.reportBooleanFilter)&&(e.reportBooleanFilter=c.reportBooleanFilter),"[object Array]"===Object.prototype.toString.call(c.reportFilters)&&(e.reportFilters=c.reportFilters),g.one("reports").post(b,{reportMetadata:e},d).then(function(a){f.resolve(a)},function(a){f.reject(a)})}),f.promise}return g.one("reports",b).get(d)}},dashboard:{}}}]),angular.module("ngForce").factory("sfrBackend",["$q","$rootScope","$log","$httpBackend","encodeUriQuery",function(a,b,c,d,e){var f=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g={whenGetPage:function(a,b){var c=a;-1==c.indexOf("/apex/")&&(c="/apex/"+c);var e=f(c);d.whenGET(new RegExp(e,"i")).respond(b)},whenQuery:function(a,b,c){var g=angular.isString(c)?[c]:c,h=angular.isArray(b)?b:[b],i="query.*FROM\\++"+a;if("undefined"!=typeof g&&null!==g){var j=_.chain(g).map(function(a){return e(a)}).foldl(function(a,b){return a+=b}).value();i+="\\++WHERE.*"+f(j)}d.whenGET(new RegExp(i,"i")).respond(200,{totalSize:h.length,done:!0,records:h})},expectQuery:function(a,b,c){var g=angular.isString(c)?[c]:c,h=angular.isArray(b)?b:[b],i="query.*FROM\\++"+a;if("undefined"!=typeof g&&null!==g){var j=_.chain(g).map(function(a){return e(a)}).foldl(function(a,b){return a+=b}).value();i+="\\++WHERE.*"+f(j)}d.expectGET(new RegExp(i,"i")).respond(200,{totalSize:h.length,done:!0,records:h})},expectInsert:function(a,b,c){var e=angular.isArray(b)?b:[b],f=c||!0;angular.forEach(e,function(b){d.expectPOST(new RegExp(a,"i")).respond(201,{id:b.Id,success:!0,errors:[]}),f||d.expectGET(new RegExp(a+"/"+b.Id,"i")).respond(200,b)})},expectDelete:function(a,b){b=b||"";var c=angular.isArray(b)?b:[b];angular.forEach(c,function(b){d.expectDELETE(new RegExp(a+"/"+b,"i")).respond(201,{})})}};return g}]),angular.module("ngForce").factory("sfrfile",["$q","$rootScope","$log","Restangular","MultipartRequest","RequestPart","ngForceConfig",function(a,b,c,d,e,f,g){var h=d.withConfig(function(a){a.setDefaultHttpFields({cache:!1,transformRequest:function(a){return a}}),a.setBaseUrl("/services/data/v29.0/sobjects"),a.setDefaultHeaders({Authorization:"Bearer "+g.sessionId})}).setRestangularFields({id:"Id",selfLink:"attributes.url"});return h.insert=function(a,b,c,d){SObjectType={Document:{jsonPartName:"entity_document",binaryPartName:"Body"},Attachment:{jsonPartName:"entity_attachment",binaryPartName:"Body"},ContentVersion:{jsonPartName:"entity_content",binaryPartName:"VersionData"}};var g=SObjectType[a];if(void 0===typeof g)throw new Error("Upload not supported for SObject type '"+a+"'");var i="boundary_string",j=new e(i),k=new f;k.addHeader("Content-Disposition",'form-data; name="'+g.jsonPartName+'";'),k.addHeader("Content-Type","application/json"),k.setBody(b),j.addPart(k);var l=new f;l.addHeader("Content-Type","application/octet-stream"),l.addHeader("Content-Disposition",'form-data; name="'+g.binaryPartName+'"; filename="'+c+'"'),l.setBody(d),j.addPart(l);var m=new Uint8Array(j.getBuffer());return h.all(a).post(m,null,{"Content-Type":'multipart/form-data; boundary="'+i+'"'}).then(function(a){return a})},h}]),angular.module("ngForce").factory("sfrquery",["$q","$rootScope","$log","Restangular","encodeUriQuery","ngForceConfig",function(a,b,c,d,e,f){var g=d.withConfig(function(a){a.setDefaultHttpFields({cache:!1}),a.setBaseUrl("/services/data/v30.0/"),a.setDefaultHeaders({Authorization:"Bearer "+f.sessionId})}).setRestangularFields({id:"Id",selfLink:"attributes.url"}).oneUrl("query","/services/data/v30.0/query");return g.query=function(a,b){return b="undefined"!=typeof b?b:!1,g.withHttpConfig({cache:b}).get({q:a}).then(function(a){return a.records})},g.queryAll=function(b,c,d,f){return angular.isUndefined(c)&&(c=!0),angular.isUndefined(f)&&(f=[]),angular.isUndefined(d)&&(d=a.defer()),"select"===b.trim().substring(0,6).toLowerCase()&&(b="?q="+e(b)),g.withHttpConfig({cache:c}).customGET(b).then(function(a){return f=f.concat(a.records),a.done?(d.resolve(f),d.promise):void g.queryAll(_.last(a.nextRecordsUrl.split("/")),c,d,f)},function(a){return d.reject(a)}),d.notify(),d.promise},g}]),angular.module("ngForce").provider("vfr",function(){var a={escape:!1,timeout:1e4};if("object"!=typeof Visualforce)throw new Error("Visualforce is not available as an object! Did you forget to include the ngForce component?");return{setStandardOptions:function(b){if(b&&"object"!=typeof b)throw new Error("standardOptions must be an object");a=b},$get:["$q","$rootScope",function(b,c){function d(a,c,d){var f,g,h,i=Visualforce.remoting.Manager,j=a.split(".");if(c&&"object"!=typeof c)throw new Error("Options must be an object");if(j.length<2)throw new Error("Invalid Remote Action specified. Use Controller.MethodName or $RemoteAction.Controller.MethodName");return 3===j.length?(f=j[0],g=j[1],h=j[2]):2===j.length&&(g=j[0],h=j[1]),function(){var f,g=b.defer();return f=arguments.length?Array.prototype.slice.apply(arguments):[],f.splice(0,0,a),f.push(function(a,b){e(a,b,d,g)}),c&&f.push(c),i.invokeAction.apply(i,f),g.promise}}function e(a,b,d,e){a?("object"!=typeof a&&(a=JSON.parse(a)),Array.isArray(a)&&a[0].message&&a[0].errorCode?(e.reject(a),c.$safeApply()):(e.resolve(a),c.$safeApply())):"undefined"!=typeof d&&d?(e.resolve(),c.$safeApply()):(e.reject({message:"Null returned by RemoteAction not called with nullOk flag",errorCode:"NULL_RETURN"}),c.$safeApply())}return{send:d,standardOptions:a,bulkCreate:d("ngForceController.bulkCreate",this.standardOptions,!1),bulkUpdate:d("ngForceController.bulkUpdate",this.standardOptions,!1),create:d("ngForceController.create",this.standardOptions,!1),clone:d("ngForceController.sObjectKlone",this.standardOptions,!1),del:d("ngForceController.del",this.standardOptions,!0),describe:d("ngForceController.describe",this.standardOptions,!1),describeFieldSet:d("ngForceController.describeFieldSet",this.standardOptions,!1),describePicklistValues:d("ngForceController.getPicklistValues",this.standardOptions,!1),getObjectType:d("ngForceController.getObjType",this.standardOptions,!1),getQueryResultsAsSelect2Data:d("ngForceController.getQueryResultsAsSelect2Data",this.standardOptions,!1),query:d("ngForceController.query",{escape:!1,timeout:3e4},!1),queryFromFieldset:d("ngForceController.queryFromFieldSet",{escape:!1,timeout:3e4},!1),retrieve:d("ngForceController.retrieve",this.standardOptions,!1),search:d("ngForceController.search",this.standardOptions,!1),soqlFromFieldSet:d("ngForceController.soqlFromFieldSet",this.standardOptions,!1),update:d("ngForceController.updat",this.standardOptions,!0),upsert:d("ngForceController.upser",this.standardOptions,!0)}}]}}); +//# sourceMappingURL=ngForce.min.js.map \ No newline at end of file diff --git a/build/ngForce.min.js.map b/build/ngForce.min.js.map new file mode 100644 index 0000000..2361543 --- /dev/null +++ b/build/ngForce.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ngForce.min.js","sources":["../buildTmp/subModules/ngForce-sfrAnalytics.annotated.js","../buildTmp/ngForce.annotated.js","../buildTmp/subModules/ngForce-encodedUriQuery.annotated.js","../buildTmp/subModules/ngForce-multipart.annotated.js","../buildTmp/subModules/ngForce-remoteObjects.annotated.js","../buildTmp/subModules/ngForce-sfTemplate.annotated.js","../buildTmp/subModules/ngForce-sfr.annotated.js","../buildTmp/subModules/ngForce-sfrBackend.annotated.js","../buildTmp/subModules/ngForce-sfrfile.annotated.js","../buildTmp/subModules/ngForce-sfrquery.annotated.js","../buildTmp/subModules/ngForce-visualForceRemoting.annotated.js"],"names":["angular","module","factory","encodeUriQuery","val","pctEncodeSpaces","encodeURIComponent","replace","service","RequestPart","this","headers","joinBuffers","arrayBuffers","lengthSum","i","length","byteLength","joined","Uint8Array","offset","ab","set","buffer","prototype","setBody","body","toString","call","bodyType","Error","addHeader","name","value","push","getRawHeaders","rawHeadersArr","h","join","getBuffer","bufferArr","rawHeaders","StringView","jsonStr","JSON","stringify","MultipartRequest","boundaryStr","parts","addPart","part","provider","namespace","setNamespace","newNamespace","_","isUndefined","$get","$q","remoteObjects","getPromiseObj","obj","promisedObj","remoteObj","retrieve","opts","handleWithPromise","create","fvs","_props","update","ids","_isArray","Id","del","err","records","e","deferred","defer","reject","resolve","promise","scriptSymbolBlacklist","setScriptSymbolBlacklist","newBlacklist","isArray","$http","$templateCache","escapeRegexp","s","buildScriptRegex","scriptNames","scriptNamesEscaped","map","scriptNamePatterns","scriptNameOptions","scriptTagPattern","scriptTagRegex","RegExp","stripScriptTags","htmlTemplate","badScriptRegex","cleanedHtmlTemplate","sfTemplate","fromVf","url","pTemplate","get","cache","then","response","data","$rootScope","Restangular","$log","ngForceConfig","sobjectEndpoints","recordEndpoints","sfRest","model","modelName","recordId","resource","baseResource","setDefaultHeaders","Authorization","sessionId","setBaseUrl","setRestangularFields","id","selfLink","one","all","insert","sObjectName","recordToInsert","getLatest","$defer","isString","_getLatest","isDefined","sObjectEndpoint","post","success","debug","newRecord","errors","recordToUpdate","recordEndpoint","propsToIgnore","p","patch","delete","recordToDelete","remove","_baseUrl","_additionalHeaders","_analytics","withConfig","RestangularConfigurer","analytics","reports","metadata","reportId","run","config","async","queryParams","includeDetails","ondemandFiltering","reportFilters","reportMetadata","reportBooleanFilter","Object","errorResponse","dashboard","$httpBackend","sfrBackend","whenGetPage","pageName","responsePage","_pageName","indexOf","escapedPageName","whenGET","respond","whenQuery","resRecords","soqlClauses","_soqlClauses","_resRecords","encodedSoqlRegex","encodedSoqlClauses","chain","foldl","memo","totalSize","done","expectQuery","expectGET","expectInsert","forEach","resRecord","expectPOST","expectDelete","recordIds","_recordIds","expectDELETE","sfrfile","setDefaultHttpFields","transformRequest","sObjectData","filename","fileBuffer","SObjectType","Document","jsonPartName","binaryPartName","Attachment","ContentVersion","mySObjectType","undefined","req","sobjectDataPart","filePart","bufferView","Content-Type","sfrquery","oneUrl","query","cacheEnabled","withHttpConfig","q","queryAll","queryStringOrQueryLocator","results","trim","substring","toLowerCase","customGET","concat","last","nextRecordsUrl","split","error","notify","standardOpts","escape","timeout","Visualforce","setStandardOptions","newOptions","send","remoteAction","options","nullok","controller","method","Manager","remoting","args","arguments","Array","slice","apply","splice","result","event","handleResultWithPromise","invokeAction","parse","message","errorCode","$safeApply","standardOptions","bulkCreate","bulkUpdate","clone","describe","describeFieldSet","describePicklistValues","getObjectType","getQueryResultsAsSelect2Data","queryFromFieldset","search","soqlFromFieldSet","upsert"],"mappings":";;;AAaA,YCOAA,SAAQC,OAAO,WACb,kBACA,cACA,YACA,mBCVFD,QAAQC,OAAO,WAAWC,QAAQ,iBAAkB,WAiBlD,QAASC,GAAeC,EAAKC,GAC3B,MAAOC,oBAAmBF,GAAKG,QAAQ,QAAS,KAAKA,QAAQ,QAAS,KAAKA,QAAQ,OAAQ,KAAKA,QAAQ,QAAS,KAAKA,QAAQ,OAAQF,EAAkB,MAAQ,KAElK,MAAOF,KCLTH,QAAQC,OAAO,gBAYfD,QAAQC,OAAO,aAAaO,QAAQ,cAAe,WAC/C,QAASC,KACLC,KAAKC,WAwDT,QAASC,GAAYC,GAEjB,IAAK,GADDC,GAAY,EACPC,EAAI,EAAGA,EAAIF,EAAaG,OAAQD,IACrCD,GAAaD,EAAaE,GAAGE,UAMjC,KAAK,GAHDC,GAAS,GAAIC,YAAWL,GAExBM,EAAS,EACJL,EAAI,EAAGA,EAAIF,EAAaG,OAAQD,IAAK,CAC1C,GAAIM,GAAKR,EAAaE,EACtBG,GAAOI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,iCAAkCnP,KAAKyQ,iBAAiB,GAEpEzM,IAAKmL,EAAK,wBAAyBnP,KAAKyQ,iBAAiB,GAEzDI,SAAU1B,EAAK,6BAA8BnP,KAAKyQ,iBAAiB,GAEnEK,iBAAkB3B,EAAK,qCAAsCnP,KAAKyQ,iBAAiB,GAEnFM,uBAAwB5B,EAAK,sCAAuCnP,KAAKyQ,iBAAiB,GAE1FO,cAAe7B,EAAK,+BAAgCnP,KAAKyQ,iBAAiB,GAE1EQ,6BAA8B9B,EAAK,iDAAkDnP,KAAKyQ,iBAAiB,GAE3G7C,MAAOuB,EAAK,2BACXL,QAAQ,EACRC,QAAS,MACP,GAEHmC,kBAAmB/B,EAAK,uCACvBL,QAAQ,EACRC,QAAS,MACP,GAEHzL,SAAU6L,EAAK,6BAA8BnP,KAAKyQ,iBAAiB,GAEnEU,OAAQhC,EAAK,2BAA4BnP,KAAKyQ,iBAAiB,GAE/DW,iBAAkBjC,EAAK,qCAAsCnP,KAAKyQ,iBAAiB,GAEnF7M,OAAQuL,EAAK,0BAA2BnP,KAAKyQ,iBAAiB,GAE9DY,OAAQlC,EAAK,0BAA2BnP,KAAKyQ,iBAAiB"} \ No newline at end of file diff --git a/build/ngForce.min.map b/build/ngForce.min.map deleted file mode 100644 index 2661a82..0000000 --- a/build/ngForce.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ngForce.min.js","sources":["../buildTmp/ngForce-encodedUriQuery.js","../buildTmp/ngForce-remoteObjects.js","../buildTmp/ngForce-sfTemplate.js","../buildTmp/ngForce-sfr.js","../buildTmp/ngForce-sfrAnalytics.js","../buildTmp/ngForce-sfrBackend.js","../buildTmp/ngForce-sfrquery.js","../buildTmp/ngForce-visualForceRemoting.js","../buildTmp/ngForce.js"],"names":["angular","module","factory","encodeUriQuery","val","pctEncodeSpaces","encodeURIComponent","replace","provider","$q","this","$get","namespace","setNamespace","newNamespace","_","isUndefined","remoteObjects","getPromiseObj","obj","promisedObj","remoteObj","retrieve","opts","handleWithPromise","create","fvs","_props","update","ids","_isArray","Id","del","err","records","e","deferred","defer","reject","resolve","promise","$http","$templateCache","scriptSymbolBlacklist","setScriptSymbolBlacklist","newBlacklist","isArray","length","Error","escapeRegexp","s","buildScriptRegex","scriptNames","scriptNamesEscaped","map","scriptNamePatterns","scriptNameOptions","join","scriptTagPattern","scriptTagRegex","RegExp","stripScriptTags","htmlTemplate","badScriptRegex","cleanedHtmlTemplate","sfTemplate","fromVf","url","pTemplate","get","cache","then","response","data","$rootScope","Restangular","$log","sobjectEndpoints","recordEndpoints","sfRest","model","modelName","recordId","resource","baseResource","setDefaultHeaders","Authorization","window","apiSid","setBaseUrl","setRestangularFields","id","selfLink","one","all","insert","sObjectName","recordToInsert","getLatest","$defer","isString","_getLatest","isDefined","sObjectEndpoint","post","success","debug","newRecord","errors","recordToUpdate","recordEndpoint","propsToIgnore","i","p","patch","delete","recordToDelete","remove","analytics","withConfig","RestangularConfigurer","$httpBackend","sfrBackend","whenGetPage","pageName","responsePage","_pageName","indexOf","escapedPageName","whenGET","respond","whenQuery","resRecords","soqlClauses","_soqlClauses","_resRecords","encodedSoqlRegex","encodedSoqlClauses","chain","value","foldl","memo","totalSize","done","expectQuery","expectGET","expectInsert","forEach","resRecord","expectPOST","expectDelete","recordIds","_recordIds","expectDELETE","sfrquery","setDefaultHttpFields","oneUrl","query","cacheEnabled","withHttpConfig","q","queryAll","queryStringOrQueryLocator","results","trim","substring","toLowerCase","customGET","concat","last","nextRecordsUrl","split","error","notify","Visualforce","vfRemote","send","remoteAction","options","nullok","controller","method","Manager","remoting","parts","args","arguments","Array","prototype","slice","apply","splice","push","result","event","handleResultWithPromise","invokeAction","JSON","parse","message","errorCode","$safeApply","standardOptions","escape","timeout","setStandardOptions","newOptions","bulkCreate","bulkUpdate","clone","describe","describeFieldSet","describePicklistValues","getObjectType","getQueryResultsAsSelect2Data","queryFromFieldset","search","soqlFromFieldSet","upsert"],"mappings":";;;AAcAA,QAAQC,OAAO,WAAWC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GAEjF3B,EAASyC,OAASzC,EAASC,KAAK,2BAA4B0B,GAAiB,GAE7E3B,EAAS0C,iBAAmB1C,EAASC,KAAK,qCAAsC0B,GAAiB,GAEjG3B,EAASnJ,OAASmJ,EAASC,KAAK,0BAA2B0B,GAAiB,GAE5E3B,EAAS2C,OAAS3C,EAASC,KAAK,0BAA2B0B,GAAiB,GACrE3B,MCnJb/K,QAAQC,OAAO,WACb,kBACA"} \ No newline at end of file diff --git a/build/ngForceWithDependencies.min.js b/build/ngForceWithDependencies.min.js new file mode 100644 index 0000000..60e885f --- /dev/null +++ b/build/ngForceWithDependencies.min.js @@ -0,0 +1,7 @@ +/*! ngForce 2014-12-03 */ +/*! visit https://noeticpenguin.github.io/ngForce for more info. */ + +"use strict";function StringView(a,b,c,d){var e,f,g,h,i,j,k=isFinite(c)?c:0,l=15;b&&(this.encoding=b.toString());a:switch(this.encoding){case"UTF-8":h=StringView.putUTF8CharCode,i=StringView.getUTF8CharLength,e=Uint8Array;break a;case"UTF-16":h=StringView.putUTF16CharCode,i=StringView.getUTF16CharLength,e=Uint16Array;break a;case"UTF-32":e=Uint32Array,l&=14;break a;default:e=Uint8Array,l&=14}a:switch(typeof a){case"string":l&=7;break a;case"object":switch(a.constructor){case StringView:l&=3;break a;case String:l&=7;break a;case ArrayBuffer:f=new e(a),j="UTF-32"===this.encoding?a.byteLength>>>2:"UTF-16"===this.encoding?a.byteLength>>>1:a.byteLength,g=0!==k||isFinite(d)&&d!==j?new e(a,k,isFinite(d)?d:j-k):f;break a;case Uint32Array:case Uint16Array:case Uint8Array:e=a.constructor,j=a.length,f=0===a.byteOffset&&a.length===(e===Uint32Array?a.buffer.byteLength>>>2:e===Uint16Array?a.buffer.byteLength>>>1:a.buffer.byteLength)?a:new e(a.buffer),g=0!==k||isFinite(d)&&d!==j?a.subarray(k,isFinite(d)?k+d:j):a;break a;default:f=new e(a),j=f.length,g=0!==k||isFinite(d)&&d!==j?f.subarray(k,isFinite(d)?k+d:j):f}break a;default:f=g=new e(Number(a)||0)}if(8>l){var m,n,o,p,q,r,s;4&l?(m=a,n=j=m.length,l^="UTF-32"===this.encoding?0:2,k=o=c?Math.max((n+c)%n,0):0,q=p=(Number.isInteger(d)?Math.min(Math.max(d,0)+k,n):n)-1):(m=a.rawData,j=a.makeIndex(),k=o=c?Math.max((j+c)%j,0):0,n=Number.isInteger(d)?Math.min(Math.max(d,0),j-o):j,q=p=n+o,"UTF-8"===a.encoding?(r=StringView.getUTF8CharLength,s=StringView.loadUTF8CharCode):"UTF-16"===a.encoding?(r=StringView.getUTF16CharLength,s=StringView.loadUTF16CharCode):l&=1),(0===n||4>l&&m.encoding===this.encoding&&0===o&&n===j)&&(l=7);a:switch(l){case 0:f=new e(n);for(var t=0;n>t;f[t]=m[k+t++]);break a;case 1:n=0;for(var u=k;q>u;u++)n+=i(m[u]);f=new e(n);for(var u=k,t=0;n>t;u++)t=h(f,m[u],t);break a;case 2:k=0;var v;for(w=0;o>w;w++)v=s(m,k),k+=r(v);f=new e(n);for(var u=k,t=0;n>t;u+=r(v),t++)v=s(m,u),f[t]=v;break a;case 3:n=0;for(var v,w=0,u=0;p>w;u+=r(v))v=s(m,u),w===o&&(k=u),++w>o&&(n+=i(v));f=new e(n);for(var u=k,t=0;n>t;u+=r(v))v=s(m,u),t=h(f,v,t);break a;case 4:f=new e(n);for(var x=0;n>x;x++)f[x]=255&m.charCodeAt(x);break a;case 5:n=0;for(var y=0;j>y;y++)y===o&&(k=n),n+=i(m.charCodeAt(y)),y===p&&(q=n);f=new e(n);for(var t=0,w=0;n>t;w++)t=h(f,m.charCodeAt(w),t);break a;case 6:f=new e(n);for(var x=0;n>x;x++)f[x]=m.charCodeAt(x);break a;case 7:f=new e(n?m:0)}g=l>3&&(k>0||q-1?0:-1:b?0:-1}function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:u+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function d(a){return a.charCodeAt(0)}function e(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}function f(a){var b=-1,d=a.length,e=a[0],f=a[d/2|0],g=a[d-1];if(e&&"object"==typeof e&&f&&"object"==typeof f&&g&&"object"==typeof g)return!1;var h=i();h["false"]=h["null"]=h["true"]=h.undefined=!1;var j=i();for(j.array=a,j.cache=h,j.push=c;++be?0:e);++d=v&&g===a,j=[];if(i){var k=f(d);k?(g=b,d=k):i=!1}for(;++e-1:void 0});return e.pop(),f.pop(),t&&(l(e),l(f)),g}function ib(a,b,c,d,e){(ke(b)?dc:ye)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=ke(b))||ze(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?ke(j)?j:[]:ze(j)?j:{}),d.push(b),e.push(j),l||ib(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function jb(a,b){return a+Od(ee()*(b-a+1))}function kb(c,d,e){var g=-1,i=pb(),j=c?c.length:0,k=[],n=!d&&j>=v&&i===a,o=e||n?h():k;if(n){var p=f(o);i=b,o=p}for(;++g3&&"function"==typeof b[c-2])var d=cb(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(d=b[--c]);for(var e=n(arguments,1,c),f=-1,g=h(),i=h();++fc?be(0,f+c):c)||0,ke(a)?g=e(a,b,c)>-1:"number"==typeof f?g=(Qb(a)?a.indexOf(b,c):e(a,b,c))>-1:ue(a,function(a){return++d>=c?!(g=a===b):void 0}),g}function _b(a,b,c){var d=!0;if(b=q.createCallback(b,c,3),ke(a))for(var e=-1,f=a.length;++ef&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);g>e&&(e=g,f=a)});return f}function ic(a,b,c){var e=1/0,f=e;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&ke(a))for(var g=-1,h=a.length;++gi&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);e>g&&(e=g,f=a)});return f}function jc(a,b,c,d){var e=arguments.length<3;if(b=q.createCallback(b,d,4),ke(a)){var f=-1,g=a.length;for(e&&(c=a[++f]);++fd?be(0,e+d):d||0}else if(d){var f=Hc(b,c);return b[f]===c?f:-1}return a(b,c,d)}function zc(a,b,c){var d=0,e=a?a.length:0;if("number"!=typeof b&&null!=b){var f=e;for(b=q.createCallback(b,c,3);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return n(a,0,ce(be(0,e-d),e))}function Ac(){for(var c=[],d=-1,e=arguments.length,g=h(),i=pb(),j=i===a,k=h();++d=v&&f(d?c[d]:k)))}var o=c[0],p=-1,q=o?o.length:0,r=[];a:for(;++pc?be(0,d+c):ce(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function Dc(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++ce;){var g=e+f>>>1;c(a[g])1?arguments:arguments[0],b=-1,c=a?hc(De(a,"length")):0,d=ud(0>c?0:c);++b2?mb(a,17,n(arguments,2),null,b):mb(a,1,null,null,b)}function Qc(a){for(var b=arguments.length>1?gb(arguments,!0,!1,1):Bb(a),c=-1,d=b.length;++c2?mb(b,19,n(arguments,2),null,a):mb(b,3,null,null,a)}function Sc(){for(var a=arguments,b=a.length;b--;)if(!Kb(a[b]))throw new Ed;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Tc(a,b){return b="number"==typeof b?b:+b||a.length,mb(a,4,null,null,null,b)}function Uc(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!Kb(a))throw new Ed;if(b=be(0,b)||0,c===!0){var n=!0;m=!1}else Lb(c)&&(n=c.leading,l="maxWait"in c&&(be(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-(Fe()-g);if(0>=c){e&&Nd(e);var l=j;e=i=j=p,l&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))}else i=Ud(o,c)},q=function(){i&&Nd(i),e=i=j=p,(m||l!==b)&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=Fe(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var p=l-(g-k),r=0>=p;r?(e&&(e=Nd(e)),k=g,f=a.apply(h,d)):e||(e=Ud(q,p))}return r&&i?i=Nd(i):i||b===l||(i=Ud(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Vc(a){if(!Kb(a))throw new Ed;var b=n(arguments,1);return Ud(function(){a.apply(p,b)},1)}function Wc(a,b){if(!Kb(a))throw new Ed;var c=n(arguments,2);return Ud(function(){a.apply(p,c)},b)}function Xc(a,b){if(!Kb(a))throw new Ed;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):u+arguments[0];return Rd.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Yc(a){var b,c;if(!Kb(a))throw new Ed;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Zc(a){return mb(a,16,n(arguments,1))}function $c(a){return mb(a,32,null,n(arguments,1))}function _c(a,b,c){var d=!0,e=!0;if(!Kb(a))throw new Ed;return c===!1?d=!1:Lb(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),X.leading=d,X.maxWait=b,X.trailing=e,Uc(a,b,X)}function ad(a,b){return mb(b,16,[a])}function bd(a){return function(){return a}}function cd(a,b,c){var d=typeof a;if(null==a||"function"==d)return cb(a,b,c);if("object"!=d)return id(a);var e=me(a),f=e[0],g=a[f];return 1!=e.length||g!==g||Lb(g)?function(b){for(var c=e.length,d=!1;c--&&(d=hb(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function dd(a){return null==a?"":Dd(a).replace(te,ob)}function ed(a){return a}function fd(a,b,c){var d=!0,e=b&&Bb(b);b&&(c||e.length)||(null==c&&(c=b),f=r,b=a,a=q,e=Bb(b)),c===!1?d=!1:Lb(c)&&"chain"in c&&(d=c.chain);var f=a,g=Kb(f);dc(e,function(c){var e=a[c]=b[c];g&&(f.prototype[c]=function(){var b=this.__chain__,c=this.__wrapped__,g=[c];Sd.apply(g,arguments);var h=e.apply(a,g);if(d||b){if(c===h&&Lb(h))return this;h=new f(h),h.__chain__=b}return h})})}function gd(){return c._=Jd,this}function hd(){}function id(a){return function(b){return b[a]}}function jd(a,b,c){var d=null==a,e=null==b;if(null==c&&("boolean"==typeof a&&e?(c=a,a=1):e||"boolean"!=typeof b||(c=b,e=!0)),d&&e&&(b=1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=ee();return ce(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return jb(a,b)}function kd(a,b){if(a){var c=a[b];return Kb(c)?a[b]():c}}function ld(a,b,c){var d=q.templateSettings;a=Dd(a||""),c=we({},c,d);var e,f=we({},c.imports,d.imports),h=me(f),i=Yb(f),j=0,k=c.interpolate||G,l="__p += '",m=Cd((c.escape||G).source+"|"+k.source+"|"+(k===E?B:G).source+"|"+(c.evaluate||G).source+"|$","g");a.replace(m,function(b,c,d,f,h,i){return d||(d=f),l+=a.slice(j,i).replace(I,g),c&&(l+="' +\n__e("+c+") +\n'"),h&&(e=!0,l+="';\n"+h+";\n__p += '"),d&&(l+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),j=i+b.length,b}),l+="';\n";var n=c.variable,o=n;o||(n="obj",l="with ("+n+") {\n"+l+"\n}\n"),l=(e?l.replace(y,""):l).replace(z,"$1").replace(A,"$1;"),l="function("+n+") {\n"+(o?"":n+" || ("+n+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var r="\n/*\n//# sourceURL="+(c.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var s=yd(h,"return "+l+r).apply(p,i)}catch(t){throw t.source=l,t}return b?s(b):(s.source=l,s)}function md(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=ud(a);for(b=cb(b,c,1);++d/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:q}};var ie=function(a){var b="var index, iterable = "+a.firstArg+", result = "+a.init+";\nif (!iterable) return result;\n"+a.top+";";a.array?(b+="\nvar length = iterable.length; index = -1;\nif ("+a.array+") { ",he.unindexedChars&&(b+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),b+="\n while (++index < length) {\n "+a.loop+";\n }\n}\nelse { "):he.nonEnumArgs&&(b+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+a.loop+";\n }\n } else { "),he.enumPrototypes&&(b+="\n var skipProto = typeof iterable == 'function';\n "),he.enumErrorProps&&(b+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var c=[];if(he.enumPrototypes&&c.push('!(skipProto && index == "prototype")'),he.enumErrorProps&&c.push('!(skipErrorProps && (index == "message" || index == "name"))'),a.useHas&&a.keys)b+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ";else if(b+="\n for (index in iterable) {\n",a.useHas&&c.push("hasOwnProperty.call(iterable, index)"),c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ",he.nonEnumShadows){for(b+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;7>k;k++)b+="\n index = '"+a.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",a.useHas||(b+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),b+=") {\n "+a.loop+";\n } ";b+="\n } "}return(a.array||he.nonEnumArgs)&&(b+="\n}"),b+=a.bottom+";\nreturn result"};Yd||(bb=function(){function a(){}return function(b){if(Lb(b)){a.prototype=b;var d=new a;a.prototype=null}return d||c.Object()}}());var je=Xd?function(a,b){Y.value=b,Xd(a,"__bindData__",Y)}:hd;he.argsClass||(tb=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Rd.call(a,"callee")&&!Td.call(a,"callee")||!1});var ke=Zd||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Kd.call(a)==N||!1},le=nb({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),me=ae?function(a){return Lb(a)?he.enumPrototypes&&"function"==typeof a||he.nonEnumArgs&&a.length&&tb(a)?le(a):ae(a):[]}:le,ne={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:me,loop:"if (callback(iterable[index], index, collection) === false) return result"},oe={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:me,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},pe={top:"if (!objectTypes[typeof iterable]) return result;\n"+ne.top,array:!1},qe={"&":"&","<":"<",">":">",'"':""","'":"'"},re=Db(qe),se=Cd("("+me(re).join("|")+")","g"),te=Cd("["+me(qe).join("")+"]","g"),ue=nb(ne),ve=nb(oe,{top:oe.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),we=nb(oe),xe=nb(ne,pe,{useHas:!1}),ye=nb(ne,pe);Kb(/x/)&&(Kb=function(a){return"function"==typeof a&&Kd.call(a)==R});var ze=Qd?function(a){if(!a||Kd.call(a)!=T||!he.argsClass&&tb(a))return!1;var b=a.valueOf,c=qb(b)&&(c=Qd(b))&&Qd(c);return c?a==c||Qd(a)==c:rb(a)}:rb,Ae=lb(function(a,b,c){Rd.call(a,c)?a[c]++:a[c]=1}),Be=lb(function(a,b,c){(Rd.call(a,c)?a[c]:a[c]=[]).push(b)}),Ce=lb(function(a,b,c){a[c]=b}),De=gc,Ee=ac,Fe=qb(Fe=wd.now)&&Fe||function(){return(new wd).getTime()},Ge=8==de(x+"08")?de:function(a,b){return de(Qb(a)?a.replace(F,""):a,b||0)};return q.after=Oc,q.assign=ve,q.at=Zb,q.bind=Pc,q.bindAll=Qc,q.bindKey=Rc,q.chain=pd,q.compact=sc,q.compose=Sc,q.constant=bd,q.countBy=Ae,q.create=wb,q.createCallback=cd,q.curry=Tc,q.debounce=Uc,q.defaults=we,q.defer=Vc,q.delay=Wc,q.difference=tc,q.filter=ac,q.flatten=xc,q.forEach=dc,q.forEachRight=ec,q.forIn=xe,q.forInRight=zb,q.forOwn=ye,q.forOwnRight=Ab,q.functions=Bb,q.groupBy=Be,q.indexBy=Ce,q.initial=zc,q.intersection=Ac,q.invert=Db,q.invoke=fc,q.keys=me,q.map=gc,q.mapValues=Sb,q.max=hc,q.memoize=Xc,q.merge=Tb,q.min=ic,q.omit=Ub,q.once=Yc,q.pairs=Vb,q.partial=Zc,q.partialRight=$c,q.pick=Wb,q.pluck=De,q.property=id,q.pull=Dc,q.range=Ec,q.reject=lc,q.remove=Fc,q.rest=Gc,q.shuffle=nc,q.sortBy=qc,q.tap=qd,q.throttle=_c,q.times=md,q.toArray=rc,q.transform=Xb,q.union=Ic,q.uniq=Jc,q.values=Yb,q.where=Ee,q.without=Kc,q.wrap=ad,q.xor=Lc,q.zip=Mc,q.zipObject=Nc,q.collect=gc,q.drop=Gc,q.each=dc,q.eachRight=ec,q.extend=ve,q.methods=Bb,q.object=Nc,q.select=ac,q.tail=Gc,q.unique=Jc,q.unzip=Mc,fd(q),q.clone=ub,q.cloneDeep=vb,q.contains=$b,q.escape=dd,q.every=_b,q.find=bc,q.findIndex=uc,q.findKey=xb,q.findLast=cc,q.findLastIndex=vc,q.findLastKey=yb,q.has=Cb,q.identity=ed,q.indexOf=yc,q.isArguments=tb,q.isArray=ke,q.isBoolean=Eb,q.isDate=Fb,q.isElement=Gb,q.isEmpty=Hb,q.isEqual=Ib,q.isFinite=Jb,q.isFunction=Kb,q.isNaN=Mb,q.isNull=Nb,q.isNumber=Ob,q.isObject=Lb,q.isPlainObject=ze,q.isRegExp=Pb,q.isString=Qb,q.isUndefined=Rb,q.lastIndexOf=Cc,q.mixin=fd,q.noConflict=gd,q.noop=hd,q.now=Fe,q.parseInt=Ge,q.random=jd,q.reduce=jc,q.reduceRight=kc,q.result=kd,q.runInContext=o,q.size=oc,q.some=pc,q.sortedIndex=Hc,q.template=ld,q.unescape=nd,q.uniqueId=od,q.all=_b,q.any=pc,q.detect=bc,q.findWhere=bc,q.foldl=jc,q.foldr=kc,q.include=$b,q.inject=jc,fd(function(){var a={}; +return ye(q,function(b,c){q.prototype[c]||(a[c]=b)}),a}(),!1),q.first=wc,q.last=Bc,q.sample=mc,q.take=wc,q.head=wc,ye(q,function(a,b){var c="sample"!==b;q.prototype[b]||(q.prototype[b]=function(b,d){var e=this.__chain__,f=a(this.__wrapped__,b,d);return e||null!=b&&(!d||c&&"function"==typeof b)?new r(f,e):f})}),q.VERSION="2.4.1",q.prototype.chain=rd,q.prototype.toString=sd,q.prototype.value=td,q.prototype.valueOf=td,ue(["join","pop","shift"],function(a){var b=Fd[a];q.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new r(c,a):c}}),ue(["push","reverse","sort","unshift"],function(a){var b=Fd[a];q.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),ue(["concat","slice","splice"],function(a){var b=Fd[a];q.prototype[a]=function(){return new r(b.apply(this.__wrapped__,arguments),this.__chain__)}}),he.spliceObjects||ue(["pop","shift","splice"],function(a){var b=Fd[a],c="splice"==a;q.prototype[a]=function(){var a=this.__chain__,d=this.__wrapped__,e=b.apply(d,arguments);return 0===d.length&&delete d[0],a||c?new r(e,a):e}}),q}var p,q=[],r=[],s=0,t={},u=+new Date+"",v=75,w=40,x=" \f \n\r\u2028\u2029 ᠎              ",y=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,A=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,F=RegExp("^["+x+"]*0+(?=.$)"),G=/($^)/,H=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,J=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],K=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],L=0,M="[object Arguments]",N="[object Array]",O="[object Boolean]",P="[object Date]",Q="[object Error]",R="[object Function]",S="[object Number]",T="[object Object]",U="[object RegExp]",V="[object String]",W={};W[R]=!1,W[M]=W[N]=W[O]=W[P]=W[S]=W[T]=W[U]=W[V]=!0;var X={leading:!1,maxWait:0,trailing:!1},Y={configurable:!1,enumerable:!1,value:null,writable:!1},Z={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},$={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},_={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ab=$[typeof window]&&window||this,bb=$[typeof exports]&&exports&&!exports.nodeType&&exports,cb=$[typeof module]&&module&&!module.nodeType&&module,db=cb&&cb.exports===bb&&bb,eb=$[typeof global]&&global;!eb||eb.global!==eb&&eb.window!==eb||(ab=eb);var fb=o();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ab._=fb,define(function(){return fb})):bb&&cb?db?(cb.exports=fb)._=fb:bb._=fb:ab._=fb}).call(this),function(){var a=angular.module("restangular",[]);a.provider("Restangular",function(){var a={};a.init=function(a,b){function c(a,b,c,d){var e={};return _.each(_.keys(d),function(f){var g=d[f];g.params=_.extend({},g.params,a.defaultRequestParams[g.method.toLowerCase()]),_.isEmpty(g.params)&&delete g.params,e[f]=a.isSafe(g.method)?function(){return b(_.extend(g,{url:c}))}:function(a){return b(_.extend(g,{url:c,data:a}))}}),e}a.configuration=b;var d=["get","head","options","trace","getlist"];b.isSafe=function(a){return _.contains(d,a.toLowerCase())};var e=/^https?:\/\//i;b.isAbsoluteUrl=function(a){return _.isUndefined(b.absoluteUrl)||_.isNull(b.absoluteUrl)?a&&e.test(a):b.absoluteUrl},b.absoluteUrl=_.isUndefined(b.absoluteUrl)?!0:b.absoluteUrl,a.setSelfLinkAbsoluteUrl=function(a){b.absoluteUrl=a},b.baseUrl=_.isUndefined(b.baseUrl)?"":b.baseUrl,a.setBaseUrl=function(a){return b.baseUrl=/\/$/.test(a)?a.substring(0,a.length-1):a,this},b.extraFields=b.extraFields||[],a.setExtraFields=function(a){return b.extraFields=a,this},b.defaultHttpFields=b.defaultHttpFields||{},a.setDefaultHttpFields=function(a){return b.defaultHttpFields=a,this},b.withHttpValues=function(a,c){return _.defaults(c,a,b.defaultHttpFields)},b.encodeIds=_.isUndefined(b.encodeIds)?!0:b.encodeIds,a.setEncodeIds=function(a){b.encodeIds=a},b.defaultRequestParams=b.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},a.setDefaultRequestParams=function(a,c){var d=[],e=c||a;return _.isUndefined(c)?d.push("common"):_.isArray(a)?d=a:d.push(a),_.each(d,function(a){b.defaultRequestParams[a]=e}),this},a.requestParams=b.defaultRequestParams,b.defaultHeaders=b.defaultHeaders||{},a.setDefaultHeaders=function(c){return b.defaultHeaders=c,a.defaultHeaders=b.defaultHeaders,this},a.defaultHeaders=b.defaultHeaders,b.methodOverriders=b.methodOverriders||[],a.setMethodOverriders=function(a){var c=_.extend([],a);return b.isOverridenMethod("delete",c)&&c.push("remove"),b.methodOverriders=c,this},b.jsonp=_.isUndefined(b.jsonp)?!1:b.jsonp,a.setJsonp=function(a){b.jsonp=a},b.isOverridenMethod=function(a,c){var d=c||b.methodOverriders;return!_.isUndefined(_.find(d,function(b){return b.toLowerCase()===a.toLowerCase()}))},b.urlCreator=b.urlCreator||"path",a.setUrlCreator=function(a){if(!_.has(b.urlCreatorFactory,a))throw new Error("URL Path selected isn't valid");return b.urlCreator=a,this},b.restangularFields=b.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save"},a.setRestangularFields=function(a){return b.restangularFields=_.extend(b.restangularFields,a),this},b.isRestangularized=function(a){return!!a[b.restangularFields.one]||!!a[b.restangularFields.all]},b.setFieldToElem=function(a,b,c){var d=a.split("."),e=b;return _.each(_.initial(d),function(a){e[a]={},e=e[a]}),e[_.last(d)]=c,this},b.getFieldFromElem=function(a,b){var c=a.split("."),d=b;return _.each(c,function(a){d&&(d=d[a])}),angular.copy(d)},b.setIdToElem=function(a,c){return b.setFieldToElem(b.restangularFields.id,a,c),this},b.getIdFromElem=function(a){return b.getFieldFromElem(b.restangularFields.id,a)},b.isValidId=function(a){return""!==a&&!_.isUndefined(a)&&!_.isNull(a)},b.setUrlToElem=function(a,c){return b.setFieldToElem(b.restangularFields.selfLink,a,c),this},b.getUrlFromElem=function(a){return b.getFieldFromElem(b.restangularFields.selfLink,a)},b.useCannonicalId=_.isUndefined(b.useCannonicalId)?!1:b.useCannonicalId,a.setUseCannonicalId=function(a){return b.useCannonicalId=a,this},b.getCannonicalIdFromElem=function(a){var c=a[b.restangularFields.cannonicalId],d=b.isValidId(c)?c:b.getIdFromElem(a);return d},b.responseInterceptors=b.responseInterceptors||[],b.defaultResponseInterceptor=function(a){return a},b.responseExtractor=function(a,c,d,e,f,g){var h=angular.copy(b.responseInterceptors);h.push(b.defaultResponseInterceptor);var i=a;return _.each(h,function(a){i=a(i,c,d,e,f,g)}),i},a.addResponseInterceptor=function(a){return b.responseInterceptors.push(a),this},a.setResponseInterceptor=a.addResponseInterceptor,a.setResponseExtractor=a.addResponseInterceptor,b.requestInterceptors=b.requestInterceptors||[],b.defaultInterceptor=function(a,b,c,d,e,f,g){return{element:a,headers:e,params:f,httpConfig:g}},b.fullRequestInterceptor=function(a,c,d,e,f,g,h){var i=angular.copy(b.requestInterceptors),j=b.defaultInterceptor(a,c,d,e,f,g,h);return _.reduce(i,function(a,b){return _.extend(a,b(a.element,c,d,e,a.headers,a.params,a.httpConfig))},j)},a.addRequestInterceptor=function(a){return b.requestInterceptors.push(function(b,c,d,e,f,g,h){return{headers:f,params:g,element:a(b,c,d,e),httpConfig:h}}),this},a.setRequestInterceptor=a.addRequestInterceptor,a.addFullRequestInterceptor=function(a){return b.requestInterceptors.push(a),this},a.setFullRequestInterceptor=a.addFullRequestInterceptor,b.errorInterceptor=b.errorInterceptor||function(){},a.setErrorInterceptor=function(a){return b.errorInterceptor=a,this},b.onBeforeElemRestangularized=b.onBeforeElemRestangularized||function(a){return a},a.setOnBeforeElemRestangularized=function(a){return b.onBeforeElemRestangularized=a,this},b.onElemRestangularized=b.onElemRestangularized||function(a){return a},a.setOnElemRestangularized=function(a){return b.onElemRestangularized=a,this},b.shouldSaveParent=b.shouldSaveParent||function(){return!0},a.setParentless=function(a){return _.isArray(a)?b.shouldSaveParent=function(b){return!_.contains(a,b)}:_.isBoolean(a)&&(b.shouldSaveParent=function(){return!a}),this},b.suffix=_.isUndefined(b.suffix)?null:b.suffix,a.setRequestSuffix=function(a){return b.suffix=a,this},b.transformers=b.transformers||{},a.addElementTransformer=function(c,d,e){var f=null,g=null;2===arguments.length?g=d:(g=e,f=d);var h=b.transformers[c];return h||(h=b.transformers[c]=[]),h.push(function(a,b){return _.isNull(f)||a==f?g(b):b}),a},a.extendCollection=function(b,c){return a.addElementTransformer(b,!0,c)},a.extendModel=function(b,c){return a.addElementTransformer(b,!1,c)},b.transformElem=function(a,c,d,e,f){if(!f&&!b.transformLocalElements&&!a[b.restangularFields.fromServer])return a;var g=b.transformers[d],h=a;return g&&_.each(g,function(a){h=a(c,h)}),b.onElemRestangularized(h,c,d,e)},b.transformLocalElements=_.isUndefined(b.transformLocalElements)?!1:b.transformLocalElements,a.setTransformOnlyServerElements=function(a){b.transformLocalElements=!a},b.fullResponse=_.isUndefined(b.fullResponse)?!1:b.fullResponse,a.setFullResponse=function(a){return b.fullResponse=a,this},b.urlCreatorFactory={};var f=function(){};f.prototype.setConfig=function(a){return this.config=a,this},f.prototype.parentsArray=function(a){for(var b=[];a;)b.push(a),a=a[this.config.restangularFields.parentResource];return b.reverse()},f.prototype.resource=function(a,d,e,f,g,h,i,j){var k=_.defaults(g||{},this.config.defaultRequestParams.common),l=_.defaults(f||{},this.config.defaultHeaders);i&&(b.isSafe(j)?l["If-None-Match"]=i:l["If-Match"]=i);var m=this.base(a);if(h){var n="";/\/$/.test(m)||(n+="/"),n+=h,m+=n}return this.config.suffix&&-1===m.indexOf(this.config.suffix,m.length-this.config.suffix.length)&&!this.config.getUrlFromElem(a)&&(m+=this.config.suffix),a[this.config.restangularFields.httpConfig]=void 0,c(this.config,d,m,{getList:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),get:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),jsonp:this.config.withHttpValues(e,{method:"jsonp",params:k,headers:l}),put:this.config.withHttpValues(e,{method:"PUT",params:k,headers:l}),post:this.config.withHttpValues(e,{method:"POST",params:k,headers:l}),remove:this.config.withHttpValues(e,{method:"DELETE",params:k,headers:l}),head:this.config.withHttpValues(e,{method:"HEAD",params:k,headers:l}),trace:this.config.withHttpValues(e,{method:"TRACE",params:k,headers:l}),options:this.config.withHttpValues(e,{method:"OPTIONS",params:k,headers:l}),patch:this.config.withHttpValues(e,{method:"PATCH",params:k,headers:l})})};var g=function(){};g.prototype=new f,g.prototype.base=function(a){var c=this;return _.reduce(this.parentsArray(a),function(a,d){var e,f=c.config.getUrlFromElem(d);if(f){if(c.config.isAbsoluteUrl(f))return f;e=f}else if(e=d[c.config.restangularFields.route],d[c.config.restangularFields.restangularCollection]){var g=d[c.config.restangularFields.ids];g&&(e+="/"+g.join(","))}else{var h;h=c.config.useCannonicalId?c.config.getCannonicalIdFromElem(d):c.config.getIdFromElem(d),b.isValidId(h)&&!d.singleOne&&(e+="/"+(c.config.encodeIds?encodeURIComponent(h):h))}return a.replace(/\/$/,"")+"/"+e},this.config.baseUrl)},g.prototype.fetchUrl=function(a,b){var c=this.base(a);return b&&(c+="/"+b),c},g.prototype.fetchRequestedUrl=function(a,c){function d(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}function e(a,b,c){for(var e=d(a),f=0;f-9007199254740992&&9007199254740992>a&&Math.floor(a)===a}),StringView.loadUTF8CharCode=function(a,b){var c=a.length,d=a[b];return d>251&&254>d&&c>b+5?1073741824*(d-252)+(a[b+1]-128<<24)+(a[b+2]-128<<18)+(a[b+3]-128<<12)+(a[b+4]-128<<6)+a[b+5]-128:d>247&&252>d&&c>b+4?(d-248<<24)+(a[b+1]-128<<18)+(a[b+2]-128<<12)+(a[b+3]-128<<6)+a[b+4]-128:d>239&&248>d&&c>b+3?(d-240<<18)+(a[b+1]-128<<12)+(a[b+2]-128<<6)+a[b+3]-128:d>223&&240>d&&c>b+2?(d-224<<12)+(a[b+1]-128<<6)+a[b+2]-128:d>191&&224>d&&c>b+1?(d-192<<6)+a[b+1]-128:d},StringView.putUTF8CharCode=function(a,b,c){var d=c;return 128>b?a[d++]=b:2048>b?(a[d++]=192+(b>>>6),a[d++]=128+(63&b)):65536>b?(a[d++]=224+(b>>>12),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):2097152>b?(a[d++]=240+(b>>>18),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):67108864>b?(a[d++]=248+(b>>>24),a[d++]=128+(b>>>18&63),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)):(a[d++]=252+b/1073741824,a[d++]=128+(b>>>24&63),a[d++]=128+(b>>>18&63),a[d++]=128+(b>>>12&63),a[d++]=128+(b>>>6&63),a[d++]=128+(63&b)),d},StringView.getUTF8CharLength=function(a){return 128>a?1:2048>a?2:65536>a?3:2097152>a?4:67108864>a?5:6},StringView.loadUTF16CharCode=function(a,b){var c=a[b];return c>55231&&b+1b?a[d++]=b:(a[d++]=55232+(b>>>10),a[d++]=56320+(1023&b)),d},StringView.getUTF16CharLength=function(a){return 65536>a?1:2},StringView.b64ToUint6=function(a){return a>64&&91>a?a-65:a>96&&123>a?a-71:a>47&&58>a?a+4:43===a?62:47===a?63:0},StringView.uint6ToB64=function(a){return 26>a?a+65:52>a?a+71:62>a?a-4:62===a?43:63===a?47:65},StringView.bytesToBase64=function(a){for(var b,c="",d=a.length,e=0,f=0;d>f;f++)b=f%3,f>0&&4*f/3%76===0&&(c+="\r\n"),e|=a[f]<<(16>>>b&24),(2===b||a.length-f===1)&&(c+=String.fromCharCode(StringView.uint6ToB64(e>>>18&63),StringView.uint6ToB64(e>>>12&63),StringView.uint6ToB64(e>>>6&63),StringView.uint6ToB64(63&e)),e=0);return c.replace(/A(?=A$|$)/g,"=")},StringView.base64ToBytes=function(a,b){for(var c,d,e=a.replace(/[^A-Za-z0-9\+\/]/g,""),f=e.length,g=b?Math.ceil((3*f+1>>>2)/b)*b:3*f+1>>>2,h=new Uint8Array(g),i=0,j=0,k=0;f>k;k++)if(d=3&k,i|=StringView.b64ToUint6(e.charCodeAt(k))<<18-6*d,3===d||f-k===1){for(c=0;3>c&&g>j;c++,j++)h[j]=i>>>(16>>>c&24)&255;i=0}return h},StringView.makeFromBase64=function(a,b,c,d){return new StringView("UTF-16"===b||"UTF-32"===b?StringView.base64ToBytes(a,"UTF-16"===b?2:4).buffer:StringView.base64ToBytes(a),b,c,d)},StringView.prototype.encoding="UTF-8",StringView.prototype.makeIndex=function(a,b){var c,d=this.rawData,e=d.length,f=b||0,g=f,h=isNaN(a)?1/0:a;if(a+1>d.length)throw new RangeError("StringView.prototype.makeIndex - The offset can't be major than the length of the array - 1.");switch(this.encoding){case"UTF-8":var i;for(c=0;e>g&&h>c;c++)i=d[g],g+=i>251&&254>i&&e>g+5?6:i>247&&252>i&&e>g+4?5:i>239&&248>i&&e>g+3?4:i>223&&240>i&&e>g+2?3:i>191&&224>i&&e>g+1?2:1;break;case"UTF-16":for(c=f;e>g&&h>c;c++)g+=d[g]>55231&&g+1f?f-d:b:f,0===d&&e===f?this:(g?(h=this.makeIndex(d),c=this.makeIndex(e,h)-h):(h=d,c=e-d),"UTF-16"===this.encoding?h<<=1:"UTF-32"===this.encoding&&(h<<=2),new StringView(this.buffer,this.encoding,h,c)))},StringView.prototype.forEachChar=function(a,b,c,d){var e,f,g=this.rawData;if("UTF-8"===this.encoding||"UTF-16"===this.encoding){var h,i;"UTF-8"===this.encoding?(h=StringView.getUTF8CharLength,i=StringView.loadUTF8CharCode):"UTF-16"===this.encoding&&(h=StringView.getUTF16CharLength,i=StringView.loadUTF16CharCode),f=isFinite(c)?this.makeIndex(c):0,e=isFinite(d)?this.makeIndex(d,f):g.length;for(var j,k=0;e>f;k++)j=i(g,f),a.call(b||null,j,k,f,g),f+=h(j)}else for(f=isFinite(c)?c:0,e=isFinite(d)?d+f:g.length,f;e>f;f++)a.call(b||null,g[f],f,f,g)},StringView.prototype.valueOf=StringView.prototype.toString=function(){if("UTF-8"!==this.encoding&&"UTF-16"!==this.encoding)return String.fromCharCode.apply(null,this.rawData);var a,b,c="";"UTF-8"===this.encoding?(b=StringView.getUTF8CharLength,a=StringView.loadUTF8CharCode):"UTF-16"===this.encoding&&(b=StringView.getUTF16CharLength,a=StringView.loadUTF16CharCode);for(var d,e=this.rawData.length,f=0;e>f;f+=b(d))d=a(this.rawData,f),c+=String.fromCharCode(d);return c},angular.module("ngForce",["Scope.safeApply","restangular","multipart","ngForce.config"]),angular.module("ngForce").factory("encodeUriQuery",function(){function a(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,b?"%20":"+")}return a}),angular.module("multipart",[]),angular.module("multipart").service("RequestPart",function(){function a(){this.headers=[]}function b(a){for(var b=0,c=0;c0))throw new Error("newBlacklist must be an array!");a=b},this.$get=["$q","$http","$templateCache","$log",function(b,c,d){var e=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},f=function(a){var b=_.map(a,e),c=_.map(b,function(a){return".*"+a+".*?"}),d="("+c.join("|")+")",f='',g=new RegExp(f,"gi");return g},g=function(b){var c=f(a),d=b.replace(c,"");return d},h={fromVf:function(a){var b=c.get(a,{cache:d}).then(function(a){return a.data}).then(g);return b}};return h}]}),angular.module("ngForce").factory("sfr",["$q","$rootScope","Restangular","$log",function(a,b,c,d,e){var f=[],g=[],h={model:function(a,b){var d,f=c.setDefaultHeaders({Authorization:"Bearer "+e.sessionId}).setBaseUrl("/services/data/v29.0/sobjects/").setRestangularFields({id:"Id",selfLink:"attributes.url"});return d=b?f.one(a,b):f.all(a)},insert:function(b,c,e){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform insert."),g.promise;var h=angular.isDefined(e)?e:!1,i=f[b];return angular.isUndefined(i)&&(i=this.model(b),f[b]=i),i.post(c).then(function(a){return a.success?(d.debug("ngForce: Created new "+b+" record:",a),g.resolve(a),h?i.get(a.id).then(function(a){return d.debug("ngForce: Inserted:",a),a}):g.promise):(g.reject("Insert failed: ["+a.errors+"] Full response: "+a),g.promise) +})},update:function(b,c,e){var f=a.defer();if(!angular.isString(b))return f.reject("An sObject name is required to perform an update."),f.promise;var h=angular.isDefined(e)?e:!1,i=c.id||c.Id;if(!angular.isString(i))return f.reject('An "Id" field is required to perform an update.'),f.promise;var j=g[i];angular.isUndefined(j)&&(j=this.model(b,i),g[i]=j);for(var k=["Id","LastReferencedDate","LastModifiedById","LastModifiedDate","LastViewedDate","SystemModstamp","CreatedById","CreatedDate","IsDeleted"],l=0;l0;if(e===!0){var f=a.defer();return this.metadata(b).then(function(a){var e=a.reportMetadata;("string"==typeof c.reportBooleanFilter||null===c.reportBooleanFilter)&&(e.reportBooleanFilter=c.reportBooleanFilter),"[object Array]"===Object.prototype.toString.call(c.reportFilters)&&(e.reportFilters=c.reportFilters),g.one("reports").post(b,{reportMetadata:e},d).then(function(a){f.resolve(a)},function(a){f.reject(a)})}),f.promise}return g.one("reports",b).get(d)}},dashboard:{}}}]),angular.module("ngForce").factory("sfrBackend",["$q","$rootScope","$log","$httpBackend","encodeUriQuery",function(a,b,c,d,e){var f=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g={whenGetPage:function(a,b){var c=a;-1==c.indexOf("/apex/")&&(c="/apex/"+c);var e=f(c);d.whenGET(new RegExp(e,"i")).respond(b)},whenQuery:function(a,b,c){var g=angular.isString(c)?[c]:c,h=angular.isArray(b)?b:[b],i="query.*FROM\\++"+a;if("undefined"!=typeof g&&null!==g){var j=_.chain(g).map(function(a){return e(a)}).foldl(function(a,b){return a+=b}).value();i+="\\++WHERE.*"+f(j)}d.whenGET(new RegExp(i,"i")).respond(200,{totalSize:h.length,done:!0,records:h})},expectQuery:function(a,b,c){var g=angular.isString(c)?[c]:c,h=angular.isArray(b)?b:[b],i="query.*FROM\\++"+a;if("undefined"!=typeof g&&null!==g){var j=_.chain(g).map(function(a){return e(a)}).foldl(function(a,b){return a+=b}).value();i+="\\++WHERE.*"+f(j)}d.expectGET(new RegExp(i,"i")).respond(200,{totalSize:h.length,done:!0,records:h})},expectInsert:function(a,b,c){var e=angular.isArray(b)?b:[b],f=c||!0;angular.forEach(e,function(b){d.expectPOST(new RegExp(a,"i")).respond(201,{id:b.Id,success:!0,errors:[]}),f||d.expectGET(new RegExp(a+"/"+b.Id,"i")).respond(200,b)})},expectDelete:function(a,b){b=b||"";var c=angular.isArray(b)?b:[b];angular.forEach(c,function(b){d.expectDELETE(new RegExp(a+"/"+b,"i")).respond(201,{})})}};return g}]),angular.module("ngForce").factory("sfrfile",["$q","$rootScope","$log","Restangular","MultipartRequest","RequestPart","ngForceConfig",function(a,b,c,d,e,f,g){var h=d.withConfig(function(a){a.setDefaultHttpFields({cache:!1,transformRequest:function(a){return a}}),a.setBaseUrl("/services/data/v29.0/sobjects"),a.setDefaultHeaders({Authorization:"Bearer "+g.sessionId})}).setRestangularFields({id:"Id",selfLink:"attributes.url"});return h.insert=function(a,b,c,d){SObjectType={Document:{jsonPartName:"entity_document",binaryPartName:"Body"},Attachment:{jsonPartName:"entity_attachment",binaryPartName:"Body"},ContentVersion:{jsonPartName:"entity_content",binaryPartName:"VersionData"}};var g=SObjectType[a];if(void 0===typeof g)throw new Error("Upload not supported for SObject type '"+a+"'");var i="boundary_string",j=new e(i),k=new f;k.addHeader("Content-Disposition",'form-data; name="'+g.jsonPartName+'";'),k.addHeader("Content-Type","application/json"),k.setBody(b),j.addPart(k);var l=new f;l.addHeader("Content-Type","application/octet-stream"),l.addHeader("Content-Disposition",'form-data; name="'+g.binaryPartName+'"; filename="'+c+'"'),l.setBody(d),j.addPart(l);var m=new Uint8Array(j.getBuffer());return h.all(a).post(m,null,{"Content-Type":'multipart/form-data; boundary="'+i+'"'}).then(function(a){return a})},h}]),angular.module("ngForce").factory("sfrquery",["$q","$rootScope","$log","Restangular","encodeUriQuery","ngForceConfig",function(a,b,c,d,e,f){var g=d.withConfig(function(a){a.setDefaultHttpFields({cache:!1}),a.setBaseUrl("/services/data/v30.0/"),a.setDefaultHeaders({Authorization:"Bearer "+f.sessionId})}).setRestangularFields({id:"Id",selfLink:"attributes.url"}).oneUrl("query","/services/data/v30.0/query");return g.query=function(a,b){return b="undefined"!=typeof b?b:!1,g.withHttpConfig({cache:b}).get({q:a}).then(function(a){return a.records})},g.queryAll=function(b,c,d,f){return angular.isUndefined(c)&&(c=!0),angular.isUndefined(f)&&(f=[]),angular.isUndefined(d)&&(d=a.defer()),"select"===b.trim().substring(0,6).toLowerCase()&&(b="?q="+e(b)),g.withHttpConfig({cache:c}).customGET(b).then(function(a){return f=f.concat(a.records),a.done?(d.resolve(f),d.promise):void g.queryAll(_.last(a.nextRecordsUrl.split("/")),c,d,f)},function(a){return d.reject(a)}),d.notify(),d.promise},g}]),angular.module("ngForce").provider("vfr",function(){var a={escape:!1,timeout:1e4};if("object"!=typeof Visualforce)throw new Error("Visualforce is not available as an object! Did you forget to include the ngForce component?");return{setStandardOptions:function(b){if(b&&"object"!=typeof b)throw new Error("standardOptions must be an object");a=b},$get:["$q","$rootScope",function(b,c){function d(a,c,d){var f,g,h,i=Visualforce.remoting.Manager,j=a.split(".");if(c&&"object"!=typeof c)throw new Error("Options must be an object");if(j.length<2)throw new Error("Invalid Remote Action specified. Use Controller.MethodName or $RemoteAction.Controller.MethodName");return 3===j.length?(f=j[0],g=j[1],h=j[2]):2===j.length&&(g=j[0],h=j[1]),function(){var f,g=b.defer();return f=arguments.length?Array.prototype.slice.apply(arguments):[],f.splice(0,0,a),f.push(function(a,b){e(a,b,d,g)}),c&&f.push(c),i.invokeAction.apply(i,f),g.promise}}function e(a,b,d,e){a?("object"!=typeof a&&(a=JSON.parse(a)),Array.isArray(a)&&a[0].message&&a[0].errorCode?(e.reject(a),c.$safeApply()):(e.resolve(a),c.$safeApply())):"undefined"!=typeof d&&d?(e.resolve(),c.$safeApply()):(e.reject({message:"Null returned by RemoteAction not called with nullOk flag",errorCode:"NULL_RETURN"}),c.$safeApply())}return{send:d,standardOptions:a,bulkCreate:d("ngForceController.bulkCreate",this.standardOptions,!1),bulkUpdate:d("ngForceController.bulkUpdate",this.standardOptions,!1),create:d("ngForceController.create",this.standardOptions,!1),clone:d("ngForceController.sObjectKlone",this.standardOptions,!1),del:d("ngForceController.del",this.standardOptions,!0),describe:d("ngForceController.describe",this.standardOptions,!1),describeFieldSet:d("ngForceController.describeFieldSet",this.standardOptions,!1),describePicklistValues:d("ngForceController.getPicklistValues",this.standardOptions,!1),getObjectType:d("ngForceController.getObjType",this.standardOptions,!1),getQueryResultsAsSelect2Data:d("ngForceController.getQueryResultsAsSelect2Data",this.standardOptions,!1),query:d("ngForceController.query",{escape:!1,timeout:3e4},!1),queryFromFieldset:d("ngForceController.queryFromFieldSet",{escape:!1,timeout:3e4},!1),retrieve:d("ngForceController.retrieve",this.standardOptions,!1),search:d("ngForceController.search",this.standardOptions,!1),soqlFromFieldSet:d("ngForceController.soqlFromFieldSet",this.standardOptions,!1),update:d("ngForceController.updat",this.standardOptions,!0),upsert:d("ngForceController.upser",this.standardOptions,!0)}}]}}); +//# sourceMappingURL=ngForceWithDependencies.min.js.map \ No newline at end of file diff --git a/build/ngForceWithDependencies.min.js.map b/build/ngForceWithDependencies.min.js.map new file mode 100644 index 0000000..0654c73 --- /dev/null +++ b/build/ngForceWithDependencies.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ngForceWithDependencies.min.js","sources":["ngForce-dependencies.min.js","ngForce.min.js"],"names":["StringView","a","b","c","d","e","f","g","h","i","j","k","isFinite","l","this","encoding","toString","putUTF8CharCode","getUTF8CharLength","Uint8Array","putUTF16CharCode","getUTF16CharLength","Uint16Array","Uint32Array","constructor","String","ArrayBuffer","byteLength","length","byteOffset","buffer","subarray","Number","m","n","o","p","q","r","s","Math","max","isInteger","min","rawData","makeIndex","loadUTF8CharCode","loadUTF16CharCode","t","u","v","w","x","charCodeAt","y","bufferView","Object","freeze","cache","push","criteria","index","undefined","array","_","pop","false","null","number","object","string","true","value","Array","ke","Rd","call","__chain__","__wrapped__","Sd","apply","arguments","bb","prototype","Lb","je","Kd","W","he","nodeClass","fe","O","P","S","V","U","source","C","exec","lastIndex","ve","input","ue","ye","Yd","cb","ed","__bindData__","funcNames","name","funcDecomp","Pd","D","test","H","Pc","db","eb","pb","gb","tb","hb","$","M","T","Dd","N","argsObject","Bd","Kb","xe","ib","dc","ze","jb","Od","ee","kb","lb","createCallback","mb","Ed","Wd","nb","Z","shadowedProps","K","bottom","loop","top","init","useHas","args","firstArg","yd","ie","Q","Gd","Qb","keys","Hd","ge","Id","ob","qe","indexOf","yc","qb","Ld","rb","argsClass","ownLast","sb","re","ub","vb","wb","xb","yb","Ab","zb","me","Bb","sort","Cb","Db","Eb","Fb","Gb","nodeType","Hb","splice","Ib","Jb","$d","_d","parseFloat","Mb","Ob","Nb","Pb","Rb","Sb","Tb","Ub","Vb","ud","Wb","Xb","Yb","Zb","unindexedChars","split","$b","be","_b","ac","bc","cc","ec","fc","gc","hc","ic","jc","kc","lc","mc","nc","ce","oc","pc","qc","rc","sc","tc","uc","vc","wc","xc","Hc","zc","Ac","Bc","Cc","Dc","Vd","Ec","Md","Fc","Gc","Ic","Jc","Kc","Lc","concat","Mc","De","Nc","Oc","Qc","Rc","Sc","Tc","Uc","leading","maxWait","trailing","Fe","Nd","Ud","Vc","Wc","Xc","Yc","Zc","$c","_c","X","ad","bd","cd","id","dd","replace","te","fd","chain","gd","Jd","hd","jd","kd","ld","templateSettings","we","imports","interpolate","G","Cd","escape","E","B","evaluate","slice","I","variable","z","A","sourceURL","L","md","nd","se","od","pd","qd","rd","sd","td","fb","defaults","ab","pick","J","vd","Boolean","wd","Date","xd","Error","Function","zd","Ad","RegExp","TypeError","Fd","ceil","clearTimeout","floor","Qd","getPrototypeOf","hasOwnProperty","Td","propertyIsEnumerable","setTimeout","unshift","Xd","defineProperty","create","Zd","isArray","isNaN","ae","de","parseInt","random","R","toLocaleString","valueOf","support","enumErrorProps","enumPrototypes","WinRTError","nonEnumArgs","nonEnumShadows","spliceObjects","document","join","Y","le","ne","oe","pe","&","<",">","\"","'","Ae","Be","Ce","Ee","now","getTime","Ge","F","after","assign","at","bind","bindAll","bindKey","compact","compose","constant","countBy","curry","debounce","defer","delay","difference","filter","flatten","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","functions","groupBy","indexBy","initial","intersection","invert","invoke","map","mapValues","memoize","merge","omit","once","pairs","partial","partialRight","pluck","property","pull","range","reject","remove","rest","shuffle","sortBy","tap","throttle","times","toArray","transform","union","uniq","values","where","without","wrap","xor","zip","zipObject","collect","drop","each","eachRight","extend","methods","select","tail","unique","unzip","clone","cloneDeep","contains","every","find","findIndex","findKey","findLast","findLastIndex","findLastKey","has","identity","isArguments","isBoolean","isDate","isElement","isEmpty","isEqual","isFunction","isNull","isNumber","isObject","isPlainObject","isRegExp","isString","isUndefined","lastIndexOf","mixin","noConflict","noop","reduce","reduceRight","result","runInContext","size","some","sortedIndex","template","unescape","uniqueId","all","any","detect","findWhere","foldl","foldr","include","inject","first","last","sample","take","head","VERSION","configurable","enumerable","writable","boolean","function","\\","\n","\r","\t","
","
","window","exports","module","global","define","amd","angular","provider","params","defaultRequestParams","method","toLowerCase","isSafe","url","data","configuration","isAbsoluteUrl","absoluteUrl","setSelfLinkAbsoluteUrl","baseUrl","setBaseUrl","substring","extraFields","setExtraFields","defaultHttpFields","setDefaultHttpFields","withHttpValues","encodeIds","setEncodeIds","get","post","put","common","setDefaultRequestParams","requestParams","defaultHeaders","setDefaultHeaders","methodOverriders","setMethodOverriders","isOverridenMethod","jsonp","setJsonp","urlCreator","setUrlCreator","urlCreatorFactory","restangularFields","route","parentResource","restangularCollection","cannonicalId","etag","selfLink","getList","trace","options","patch","getRestangularUrl","getRequestedUrl","putElement","addRestangularMethod","getParentList","ids","httpConfig","reqParams","one","several","oneUrl","allUrl","customPUT","customPOST","customDELETE","customGET","customGETLIST","customOperation","doPUT","doPOST","doDELETE","doGET","doGETLIST","fromServer","withConfig","withHttpConfig","singleOne","plain","save","setRestangularFields","isRestangularized","setFieldToElem","getFieldFromElem","copy","setIdToElem","getIdFromElem","isValidId","setUrlToElem","getUrlFromElem","useCannonicalId","setUseCannonicalId","getCannonicalIdFromElem","responseInterceptors","defaultResponseInterceptor","responseExtractor","addResponseInterceptor","setResponseInterceptor","setResponseExtractor","requestInterceptors","defaultInterceptor","element","headers","fullRequestInterceptor","addRequestInterceptor","setRequestInterceptor","addFullRequestInterceptor","setFullRequestInterceptor","errorInterceptor","setErrorInterceptor","onBeforeElemRestangularized","setOnBeforeElemRestangularized","onElemRestangularized","setOnElemRestangularized","shouldSaveParent","setParentless","suffix","setRequestSuffix","transformers","addElementTransformer","extendCollection","extendModel","transformElem","transformLocalElements","setTransformOnlyServerElements","fullResponse","setFullResponse","setConfig","config","parentsArray","reverse","resource","base","encodeURIComponent","fetchUrl","fetchRequestedUrl","toJson","path","$get","$object","then","resolve","promise","toUpperCase","status","X-HTTP-Method-Override","elem","service","stripRestangular","restangularizeElement","restangularizeCollection","run","$safeApply","$$phase","$apply","b64ToUint6","uint6ToB64","bytesToBase64","fromCharCode","base64ToBytes","makeFromBase64","RangeError","toBase64","subview","forEachChar","factory","set","setBody","body","bodyType","addHeader","getRawHeaders","getBuffer","JSON","stringify","boundaryStr","parts","addPart","setNamespace","getPromiseObj","remoteObj","retrieve","opts","handleWithPromise","_props","update","_isArray","del","setScriptSymbolBlacklist","fromVf","model","Authorization","sessionId","insert","isDefined","success","debug","errors","delete","analytics","reports","metadata","async","includeDetails","reportFilters","reportMetadata","reportBooleanFilter","dashboard","whenGetPage","whenGET","respond","whenQuery","totalSize","done","records","expectQuery","expectGET","expectInsert","expectPOST","expectDelete","expectDELETE","transformRequest","SObjectType","Document","jsonPartName","binaryPartName","Attachment","ContentVersion","Content-Type","query","queryAll","trim","nextRecordsUrl","notify","timeout","Visualforce","setStandardOptions","remoting","Manager","invokeAction","parse","message","errorCode","send","standardOptions","bulkCreate","bulkUpdate","describe","describeFieldSet","describePicklistValues","getObjectType","getQueryResultsAsSelect2Data","queryFromFieldset","search","soqlFromFieldSet","upsert"],"mappings":";;;AAGA,YAAa,SAASA,YAAWC,EAAEC,EAAEC,EAAEC,GAAG,GAAIC,GAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,SAAST,GAAGA,EAAE,EAAEU,EAAE,EAAGX,KAAIY,KAAKC,SAASb,EAAEc,WAAYf,GAAE,OAAOa,KAAKC,UAAU,IAAI,QAAQP,EAAER,WAAWiB,gBAAgBR,EAAET,WAAWkB,kBAAkBb,EAAEc,UAAW,MAAMlB,EAAE,KAAI,SAASO,EAAER,WAAWoB,iBAAiBX,EAAET,WAAWqB,mBAAmBhB,EAAEiB,WAAY,MAAMrB,EAAE,KAAI,SAASI,EAAEkB,YAAYV,GAAG,EAAG,MAAMZ,EAAE,SAAQI,EAAEc,WAAWN,GAAG,GAAGZ,EAAE,aAAcA,IAAG,IAAI,SAASY,GAAG,C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AAoBrqB,IAAGA,GAAGC,EAAEypB,UAAU3pB,EAAEsqB,eAAepqB,EAAEya,QAAQoV,QAAQ,4DAA4DC,UAAU,gBAAgBhwB,EAAEsqB,cAAc,OAAO2F,KAAKhwB,EAAEiwB,gBAAgBpwB,EAAEqwB,WAAWlwB,EAAE,+BAA+BU,KAAKuvB,iBAAgB,GAAIE,WAAWnwB,EAAE,+BAA+BU,KAAKuvB,iBAAgB,GAAIxa,OAAOzV,EAAE,2BAA2BU,KAAKuvB,iBAAgB,GAAI1T,MAAMvc,EAAE,iCAAiCU,KAAKuvB,iBAAgB,GAAIzD,IAAIxsB,EAAE,wBAAwBU,KAAKuvB,iBAAgB,GAAIG,SAASpwB,EAAE,6BAA6BU,KAAKuvB,iBAAgB,GAAII,iBAAiBrwB,EAAE,qCAAqCU,KAAKuvB,iBAAgB,GAAIK,uBAAuBtwB,EAAE,sCAAsCU,KAAKuvB,iBAAgB,GAAIM,cAAcvwB,EAAE,+BAA+BU,KAAKuvB,iBAAgB,GAAIO,6BAA6BxwB,EAAE,iDAAiDU,KAAKuvB,iBAAgB,GAAIf,MAAMlvB,EAAE,2BAA2BwS,QAAO,EAAG+c,QAAQ,MAAK,GAAIkB,kBAAkBzwB,EAAE,uCAAuCwS,QAAO,EAAG+c,QAAQ,MAAK,GAAIrD,SAASlsB,EAAE,6BAA6BU,KAAKuvB,iBAAgB,GAAIS,OAAO1wB,EAAE,2BAA2BU,KAAKuvB,iBAAgB,GAAIU,iBAAiB3wB,EAAE,qCAAqCU,KAAKuvB,iBAAgB,GAAI3D,OAAOtsB,EAAE,0BAA0BU,KAAKuvB,iBAAgB,GAAIW,OAAO5wB,EAAE,0BAA0BU,KAAKuvB,iBAAgB"} \ No newline at end of file diff --git a/build/ngForceWithRequirements.min.js b/build/ngForceWithRequirements.min.js deleted file mode 100644 index e3e711a..0000000 --- a/build/ngForceWithRequirements.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! ngForce 2014-06-07 */ -/*! visit https://noeticpenguin.github.io/ngForce for more info. */ - -(function(){function a(a,b,c){for(var d=(c||0)-1,e=a?a.length:0;++d-1?0:-1:b?0:-1}function c(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:u+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function d(a){return a.charCodeAt(0)}function e(a,b){for(var c=a.criteria,d=b.criteria,e=-1,f=c.length;++eh||"undefined"==typeof g)return 1;if(h>g||"undefined"==typeof h)return-1}}return a.index-b.index}function f(a){var b=-1,d=a.length,e=a[0],f=a[d/2|0],g=a[d-1];if(e&&"object"==typeof e&&f&&"object"==typeof f&&g&&"object"==typeof g)return!1;var h=i();h["false"]=h["null"]=h["true"]=h.undefined=!1;var j=i();for(j.array=a,j.cache=h,j.push=c;++be?0:e);++d=v&&g===a,j=[];if(i){var k=f(d);k?(g=b,d=k):i=!1}for(;++e-1:void 0});return e.pop(),f.pop(),t&&(l(e),l(f)),g}function ib(a,b,c,d,e){(ke(b)?dc:ye)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=ke(b))||ze(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?ke(j)?j:[]:ze(j)?j:{}),d.push(b),e.push(j),l||ib(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function jb(a,b){return a+Od(ee()*(b-a+1))}function kb(c,d,e){var g=-1,i=pb(),j=c?c.length:0,k=[],n=!d&&j>=v&&i===a,o=e||n?h():k;if(n){var p=f(o);i=b,o=p}for(;++g3&&"function"==typeof b[c-2])var d=cb(b[--c-1],b[c--],2);else c>2&&"function"==typeof b[c-1]&&(d=b[--c]);for(var e=n(arguments,1,c),f=-1,g=h(),i=h();++fc?be(0,f+c):c)||0,ke(a)?g=e(a,b,c)>-1:"number"==typeof f?g=(Qb(a)?a.indexOf(b,c):e(a,b,c))>-1:ue(a,function(a){return++d>=c?!(g=a===b):void 0}),g}function _b(a,b,c){var d=!0;if(b=q.createCallback(b,c,3),ke(a))for(var e=-1,f=a.length;++ef&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);g>e&&(e=g,f=a)});return f}function ic(a,b,c){var e=1/0,f=e;if("function"!=typeof b&&c&&c[b]===a&&(b=null),null==b&&ke(a))for(var g=-1,h=a.length;++gi&&(f=i)}else b=null==b&&Qb(a)?d:q.createCallback(b,c,3),ue(a,function(a,c,d){var g=b(a,c,d);e>g&&(e=g,f=a)});return f}function jc(a,b,c,d){var e=arguments.length<3;if(b=q.createCallback(b,d,4),ke(a)){var f=-1,g=a.length;for(e&&(c=a[++f]);++fd?be(0,e+d):d||0}else if(d){var f=Hc(b,c);return b[f]===c?f:-1}return a(b,c,d)}function zc(a,b,c){var d=0,e=a?a.length:0;if("number"!=typeof b&&null!=b){var f=e;for(b=q.createCallback(b,c,3);f--&&b(a[f],f,a);)d++}else d=null==b||c?1:b||d;return n(a,0,ce(be(0,e-d),e))}function Ac(){for(var c=[],d=-1,e=arguments.length,g=h(),i=pb(),j=i===a,k=h();++d=v&&f(d?c[d]:k)))}var o=c[0],p=-1,q=o?o.length:0,r=[];a:for(;++pc?be(0,d+c):ce(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function Dc(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++ce;){var g=e+f>>>1;c(a[g])1?arguments:arguments[0],b=-1,c=a?hc(De(a,"length")):0,d=ud(0>c?0:c);++b2?mb(a,17,n(arguments,2),null,b):mb(a,1,null,null,b)}function Qc(a){for(var b=arguments.length>1?gb(arguments,!0,!1,1):Bb(a),c=-1,d=b.length;++c2?mb(b,19,n(arguments,2),null,a):mb(b,3,null,null,a)}function Sc(){for(var a=arguments,b=a.length;b--;)if(!Kb(a[b]))throw new Ed;return function(){for(var b=arguments,c=a.length;c--;)b=[a[c].apply(this,b)];return b[0]}}function Tc(a,b){return b="number"==typeof b?b:+b||a.length,mb(a,4,null,null,null,b)}function Uc(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!Kb(a))throw new Ed;if(b=be(0,b)||0,c===!0){var n=!0;m=!1}else Lb(c)&&(n=c.leading,l="maxWait"in c&&(be(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-(Fe()-g);if(0>=c){e&&Nd(e);var l=j;e=i=j=p,l&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))}else i=Ud(o,c)},q=function(){i&&Nd(i),e=i=j=p,(m||l!==b)&&(k=Fe(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=Fe(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var p=l-(g-k),r=0>=p;r?(e&&(e=Nd(e)),k=g,f=a.apply(h,d)):e||(e=Ud(q,p))}return r&&i?i=Nd(i):i||b===l||(i=Ud(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Vc(a){if(!Kb(a))throw new Ed;var b=n(arguments,1);return Ud(function(){a.apply(p,b)},1)}function Wc(a,b){if(!Kb(a))throw new Ed;var c=n(arguments,2);return Ud(function(){a.apply(p,c)},b)}function Xc(a,b){if(!Kb(a))throw new Ed;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):u+arguments[0];return Rd.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Yc(a){var b,c;if(!Kb(a))throw new Ed;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Zc(a){return mb(a,16,n(arguments,1))}function $c(a){return mb(a,32,null,n(arguments,1))}function _c(a,b,c){var d=!0,e=!0;if(!Kb(a))throw new Ed;return c===!1?d=!1:Lb(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),X.leading=d,X.maxWait=b,X.trailing=e,Uc(a,b,X)}function ad(a,b){return mb(b,16,[a])}function bd(a){return function(){return a}}function cd(a,b,c){var d=typeof a;if(null==a||"function"==d)return cb(a,b,c);if("object"!=d)return id(a);var e=me(a),f=e[0],g=a[f];return 1!=e.length||g!==g||Lb(g)?function(b){for(var c=e.length,d=!1;c--&&(d=hb(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function dd(a){return null==a?"":Dd(a).replace(te,ob)}function ed(a){return a}function fd(a,b,c){var d=!0,e=b&&Bb(b);b&&(c||e.length)||(null==c&&(c=b),f=r,b=a,a=q,e=Bb(b)),c===!1?d=!1:Lb(c)&&"chain"in c&&(d=c.chain);var f=a,g=Kb(f);dc(e,function(c){var e=a[c]=b[c];g&&(f.prototype[c]=function(){var b=this.__chain__,c=this.__wrapped__,g=[c];Sd.apply(g,arguments);var h=e.apply(a,g);if(d||b){if(c===h&&Lb(h))return this;h=new f(h),h.__chain__=b}return h})})}function gd(){return c._=Jd,this}function hd(){}function id(a){return function(b){return b[a]}}function jd(a,b,c){var d=null==a,e=null==b;if(null==c&&("boolean"==typeof a&&e?(c=a,a=1):e||"boolean"!=typeof b||(c=b,e=!0)),d&&e&&(b=1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=ee();return ce(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return jb(a,b)}function kd(a,b){if(a){var c=a[b];return Kb(c)?a[b]():c}}function ld(a,b,c){var d=q.templateSettings;a=Dd(a||""),c=we({},c,d);var e,f=we({},c.imports,d.imports),h=me(f),i=Yb(f),j=0,k=c.interpolate||G,l="__p += '",m=Cd((c.escape||G).source+"|"+k.source+"|"+(k===E?B:G).source+"|"+(c.evaluate||G).source+"|$","g");a.replace(m,function(b,c,d,f,h,i){return d||(d=f),l+=a.slice(j,i).replace(I,g),c&&(l+="' +\n__e("+c+") +\n'"),h&&(e=!0,l+="';\n"+h+";\n__p += '"),d&&(l+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),j=i+b.length,b}),l+="';\n";var n=c.variable,o=n;o||(n="obj",l="with ("+n+") {\n"+l+"\n}\n"),l=(e?l.replace(y,""):l).replace(z,"$1").replace(A,"$1;"),l="function("+n+") {\n"+(o?"":n+" || ("+n+" = {});\n")+"var __t, __p = '', __e = _.escape"+(e?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var r="\n/*\n//# sourceURL="+(c.sourceURL||"/lodash/template/source["+L++ +"]")+"\n*/";try{var s=yd(h,"return "+l+r).apply(p,i)}catch(t){throw t.source=l,t}return b?s(b):(s.source=l,s)}function md(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=ud(a);for(b=cb(b,c,1);++d/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:q}};var ie=function(a){var b="var index, iterable = "+a.firstArg+", result = "+a.init+";\nif (!iterable) return result;\n"+a.top+";";a.array?(b+="\nvar length = iterable.length; index = -1;\nif ("+a.array+") { ",he.unindexedChars&&(b+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),b+="\n while (++index < length) {\n "+a.loop+";\n }\n}\nelse { "):he.nonEnumArgs&&(b+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+a.loop+";\n }\n } else { "),he.enumPrototypes&&(b+="\n var skipProto = typeof iterable == 'function';\n "),he.enumErrorProps&&(b+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var c=[];if(he.enumPrototypes&&c.push('!(skipProto && index == "prototype")'),he.enumErrorProps&&c.push('!(skipErrorProps && (index == "message" || index == "name"))'),a.useHas&&a.keys)b+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ";else if(b+="\n for (index in iterable) {\n",a.useHas&&c.push("hasOwnProperty.call(iterable, index)"),c.length&&(b+=" if ("+c.join(" && ")+") {\n "),b+=a.loop+"; ",c.length&&(b+="\n }"),b+="\n } ",he.nonEnumShadows){for(b+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;7>k;k++)b+="\n index = '"+a.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",a.useHas||(b+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),b+=") {\n "+a.loop+";\n } ";b+="\n } "}return(a.array||he.nonEnumArgs)&&(b+="\n}"),b+=a.bottom+";\nreturn result"};Yd||(bb=function(){function a(){}return function(b){if(Lb(b)){a.prototype=b;var d=new a;a.prototype=null}return d||c.Object()}}());var je=Xd?function(a,b){Y.value=b,Xd(a,"__bindData__",Y)}:hd;he.argsClass||(tb=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Rd.call(a,"callee")&&!Td.call(a,"callee")||!1});var ke=Zd||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Kd.call(a)==N||!1},le=nb({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),me=ae?function(a){return Lb(a)?he.enumPrototypes&&"function"==typeof a||he.nonEnumArgs&&a.length&&tb(a)?le(a):ae(a):[]}:le,ne={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:me,loop:"if (callback(iterable[index], index, collection) === false) return result"},oe={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:me,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},pe={top:"if (!objectTypes[typeof iterable]) return result;\n"+ne.top,array:!1},qe={"&":"&","<":"<",">":">",'"':""","'":"'"},re=Db(qe),se=Cd("("+me(re).join("|")+")","g"),te=Cd("["+me(qe).join("")+"]","g"),ue=nb(ne),ve=nb(oe,{top:oe.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),we=nb(oe),xe=nb(ne,pe,{useHas:!1}),ye=nb(ne,pe);Kb(/x/)&&(Kb=function(a){return"function"==typeof a&&Kd.call(a)==R});var ze=Qd?function(a){if(!a||Kd.call(a)!=T||!he.argsClass&&tb(a))return!1;var b=a.valueOf,c=qb(b)&&(c=Qd(b))&&Qd(c);return c?a==c||Qd(a)==c:rb(a)}:rb,Ae=lb(function(a,b,c){Rd.call(a,c)?a[c]++:a[c]=1}),Be=lb(function(a,b,c){(Rd.call(a,c)?a[c]:a[c]=[]).push(b)}),Ce=lb(function(a,b,c){a[c]=b}),De=gc,Ee=ac,Fe=qb(Fe=wd.now)&&Fe||function(){return(new wd).getTime()},Ge=8==de(x+"08")?de:function(a,b){return de(Qb(a)?a.replace(F,""):a,b||0)};return q.after=Oc,q.assign=ve,q.at=Zb,q.bind=Pc,q.bindAll=Qc,q.bindKey=Rc,q.chain=pd,q.compact=sc,q.compose=Sc,q.constant=bd,q.countBy=Ae,q.create=wb,q.createCallback=cd,q.curry=Tc,q.debounce=Uc,q.defaults=we,q.defer=Vc,q.delay=Wc,q.difference=tc,q.filter=ac,q.flatten=xc,q.forEach=dc,q.forEachRight=ec,q.forIn=xe,q.forInRight=zb,q.forOwn=ye,q.forOwnRight=Ab,q.functions=Bb,q.groupBy=Be,q.indexBy=Ce,q.initial=zc,q.intersection=Ac,q.invert=Db,q.invoke=fc,q.keys=me,q.map=gc,q.mapValues=Sb,q.max=hc,q.memoize=Xc,q.merge=Tb,q.min=ic,q.omit=Ub,q.once=Yc,q.pairs=Vb,q.partial=Zc,q.partialRight=$c,q.pick=Wb,q.pluck=De,q.property=id,q.pull=Dc,q.range=Ec,q.reject=lc,q.remove=Fc,q.rest=Gc,q.shuffle=nc,q.sortBy=qc,q.tap=qd,q.throttle=_c,q.times=md,q.toArray=rc,q.transform=Xb,q.union=Ic,q.uniq=Jc,q.values=Yb,q.where=Ee,q.without=Kc,q.wrap=ad,q.xor=Lc,q.zip=Mc,q.zipObject=Nc,q.collect=gc,q.drop=Gc,q.each=dc,q.eachRight=ec,q.extend=ve,q.methods=Bb,q.object=Nc,q.select=ac,q.tail=Gc,q.unique=Jc,q.unzip=Mc,fd(q),q.clone=ub,q.cloneDeep=vb,q.contains=$b,q.escape=dd,q.every=_b,q.find=bc,q.findIndex=uc,q.findKey=xb,q.findLast=cc,q.findLastIndex=vc,q.findLastKey=yb,q.has=Cb,q.identity=ed,q.indexOf=yc,q.isArguments=tb,q.isArray=ke,q.isBoolean=Eb,q.isDate=Fb,q.isElement=Gb,q.isEmpty=Hb,q.isEqual=Ib,q.isFinite=Jb,q.isFunction=Kb,q.isNaN=Mb,q.isNull=Nb,q.isNumber=Ob,q.isObject=Lb,q.isPlainObject=ze,q.isRegExp=Pb,q.isString=Qb,q.isUndefined=Rb,q.lastIndexOf=Cc,q.mixin=fd,q.noConflict=gd,q.noop=hd,q.now=Fe,q.parseInt=Ge,q.random=jd,q.reduce=jc,q.reduceRight=kc,q.result=kd,q.runInContext=o,q.size=oc,q.some=pc,q.sortedIndex=Hc,q.template=ld,q.unescape=nd,q.uniqueId=od,q.all=_b,q.any=pc,q.detect=bc,q.findWhere=bc,q.foldl=jc,q.foldr=kc,q.include=$b,q.inject=jc,fd(function(){var a={};return ye(q,function(b,c){q.prototype[c]||(a[c]=b)}),a}(),!1),q.first=wc,q.last=Bc,q.sample=mc,q.take=wc,q.head=wc,ye(q,function(a,b){var c="sample"!==b;q.prototype[b]||(q.prototype[b]=function(b,d){var e=this.__chain__,f=a(this.__wrapped__,b,d);return e||null!=b&&(!d||c&&"function"==typeof b)?new r(f,e):f})}),q.VERSION="2.4.1",q.prototype.chain=rd,q.prototype.toString=sd,q.prototype.value=td,q.prototype.valueOf=td,ue(["join","pop","shift"],function(a){var b=Fd[a];q.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new r(c,a):c}}),ue(["push","reverse","sort","unshift"],function(a){var b=Fd[a];q.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),ue(["concat","slice","splice"],function(a){var b=Fd[a];q.prototype[a]=function(){return new r(b.apply(this.__wrapped__,arguments),this.__chain__)}}),he.spliceObjects||ue(["pop","shift","splice"],function(a){var b=Fd[a],c="splice"==a;q.prototype[a]=function(){var a=this.__chain__,d=this.__wrapped__,e=b.apply(d,arguments);return 0===d.length&&delete d[0],a||c?new r(e,a):e}}),q}var p,q=[],r=[],s=0,t={},u=+new Date+"",v=75,w=40,x=" \f \n\r\u2028\u2029 ᠎              ",y=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,A=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,D=/^\s*function[ \n\r\t]+\w/,E=/<%=([\s\S]+?)%>/g,F=RegExp("^["+x+"]*0+(?=.$)"),G=/($^)/,H=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,J=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],K=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],L=0,M="[object Arguments]",N="[object Array]",O="[object Boolean]",P="[object Date]",Q="[object Error]",R="[object Function]",S="[object Number]",T="[object Object]",U="[object RegExp]",V="[object String]",W={}; -W[R]=!1,W[M]=W[N]=W[O]=W[P]=W[S]=W[T]=W[U]=W[V]=!0;var X={leading:!1,maxWait:0,trailing:!1},Y={configurable:!1,enumerable:!1,value:null,writable:!1},Z={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},$={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},_={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ab=$[typeof window]&&window||this,bb=$[typeof exports]&&exports&&!exports.nodeType&&exports,cb=$[typeof module]&&module&&!module.nodeType&&module,db=cb&&cb.exports===bb&&bb,eb=$[typeof global]&&global;!eb||eb.global!==eb&&eb.window!==eb||(ab=eb);var fb=o();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ab._=fb,define(function(){return fb})):bb&&cb?db?(cb.exports=fb)._=fb:bb._=fb:ab._=fb}).call(this),function(){var a=angular.module("restangular",[]);a.provider("Restangular",function(){var a={};a.init=function(a,b){function c(a,b,c,d){var e={};return _.each(_.keys(d),function(f){var g=d[f];g.params=_.extend({},g.params,a.defaultRequestParams[g.method.toLowerCase()]),_.isEmpty(g.params)&&delete g.params,e[f]=a.isSafe(g.method)?function(){return b(_.extend(g,{url:c}))}:function(a){return b(_.extend(g,{url:c,data:a}))}}),e}a.configuration=b;var d=["get","head","options","trace","getlist"];b.isSafe=function(a){return _.contains(d,a.toLowerCase())};var e=/^https?:\/\//i;b.isAbsoluteUrl=function(a){return _.isUndefined(b.absoluteUrl)||_.isNull(b.absoluteUrl)?a&&e.test(a):b.absoluteUrl},b.absoluteUrl=_.isUndefined(b.absoluteUrl)?!0:b.absoluteUrl,a.setSelfLinkAbsoluteUrl=function(a){b.absoluteUrl=a},b.baseUrl=_.isUndefined(b.baseUrl)?"":b.baseUrl,a.setBaseUrl=function(a){return b.baseUrl=/\/$/.test(a)?a.substring(0,a.length-1):a,this},b.extraFields=b.extraFields||[],a.setExtraFields=function(a){return b.extraFields=a,this},b.defaultHttpFields=b.defaultHttpFields||{},a.setDefaultHttpFields=function(a){return b.defaultHttpFields=a,this},b.withHttpValues=function(a,c){return _.defaults(c,a,b.defaultHttpFields)},b.encodeIds=_.isUndefined(b.encodeIds)?!0:b.encodeIds,a.setEncodeIds=function(a){b.encodeIds=a},b.defaultRequestParams=b.defaultRequestParams||{get:{},post:{},put:{},remove:{},common:{}},a.setDefaultRequestParams=function(a,c){var d=[],e=c||a;return _.isUndefined(c)?d.push("common"):_.isArray(a)?d=a:d.push(a),_.each(d,function(a){b.defaultRequestParams[a]=e}),this},a.requestParams=b.defaultRequestParams,b.defaultHeaders=b.defaultHeaders||{},a.setDefaultHeaders=function(c){return b.defaultHeaders=c,a.defaultHeaders=b.defaultHeaders,this},a.defaultHeaders=b.defaultHeaders,b.methodOverriders=b.methodOverriders||[],a.setMethodOverriders=function(a){var c=_.extend([],a);return b.isOverridenMethod("delete",c)&&c.push("remove"),b.methodOverriders=c,this},b.jsonp=_.isUndefined(b.jsonp)?!1:b.jsonp,a.setJsonp=function(a){b.jsonp=a},b.isOverridenMethod=function(a,c){var d=c||b.methodOverriders;return!_.isUndefined(_.find(d,function(b){return b.toLowerCase()===a.toLowerCase()}))},b.urlCreator=b.urlCreator||"path",a.setUrlCreator=function(a){if(!_.has(b.urlCreatorFactory,a))throw new Error("URL Path selected isn't valid");return b.urlCreator=a,this},b.restangularFields=b.restangularFields||{id:"id",route:"route",parentResource:"parentResource",restangularCollection:"restangularCollection",cannonicalId:"__cannonicalId",etag:"restangularEtag",selfLink:"href",get:"get",getList:"getList",put:"put",post:"post",remove:"remove",head:"head",trace:"trace",options:"options",patch:"patch",getRestangularUrl:"getRestangularUrl",getRequestedUrl:"getRequestedUrl",putElement:"putElement",addRestangularMethod:"addRestangularMethod",getParentList:"getParentList",clone:"clone",ids:"ids",httpConfig:"_$httpConfig",reqParams:"reqParams",one:"one",all:"all",several:"several",oneUrl:"oneUrl",allUrl:"allUrl",customPUT:"customPUT",customPOST:"customPOST",customDELETE:"customDELETE",customGET:"customGET",customGETLIST:"customGETLIST",customOperation:"customOperation",doPUT:"doPUT",doPOST:"doPOST",doDELETE:"doDELETE",doGET:"doGET",doGETLIST:"doGETLIST",fromServer:"fromServer",withConfig:"withConfig",withHttpConfig:"withHttpConfig",singleOne:"singleOne",plain:"plain",save:"save"},a.setRestangularFields=function(a){return b.restangularFields=_.extend(b.restangularFields,a),this},b.isRestangularized=function(a){return!!a[b.restangularFields.one]||!!a[b.restangularFields.all]},b.setFieldToElem=function(a,b,c){var d=a.split("."),e=b;return _.each(_.initial(d),function(a){e[a]={},e=e[a]}),e[_.last(d)]=c,this},b.getFieldFromElem=function(a,b){var c=a.split("."),d=b;return _.each(c,function(a){d&&(d=d[a])}),angular.copy(d)},b.setIdToElem=function(a,c){return b.setFieldToElem(b.restangularFields.id,a,c),this},b.getIdFromElem=function(a){return b.getFieldFromElem(b.restangularFields.id,a)},b.isValidId=function(a){return""!==a&&!_.isUndefined(a)&&!_.isNull(a)},b.setUrlToElem=function(a,c){return b.setFieldToElem(b.restangularFields.selfLink,a,c),this},b.getUrlFromElem=function(a){return b.getFieldFromElem(b.restangularFields.selfLink,a)},b.useCannonicalId=_.isUndefined(b.useCannonicalId)?!1:b.useCannonicalId,a.setUseCannonicalId=function(a){return b.useCannonicalId=a,this},b.getCannonicalIdFromElem=function(a){var c=a[b.restangularFields.cannonicalId],d=b.isValidId(c)?c:b.getIdFromElem(a);return d},b.responseInterceptors=b.responseInterceptors||[],b.defaultResponseInterceptor=function(a){return a},b.responseExtractor=function(a,c,d,e,f,g){var h=angular.copy(b.responseInterceptors);h.push(b.defaultResponseInterceptor);var i=a;return _.each(h,function(a){i=a(i,c,d,e,f,g)}),i},a.addResponseInterceptor=function(a){return b.responseInterceptors.push(a),this},a.setResponseInterceptor=a.addResponseInterceptor,a.setResponseExtractor=a.addResponseInterceptor,b.requestInterceptors=b.requestInterceptors||[],b.defaultInterceptor=function(a,b,c,d,e,f,g){return{element:a,headers:e,params:f,httpConfig:g}},b.fullRequestInterceptor=function(a,c,d,e,f,g,h){var i=angular.copy(b.requestInterceptors),j=b.defaultInterceptor(a,c,d,e,f,g,h);return _.reduce(i,function(a,b){return _.extend(a,b(a.element,c,d,e,a.headers,a.params,a.httpConfig))},j)},a.addRequestInterceptor=function(a){return b.requestInterceptors.push(function(b,c,d,e,f,g,h){return{headers:f,params:g,element:a(b,c,d,e),httpConfig:h}}),this},a.setRequestInterceptor=a.addRequestInterceptor,a.addFullRequestInterceptor=function(a){return b.requestInterceptors.push(a),this},a.setFullRequestInterceptor=a.addFullRequestInterceptor,b.errorInterceptor=b.errorInterceptor||function(){},a.setErrorInterceptor=function(a){return b.errorInterceptor=a,this},b.onBeforeElemRestangularized=b.onBeforeElemRestangularized||function(a){return a},a.setOnBeforeElemRestangularized=function(a){return b.onBeforeElemRestangularized=a,this},b.onElemRestangularized=b.onElemRestangularized||function(a){return a},a.setOnElemRestangularized=function(a){return b.onElemRestangularized=a,this},b.shouldSaveParent=b.shouldSaveParent||function(){return!0},a.setParentless=function(a){return _.isArray(a)?b.shouldSaveParent=function(b){return!_.contains(a,b)}:_.isBoolean(a)&&(b.shouldSaveParent=function(){return!a}),this},b.suffix=_.isUndefined(b.suffix)?null:b.suffix,a.setRequestSuffix=function(a){return b.suffix=a,this},b.transformers=b.transformers||{},a.addElementTransformer=function(c,d,e){var f=null,g=null;2===arguments.length?g=d:(g=e,f=d);var h=b.transformers[c];return h||(h=b.transformers[c]=[]),h.push(function(a,b){return _.isNull(f)||a==f?g(b):b}),a},a.extendCollection=function(b,c){return a.addElementTransformer(b,!0,c)},a.extendModel=function(b,c){return a.addElementTransformer(b,!1,c)},b.transformElem=function(a,c,d,e,f){if(!f&&!b.transformLocalElements&&!a[b.restangularFields.fromServer])return a;var g=b.transformers[d],h=a;return g&&_.each(g,function(a){h=a(c,h)}),b.onElemRestangularized(h,c,d,e)},b.transformLocalElements=_.isUndefined(b.transformLocalElements)?!1:b.transformLocalElements,a.setTransformOnlyServerElements=function(a){b.transformLocalElements=!a},b.fullResponse=_.isUndefined(b.fullResponse)?!1:b.fullResponse,a.setFullResponse=function(a){return b.fullResponse=a,this},b.urlCreatorFactory={};var f=function(){};f.prototype.setConfig=function(a){return this.config=a,this},f.prototype.parentsArray=function(a){for(var b=[];a;)b.push(a),a=a[this.config.restangularFields.parentResource];return b.reverse()},f.prototype.resource=function(a,d,e,f,g,h,i,j){var k=_.defaults(g||{},this.config.defaultRequestParams.common),l=_.defaults(f||{},this.config.defaultHeaders);i&&(b.isSafe(j)?l["If-None-Match"]=i:l["If-Match"]=i);var m=this.base(a);if(h){var n="";/\/$/.test(m)||(n+="/"),n+=h,m+=n}return this.config.suffix&&-1===m.indexOf(this.config.suffix,m.length-this.config.suffix.length)&&!this.config.getUrlFromElem(a)&&(m+=this.config.suffix),a[this.config.restangularFields.httpConfig]=void 0,c(this.config,d,m,{getList:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),get:this.config.withHttpValues(e,{method:"GET",params:k,headers:l}),jsonp:this.config.withHttpValues(e,{method:"jsonp",params:k,headers:l}),put:this.config.withHttpValues(e,{method:"PUT",params:k,headers:l}),post:this.config.withHttpValues(e,{method:"POST",params:k,headers:l}),remove:this.config.withHttpValues(e,{method:"DELETE",params:k,headers:l}),head:this.config.withHttpValues(e,{method:"HEAD",params:k,headers:l}),trace:this.config.withHttpValues(e,{method:"TRACE",params:k,headers:l}),options:this.config.withHttpValues(e,{method:"OPTIONS",params:k,headers:l}),patch:this.config.withHttpValues(e,{method:"PATCH",params:k,headers:l})})};var g=function(){};g.prototype=new f,g.prototype.base=function(a){var c=this;return _.reduce(this.parentsArray(a),function(a,d){var e,f=c.config.getUrlFromElem(d);if(f){if(c.config.isAbsoluteUrl(f))return f;e=f}else if(e=d[c.config.restangularFields.route],d[c.config.restangularFields.restangularCollection]){var g=d[c.config.restangularFields.ids];g&&(e+="/"+g.join(","))}else{var h;h=c.config.useCannonicalId?c.config.getCannonicalIdFromElem(d):c.config.getIdFromElem(d),b.isValidId(h)&&!d.singleOne&&(e+="/"+(c.config.encodeIds?encodeURIComponent(h):h))}return a.replace(/\/$/,"")+"/"+e},this.config.baseUrl)},g.prototype.fetchUrl=function(a,b){var c=this.base(a);return b&&(c+="/"+b),c},g.prototype.fetchRequestedUrl=function(a,c){function d(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}function e(a,b,c){for(var e=d(a),f=0;f0))throw new Error("newBlacklist must be an array!");a=b};var d=function(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},e=function(a){var b=_.map(a,d),c=_.map(b,function(a){return".*"+a+".*?"}),e="("+c.join("|")+")",f='',g=new RegExp(f,"gi");return g},f=function(b){var c=e(a),d=b.replace(c,"");return d},g={fromVf:function(a){var d=b.get(a,{cache:c}).then(function(a){return a.data}).then(f);return d}};return g}}]),angular.module("ngForce").factory("sfr",["$q","$rootScope","Restangular","$log",function(a,b,c,d){var e=[],f=[],g={model:function(a,b){var d,e=c.setDefaultHeaders({Authorization:"Bearer "+window.apiSid}).setBaseUrl("/services/data/v29.0/sobjects/").setRestangularFields({id:"Id",selfLink:"attributes.url"});return d=b?e.one(a,b):e.all(a)},insert:function(b,c,f){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform insert."),g.promise;var h=angular.isDefined(f)?f:!1,i=e[b];return angular.isUndefined(i)&&(i=this.model(b),e[b]=i),i.post(c).then(function(a){return a.success?(d.debug("ngForce: Created new "+b+" record:",a),g.resolve(a),h?i.get(a.id).then(function(a){return d.debug("ngForce: Inserted:",a),a}):g.promise):(g.reject("Insert failed: ["+a.errors+"] Full response: "+a),g.promise)})},update:function(b,c,e){var g=a.defer();if(!angular.isString(b))return g.reject("An sObject name is required to perform an update."),g.promise;var h=angular.isDefined(e)?e:!1,i=c.id||c.Id;if(!angular.isString(i))return g.reject('An "Id" field is required to perform an update.'),g.promise;var j=f[i];angular.isUndefined(j)&&(j=this.model(b,i),f[i]=j);for(var k=["Id","LastReferencedDate","LastModifiedById","LastModifiedDate","LastViewedDate","SystemModstamp","CreatedById","CreatedDate","IsDeleted"],l=0;l","\"","'","objProto","countBy","groupBy","indexBy","where","getTime","whitespace","radix","reLeadingSpacesAndZeros","collect","drop","each","eachRight","extend","methods","select","tail","unique","unzip","all","any","detect","findWhere","foldl","foldr","include","inject","take","head","callbackable","VERSION","isSplice","configurable","enumerable","writable","boolean","function","\\","\n","\r","\t","
","
","window","freeExports","exports","freeModule","module","moduleExports","freeGlobal","global","define","amd","angular","provider","Configurer","config","RestangularResource","$http","url","configurer","resource","params","defaultRequestParams","method","toLowerCase","isSafe","configuration","safeMethods","operation","absolutePattern","isAbsoluteUrl","absoluteUrl","setSelfLinkAbsoluteUrl","baseUrl","setBaseUrl","newBaseUrl","substring","extraFields","setExtraFields","newExtraFields","defaultHttpFields","setDefaultHttpFields","withHttpValues","httpLocalConfig","encodeIds","setEncodeIds","encode","get","post","put","common","setDefaultRequestParams","param1","param2","requestParams","defaultHeaders","setDefaultHeaders","headers","methodOverriders","setMethodOverriders","overriders","isOverridenMethod","jsonp","setJsonp","active","search","one","urlCreator","setUrlCreator","urlCreatorFactory","restangularFields","route","parentResource","restangularCollection","cannonicalId","etag","selfLink","getList","trace","patch","getRestangularUrl","getRequestedUrl","putElement","addRestangularMethod","getParentList","ids","httpConfig","reqParams","several","oneUrl","allUrl","customPUT","customPOST","customDELETE","customGET","customGETLIST","customOperation","doPUT","doPOST","doDELETE","doGET","doGETLIST","fromServer","withConfig","withHttpConfig","singleOne","plain","save","setRestangularFields","resFields","isRestangularized","setFieldToElem","field","elem","idValue","prop","getFieldFromElem","copy","setIdToElem","getIdFromElem","isValidId","elemId","setUrlToElem","getUrlFromElem","useCannonicalId","setUseCannonicalId","getCannonicalIdFromElem","actualId","responseInterceptors","defaultResponseInterceptor","responseExtractor","what","response","deferred","interceptors","theData","addResponseInterceptor","extractor","setResponseInterceptor","setResponseExtractor","requestInterceptors","defaultInterceptor","element","path","fullRequestInterceptor","defaultRequest","request","addRequestInterceptor","setRequestInterceptor","addFullRequestInterceptor","setFullRequestInterceptor","errorInterceptor","setErrorInterceptor","onBeforeElemRestangularized","setOnBeforeElemRestangularized","onElemRestangularized","setOnElemRestangularized","shouldSaveParent","setParentless","suffix","setRequestSuffix","newSuffix","transformers","addElementTransformer","secondArg","thirdArg","isCollection","transformer","typeTransformers","coll","extendCollection","fn","extendModel","transformElem","Restangular","force","transformLocalElements","changedElem","setTransformOnlyServerElements","fullResponse","setFullResponse","full","BaseCreator","setConfig","parentsArray","parents","reverse","localHttpConfig","callHeaders","callParams","base","add","Path","__this","acum","elemUrl","elemSelfLink","encodeURIComponent","fetchUrl","fetchRequestedUrl","sortedKeys","forEachSorted","iterator","i","encodeUriQuery","val","pctEncodeSpaces","parts","v","toJson","globalConfiguration","$get","$q","createServiceForConfiguration","restangularizeBase","parent","urlHandler","addRestangularMethodFunction","copyRestangularizedElement","stripRestangular","parentId","parentUrl","restangularFieldsForParent","error","restangularizeElem","restangularizeCollection","restangularizePromise","promise","valueToFill","promiseCall","promiseGet","$object","callArgs","filledValue","then","resolve","resolvePromise","addCustomOperation","customFunction","oper","alias","callFunction","callOperation","toUpperCase","fetchFunction","fromElement","toElement","copiedElement","localElem","getFunction","putFunction","postFunction","deleteFunction","headFunction","traceFunction","optionsFunction","patchFunction","service","putElementFunction","getById","restangularizeCollectionAndElements","idx","elemToPut","filledArray","serverElem","newArray","parseResponse","resData","whatFetched","fullParams","processedData","status","elemFunction","resParams","callObj","filledObject","okCallback","errorCallback","isOverrideOperation","X-HTTP-Method-Override","defaultParams","defaultElem","bindedFunction","createdFunction","withConfigurationFunction","newConfig","toService","serv","restangularizeElement","run","$rootScope","$safeApply","$scope","arg","$$phase","$apply","namespace","setNamespace","newNamespace","remoteObjects","getPromiseObj","promisedObj","remoteObj","retrieve","opts","handleWithPromise","fvs","_props","update","_isArray","Id","del","err","records","$templateCache","scriptSymbolBlacklist","setScriptSymbolBlacklist","newBlacklist","escapeRegexp","s","buildScriptRegex","scriptNames","scriptNamesEscaped","scriptNamePatterns","scriptNameOptions","scriptTagPattern","scriptTagRegex","stripScriptTags","htmlTemplate","badScriptRegex","cleanedHtmlTemplate","sfTemplate","fromVf","pTemplate","$log","sobjectEndpoints","recordEndpoints","sfRest","model","modelName","recordId","baseResource","Authorization","apiSid","insert","sObjectName","recordToInsert","getLatest","$defer","_getLatest","isDefined","sObjectEndpoint","success","debug","newRecord","errors","recordToUpdate","recordEndpoint","propsToIgnore","p","delete","recordToDelete","analytics","RestangularConfigurer","$httpBackend","sfrBackend","whenGetPage","pageName","responsePage","_pageName","escapedPageName","whenGET","respond","whenQuery","resRecords","soqlClauses","_soqlClauses","_resRecords","encodedSoqlRegex","encodedSoqlClauses","memo","totalSize","done","expectQuery","expectGET","expectInsert","resRecord","expectPOST","expectDelete","recordIds","_recordIds","expectDELETE","sfrquery","query","cacheEnabled","q","queryAll","queryStringOrQueryLocator","results","trim","nextRecordsUrl","notify","Visualforce","vfRemote","send","remoteAction","nullok","controller","Manager","remoting","event","handleResultWithPromise","invokeAction","JSON","parse","message","errorCode","standardOptions","timeout","setStandardOptions","newOptions","bulkCreate","bulkUpdate","describe","describeFieldSet","describePicklistValues","getObjectType","getQueryResultsAsSelect2Data","queryFromFieldset","soqlFromFieldSet","upsert"],"mappings":";;;CASE,WAyLA,QAASA,GAAYC,EAAOC,EAAOC,GAIjC,IAHA,GAAIC,IAASD,GAAa,GAAK,EAC3BE,EAASJ,EAAQA,EAAMI,OAAS,IAE3BD,EAAQC,GACf,GAAIJ,EAAMG,KAAWF,EACnB,MAAOE,EAGX,OAAO,GAYT,QAASE,GAAaC,EAAOL,GAC3B,GAAIM,SAAcN,EAGlB,IAFAK,EAAQA,EAAMA,MAEF,WAARC,GAA8B,MAATN,EACvB,MAAO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AAK,2BAA4Ba,GAAiB,GAE7Ed,EAAS3qB,MAAQ2qB,EAASC,KAAK,iCAAkCa,GAAiB,GAElFd,EAAS5F,IAAM4F,EAASC,KAAK,wBAAyBa,GAAiB,GAEvEd,EAASoB,SAAWpB,EAASC,KAAK,6BAA8Ba,GAAiB,GAEjFd,EAASqB,iBAAmBrB,EAASC,KAAK,qCAAsCa,GAAiB,GAEjGd,EAASsB,uBAAyBtB,EAASC,KAAK,sCAAuCa,GAAiB,GAExGd,EAASuB,cAAgBvB,EAASC,KAAK,+BAAgCa,GAAiB,GAExFd,EAASwB,6BAA+BxB,EAASC,KAAK,iDAAkDa,GAAiB,GAEzHd,EAASV,MAAQU,EAASC,KAAK,2BAC7BliB,QAAQ,EACRgjB,QAAS,MACR,GAEHf,EAASyB,kBAAoBzB,EAASC,KAAK,uCACzCliB,QAAQ,EACRgjB,QAAS,MACR,GAEHf,EAASpG,SAAWoG,EAASC,KAAK,6BAA8Ba,GAAiB,GAEjFd,EAASlV,OAASkV,EAASC,KAAK,2BAA4Ba,GAAiB,GAE7Ed,EAAS0B,iBAAmB1B,EAASC,KAAK,qCAAsCa,GAAiB,GAEjGd,EAAS/F,OAAS+F,EAASC,KAAK,0BAA2Ba,GAAiB,GAE5Ed,EAAS2B,OAAS3B,EAASC,KAAK,0BAA2Ba,GAAiB,GACrEd,MCnJbvY,QAAQN,OAAO,WACb,kBACA"} \ No newline at end of file diff --git a/jsSrc/ngForce-remoteObjects.js b/jsSrc/ngForce-remoteObjects.js deleted file mode 100644 index 19c8810..0000000 --- a/jsSrc/ngForce-remoteObjects.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - * ngForce - a visualForce remoting based Angular.js service for developing - * Angular apps within Visualforce. - * - * Copyright (c)2013, Kevin Pooorman. - * License: MIT - * - * remoteObjects provides access to Visualforce Remote Objects - * api made available in api version 29.0 - * - * Special thanks to Matt Welch @_MattWelch_ for giving me the idea - * for this, and for prototyping an example in vanilla js found here - * https://github.com/mattwelch/makeDeferredProvider/blob/master/makeDeferredProvider.js - * And for being generally awesome. - * - */ -angular.module('ngForce') - .provider('remoteObjects', ['$q','$log', - function ($q, $log) { - this.$get = function () { - // default namespace - var namespace = "SObjectModel"; - // app.config setter for the namespace. - this.setNamespace = function (newNamespace) { - if(!_.isUndefined(newNamespace)) { - namespace = newNamespace; - } - }; - - var remoteObjects = { - getPromiseObj: function(obj) { - var promisedObj = {}; - promisedObj.remoteObj = new namespace[obj](); - - promisedObj.retrieve = function(options){ - promisedObj.remoteObj.retrieve(opts, this.handleWithPromise); - }; - - promisedObj.create = function(fvs){ - fvs = fvs ? fvs : promisedObj.remoteObj._props; - promisedObj.remoteObj.create(fvs,handleWithPromise); - }; - - promisedObj.update = function(ids, fvs){ - if(!angular._isArray(ids)) { - fvs = ids; - ids = null; - } - - ids = ids ? ids : [promisedObj.remoteObj._props.Id]; - fvs = fvs ? fvs : promisedObj.remoteObj._props; - - promisedObj.remoteObj.update(ids, fvs, handleWithPromise); - }; - - promisedObj.del = function(ids) { - ids = ids ? ids : [promisedObj.remoteObj._props.Id]; - promisedObj.remoteObj.del(ids, handleWithPromise); - }; - - handleWithPromise = function(err, records, e){ - var deferred = $q.defer(); - if(err){ - deferred.reject(err); - } else { - if(e){ - deferred.resolve(records, e); - } else { - deferred.resolve(records); - } - } - return deferred.promise; - }; - - return promisedObj; - } - }; - - return remoteObjects; - }; - } -]); \ No newline at end of file diff --git a/jsSrc/ngForce-sfTemplate.js b/jsSrc/ngForce-sfTemplate.js deleted file mode 100644 index de8a38b..0000000 --- a/jsSrc/ngForce-sfTemplate.js +++ /dev/null @@ -1,106 +0,0 @@ -/* - * ngForce - a visualForce remoting based Angular.js service for developing - * Angular apps within Visualforce. - * - * Copyright (c)2013, Kevin Pooorman. - * License: MIT - * - * - * Salesforce injects scripts into all Visualforce pages. - * e.g.: - * /faces/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript?rel=1392581006000 - * /static/111213/js/perf/stub.js - * Because we can't disable this, we strip them out before rendering them. - * If we don't, the browser will take ~250ms to fetch them before - * the template is rendered. - * - */ -angular.module('ngForce').provider('sfTemplate', [ - '$q', - '$http', - '$templateCache', - '$log', - function ($q, $http, $templateCache, $log) { - this.$get = function () { - // Add substrings which are unique to the script tags you wish to block. - // Note: Regex support would be nice. The problem is that JS files have `.` - // as part of the file path, which is symbol reserved by Regex. - // - // Script tags in the retrieved file that match these symbols will be - // stripped from the template. - var scriptSymbolBlacklist = [ - '.ajax4jsf.javascript.AjaxScript', - '/js/perf/stub.js', - '/sfdc/JiffyStubs.js' - ]; - /** - * an app.js config block enabled function for custom setting - * the blacklist of scripts to be removed - * @param {Array} newBlacklist Array of symbols to be blacklisted. - */ - this.setScriptSymbolBlacklist = function (newBlacklist) { - if (angular.isArray(newBlacklist) && newBlacklist.length > 0) { - scriptSymbolBlacklist = newBlacklist; - } else { - throw new Error('newBlacklist must be an array!'); - } - }; - /** - * escape Regex special characters in the input string. - * @param {[type]} s [description] - * @return {[type]} [description] - */ - var escapeRegexp = function (s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); - }; - /** - * generates a regex with the blacklisted tokens - * @param {Array} scriptNames Blacklist - * @return {Regex} Regex expression. - */ - var buildScriptRegex = function (scriptNames) { - // Script names may use RexExp-reserved characters. Escape them. - var scriptNamesEscaped = _.map(scriptNames, escapeRegexp); - // Wrap in ".*" to match any part of script name. - var scriptNamePatterns = _.map(scriptNamesEscaped, function (s) { - return '.*' + s + '.*?'; - }); - // Change scripts to Regex pattern options syntax. - // e.g. [a, b] -> "(a|b)" - var scriptNameOptions = '(' + scriptNamePatterns.join('|') + ')'; - var scriptTagPattern = ''; - var scriptTagRegex = new RegExp(scriptTagPattern, 'gi'); - return scriptTagRegex; - }; - /** - * Strip out script tags from template - * @param {String} htmlTemplate html string of template to have script tags parsed out. - * @return {String} Html Template - */ - var stripScriptTags = function (htmlTemplate) { - var badScriptRegex = buildScriptRegex(scriptSymbolBlacklist); - var cleanedHtmlTemplate = htmlTemplate.replace(badScriptRegex, ''); - // $log.debug('ngForce: Cleaned template:', cleanedHtmlTemplate); - return cleanedHtmlTemplate; - }; - // The sfTemplate module is responsible for getting - // useable HTML templates from Salesforce. - /** - * Object is the functional part of this module - * it accepts a url, and returns a $templatCache'd template - * that's been stripped of extraneous scripts - * @type {Object} - */ - var sfTemplate = { - fromVf: function (url) { - var pTemplate = $http.get(url, { cache: $templateCache }).then(function (response) { - // $log.debug('ngForce: Fetched VF template:', response); - return response.data; - }).then(stripScriptTags); - return pTemplate; - } - }; - return sfTemplate; - }; - } -]); \ No newline at end of file diff --git a/jsSrc/ngForce-sfrAnalytics.js b/jsSrc/ngForce-sfrAnalytics.js deleted file mode 100644 index 8bbdd7e..0000000 --- a/jsSrc/ngForce-sfrAnalytics.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * ngForce - a visualForce remoting based Angular.js service for developing - * Angular apps within Visualforce. - * - * Copyright (c)2013, Kevin Pooorman & Alex Berg - * License: MIT - * - * This is the least developed ngForce module. - * It provides access to reports. - * - */ -angular.module('ngForce').factory('sfranalytics', [ - '$q', - '$rootScope', - 'Restangular', - function ($q, $rootScope, Restangular) { - var analytics = Restangular.withConfig(function (RestangularConfigurer) { - RestangularConfigurer.setBaseUrl('/services/data/v29.0/analytics/'); - RestangularConfigurer.setDefaultHeaders({ 'Authorization': 'Bearer ' + window.apiSid }); - }).setRestangularFields({ id: 'Id' }).all('reports'); - return analytics; - } -]); \ No newline at end of file diff --git a/jsSrc/ngForce-sfrquery.js b/jsSrc/ngForce-sfrquery.js deleted file mode 100644 index fd3b500..0000000 --- a/jsSrc/ngForce-sfrquery.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - * ngForce - a visualForce remoting based Angular.js service for developing - * Angular apps within Visualforce. - * - * Copyright (c)2013, Kevin Pooorman. - * License: MIT - * - * SfQuery is the main query interface for gathering Salesforce data. - * Since Salesforce's rest API is only "restful" it has it's own - * dedicated query endpoint rather than query endpoints for each - * object. - */ -angular.module('ngForce').factory('sfrquery', [ - '$q', - '$rootScope', - '$log', - 'Restangular', - 'encodeUriQuery', - function ($q, $rootScope, $log, Restangular, encodeUriQuery) { - // Custom configure the restangular setup for this - var sfrquery = Restangular.withConfig(function (RestangularConfigurer) { - //These get passed through to the standard Angular $http - RestangularConfigurer.setDefaultHttpFields({ cache: false }); - // Establish our base url. - RestangularConfigurer.setBaseUrl('/services/data/v30.0/'); - // and set our authorization header. - RestangularConfigurer.setDefaultHeaders({ 'Authorization': 'Bearer ' + window.apiSid }); // With the SF "query" endpoint, it may not return the whole set - // of requested records. In this case, it will send one page of - // records, the total number of records, and a URL we can use to - // get the remaining pages of records. - // Therefore, we can not use an extractor, as it will not let us - // access the "totalSize" and "nextRecordsUrl" attributes, but - // only give us the contents of the "records" attributes. - // RestangularConfigurer.setResponseExtractor(function(response) { - // return response.records; - // }); - }).setRestangularFields({ - id: 'Id', - selfLink: 'attributes.url' - }).oneUrl('query', '/services/data/v30.0/query'); - /** - * Make a rest query to Salesforce - * @param {String} query Query String -- fully qualified SOQL string. - * @param {Boolean} cacheEnabled Should we cache the response? - * @return {Array} Array of records. - */ - sfrquery.query = function (query, cacheEnabled) { - cacheEnabled = typeof cacheEnabled !== 'undefined' ? cacheEnabled : false; - return sfrquery.withHttpConfig({ cache: cacheEnabled }).get({ q: query }).then(function (response) { - return response.records; - }); - }; - /** - * queryAll recursively calls through a series of salesforce Rest calls to retrieve - * all the rows resulting from an initial query. - * @param {String} queryStringOrQueryLocator Either the query string -- on initial call, or the query locator - * @param {Boolean} cacheEnabled True - we use cache, false - no cache for you. - * @param {Deferred} deferred Deferred object - null on initial call - * @param {Array} results Array of rows returned by all completed calls. Null on inital call - * @return {Promise} Returns a Promise! - */ - sfrquery.queryAll = function (queryStringOrQueryLocator, cacheEnabled, deferred, results) { - // Setup the 3 optional params - Default to true for caching - if (angular.isUndefined(cacheEnabled)) { - cacheEnabled = true; - } - // On initial call, this recursive function will not be called with a results array, create it. - if (angular.isUndefined(results)) { - results = []; - } - // On the initial call, this recursive function will not have a deferred object, create it here. - if (angular.isUndefined(deferred)) { - deferred = $q.defer(); - } - // On initial call, this method will have a query string, not a query locator. - // In those situations, we need to pre-pend "?q=" to the querystring. - // We determine whether or not to do this, by inspecting the first six characters - // We *expect* that "Select" is the first word of a queryAll query string. - if (queryStringOrQueryLocator.trim().substring(0, 6).toLowerCase() === 'select') { - queryStringOrQueryLocator = '?q=' + encodeUriQuery(queryStringOrQueryLocator); - } - // Here starts the functional body of the method. - sfrquery.withHttpConfig({ cache: cacheEnabled }).customGET(queryStringOrQueryLocator).then(function (data) { - // Add to the results array. Don't try sorting or unique. - results = results.concat(data.records); - // Inspect the returned data, looking to see if we're "done" i.e.: we've recieved all the pages - // of data. - if (!data.done) { - // If we're not done, recursively call this method with the query locator returned by the previous call. - // Making sure to pass on our cache parameters, our deferred object and the results array. - sfrquery.queryAll(_.last(data.nextRecordsUrl.split('/')), cacheEnabled, deferred, results); - } else { - // if we are done, resolve the deferred object. - deferred.resolve(results); - return deferred.promise; - } - }, function (error) { - // any errors are handled here. - return deferred.reject(error); - }); - // this deferred.notify call allows us in theory to update the ui with a "we've made 5 out of 7 calls" type message. - deferred.notify(); - // regardless, return a promise! - return deferred.promise; - }; - return sfrquery; - } -]); \ No newline at end of file diff --git a/jsSrc/ngForce-visualForceRemoting.js b/jsSrc/ngForce-visualForceRemoting.js deleted file mode 100644 index 4107172..0000000 --- a/jsSrc/ngForce-visualForceRemoting.js +++ /dev/null @@ -1,170 +0,0 @@ -/* - * ngForce - a visualForce remoting based Angular.js service for developing - * Angular apps within Visualforce. - * - * Copyright (c)2013, Kevin Pooorman. - * License: MIT - * - * Vfr provides access to visualforce Remoting methods from any given class - * in the Org that are @remoteAction annotated. - * - * While ngForce comes with a standard set of crud based operations based on - * TKForce by @metadaddy, developers should pay specific attention to - * the .send() method, which enables bootstraping any class.method so long - * as it's a legit js Remoting action. - * - */ -angular.module('ngForce').provider('vfr', [function ($q, $rootScope) { - this.$get = function () { - // Force shutdown the VFR provider / factory if VisualForce is not already an object on window. - if (typeof Visualforce != 'object') { - throw new Error('Visualforce is not available as an object! Did you forget to include the ngForce component?'); - } - var vfRemote = {}; - /* - * Kevin o'Hara released premote, a nice lib for wrapping - * visualforce remoting calls in a promise interface. this - * function .send() is largely a gentle refactoring of his - * work, found in "premote" here: - * https://github.com/kevinohara80/premote - * such that it locks into the ng exec loop and utilizes - * the angular $q service, itself based on the Q lib - * Kevin uses. - */ - /** - * Returns a function that, when called, invokes the js - * remoting method specified in this call. - * @param {String} remoteAction class.methodName string representing the Apex className and Method to invoke - * @param {Object} options Ojbect containing at least the timeout and escaping options. Passed to Remoting call - * @param {Boolean} nullok Can this method return null and it be OK? - * @return {Function} Function engaged with the NG execution loop, making Visualforce remoting calls. - */ - vfRemote.send = function (remoteAction, options, nullok) { - var namespace, controller, method; - var Manager = Visualforce.remoting.Manager; - var parts = remoteAction.split('.'); - if (options && typeof options !== 'object') { - throw new Error('Options must be an object'); - } - if (parts.length < 2) { - throw new Error('Invalid Remote Action specified. Use Controller.MethodName or $RemoteAction.Controller.MethodName'); - } else { - if (parts.length === 3) { - namespace = parts[0]; - controller = parts[1]; - method = parts[2]; - } else if (parts.length === 2) { - controller = parts[0]; - method = parts[1]; - } - } - return function () { - var deferred = $q.defer(); - var args; - if (arguments.length) { - args = Array.prototype.slice.apply(arguments); - } else { - args = []; - } - args.splice(0, 0, remoteAction); - args.push(function (result, event) { - handleResultWithPromise(result, event, nullok, deferred); - }); - if (options) { - args.push(options); - } - Manager.invokeAction.apply(Manager, args); - return deferred.promise; - }; - }; - /** - * Method returns an Angular promise as the product of a .send() prototyped method call - * @param {String} result Raw JSON string returned by js Remoting call - * @param {Object} event Status object returned from SF detailing errors, if any. - * @param {Boolean} nullok Can the result be null? - * @param {Deferred} deferred Angular Promise object - * @return {Deferred} Angular promise with resolution - */ - handleResultWithPromise = function (result, event, nullok, deferred) { - if (result) { - result = JSON.parse(result); - if (Array.isArray(result) && result[0].message && result[0].errorCode) { - deferred.reject(result); - $rootScope.$safeApply(); - } else { - deferred.resolve(result); - $rootScope.$safeApply(); - } - } else if (typeof nullok !== 'undefined' && nullok) { - deferred.resolve(); - $rootScope.$safeApply(); - } else { - deferred.reject({ - message: 'Null returned by RemoteAction not called with nullOk flag', - errorCode: 'NULL_RETURN' - }); - $rootScope.$safeApply(); - } - }; - /** - * Object contains the two standard fields needed by the .send method: escape and timeout. - * escape: Should the result be escape. default to false. - * timeout: set the timeout for visualforce to respond. - * @type {Object} - */ - var standardOptions = { - escape: false, - timeout: 10000 - }; - /* - * This is the setter for standard options, so a config block can overwrite - */ - this.setStandardOptions = function (newOptions) { - if (newOptions && typeof newOptions !== 'object') { - throw new Error('standardOptions must be an object'); - } - standardOptions = newOptions; - }; - // Bulk Create - vfRemote.bulkCreate = vfRemote.send('ngForceController.bulkCreate', standardOptions, false); - // Bulk Update - vfRemote.bulkUpdate = vfRemote.send('ngForceController.bulkUpdate', standardOptions, false); - // Create - vfRemote.create = vfRemote.send('ngForceController.create', standardOptions, false); - // Clone - vfRemote.clone = vfRemote.send('ngForceController.sObjectKlone', standardOptions, false); - // Delete - vfRemote.del = vfRemote.send('ngForceController.del', standardOptions, true); - // Describe - vfRemote.describe = vfRemote.send('ngForceController.describe', standardOptions, false); - // Describe Field Set - vfRemote.describeFieldSet = vfRemote.send('ngForceController.describeFieldSet', standardOptions, false); - // Describe Picklist Values - vfRemote.describePicklistValues = vfRemote.send('ngForceController.getPicklistValues', standardOptions, false); - // Get Object Type - vfRemote.getObjectType = vfRemote.send('ngForceController.getObjType', standardOptions, false); - // Get Query Results as select2 data - vfRemote.getQueryResultsAsSelect2Data = vfRemote.send('ngForceController.getQueryResultsAsSelect2Data', standardOptions, false); - // Query - vfRemote.query = vfRemote.send('ngForceController.query', { - escape: false, - timeout: 30000 - }, false); - // Query from Fieldset - vfRemote.queryFromFieldset = vfRemote.send('ngForceController.queryFromFieldSet', { - escape: false, - timeout: 30000 - }, false); - // Retrieve a field list for a given object. - vfRemote.retrieve = vfRemote.send('ngForceController.retrieve', standardOptions, false); - // Search (SOSL) - vfRemote.search = vfRemote.send('ngForceController.search', standardOptions, false); - // Soql from Fieldset - vfRemote.soqlFromFieldSet = vfRemote.send('ngForceController.soqlFromFieldSet', standardOptions, false); - // Update - vfRemote.update = vfRemote.send('ngForceController.updat', standardOptions, true); - // Upsert - vfRemote.upsert = vfRemote.send('ngForceController.upser', standardOptions, true); - return vfRemote; - }; - }]); \ No newline at end of file diff --git a/jsSrc/ngForce.js b/jsSrc/ngForce.js index 716158d..bf0a188 100644 --- a/jsSrc/ngForce.js +++ b/jsSrc/ngForce.js @@ -20,5 +20,7 @@ */ angular.module('ngForce', [ 'Scope.safeApply', - 'restangular' + 'restangular', + 'multipart', + 'ngForce.config' ]); \ No newline at end of file diff --git a/jsSrc/ngForce-encodedUriQuery.js b/jsSrc/subModules/ngForce-encodedUriQuery.js similarity index 100% rename from jsSrc/ngForce-encodedUriQuery.js rename to jsSrc/subModules/ngForce-encodedUriQuery.js diff --git a/jsSrc/subModules/ngForce-multipart.js b/jsSrc/subModules/ngForce-multipart.js new file mode 100644 index 0000000..67801ea --- /dev/null +++ b/jsSrc/subModules/ngForce-multipart.js @@ -0,0 +1,176 @@ +/* + * Introducing 'multipart' + * ----------------------- + * + * A module that helps build a multipart HTTP request body consisting of + * binary and/or non-binary parts. + * + * The resulting body can be returned as an ArrayBuffer via req.getBuffer(), + * or as a string via req.toString(). + * + * Usage: + * var req = new MultipartRequest('my_boundary'); + * + * var part1 = new RequestPart(); + * part1.addHeader('My-Header', 'some value'); + * part1.addHeader('My-Other-Header', 'some other value'); + * part1.setBody({ Title: "My Title" }); + * req.addPart(part1); + * + * var part2 = new RequestPart(); + * part2.addHeader('Content-Type', 'application/octet-stream'); + * part2.setBody(); + * req.addPart(part2); + * + * var buffer = req.getBuffer(); + * + * @author https://github.com/lukemcfarlane + * @date July 2014 + */ +angular.module('multipart', []); + +/** + * Build a part of a MultipartRequest that can contain any number of headers + * and a body. The body can be either of the following types: + * - ArrayBuffer (binary data) + * - Object (JSON data) + * - String + * + * The resulting request part can be returned either as an ArrayBuffer (getBuffer()), or + * as a string (toString()); + */ +angular.module('multipart').service('RequestPart', function() { + function RequestPart() { + this.headers = []; + } + + RequestPart.prototype.setBody = function(body) { + this.body = body; + switch (toString.call(body)) { + case '[object ArrayBuffer]': + this.bodyType = 'arraybuffer'; + break; + case '[object String]': + this.bodyType = 'string'; + break; + case '[object Object]': + this.bodyType = 'json'; + break; + default: + throw Error('Unsupported multipart body type: ' + toString.call(body)); + } + }; + + RequestPart.prototype.addHeader = function(name, value) { + this.headers.push({ + name: name, + value: value + }); + }; + + RequestPart.prototype.getRawHeaders = function() { + var rawHeadersArr = []; + for (var i = 0; i < this.headers.length; i++) { + var h = this.headers[i]; + rawHeadersArr.push(h.name + ': ' + h.value); + } + return rawHeadersArr.join('\n'); + }; + + RequestPart.prototype.getBuffer = function() { + var bufferArr = []; + var rawHeaders = this.getRawHeaders(); + bufferArr.push((new StringView(rawHeaders)).buffer); + bufferArr.push((new StringView('\n\n')).buffer); + if (this.bodyType === 'arraybuffer') { + bufferArr.push(this.body); + } else if (this.bodyType === 'string') { + bufferArr.push((new StringView(this.body)).buffer); + } else if (this.bodyType === 'json') { + var jsonStr = JSON.stringify(this.body); + bufferArr.push((new StringView(jsonStr)).buffer); + } + return joinBuffers(bufferArr); + }; + + RequestPart.prototype.toString = function() { + return (new StringView(this.getBuffer())).toString(); + }; + + function joinBuffers(arrayBuffers) { + var lengthSum = 0; + for (var i = 0; i < arrayBuffers.length; i++) { + lengthSum += arrayBuffers[i].byteLength; + } + + var joined = new Uint8Array(lengthSum); + + var offset = 0; + for (var i = 0; i < arrayBuffers.length; i++) { + var ab = arrayBuffers[i]; + joined.set(new Uint8Array(ab), offset); + offset += ab.byteLength; + } + + return joined.buffer; + } + + return RequestPart; +}); + +/** + * Build a multipart request that consists of one or more request parts. + * + * The resulting multipart request body can be returned either as an + * ArrayBuffer (getBuffer()), or as a string (toString()); + */ +angular.module('multipart').service('MultipartRequest', ['RequestPart', + function(RequestPart) { + function MultipartRequest(boundaryStr) { + this.boundaryStr = boundaryStr; + this.parts = []; + } + + MultipartRequest.prototype.addPart = function(part) { + this.parts.push(part); + }; + + MultipartRequest.prototype.getBuffer = function() { + var bufferArr = []; + bufferArr.push((new StringView('--' + this.boundaryStr + '\n')).buffer); + for (var i = 0; i < this.parts.length; i++) { + bufferArr.push(this.parts[i].getBuffer()); + bufferArr.push((new StringView('\n\n')).buffer); + if (i !== this.parts.length - 1) { // if not the last part + bufferArr.push((new StringView('--' + this.boundaryStr + '\n')).buffer); + } + } + bufferArr.push((new StringView('--' + this.boundaryStr + '--')).buffer); + return joinBuffers(bufferArr); + }; + + MultipartRequest.prototype.toString = function() { + return (new StringView(this.getBuffer())).toString(); + }; + + function joinBuffers(arrayBuffers) { + var lengthSum = 0; + for (var i = 0; i < arrayBuffers.length; i++) { + lengthSum += arrayBuffers[i].byteLength; + } + + var joined = new Uint8Array(lengthSum); + + var offset = 0; + for (var i = 0; i < arrayBuffers.length; i++) { + var ab = arrayBuffers[i]; + joined.set(new Uint8Array(ab), offset); + offset += ab.byteLength; + } + + return joined.buffer; + } + + return MultipartRequest; + } +]); \ No newline at end of file diff --git a/jsSrc/subModules/ngForce-remoteObjects.js b/jsSrc/subModules/ngForce-remoteObjects.js new file mode 100644 index 0000000..3bd08bb --- /dev/null +++ b/jsSrc/subModules/ngForce-remoteObjects.js @@ -0,0 +1,81 @@ +/* + * ngForce - a visualForce remoting based Angular.js service for developing + * Angular apps within Visualforce. + * + * Copyright (c)2013, Kevin Pooorman. + * License: MIT + * + * remoteObjects provides access to Visualforce Remote Objects + * api made available in api version 29.0 + * + * Special thanks to Matt Welch @_MattWelch_ for giving me the idea + * for this, and for prototyping an example in vanilla js found here + * https://github.com/mattwelch/makeDeferredProvider/blob/master/makeDeferredProvider.js + * And for being generally awesome. + * + */ +angular.module('ngForce') + .provider('remoteObjects', + function() { + // default namespace + var namespace = "SObjectModel"; + // app.config setter for the namespace. + this.setNamespace = function(newNamespace) { + if (!_.isUndefined(newNamespace)) { + namespace = newNamespace; + } + }; + this.$get = function($q, $log) { + var remoteObjects = { + getPromiseObj: function(obj) { + var promisedObj = {}; + promisedObj.remoteObj = new namespace[obj](); + + promisedObj.retrieve = function(options) { + promisedObj.remoteObj.retrieve(opts, this.handleWithPromise); + }; + + promisedObj.create = function(fvs) { + fvs = fvs ? fvs : promisedObj.remoteObj._props; + promisedObj.remoteObj.create(fvs, handleWithPromise); + }; + + promisedObj.update = function(ids, fvs) { + if (!angular._isArray(ids)) { + fvs = ids; + ids = null; + } + + ids = ids ? ids : [promisedObj.remoteObj._props.Id]; + fvs = fvs ? fvs : promisedObj.remoteObj._props; + + promisedObj.remoteObj.update(ids, fvs, handleWithPromise); + }; + + promisedObj.del = function(ids) { + ids = ids ? ids : [promisedObj.remoteObj._props.Id]; + promisedObj.remoteObj.del(ids, handleWithPromise); + }; + + handleWithPromise = function(err, records, e) { + var deferred = $q.defer(); + if (err) { + deferred.reject(err); + } else { + if (e) { + deferred.resolve(records, e); + } else { + deferred.resolve(records); + } + } + return deferred.promise; + }; + + return promisedObj; + } + }; + + return remoteObjects; + }; + } +); \ No newline at end of file diff --git a/jsSrc/subModules/ngForce-sfTemplate.js b/jsSrc/subModules/ngForce-sfTemplate.js new file mode 100644 index 0000000..381c01e --- /dev/null +++ b/jsSrc/subModules/ngForce-sfTemplate.js @@ -0,0 +1,105 @@ +/* + * ngForce - a visualForce remoting based Angular.js service for developing + * Angular apps within Visualforce. + * + * Copyright (c)2013, Kevin Pooorman. + * License: MIT + * + * + * Salesforce injects scripts into all Visualforce pages. + * e.g.: + * /faces/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript?rel=1392581006000 + * /static/111213/js/perf/stub.js + * Because we can't disable this, we strip them out before rendering them. + * If we don't, the browser will take ~250ms to fetch them before + * the template is rendered. + * + */ +angular.module('ngForce') + .provider('sfTemplate', + function() { + // Add substrings which are unique to the script tags you wish to block. + // Note: Regex support would be nice. The problem is that JS files have `.` + // as part of the file path, which is symbol reserved by Regex. + // + // Script tags in the retrieved file that match these symbols will be + // stripped from the template. + var scriptSymbolBlacklist = [ + '.ajax4jsf.javascript.AjaxScript', + '/js/perf/stub.js', + '/sfdc/JiffyStubs.js' + ]; + /** + * an app.js config block enabled function for custom setting + * the blacklist of scripts to be removed + * @param {Array} newBlacklist Array of symbols to be blacklisted. + */ + this.setScriptSymbolBlacklist = function(newBlacklist) { + if (angular.isArray(newBlacklist) && newBlacklist.length > 0) { + scriptSymbolBlacklist = newBlacklist; + } else { + throw new Error('newBlacklist must be an array!'); + } + }; + this.$get = function($q, $http, $templateCache, $log) { + /** + * escape Regex special characters in the input string. + * @param {[type]} s [description] + * @return {[type]} [description] + */ + var escapeRegexp = function(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + }; + /** + * generates a regex with the blacklisted tokens + * @param {Array} scriptNames Blacklist + * @return {Regex} Regex expression. + */ + var buildScriptRegex = function(scriptNames) { + // Script names may use RexExp-reserved characters. Escape them. + var scriptNamesEscaped = _.map(scriptNames, escapeRegexp); + // Wrap in ".*" to match any part of script name. + var scriptNamePatterns = _.map(scriptNamesEscaped, function(s) { + return '.*' + s + '.*?'; + }); + // Change scripts to Regex pattern options syntax. + // e.g. [a, b] -> "(a|b)" + var scriptNameOptions = '(' + scriptNamePatterns.join('|') + ')'; + var scriptTagPattern = ''; + var scriptTagRegex = new RegExp(scriptTagPattern, 'gi'); + return scriptTagRegex; + }; + /** + * Strip out script tags from template + * @param {String} htmlTemplate html string of template to have script tags parsed out. + * @return {String} Html Template + */ + var stripScriptTags = function(htmlTemplate) { + var badScriptRegex = buildScriptRegex(scriptSymbolBlacklist); + var cleanedHtmlTemplate = htmlTemplate.replace(badScriptRegex, ''); + // $log.debug('ngForce: Cleaned template:', cleanedHtmlTemplate); + return cleanedHtmlTemplate; + }; + // The sfTemplate module is responsible for getting + // useable HTML templates from Salesforce. + /** + * Object is the functional part of this module + * it accepts a url, and returns a $templatCache'd template + * that's been stripped of extraneous scripts + * @type {Object} + */ + var sfTemplate = { + fromVf: function(url) { + var pTemplate = $http.get(url, { + cache: $templateCache + }).then(function(response) { + // $log.debug('ngForce: Fetched VF template:', response); + return response.data; + }).then(stripScriptTags); + return pTemplate; + } + }; + return sfTemplate; + }; + } +); \ No newline at end of file diff --git a/jsSrc/ngForce-sfr.js b/jsSrc/subModules/ngForce-sfr.js similarity index 97% rename from jsSrc/ngForce-sfr.js rename to jsSrc/subModules/ngForce-sfr.js index f757ac6..65a77ab 100644 --- a/jsSrc/ngForce-sfr.js +++ b/jsSrc/subModules/ngForce-sfr.js @@ -24,14 +24,14 @@ angular.module('ngForce').factory('sfr', [ '$rootScope', 'Restangular', '$log', - function ($q, $rootScope, Restangular, $log) { + function ($q, $rootScope, Restangular, $log, ngForceConfig) { var sobjectEndpoints = []; // sObjectName => restangularObject var recordEndpoints = []; // recordId => restangularObject var sfRest = { model: function (modelName, recordId) { - var baseResource = Restangular.setDefaultHeaders({ 'Authorization': 'Bearer ' + window.apiSid }).setBaseUrl('/services/data/v29.0/sobjects/').setRestangularFields({ + var baseResource = Restangular.setDefaultHeaders({ 'Authorization': 'Bearer ' + ngForceConfig.sessionId }).setBaseUrl('/services/data/v29.0/sobjects/').setRestangularFields({ id: 'Id', selfLink: 'attributes.url' }); diff --git a/jsSrc/subModules/ngForce-sfrAnalytics.js b/jsSrc/subModules/ngForce-sfrAnalytics.js new file mode 100644 index 0000000..68db6d7 --- /dev/null +++ b/jsSrc/subModules/ngForce-sfrAnalytics.js @@ -0,0 +1,134 @@ +/* + * ngForce - a visualForce remoting based Angular.js service for developing + * Angular apps within Visualforce. + * + * Copyright (c)2013, Kevin Pooorman & Alex Berg + * License: MIT + * + * This is the least developed ngForce module. + * It provides access to reports. + * + */ + +/* global angular */ +'use strict'; + +angular.module('ngForce').factory('sfranalytics', [ + '$q', + '$rootScope', + 'Restangular', + function ($q, $rootScope, Restangular, ngForceConfig) { + + // private functions and variables + var _baseUrl = '/services/data/v29.0/analytics/'; + var _additionalHeaders = { + 'Authorization': 'Bearer ' + ngForceConfig.sessionId + }; + + var _analytics = Restangular.withConfig(function (RestangularConfigurer) { + RestangularConfigurer.setBaseUrl(_baseUrl); + RestangularConfigurer.setDefaultHeaders(_additionalHeaders); + }).setRestangularFields({ id: 'Id' }); + + + // public methods and variables + return { + + /* return the raw Restangular object pointing to /reports */ + analytics: function() { + return _analytics.all('reports'); + }, + + /* scope the reports API to sfranalytics.reports */ + reports: { + + /* Returns report metadata given an ID */ + metadata: function(reportId) { + + return _analytics.one('reports', reportId).get('metadata'); + + }, + + /* + * Runs a report with the given ID + * the config object contains filtering arguments, boolean async, + * and boolean includeDetails + */ + run: function(reportId, config) { + + // make sure we have a config object to work with + if ( typeof config !== 'object' ) { config = {}; } + + // no async support right now + if ( config.async === true ) { + throw 'Asnynchronous report runs are not supported at this time'; + } + + // set any query params for the report url + var queryParams = {}; + if ( config.includeDetails === true || config.includeDetails === false ) { + queryParams.includeDetails = config.includeDetails; + } + + // check to see if we're doing on demand filtering + var ondemandFiltering = ( config.reportFilters && config.reportFilters.length > 0 ); + + if ( ondemandFiltering === true ) { + + // in the case of ondemandFiltering we need to make a call beforehand to + // get the initial reportMetadata object so we're going to need setup our + // own promise with $q.defer() (is this right???). + var deferred = $q.defer(); + + // retrieve the reportMetadata object from the overall report metadata, we're going to + // insert the filters in the config object and then post reportMetadata back to the reports API + this.metadata(reportId).then(function(response) { + + var metadata = response.reportMetadata; + + if ( typeof config.reportBooleanFilter === 'string' || config.reportBooleanFilter === null ) { + // overwrite the existing reportBooleanFilter with what's in the config object + metadata.reportBooleanFilter = config.reportBooleanFilter; + } + + // (checking to see if a variable is an array is funky) + if ( Object.prototype.toString.call( config.reportFilters ) === '[object Array]' ) { + // overwrite the existing reportFilters with what's in the config object + metadata.reportFilters = config.reportFilters; + } + + // post the filtering critiera and any query params, use our deferred object to proxy + // back the response or error + _analytics.one('reports').post(reportId, { reportMetadata: metadata }, queryParams).then(function(response) { + deferred.resolve(response); + }, function(errorResponse) { + deferred.reject(errorResponse); + }); + + }); + + return deferred.promise; + + } else { + + // no ondemand filtering, just run the report with any query params + return _analytics.one('reports', reportId).get(queryParams); + + } + + } + + }, + + /* + * scope the dashboard API to sfranalytics.dashboard + */ + dashboard: { + /* dashboard API methods go here */ + } + + + }; + + } +]); \ No newline at end of file diff --git a/jsSrc/ngForce-sfrBackend.js b/jsSrc/subModules/ngForce-sfrBackend.js similarity index 100% rename from jsSrc/ngForce-sfrBackend.js rename to jsSrc/subModules/ngForce-sfrBackend.js diff --git a/jsSrc/subModules/ngForce-sfrfile.js b/jsSrc/subModules/ngForce-sfrfile.js new file mode 100644 index 0000000..d331190 --- /dev/null +++ b/jsSrc/subModules/ngForce-sfrfile.js @@ -0,0 +1,83 @@ +/** + * The sfrfile service allows binary data to be uploaded via the Salesforce REST API. + * + * Please see the following documentation for more information: + * http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_insert_update_blob.htm + */ +angular.module('ngForce').factory('sfrfile', function($q, $rootScope, $log, Restangular, MultipartRequest, RequestPart, ngForceConfig) { + var sfrfile = Restangular.withConfig(function(RestangularConfigurer) { + RestangularConfigurer.setDefaultHttpFields({ + cache: false, + transformRequest: function(data) { + return data; + } + }); + RestangularConfigurer.setBaseUrl('/services/data/v29.0/sobjects'); + RestangularConfigurer.setDefaultHeaders({ + 'Authorization': 'Bearer ' + ngForceConfig.sessionId + }); + }).setRestangularFields({ + id: "Id", + selfLink: 'attributes.url' + }); + + /** + * Insert an SObject with binary data. + * + * @param sObjectName 'Document', 'Attachment', or 'ContentVersion' + * @param sObjectData Object containing sObject fields and values + * @param filename File name string + * @param fileBuffer ArrayBuffer to be included in binary part of request + */ + sfrfile.insert = function(sObjectName, sObjectData, filename, fileBuffer) { + SObjectType = { + 'Document': { + jsonPartName: 'entity_document', + binaryPartName: 'Body' + }, + 'Attachment': { + jsonPartName: 'entity_attachment', + binaryPartName: 'Body' + }, + 'ContentVersion': { + jsonPartName: 'entity_content', + binaryPartName: 'VersionData' + } + }; + + var mySObjectType = SObjectType[sObjectName]; + if (typeof mySObjectType === undefined) { + throw new Error('Upload not supported for SObject type \'' + sObjectName + '\''); + } + + var binaryNameAttr; + var boundaryStr = 'boundary_string'; + var req = new MultipartRequest(boundaryStr); + + var sobjectDataPart = new RequestPart(); + sobjectDataPart.addHeader('Content-Disposition', 'form-data; name="' + mySObjectType.jsonPartName + '";'); + sobjectDataPart.addHeader('Content-Type', 'application/json'); + sobjectDataPart.setBody(sObjectData); + req.addPart(sobjectDataPart); + + var filePart = new RequestPart(); + filePart.addHeader('Content-Type', 'application/octet-stream'); + filePart.addHeader('Content-Disposition', 'form-data; name="' + mySObjectType.binaryPartName + '"; filename="' + filename + '"'); + filePart.setBody(fileBuffer); + req.addPart(filePart); + + var bufferView = (new Uint8Array(req.getBuffer())); + + return sfrfile + .all(sObjectName) + .post( + bufferView, + null, { + 'Content-Type': 'multipart/form-data; boundary="' + boundaryStr + '"' + }) + .then(function(response) { + return response; + }); + }; + return sfrfile; +}); diff --git a/jsSrc/subModules/ngForce-sfrquery.js b/jsSrc/subModules/ngForce-sfrquery.js new file mode 100644 index 0000000..8cb5beb --- /dev/null +++ b/jsSrc/subModules/ngForce-sfrquery.js @@ -0,0 +1,119 @@ +/* + * ngForce - a visualForce remoting based Angular.js service for developing + * Angular apps within Visualforce. + * + * Copyright (c)2013, Kevin Pooorman. + * License: MIT + * + * SfQuery is the main query interface for gathering Salesforce data. + * Since Salesforce's rest API is only "restful" it has it's own + * dedicated query endpoint rather than query endpoints for each + * object. + */ +angular.module('ngForce').factory('sfrquery', [ + '$q', + '$rootScope', + '$log', + 'Restangular', + 'encodeUriQuery', + 'ngForceConfig', + function($q, $rootScope, $log, Restangular, encodeUriQuery, ngForceConfig) { + // Custom configure the restangular setup for this + var sfrquery = Restangular.withConfig(function(RestangularConfigurer) { + //These get passed through to the standard Angular $http + RestangularConfigurer.setDefaultHttpFields({ + cache: false + }); + // Establish our base url. + RestangularConfigurer.setBaseUrl('/services/data/v30.0/'); + // and set our authorization header. + RestangularConfigurer.setDefaultHeaders({ + 'Authorization': 'Bearer ' + ngForceConfig.sessionId + }); // With the SF "query" endpoint, it may not return the whole set + // of requested records. In this case, it will send one page of + // records, the total number of records, and a URL we can use to + // get the remaining pages of records. + // Therefore, we can not use an extractor, as it will not let us + // access the "totalSize" and "nextRecordsUrl" attributes, but + // only give us the contents of the "records" attributes. + // RestangularConfigurer.setResponseExtractor(function(response) { + // return response.records; + // }); + }).setRestangularFields({ + id: 'Id', + selfLink: 'attributes.url' + }).oneUrl('query', '/services/data/v30.0/query'); + /** + * Make a rest query to Salesforce + * @param {String} query Query String -- fully qualified SOQL string. + * @param {Boolean} cacheEnabled Should we cache the response? + * @return {Array} Array of records. + */ + sfrquery.query = function(query, cacheEnabled) { + cacheEnabled = typeof cacheEnabled !== 'undefined' ? cacheEnabled : false; + return sfrquery.withHttpConfig({ + cache: cacheEnabled + }).get({ + q: query + }).then(function(response) { + return response.records; + }); + }; + /** + * queryAll recursively calls through a series of salesforce Rest calls to retrieve + * all the rows resulting from an initial query. + * @param {String} queryStringOrQueryLocator Either the query string -- on initial call, or the query locator + * @param {Boolean} cacheEnabled True - we use cache, false - no cache for you. + * @param {Deferred} deferred Deferred object - null on initial call + * @param {Array} results Array of rows returned by all completed calls. Null on inital call + * @return {Promise} Returns a Promise! + */ + sfrquery.queryAll = function(queryStringOrQueryLocator, cacheEnabled, deferred, results) { + // Setup the 3 optional params - Default to true for caching + if (angular.isUndefined(cacheEnabled)) { + cacheEnabled = true; + } + // On initial call, this recursive function will not be called with a results array, create it. + if (angular.isUndefined(results)) { + results = []; + } + // On the initial call, this recursive function will not have a deferred object, create it here. + if (angular.isUndefined(deferred)) { + deferred = $q.defer(); + } + // On initial call, this method will have a query string, not a query locator. + // In those situations, we need to pre-pend "?q=" to the querystring. + // We determine whether or not to do this, by inspecting the first six characters + // We *expect* that "Select" is the first word of a queryAll query string. + if (queryStringOrQueryLocator.trim().substring(0, 6).toLowerCase() === 'select') { + queryStringOrQueryLocator = '?q=' + encodeUriQuery(queryStringOrQueryLocator); + } + // Here starts the functional body of the method. + sfrquery.withHttpConfig({ + cache: cacheEnabled + }).customGET(queryStringOrQueryLocator).then(function(data) { + // Add to the results array. Don't try sorting or unique. + results = results.concat(data.records); + // Inspect the returned data, looking to see if we're "done" i.e.: we've recieved all the pages + // of data. + if (!data.done) { + // If we're not done, recursively call this method with the query locator returned by the previous call. + // Making sure to pass on our cache parameters, our deferred object and the results array. + sfrquery.queryAll(_.last(data.nextRecordsUrl.split('/')), cacheEnabled, deferred, results); + } else { + // if we are done, resolve the deferred object. + deferred.resolve(results); + return deferred.promise; + } + }, function(error) { + // any errors are handled here. + return deferred.reject(error); + }); + // this deferred.notify call allows us in theory to update the ui with a "we've made 5 out of 7 calls" type message. + deferred.notify(); + // regardless, return a promise! + return deferred.promise; + }; + return sfrquery; + } +]); \ No newline at end of file diff --git a/jsSrc/subModules/ngForce-visualForceRemoting.js b/jsSrc/subModules/ngForce-visualForceRemoting.js new file mode 100644 index 0000000..031aab4 --- /dev/null +++ b/jsSrc/subModules/ngForce-visualForceRemoting.js @@ -0,0 +1,200 @@ +/* + * ngForce - a visualForce remoting based Angular.js service for developing + * Angular apps within Visualforce. + * + * Copyright (c)2013, Kevin Pooorman. + * License: MIT + * + * Vfr provides access to visualforce Remoting methods from any given class + * in the Org that are @remoteAction annotated. + * + * While ngForce comes with a standard set of crud based operations based on + * TKForce by @metadaddy, developers should pay specific attention to + * the .send() method, which enables bootstraping any class.method so long + * as it's a legit js Remoting action. + * + */ +angular.module('ngForce') + .provider('vfr', function() { + + // Force shutdown the VFR provider / factory if VisualForce is not already an object on window. + if (typeof Visualforce != 'object') { + throw new Error('Visualforce is not available as an object! Did you forget to include the ngForce component?'); + } + var vfRemote = {}; + + return { + /** + * Object contains the two standard fields needed by the .send method: escape and timeout. + * escape: Should the result be escape. default to false. + * timeout: set the timeout for visualforce to respond. + * @type {Object} + */ + var standardOpts = { + escape: false, + timeout: 10000 + }, + setStandardOptions: function(newOptions) { + if (newOptions && typeof newOptions !== 'object') { + throw new Error('standardOptions must be an object'); + } + standardOpts = newOptions; + }, + $get: function($q, $rootScope) { + /* + * Kevin o'Hara released premote, a nice lib for wrapping + * visualforce remoting calls in a promise interface. this + * function .send() is largely a gentle refactoring of his + * work, found in "premote" here: + * https://github.com/kevinohara80/premote + * such that it locks into the ng exec loop and utilizes + * the angular $q service, itself based on the Q lib + * Kevin uses. + * + * Returns a function that, when called, invokes the js + * remoting method specified in this call. + * @param {String} remoteAction class.methodName string representing the Apex className and Method to invoke + * @param {Object} options Ojbect containing at least the timeout and escaping options. Passed to Remoting call + * @param {Boolean} nullok Can this method return null and it be OK? + * @return {Function} Function engaged with the NG execution loop, making Visualforce remoting calls. + */ + function send(remoteAction, options, nullok) { + var namespace, controller, method; + var Manager = Visualforce.remoting.Manager; + var parts = remoteAction.split('.'); + if (options && typeof options !== 'object') { + throw new Error('Options must be an object'); + } + if (parts.length < 2) { + throw new Error('Invalid Remote Action specified. Use Controller.MethodName or $RemoteAction.Controller.MethodName'); + } else { + if (parts.length === 3) { + namespace = parts[0]; + controller = parts[1]; + method = parts[2]; + } else if (parts.length === 2) { + controller = parts[0]; + method = parts[1]; + } + } + + return function() { + var deferred = $q.defer(); + var args; + if (arguments.length) { + args = Array.prototype.slice.apply(arguments); + } else { + args = []; + } + args.splice(0, 0, remoteAction); + args.push(function(result, event) { + handleResultWithPromise(result, event, nullok, deferred); + }); + if (options) { + args.push(options); + } + Manager.invokeAction.apply(Manager, args); + return deferred.promise; + }; + }; + + /** + * Method returns an Angular promise as the product of a .send() prototyped method call + * @param {String} result Raw JSON string returned by js Remoting call + * @param {Object} event Status object returned from SF detailing errors, if any. + * @param {Boolean} nullok Can the result be null? + * @param {Deferred} deferred Angular Promise object + * @return {Deferred} Angular promise with resolution + */ + function handleResultWithPromise(result, event, nullok, deferred) { + if (result) { + if (typeof result !== 'object') { + result = JSON.parse(result); + } + if (Array.isArray(result) && result.length !== 0 && result[0].message && result[0].errorCode) { + //Handle INVALID_SESSION_ID err coming back + deferred.reject(result); + $rootScope.$safeApply(); + } else { + //result is an object, or has been parsed to one, or is an array + deferred.resolve(result); + $rootScope.$safeApply(); + } + } else if (event && event.status === false) { + //exception or other unspecified error occurred while running the remote method + deferred.reject({ + message: event.message, + method: event.method, + where: event.where, + errorCode: (event.type === 'exception' ? 'EXCEPTION' : 'UNSPECIFIED_ERROR') + }); + $rootScope.$safeApply(); + } else if (typeof nullok !== 'undefined' && nullok) { + deferred.resolve(); + $rootScope.$safeApply(); + } else { + deferred.reject({ + message: 'Null returned by RemoteAction not called with nullOk flag', + errorCode: 'NULL_RETURN' + }); + $rootScope.$safeApply(); + } + }; + + /** + * This the returned object literal for the $get call. + * Note that send and standardOptions essentially punt to their parental + * objects. + * + * Huge thanks to @marpstar for helping me figure out the bug in .send() + * that was causing pre-defined vfr methods to fail. + * + * + */ + return { + send: send, + standardOptions: standardOpts, + // Bulk Create + bulkCreate: send('ngForceController.bulkCreate', this.standardOptions, false), + // Bulk Update + bulkUpdate: send('ngForceController.bulkUpdate', this.standardOptions, false), + // Create + create: send('ngForceController.create', this.standardOptions, false), + // Clone + clone: send('ngForceController.sObjectKlone', this.standardOptions, false), + // Delete + del: send('ngForceController.del', this.standardOptions, true), + // Describe + describe: send('ngForceController.describe', this.standardOptions, false), + // Describe Field Set + describeFieldSet: send('ngForceController.describeFieldSet', this.standardOptions, false), + // Describe Picklist Values + describePicklistValues: send('ngForceController.getPicklistValues', this.standardOptions, false), + // Get Object Type + getObjectType: send('ngForceController.getObjType', this.standardOptions, false), + // Get Query Results as select2 data + getQueryResultsAsSelect2Data: send('ngForceController.getQueryResultsAsSelect2Data', this.standardOptions, false), + // Query + query: send('ngForceController.query', { + escape: false, + timeout: 30000 + }, false), + // Query from Fieldset + queryFromFieldset: send('ngForceController.queryFromFieldSet', { + escape: false, + timeout: 30000 + }, false), + // Retrieve a field list for a given object. + retrieve: send('ngForceController.retrieve', this.standardOptions, false), + // Search (SOSL) + search: send('ngForceController.search', this.standardOptions, false), + // Soql from Fieldset + soqlFromFieldSet: send('ngForceController.soqlFromFieldSet', this.standardOptions, false), + // Update + update: send('ngForceController.updat', this.standardOptions, true), + // Upsert + upsert: send('ngForceController.upser', this.standardOptions, true) + }; + } + }; + }); diff --git a/lib/restangular.js b/lib/restangular.js index 5090373..9a761a7 100644 --- a/lib/restangular.js +++ b/lib/restangular.js @@ -3,1303 +3,1311 @@ * @version v1.4.0 - 2014-04-25 * @link https://github.com/mgonto/restangular * @author Martin Gontovnikas * @license MIT License, http://www.opensource.org/licenses/MIT - */(function() { - -var module = angular.module('restangular', []); - -module.provider('Restangular', function() { - // Configuration - var Configurer = {}; - Configurer.init = function(object, config) { - /** - * Those are HTTP safe methods for which there is no need to pass any data with the request. - */ - - object.configuration = config; - - var safeMethods= ["get", "head", "options", "trace", "getlist"]; - config.isSafe = function(operation) { - return _.contains(safeMethods, operation.toLowerCase()); - }; - - var absolutePattern = /^https?:\/\//i; - config.isAbsoluteUrl = function(string) { - return _.isUndefined(config.absoluteUrl) || _.isNull(config.absoluteUrl) ? - string && absolutePattern.test(string) : - config.absoluteUrl; - }; - - config.absoluteUrl = _.isUndefined(config.absoluteUrl) ? true : config.absoluteUrl; - object.setSelfLinkAbsoluteUrl = function(value) { - config.absoluteUrl = value; - }; - /** - * This is the BaseURL to be used with Restangular - */ - config.baseUrl = _.isUndefined(config.baseUrl) ? "" : config.baseUrl; - object.setBaseUrl = function(newBaseUrl) { - config.baseUrl = /\/$/.test(newBaseUrl) - ? newBaseUrl.substring(0, newBaseUrl.length-1) - : newBaseUrl; - return this; - }; - - /** - * Sets the extra fields to keep from the parents - */ - config.extraFields = config.extraFields || []; - object.setExtraFields = function(newExtraFields) { - config.extraFields = newExtraFields; - return this; - }; - - /** - * Some default $http parameter to be used in EVERY call - **/ - config.defaultHttpFields = config.defaultHttpFields || {}; - object.setDefaultHttpFields = function(values) { - config.defaultHttpFields = values; - return this; - }; - - config.withHttpValues = function(httpLocalConfig, obj) { - return _.defaults(obj, httpLocalConfig, config.defaultHttpFields); - }; - - config.encodeIds = _.isUndefined(config.encodeIds) ? true : config.encodeIds; - object.setEncodeIds = function(encode) { - config.encodeIds = encode; - }; - - config.defaultRequestParams = config.defaultRequestParams || { - get: {}, - post: {}, - put: {}, - remove: {}, - common: {} - }; - - object.setDefaultRequestParams = function(param1, param2) { - var methods = [], - params = param2 || param1; - if (!_.isUndefined(param2)) { - if (_.isArray(param1)) { - methods = param1; - } else { - methods.push(param1); - } - } else { - methods.push('common'); - } - - _.each(methods, function (method) { - config.defaultRequestParams[method] = params; - }); - return this; - }; - - object.requestParams = config.defaultRequestParams; - - - config.defaultHeaders = config.defaultHeaders || {}; - object.setDefaultHeaders = function(headers) { - config.defaultHeaders = headers; - object.defaultHeaders = config.defaultHeaders; - return this; - }; - - object.defaultHeaders = config.defaultHeaders; - - /** - * Method overriders will set which methods are sent via POST with an X-HTTP-Method-Override - **/ - config.methodOverriders = config.methodOverriders || []; - object.setMethodOverriders = function(values) { - var overriders = _.extend([], values); - if (config.isOverridenMethod('delete', overriders)) { - overriders.push("remove"); - } - config.methodOverriders = overriders; - return this; - }; - - config.jsonp = _.isUndefined(config.jsonp) ? false : config.jsonp; - object.setJsonp = function(active) { - config.jsonp = active; - }; - - config.isOverridenMethod = function(method, values) { - var search = values || config.methodOverriders; - return !_.isUndefined(_.find(search, function(one) { - return one.toLowerCase() === method.toLowerCase(); - })); - }; - - /** - * Sets the URL creator type. For now, only Path is created. In the future we'll have queryParams - **/ - config.urlCreator = config.urlCreator || "path"; - object.setUrlCreator = function(name) { - if (!_.has(config.urlCreatorFactory, name)) { - throw new Error("URL Path selected isn't valid"); - } - - config.urlCreator = name; - return this; - }; - - /** - * You can set the restangular fields here. The 3 required fields for Restangular are: - * - * id: Id of the element - * route: name of the route of this element - * parentResource: the reference to the parent resource - * - * All of this fields except for id, are handled (and created) by Restangular. By default, - * the field values will be id, route and parentResource respectively - */ - config.restangularFields = config.restangularFields || { - id: "id", - route: "route", - parentResource: "parentResource", - restangularCollection: "restangularCollection", - cannonicalId: "__cannonicalId", - etag: "restangularEtag", - selfLink: "href", - get: "get", - getList: "getList", - put: "put", - post: "post", - remove: "remove", - head: "head", - trace: "trace", - options: "options", - patch: "patch", - getRestangularUrl: "getRestangularUrl", - getRequestedUrl: "getRequestedUrl", - putElement: "putElement", - addRestangularMethod: "addRestangularMethod", - getParentList: "getParentList", - clone: "clone", - ids: "ids", - httpConfig: '_$httpConfig', - reqParams: 'reqParams', - one: 'one', - all: 'all', - several: 'several', - oneUrl: 'oneUrl', - allUrl: 'allUrl', - customPUT: 'customPUT', - customPOST: 'customPOST', - customDELETE: 'customDELETE', - customGET: 'customGET', - customGETLIST: 'customGETLIST', - customOperation: 'customOperation', - doPUT: 'doPUT', - doPOST: 'doPOST', - doDELETE: 'doDELETE', - doGET: 'doGET', - doGETLIST: 'doGETLIST', - fromServer: 'fromServer', - withConfig: 'withConfig', - withHttpConfig: 'withHttpConfig', - singleOne: 'singleOne', - plain: 'plain', - save: 'save' - }; - object.setRestangularFields = function(resFields) { - config.restangularFields = - _.extend(config.restangularFields, resFields); - return this; - }; - - config.isRestangularized = function(obj) { - return !!obj[config.restangularFields.one] || !!obj[config.restangularFields.all]; - }; - - config.setFieldToElem = function(field, elem, value) { - var properties = field.split('.'); - var idValue = elem; - _.each(_.initial(properties), function(prop) { - idValue[prop] = {}; - idValue = idValue[prop]; - }); - idValue[_.last(properties)] = value; - return this; - }; - - config.getFieldFromElem = function(field, elem) { - var properties = field.split('.'); - var idValue = elem; - _.each(properties, function(prop) { - if (idValue) { - idValue = idValue[prop]; - } - }); - return angular.copy(idValue); - }; - - config.setIdToElem = function(elem, id) { - config.setFieldToElem(config.restangularFields.id, elem, id); - return this; - }; - - config.getIdFromElem = function(elem) { - return config.getFieldFromElem(config.restangularFields.id, elem); - }; - - config.isValidId = function(elemId) { - return "" !== elemId && !_.isUndefined(elemId) && !_.isNull(elemId); - }; - - config.setUrlToElem = function(elem, url, route) { - config.setFieldToElem(config.restangularFields.selfLink, elem, url); - return this; - }; - - config.getUrlFromElem = function(elem) { - return config.getFieldFromElem(config.restangularFields.selfLink, elem); - }; - - config.useCannonicalId = _.isUndefined(config.useCannonicalId) ? false : config.useCannonicalId; - object.setUseCannonicalId = function(value) { - config.useCannonicalId = value; - return this; - }; - - config.getCannonicalIdFromElem = function(elem) { - var cannonicalId = elem[config.restangularFields.cannonicalId]; - var actualId = config.isValidId(cannonicalId) ? - cannonicalId : config.getIdFromElem(elem); - return actualId; - }; - - /** - * Sets the Response parser. This is used in case your response isn't directly the data. - * For example if you have a response like {meta: {'meta'}, data: {name: 'Gonto'}} - * you can extract this data which is the one that needs wrapping - * - * The ResponseExtractor is a function that receives the response and the method executed. - */ - - config.responseInterceptors = config.responseInterceptors || []; - - config.defaultResponseInterceptor = function(data, operation, - what, url, response, deferred) { - return data; - }; - - config.responseExtractor = function(data, operation, - what, url, response, deferred) { - var interceptors = angular.copy(config.responseInterceptors); - interceptors.push(config.defaultResponseInterceptor); - var theData = data; - _.each(interceptors, function(interceptor) { - theData = interceptor(theData, operation, - what, url, response, deferred); - }); - return theData; - }; - - object.addResponseInterceptor = function(extractor) { - config.responseInterceptors.push(extractor); - return this; - }; - - object.setResponseInterceptor = object.addResponseInterceptor; - object.setResponseExtractor = object.addResponseInterceptor; - - /** - * Response interceptor is called just before resolving promises. - */ - - - /** - * Request interceptor is called before sending an object to the server. - */ - config.requestInterceptors = config.requestInterceptors || []; - - config.defaultInterceptor = function(element, operation, - path, url, headers, params, httpConfig) { - return { - element: element, - headers: headers, - params: params, - httpConfig: httpConfig - }; - }; - - config.fullRequestInterceptor = function(element, operation, - path, url, headers, params, httpConfig) { - var interceptors = angular.copy(config.requestInterceptors); - var defaultRequest = config.defaultInterceptor(element, operation, path, url, headers, params, httpConfig); - return _.reduce(interceptors, function(request, interceptor) { - return _.extend(request, interceptor(request.element, operation, - path, url, request.headers, request.params, request.httpConfig)); - }, defaultRequest); - }; - - object.addRequestInterceptor = function(interceptor) { - config.requestInterceptors.push(function(elem, operation, path, url, headers, params, httpConfig) { - return { - headers: headers, - params: params, - element: interceptor(elem, operation, path, url), - httpConfig: httpConfig - }; - }); - return this; - }; - - object.setRequestInterceptor = object.addRequestInterceptor; - - object.addFullRequestInterceptor = function(interceptor) { - config.requestInterceptors.push(interceptor); - return this; - }; - - object.setFullRequestInterceptor = object.addFullRequestInterceptor; - - config.errorInterceptor = config.errorInterceptor || function() {}; - - object.setErrorInterceptor = function(interceptor) { - config.errorInterceptor = interceptor; - return this; - }; - - config.onBeforeElemRestangularized = config.onBeforeElemRestangularized || function(elem) { - return elem; - }; - object.setOnBeforeElemRestangularized = function(post) { - config.onBeforeElemRestangularized = post; - return this; - }; - - /** - * This method is called after an element has been "Restangularized". - * - * It receives the element, a boolean indicating if it's an element or a collection - * and the name of the model - * - */ - config.onElemRestangularized = config.onElemRestangularized || function(elem) { - return elem; - }; - object.setOnElemRestangularized = function(post) { - config.onElemRestangularized = post; - return this; - }; - - config.shouldSaveParent = config.shouldSaveParent || function() { - return true; - }; - object.setParentless = function(values) { - if (_.isArray(values)) { - config.shouldSaveParent = function(route) { - return !_.contains(values, route); - }; - } else if (_.isBoolean(values)) { - config.shouldSaveParent = function() { - return !values; - }; - } - return this; - }; - - /** - * This lets you set a suffix to every request. - * - * For example, if your api requires that for JSon requests you do /users/123.json, you can set that - * in here. - * - * - * By default, the suffix is null - */ - config.suffix = _.isUndefined(config.suffix) ? null : config.suffix; - object.setRequestSuffix = function(newSuffix) { - config.suffix = newSuffix; - return this; - }; - - /** - * Add element transformers for certain routes. - */ - config.transformers = config.transformers || {}; - object.addElementTransformer = function(type, secondArg, thirdArg) { - var isCollection = null; - var transformer = null; - if (arguments.length === 2) { - transformer = secondArg; - } else { - transformer = thirdArg; - isCollection = secondArg; - } - - var typeTransformers = config.transformers[type]; - if (!typeTransformers) { - typeTransformers = config.transformers[type] = []; - } - - typeTransformers.push(function(coll, elem) { - if (_.isNull(isCollection) || (coll == isCollection)) { - return transformer(elem); - } - return elem; - }); - - return object; - }; - - object.extendCollection = function(route, fn) { - return object.addElementTransformer(route, true, fn); - }; - - object.extendModel = function(route, fn) { - return object.addElementTransformer(route, false, fn); - }; - - config.transformElem = function(elem, isCollection, route, Restangular, force) { - if (!force && !config.transformLocalElements && !elem[config.restangularFields.fromServer]) { - return elem; - } - var typeTransformers = config.transformers[route]; - var changedElem = elem; - if (typeTransformers) { - _.each(typeTransformers, function(transformer) { - changedElem = transformer(isCollection, changedElem); - }); - } - return config.onElemRestangularized(changedElem, - isCollection, route, Restangular); - }; - - config.transformLocalElements = _.isUndefined(config.transformLocalElements) ? false : config.transformLocalElements; - object.setTransformOnlyServerElements = function(active) { - config.transformLocalElements = !active; - } - - config.fullResponse = _.isUndefined(config.fullResponse) ? false : config.fullResponse; - object.setFullResponse = function(full) { - config.fullResponse = full; - return this; - }; - - - - - - //Internal values and functions - config.urlCreatorFactory = {}; - - /** - * Base URL Creator. Base prototype for everything related to it - **/ - - var BaseCreator = function() { - }; - - BaseCreator.prototype.setConfig = function(config) { - this.config = config; - return this; - }; - - BaseCreator.prototype.parentsArray = function(current) { - var parents = []; - while(current) { - parents.push(current); - current = current[this.config.restangularFields.parentResource]; - } - return parents.reverse(); - }; - - function RestangularResource(config, $http, url, configurer) { - var resource = {}; - _.each(_.keys(configurer), function(key) { - var value = configurer[key]; - - // Add default parameters - value.params = _.extend({}, value.params, - config.defaultRequestParams[value.method.toLowerCase()]); - // We don't want the ? if no params are there - if (_.isEmpty(value.params)) { - delete value.params; - } - - if (config.isSafe(value.method)) { - - resource[key] = function() { - return $http(_.extend(value, { - url: url - })); - }; - - } else { - - resource[key] = function(data) { - return $http(_.extend(value, { - url: url, - data: data - })); - }; - - } - }); - - return resource; - } - - BaseCreator.prototype.resource = function(current, $http, localHttpConfig, callHeaders, callParams, what, etag, operation) { - - var params = _.defaults(callParams || {}, this.config.defaultRequestParams.common); - var headers = _.defaults(callHeaders || {}, this.config.defaultHeaders); - - if (etag) { - if (!config.isSafe(operation)) { - headers['If-Match'] = etag; - } else { - headers['If-None-Match'] = etag; - } - } - - var url = this.base(current); - - if (what) { - var add = ''; - if (!/\/$/.test(url)) { - add += '/'; - } - add += what; - url += add; - } - - if (this.config.suffix - && url.indexOf(this.config.suffix, url.length - this.config.suffix.length) === -1 - && !this.config.getUrlFromElem(current)) { - url += this.config.suffix; - } - - current[this.config.restangularFields.httpConfig] = undefined; - - - return RestangularResource(this.config, $http, url, { - getList: this.config.withHttpValues(localHttpConfig, - {method: 'GET', - params: params, - headers: headers}), - - get: this.config.withHttpValues(localHttpConfig, - {method: 'GET', - params: params, - headers: headers}), - - jsonp: this.config.withHttpValues(localHttpConfig, - {method: 'jsonp', - params: params, - headers: headers}), - - put: this.config.withHttpValues(localHttpConfig, - {method: 'PUT', - params: params, - headers: headers}), - - post: this.config.withHttpValues(localHttpConfig, - {method: 'POST', - params: params, - headers: headers}), - - remove: this.config.withHttpValues(localHttpConfig, - {method: 'DELETE', - params: params, - headers: headers}), - - head: this.config.withHttpValues(localHttpConfig, - {method: 'HEAD', - params: params, - headers: headers}), - - trace: this.config.withHttpValues(localHttpConfig, - {method: 'TRACE', - params: params, - headers: headers}), - - options: this.config.withHttpValues(localHttpConfig, - {method: 'OPTIONS', - params: params, - headers: headers}), - - patch: this.config.withHttpValues(localHttpConfig, - {method: 'PATCH', - params: params, - headers: headers}) - }); - }; - - /** - * This is the Path URL creator. It uses Path to show Hierarchy in the Rest API. - * This means that if you have an Account that then has a set of Buildings, a URL to a building - * would be /accounts/123/buildings/456 - **/ - var Path = function() { - }; - - Path.prototype = new BaseCreator(); - - Path.prototype.base = function(current) { - var __this = this; - return _.reduce(this.parentsArray(current), function(acum, elem) { - var elemUrl; - var elemSelfLink = __this.config.getUrlFromElem(elem); - if (elemSelfLink) { - if (__this.config.isAbsoluteUrl(elemSelfLink)) { - return elemSelfLink; - } else { - elemUrl = elemSelfLink; - } - } else { - elemUrl = elem[__this.config.restangularFields.route]; - - if (elem[__this.config.restangularFields.restangularCollection]) { - var ids = elem[__this.config.restangularFields.ids]; - if (ids) { - elemUrl += "/" + ids.join(","); - } - } else { - var elemId; - if (__this.config.useCannonicalId) { - elemId = __this.config.getCannonicalIdFromElem(elem); - } else { - elemId = __this.config.getIdFromElem(elem); - } - - if (config.isValidId(elemId) && !elem.singleOne) { - elemUrl += "/" + (__this.config.encodeIds ? encodeURIComponent(elemId) : elemId); - } - } - } - - return acum.replace(/\/$/, "") + "/" + elemUrl; - - }, this.config.baseUrl); - }; - - - - Path.prototype.fetchUrl = function(current, what) { - var baseUrl = this.base(current); - if (what) { - baseUrl += "/" + what; - } - return baseUrl; - }; - - Path.prototype.fetchRequestedUrl = function(current, what) { - var url = this.fetchUrl(current, what); - var params = current[config.restangularFields.reqParams]; - - // From here on and until the end of fetchRequestedUrl, - // the code has been kindly borrowed from angular.js - // The reason for such code bloating is coherence: - // If the user were to use this for cache management, the - // serialization of parameters would need to be identical - // to the one done by angular for cache keys to match. - function sortedKeys(obj) { - var keys = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - keys.push(key); - } - } - return keys.sort(); - } - - function forEachSorted(obj, iterator, context) { - var keys = sortedKeys(obj); - for ( var i = 0; i < keys.length; i++) { - iterator.call(context, obj[keys[i]], keys[i]); - } - return keys; - } - - function encodeUriQuery(val, pctEncodeSpaces) { - return encodeURIComponent(val). - replace(/%40/gi, '@'). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); - } - - if (!params) return url; - var parts = []; - forEachSorted(params, function(value, key) { - if (value == null || value == undefined) return; - if (!angular.isArray(value)) value = [value]; - - angular.forEach(value, function(v) { - if (angular.isObject(v)) { - v = angular.toJson(v); - } - parts.push(encodeUriQuery(key) + '=' + - encodeUriQuery(v)); - }); - }); - return url + (this.config.suffix || '') + ((url.indexOf('?') === -1) ? '?' : '&') + parts.join('&'); - }; - - - - config.urlCreatorFactory.path = Path; - - }; - - var globalConfiguration = {}; - - Configurer.init(this, globalConfiguration); - - - - - this.$get = ['$http', '$q', function($http, $q) { - - function createServiceForConfiguration(config) { - var service = {}; - - var urlHandler = new config.urlCreatorFactory[config.urlCreator](); - urlHandler.setConfig(config); - - function restangularizeBase(parent, elem, route, reqParams, fromServer) { - elem[config.restangularFields.route] = route; - elem[config.restangularFields.getRestangularUrl] = _.bind(urlHandler.fetchUrl, urlHandler, elem); - elem[config.restangularFields.getRequestedUrl] = _.bind(urlHandler.fetchRequestedUrl, urlHandler, elem); - elem[config.restangularFields.addRestangularMethod] = _.bind(addRestangularMethodFunction, elem); - elem[config.restangularFields.clone] = _.bind(copyRestangularizedElement, elem, elem); - elem[config.restangularFields.reqParams] = _.isEmpty(reqParams) ? null : reqParams; - elem[config.restangularFields.withHttpConfig] = _.bind(withHttpConfig, elem); - elem[config.restangularFields.plain] = _.bind(stripRestangular, elem, elem); - - // RequestLess connection - elem[config.restangularFields.one] = _.bind(one, elem, elem); - elem[config.restangularFields.all] = _.bind(all, elem, elem); - elem[config.restangularFields.several] = _.bind(several, elem, elem); - elem[config.restangularFields.oneUrl] = _.bind(oneUrl, elem, elem); - elem[config.restangularFields.allUrl] = _.bind(allUrl, elem, elem); - - elem[config.restangularFields.fromServer] = !!fromServer; - - if (parent && config.shouldSaveParent(route)) { - var parentId = config.getIdFromElem(parent); - var parentUrl = config.getUrlFromElem(parent); - - var restangularFieldsForParent = _.union( - _.values( _.pick(config.restangularFields, ['route', 'singleOne', 'parentResource']) ), - config.extraFields - ); - var parentResource = _.pick(parent, restangularFieldsForParent); - - if (config.isValidId(parentId)) { - config.setIdToElem(parentResource, parentId); - } - if (config.isValidId(parentUrl)) { - config.setUrlToElem(parentResource, parentUrl); - } - - elem[config.restangularFields.parentResource] = parentResource; - } else { - elem[config.restangularFields.parentResource] = null; - } - return elem; - } - - - - function one(parent, route, id, singleOne) { - if (_.isNumber(route) || _.isNumber(parent)) { - var error = "You're creating a Restangular entity with the number " - error += "instead of the route or the parent. You can't call .one(12)"; - throw new Error(error); - } - var elem = {}; - config.setIdToElem(elem, id); - config.setFieldToElem(config.restangularFields.singleOne, elem, singleOne); - return restangularizeElem(parent, elem , route, false); - } - - - function all(parent, route) { - return restangularizeCollection(parent, [] , route, false); - } - - function several(parent, route, ids) { - var collection = []; - collection[config.restangularFields.ids] = - Array.prototype.splice.call(arguments, 2); - return restangularizeCollection(parent, collection , route, false); - } - - function oneUrl(parent, route, url) { - if (!route) { - throw new Error("Route is mandatory when creating new Restangular objects."); - } - var elem = {}; - config.setUrlToElem(elem, url, route); - return restangularizeElem(parent, elem , route, false); - } - - - function allUrl(parent, route, url) { - if (!route) { - throw new Error("Route is mandatory when creating new Restangular objects."); - } - var elem = {}; - config.setUrlToElem(elem, url, route); - return restangularizeCollection(parent, elem , route, false); - } - // Promises - function restangularizePromise(promise, isCollection, valueToFill) { - promise.call = _.bind(promiseCall, promise); - promise.get = _.bind(promiseGet, promise); - promise[config.restangularFields.restangularCollection] = isCollection; - if (isCollection) { - promise.push = _.bind(promiseCall, promise, "push"); - } - promise.$object = valueToFill; - return promise; - } - - function promiseCall(method) { - var deferred = $q.defer(); - var callArgs = arguments; - var filledValue = {}; - this.then(function(val) { - var params = Array.prototype.slice.call(callArgs, 1); - var func = val[method]; - func.apply(val, params); - filledValue = val; - deferred.resolve(val); - }); - return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue); - } - - function promiseGet(what) { - var deferred = $q.defer(); - var filledValue = {}; - this.then(function(val) { - filledValue = val[what]; - deferred.resolve(filledValue); - }); - return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue); - } - - function resolvePromise(deferred, response, data, filledValue) { - - _.extend(filledValue, data); - - // Trigger the full response interceptor. - if (config.fullResponse) { - return deferred.resolve(_.extend(response, { - data: data - })); - } else { - deferred.resolve(data); - } - } - - - // Elements - - function stripRestangular(elem) { - if (_.isArray(elem)) { - var array = []; - _.each(elem, function(value) { - array.push(stripRestangular(value)); - }); - return array; - } else { - return _.omit(elem, _.values(_.omit(config.restangularFields, 'id'))); - } - - - } - - function addCustomOperation(elem) { - elem[config.restangularFields.customOperation] = _.bind(customFunction, elem); - _.each(["put", "post", "get", "delete"], function(oper) { - _.each(["do", "custom"], function(alias) { - var callOperation = oper === 'delete' ? 'remove' : oper; - var name = alias + oper.toUpperCase(); - var callFunction; - - if (callOperation !== 'put' && callOperation !== 'post') { - callFunction = customFunction; - } else { - callFunction = function(operation, elem, path, params, headers) { - return _.bind(customFunction, this)(operation, path, params, headers, elem); - }; - } - elem[name] = _.bind(callFunction, elem, callOperation); - }); - }); - elem[config.restangularFields.customGETLIST] = _.bind(fetchFunction, elem); - elem[config.restangularFields.doGETLIST] = elem[config.restangularFields.customGETLIST]; - } - - function copyRestangularizedElement(fromElement, toElement) { - var copiedElement = angular.copy(fromElement, toElement); - return restangularizeElem(copiedElement[config.restangularFields.parentResource], - copiedElement, copiedElement[config.restangularFields.route], true); - } - - function restangularizeElem(parent, element, route, fromServer, collection, reqParams) { - var elem = config.onBeforeElemRestangularized(element, false, route); - - var localElem = restangularizeBase(parent, elem, route, reqParams, fromServer); - - if (config.useCannonicalId) { - localElem[config.restangularFields.cannonicalId] = config.getIdFromElem(localElem); - } - - if (collection) { - localElem[config.restangularFields.getParentList] = function() { - return collection; - }; - } - - localElem[config.restangularFields.restangularCollection] = false; - localElem[config.restangularFields.get] = _.bind(getFunction, localElem); - localElem[config.restangularFields.getList] = _.bind(fetchFunction, localElem); - localElem[config.restangularFields.put] = _.bind(putFunction, localElem); - localElem[config.restangularFields.post] = _.bind(postFunction, localElem); - localElem[config.restangularFields.remove] = _.bind(deleteFunction, localElem); - localElem[config.restangularFields.head] = _.bind(headFunction, localElem); - localElem[config.restangularFields.trace] = _.bind(traceFunction, localElem); - localElem[config.restangularFields.options] = _.bind(optionsFunction, localElem); - localElem[config.restangularFields.patch] = _.bind(patchFunction, localElem); - localElem[config.restangularFields.save] = _.bind(save, localElem); - - addCustomOperation(localElem); - return config.transformElem(localElem, false, route, service, true); - } - - function restangularizeCollection(parent, element, route, fromServer, reqParams) { - var elem = config.onBeforeElemRestangularized(element, true, route); - - var localElem = restangularizeBase(parent, elem, route, reqParams, fromServer); - localElem[config.restangularFields.restangularCollection] = true; - localElem[config.restangularFields.post] = _.bind(postFunction, localElem, null); - localElem[config.restangularFields.remove] = _.bind(deleteFunction, localElem); - localElem[config.restangularFields.head] = _.bind(headFunction, localElem); - localElem[config.restangularFields.trace] = _.bind(traceFunction, localElem); - localElem[config.restangularFields.putElement] = _.bind(putElementFunction, localElem); - localElem[config.restangularFields.options] = _.bind(optionsFunction, localElem); - localElem[config.restangularFields.patch] = _.bind(patchFunction, localElem); - localElem[config.restangularFields.get] = _.bind(getById, localElem); - localElem[config.restangularFields.getList] = _.bind(fetchFunction, localElem, null); - - addCustomOperation(localElem); - return config.transformElem(localElem, true, route, service, true); - } - - function restangularizeCollectionAndElements(parent, element, route) { - var collection = restangularizeCollection(parent, element, route, false); - _.each(collection, function(elem) { - restangularizeElem(parent, elem, route, false); - }); - return collection; - } - - function getById(id, reqParams, headers){ - return this.customGET(id.toString(), reqParams, headers); - } - - function putElementFunction(idx, params, headers) { - var __this = this; - var elemToPut = this[idx]; - var deferred = $q.defer(); - var filledArray = []; - filledArray = config.transformElem(filledArray, true, elemToPut[config.restangularFields.route], service) - elemToPut.put(params, headers).then(function(serverElem) { - var newArray = copyRestangularizedElement(__this); - newArray[idx] = serverElem; - filledArray = newArray; - deferred.resolve(newArray); - }, function(response) { - deferred.reject(response); - }); - - return restangularizePromise(deferred.promise, true, filledArray); - } - - function parseResponse(resData, operation, route, fetchUrl, response, deferred) { - var data = config.responseExtractor(resData, operation, route, fetchUrl, response, deferred); - var etag = response.headers("ETag"); - if (data && etag) { - data[config.restangularFields.etag] = etag; - } - return data; - } - - - function fetchFunction(what, reqParams, headers) { - var __this = this; - var deferred = $q.defer(); - var operation = 'getList'; - var url = urlHandler.fetchUrl(this, what); - var whatFetched = what || __this[config.restangularFields.route]; - - var request = config.fullRequestInterceptor(null, operation, - whatFetched, url, headers || {}, reqParams || {}, this[config.restangularFields.httpConfig] || {}); - - var filledArray = []; - filledArray = config.transformElem(filledArray, true, whatFetched, service) - - var method = "getList"; - - if (config.jsonp) { - method = "jsonp"; - } - - urlHandler.resource(this, $http, request.httpConfig, request.headers, request.params, what, - this[config.restangularFields.etag], operation)[method]().then(function(response) { - var resData = response.data; - var fullParams = response.config.params; - var data = parseResponse(resData, operation, whatFetched, url, response, deferred); - - // support empty response for getList() calls (some APIs respond with 204 and empty body) - if (_.isUndefined(data) || "" === data) { - data = [] - } - if (!_.isArray(data)) { - throw new Error("Response for getList SHOULD be an array and not an object or something else"); - } - var processedData = _.map(data, function(elem) { - if (!__this[config.restangularFields.restangularCollection]) { - return restangularizeElem(__this, elem, what, true, data); - } else { - return restangularizeElem(__this[config.restangularFields.parentResource], - elem, __this[config.restangularFields.route], true, data); - } - - }); - - processedData = _.extend(data, processedData); - - if (!__this[config.restangularFields.restangularCollection]) { - resolvePromise(deferred, response, restangularizeCollection(__this, processedData, what, true, fullParams), filledArray); - } else { - resolvePromise(deferred, response, restangularizeCollection(__this[config.restangularFields.parentResource], processedData, __this[config.restangularFields.route], true, fullParams), filledArray); - } - }, function error(response) { - if (response.status === 304 && __this[config.restangularFields.restangularCollection]) { - resolvePromise(deferred, response, __this, filledArray); - } else if ( config.errorInterceptor(response, deferred) !== false ) { - deferred.reject(response); - } - }); - - return restangularizePromise(deferred.promise, true, filledArray); - } - - function withHttpConfig(httpConfig) { - this[config.restangularFields.httpConfig] = httpConfig; - return this; - } - - function save(params, headers) { - if (this[config.restangularFields.fromServer]) { - return this[config.restangularFields.put](params, headers); - } else { - return _.bind(elemFunction, this)("post", undefined, params, undefined, headers); - } - } - - function elemFunction(operation, what, params, obj, headers) { - var __this = this; - var deferred = $q.defer(); - var resParams = params || {}; - var route = what || this[config.restangularFields.route]; - var fetchUrl = urlHandler.fetchUrl(this, what); - - var callObj = obj || this; - // fallback to etag on restangular object (since for custom methods we probably don't explicitly specify the etag field) - var etag = callObj[config.restangularFields.etag] || (operation != "post" ? this[config.restangularFields.etag] : null); - - if (_.isObject(callObj) && config.isRestangularized(callObj)) { - callObj = stripRestangular(callObj); - } - var request = config.fullRequestInterceptor(callObj, operation, route, fetchUrl, - headers || {}, resParams || {}, this[config.restangularFields.httpConfig] || {}); - - var filledObject = {}; - filledObject = config.transformElem(filledObject, false, route, service); - - var okCallback = function(response) { - var resData = response.data; - var fullParams = response.config.params; - var elem = parseResponse(resData, operation, route, fetchUrl, response, deferred); - if (elem) { - - if (operation === "post" && !__this[config.restangularFields.restangularCollection]) { - resolvePromise(deferred, response, restangularizeElem(__this, elem, what, true, null, fullParams), filledObject); - } else { - data = restangularizeElem(__this[config.restangularFields.parentResource], elem, __this[config.restangularFields.route], true, null, fullParams) - data[config.restangularFields.singleOne] = __this[config.restangularFields.singleOne] - resolvePromise(deferred, response, data, filledObject); - } - - } else { - resolvePromise(deferred, response, undefined, filledObject); - } - }; - - var errorCallback = function(response) { - if (response.status === 304 && config.isSafe(operation)) { - resolvePromise(deferred, response, __this, filledObject); - } else if ( config.errorInterceptor(response, deferred) !== false ) { - deferred.reject(response); - } - }; - // Overring HTTP Method - var callOperation = operation; - var callHeaders = _.extend({}, request.headers); - var isOverrideOperation = config.isOverridenMethod(operation); - if (isOverrideOperation) { - callOperation = 'post'; - callHeaders = _.extend(callHeaders, {'X-HTTP-Method-Override': operation === 'remove' ? 'DELETE' : operation}); - } else if (config.jsonp && callOperation === 'get') { - callOperation = 'jsonp'; - } - - if (config.isSafe(operation)) { - if (isOverrideOperation) { - urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, - what, etag, callOperation)[callOperation]({}).then(okCallback, errorCallback); - } else { - urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, - what, etag, callOperation)[callOperation]().then(okCallback, errorCallback); - } - } else { - urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, - what, etag, callOperation)[callOperation](request.element).then(okCallback, errorCallback); - } - - return restangularizePromise(deferred.promise, false, filledObject); - } - - function getFunction(params, headers) { - return _.bind(elemFunction, this)("get", undefined, params, undefined, headers); - } - - function deleteFunction(params, headers) { - return _.bind(elemFunction, this)("remove", undefined, params, undefined, headers); - } - - function putFunction(params, headers) { - return _.bind(elemFunction, this)("put", undefined, params, undefined, headers); - } - - function postFunction(what, elem, params, headers) { - return _.bind(elemFunction, this)("post", what, params, elem, headers); - } - - function headFunction(params, headers) { - return _.bind(elemFunction, this)("head", undefined, params, undefined, headers); - } - - function traceFunction(params, headers) { - return _.bind(elemFunction, this)("trace", undefined, params, undefined, headers); - } - - function optionsFunction(params, headers) { - return _.bind(elemFunction, this)("options", undefined, params, undefined, headers); - } - - function patchFunction(elem, params, headers) { - return _.bind(elemFunction, this)("patch", undefined, params, elem, headers); - } - - function customFunction(operation, path, params, headers, elem) { - return _.bind(elemFunction, this)(operation, path, params, elem, headers); - } - - function addRestangularMethodFunction(name, operation, path, defaultParams, defaultHeaders, defaultElem) { - var bindedFunction; - if (operation === 'getList') { - bindedFunction = _.bind(fetchFunction, this, path); - } else { - bindedFunction = _.bind(customFunction, this, operation, path); - } - - var createdFunction = function(params, headers, elem) { - var callParams = _.defaults({ - params: params, - headers: headers, - elem: elem - }, { - params: defaultParams, - headers: defaultHeaders, - elem: defaultElem - }); - return bindedFunction(callParams.params, callParams.headers, callParams.elem); - }; - - if (config.isSafe(operation)) { - this[name] = createdFunction; - } else { - this[name] = function(elem, params, headers) { - return createdFunction(params, headers, elem); - }; - } - - } - - function withConfigurationFunction(configurer) { - var newConfig = angular.copy(_.omit(config, 'configuration')); - Configurer.init(newConfig, newConfig); - configurer(newConfig); - return createServiceForConfiguration(newConfig); - } - - function toService(route, parent) { - var serv = {}; - var collection = (parent || service).all(route); - serv.one = _.bind(one, (parent || service), parent, route); - serv.post = _.bind(collection.post, collection); - serv.getList = _.bind(collection.getList, collection); - return serv; - } + */ +(function() { + + var module = angular.module('restangular', []); + + module.provider('Restangular', function() { + // Configuration + var Configurer = {}; + Configurer.init = function(object, config) { + /** + * Those are HTTP safe methods for which there is no need to pass any data with the request. + */ + + object.configuration = config; + + var safeMethods = ["get", "head", "options", "trace", "getlist"]; + config.isSafe = function(operation) { + return _.contains(safeMethods, operation.toLowerCase()); + }; + + var absolutePattern = /^https?:\/\//i; + config.isAbsoluteUrl = function(string) { + return _.isUndefined(config.absoluteUrl) || _.isNull(config.absoluteUrl) ? + string && absolutePattern.test(string) : + config.absoluteUrl; + }; + + config.absoluteUrl = _.isUndefined(config.absoluteUrl) ? true : config.absoluteUrl; + object.setSelfLinkAbsoluteUrl = function(value) { + config.absoluteUrl = value; + }; + /** + * This is the BaseURL to be used with Restangular + */ + config.baseUrl = _.isUndefined(config.baseUrl) ? "" : config.baseUrl; + object.setBaseUrl = function(newBaseUrl) { + config.baseUrl = /\/$/.test(newBaseUrl) ? newBaseUrl.substring(0, newBaseUrl.length - 1) : newBaseUrl; + return this; + }; + + /** + * Sets the extra fields to keep from the parents + */ + config.extraFields = config.extraFields || []; + object.setExtraFields = function(newExtraFields) { + config.extraFields = newExtraFields; + return this; + }; + + /** + * Some default $http parameter to be used in EVERY call + **/ + config.defaultHttpFields = config.defaultHttpFields || {}; + object.setDefaultHttpFields = function(values) { + config.defaultHttpFields = values; + return this; + }; + + config.withHttpValues = function(httpLocalConfig, obj) { + return _.defaults(obj, httpLocalConfig, config.defaultHttpFields); + }; + + config.encodeIds = _.isUndefined(config.encodeIds) ? true : config.encodeIds; + object.setEncodeIds = function(encode) { + config.encodeIds = encode; + }; + + config.defaultRequestParams = config.defaultRequestParams || { + get: {}, + post: {}, + put: {}, + remove: {}, + common: {} + }; + + object.setDefaultRequestParams = function(param1, param2) { + var methods = [], + params = param2 || param1; + if (!_.isUndefined(param2)) { + if (_.isArray(param1)) { + methods = param1; + } else { + methods.push(param1); + } + } else { + methods.push('common'); + } + + _.each(methods, function(method) { + config.defaultRequestParams[method] = params; + }); + return this; + }; + + object.requestParams = config.defaultRequestParams; + + + config.defaultHeaders = config.defaultHeaders || {}; + object.setDefaultHeaders = function(headers) { + config.defaultHeaders = headers; + object.defaultHeaders = config.defaultHeaders; + return this; + }; + + object.defaultHeaders = config.defaultHeaders; + + /** + * Method overriders will set which methods are sent via POST with an X-HTTP-Method-Override + **/ + config.methodOverriders = config.methodOverriders || []; + object.setMethodOverriders = function(values) { + var overriders = _.extend([], values); + if (config.isOverridenMethod('delete', overriders)) { + overriders.push("remove"); + } + config.methodOverriders = overriders; + return this; + }; + + config.jsonp = _.isUndefined(config.jsonp) ? false : config.jsonp; + object.setJsonp = function(active) { + config.jsonp = active; + }; + + config.isOverridenMethod = function(method, values) { + var search = values || config.methodOverriders; + return !_.isUndefined(_.find(search, function(one) { + return one.toLowerCase() === method.toLowerCase(); + })); + }; + + /** + * Sets the URL creator type. For now, only Path is created. In the future we'll have queryParams + **/ + config.urlCreator = config.urlCreator || "path"; + object.setUrlCreator = function(name) { + if (!_.has(config.urlCreatorFactory, name)) { + throw new Error("URL Path selected isn't valid"); + } + + config.urlCreator = name; + return this; + }; + + /** + * You can set the restangular fields here. The 3 required fields for Restangular are: + * + * id: Id of the element + * route: name of the route of this element + * parentResource: the reference to the parent resource + * + * All of this fields except for id, are handled (and created) by Restangular. By default, + * the field values will be id, route and parentResource respectively + */ + config.restangularFields = config.restangularFields || { + id: "id", + route: "route", + parentResource: "parentResource", + restangularCollection: "restangularCollection", + cannonicalId: "__cannonicalId", + etag: "restangularEtag", + selfLink: "href", + get: "get", + getList: "getList", + put: "put", + post: "post", + remove: "remove", + head: "head", + trace: "trace", + options: "options", + patch: "patch", + getRestangularUrl: "getRestangularUrl", + getRequestedUrl: "getRequestedUrl", + putElement: "putElement", + addRestangularMethod: "addRestangularMethod", + getParentList: "getParentList", + clone: "clone", + ids: "ids", + httpConfig: '_$httpConfig', + reqParams: 'reqParams', + one: 'one', + all: 'all', + several: 'several', + oneUrl: 'oneUrl', + allUrl: 'allUrl', + customPUT: 'customPUT', + customPOST: 'customPOST', + customDELETE: 'customDELETE', + customGET: 'customGET', + customGETLIST: 'customGETLIST', + customOperation: 'customOperation', + doPUT: 'doPUT', + doPOST: 'doPOST', + doDELETE: 'doDELETE', + doGET: 'doGET', + doGETLIST: 'doGETLIST', + fromServer: 'fromServer', + withConfig: 'withConfig', + withHttpConfig: 'withHttpConfig', + singleOne: 'singleOne', + plain: 'plain', + save: 'save' + }; + object.setRestangularFields = function(resFields) { + config.restangularFields = + _.extend(config.restangularFields, resFields); + return this; + }; + + config.isRestangularized = function(obj) { + return !!obj[config.restangularFields.one] || !!obj[config.restangularFields.all]; + }; + + config.setFieldToElem = function(field, elem, value) { + var properties = field.split('.'); + var idValue = elem; + _.each(_.initial(properties), function(prop) { + idValue[prop] = {}; + idValue = idValue[prop]; + }); + idValue[_.last(properties)] = value; + return this; + }; + + config.getFieldFromElem = function(field, elem) { + var properties = field.split('.'); + var idValue = elem; + _.each(properties, function(prop) { + if (idValue) { + idValue = idValue[prop]; + } + }); + return angular.copy(idValue); + }; + + config.setIdToElem = function(elem, id) { + config.setFieldToElem(config.restangularFields.id, elem, id); + return this; + }; + + config.getIdFromElem = function(elem) { + return config.getFieldFromElem(config.restangularFields.id, elem); + }; + + config.isValidId = function(elemId) { + return "" !== elemId && !_.isUndefined(elemId) && !_.isNull(elemId); + }; + + config.setUrlToElem = function(elem, url, route) { + config.setFieldToElem(config.restangularFields.selfLink, elem, url); + return this; + }; + + config.getUrlFromElem = function(elem) { + return config.getFieldFromElem(config.restangularFields.selfLink, elem); + }; + + config.useCannonicalId = _.isUndefined(config.useCannonicalId) ? false : config.useCannonicalId; + object.setUseCannonicalId = function(value) { + config.useCannonicalId = value; + return this; + }; + + config.getCannonicalIdFromElem = function(elem) { + var cannonicalId = elem[config.restangularFields.cannonicalId]; + var actualId = config.isValidId(cannonicalId) ? + cannonicalId : config.getIdFromElem(elem); + return actualId; + }; + + /** + * Sets the Response parser. This is used in case your response isn't directly the data. + * For example if you have a response like {meta: {'meta'}, data: {name: 'Gonto'}} + * you can extract this data which is the one that needs wrapping + * + * The ResponseExtractor is a function that receives the response and the method executed. + */ + + config.responseInterceptors = config.responseInterceptors || []; + + config.defaultResponseInterceptor = function(data, operation, + what, url, response, deferred) { + return data; + }; + + config.responseExtractor = function(data, operation, + what, url, response, deferred) { + var interceptors = angular.copy(config.responseInterceptors); + interceptors.push(config.defaultResponseInterceptor); + var theData = data; + _.each(interceptors, function(interceptor) { + theData = interceptor(theData, operation, + what, url, response, deferred); + }); + return theData; + }; + + object.addResponseInterceptor = function(extractor) { + config.responseInterceptors.push(extractor); + return this; + }; + + object.setResponseInterceptor = object.addResponseInterceptor; + object.setResponseExtractor = object.addResponseInterceptor; + + /** + * Response interceptor is called just before resolving promises. + */ + + + /** + * Request interceptor is called before sending an object to the server. + */ + config.requestInterceptors = config.requestInterceptors || []; + + config.defaultInterceptor = function(element, operation, + path, url, headers, params, httpConfig) { + return { + element: element, + headers: headers, + params: params, + httpConfig: httpConfig + }; + }; + + config.fullRequestInterceptor = function(element, operation, + path, url, headers, params, httpConfig) { + var interceptors = angular.copy(config.requestInterceptors); + var defaultRequest = config.defaultInterceptor(element, operation, path, url, headers, params, httpConfig); + return _.reduce(interceptors, function(request, interceptor) { + return _.extend(request, interceptor(request.element, operation, + path, url, request.headers, request.params, request.httpConfig)); + }, defaultRequest); + }; + + object.addRequestInterceptor = function(interceptor) { + config.requestInterceptors.push(function(elem, operation, path, url, headers, params, httpConfig) { + return { + headers: headers, + params: params, + element: interceptor(elem, operation, path, url), + httpConfig: httpConfig + }; + }); + return this; + }; + + object.setRequestInterceptor = object.addRequestInterceptor; + + object.addFullRequestInterceptor = function(interceptor) { + config.requestInterceptors.push(interceptor); + return this; + }; + + object.setFullRequestInterceptor = object.addFullRequestInterceptor; + + config.errorInterceptor = config.errorInterceptor || function() {}; + + object.setErrorInterceptor = function(interceptor) { + config.errorInterceptor = interceptor; + return this; + }; + + config.onBeforeElemRestangularized = config.onBeforeElemRestangularized || function(elem) { + return elem; + }; + object.setOnBeforeElemRestangularized = function(post) { + config.onBeforeElemRestangularized = post; + return this; + }; + + /** + * This method is called after an element has been "Restangularized". + * + * It receives the element, a boolean indicating if it's an element or a collection + * and the name of the model + * + */ + config.onElemRestangularized = config.onElemRestangularized || function(elem) { + return elem; + }; + object.setOnElemRestangularized = function(post) { + config.onElemRestangularized = post; + return this; + }; + + config.shouldSaveParent = config.shouldSaveParent || function() { + return true; + }; + object.setParentless = function(values) { + if (_.isArray(values)) { + config.shouldSaveParent = function(route) { + return !_.contains(values, route); + }; + } else if (_.isBoolean(values)) { + config.shouldSaveParent = function() { + return !values; + }; + } + return this; + }; + + /** + * This lets you set a suffix to every request. + * + * For example, if your api requires that for JSon requests you do /users/123.json, you can set that + * in here. + * + * + * By default, the suffix is null + */ + config.suffix = _.isUndefined(config.suffix) ? null : config.suffix; + object.setRequestSuffix = function(newSuffix) { + config.suffix = newSuffix; + return this; + }; + + /** + * Add element transformers for certain routes. + */ + config.transformers = config.transformers || {}; + object.addElementTransformer = function(type, secondArg, thirdArg) { + var isCollection = null; + var transformer = null; + if (arguments.length === 2) { + transformer = secondArg; + } else { + transformer = thirdArg; + isCollection = secondArg; + } + + var typeTransformers = config.transformers[type]; + if (!typeTransformers) { + typeTransformers = config.transformers[type] = []; + } + + typeTransformers.push(function(coll, elem) { + if (_.isNull(isCollection) || (coll == isCollection)) { + return transformer(elem); + } + return elem; + }); + + return object; + }; + + object.extendCollection = function(route, fn) { + return object.addElementTransformer(route, true, fn); + }; + + object.extendModel = function(route, fn) { + return object.addElementTransformer(route, false, fn); + }; + + config.transformElem = function(elem, isCollection, route, Restangular, force) { + if (!force && !config.transformLocalElements && !elem[config.restangularFields.fromServer]) { + return elem; + } + var typeTransformers = config.transformers[route]; + var changedElem = elem; + if (typeTransformers) { + _.each(typeTransformers, function(transformer) { + changedElem = transformer(isCollection, changedElem); + }); + } + return config.onElemRestangularized(changedElem, + isCollection, route, Restangular); + }; + + config.transformLocalElements = _.isUndefined(config.transformLocalElements) ? false : config.transformLocalElements; + object.setTransformOnlyServerElements = function(active) { + config.transformLocalElements = !active; + } + + config.fullResponse = _.isUndefined(config.fullResponse) ? false : config.fullResponse; + object.setFullResponse = function(full) { + config.fullResponse = full; + return this; + }; + + + + + + //Internal values and functions + config.urlCreatorFactory = {}; + + /** + * Base URL Creator. Base prototype for everything related to it + **/ + + var BaseCreator = function() {}; + + BaseCreator.prototype.setConfig = function(config) { + this.config = config; + return this; + }; + + BaseCreator.prototype.parentsArray = function(current) { + var parents = []; + while (current) { + parents.push(current); + current = current[this.config.restangularFields.parentResource]; + } + return parents.reverse(); + }; + + function RestangularResource(config, $http, url, configurer) { + var resource = {}; + _.each(_.keys(configurer), function(key) { + var value = configurer[key]; + + // Add default parameters + value.params = _.extend({}, value.params, + config.defaultRequestParams[value.method.toLowerCase()]); + // We don't want the ? if no params are there + if (_.isEmpty(value.params)) { + delete value.params; + } + + if (config.isSafe(value.method)) { + + resource[key] = function() { + return $http(_.extend(value, { + url: url + })); + }; + + } else { + + resource[key] = function(data) { + return $http(_.extend(value, { + url: url, + data: data + })); + }; + + } + }); + + return resource; + } + + BaseCreator.prototype.resource = function(current, $http, localHttpConfig, callHeaders, callParams, what, etag, operation) { + + var params = _.defaults(callParams || {}, this.config.defaultRequestParams.common); + var headers = _.defaults(callHeaders || {}, this.config.defaultHeaders); + + if (etag) { + if (!config.isSafe(operation)) { + headers['If-Match'] = etag; + } else { + headers['If-None-Match'] = etag; + } + } + + var url = this.base(current); + + if (what) { + var add = ''; + if (!/\/$/.test(url)) { + add += '/'; + } + add += what; + url += add; + } + + if (this.config.suffix && url.indexOf(this.config.suffix, url.length - this.config.suffix.length) === -1 && !this.config.getUrlFromElem(current)) { + url += this.config.suffix; + } + + current[this.config.restangularFields.httpConfig] = undefined; + + + return RestangularResource(this.config, $http, url, { + getList: this.config.withHttpValues(localHttpConfig, { + method: 'GET', + params: params, + headers: headers + }), + + get: this.config.withHttpValues(localHttpConfig, { + method: 'GET', + params: params, + headers: headers + }), + + jsonp: this.config.withHttpValues(localHttpConfig, { + method: 'jsonp', + params: params, + headers: headers + }), + + put: this.config.withHttpValues(localHttpConfig, { + method: 'PUT', + params: params, + headers: headers + }), + + post: this.config.withHttpValues(localHttpConfig, { + method: 'POST', + params: params, + headers: headers + }), + + remove: this.config.withHttpValues(localHttpConfig, { + method: 'DELETE', + params: params, + headers: headers + }), + + head: this.config.withHttpValues(localHttpConfig, { + method: 'HEAD', + params: params, + headers: headers + }), + + trace: this.config.withHttpValues(localHttpConfig, { + method: 'TRACE', + params: params, + headers: headers + }), + + options: this.config.withHttpValues(localHttpConfig, { + method: 'OPTIONS', + params: params, + headers: headers + }), + + patch: this.config.withHttpValues(localHttpConfig, { + method: 'PATCH', + params: params, + headers: headers + }) + }); + }; + + /** + * This is the Path URL creator. It uses Path to show Hierarchy in the Rest API. + * This means that if you have an Account that then has a set of Buildings, a URL to a building + * would be /accounts/123/buildings/456 + **/ + var Path = function() {}; + + Path.prototype = new BaseCreator(); + + Path.prototype.base = function(current) { + var __this = this; + return _.reduce(this.parentsArray(current), function(acum, elem) { + var elemUrl; + var elemSelfLink = __this.config.getUrlFromElem(elem); + if (elemSelfLink) { + if (__this.config.isAbsoluteUrl(elemSelfLink)) { + return elemSelfLink; + } else { + elemUrl = elemSelfLink; + } + } else { + elemUrl = elem[__this.config.restangularFields.route]; + + if (elem[__this.config.restangularFields.restangularCollection]) { + var ids = elem[__this.config.restangularFields.ids]; + if (ids) { + elemUrl += "/" + ids.join(","); + } + } else { + var elemId; + if (__this.config.useCannonicalId) { + elemId = __this.config.getCannonicalIdFromElem(elem); + } else { + elemId = __this.config.getIdFromElem(elem); + } + + if (config.isValidId(elemId) && !elem.singleOne) { + elemUrl += "/" + (__this.config.encodeIds ? encodeURIComponent(elemId) : elemId); + } + } + } + + return acum.replace(/\/$/, "") + "/" + elemUrl; + + }, this.config.baseUrl); + }; + + + + Path.prototype.fetchUrl = function(current, what) { + var baseUrl = this.base(current); + if (what) { + baseUrl += "/" + what; + } + return baseUrl; + }; + + Path.prototype.fetchRequestedUrl = function(current, what) { + var url = this.fetchUrl(current, what); + var params = current[config.restangularFields.reqParams]; + + // From here on and until the end of fetchRequestedUrl, + // the code has been kindly borrowed from angular.js + // The reason for such code bloating is coherence: + // If the user were to use this for cache management, the + // serialization of parameters would need to be identical + // to the one done by angular for cache keys to match. + function sortedKeys(obj) { + var keys = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + keys.push(key); + } + } + return keys.sort(); + } + + function forEachSorted(obj, iterator, context) { + var keys = sortedKeys(obj); + for (var i = 0; i < keys.length; i++) { + iterator.call(context, obj[keys[i]], keys[i]); + } + return keys; + } + + function encodeUriQuery(val, pctEncodeSpaces) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); + } + + if (!params) return url; + var parts = []; + forEachSorted(params, function(value, key) { + if (value == null || value == undefined) return; + if (!angular.isArray(value)) value = [value]; + + angular.forEach(value, function(v) { + if (angular.isObject(v)) { + v = angular.toJson(v); + } + parts.push(encodeUriQuery(key) + '=' + + encodeUriQuery(v)); + }); + }); + return url + (this.config.suffix || '') + ((url.indexOf('?') === -1) ? '?' : '&') + parts.join('&'); + }; + + + + config.urlCreatorFactory.path = Path; + + }; + + var globalConfiguration = {}; + + Configurer.init(this, globalConfiguration); + + + + + this.$get = ['$http', '$q', + function($http, $q) { + + function createServiceForConfiguration(config) { + var service = {}; + + var urlHandler = new config.urlCreatorFactory[config.urlCreator](); + urlHandler.setConfig(config); + + function restangularizeBase(parent, elem, route, reqParams, fromServer) { + elem[config.restangularFields.route] = route; + elem[config.restangularFields.getRestangularUrl] = _.bind(urlHandler.fetchUrl, urlHandler, elem); + elem[config.restangularFields.getRequestedUrl] = _.bind(urlHandler.fetchRequestedUrl, urlHandler, elem); + elem[config.restangularFields.addRestangularMethod] = _.bind(addRestangularMethodFunction, elem); + elem[config.restangularFields.clone] = _.bind(copyRestangularizedElement, elem, elem); + elem[config.restangularFields.reqParams] = _.isEmpty(reqParams) ? null : reqParams; + elem[config.restangularFields.withHttpConfig] = _.bind(withHttpConfig, elem); + elem[config.restangularFields.plain] = _.bind(stripRestangular, elem, elem); + + // RequestLess connection + elem[config.restangularFields.one] = _.bind(one, elem, elem); + elem[config.restangularFields.all] = _.bind(all, elem, elem); + elem[config.restangularFields.several] = _.bind(several, elem, elem); + elem[config.restangularFields.oneUrl] = _.bind(oneUrl, elem, elem); + elem[config.restangularFields.allUrl] = _.bind(allUrl, elem, elem); + + elem[config.restangularFields.fromServer] = !!fromServer; + + if (parent && config.shouldSaveParent(route)) { + var parentId = config.getIdFromElem(parent); + var parentUrl = config.getUrlFromElem(parent); + + var restangularFieldsForParent = _.union( + _.values(_.pick(config.restangularFields, ['route', 'singleOne', 'parentResource'])), + config.extraFields + ); + var parentResource = _.pick(parent, restangularFieldsForParent); + + if (config.isValidId(parentId)) { + config.setIdToElem(parentResource, parentId); + } + if (config.isValidId(parentUrl)) { + config.setUrlToElem(parentResource, parentUrl); + } + + elem[config.restangularFields.parentResource] = parentResource; + } else { + elem[config.restangularFields.parentResource] = null; + } + return elem; + } + + + + function one(parent, route, id, singleOne) { + if (_.isNumber(route) || _.isNumber(parent)) { + var error = "You're creating a Restangular entity with the number " + error += "instead of the route or the parent. You can't call .one(12)"; + throw new Error(error); + } + var elem = {}; + config.setIdToElem(elem, id); + config.setFieldToElem(config.restangularFields.singleOne, elem, singleOne); + return restangularizeElem(parent, elem, route, false); + } + + + function all(parent, route) { + return restangularizeCollection(parent, [], route, false); + } + + function several(parent, route, ids) { + var collection = []; + collection[config.restangularFields.ids] = + Array.prototype.splice.call(arguments, 2); + return restangularizeCollection(parent, collection, route, false); + } + + function oneUrl(parent, route, url) { + if (!route) { + throw new Error("Route is mandatory when creating new Restangular objects."); + } + var elem = {}; + config.setUrlToElem(elem, url, route); + return restangularizeElem(parent, elem, route, false); + } + + + function allUrl(parent, route, url) { + if (!route) { + throw new Error("Route is mandatory when creating new Restangular objects."); + } + var elem = {}; + config.setUrlToElem(elem, url, route); + return restangularizeCollection(parent, elem, route, false); + } + // Promises + function restangularizePromise(promise, isCollection, valueToFill) { + promise.call = _.bind(promiseCall, promise); + promise.get = _.bind(promiseGet, promise); + promise[config.restangularFields.restangularCollection] = isCollection; + if (isCollection) { + promise.push = _.bind(promiseCall, promise, "push"); + } + promise.$object = valueToFill; + return promise; + } + + function promiseCall(method) { + var deferred = $q.defer(); + var callArgs = arguments; + var filledValue = {}; + this.then(function(val) { + var params = Array.prototype.slice.call(callArgs, 1); + var func = val[method]; + func.apply(val, params); + filledValue = val; + deferred.resolve(val); + }); + return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue); + } + + function promiseGet(what) { + var deferred = $q.defer(); + var filledValue = {}; + this.then(function(val) { + filledValue = val[what]; + deferred.resolve(filledValue); + }); + return restangularizePromise(deferred.promise, this[config.restangularFields.restangularCollection], filledValue); + } + + function resolvePromise(deferred, response, data, filledValue) { + + _.extend(filledValue, data); + + // Trigger the full response interceptor. + if (config.fullResponse) { + return deferred.resolve(_.extend(response, { + data: data + })); + } else { + deferred.resolve(data); + } + } + + + // Elements + + function stripRestangular(elem) { + if (_.isArray(elem)) { + var array = []; + _.each(elem, function(value) { + array.push(stripRestangular(value)); + }); + return array; + } else { + return _.omit(elem, _.values(_.omit(config.restangularFields, 'id'))); + } + + + } + + function addCustomOperation(elem) { + elem[config.restangularFields.customOperation] = _.bind(customFunction, elem); + _.each(["put", "post", "get", "delete"], function(oper) { + _.each(["do", "custom"], function(alias) { + var callOperation = oper === 'delete' ? 'remove' : oper; + var name = alias + oper.toUpperCase(); + var callFunction; + + if (callOperation !== 'put' && callOperation !== 'post') { + callFunction = customFunction; + } else { + callFunction = function(operation, elem, path, params, headers) { + return _.bind(customFunction, this)(operation, path, params, headers, elem); + }; + } + elem[name] = _.bind(callFunction, elem, callOperation); + }); + }); + elem[config.restangularFields.customGETLIST] = _.bind(fetchFunction, elem); + elem[config.restangularFields.doGETLIST] = elem[config.restangularFields.customGETLIST]; + } + + function copyRestangularizedElement(fromElement, toElement) { + var copiedElement = angular.copy(fromElement, toElement); + return restangularizeElem(copiedElement[config.restangularFields.parentResource], + copiedElement, copiedElement[config.restangularFields.route], true); + } + + function restangularizeElem(parent, element, route, fromServer, collection, reqParams) { + var elem = config.onBeforeElemRestangularized(element, false, route); + + var localElem = restangularizeBase(parent, elem, route, reqParams, fromServer); + + if (config.useCannonicalId) { + localElem[config.restangularFields.cannonicalId] = config.getIdFromElem(localElem); + } + + if (collection) { + localElem[config.restangularFields.getParentList] = function() { + return collection; + }; + } + + localElem[config.restangularFields.restangularCollection] = false; + localElem[config.restangularFields.get] = _.bind(getFunction, localElem); + localElem[config.restangularFields.getList] = _.bind(fetchFunction, localElem); + localElem[config.restangularFields.put] = _.bind(putFunction, localElem); + localElem[config.restangularFields.post] = _.bind(postFunction, localElem); + localElem[config.restangularFields.remove] = _.bind(deleteFunction, localElem); + localElem[config.restangularFields.head] = _.bind(headFunction, localElem); + localElem[config.restangularFields.trace] = _.bind(traceFunction, localElem); + localElem[config.restangularFields.options] = _.bind(optionsFunction, localElem); + localElem[config.restangularFields.patch] = _.bind(patchFunction, localElem); + localElem[config.restangularFields.save] = _.bind(save, localElem); + + addCustomOperation(localElem); + return config.transformElem(localElem, false, route, service, true); + } + + function restangularizeCollection(parent, element, route, fromServer, reqParams) { + var elem = config.onBeforeElemRestangularized(element, true, route); + + var localElem = restangularizeBase(parent, elem, route, reqParams, fromServer); + localElem[config.restangularFields.restangularCollection] = true; + localElem[config.restangularFields.post] = _.bind(postFunction, localElem, null); + localElem[config.restangularFields.remove] = _.bind(deleteFunction, localElem); + localElem[config.restangularFields.head] = _.bind(headFunction, localElem); + localElem[config.restangularFields.trace] = _.bind(traceFunction, localElem); + localElem[config.restangularFields.putElement] = _.bind(putElementFunction, localElem); + localElem[config.restangularFields.options] = _.bind(optionsFunction, localElem); + localElem[config.restangularFields.patch] = _.bind(patchFunction, localElem); + localElem[config.restangularFields.get] = _.bind(getById, localElem); + localElem[config.restangularFields.getList] = _.bind(fetchFunction, localElem, null); + + addCustomOperation(localElem); + return config.transformElem(localElem, true, route, service, true); + } + + function restangularizeCollectionAndElements(parent, element, route) { + var collection = restangularizeCollection(parent, element, route, false); + _.each(collection, function(elem) { + restangularizeElem(parent, elem, route, false); + }); + return collection; + } + + function getById(id, reqParams, headers) { + return this.customGET(id.toString(), reqParams, headers); + } + + function putElementFunction(idx, params, headers) { + var __this = this; + var elemToPut = this[idx]; + var deferred = $q.defer(); + var filledArray = []; + filledArray = config.transformElem(filledArray, true, elemToPut[config.restangularFields.route], service) + elemToPut.put(params, headers).then(function(serverElem) { + var newArray = copyRestangularizedElement(__this); + newArray[idx] = serverElem; + filledArray = newArray; + deferred.resolve(newArray); + }, function(response) { + deferred.reject(response); + }); + + return restangularizePromise(deferred.promise, true, filledArray); + } + + function parseResponse(resData, operation, route, fetchUrl, response, deferred) { + var data = config.responseExtractor(resData, operation, route, fetchUrl, response, deferred); + var etag = response.headers("ETag"); + if (data && etag) { + data[config.restangularFields.etag] = etag; + } + return data; + } + + + function fetchFunction(what, reqParams, headers) { + var __this = this; + var deferred = $q.defer(); + var operation = 'getList'; + var url = urlHandler.fetchUrl(this, what); + var whatFetched = what || __this[config.restangularFields.route]; + + var request = config.fullRequestInterceptor(null, operation, + whatFetched, url, headers || {}, reqParams || {}, this[config.restangularFields.httpConfig] || {}); + + var filledArray = []; + filledArray = config.transformElem(filledArray, true, whatFetched, service) + + var method = "getList"; + + if (config.jsonp) { + method = "jsonp"; + } + + urlHandler.resource(this, $http, request.httpConfig, request.headers, request.params, what, + this[config.restangularFields.etag], operation)[method]().then(function(response) { + var resData = response.data; + var fullParams = response.config.params; + var data = parseResponse(resData, operation, whatFetched, url, response, deferred); + + // support empty response for getList() calls (some APIs respond with 204 and empty body) + if (_.isUndefined(data) || "" === data) { + data = [] + } + if (!_.isArray(data)) { + throw new Error("Response for getList SHOULD be an array and not an object or something else"); + } + var processedData = _.map(data, function(elem) { + if (!__this[config.restangularFields.restangularCollection]) { + return restangularizeElem(__this, elem, what, true, data); + } else { + return restangularizeElem(__this[config.restangularFields.parentResource], + elem, __this[config.restangularFields.route], true, data); + } + + }); + + processedData = _.extend(data, processedData); + + if (!__this[config.restangularFields.restangularCollection]) { + resolvePromise(deferred, response, restangularizeCollection(__this, processedData, what, true, fullParams), filledArray); + } else { + resolvePromise(deferred, response, restangularizeCollection(__this[config.restangularFields.parentResource], processedData, __this[config.restangularFields.route], true, fullParams), filledArray); + } + }, function error(response) { + if (response.status === 304 && __this[config.restangularFields.restangularCollection]) { + resolvePromise(deferred, response, __this, filledArray); + } else if (config.errorInterceptor(response, deferred) !== false) { + deferred.reject(response); + } + }); + + return restangularizePromise(deferred.promise, true, filledArray); + } + + function withHttpConfig(httpConfig) { + this[config.restangularFields.httpConfig] = httpConfig; + return this; + } + + function save(params, headers) { + if (this[config.restangularFields.fromServer]) { + return this[config.restangularFields.put](params, headers); + } else { + return _.bind(elemFunction, this)("post", undefined, params, undefined, headers); + } + } + + function elemFunction(operation, what, params, obj, headers) { + var __this = this; + var deferred = $q.defer(); + var resParams = params || {}; + var route = what || this[config.restangularFields.route]; + var fetchUrl = urlHandler.fetchUrl(this, what); + + var callObj = obj || this; + // fallback to etag on restangular object (since for custom methods we probably don't explicitly specify the etag field) + var etag = callObj[config.restangularFields.etag] || (operation != "post" ? this[config.restangularFields.etag] : null); + + if (_.isObject(callObj) && config.isRestangularized(callObj)) { + callObj = stripRestangular(callObj); + } + var request = config.fullRequestInterceptor(callObj, operation, route, fetchUrl, + headers || {}, resParams || {}, this[config.restangularFields.httpConfig] || {}); + + var filledObject = {}; + filledObject = config.transformElem(filledObject, false, route, service); + + var okCallback = function(response) { + var resData = response.data; + var fullParams = response.config.params; + var elem = parseResponse(resData, operation, route, fetchUrl, response, deferred); + if (elem) { + + if (operation === "post" && !__this[config.restangularFields.restangularCollection]) { + resolvePromise(deferred, response, restangularizeElem(__this, elem, what, true, null, fullParams), filledObject); + } else { + var data = restangularizeElem(__this[config.restangularFields.parentResource], elem, __this[config.restangularFields.route], true, null, fullParams) + data[config.restangularFields.singleOne] = __this[config.restangularFields.singleOne] + resolvePromise(deferred, response, data, filledObject); + } + + } else { + resolvePromise(deferred, response, undefined, filledObject); + } + }; + + var errorCallback = function(response) { + if (response.status === 304 && config.isSafe(operation)) { + resolvePromise(deferred, response, __this, filledObject); + } else if (config.errorInterceptor(response, deferred) !== false) { + deferred.reject(response); + } + }; + // Overring HTTP Method + var callOperation = operation; + var callHeaders = _.extend({}, request.headers); + var isOverrideOperation = config.isOverridenMethod(operation); + if (isOverrideOperation) { + callOperation = 'post'; + callHeaders = _.extend(callHeaders, { + 'X-HTTP-Method-Override': operation === 'remove' ? 'DELETE' : operation + }); + } else if (config.jsonp && callOperation === 'get') { + callOperation = 'jsonp'; + } + + if (config.isSafe(operation)) { + if (isOverrideOperation) { + urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, + what, etag, callOperation)[callOperation]({}).then(okCallback, errorCallback); + } else { + urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, + what, etag, callOperation)[callOperation]().then(okCallback, errorCallback); + } + } else { + urlHandler.resource(this, $http, request.httpConfig, callHeaders, request.params, + what, etag, callOperation)[callOperation](request.element).then(okCallback, errorCallback); + } + + return restangularizePromise(deferred.promise, false, filledObject); + } + + function getFunction(params, headers) { + return _.bind(elemFunction, this)("get", undefined, params, undefined, headers); + } + + function deleteFunction(params, headers) { + return _.bind(elemFunction, this)("remove", undefined, params, undefined, headers); + } + + function putFunction(params, headers) { + return _.bind(elemFunction, this)("put", undefined, params, undefined, headers); + } + + function postFunction(what, elem, params, headers) { + return _.bind(elemFunction, this)("post", what, params, elem, headers); + } + + function headFunction(params, headers) { + return _.bind(elemFunction, this)("head", undefined, params, undefined, headers); + } + + function traceFunction(params, headers) { + return _.bind(elemFunction, this)("trace", undefined, params, undefined, headers); + } + + function optionsFunction(params, headers) { + return _.bind(elemFunction, this)("options", undefined, params, undefined, headers); + } + + function patchFunction(elem, params, headers) { + return _.bind(elemFunction, this)("patch", undefined, params, elem, headers); + } + + function customFunction(operation, path, params, headers, elem) { + return _.bind(elemFunction, this)(operation, path, params, elem, headers); + } + + function addRestangularMethodFunction(name, operation, path, defaultParams, defaultHeaders, defaultElem) { + var bindedFunction; + if (operation === 'getList') { + bindedFunction = _.bind(fetchFunction, this, path); + } else { + bindedFunction = _.bind(customFunction, this, operation, path); + } + + var createdFunction = function(params, headers, elem) { + var callParams = _.defaults({ + params: params, + headers: headers, + elem: elem + }, { + params: defaultParams, + headers: defaultHeaders, + elem: defaultElem + }); + return bindedFunction(callParams.params, callParams.headers, callParams.elem); + }; + + if (config.isSafe(operation)) { + this[name] = createdFunction; + } else { + this[name] = function(elem, params, headers) { + return createdFunction(params, headers, elem); + }; + } + + } + + function withConfigurationFunction(configurer) { + var newConfig = angular.copy(_.omit(config, 'configuration')); + Configurer.init(newConfig, newConfig); + configurer(newConfig); + return createServiceForConfiguration(newConfig); + } + + function toService(route, parent) { + var serv = {}; + var collection = (parent || service).all(route); + serv.one = _.bind(one, (parent || service), parent, route); + serv.post = _.bind(collection.post, collection); + serv.getList = _.bind(collection.getList, collection); + return serv; + } - Configurer.init(service, config); + Configurer.init(service, config); - service.copy = _.bind(copyRestangularizedElement, service); + service.copy = _.bind(copyRestangularizedElement, service); - service.service = _.bind(toService, service); + service.service = _.bind(toService, service); - service.withConfig = _.bind(withConfigurationFunction, service); + service.withConfig = _.bind(withConfigurationFunction, service); - service.one = _.bind(one, service, null); + service.one = _.bind(one, service, null); - service.all = _.bind(all, service, null); + service.all = _.bind(all, service, null); - service.several = _.bind(several, service, null); + service.several = _.bind(several, service, null); - service.oneUrl = _.bind(oneUrl, service, null); + service.oneUrl = _.bind(oneUrl, service, null); - service.allUrl = _.bind(allUrl, service, null); + service.allUrl = _.bind(allUrl, service, null); - service.stripRestangular = _.bind(stripRestangular, service); + service.stripRestangular = _.bind(stripRestangular, service); - service.restangularizeElement = _.bind(restangularizeElem, service); + service.restangularizeElement = _.bind(restangularizeElem, service); - service.restangularizeCollection = _.bind(restangularizeCollectionAndElements, service); + service.restangularizeCollection = _.bind(restangularizeCollectionAndElements, service); - return service; - } + return service; + } - return createServiceForConfiguration(globalConfiguration); + return createServiceForConfiguration(globalConfiguration); - }]; - } -); + } + ]; + }); })(); \ No newline at end of file diff --git a/lib/stringview.js b/lib/stringview.js new file mode 100644 index 0000000..7b17bc1 --- /dev/null +++ b/lib/stringview.js @@ -0,0 +1,671 @@ +"use strict"; + +/*\ +|*| +|*| :: Number.isInteger() polyfill :: +|*| +|*| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger +|*| +\*/ + +if (!Number.isInteger) { + Number.isInteger = function isInteger(nVal) { + return typeof nVal === "number" && isFinite(nVal) && nVal > -9007199254740992 && nVal < 9007199254740992 && Math.floor(nVal) === nVal; + }; +} + +/*\ +|*| +|*| StringView - Mozilla Developer Network - revision #6 +|*| +|*| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays/StringView +|*| https://developer.mozilla.org/User:fusionchess +|*| +|*| This framework is released under the GNU Public License, version 3 or later. +|*| http://www.gnu.org/licenses/gpl-3.0-standalone.html +|*| +\*/ + +function StringView(vInput, sEncoding /* optional (default: UTF-8) */ , nOffset /* optional */ , nLength /* optional */ ) { + + var fTAView, aWhole, aRaw, fPutOutptCode, fGetOutptChrSize, nInptLen, nStartIdx = isFinite(nOffset) ? nOffset : 0, + nTranscrType = 15; + + if (sEncoding) { + this.encoding = sEncoding.toString(); + } + + encSwitch: switch (this.encoding) { + case "UTF-8": + fPutOutptCode = StringView.putUTF8CharCode; + fGetOutptChrSize = StringView.getUTF8CharLength; + fTAView = Uint8Array; + break encSwitch; + case "UTF-16": + fPutOutptCode = StringView.putUTF16CharCode; + fGetOutptChrSize = StringView.getUTF16CharLength; + fTAView = Uint16Array; + break encSwitch; + case "UTF-32": + fTAView = Uint32Array; + nTranscrType &= 14; + break encSwitch; + default: + /* case "ASCII", or case "BinaryString" or unknown cases */ + fTAView = Uint8Array; + nTranscrType &= 14; + } + + typeSwitch: switch (typeof vInput) { + case "string": + /* the input argument is a primitive string: a new buffer will be created. */ + nTranscrType &= 7; + break typeSwitch; + case "object": + classSwitch: switch (vInput.constructor) { + case StringView: + /* the input argument is a stringView: a new buffer will be created. */ + nTranscrType &= 3; + break typeSwitch; + case String: + /* the input argument is an objectified string: a new buffer will be created. */ + nTranscrType &= 7; + break typeSwitch; + case ArrayBuffer: + /* the input argument is an arrayBuffer: the buffer will be shared. */ + aWhole = new fTAView(vInput); + nInptLen = this.encoding === "UTF-32" ? + vInput.byteLength >>> 2 : this.encoding === "UTF-16" ? + vInput.byteLength >>> 1 : + vInput.byteLength; + aRaw = nStartIdx === 0 && (!isFinite(nLength) || nLength === nInptLen) ? + aWhole : new fTAView(vInput, nStartIdx, !isFinite(nLength) ? nInptLen - nStartIdx : nLength); + + break typeSwitch; + case Uint32Array: + case Uint16Array: + case Uint8Array: + /* the input argument is a typedArray: the buffer, and possibly the array itself, will be shared. */ + fTAView = vInput.constructor; + nInptLen = vInput.length; + aWhole = vInput.byteOffset === 0 && vInput.length === ( + fTAView === Uint32Array ? + vInput.buffer.byteLength >>> 2 : fTAView === Uint16Array ? + vInput.buffer.byteLength >>> 1 : + vInput.buffer.byteLength + ) ? vInput : new fTAView(vInput.buffer); + aRaw = nStartIdx === 0 && (!isFinite(nLength) || nLength === nInptLen) ? + vInput : vInput.subarray(nStartIdx, isFinite(nLength) ? nStartIdx + nLength : nInptLen); + + break typeSwitch; + default: + /* the input argument is an array or another serializable object: a new typedArray will be created. */ + aWhole = new fTAView(vInput); + nInptLen = aWhole.length; + aRaw = nStartIdx === 0 && (!isFinite(nLength) || nLength === nInptLen) ? + aWhole : aWhole.subarray(nStartIdx, isFinite(nLength) ? nStartIdx + nLength : nInptLen); + } + break typeSwitch; + default: + /* the input argument is a number, a boolean or a function: a new typedArray will be created. */ + aWhole = aRaw = new fTAView(Number(vInput) || 0); + + } + + if (nTranscrType < 8) { + + var vSource, nOutptLen, nCharStart, nCharEnd, nEndIdx, fGetInptChrSize, fGetInptChrCode; + + if (nTranscrType & 4) { /* input is string */ + + vSource = vInput; + nOutptLen = nInptLen = vSource.length; + nTranscrType ^= this.encoding === "UTF-32" ? 0 : 2; + /* ...or...: nTranscrType ^= Number(this.encoding !== "UTF-32") << 1; */ + nStartIdx = nCharStart = nOffset ? Math.max((nOutptLen + nOffset) % nOutptLen, 0) : 0; + nEndIdx = nCharEnd = (Number.isInteger(nLength) ? Math.min(Math.max(nLength, 0) + nStartIdx, nOutptLen) : nOutptLen) - 1; + + } else { /* input is stringView */ + + vSource = vInput.rawData; + nInptLen = vInput.makeIndex(); + nStartIdx = nCharStart = nOffset ? Math.max((nInptLen + nOffset) % nInptLen, 0) : 0; + nOutptLen = Number.isInteger(nLength) ? Math.min(Math.max(nLength, 0), nInptLen - nCharStart) : nInptLen; + nEndIdx = nCharEnd = nOutptLen + nCharStart; + + if (vInput.encoding === "UTF-8") { + fGetInptChrSize = StringView.getUTF8CharLength; + fGetInptChrCode = StringView.loadUTF8CharCode; + } else if (vInput.encoding === "UTF-16") { + fGetInptChrSize = StringView.getUTF16CharLength; + fGetInptChrCode = StringView.loadUTF16CharCode; + } else { + nTranscrType &= 1; + } + + } + + if (nOutptLen === 0 || nTranscrType < 4 && vSource.encoding === this.encoding && nCharStart === 0 && nOutptLen === nInptLen) { + + /* the encoding is the same, the length too and the offset is 0... or the input is empty! */ + + nTranscrType = 7; + + } + + conversionSwitch: switch (nTranscrType) { + + case 0: + + /* both the source and the new StringView have a fixed-length encoding... */ + + aWhole = new fTAView(nOutptLen); + for (var nOutptIdx = 0; nOutptIdx < nOutptLen; aWhole[nOutptIdx] = vSource[nStartIdx + nOutptIdx++]); + break conversionSwitch; + + case 1: + + /* the source has a fixed-length encoding but the new StringView has a variable-length encoding... */ + + /* mapping... */ + + nOutptLen = 0; + + for (var nInptIdx = nStartIdx; nInptIdx < nEndIdx; nInptIdx++) { + nOutptLen += fGetOutptChrSize(vSource[nInptIdx]); + } + + aWhole = new fTAView(nOutptLen); + + /* transcription of the source... */ + + for (var nInptIdx = nStartIdx, nOutptIdx = 0; nOutptIdx < nOutptLen; nInptIdx++) { + nOutptIdx = fPutOutptCode(aWhole, vSource[nInptIdx], nOutptIdx); + } + + break conversionSwitch; + + case 2: + + /* the source has a variable-length encoding but the new StringView has a fixed-length encoding... */ + + /* mapping... */ + + nStartIdx = 0; + + var nChrCode; + + for (nChrIdx = 0; nChrIdx < nCharStart; nChrIdx++) { + nChrCode = fGetInptChrCode(vSource, nStartIdx); + nStartIdx += fGetInptChrSize(nChrCode); + } + + aWhole = new fTAView(nOutptLen); + + /* transcription of the source... */ + + for (var nInptIdx = nStartIdx, nOutptIdx = 0; nOutptIdx < nOutptLen; nInptIdx += fGetInptChrSize(nChrCode), nOutptIdx++) { + nChrCode = fGetInptChrCode(vSource, nInptIdx); + aWhole[nOutptIdx] = nChrCode; + } + + break conversionSwitch; + + case 3: + + /* both the source and the new StringView have a variable-length encoding... */ + + /* mapping... */ + + nOutptLen = 0; + + var nChrCode; + + for (var nChrIdx = 0, nInptIdx = 0; nChrIdx < nCharEnd; nInptIdx += fGetInptChrSize(nChrCode)) { + nChrCode = fGetInptChrCode(vSource, nInptIdx); + if (nChrIdx === nCharStart) { + nStartIdx = nInptIdx; + } + if (++nChrIdx > nCharStart) { + nOutptLen += fGetOutptChrSize(nChrCode); + } + } + + aWhole = new fTAView(nOutptLen); + + /* transcription... */ + + for (var nInptIdx = nStartIdx, nOutptIdx = 0; nOutptIdx < nOutptLen; nInptIdx += fGetInptChrSize(nChrCode)) { + nChrCode = fGetInptChrCode(vSource, nInptIdx); + nOutptIdx = fPutOutptCode(aWhole, nChrCode, nOutptIdx); + } + + break conversionSwitch; + + case 4: + + /* DOMString to ASCII or BinaryString or other unknown encodings */ + + aWhole = new fTAView(nOutptLen); + + /* transcription... */ + + for (var nIdx = 0; nIdx < nOutptLen; nIdx++) { + aWhole[nIdx] = vSource.charCodeAt(nIdx) & 0xff; + } + + break conversionSwitch; + + case 5: + + /* DOMString to UTF-8 or to UTF-16 */ + + /* mapping... */ + + nOutptLen = 0; + + for (var nMapIdx = 0; nMapIdx < nInptLen; nMapIdx++) { + if (nMapIdx === nCharStart) { + nStartIdx = nOutptLen; + } + nOutptLen += fGetOutptChrSize(vSource.charCodeAt(nMapIdx)); + if (nMapIdx === nCharEnd) { + nEndIdx = nOutptLen; + } + } + + aWhole = new fTAView(nOutptLen); + + /* transcription... */ + + for (var nOutptIdx = 0, nChrIdx = 0; nOutptIdx < nOutptLen; nChrIdx++) { + nOutptIdx = fPutOutptCode(aWhole, vSource.charCodeAt(nChrIdx), nOutptIdx); + } + + break conversionSwitch; + + case 6: + + /* DOMString to UTF-32 */ + + aWhole = new fTAView(nOutptLen); + + /* transcription... */ + + for (var nIdx = 0; nIdx < nOutptLen; nIdx++) { + aWhole[nIdx] = vSource.charCodeAt(nIdx); + } + + break conversionSwitch; + + case 7: + + aWhole = new fTAView(nOutptLen ? vSource : 0); + break conversionSwitch; + + } + + aRaw = nTranscrType > 3 && (nStartIdx > 0 || nEndIdx < aWhole.length - 1) ? aWhole.subarray(nStartIdx, nEndIdx) : aWhole; + + } + + this.buffer = aWhole.buffer; + this.bufferView = aWhole; + this.rawData = aRaw; + + Object.freeze(this); + +} + +/* CONSTRUCTOR'S METHODS */ + +StringView.loadUTF8CharCode = function(aChars, nIdx) { + + var nLen = aChars.length, + nPart = aChars[nIdx]; + + return nPart > 251 && nPart < 254 && nIdx + 5 < nLen ? + /* (nPart - 252 << 32) is not possible in ECMAScript! So...: */ + /* six bytes */ + (nPart - 252) * 1073741824 + (aChars[nIdx + 1] - 128 << 24) + (aChars[nIdx + 2] - 128 << 18) + (aChars[nIdx + 3] - 128 << 12) + (aChars[nIdx + 4] - 128 << 6) + aChars[nIdx + 5] - 128 : nPart > 247 && nPart < 252 && nIdx + 4 < nLen ? + /* five bytes */ + (nPart - 248 << 24) + (aChars[nIdx + 1] - 128 << 18) + (aChars[nIdx + 2] - 128 << 12) + (aChars[nIdx + 3] - 128 << 6) + aChars[nIdx + 4] - 128 : nPart > 239 && nPart < 248 && nIdx + 3 < nLen ? + /* four bytes */ + (nPart - 240 << 18) + (aChars[nIdx + 1] - 128 << 12) + (aChars[nIdx + 2] - 128 << 6) + aChars[nIdx + 3] - 128 : nPart > 223 && nPart < 240 && nIdx + 2 < nLen ? + /* three bytes */ + (nPart - 224 << 12) + (aChars[nIdx + 1] - 128 << 6) + aChars[nIdx + 2] - 128 : nPart > 191 && nPart < 224 && nIdx + 1 < nLen ? + /* two bytes */ + (nPart - 192 << 6) + aChars[nIdx + 1] - 128 : + /* one byte */ + nPart; + +}; + +StringView.putUTF8CharCode = function(aTarget, nChar, nPutAt) { + + var nIdx = nPutAt; + + if (nChar < 0x80 /* 128 */ ) { + /* one byte */ + aTarget[nIdx++] = nChar; + } else if (nChar < 0x800 /* 2048 */ ) { + /* two bytes */ + aTarget[nIdx++] = 0xc0 /* 192 */ + (nChar >>> 6); + aTarget[nIdx++] = 0x80 /* 128 */ + (nChar & 0x3f /* 63 */ ); + } else if (nChar < 0x10000 /* 65536 */ ) { + /* three bytes */ + aTarget[nIdx++] = 0xe0 /* 224 */ + (nChar >>> 12); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + (nChar & 0x3f /* 63 */ ); + } else if (nChar < 0x200000 /* 2097152 */ ) { + /* four bytes */ + aTarget[nIdx++] = 0xf0 /* 240 */ + (nChar >>> 18); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + (nChar & 0x3f /* 63 */ ); + } else if (nChar < 0x4000000 /* 67108864 */ ) { + /* five bytes */ + aTarget[nIdx++] = 0xf8 /* 248 */ + (nChar >>> 24); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 18) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + (nChar & 0x3f /* 63 */ ); + } else /* if (nChar <= 0x7fffffff) */ { /* 2147483647 */ + /* six bytes */ + aTarget[nIdx++] = 0xfc /* 252 */ + /* (nChar >>> 32) is not possible in ECMAScript! So...: */ (nChar / 1073741824); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 24) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 18) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 12) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + ((nChar >>> 6) & 0x3f /* 63 */ ); + aTarget[nIdx++] = 0x80 /* 128 */ + (nChar & 0x3f /* 63 */ ); + } + + return nIdx; + +}; + +StringView.getUTF8CharLength = function(nChar) { + return nChar < 0x80 ? 1 : nChar < 0x800 ? 2 : nChar < 0x10000 ? 3 : nChar < 0x200000 ? 4 : nChar < 0x4000000 ? 5 : 6; +}; + +StringView.loadUTF16CharCode = function(aChars, nIdx) { + + /* UTF-16 to DOMString decoding algorithm */ + var nFrstChr = aChars[nIdx]; + + return nFrstChr > 0xD7BF /* 55231 */ && nIdx + 1 < aChars.length ? + (nFrstChr - 0xD800 /* 55296 */ << 10) + aChars[nIdx + 1] + 0x2400 /* 9216 */ : nFrstChr; + +}; + +StringView.putUTF16CharCode = function(aTarget, nChar, nPutAt) { + + var nIdx = nPutAt; + + if (nChar < 0x10000 /* 65536 */ ) { + /* one element */ + aTarget[nIdx++] = nChar; + } else { + /* two elements */ + aTarget[nIdx++] = 0xD7C0 /* 55232 */ + (nChar >>> 10); + aTarget[nIdx++] = 0xDC00 /* 56320 */ + (nChar & 0x3FF /* 1023 */ ); + } + + return nIdx; + +}; + +StringView.getUTF16CharLength = function(nChar) { + return nChar < 0x10000 ? 1 : 2; +}; + +/* Array of bytes to base64 string decoding */ + +StringView.b64ToUint6 = function(nChr) { + + return nChr > 64 && nChr < 91 ? + nChr - 65 : nChr > 96 && nChr < 123 ? + nChr - 71 : nChr > 47 && nChr < 58 ? + nChr + 4 : nChr === 43 ? + 62 : nChr === 47 ? + 63 : + 0; + +}; + +StringView.uint6ToB64 = function(nUint6) { + + return nUint6 < 26 ? + nUint6 + 65 : nUint6 < 52 ? + nUint6 + 71 : nUint6 < 62 ? + nUint6 - 4 : nUint6 === 62 ? + 43 : nUint6 === 63 ? + 47 : + 65; + +}; + +/* Base64 string to array encoding */ + +StringView.bytesToBase64 = function(aBytes) { + + var sB64Enc = ""; + + for (var nMod3, nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) { + nMod3 = nIdx % 3; + if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { + sB64Enc += "\r\n"; + } + nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24); + if (nMod3 === 2 || aBytes.length - nIdx === 1) { + sB64Enc += String.fromCharCode(StringView.uint6ToB64(nUint24 >>> 18 & 63), StringView.uint6ToB64(nUint24 >>> 12 & 63), StringView.uint6ToB64(nUint24 >>> 6 & 63), StringView.uint6ToB64(nUint24 & 63)); + nUint24 = 0; + } + } + + return sB64Enc.replace(/A(?=A$|$)/g, "="); + +}; + + +StringView.base64ToBytes = function(sBase64, nBlockBytes) { + + var + sB64Enc = sBase64.replace(/[^A-Za-z0-9\+\/]/g, ""), + nInLen = sB64Enc.length, + nOutLen = nBlockBytes ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockBytes) * nBlockBytes : nInLen * 3 + 1 >>> 2, + aBytes = new Uint8Array(nOutLen); + + for (var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) { + nMod4 = nInIdx & 3; + nUint24 |= StringView.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4; + if (nMod4 === 3 || nInLen - nInIdx === 1) { + for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) { + aBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255; + } + nUint24 = 0; + } + } + + return aBytes; + +}; + +StringView.makeFromBase64 = function(sB64Inpt, sEncoding, nByteOffset, nLength) { + + return new StringView(sEncoding === "UTF-16" || sEncoding === "UTF-32" ? StringView.base64ToBytes(sB64Inpt, sEncoding === "UTF-16" ? 2 : 4).buffer : StringView.base64ToBytes(sB64Inpt), sEncoding, nByteOffset, nLength); + +}; + +/* DEFAULT VALUES */ + +StringView.prototype.encoding = "UTF-8"; /* Default encoding... */ + +/* INSTANCES' METHODS */ + +StringView.prototype.makeIndex = function(nChrLength, nStartFrom) { + + var + + aTarget = this.rawData, + nChrEnd, nRawLength = aTarget.length, + nStartIdx = nStartFrom || 0, + nIdxEnd = nStartIdx, + nStopAtChr = isNaN(nChrLength) ? Infinity : nChrLength; + + if (nChrLength + 1 > aTarget.length) { + throw new RangeError("StringView.prototype.makeIndex - The offset can\'t be major than the length of the array - 1."); + } + + switch (this.encoding) { + + case "UTF-8": + + var nPart; + + for (nChrEnd = 0; nIdxEnd < nRawLength && nChrEnd < nStopAtChr; nChrEnd++) { + nPart = aTarget[nIdxEnd]; + nIdxEnd += nPart > 251 && nPart < 254 && nIdxEnd + 5 < nRawLength ? 6 : nPart > 247 && nPart < 252 && nIdxEnd + 4 < nRawLength ? 5 : nPart > 239 && nPart < 248 && nIdxEnd + 3 < nRawLength ? 4 : nPart > 223 && nPart < 240 && nIdxEnd + 2 < nRawLength ? 3 : nPart > 191 && nPart < 224 && nIdxEnd + 1 < nRawLength ? 2 : 1; + } + + break; + + case "UTF-16": + + for (nChrEnd = nStartIdx; nIdxEnd < nRawLength && nChrEnd < nStopAtChr; nChrEnd++) { + nIdxEnd += aTarget[nIdxEnd] > 0xD7BF /* 55231 */ && nIdxEnd + 1 < aTarget.length ? 2 : 1; + } + + break; + + default: + + nIdxEnd = nChrEnd = isFinite(nChrLength) ? nChrLength : nRawLength - 1; + + } + + if (nChrLength) { + return nIdxEnd; + } + + return nChrEnd; + +}; + +StringView.prototype.toBase64 = function(bWholeBuffer) { + + return StringView.bytesToBase64( + bWholeBuffer ? + ( + this.bufferView.constructor === Uint8Array ? + this.bufferView : + new Uint8Array(this.buffer) + ) : this.rawData.constructor === Uint8Array ? + this.rawData : + new Uint8Array(this.buffer, this.rawData.byteOffset, this.rawData.length << (this.rawData.constructor === Uint16Array ? 1 : 2)) + ); + +}; + +StringView.prototype.subview = function(nCharOffset /* optional */ , nCharLength /* optional */ ) { + + var + + nChrLen, nCharStart, nStrLen, bVariableLen = this.encoding === "UTF-8" || this.encoding === "UTF-16", + nStartOffset = nCharOffset, + nStringLength, nRawLen = this.rawData.length; + + if (nRawLen === 0) { + return new StringView(this.buffer, this.encoding); + } + + nStringLength = bVariableLen ? this.makeIndex() : nRawLen; + nCharStart = nCharOffset ? Math.max((nStringLength + nCharOffset) % nStringLength, 0) : 0; + nStrLen = Number.isInteger(nCharLength) ? Math.max(nCharLength, 0) + nCharStart > nStringLength ? nStringLength - nCharStart : nCharLength : nStringLength; + + if (nCharStart === 0 && nStrLen === nStringLength) { + return this; + } + + if (bVariableLen) { + nStartOffset = this.makeIndex(nCharStart); + nChrLen = this.makeIndex(nStrLen, nStartOffset) - nStartOffset; + } else { + nStartOffset = nCharStart; + nChrLen = nStrLen - nCharStart; + } + + if (this.encoding === "UTF-16") { + nStartOffset <<= 1; + } else if (this.encoding === "UTF-32") { + nStartOffset <<= 2; + } + + return new StringView(this.buffer, this.encoding, nStartOffset, nChrLen); + +}; + +StringView.prototype.forEachChar = function(fCallback, oThat, nChrOffset, nChrLen) { + + var aSource = this.rawData, + nRawEnd, nRawIdx; + + if (this.encoding === "UTF-8" || this.encoding === "UTF-16") { + + var fGetInptChrSize, fGetInptChrCode; + + if (this.encoding === "UTF-8") { + fGetInptChrSize = StringView.getUTF8CharLength; + fGetInptChrCode = StringView.loadUTF8CharCode; + } else if (this.encoding === "UTF-16") { + fGetInptChrSize = StringView.getUTF16CharLength; + fGetInptChrCode = StringView.loadUTF16CharCode; + } + + nRawIdx = isFinite(nChrOffset) ? this.makeIndex(nChrOffset) : 0; + nRawEnd = isFinite(nChrLen) ? this.makeIndex(nChrLen, nRawIdx) : aSource.length; + + for (var nChrCode, nChrIdx = 0; nRawIdx < nRawEnd; nChrIdx++) { + nChrCode = fGetInptChrCode(aSource, nRawIdx); + fCallback.call(oThat || null, nChrCode, nChrIdx, nRawIdx, aSource); + nRawIdx += fGetInptChrSize(nChrCode); + } + + } else { + + nRawIdx = isFinite(nChrOffset) ? nChrOffset : 0; + nRawEnd = isFinite(nChrLen) ? nChrLen + nRawIdx : aSource.length; + + for (nRawIdx; nRawIdx < nRawEnd; nRawIdx++) { + fCallback.call(oThat || null, aSource[nRawIdx], nRawIdx, nRawIdx, aSource); + } + + } + +}; + +StringView.prototype.valueOf = StringView.prototype.toString = function() { + + if (this.encoding !== "UTF-8" && this.encoding !== "UTF-16") { + /* ASCII, UTF-32 or BinaryString to DOMString */ + return String.fromCharCode.apply(null, this.rawData); + } + + var fGetCode, fGetIncr, sView = ""; + + if (this.encoding === "UTF-8") { + fGetIncr = StringView.getUTF8CharLength; + fGetCode = StringView.loadUTF8CharCode; + } else if (this.encoding === "UTF-16") { + fGetIncr = StringView.getUTF16CharLength; + fGetCode = StringView.loadUTF16CharCode; + } + + for (var nChr, nLen = this.rawData.length, nIdx = 0; nIdx < nLen; nIdx += fGetIncr(nChr)) { + nChr = fGetCode(this.rawData, nIdx); + sView += String.fromCharCode(nChr); + } + + return sView; + +}; \ No newline at end of file diff --git a/package.json b/package.json index 80c8dc3..5a64f65 100644 --- a/package.json +++ b/package.json @@ -1,48 +1,45 @@ { - "name": "ngForce", - "version": "1.0.0", - "description": "Angular.js integration library for Salesforce.com", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "grunt": "~0.4.2", - "grunt-cli": "~0.1.13", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-copy": "~0.5.0", - "grunt-contrib-cssmin": "~0.7.0", - "grunt-contrib-jasmine": "~0.6.1", - "grunt-contrib-less": "~0.9.0", - "grunt-env": "~0.4.1", - "grunt-template-jasmine-istanbul": "~0.3.0", - "load-grunt-tasks": "~0.3.0" - }, - "devDependencies": { - "grunt-template-jasmine-istanbul": "~0.3.0", - "grunt-ant-sfdc": "~0.2.2", - "grunt-available-tasks": "~0.4.5", - "grunt-contrib-compress": "~0.8.0", - "grunt-prompt": "~1.1.0", - "grunt": "^0.4.5", - "grunt-cli": "^0.1.13", - "grunt-ngmin": "0.0.3", - "grunt-contrib-uglify": "^0.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/noeticpenguin/ngForce.git" - }, - "keywords": [ - "Salesforce", - "Angular", - "VisualForce", - "Apex" - ], - "author": "Kevin Poorman, Alex Berg, Luke McFarland, Others", - "license": "MIT", - "bugs": { - "url": "https://github.com/noeticpenguin/ngForce/issues" - }, - "homepage": "https://github.com/noeticpenguin/ngForce" -} + "name": "ngForce", + "version": "3.0.3", + "description": "Angular.js integration library for Salesforce.com", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "grunt": "^0.4.5" + }, + "repository": { + "type": "git", + "url": "git://github.com/noeticpenguin/ngForce.git" + }, + "keywords": [ + "Salesforce", + "Angular", + "VisualForce", + "Apex" + ], + "author": "Kevin Poorman, Alex Berg, Luke McFarland, Others", + "license": "MIT", + "bugs": { + "url": "https://github.com/noeticpenguin/ngForce/issues" + }, + "homepage": "https://github.com/noeticpenguin/ngForce", + "devDependencies": { + "grunt-ant-sfdc": "^0.2.6", + "grunt-available-tasks": "^0.5.0", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-compress": "^0.11.0", + "grunt-contrib-concat": "^0.5.0", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-cssmin": "^0.10.0", + "grunt-contrib-jasmine": "^0.7.0", + "grunt-contrib-less": "^0.11.4", + "grunt-contrib-uglify": "^0.5.1", + "grunt-env": "^0.4.1", + "grunt-ng-annotate": "^0.3.2", + "grunt-prompt": "^1.1.0", + "grunt-template-jasmine-istanbul": "^0.3.0", + "load-grunt-tasks": "^0.6.0" + } +} \ No newline at end of file diff --git a/src/classes/TestUtils.cls-meta.xml b/src/classes/TestUtils.cls-meta.xml index 5a25bce..b12420e 100644 --- a/src/classes/TestUtils.cls-meta.xml +++ b/src/classes/TestUtils.cls-meta.xml @@ -1,5 +1,5 @@ - 26.0 + 31.0 Active diff --git a/src/classes/ngForceController.cls b/src/classes/ngForceController.cls index 367be07..4bda8c9 100644 --- a/src/classes/ngForceController.cls +++ b/src/classes/ngForceController.cls @@ -10,14 +10,14 @@ global class ngForceController { } public class Select2Data { - String id {get; set;} - String name {get; set;} - String searchName {get; set;} + @TestVisible String id {get; set;} + @TestVisible String name {get; set;} + @TestVisible String searchName {get; set;} } public class QueryString { - String selectClause {get; set;} - String fromClause {get; set;} + @TestVisible String selectClause {get; set;} + @TestVisible String fromClause {get; set;} } private static String makeError(String message, String errorCode) { @@ -62,6 +62,8 @@ global class ngForceController { if (valueType == Schema.DisplayType.Date) { system.debug('doing ' + key + ' : ' + svalue); obj.put(key, Date.valueOf(svalue)); + } else if ( valueType == Schema.DisplayType.DateTime) { + obj.put(key, DateTime.valueOf(svalue)); } else if (valueType == Schema.DisplayType.Percent || valueType == Schema.DisplayType.Currency) { obj.put(key, svalue == '' ? null : Decimal.valueOf(svalue)); @@ -124,57 +126,60 @@ global class ngForceController { return JSON.serialize(result); } + /* + * These methods are available only after you have established a fieldset + * on an object. @remoteAction public static String describeFieldSet(String objtype, String fieldSetName) { - Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); - Schema.DescribeSObjectResult dr = token.getDescribe(); - Map FsMap = dr.fieldSets.getMap(); - return JSON.serialize(FsMap.get(FieldSetName).getFields()); + Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); + Schema.DescribeSObjectResult dr = token.getDescribe(); + Map FsMap = dr.fieldSets.getMap(); + return JSON.serialize(FsMap.get(FieldSetName).getFields()); } @remoteAction public static String describeField(String objtype, String fieldName) { - Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); - Schema.DescribeSObjectResult dr = token.getDescribe(); - Schema.DescribeFieldResult fieldDescribe = dr.fields.getMap().get(fieldName).getDescribe(); - return JSON.serialize(fieldDescribe); + Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); + Schema.DescribeSObjectResult dr = token.getDescribe(); + Schema.DescribeFieldResult fieldDescribe = dr.fields.getMap().get(fieldName).getDescribe(); + return JSON.serialize(fieldDescribe); } @remoteAction public static String soqlFromFieldSet(String objtype, String fieldSetName) { - Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); - Schema.DescribeSObjectResult dr = token.getDescribe(); - Map FsMap = dr.fieldSets.getMap(); - String selectClause = 'SELECT Id'; - Set querySet = new Set(); - querySet.addAll(FsMap.get(FieldSetName).getFields()); - for (Schema.FieldSetMember f : querySet) { - selectClause += ', ' + f.getFieldPath(); - } - String fromClause = ' FROM ' + dr.getName(); - QueryString qs = new QueryString(); - qs.selectClause = selectClause; - qs.fromClause = fromClause; - return JSON.serialize(qs); + Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); + Schema.DescribeSObjectResult dr = token.getDescribe(); + Map FsMap = dr.fieldSets.getMap(); + String selectClause = 'SELECT Id'; + Set querySet = new Set(); + querySet.addAll(FsMap.get(FieldSetName).getFields()); + for (Schema.FieldSetMember f : querySet) { + selectClause += ', ' + f.getFieldPath(); + } + String fromClause = ' FROM ' + dr.getName(); + QueryString qs = new QueryString(); + qs.selectClause = selectClause; + qs.fromClause = fromClause; + return JSON.serialize(qs); } @remoteAction public static String queryFromFieldSet(String id, String fieldSetName) { - Id objId = (id) Id; - Schema.SObjectType token = objId.getSObjectType(); - Schema.DescribeSObjectResult dr = token.getDescribe(); - Map FsMap = dr.fieldSets.getMap(); - String queryString = 'SELECT Id'; - List querySet = new List(); - querySet = FsMap.get(FieldSetName).getFields(); - for (Schema.FieldSetMember f : querySet) { - queryString += ', ' + f.getFieldPath(); - } - queryString += ' FROM ' + dr.getName() + ' WHERE id = \'' + objId + '\' LIMIT 1'; - system.debug(queryString); - return JSON.serialize(database.Query(queryString)); + Id objId = (id) Id; + Schema.SObjectType token = objId.getSObjectType(); + Schema.DescribeSObjectResult dr = token.getDescribe(); + Map FsMap = dr.fieldSets.getMap(); + String queryString = 'SELECT Id'; + List querySet = new List(); + querySet = FsMap.get(FieldSetName).getFields(); + for (Schema.FieldSetMember f : querySet) { + queryString += ', ' + f.getFieldPath(); } - + queryString += ' FROM ' + dr.getName() + ' WHERE id = \'' + objId + '\' LIMIT 1'; + system.debug(queryString); + return JSON.serialize(database.Query(queryString)); + } + */ @remoteAction public static String getPicklistValues(String objtype, String fieldName) { Schema.SObjectType token = Schema.getGlobalDescribe().get(objtype); @@ -196,15 +201,20 @@ global class ngForceController { List records; try { records = Database.query(soql); + system.debug('somehow passed ' + records); } catch (QueryException qe) { - return '[{"message":"' + qe.getMessage() + '","errorCode":"INVALID_QUERY"}]'; + system.debug('caught query exception'); + return makeError(qe.getMessage(), 'INVALID_QUERY'); + } catch (Exception e) { + system.debug('caught exception'); + return makeError(e.getMessage(), 'INVALID_QUERY'); } List sData = new List(); for (sObject r : records) { Select2Data s = new Select2Data(); s.id = r.id; s.name = (String) r.get('Name'); - s.searchName = (String) r.get('SearchName__c'); + //s.searchName = (String) r.get('SearchName__c'); sData.add(s); } return JSON.serialize(sData); @@ -251,11 +261,12 @@ global class ngForceController { @remoteAction public static String create(String objtype, String fields) { Schema.SObjectType targetType = Schema.getGlobalDescribe().get(objtype); - Map targetFields = targetType.getDescribe().fields.getMap(); if (targetType == null) { return '[{"message":"The requested resource does not exist","errorCode":"NOT_FOUND"}]'; } + Map targetFields = targetType.getDescribe().fields.getMap(); + SObject obj = targetType.newSObject(); Map fieldMap = null; @@ -310,6 +321,8 @@ global class ngForceController { for (String property : current.keySet()) { if (targetFields.get(property).getDescribe().getType() == Schema.DisplayType.Date) { obj.put(property, Date.valueOf((String)current.get(property))); + } else if ( targetFields.get(property).getDescribe().getType() == Schema.DisplayType.DateTime) { + obj.put(property, DateTime.valueOf((String)current.get(property))); } else if (targetFields.get(property).getDescribe().getType() == Schema.DisplayType.Percent || targetFields.get(property).getDescribe().getType() == Schema.DisplayType.Currency) { obj.put(property, String.valueOf(current.get(property)) == '' ? null : Decimal.valueOf((String)current.get(property))); @@ -375,9 +388,7 @@ global class ngForceController { try { update objs; } catch (DMLException dmle) { - return '[{"data":' + jsonObjArr + - ',"message":"' + dmle.getDmlMessage(0) + - '","errorCode":"' + dmle.getDmlType(0).name() + '"}]'; + return makeError(dmle.getMessage(), 'DML_ERROR'); } List rids = new List(); @@ -515,14 +526,18 @@ global class ngForceController { @remoteAction public static String search(String sosl) { + system.debug('$$$$$$$$$' + sosl); List> result; try { result = Search.query(sosl); } catch (SearchException se) { return '[{"message":"' + se.getMessage() + '","errorCode":"INVALID_SEARCH"}]'; + } catch (Exception e) { + system.debug('$$$$$$$$$$$' + e.getCause()); + return '[{"message":"' + e.getMessage() + '","errorCode":"INVALID_SEARCH"}]'; } return JSON.serialize(result); } -} +} \ No newline at end of file diff --git a/src/classes/ngForceController.cls-meta.xml b/src/classes/ngForceController.cls-meta.xml index 6dc8b22..b12420e 100644 --- a/src/classes/ngForceController.cls-meta.xml +++ b/src/classes/ngForceController.cls-meta.xml @@ -1,5 +1,5 @@ - 27.0 + 31.0 Active diff --git a/src/classes/ngForceController_TEST.cls b/src/classes/ngForceController_TEST.cls index 0abc663..a9eb55d 100644 --- a/src/classes/ngForceController_TEST.cls +++ b/src/classes/ngForceController_TEST.cls @@ -229,6 +229,83 @@ public class ngForceController_TEST { } + static testMethod void testBulkUpdate1() { + List accounts = new List(); + for (Integer i = 0; i < 10; i++) { + accounts.add(new Account( + Name = 'Account-' + i + )); + } + insert accounts; + String fields = '['; + for (Integer i = 0; i < 10; i++) { + Account a = accounts.get(i); + //'"0":{"Id":, "Name":"Account-1"},' + + //fields += '"' + i + '":' + '{"Id":"' + a.Id + '",' + '"Name":"AccountAfter-' + i + '"},'; + fields += '{"Id":"' + a.Id + '",' + '"Name":"AccountAfter-' + i + '"},'; + } + fields = fields.substring(0, fields.lastIndexOf(',')); + fields += ']'; + //System.assertEquals(fields, null); + String jsonResult = ngForceController.bulkUpdate('Account', fields); + Map result = (Map)JSON.deserializeUntyped(jsonResult); + //List result = (List)JSON.deserializeUntyped(jsonResult); + System.AssertNotEquals(result, null); + + String jsonResult2 = ngForceController.bulkUpdate('', fields); + assertError(jsonResult2, 'NOT_FOUND', 'ngForceController.bulkCreate'); + String mutatedFields = fields.remove('001'); + jsonResult2 = ngForceController.bulkUpdate('Account', mutatedFields); + assertError(jsonResult2, 'DML_ERROR', 'ngForceController.bulkCreate'); + + jsonResult2 = ngForceController.bulkUpdate('Account', fields.remove('Name')); + assertError(jsonResult2, 'INVALID_JSON', 'ngForceController.bulkCreate'); + + Set accountIds = new Set(); + for (Account account : accounts) { + accountIds.add((String)account.Id); + } + List ids = (List)result.get('id'); + for (Object id : ids) { + String idString = (String) id; + System.assertEquals(accountIds.contains(idString), true, 'bulkUpdate response did not contain updated record ids.'); + } + } + + static testMethod private void testGetQueryAsSelect2Data() { + ngForceController.QueryString x = new ngForceController.QueryString(); + x.selectClause = 'test'; + x.fromClause = 'test'; + + ngForceController.Select2Data y = new ngForceController.Select2Data(); + y.id = 'foo'; + y.name = 'bar'; + y.searchName = 'baz'; + + String jsonResult = ngForceController.getQueryResultsAsSelect2Data('select id, name from Account'); + System.assertNotEquals(null, jsonResult, 'Expected to receieve data from method'); + + Account a = new Account(name = 'foobarbaz', accountNumber = '111323', AnnualRevenue = 10000.00, + NumberOfEmployees = 1000); + insert a; + + jsonResult = ngForceController.getQueryResultsAsSelect2Data('select id, name from Account'); + System.assertNotEquals('', jsonResult, 'Expected to receieve data from method'); + + jsonResult = ngForceController.getQueryResultsAsSelect2Data('SELECT id, name Account'); + assertError(jsonResult, 'INVALID_QUERY', 'ngForceController.getQueryResultsAsSelect2Data'); + } + + static testMethod private void testSObjectKlone() { + Account a = new Account(name = 'foobarbaz', accountNumber = '111323', AnnualRevenue = 10000.00, + NumberOfEmployees = 1000); + insert a; + + String jsonResult = ngForceController.sObjectKlone(String.valueOf(a.Id)); + System.assertNotEquals('', jsonResult, 'Expected to receieve data from method'); + + } + static private void testUpsert(String accName, String accNumber, String id, String fields) { String jsonResult = ngForceController.upser('Account', 'Id', @@ -252,6 +329,7 @@ public class ngForceController_TEST { assertError(jsonResult, 'NOT_FOUND', 'ngForceController.del'); jsonResult = ngForceController.del('Account', id); + system.debug('$$$$$$$$$$$$' + jsonResult); System.assertEquals(null, jsonResult, 'Non-null result from ngForceController.del'); List accounts = [SELECT Id, Name FROM Account WHERE Id = :id]; diff --git a/src/classes/ngForceController_TEST.cls-meta.xml b/src/classes/ngForceController_TEST.cls-meta.xml index 5a25bce..b12420e 100644 --- a/src/classes/ngForceController_TEST.cls-meta.xml +++ b/src/classes/ngForceController_TEST.cls-meta.xml @@ -1,5 +1,5 @@ - 26.0 + 31.0 Active diff --git a/src/classes/testNgForceController.cls-meta.xml b/src/classes/testNgForceController.cls-meta.xml index f165265..b12420e 100644 --- a/src/classes/testNgForceController.cls-meta.xml +++ b/src/classes/testNgForceController.cls-meta.xml @@ -1,5 +1,5 @@ - 29.0 + 31.0 Active diff --git a/src/pages/ngForceConfig.page b/src/pages/ngForceConfig.page new file mode 100644 index 0000000..46839ca --- /dev/null +++ b/src/pages/ngForceConfig.page @@ -0,0 +1,14 @@ + +(function(angular){ + + var sitePrefix = '{!$Site.Prefix}'; + if(sitePrefix === '') sitePrefix = '/apex'; + + angular.module('ngForce.config', []).constant('ngForceConfig', { + sessionId: '{!$Api.Session_ID}', + sitePrefix: sitePrefix, + resourceUrl: '' + }); + +})(angular); + diff --git a/src/pages/ngForceConfig.page-meta.xml b/src/pages/ngForceConfig.page-meta.xml new file mode 100644 index 0000000..a0700de --- /dev/null +++ b/src/pages/ngForceConfig.page-meta.xml @@ -0,0 +1,5 @@ + + + 27.0 + + diff --git a/src/staticresources/ngForce.resource b/src/staticresources/ngForce.resource index a65d428..c3bdc37 100644 Binary files a/src/staticresources/ngForce.resource and b/src/staticresources/ngForce.resource differ