rails-angularjs 1.3.16 → 1.4.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -13
  3. data/lib/rails-angularjs/version.rb +1 -2
  4. data/vendor/assets/javascripts/angular-animate.js +3231 -1885
  5. data/vendor/assets/javascripts/angular-animate.min.js +45 -29
  6. data/vendor/assets/javascripts/angular-animate.min.js.map +3 -3
  7. data/vendor/assets/javascripts/angular-aria.js +89 -75
  8. data/vendor/assets/javascripts/angular-aria.min.js +9 -9
  9. data/vendor/assets/javascripts/angular-aria.min.js.map +2 -2
  10. data/vendor/assets/javascripts/angular-cookies.js +255 -141
  11. data/vendor/assets/javascripts/angular-cookies.min.js +5 -4
  12. data/vendor/assets/javascripts/angular-cookies.min.js.map +3 -3
  13. data/vendor/assets/javascripts/angular-loader.js +41 -17
  14. data/vendor/assets/javascripts/angular-loader.min.js +5 -5
  15. data/vendor/assets/javascripts/angular-loader.min.js.map +2 -2
  16. data/vendor/assets/javascripts/{unstable/angular-messageFormat.js → angular-message-format.js} +76 -18
  17. data/vendor/assets/javascripts/angular-message-format.min.js +26 -0
  18. data/vendor/assets/javascripts/angular-message-format.min.js.map +8 -0
  19. data/vendor/assets/javascripts/angular-messages.js +430 -153
  20. data/vendor/assets/javascripts/angular-messages.min.js +7 -6
  21. data/vendor/assets/javascripts/angular-messages.min.js.map +3 -3
  22. data/vendor/assets/javascripts/angular-mocks.js +76 -92
  23. data/vendor/assets/javascripts/angular-resource.js +4 -4
  24. data/vendor/assets/javascripts/angular-resource.min.js +3 -3
  25. data/vendor/assets/javascripts/angular-resource.min.js.map +1 -1
  26. data/vendor/assets/javascripts/angular-route.js +8 -6
  27. data/vendor/assets/javascripts/angular-route.min.js +2 -2
  28. data/vendor/assets/javascripts/angular-route.min.js.map +1 -1
  29. data/vendor/assets/javascripts/angular-sanitize.js +32 -28
  30. data/vendor/assets/javascripts/angular-sanitize.min.js +11 -11
  31. data/vendor/assets/javascripts/angular-sanitize.min.js.map +2 -2
  32. data/vendor/assets/javascripts/angular-scenario.js +4155 -2553
  33. data/vendor/assets/javascripts/angular-touch.js +15 -12
  34. data/vendor/assets/javascripts/angular-touch.min.js +9 -9
  35. data/vendor/assets/javascripts/angular-touch.min.js.map +2 -2
  36. data/vendor/assets/javascripts/angular.js +4092 -2529
  37. data/vendor/assets/javascripts/angular.min.js +283 -247
  38. data/vendor/assets/javascripts/angular.min.js.map +3 -3
  39. metadata +8 -39
  40. data/vendor/assets/javascripts/unstable/angular-animate.js +0 -3268
  41. data/vendor/assets/javascripts/unstable/angular-animate.min.js +0 -49
  42. data/vendor/assets/javascripts/unstable/angular-animate.min.js.map +0 -8
  43. data/vendor/assets/javascripts/unstable/angular-aria.js +0 -377
  44. data/vendor/assets/javascripts/unstable/angular-aria.min.js +0 -13
  45. data/vendor/assets/javascripts/unstable/angular-aria.min.js.map +0 -8
  46. data/vendor/assets/javascripts/unstable/angular-cookies.js +0 -320
  47. data/vendor/assets/javascripts/unstable/angular-cookies.min.js +0 -9
  48. data/vendor/assets/javascripts/unstable/angular-cookies.min.js.map +0 -8
  49. data/vendor/assets/javascripts/unstable/angular-loader.js +0 -429
  50. data/vendor/assets/javascripts/unstable/angular-loader.min.js +0 -9
  51. data/vendor/assets/javascripts/unstable/angular-loader.min.js.map +0 -8
  52. data/vendor/assets/javascripts/unstable/angular-messageFormat.min.js +0 -26
  53. data/vendor/assets/javascripts/unstable/angular-messageFormat.min.js.map +0 -8
  54. data/vendor/assets/javascripts/unstable/angular-messages.js +0 -667
  55. data/vendor/assets/javascripts/unstable/angular-messages.min.js +0 -11
  56. data/vendor/assets/javascripts/unstable/angular-messages.min.js.map +0 -8
  57. data/vendor/assets/javascripts/unstable/angular-mocks.js +0 -2452
  58. data/vendor/assets/javascripts/unstable/angular-resource.js +0 -668
  59. data/vendor/assets/javascripts/unstable/angular-resource.min.js +0 -13
  60. data/vendor/assets/javascripts/unstable/angular-resource.min.js.map +0 -8
  61. data/vendor/assets/javascripts/unstable/angular-route.js +0 -991
  62. data/vendor/assets/javascripts/unstable/angular-route.min.js +0 -15
  63. data/vendor/assets/javascripts/unstable/angular-route.min.js.map +0 -8
  64. data/vendor/assets/javascripts/unstable/angular-sanitize.js +0 -683
  65. data/vendor/assets/javascripts/unstable/angular-sanitize.min.js +0 -16
  66. data/vendor/assets/javascripts/unstable/angular-sanitize.min.js.map +0 -8
  67. data/vendor/assets/javascripts/unstable/angular-scenario.js +0 -39082
  68. data/vendor/assets/javascripts/unstable/angular-touch.js +0 -625
  69. data/vendor/assets/javascripts/unstable/angular-touch.min.js +0 -13
  70. data/vendor/assets/javascripts/unstable/angular-touch.min.js.map +0 -8
  71. data/vendor/assets/javascripts/unstable/angular.js +0 -27674
  72. data/vendor/assets/javascripts/unstable/angular.min.js +0 -286
  73. data/vendor/assets/javascripts/unstable/angular.min.js.map +0 -8
@@ -1,625 +0,0 @@
1
- /**
2
- * @license AngularJS v1.4.0-rc.0
3
- * (c) 2010-2015 Google, Inc. http://angularjs.org
4
- * License: MIT
5
- */
6
- (function(window, angular, undefined) {'use strict';
7
-
8
- /**
9
- * @ngdoc module
10
- * @name ngTouch
11
- * @description
12
- *
13
- * # ngTouch
14
- *
15
- * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.
16
- * The implementation is based on jQuery Mobile touch event handling
17
- * ([jquerymobile.com](http://jquerymobile.com/)).
18
- *
19
- *
20
- * See {@link ngTouch.$swipe `$swipe`} for usage.
21
- *
22
- * <div doc-module-components="ngTouch"></div>
23
- *
24
- */
25
-
26
- // define ngTouch module
27
- /* global -ngTouch */
28
- var ngTouch = angular.module('ngTouch', []);
29
-
30
- /* global ngTouch: false */
31
-
32
- /**
33
- * @ngdoc service
34
- * @name $swipe
35
- *
36
- * @description
37
- * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe
38
- * behavior, to make implementing swipe-related directives more convenient.
39
- *
40
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
41
- *
42
- * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by
43
- * `ngCarousel` in a separate component.
44
- *
45
- * # Usage
46
- * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element
47
- * which is to be watched for swipes, and an object with four handler functions. See the
48
- * documentation for `bind` below.
49
- */
50
-
51
- ngTouch.factory('$swipe', [function() {
52
- // The total distance in any direction before we make the call on swipe vs. scroll.
53
- var MOVE_BUFFER_RADIUS = 10;
54
-
55
- var POINTER_EVENTS = {
56
- 'mouse': {
57
- start: 'mousedown',
58
- move: 'mousemove',
59
- end: 'mouseup'
60
- },
61
- 'touch': {
62
- start: 'touchstart',
63
- move: 'touchmove',
64
- end: 'touchend',
65
- cancel: 'touchcancel'
66
- }
67
- };
68
-
69
- function getCoordinates(event) {
70
- var originalEvent = event.originalEvent || event;
71
- var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];
72
- var e = (originalEvent.changedTouches && originalEvent.changedTouches[0]) || touches[0];
73
-
74
- return {
75
- x: e.clientX,
76
- y: e.clientY
77
- };
78
- }
79
-
80
- function getEvents(pointerTypes, eventType) {
81
- var res = [];
82
- angular.forEach(pointerTypes, function(pointerType) {
83
- var eventName = POINTER_EVENTS[pointerType][eventType];
84
- if (eventName) {
85
- res.push(eventName);
86
- }
87
- });
88
- return res.join(' ');
89
- }
90
-
91
- return {
92
- /**
93
- * @ngdoc method
94
- * @name $swipe#bind
95
- *
96
- * @description
97
- * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an
98
- * object containing event handlers.
99
- * The pointer types that should be used can be specified via the optional
100
- * third argument, which is an array of strings `'mouse'` and `'touch'`. By default,
101
- * `$swipe` will listen for `mouse` and `touch` events.
102
- *
103
- * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
104
- * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.
105
- *
106
- * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
107
- * watching for `touchmove` or `mousemove` events. These events are ignored until the total
108
- * distance moved in either dimension exceeds a small threshold.
109
- *
110
- * Once this threshold is exceeded, either the horizontal or vertical delta is greater.
111
- * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.
112
- * - If the vertical distance is greater, this is a scroll, and we let the browser take over.
113
- * A `cancel` event is sent.
114
- *
115
- * `move` is called on `mousemove` and `touchmove` after the above logic has determined that
116
- * a swipe is in progress.
117
- *
118
- * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.
119
- *
120
- * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling
121
- * as described above.
122
- *
123
- */
124
- bind: function(element, eventHandlers, pointerTypes) {
125
- // Absolute total movement, used to control swipe vs. scroll.
126
- var totalX, totalY;
127
- // Coordinates of the start position.
128
- var startCoords;
129
- // Last event's position.
130
- var lastPos;
131
- // Whether a swipe is active.
132
- var active = false;
133
-
134
- pointerTypes = pointerTypes || ['mouse', 'touch'];
135
- element.on(getEvents(pointerTypes, 'start'), function(event) {
136
- startCoords = getCoordinates(event);
137
- active = true;
138
- totalX = 0;
139
- totalY = 0;
140
- lastPos = startCoords;
141
- eventHandlers['start'] && eventHandlers['start'](startCoords, event);
142
- });
143
- var events = getEvents(pointerTypes, 'cancel');
144
- if (events) {
145
- element.on(events, function(event) {
146
- active = false;
147
- eventHandlers['cancel'] && eventHandlers['cancel'](event);
148
- });
149
- }
150
-
151
- element.on(getEvents(pointerTypes, 'move'), function(event) {
152
- if (!active) return;
153
-
154
- // Android will send a touchcancel if it thinks we're starting to scroll.
155
- // So when the total distance (+ or - or both) exceeds 10px in either direction,
156
- // we either:
157
- // - On totalX > totalY, we send preventDefault() and treat this as a swipe.
158
- // - On totalY > totalX, we let the browser handle it as a scroll.
159
-
160
- if (!startCoords) return;
161
- var coords = getCoordinates(event);
162
-
163
- totalX += Math.abs(coords.x - lastPos.x);
164
- totalY += Math.abs(coords.y - lastPos.y);
165
-
166
- lastPos = coords;
167
-
168
- if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {
169
- return;
170
- }
171
-
172
- // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.
173
- if (totalY > totalX) {
174
- // Allow native scrolling to take over.
175
- active = false;
176
- eventHandlers['cancel'] && eventHandlers['cancel'](event);
177
- return;
178
- } else {
179
- // Prevent the browser from scrolling.
180
- event.preventDefault();
181
- eventHandlers['move'] && eventHandlers['move'](coords, event);
182
- }
183
- });
184
-
185
- element.on(getEvents(pointerTypes, 'end'), function(event) {
186
- if (!active) return;
187
- active = false;
188
- eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
189
- });
190
- }
191
- };
192
- }]);
193
-
194
- /* global ngTouch: false */
195
-
196
- /**
197
- * @ngdoc directive
198
- * @name ngClick
199
- *
200
- * @description
201
- * A more powerful replacement for the default ngClick designed to be used on touchscreen
202
- * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending
203
- * the click event. This version handles them immediately, and then prevents the
204
- * following click event from propagating.
205
- *
206
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
207
- *
208
- * This directive can fall back to using an ordinary click event, and so works on desktop
209
- * browsers as well as mobile.
210
- *
211
- * This directive also sets the CSS class `ng-click-active` while the element is being held
212
- * down (by a mouse click or touch) so you can restyle the depressed element if you wish.
213
- *
214
- * @element ANY
215
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate
216
- * upon tap. (Event object is available as `$event`)
217
- *
218
- * @example
219
- <example module="ngClickExample" deps="angular-touch.js">
220
- <file name="index.html">
221
- <button ng-click="count = count + 1" ng-init="count=0">
222
- Increment
223
- </button>
224
- count: {{ count }}
225
- </file>
226
- <file name="script.js">
227
- angular.module('ngClickExample', ['ngTouch']);
228
- </file>
229
- </example>
230
- */
231
-
232
- ngTouch.config(['$provide', function($provide) {
233
- $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {
234
- // drop the default ngClick directive
235
- $delegate.shift();
236
- return $delegate;
237
- }]);
238
- }]);
239
-
240
- ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
241
- function($parse, $timeout, $rootElement) {
242
- var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.
243
- var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.
244
- var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click
245
- var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.
246
-
247
- var ACTIVE_CLASS_NAME = 'ng-click-active';
248
- var lastPreventedTime;
249
- var touchCoordinates;
250
- var lastLabelClickCoordinates;
251
-
252
-
253
- // TAP EVENTS AND GHOST CLICKS
254
- //
255
- // Why tap events?
256
- // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're
257
- // double-tapping, and then fire a click event.
258
- //
259
- // This delay sucks and makes mobile apps feel unresponsive.
260
- // So we detect touchstart, touchmove, touchcancel and touchend ourselves and determine when
261
- // the user has tapped on something.
262
- //
263
- // What happens when the browser then generates a click event?
264
- // The browser, of course, also detects the tap and fires a click after a delay. This results in
265
- // tapping/clicking twice. We do "clickbusting" to prevent it.
266
- //
267
- // How does it work?
268
- // We attach global touchstart and click handlers, that run during the capture (early) phase.
269
- // So the sequence for a tap is:
270
- // - global touchstart: Sets an "allowable region" at the point touched.
271
- // - element's touchstart: Starts a touch
272
- // (- touchmove or touchcancel ends the touch, no click follows)
273
- // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold
274
- // too long) and fires the user's tap handler. The touchend also calls preventGhostClick().
275
- // - preventGhostClick() removes the allowable region the global touchstart created.
276
- // - The browser generates a click event.
277
- // - The global click handler catches the click, and checks whether it was in an allowable region.
278
- // - If preventGhostClick was called, the region will have been removed, the click is busted.
279
- // - If the region is still there, the click proceeds normally. Therefore clicks on links and
280
- // other elements without ngTap on them work normally.
281
- //
282
- // This is an ugly, terrible hack!
283
- // Yeah, tell me about it. The alternatives are using the slow click events, or making our users
284
- // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular
285
- // encapsulates this ugly logic away from the user.
286
- //
287
- // Why not just put click handlers on the element?
288
- // We do that too, just to be sure. If the tap event caused the DOM to change,
289
- // it is possible another element is now in that position. To take account for these possibly
290
- // distinct elements, the handlers are global and care only about coordinates.
291
-
292
- // Checks if the coordinates are close enough to be within the region.
293
- function hit(x1, y1, x2, y2) {
294
- return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;
295
- }
296
-
297
- // Checks a list of allowable regions against a click location.
298
- // Returns true if the click should be allowed.
299
- // Splices out the allowable region from the list after it has been used.
300
- function checkAllowableRegions(touchCoordinates, x, y) {
301
- for (var i = 0; i < touchCoordinates.length; i += 2) {
302
- if (hit(touchCoordinates[i], touchCoordinates[i + 1], x, y)) {
303
- touchCoordinates.splice(i, i + 2);
304
- return true; // allowable region
305
- }
306
- }
307
- return false; // No allowable region; bust it.
308
- }
309
-
310
- // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick
311
- // was called recently.
312
- function onClick(event) {
313
- if (Date.now() - lastPreventedTime > PREVENT_DURATION) {
314
- return; // Too old.
315
- }
316
-
317
- var touches = event.touches && event.touches.length ? event.touches : [event];
318
- var x = touches[0].clientX;
319
- var y = touches[0].clientY;
320
- // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label
321
- // and on the input element). Depending on the exact browser, this second click we don't want
322
- // to bust has either (0,0), negative coordinates, or coordinates equal to triggering label
323
- // click event
324
- if (x < 1 && y < 1) {
325
- return; // offscreen
326
- }
327
- if (lastLabelClickCoordinates &&
328
- lastLabelClickCoordinates[0] === x && lastLabelClickCoordinates[1] === y) {
329
- return; // input click triggered by label click
330
- }
331
- // reset label click coordinates on first subsequent click
332
- if (lastLabelClickCoordinates) {
333
- lastLabelClickCoordinates = null;
334
- }
335
- // remember label click coordinates to prevent click busting of trigger click event on input
336
- if (event.target.tagName.toLowerCase() === 'label') {
337
- lastLabelClickCoordinates = [x, y];
338
- }
339
-
340
- // Look for an allowable region containing this click.
341
- // If we find one, that means it was created by touchstart and not removed by
342
- // preventGhostClick, so we don't bust it.
343
- if (checkAllowableRegions(touchCoordinates, x, y)) {
344
- return;
345
- }
346
-
347
- // If we didn't find an allowable region, bust the click.
348
- event.stopPropagation();
349
- event.preventDefault();
350
-
351
- // Blur focused form elements
352
- event.target && event.target.blur();
353
- }
354
-
355
-
356
- // Global touchstart handler that creates an allowable region for a click event.
357
- // This allowable region can be removed by preventGhostClick if we want to bust it.
358
- function onTouchStart(event) {
359
- var touches = event.touches && event.touches.length ? event.touches : [event];
360
- var x = touches[0].clientX;
361
- var y = touches[0].clientY;
362
- touchCoordinates.push(x, y);
363
-
364
- $timeout(function() {
365
- // Remove the allowable region.
366
- for (var i = 0; i < touchCoordinates.length; i += 2) {
367
- if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {
368
- touchCoordinates.splice(i, i + 2);
369
- return;
370
- }
371
- }
372
- }, PREVENT_DURATION, false);
373
- }
374
-
375
- // On the first call, attaches some event handlers. Then whenever it gets called, it creates a
376
- // zone around the touchstart where clicks will get busted.
377
- function preventGhostClick(x, y) {
378
- if (!touchCoordinates) {
379
- $rootElement[0].addEventListener('click', onClick, true);
380
- $rootElement[0].addEventListener('touchstart', onTouchStart, true);
381
- touchCoordinates = [];
382
- }
383
-
384
- lastPreventedTime = Date.now();
385
-
386
- checkAllowableRegions(touchCoordinates, x, y);
387
- }
388
-
389
- // Actual linking function.
390
- return function(scope, element, attr) {
391
- var clickHandler = $parse(attr.ngClick),
392
- tapping = false,
393
- tapElement, // Used to blur the element after a tap.
394
- startTime, // Used to check if the tap was held too long.
395
- touchStartX,
396
- touchStartY;
397
-
398
- function resetState() {
399
- tapping = false;
400
- element.removeClass(ACTIVE_CLASS_NAME);
401
- }
402
-
403
- element.on('touchstart', function(event) {
404
- tapping = true;
405
- tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.
406
- // Hack for Safari, which can target text nodes instead of containers.
407
- if (tapElement.nodeType == 3) {
408
- tapElement = tapElement.parentNode;
409
- }
410
-
411
- element.addClass(ACTIVE_CLASS_NAME);
412
-
413
- startTime = Date.now();
414
-
415
- // Use jQuery originalEvent
416
- var originalEvent = event.originalEvent || event;
417
- var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];
418
- var e = touches[0];
419
- touchStartX = e.clientX;
420
- touchStartY = e.clientY;
421
- });
422
-
423
- element.on('touchmove', function(event) {
424
- resetState();
425
- });
426
-
427
- element.on('touchcancel', function(event) {
428
- resetState();
429
- });
430
-
431
- element.on('touchend', function(event) {
432
- var diff = Date.now() - startTime;
433
-
434
- // Use jQuery originalEvent
435
- var originalEvent = event.originalEvent || event;
436
- var touches = (originalEvent.changedTouches && originalEvent.changedTouches.length) ?
437
- originalEvent.changedTouches :
438
- ((originalEvent.touches && originalEvent.touches.length) ? originalEvent.touches : [originalEvent]);
439
- var e = touches[0];
440
- var x = e.clientX;
441
- var y = e.clientY;
442
- var dist = Math.sqrt(Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2));
443
-
444
- if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {
445
- // Call preventGhostClick so the clickbuster will catch the corresponding click.
446
- preventGhostClick(x, y);
447
-
448
- // Blur the focused element (the button, probably) before firing the callback.
449
- // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.
450
- // I couldn't get anything to work reliably on Android Chrome.
451
- if (tapElement) {
452
- tapElement.blur();
453
- }
454
-
455
- if (!angular.isDefined(attr.disabled) || attr.disabled === false) {
456
- element.triggerHandler('click', [event]);
457
- }
458
- }
459
-
460
- resetState();
461
- });
462
-
463
- // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click
464
- // something else nearby.
465
- element.onclick = function(event) { };
466
-
467
- // Actual click handler.
468
- // There are three different kinds of clicks, only two of which reach this point.
469
- // - On desktop browsers without touch events, their clicks will always come here.
470
- // - On mobile browsers, the simulated "fast" click will call this.
471
- // - But the browser's follow-up slow click will be "busted" before it reaches this handler.
472
- // Therefore it's safe to use this directive on both mobile and desktop.
473
- element.on('click', function(event, touchend) {
474
- scope.$apply(function() {
475
- clickHandler(scope, {$event: (touchend || event)});
476
- });
477
- });
478
-
479
- element.on('mousedown', function(event) {
480
- element.addClass(ACTIVE_CLASS_NAME);
481
- });
482
-
483
- element.on('mousemove mouseup', function(event) {
484
- element.removeClass(ACTIVE_CLASS_NAME);
485
- });
486
-
487
- };
488
- }]);
489
-
490
- /* global ngTouch: false */
491
-
492
- /**
493
- * @ngdoc directive
494
- * @name ngSwipeLeft
495
- *
496
- * @description
497
- * Specify custom behavior when an element is swiped to the left on a touchscreen device.
498
- * A leftward swipe is a quick, right-to-left slide of the finger.
499
- * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag
500
- * too.
501
- *
502
- * To disable the mouse click and drag functionality, add `ng-swipe-disable-mouse` to
503
- * the `ng-swipe-left` or `ng-swipe-right` DOM Element.
504
- *
505
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
506
- *
507
- * @element ANY
508
- * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate
509
- * upon left swipe. (Event object is available as `$event`)
510
- *
511
- * @example
512
- <example module="ngSwipeLeftExample" deps="angular-touch.js">
513
- <file name="index.html">
514
- <div ng-show="!showActions" ng-swipe-left="showActions = true">
515
- Some list content, like an email in the inbox
516
- </div>
517
- <div ng-show="showActions" ng-swipe-right="showActions = false">
518
- <button ng-click="reply()">Reply</button>
519
- <button ng-click="delete()">Delete</button>
520
- </div>
521
- </file>
522
- <file name="script.js">
523
- angular.module('ngSwipeLeftExample', ['ngTouch']);
524
- </file>
525
- </example>
526
- */
527
-
528
- /**
529
- * @ngdoc directive
530
- * @name ngSwipeRight
531
- *
532
- * @description
533
- * Specify custom behavior when an element is swiped to the right on a touchscreen device.
534
- * A rightward swipe is a quick, left-to-right slide of the finger.
535
- * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag
536
- * too.
537
- *
538
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
539
- *
540
- * @element ANY
541
- * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate
542
- * upon right swipe. (Event object is available as `$event`)
543
- *
544
- * @example
545
- <example module="ngSwipeRightExample" deps="angular-touch.js">
546
- <file name="index.html">
547
- <div ng-show="!showActions" ng-swipe-left="showActions = true">
548
- Some list content, like an email in the inbox
549
- </div>
550
- <div ng-show="showActions" ng-swipe-right="showActions = false">
551
- <button ng-click="reply()">Reply</button>
552
- <button ng-click="delete()">Delete</button>
553
- </div>
554
- </file>
555
- <file name="script.js">
556
- angular.module('ngSwipeRightExample', ['ngTouch']);
557
- </file>
558
- </example>
559
- */
560
-
561
- function makeSwipeDirective(directiveName, direction, eventName) {
562
- ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {
563
- // The maximum vertical delta for a swipe should be less than 75px.
564
- var MAX_VERTICAL_DISTANCE = 75;
565
- // Vertical distance should not be more than a fraction of the horizontal distance.
566
- var MAX_VERTICAL_RATIO = 0.3;
567
- // At least a 30px lateral motion is necessary for a swipe.
568
- var MIN_HORIZONTAL_DISTANCE = 30;
569
-
570
- return function(scope, element, attr) {
571
- var swipeHandler = $parse(attr[directiveName]);
572
-
573
- var startCoords, valid;
574
-
575
- function validSwipe(coords) {
576
- // Check that it's within the coordinates.
577
- // Absolute vertical distance must be within tolerances.
578
- // Horizontal distance, we take the current X - the starting X.
579
- // This is negative for leftward swipes and positive for rightward swipes.
580
- // After multiplying by the direction (-1 for left, +1 for right), legal swipes
581
- // (ie. same direction as the directive wants) will have a positive delta and
582
- // illegal ones a negative delta.
583
- // Therefore this delta must be positive, and larger than the minimum.
584
- if (!startCoords) return false;
585
- var deltaY = Math.abs(coords.y - startCoords.y);
586
- var deltaX = (coords.x - startCoords.x) * direction;
587
- return valid && // Short circuit for already-invalidated swipes.
588
- deltaY < MAX_VERTICAL_DISTANCE &&
589
- deltaX > 0 &&
590
- deltaX > MIN_HORIZONTAL_DISTANCE &&
591
- deltaY / deltaX < MAX_VERTICAL_RATIO;
592
- }
593
-
594
- var pointerTypes = ['touch'];
595
- if (!angular.isDefined(attr['ngSwipeDisableMouse'])) {
596
- pointerTypes.push('mouse');
597
- }
598
- $swipe.bind(element, {
599
- 'start': function(coords, event) {
600
- startCoords = coords;
601
- valid = true;
602
- },
603
- 'cancel': function(event) {
604
- valid = false;
605
- },
606
- 'end': function(coords, event) {
607
- if (validSwipe(coords)) {
608
- scope.$apply(function() {
609
- element.triggerHandler(eventName);
610
- swipeHandler(scope, {$event: event});
611
- });
612
- }
613
- }
614
- }, pointerTypes);
615
- };
616
- }]);
617
- }
618
-
619
- // Left is negative X-coordinate, right is positive.
620
- makeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');
621
- makeSwipeDirective('ngSwipeRight', 1, 'swiperight');
622
-
623
-
624
-
625
- })(window, window.angular);
@@ -1,13 +0,0 @@
1
- /*
2
- AngularJS v1.4.0-rc.0
3
- (c) 2010-2015 Google, Inc. http://angularjs.org
4
- License: MIT
5
- */
6
- (function(y,u,z){'use strict';function s(f,k,p){n.directive(f,["$parse","$swipe",function(d,e){return function(l,m,g){function h(a){if(!b)return!1;var c=Math.abs(a.y-b.y);a=(a.x-b.x)*k;return q&&75>c&&0<a&&30<a&&.3>c/a}var c=d(g[f]),b,q,a=["touch"];u.isDefined(g.ngSwipeDisableMouse)||a.push("mouse");e.bind(m,{start:function(a,c){b=a;q=!0},cancel:function(a){q=!1},end:function(a,b){h(a)&&l.$apply(function(){m.triggerHandler(p);c(l,{$event:b})})}},a)}}])}var n=u.module("ngTouch",[]);n.factory("$swipe",
7
- [function(){function f(d){d=d.originalEvent||d;var e=d.touches&&d.touches.length?d.touches:[d];d=d.changedTouches&&d.changedTouches[0]||e[0];return{x:d.clientX,y:d.clientY}}function k(d,e){var l=[];u.forEach(d,function(d){(d=p[d][e])&&l.push(d)});return l.join(" ")}var p={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(d,e,l){var m,g,h,c,b=!1;l=l||["mouse","touch"];d.on(k(l,"start"),function(a){h=
8
- f(a);b=!0;g=m=0;c=h;e.start&&e.start(h,a)});var q=k(l,"cancel");if(q)d.on(q,function(a){b=!1;e.cancel&&e.cancel(a)});d.on(k(l,"move"),function(a){if(b&&h){var d=f(a);m+=Math.abs(d.x-c.x);g+=Math.abs(d.y-c.y);c=d;10>m&&10>g||(g>m?(b=!1,e.cancel&&e.cancel(a)):(a.preventDefault(),e.move&&e.move(d,a)))}});d.on(k(l,"end"),function(a){b&&(b=!1,e.end&&e.end(f(a),a))})}}}]);n.config(["$provide",function(f){f.decorator("ngClickDirective",["$delegate",function(k){k.shift();return k}])}]);n.directive("ngClick",
9
- ["$parse","$timeout","$rootElement",function(f,k,p){function d(c,b,d){for(var a=0;a<c.length;a+=2){var e=c[a+1],g=d;if(25>Math.abs(c[a]-b)&&25>Math.abs(e-g))return c.splice(a,a+2),!0}return!1}function e(c){if(!(2500<Date.now()-m)){var b=c.touches&&c.touches.length?c.touches:[c],e=b[0].clientX,b=b[0].clientY;1>e&&1>b||h&&h[0]===e&&h[1]===b||(h&&(h=null),"label"===c.target.tagName.toLowerCase()&&(h=[e,b]),d(g,e,b)||(c.stopPropagation(),c.preventDefault(),c.target&&c.target.blur()))}}function l(c){c=
10
- c.touches&&c.touches.length?c.touches:[c];var b=c[0].clientX,d=c[0].clientY;g.push(b,d);k(function(){for(var a=0;a<g.length;a+=2)if(g[a]==b&&g[a+1]==d){g.splice(a,a+2);break}},2500,!1)}var m,g,h;return function(c,b,h){function a(){n=!1;b.removeClass("ng-click-active")}var k=f(h.ngClick),n=!1,r,s,v,w;b.on("touchstart",function(a){n=!0;r=a.target?a.target:a.srcElement;3==r.nodeType&&(r=r.parentNode);b.addClass("ng-click-active");s=Date.now();a=a.originalEvent||a;a=(a.touches&&a.touches.length?a.touches:
11
- [a])[0];v=a.clientX;w=a.clientY});b.on("touchmove",function(b){a()});b.on("touchcancel",function(b){a()});b.on("touchend",function(c){var k=Date.now()-s,f=c.originalEvent||c,t=(f.changedTouches&&f.changedTouches.length?f.changedTouches:f.touches&&f.touches.length?f.touches:[f])[0],f=t.clientX,t=t.clientY,x=Math.sqrt(Math.pow(f-v,2)+Math.pow(t-w,2));n&&750>k&&12>x&&(g||(p[0].addEventListener("click",e,!0),p[0].addEventListener("touchstart",l,!0),g=[]),m=Date.now(),d(g,f,t),r&&r.blur(),u.isDefined(h.disabled)&&
12
- !1!==h.disabled||b.triggerHandler("click",[c]));a()});b.onclick=function(a){};b.on("click",function(a,b){c.$apply(function(){k(c,{$event:b||a})})});b.on("mousedown",function(a){b.addClass("ng-click-active")});b.on("mousemove mouseup",function(a){b.removeClass("ng-click-active")})}}]);s("ngSwipeLeft",-1,"swipeleft");s("ngSwipeRight",1,"swiperight")})(window,window.angular);
13
- //# sourceMappingURL=angular-touch.min.js.map
@@ -1,8 +0,0 @@
1
- {
2
- "version":3,
3
- "file":"angular-touch.min.js",
4
- "lineCount":12,
5
- "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA2iBtCC,QAASA,EAAkB,CAACC,CAAD,CAAgBC,CAAhB,CAA2BC,CAA3B,CAAsC,CAC/DC,CAAAC,UAAA,CAAkBJ,CAAlB,CAAiC,CAAC,QAAD,CAAW,QAAX,CAAqB,QAAQ,CAACK,CAAD,CAASC,CAAT,CAAiB,CAQ7E,MAAO,SAAQ,CAACC,CAAD,CAAQC,CAAR,CAAiBC,CAAjB,CAAuB,CAKpCC,QAASA,EAAU,CAACC,CAAD,CAAS,CAS1B,GAAKC,CAAAA,CAAL,CAAkB,MAAO,CAAA,CACzB,KAAIC,EAASC,IAAAC,IAAA,CAASJ,CAAAK,EAAT,CAAoBJ,CAAAI,EAApB,CACTC,EAAAA,EAAUN,CAAAO,EAAVD,CAAqBL,CAAAM,EAArBD,EAAsChB,C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A4D,EAAA,EA7BqC,CAAvC,CAkCAjF,EAAAuG,QAAA,CAAkBC,QAAQ,CAACnF,CAAD,CAAQ,EAQlCrB,EAAAkD,GAAA,CAAW,OAAX,CAAoB,QAAQ,CAAC7B,CAAD,CAAQoF,CAAR,CAAkB,CAC5C1G,CAAAyB,OAAA,CAAa,QAAQ,EAAG,CACtB6D,CAAA,CAAatF,CAAb,CAAoB,CAAC2B,OAAS+E,CAAT/E,EAAqBL,CAAtB,CAApB,CADsB,CAAxB,CAD4C,CAA9C,CAMArB,EAAAkD,GAAA,CAAW,WAAX,CAAwB,QAAQ,CAAC7B,CAAD,CAAQ,CACtCrB,CAAA8F,SAAA,CAzOoBV,iBAyOpB,CADsC,CAAxC,CAIApF,EAAAkD,GAAA,CAAW,mBAAX,CAAgC,QAAQ,CAAC7B,CAAD,CAAQ,CAC9CrB,CAAAmF,YAAA,CA7OoBC,iBA6OpB,CAD8C,CAAhD,CA7FoC,CArJK,CADhB,CAA7B,CA4XA7F,EAAA,CAAmB,aAAnB,CAAmC,EAAnC,CAAsC,WAAtC,CACAA,EAAA,CAAmB,cAAnB,CAAmC,CAAnC,CAAsC,YAAtC,CAvmBsC,CAArC,CAAD,CA2mBGH,MA3mBH,CA2mBWA,MAAAC,QA3mBX;",
6
- "sources":["angular-touch.js"],
7
- "names":["window","angular","undefined","makeSwipeDirective","directiveName","direction","eventName","ngTouch","directive","$parse","$swipe","scope","element","attr","validSwipe","coords","startCoords","deltaY","Math","abs","y","deltaX","x","valid","MAX_VERTICAL_DISTANCE","MIN_HORIZONTAL_DISTANCE","MAX_VERTICAL_RATIO","swipeHandler","pointerTypes","isDefined","push","bind","start","event","cancel","end","$apply","triggerHandler","$event","module","factory","getCoordinates","originalEvent","touches","length","e","changedTouches","clientX","clientY","getEvents","eventType","res","forEach","pointerType","POINTER_EVENTS","join","move","eventHandlers","totalX","totalY","lastPos","active","on","events","MOVE_BUFFER_RADIUS","preventDefault","config","$provide","decorator","$delegate","shift","$timeout","$rootElement","checkAllowableRegions","touchCoordinates","i","CLICKBUSTER_THRESHOLD","x1","y1","y2","splice","onClick","PREVENT_DURATION","Date","now","lastPreventedTime","lastLabelClickCoordinates","target","tagName","toLowerCase","stopPropagation","blur","onTouchStart","resetState","tapping","removeClass","ACTIVE_CLASS_NAME","clickHandler","ngClick","tapElement","startTime","touchStartX","touchStartY","srcElement","nodeType","parentNode","addClass","diff","dist","sqrt","pow","TAP_DURATION","MOVE_TOLERANCE","addEventListener","disabled","onclick","element.onclick","touchend"]
8
- }