@timshel_npm/maildev 3.2.17 → 3.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/app/components/angular/angular.js +5537 -3622
- package/dist/app/components/angular/angular.min.js +213 -196
- package/dist/app/components/angular/angular.min.js.map +4 -4
- package/dist/app/components/angular-cookies/angular-cookies.js +183 -179
- package/dist/app/components/angular-cookies/angular-cookies.min.js +5 -5
- package/dist/app/components/angular-cookies/angular-cookies.min.js.map +7 -7
- package/dist/app/components/angular-resource/angular-resource.js +129 -48
- package/dist/app/components/angular-resource/angular-resource.min.js +8 -7
- package/dist/app/components/angular-resource/angular-resource.min.js.map +3 -3
- package/dist/app/components/angular-route/angular-route.js +246 -216
- package/dist/app/components/angular-route/angular-route.min.js +9 -9
- package/dist/app/components/angular-route/angular-route.min.js.map +2 -2
- package/dist/app/components/angular-sanitize/angular-sanitize.js +122 -90
- package/dist/app/components/angular-sanitize/angular-sanitize.min.js +10 -9
- package/dist/app/components/angular-sanitize/angular-sanitize.min.js.map +3 -3
- package/dist/app/components/socket.io/socket.io.min.js +3 -3
- package/dist/app/index.html +13 -14
- package/dist/app/styles/style.css +998 -37
- package/dist/app/views/item.html +64 -82
- package/dist/lib/mailserver.d.ts +1 -1
- package/dist/lib/mailserver.js +12 -11
- package/dist/lib/routes.js +2 -3
- package/package.json +15 -17
- package/dist/app/webfonts/fa-brands-400.eot +0 -0
- package/dist/app/webfonts/fa-brands-400.svg +0 -3717
- package/dist/app/webfonts/fa-brands-400.ttf +0 -0
- package/dist/app/webfonts/fa-brands-400.woff +0 -0
- package/dist/app/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/app/webfonts/fa-regular-400.eot +0 -0
- package/dist/app/webfonts/fa-regular-400.svg +0 -801
- package/dist/app/webfonts/fa-regular-400.ttf +0 -0
- package/dist/app/webfonts/fa-regular-400.woff +0 -0
- package/dist/app/webfonts/fa-regular-400.woff2 +0 -0
- package/dist/app/webfonts/fa-solid-900.eot +0 -0
- package/dist/app/webfonts/fa-solid-900.svg +0 -5028
- package/dist/app/webfonts/fa-solid-900.ttf +0 -0
- package/dist/app/webfonts/fa-solid-900.woff +0 -0
- package/dist/app/webfonts/fa-solid-900.woff2 +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license AngularJS v1.2.
|
|
2
|
+
* @license AngularJS v1.2.32
|
|
3
3
|
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -30,7 +30,26 @@ function lookupDottedPath(obj, path) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Create a shallow copy of an object and clear other fields from the destination
|
|
34
|
+
*/
|
|
35
|
+
function shallowClearAndCopy(src, dst) {
|
|
36
|
+
dst = dst || {};
|
|
37
|
+
|
|
38
|
+
angular.forEach(dst, function(value, key){
|
|
39
|
+
delete dst[key];
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
for (var key in src) {
|
|
43
|
+
if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
|
|
44
|
+
dst[key] = src[key];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return dst;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @ngdoc module
|
|
34
53
|
* @name ngResource
|
|
35
54
|
* @description
|
|
36
55
|
*
|
|
@@ -39,7 +58,6 @@ function lookupDottedPath(obj, path) {
|
|
|
39
58
|
* The `ngResource` module provides interaction support with RESTful services
|
|
40
59
|
* via the $resource service.
|
|
41
60
|
*
|
|
42
|
-
* {@installModule resource}
|
|
43
61
|
*
|
|
44
62
|
* <div doc-module-components="ngResource"></div>
|
|
45
63
|
*
|
|
@@ -47,8 +65,8 @@ function lookupDottedPath(obj, path) {
|
|
|
47
65
|
*/
|
|
48
66
|
|
|
49
67
|
/**
|
|
50
|
-
* @ngdoc
|
|
51
|
-
* @name
|
|
68
|
+
* @ngdoc service
|
|
69
|
+
* @name $resource
|
|
52
70
|
* @requires $http
|
|
53
71
|
*
|
|
54
72
|
* @description
|
|
@@ -81,11 +99,13 @@ function lookupDottedPath(obj, path) {
|
|
|
81
99
|
* Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
|
|
82
100
|
* URL `/path/greet?salutation=Hello`.
|
|
83
101
|
*
|
|
84
|
-
* If the parameter value is prefixed with `@` then the value
|
|
85
|
-
* the data object (
|
|
102
|
+
* If the parameter value is prefixed with `@` then the value for that parameter will be extracted
|
|
103
|
+
* from the corresponding property on the `data` object (provided when calling an action method). For
|
|
104
|
+
* example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
|
|
105
|
+
* will be `data.someProp`.
|
|
86
106
|
*
|
|
87
|
-
* @param {Object.<Object>=} actions Hash with declaration of custom action that should extend
|
|
88
|
-
* default set of resource actions. The declaration should be created in the format of {@link
|
|
107
|
+
* @param {Object.<Object>=} actions Hash with declaration of custom action that should extend
|
|
108
|
+
* the default set of resource actions. The declaration should be created in the format of {@link
|
|
89
109
|
* ng.$http#usage_parameters $http.config}:
|
|
90
110
|
*
|
|
91
111
|
* {action1: {method:?, params:?, isArray:?, headers:?, ...},
|
|
@@ -96,8 +116,8 @@ function lookupDottedPath(obj, path) {
|
|
|
96
116
|
*
|
|
97
117
|
* - **`action`** – {string} – The name of action. This name becomes the name of the method on
|
|
98
118
|
* your resource object.
|
|
99
|
-
* - **`method`** – {string} – HTTP
|
|
100
|
-
* `DELETE`,
|
|
119
|
+
* - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
|
|
120
|
+
* `DELETE`, `JSONP`, etc).
|
|
101
121
|
* - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
|
|
102
122
|
* the parameter value is a function, it will be executed every time when a param value needs to
|
|
103
123
|
* be obtained for a request (unless the param was overridden).
|
|
@@ -109,10 +129,16 @@ function lookupDottedPath(obj, path) {
|
|
|
109
129
|
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
|
110
130
|
* transform function or an array of such functions. The transform function takes the http
|
|
111
131
|
* request body and headers and returns its transformed (typically serialized) version.
|
|
132
|
+
* By default, transformRequest will contain one function that checks if the request data is
|
|
133
|
+
* an object and serializes to using `angular.toJson`. To prevent this behavior, set
|
|
134
|
+
* `transformRequest` to an empty array: `transformRequest: []`
|
|
112
135
|
* - **`transformResponse`** –
|
|
113
136
|
* `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
|
|
114
137
|
* transform function or an array of such functions. The transform function takes the http
|
|
115
138
|
* response body and headers and returns its transformed (typically deserialized) version.
|
|
139
|
+
* By default, transformResponse will contain one function that checks if the response looks like
|
|
140
|
+
* a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set
|
|
141
|
+
* `transformResponse` to an empty array: `transformResponse: []`
|
|
116
142
|
* - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
|
|
117
143
|
* GET request, otherwise if a cache instance built with
|
|
118
144
|
* {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
|
|
@@ -120,35 +146,37 @@ function lookupDottedPath(obj, path) {
|
|
|
120
146
|
* - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
|
|
121
147
|
* should abort the request when resolved.
|
|
122
148
|
* - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
|
|
123
|
-
* XHR object. See
|
|
124
|
-
* requests with credentials
|
|
125
|
-
*
|
|
126
|
-
*
|
|
149
|
+
* XHR object. See
|
|
150
|
+
* [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
|
|
151
|
+
* for more information.
|
|
152
|
+
* - **`responseType`** - `{string}` - see
|
|
153
|
+
* [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
|
|
127
154
|
* - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
|
|
128
155
|
* `response` and `responseError`. Both `response` and `responseError` interceptors get called
|
|
129
156
|
* with `http response` object. See {@link ng.$http $http interceptors}.
|
|
130
157
|
*
|
|
131
158
|
* @returns {Object} A resource "class" object with methods for the default set of resource actions
|
|
132
159
|
* optionally extended with custom `actions`. The default set contains these actions:
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
160
|
+
* ```js
|
|
161
|
+
* { 'get': {method:'GET'},
|
|
162
|
+
* 'save': {method:'POST'},
|
|
163
|
+
* 'query': {method:'GET', isArray:true},
|
|
164
|
+
* 'remove': {method:'DELETE'},
|
|
165
|
+
* 'delete': {method:'DELETE'} };
|
|
166
|
+
* ```
|
|
139
167
|
*
|
|
140
168
|
* Calling these methods invoke an {@link ng.$http} with the specified http method,
|
|
141
169
|
* destination and parameters. When the data is returned from the server then the object is an
|
|
142
170
|
* instance of the resource class. The actions `save`, `remove` and `delete` are available on it
|
|
143
171
|
* as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
|
|
144
172
|
* read, update, delete) on server-side data like this:
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
173
|
+
* ```js
|
|
174
|
+
* var User = $resource('/user/:userId', {userId:'@id'});
|
|
175
|
+
* var user = User.get({userId:123}, function() {
|
|
176
|
+
* user.abc = true;
|
|
177
|
+
* user.$save();
|
|
178
|
+
* });
|
|
179
|
+
* ```
|
|
152
180
|
*
|
|
153
181
|
* It is important to realize that invoking a $resource object method immediately returns an
|
|
154
182
|
* empty reference (object or array depending on `isArray`). Once the data is returned from the
|
|
@@ -184,6 +212,9 @@ function lookupDottedPath(obj, path) {
|
|
|
184
212
|
* On failure, the promise is resolved with the {@link ng.$http http response} object, without
|
|
185
213
|
* the `resource` property.
|
|
186
214
|
*
|
|
215
|
+
* If an interceptor object was provided, the promise will instead be resolved with the value
|
|
216
|
+
* returned by the interceptor.
|
|
217
|
+
*
|
|
187
218
|
* - `$resolved`: `true` after first server interaction is completed (either with success or
|
|
188
219
|
* rejection), `false` before that. Knowing if the Resource has been resolved is useful in
|
|
189
220
|
* data-binding.
|
|
@@ -192,7 +223,7 @@ function lookupDottedPath(obj, path) {
|
|
|
192
223
|
*
|
|
193
224
|
* # Credit card resource
|
|
194
225
|
*
|
|
195
|
-
*
|
|
226
|
+
* ```js
|
|
196
227
|
// Define CreditCard class
|
|
197
228
|
var CreditCard = $resource('/user/:userId/card/:cardId',
|
|
198
229
|
{userId:123, cardId:'@id'}, {
|
|
@@ -223,9 +254,9 @@ function lookupDottedPath(obj, path) {
|
|
|
223
254
|
newCard.name = "Mike Smith";
|
|
224
255
|
newCard.$save();
|
|
225
256
|
// POST: /user/123/card {number:'0123', name:'Mike Smith'}
|
|
226
|
-
// server returns: {id:789, number:'
|
|
257
|
+
// server returns: {id:789, number:'0123', name: 'Mike Smith'};
|
|
227
258
|
expect(newCard.id).toEqual(789);
|
|
228
|
-
*
|
|
259
|
+
* ```
|
|
229
260
|
*
|
|
230
261
|
* The object returned from this function execution is a resource "class" which has "static" method
|
|
231
262
|
* for each action in the definition.
|
|
@@ -236,19 +267,19 @@ function lookupDottedPath(obj, path) {
|
|
|
236
267
|
* all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
|
|
237
268
|
* operations (create, read, update, delete) on server-side data.
|
|
238
269
|
|
|
239
|
-
|
|
270
|
+
```js
|
|
240
271
|
var User = $resource('/user/:userId', {userId:'@id'});
|
|
241
|
-
|
|
272
|
+
User.get({userId:123}, function(user) {
|
|
242
273
|
user.abc = true;
|
|
243
274
|
user.$save();
|
|
244
275
|
});
|
|
245
|
-
|
|
276
|
+
```
|
|
246
277
|
*
|
|
247
278
|
* It's worth noting that the success callback for `get`, `query` and other methods gets passed
|
|
248
279
|
* in the response that came from the server as well as $http header getter function, so one
|
|
249
280
|
* could rewrite the above example and get access to http headers as:
|
|
250
281
|
*
|
|
251
|
-
|
|
282
|
+
```js
|
|
252
283
|
var User = $resource('/user/:userId', {userId:'@id'});
|
|
253
284
|
User.get({userId:123}, function(u, getResponseHeaders){
|
|
254
285
|
u.abc = true;
|
|
@@ -257,7 +288,46 @@ function lookupDottedPath(obj, path) {
|
|
|
257
288
|
//putResponseHeaders => $http header getter
|
|
258
289
|
});
|
|
259
290
|
});
|
|
260
|
-
|
|
291
|
+
```
|
|
292
|
+
*
|
|
293
|
+
* You can also access the raw `$http` promise via the `$promise` property on the object returned
|
|
294
|
+
*
|
|
295
|
+
```
|
|
296
|
+
var User = $resource('/user/:userId', {userId:'@id'});
|
|
297
|
+
User.get({userId:123})
|
|
298
|
+
.$promise.then(function(user) {
|
|
299
|
+
$scope.user = user;
|
|
300
|
+
});
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
* # Creating a custom 'PUT' request
|
|
304
|
+
* In this example we create a custom method on our resource to make a PUT request
|
|
305
|
+
* ```js
|
|
306
|
+
* var app = angular.module('app', ['ngResource', 'ngRoute']);
|
|
307
|
+
*
|
|
308
|
+
* // Some APIs expect a PUT request in the format URL/object/ID
|
|
309
|
+
* // Here we are creating an 'update' method
|
|
310
|
+
* app.factory('Notes', ['$resource', function($resource) {
|
|
311
|
+
* return $resource('/notes/:id', null,
|
|
312
|
+
* {
|
|
313
|
+
* 'update': { method:'PUT' }
|
|
314
|
+
* });
|
|
315
|
+
* }]);
|
|
316
|
+
*
|
|
317
|
+
* // In our controller we get the ID from the URL using ngRoute and $routeParams
|
|
318
|
+
* // We pass in $routeParams and our Notes factory along with $scope
|
|
319
|
+
* app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
|
|
320
|
+
function($scope, $routeParams, Notes) {
|
|
321
|
+
* // First get a note object from the factory
|
|
322
|
+
* var note = Notes.get({ id:$routeParams.id });
|
|
323
|
+
* $id = note.id;
|
|
324
|
+
*
|
|
325
|
+
* // Now call update passing in the ID first then the object you are updating
|
|
326
|
+
* Notes.update({ id:$id }, note);
|
|
327
|
+
*
|
|
328
|
+
* // This will PUT /notes/ID with the note object in the request payload
|
|
329
|
+
* }]);
|
|
330
|
+
* ```
|
|
261
331
|
*/
|
|
262
332
|
angular.module('ngResource', ['ng']).
|
|
263
333
|
factory('$resource', ['$http', '$q', function($http, $q) {
|
|
@@ -344,7 +414,9 @@ angular.module('ngResource', ['ng']).
|
|
|
344
414
|
val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
|
|
345
415
|
if (angular.isDefined(val) && val !== null) {
|
|
346
416
|
encodedVal = encodeUriSegment(val);
|
|
347
|
-
url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"),
|
|
417
|
+
url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
|
|
418
|
+
return encodedVal + p1;
|
|
419
|
+
});
|
|
348
420
|
} else {
|
|
349
421
|
url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
|
|
350
422
|
leadingSlashes, tail) {
|
|
@@ -358,7 +430,7 @@ angular.module('ngResource', ['ng']).
|
|
|
358
430
|
});
|
|
359
431
|
|
|
360
432
|
// strip trailing slashes and set the url
|
|
361
|
-
url = url.replace(/\/+$/, '');
|
|
433
|
+
url = url.replace(/\/+$/, '') || '/';
|
|
362
434
|
// then replace collapse `/.` if found in the last URL path segment before the query
|
|
363
435
|
// E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
|
|
364
436
|
url = url.replace(/\/\.(?=\w+($|\?))/, '.');
|
|
@@ -398,7 +470,7 @@ angular.module('ngResource', ['ng']).
|
|
|
398
470
|
}
|
|
399
471
|
|
|
400
472
|
function Resource(value){
|
|
401
|
-
|
|
473
|
+
shallowClearAndCopy(value || {}, this);
|
|
402
474
|
}
|
|
403
475
|
|
|
404
476
|
forEach(actions, function(action, name) {
|
|
@@ -463,26 +535,35 @@ angular.module('ngResource', ['ng']).
|
|
|
463
535
|
extend({}, extractParams(data, action.params || {}), params),
|
|
464
536
|
action.url);
|
|
465
537
|
|
|
466
|
-
var promise = $http(httpConfig).then(function(response) {
|
|
538
|
+
var promise = $http(httpConfig).then(function (response) {
|
|
467
539
|
var data = response.data,
|
|
468
|
-
|
|
540
|
+
promise = value.$promise;
|
|
469
541
|
|
|
470
542
|
if (data) {
|
|
471
543
|
// Need to convert action.isArray to boolean in case it is undefined
|
|
472
544
|
// jshint -W018
|
|
473
|
-
if (
|
|
474
|
-
throw $resourceMinErr('badcfg',
|
|
475
|
-
|
|
476
|
-
|
|
545
|
+
if (angular.isArray(data) !== (!!action.isArray)) {
|
|
546
|
+
throw $resourceMinErr('badcfg',
|
|
547
|
+
'Error in resource configuration. Expected ' +
|
|
548
|
+
'response to contain an {0} but got an {1}',
|
|
549
|
+
action.isArray ? 'array' : 'object',
|
|
550
|
+
angular.isArray(data) ? 'array' : 'object');
|
|
477
551
|
}
|
|
478
552
|
// jshint +W018
|
|
479
553
|
if (action.isArray) {
|
|
480
554
|
value.length = 0;
|
|
481
|
-
forEach(data, function(item) {
|
|
482
|
-
|
|
555
|
+
forEach(data, function (item) {
|
|
556
|
+
if (typeof item === "object") {
|
|
557
|
+
value.push(new Resource(item));
|
|
558
|
+
} else {
|
|
559
|
+
// Valid JSON values may be string literals, and these should not be converted
|
|
560
|
+
// into objects. These items will not have access to the Resource prototype
|
|
561
|
+
// methods, but unfortunately there
|
|
562
|
+
value.push(item);
|
|
563
|
+
}
|
|
483
564
|
});
|
|
484
565
|
} else {
|
|
485
|
-
|
|
566
|
+
shallowClearAndCopy(data, value);
|
|
486
567
|
value.$promise = promise;
|
|
487
568
|
}
|
|
488
569
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
|
-
AngularJS v1.2.
|
|
2
|
+
AngularJS v1.2.32
|
|
3
3
|
(c) 2010-2014 Google, Inc. http://angularjs.org
|
|
4
4
|
License: MIT
|
|
5
5
|
*/
|
|
6
|
-
(function(H,
|
|
7
|
-
b.length;f<
|
|
8
|
-
n
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),e=e.replace(RegExp(":"+
|
|
6
|
+
(function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)!p.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(g[c]=p[c]);return g}var v=a.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(p,g){function c(a,c){this.template=a;this.defaults=c||{};this.urlParams={}}function t(n,w,l){function r(h,d){var e={};d=x({},w,d);s(d,function(b,d){u(b)&&(b=b());var k;if(b&&
|
|
7
|
+
b.charAt&&"@"==b.charAt(0)){k=h;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!C.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,c=a.length;f<c&&k!==A;f++){var g=a[f];k=null!==k?k[g]:A}}else k=b;e[d]=k});return e}function e(a){return a.resource}function f(a){D(a||{},this)}var F=new c(n);l=x({},B,l);s(l,function(h,d){var c=/^(POST|PUT|PATCH)$/i.test(h.method);f[d]=function(b,d,k,w){var q={},n,l,y;switch(arguments.length){case 4:y=w,l=k;case 3:case 2:if(u(d)){if(u(b)){l=
|
|
8
|
+
b;y=d;break}l=d;y=k}else{q=b;n=d;l=k;break}case 1:u(b)?l=b:c?n=b:q=b;break;case 0:break;default:throw v("badargs",arguments.length);}var t=this instanceof f,m=t?n:h.isArray?[]:new f(n),z={},B=h.interceptor&&h.interceptor.response||e,C=h.interceptor&&h.interceptor.responseError||A;s(h,function(a,b){"params"!=b&&("isArray"!=b&&"interceptor"!=b)&&(z[b]=G(a))});c&&(z.data=n);F.setUrlParams(z,x({},r(n,h.params||{}),q),h.url);q=p(z).then(function(b){var d=b.data,k=m.$promise;if(d){if(a.isArray(d)!==!!h.isArray)throw v("badcfg",
|
|
9
|
+
h.isArray?"array":"object",a.isArray(d)?"array":"object");h.isArray?(m.length=0,s(d,function(b){"object"===typeof b?m.push(new f(b)):m.push(b)})):(D(d,m),m.$promise=k)}m.$resolved=!0;b.resource=m;return b},function(b){m.$resolved=!0;(y||E)(b);return g.reject(b)});q=q.then(function(b){var a=B(b);(l||E)(a,b.headers);return a},C);return t?q:(m.$promise=q,m.$resolved=!1,m)};f.prototype["$"+d]=function(b,a,k){u(b)&&(k=a,a=b,b={});b=f[d].call(this,b,this,a,k);return b.$promise||b}});f.bind=function(a){return t(n,
|
|
10
|
+
x({},w,a),l)};return f}var B={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},E=a.noop,s=a.forEach,x=a.extend,G=a.copy,u=a.isFunction;c.prototype={setUrlParams:function(c,g,l){var r=this,e=l||r.template,f,p,h=r.urlParams={};s(e.split(/\W/),function(a){if("hasOwnProperty"===a)throw v("badname");!/^\d+$/.test(a)&&(a&&RegExp("(^|[^\\\\]):"+a+"(\\W|$)").test(e))&&(h[a]=!0)});e=e.replace(/\\:/g,":");g=g||{};s(r.urlParams,function(d,
|
|
11
|
+
c){f=g.hasOwnProperty(c)?g[c]:r.defaults[c];a.isDefined(f)&&null!==f?(p=encodeURIComponent(f).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),e=e.replace(RegExp(":"+c+"(\\W|$)","g"),function(a,c){return p+c})):e=e.replace(RegExp("(/?):"+c+"(\\W|$)","g"),function(a,c,d){return"/"==d.charAt(0)?d:c+d})});e=e.replace(/\/+$/,"")||"/";e=e.replace(/\/\.(?=\w+($|\?))/,".");c.url=e.replace(/\/\\\./,
|
|
12
|
+
"/.");s(g,function(a,e){r.urlParams[e]||(c.params=c.params||{},c.params[e]=a)})}};return t}])})(window,window.angular);
|
|
12
13
|
//# sourceMappingURL=angular-resource.min.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version":3,
|
|
3
3
|
"file":"angular-resource.min.js",
|
|
4
|
-
"lineCount":
|
|
5
|
-
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,
|
|
4
|
+
"lineCount":12,
|
|
5
|
+
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CAAN,EAAa,EAEbJ,EAAAK,QAAA,CAAgBD,CAAhB,CAAqB,QAAQ,CAACE,CAAD,CAAQC,CAAR,CAAY,CACvC,OAAOH,CAAA,CAAIG,CAAJ,CADgC,CAAzC,CAIA,KAAKA,IAAIA,CAAT,GAAgBJ,EAAhB,CACM,CAAAA,CAAAK,eAAA,CAAmBD,CAAnB,CAAJ,EAAmD,GAAnD,GAAiCA,CAAAE,OAAA,CAAW,CAAX,CAAjC,EAA4E,GAA5E,GAA0DF,CAAAE,OAAA,CAAW,CAAX,CAA1D,GACEL,CAAA,CAAIG,CAAJ,CADF,CACaJ,CAAA,CAAII,CAAJ,CADb,CAKF,OAAOH,EAb8B,CA3BvC,IAAIM,EAAkBV,CAAAW,SAAA,CAAiB,WAAjB,CAAtB,CAKIC,EAAoB,iCA+TxBZ,EAAAa,OAAA,CAAe,YAAf,CAA6B,CAAC,IAAD,CAA7B,CAAAC,QAAA,CACU,WADV,CACuB,CAAC,OAAD,CAAU,IAAV,CAAgB,QAAQ,CAACC,CAAD,CAAQC,CAAR,CAAY,CAsDvDC,QAASA,EAAK,CAACC,CAAD,CAAWC,CAAX,CAAqB,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CAAsBG,CAAtB,CAAiC,SAAjC,CAA4C,GAA5C,CAAZ,CAA8D,QAAQ,CAACG,CAAD,CACxEE,CADwE,CACxDC,CADwD,CAClD,CACxB,MAAsB,GAAtB,EAAIA,CAAAvF,OAAA,CAAY,CAAZ,CAAJ,CACSuF,CADT,CAGSD,CAHT,CAG0BC,CAJF,CADpB,CARmC,CAA7C,CAoBA1E,EAAA,CAAMA,CAAAkE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CAAN,EAAiC,GAGjClE,EAAA,CAAMA,CAAAkE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENP,EAAA3D,IAAA,CAAaA,CAAAkE,QAAA,CAAY,QAAZ;AAAsB,IAAtB,CAIbnF,EAAA,CAAQgD,CAAR,CAAgB,QAAQ,CAAC/C,CAAD,CAAQC,CAAR,CAAY,CAC7B4E,CAAA/D,UAAA,CAAeb,CAAf,CAAL,GACE0E,CAAA5B,OACA,CADgB4B,CAAA5B,OAChB,EADiC,EACjC,CAAA4B,CAAA5B,OAAA,CAAc9C,CAAd,CAAA,CAAqBD,CAFvB,CADkC,CAApC,CAhDgD,CADlC,CAsOlB,OAAOe,EAlSgD,CAApC,CADvB,CAtUsC,CAArC,CAAA,CA6mBEtB,MA7mBF,CA6mBUA,MAAAC,QA7mBV;",
|
|
6
6
|
"sources":["angular-resource.js"],
|
|
7
|
-
"names":["window","angular","undefined","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","factory","$http","$q","Route","template","defaults","urlParams","resourceFactory","url","paramDefaults","actions","extractParams","data","actionParams","ids","extend","
|
|
7
|
+
"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","factory","$http","$q","Route","template","defaults","urlParams","resourceFactory","url","paramDefaults","actions","extractParams","data","actionParams","ids","extend","isFunction","path","test","keys","split","i","ii","length","obj","defaultResponseInterceptor","response","resource","Resource","route","DEFAULT_ACTIONS","action","name","hasBody","method","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","isArray","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","$promise","item","push","$resolved","noop","reject","headers","prototype","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","param","RegExp","replace","_","urlParam","isDefined","encodeURIComponent","match","p1","leadingSlashes","tail"]
|
|
8
8
|
}
|