unpoly-rails 2.1.0 → 2.2.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +472 -51
  4. data/assets/unpoly/jasmine.css +60 -0
  5. data/assets/unpoly/jasmine.js +19300 -0
  6. data/assets/unpoly/specs.css +18 -0
  7. data/assets/unpoly/specs.es5.js +28121 -0
  8. data/assets/unpoly/specs.js +28265 -0
  9. data/{dist → assets/unpoly}/unpoly-bootstrap3.css +1 -0
  10. data/assets/unpoly/unpoly-bootstrap3.js +54 -0
  11. data/{dist → assets/unpoly}/unpoly-bootstrap3.min.css +1 -0
  12. data/assets/unpoly/unpoly-bootstrap3.min.js +1 -0
  13. data/{dist → assets/unpoly}/unpoly-bootstrap4.css +1 -0
  14. data/assets/unpoly/unpoly-bootstrap4.js +54 -0
  15. data/{dist → assets/unpoly}/unpoly-bootstrap4.min.css +1 -0
  16. data/assets/unpoly/unpoly-bootstrap4.min.js +1 -0
  17. data/{dist → assets/unpoly}/unpoly-bootstrap5.css +1 -0
  18. data/assets/unpoly/unpoly-bootstrap5.js +56 -0
  19. data/{dist → assets/unpoly}/unpoly-bootstrap5.min.css +1 -0
  20. data/assets/unpoly/unpoly-bootstrap5.min.js +1 -0
  21. data/assets/unpoly/unpoly-migrate.js +1281 -0
  22. data/assets/unpoly/unpoly-migrate.min.js +1 -0
  23. data/{dist → assets/unpoly}/unpoly.css +23 -14
  24. data/assets/unpoly/unpoly.es5.js +23195 -0
  25. data/assets/unpoly/unpoly.es5.min.js +1 -0
  26. data/assets/unpoly/unpoly.js +21457 -0
  27. data/assets/unpoly/unpoly.min.css +10 -0
  28. data/assets/unpoly/unpoly.min.js +1 -0
  29. data/lib/unpoly-rails.rb +12 -12
  30. data/lib/unpoly/rails/controller.rb +1 -1
  31. data/lib/unpoly/rails/engine.rb +13 -20
  32. data/lib/unpoly/rails/request_echo_headers.rb +1 -1
  33. data/lib/unpoly/rails/version.rb +1 -1
  34. metadata +61 -30
  35. data/CHANGELOG.md +0 -2373
  36. data/README_RAILS.md +0 -418
  37. data/dist/unpoly-bootstrap3.js +0 -16
  38. data/dist/unpoly-bootstrap3.min.js +0 -1
  39. data/dist/unpoly-bootstrap4.js +0 -16
  40. data/dist/unpoly-bootstrap4.min.js +0 -1
  41. data/dist/unpoly-bootstrap5.js +0 -14
  42. data/dist/unpoly-bootstrap5.min.js +0 -1
  43. data/dist/unpoly-migrate.js +0 -1339
  44. data/dist/unpoly-migrate.min.js +0 -1
  45. data/dist/unpoly.js +0 -22266
  46. data/dist/unpoly.min.css +0 -1
  47. data/dist/unpoly.min.js +0 -6
  48. data/lib/unpoly/tasks.rb +0 -55
@@ -1 +0,0 @@
1
- (function(){up.feedback.config.currentClasses.push("active"),up.feedback.config.navSelectors.push(".nav",".navbar"),up.form.config.validateTargets.unshift(".form-group:has(:origin)"),up.viewport.config.fixedTop.push(".navbar.fixed-top"),up.viewport.config.fixedBottom.push(".navbar.fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar.fixed-top",".navbar.fixed-bottom"),up.fragment.config.badTargetClasses.push("row",/^col(-xs|-sm|-md|-lg|-xl)?(-\d+)?$/,/^[mp][tblrxy]?-\d+$/)}).call(this);
@@ -1,14 +0,0 @@
1
- (function() {
2
- up.feedback.config.currentClasses.push('active');
3
-
4
- up.feedback.config.navSelectors.push('.nav', '.navbar');
5
-
6
- up.viewport.config.fixedTop.push('.navbar.fixed-top');
7
-
8
- up.viewport.config.fixedBottom.push('.navbar.fixed-bottom');
9
-
10
- up.viewport.config.anchoredRight.push('.navbar.fixed-top', '.navbar.fixed-bottom');
11
-
12
- up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg|-xl|-xxl)?(-\d+)?$/, /^[mp][tbsexy]?-\d+$/);
13
-
14
- }).call(this);
@@ -1 +0,0 @@
1
- (function(){up.feedback.config.currentClasses.push("active"),up.feedback.config.navSelectors.push(".nav",".navbar"),up.viewport.config.fixedTop.push(".navbar.fixed-top"),up.viewport.config.fixedBottom.push(".navbar.fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar.fixed-top",".navbar.fixed-bottom"),up.fragment.config.badTargetClasses.push("row",/^col(-xs|-sm|-md|-lg|-xl|-xxl)?(-\d+)?$/,/^[mp][tbsexy]?-\d+$/)}).call(this);
@@ -1,1339 +0,0 @@
1
- (function() {
2
- up.framework.startExtension();
3
-
4
- }).call(this);
5
- (function() {
6
- var u,
7
- slice = [].slice;
8
-
9
- u = up.util;
10
-
11
-
12
- /***
13
- @module up.migrate
14
- */
15
-
16
- up.migrate = (function() {
17
- var config, deprecated, fixEventType, fixEventTypes, fixKey, formerlyAsync, renamedEvent, renamedEvents, renamedPackage, renamedProperty, reset, warn, warnedMessages;
18
- config = new up.Config(function() {
19
- return {
20
- logLevel: 'warn'
21
- };
22
- });
23
- renamedProperty = function(object, oldKey, newKey) {
24
- var warning;
25
- warning = function() {
26
- return warn('Property { %s } has been renamed to { %s } (found in %o)', oldKey, newKey, object);
27
- };
28
- return Object.defineProperty(object, oldKey, {
29
- get: function() {
30
- warning();
31
- return this[newKey];
32
- },
33
- set: function(newValue) {
34
- warning();
35
- return this[newKey] = newValue;
36
- }
37
- });
38
- };
39
- fixKey = function(object, oldKey, newKey) {
40
- if (u.isDefined(object[oldKey])) {
41
- warn('Property { %s } has been renamed to { %s } (found in %o)', oldKey, newKey, object);
42
- return u.renameKey(object, oldKey, newKey);
43
- }
44
- };
45
- renamedEvents = {};
46
- renamedEvent = function(oldType, newType) {
47
- return renamedEvents[oldType] = newType;
48
- };
49
- fixEventType = function(eventType) {
50
- var newEventType;
51
- if (newEventType = renamedEvents[eventType]) {
52
- warn("Event " + eventType + " has been renamed to " + newEventType);
53
- return newEventType;
54
- } else {
55
- return eventType;
56
- }
57
- };
58
- fixEventTypes = function(eventTypes) {
59
- return u.uniq(u.map(eventTypes, fixEventType));
60
- };
61
- renamedPackage = function(oldName, newName) {
62
- return Object.defineProperty(up, oldName, {
63
- get: function() {
64
- warn("up." + oldName + " has been renamed to up." + newName);
65
- return up[newName];
66
- }
67
- });
68
- };
69
- warnedMessages = {};
70
- warn = function() {
71
- var args, formattedMessage, message, ref;
72
- message = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
73
- formattedMessage = u.sprintf.apply(u, [message].concat(slice.call(args)));
74
- if (!warnedMessages[formattedMessage]) {
75
- warnedMessages[formattedMessage] = true;
76
- return (ref = up.log)[config.logLevel].apply(ref, ['unpoly-migrate', message].concat(slice.call(args)));
77
- }
78
- };
79
- deprecated = function(deprecatedExpression, replacementExpression) {
80
- return warn(deprecatedExpression + " has been deprecated. Use " + replacementExpression + " instead.");
81
- };
82
- formerlyAsync = function(label) {
83
- var oldThen, promise;
84
- promise = Promise.resolve();
85
- oldThen = promise.then;
86
- promise.then = function() {
87
- warn(label + " is now a sync function");
88
- return oldThen.apply(this, arguments);
89
- };
90
- return promise;
91
- };
92
- reset = function() {
93
- return config.reset();
94
- };
95
- up.on('up:framework:reset', reset);
96
- return {
97
- deprecated: deprecated,
98
- renamedPackage: renamedPackage,
99
- renamedProperty: renamedProperty,
100
- formerlyAsync: formerlyAsync,
101
- renamedEvent: renamedEvent,
102
- fixEventTypes: fixEventTypes,
103
- fixKey: fixKey,
104
- warn: warn,
105
- loaded: true,
106
- config: config
107
- };
108
- })();
109
-
110
- }).call(this);
111
-
112
- /***
113
- @module up.util
114
- */
115
-
116
-
117
- /***
118
- Returns a copy of the given object that only contains
119
- the given keys.
120
-
121
- @function up.util.only
122
- @param {Object} object
123
- @param {Array} ...keys
124
- @deprecated
125
- Use `up.util.pick()` instead.
126
- */
127
-
128
- (function() {
129
- var slice = [].slice;
130
-
131
- up.util.only = function() {
132
- var keys, object;
133
- object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
134
- up.migrate.deprecated('up.util.only(object, ...keys)', 'up.util.pick(object, keys)');
135
- return up.util.pick(object, keys);
136
- };
137
-
138
-
139
- /***
140
- Returns a copy of the given object that contains all except
141
- the given keys.
142
-
143
- @function up.util.except
144
- @param {Object} object
145
- @param {Array} ...keys
146
- @deprecated
147
- Use `up.util.omit(object, keys)` (with an array argument) instead of `up.util.object(...keys)` (with rest arguments).
148
- */
149
-
150
- up.util.except = function() {
151
- var keys, object;
152
- object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
153
- up.migrate.deprecated('up.util.except(object, ...keys)', 'up.util.omit(object, keys)');
154
- return up.util.omit(object, keys);
155
- };
156
-
157
- up.util.parseUrl = function() {
158
- var args, ref;
159
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
160
- up.migrate.warn('up.util.parseUrl() has been renamed to up.util.parseURL()');
161
- return (ref = up.util).parseURL.apply(ref, args);
162
- };
163
-
164
- up.util.any = function() {
165
- var args;
166
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
167
- up.migrate.warn('up.util.any() has been renamed to up.util.some()');
168
- return some.apply(null, args);
169
- };
170
-
171
- up.util.all = function() {
172
- var args, ref;
173
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
174
- up.migrate.warn('up.util.all() has been renamed to up.util.every()');
175
- return (ref = up.util).every.apply(ref, args);
176
- };
177
-
178
- up.util.detect = function() {
179
- var args, ref;
180
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
181
- up.migrate.warn('up.util.detect() has been renamed to up.util.find()');
182
- return (ref = up.util).find.apply(ref, args);
183
- };
184
-
185
- up.util.select = function() {
186
- var args, ref;
187
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
188
- up.migrate.warn('up.util.select() has been renamed to up.util.filter()');
189
- return (ref = up.util).filter.apply(ref, args);
190
- };
191
-
192
- up.util.setTimer = function() {
193
- var args, ref;
194
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
195
- up.migrate.warn('up.util.setTimer() has been renamed to up.util.timer()');
196
- return (ref = up.util).timer.apply(ref, args);
197
- };
198
-
199
- up.util.escapeHtml = function() {
200
- var args, ref;
201
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
202
- up.migrate.deprecated('up.util.escapeHtml', 'up.util.escapeHTML');
203
- return (ref = up.util).escapeHTML.apply(ref, args);
204
- };
205
-
206
- up.util.selectorForElement = function() {
207
- var args, ref;
208
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
209
- up.migrate.warn('up.util.selectorForElement() has been renamed to up.fragment.toTarget()');
210
- return (ref = up.fragment).toTarget.apply(ref, args);
211
- };
212
-
213
- up.util.nextFrame = function() {
214
- var args, ref;
215
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
216
- up.migrate.warn('up.util.nextFrame() has been renamed to up.util.task()');
217
- return (ref = up.util).task.apply(ref, args);
218
- };
219
-
220
- }).call(this);
221
-
222
- /***
223
- @module up.element
224
- */
225
-
226
-
227
- /***
228
- Returns the first descendant element matching the given selector.
229
-
230
- @function up.element.first
231
- @param {Element} [parent=document]
232
- The parent element whose descendants to search.
233
-
234
- If omitted, all elements in the `document` will be searched.
235
- @param {string} selector
236
- The CSS selector to match.
237
- @return {Element|undefined|null}
238
- The first element matching the selector.
239
-
240
- Returns `null` or `undefined` if no element macthes.
241
- @deprecated
242
- Use `up.element.get()` instead.
243
- */
244
-
245
- (function() {
246
- var slice = [].slice;
247
-
248
- up.element.first = function() {
249
- var args, ref;
250
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
251
- up.migrate.deprecated('up.element.first()', 'up.element.get()');
252
- return (ref = up.element).get.apply(ref, args);
253
- };
254
-
255
- up.element.createFromHtml = function() {
256
- var args, ref;
257
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
258
- up.migrate.deprecated('up.element.createFromHtml', 'up.element.createFromHTML');
259
- return (ref = up.element).createFromHTML.apply(ref, args);
260
- };
261
-
262
- }).call(this);
263
-
264
- /***
265
- @module up.event
266
- */
267
-
268
- (function() {
269
- var slice = [].slice;
270
-
271
- up.migrate.renamedPackage('bus', 'event');
272
-
273
-
274
- /***
275
- [Emits an event](/up.emit) and returns whether no listener
276
- has prevented the default action.
277
-
278
- \#\#\# Example
279
-
280
- ```javascript
281
- if (up.event.nobodyPrevents('disk:erase')) {
282
- Disk.erase()
283
- })
284
- ```
285
-
286
- @function up.event.nobodyPrevents
287
- @param {string} eventType
288
- @param {Object} eventProps
289
- @return {boolean}
290
- whether no listener has prevented the default action
291
- @deprecated
292
- Use `!up.emit(type).defaultPrevented` instead.
293
- */
294
-
295
- up.event.nobodyPrevents = function() {
296
- var args, event;
297
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
298
- up.migrate.deprecated('up.event.nobodyPrevents(type)', '!up.emit(type).defaultPrevented');
299
- event = up.emit.apply(up, args);
300
- return !event.defaultPrevented;
301
- };
302
-
303
- }).call(this);
304
- (function() {
305
- var e, u;
306
-
307
- u = up.util;
308
-
309
- e = up.element;
310
-
311
- up.migrate.postCompile = function(elements, compiler) {
312
- var element, i, keepValue, len, results, value;
313
- if (keepValue = compiler.keep) {
314
- up.migrate.warn('The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.');
315
- value = u.isString(keepValue) ? keepValue : '';
316
- results = [];
317
- for (i = 0, len = elements.length; i < len; i++) {
318
- element = elements[i];
319
- results.push(element.setAttribute('up-keep', value));
320
- }
321
- return results;
322
- }
323
- };
324
-
325
- up.migrate.targetMacro = function(queryAttr, fixedResultAttrs, callback) {
326
- return up.macro("[" + queryAttr + "]", function(link) {
327
- var optionalTarget, resultAttrs;
328
- resultAttrs = u.copy(fixedResultAttrs);
329
- if (optionalTarget = link.getAttribute(queryAttr)) {
330
- resultAttrs['up-target'] = optionalTarget;
331
- } else {
332
- resultAttrs['up-follow'] = '';
333
- }
334
- e.setMissingAttrs(link, resultAttrs);
335
- link.removeAttribute(queryAttr);
336
- return typeof callback === "function" ? callback() : void 0;
337
- });
338
- };
339
-
340
- }).call(this);
341
-
342
- /***
343
- @module up.form
344
- */
345
-
346
- (function() {
347
- up.migrate.renamedProperty(up.form.config, 'fields', 'fieldSelectors');
348
-
349
- up.migrate.renamedProperty(up.form.config, 'submitButtons', 'submitButtonSelectors');
350
-
351
- }).call(this);
352
- (function() {
353
- var u,
354
- slice = [].slice;
355
-
356
- u = up.util;
357
-
358
-
359
- /***
360
- @module up.fragment
361
- */
362
-
363
- up.migrate.renamedPackage('flow', 'fragment');
364
-
365
- up.migrate.renamedPackage('dom', 'fragment');
366
-
367
- up.migrate.renamedProperty(up.fragment.config, 'fallbacks', 'mainTargets');
368
-
369
- up.migrate.handleResponseDocOptions = function(docOptions) {
370
- return up.migrate.fixKey(docOptions, 'html', 'document');
371
- };
372
-
373
-
374
- /***
375
- Replaces elements on the current page with corresponding elements
376
- from a new page fetched from the server.
377
-
378
- @function up.replace
379
- @param {string|Element|jQuery} target
380
- The CSS selector to update. You can also pass a DOM element or jQuery element
381
- here, in which case a selector will be inferred from the element's class and ID.
382
- @param {string} url
383
- The URL to fetch from the server.
384
- @param {Object} [options]
385
- See `options` for `up.render()`.
386
- @return {Promise}
387
- A promise that fulfills when the page has been updated.
388
- @deprecated
389
- Use `up.render()` or `up.navigate()` instead.
390
- */
391
-
392
- up.replace = function(target, url, options) {
393
- up.migrate.deprecated('up.replace(target, url)', 'up.navigate(target, { url })');
394
- return up.navigate(u.merge(options, {
395
- target: target,
396
- url: url
397
- }));
398
- };
399
-
400
-
401
- /***
402
- Updates a selector on the current page with the
403
- same selector from the given HTML string.
404
-
405
- \#\#\# Example
406
-
407
- Let's say your current HTML looks like this:
408
-
409
- <div class="one">old one</div>
410
- <div class="two">old two</div>
411
-
412
- We now replace the second `<div>`, using an HTML string
413
- as the source:
414
-
415
- html = '<div class="one">new one</div>' +
416
- '<div class="two">new two</div>';
417
-
418
- up.extract('.two', html)
419
-
420
- Unpoly looks for the selector `.two` in the strings and updates its
421
- contents in the current page. The current page now looks like this:
422
-
423
- <div class="one">old one</div>
424
- <div class="two">new two</div>
425
-
426
- Note how only `.two` has changed. The update for `.one` was
427
- discarded, since it didn't match the selector.
428
-
429
- @function up.extract
430
- @param {string|Element|jQuery} target
431
- @param {string} html
432
- @param {Object} [options]
433
- See options for [`up.render()`](/up.render).
434
- @return {Promise}
435
- A promise that will be fulfilled when the selector was updated.
436
- @deprecated
437
- Use `up.render()` or `up.navigate()` instead.
438
- */
439
-
440
- up.extract = function(target, document, options) {
441
- up.migrate.deprecated('up.extract(target, document)', 'up.navigate(target, { document })');
442
- return up.navigate(u.merge(options, {
443
- target: target,
444
- document: document
445
- }));
446
- };
447
-
448
-
449
- /***
450
- Returns the first element matching the given selector, but
451
- ignores elements that are being [destroyed](/up.destroy) or that are being
452
- removed by a [transition](/up.morph).
453
-
454
- Returns `undefined` if no element matches these conditions.
455
-
456
- @function up.fragment.first
457
- @param {Element|jQuery} [root=document]
458
- The root element for the search. Only the root's children will be matched.
459
-
460
- May be omitted to search through all elements in the `document`.
461
- @param {string} selector
462
- The selector to match
463
- @param {string} [options.layer='current']
464
- The the layer in which to find the element.
465
-
466
- @see layer-option
467
- @param {string|Element|jQuery} [options.origin]
468
- An second element or selector that can be referenced as `:origin` in the first selector:
469
- @return {Element|undefined}
470
- The first element that is neither a ghost or being destroyed,
471
- or `undefined` if no such element was found.
472
- @deprecated
473
- Use `up.fragment.get()` instead.
474
- */
475
-
476
- up.fragment.first = function() {
477
- var args, ref;
478
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
479
- up.migrate.deprecated('up.fragment.first()', 'up.fragment.get()');
480
- return (ref = up.fragment).get.apply(ref, args);
481
- };
482
-
483
- up.first = up.fragment.first;
484
-
485
- up.migrate.handleScrollOptions = function(options) {
486
- if (u.isUndefined(options.scroll)) {
487
- if (u.isString(options.reveal)) {
488
- up.migrate.deprecated("Option { reveal: '" + options.reveal + "' }", "{ scroll: '" + options.reveal + "' }");
489
- options.scroll = options.reveal;
490
- } else if (options.reveal === true) {
491
- up.migrate.deprecated('Option { reveal: true }', "{ scroll: 'target' }");
492
- options.scroll = 'target';
493
- } else if (options.reveal === false) {
494
- up.migrate.deprecated('Option { reveal: false }', "{ scroll: false }");
495
- options.scroll = false;
496
- }
497
- if (u.isDefined(options.resetScroll)) {
498
- up.migrate.deprecated('Option { resetScroll: true }', "{ scroll: 'reset' }");
499
- options.scroll = 'teset';
500
- }
501
- if (u.isDefined(options.restoreScroll)) {
502
- up.migrate.deprecated('Option { restoreScroll: true }', "{ scroll: 'restore' }");
503
- return options.scroll = 'restore';
504
- }
505
- }
506
- };
507
-
508
- up.migrate.handleHistoryOption = function(options) {
509
- if (u.isString(options.history) && options.history !== 'auto') {
510
- up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead.");
511
- options.location = options.history;
512
- return options.history = 'auto';
513
- }
514
- };
515
-
516
- up.migrate.preprocessRenderOptions = function(options) {
517
- var i, len, prop, ref, results;
518
- up.migrate.handleHistoryOption(options);
519
- ref = ['target', 'origin'];
520
- results = [];
521
- for (i = 0, len = ref.length; i < len; i++) {
522
- prop = ref[i];
523
- if (u.isJQuery(options[prop])) {
524
- up.migrate.warn('Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.', prop);
525
- results.push(options[prop] = up.element.get(options[prop]));
526
- } else {
527
- results.push(void 0);
528
- }
529
- }
530
- return results;
531
- };
532
-
533
- }).call(this);
534
-
535
- /***
536
- @module up.history
537
- */
538
-
539
- (function() {
540
- up.migrate.renamedProperty(up.history.config, 'popTargets', 'restoreTargets');
541
-
542
-
543
- /***
544
- Returns a normalized URL for the current history entry.
545
-
546
- @function up.history.url
547
- @return {string}
548
- @deprecated Use the `up.history.location` property instead.
549
- */
550
-
551
- up.history.url = function() {
552
- up.migrate.deprecated('up.history.url()', 'up.history.location');
553
- return up.history.location;
554
- };
555
-
556
- up.migrate.renamedEvent('up:history:push', 'up:location:changed');
557
-
558
- up.migrate.renamedEvent('up:history:pushed', 'up:location:changed');
559
-
560
- up.migrate.renamedEvent('up:history:restore', 'up:location:changed');
561
-
562
- up.migrate.renamedEvent('up:history:restored', 'up:location:changed');
563
-
564
- up.migrate.renamedEvent('up:history:replaced', 'up:location:changed');
565
-
566
- }).call(this);
567
-
568
- /***
569
- @module up.feedback
570
- */
571
-
572
- (function() {
573
- up.migrate.renamedPackage('navigation', 'feedback');
574
-
575
- up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
576
-
577
- }).call(this);
578
-
579
- /***
580
- @module up.link
581
- */
582
-
583
- (function() {
584
- up.migrate.parseFollowOptions = function(parser) {
585
- parser.string('flavor');
586
- parser.string('width');
587
- parser.string('height');
588
- parser.boolean('closable');
589
- parser.booleanOrString('reveal');
590
- parser.boolean('resetScroll');
591
- parser.boolean('restoreScroll');
592
- return parser.booleanOrString('historyVisible');
593
- };
594
-
595
-
596
- /***
597
- [Follows](/up.follow) this link as fast as possible.
598
-
599
- This is done by:
600
-
601
- - [Following the link through AJAX](/a-up-follow) instead of a full page load
602
- - [Preloading the link's destination URL](/a-up-preload)
603
- - [Triggering the link on `mousedown`](/a-up-instant) instead of on `click`
604
-
605
- \#\#\# Example
606
-
607
- Use `[up-dash]` like this:
608
-
609
- <a href="/users" up-dash=".main">User list</a>
610
-
611
- This is shorthand for:
612
-
613
- <a href="/users" up-target=".main" up-instant up-preload>User list</a>
614
-
615
- @selector a[up-dash]
616
- @param [up-dash='body']
617
- The CSS selector to replace
618
-
619
- Inside the CSS selector you may refer to this link as `&` ([like in Sass](https://sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector)).
620
- @deprecated
621
- To accelerate all links use `up.link.config.instantSelectors` and `up.link.config.preloadSelectors`.
622
- */
623
-
624
- up.migrate.targetMacro('up-dash', {
625
- 'up-preload': '',
626
- 'up-instant': ''
627
- }, function() {
628
- return up.migrate.deprecated('a[up-dash]', 'up.link.config.instantSelectors or up.link.config.preloadSelectors');
629
- });
630
-
631
- }).call(this);
632
-
633
- /***
634
- @module up.layer
635
- */
636
-
637
- (function() {
638
- up.migrate.handleLayerOptions = function(options) {
639
- var dimensionKey, i, len, ref;
640
- up.migrate.fixKey(options, 'flavor', 'mode');
641
- up.migrate.fixKey(options, 'closable', 'dismissable');
642
- up.migrate.fixKey(options, 'closeLabel', 'dismissLabel');
643
- ref = ['width', 'maxWidth', 'height'];
644
- for (i = 0, len = ref.length; i < len; i++) {
645
- dimensionKey = ref[i];
646
- if (options[dimensionKey]) {
647
- up.migrate.warn("Layer option { " + dimensionKey + " } has been removed. Use { size } or { class } instead.");
648
- }
649
- }
650
- if (options.sticky) {
651
- up.migrate.warn('Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click.');
652
- }
653
- if (options.template) {
654
- up.migrate.warn('Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open.');
655
- }
656
- if (options.layer === 'page') {
657
- up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }.");
658
- options.layer = 'root';
659
- }
660
- if (options.layer === 'modal' || options.layer === 'popup') {
661
- up.migrate.warn("Option { layer: '" + options.layer + "' } has been removed. Did you mean { layer: 'overlay' }?");
662
- return options.layer = 'overlay';
663
- }
664
- };
665
-
666
- up.migrate.handleTetherOptions = function(options) {
667
- var align, position, ref;
668
- ref = options.position.split('-'), position = ref[0], align = ref[1];
669
- if (align) {
670
- up.migrate.warn('The position value %o is deprecated. Use %o instead.', options.position, {
671
- position: position,
672
- align: align
673
- });
674
- options.position = position;
675
- return options.align = align;
676
- }
677
- };
678
-
679
-
680
- /***
681
- When this element is clicked, closes a currently open overlay.
682
-
683
- Does nothing if no overlay is currently open.
684
-
685
- To make a link that closes the current overlay, but follows to
686
- a fallback destination on the root layer:
687
-
688
- <a href="/fallback" up-close>Okay</a>
689
-
690
- @selector a[up-close]
691
- @deprecated
692
- Use `a[up-dismiss]` instead.
693
- */
694
-
695
- up.migrate.registerLayerCloser = function(layer) {
696
- return layer.registerClickCloser('up-close', (function(_this) {
697
- return function(value, closeOptions) {
698
- up.migrate.deprecated('[up-close]', '[up-dismiss]');
699
- return layer.dismiss(value, closeOptions);
700
- };
701
- })(this));
702
- };
703
-
704
- up.migrate.handleLayerConfig = function(config) {
705
- return up.migrate.fixKey(config, 'historyVisible', 'history');
706
- };
707
-
708
- up.util.getter(up.Layer.prototype, 'historyVisible', function() {
709
- up.migrate.deprecated('up.Layer#historyVisible', 'up.Layer#history');
710
- return this.history;
711
- });
712
-
713
- }).call(this);
714
-
715
- /***
716
- @module up.layer
717
- */
718
-
719
- (function() {
720
- var FLAVORS_ERROR, u;
721
-
722
- u = up.util;
723
-
724
- FLAVORS_ERROR = new Error('up.modal.flavors has been removed without direct replacement. You may give new layers a { class } or modify layer elements on up:layer:open.');
725
-
726
- up.modal = u.literal({
727
-
728
- /***
729
- Opens a modal overlay for the given URL.
730
-
731
- @function up.modal.visit
732
- @param {string} url
733
- The URL to load.
734
- @param {Object} options
735
- See options for `up.render()`.
736
- @deprecated
737
- Use `up.layer.open({ url, mode: "modal" })` instead.
738
- */
739
- visit: function(url, options) {
740
- if (options == null) {
741
- options = {};
742
- }
743
- up.migrate.deprecated('up.modal.visit(url)', 'up.layer.open({ url, mode: "modal" })');
744
- return up.layer.open(u.merge(options, {
745
- url: url,
746
- mode: 'modal'
747
- }));
748
- },
749
-
750
- /***
751
- Opens the given link's destination in a modal overlay.
752
-
753
- @function up.modal.follow
754
- @param {Element|jQuery|string} linkOrSelector
755
- The link to follow.
756
- @param {string} [options]
757
- See options for `up.render()`.
758
- @return {Promise}
759
- A promise that will be fulfilled when the modal has been opened.
760
- @deprecated
761
- Use `up.follow(link, { layer: "modal" })` instead.
762
- */
763
- follow: function(link, options) {
764
- if (options == null) {
765
- options = {};
766
- }
767
- up.migrate.deprecated('up.modal.follow(link)', 'up.follow(link, { layer: "modal" })');
768
- return up.follow(link, u.merge(options, {
769
- layer: 'modal'
770
- }));
771
- },
772
-
773
- /***
774
- [Extracts](/up.extract) the given CSS selector from the given HTML string and
775
- opens the results in a modal overlay.
776
-
777
- @function up.modal.extract
778
- @param {string} selector
779
- The CSS selector to extract from the HTML.
780
- @param {string} document
781
- The HTML containing the modal content.
782
- @param {Object} options
783
- See options for [`up.modal.follow()`](/up.modal.follow).
784
- @return {Promise}
785
- A promise that will be fulfilled when the modal has been opened.
786
- @deprecated
787
- Use `up.layer.open({ document, mode: "modal" })` instead.
788
- */
789
- extract: function(target, html, options) {
790
- if (options == null) {
791
- options = {};
792
- }
793
- up.migrate.deprecated('up.modal.extract(target, document)', 'up.layer.open({ document, mode: "modal" })');
794
- return up.layer.open(u.merge(options, {
795
- target: target,
796
- html: html,
797
- layer: 'modal'
798
- }));
799
- },
800
-
801
- /***
802
- Closes a currently open overlay.
803
-
804
- @function up.modal.close
805
- @param {Object} options
806
- @return {Promise}
807
- @deprecated
808
- Use `up.layer.dismiss()` instead.
809
- */
810
- close: function(options) {
811
- if (options == null) {
812
- options = {};
813
- }
814
- up.migrate.deprecated('up.modal.close()', 'up.layer.dismiss()');
815
- up.layer.dismiss(null, options);
816
- return up.migrate.formerlyAsync('up.layer.dismiss()');
817
- },
818
-
819
- /***
820
- Returns the location URL of the fragment displayed in the current overlay.
821
-
822
- @function up.modal.url
823
- @return {string}
824
- @deprecated
825
- Use `up.layer.location` instead.
826
- */
827
- url: function() {
828
- up.migrate.deprecated('up.modal.url()', 'up.layer.location');
829
- return up.layer.location;
830
- },
831
-
832
- /***
833
- Returns the location URL of the layer behind the current overlay.
834
-
835
- @function up.modal.coveredUrl
836
- @return {string}
837
- @deprecated
838
- Use `up.layer.parent.location` instead.
839
- */
840
- coveredUrl: function() {
841
- var ref;
842
- up.migrate.deprecated('up.modal.coveredUrl()', 'up.layer.parent.location');
843
- return (ref = up.layer.parent) != null ? ref.location : void 0;
844
- },
845
-
846
- /***
847
- Sets default options for future modal overlays.
848
-
849
- @property up.modal.config
850
- @deprecated
851
- Use `up.layer.config.modal` instead.
852
- */
853
- get_config: function() {
854
- up.migrate.deprecated('up.modal.config', 'up.layer.config.modal');
855
- return up.layer.config.modal;
856
- },
857
-
858
- /***
859
- Returns whether the given element or selector is contained
860
- within the current layer.
861
-
862
- @function up.modal.contains
863
- @param {string} elementOrSelector
864
- The element to test
865
- @return {boolean}
866
- @deprecated
867
- Use `up.layer.contains()` instead.
868
- */
869
- contains: function(element) {
870
- up.migrate.deprecated('up.modal.contains()', 'up.layer.contains()');
871
- return up.layer.contains(element);
872
- },
873
-
874
- /***
875
- Returns whether an overlay is currently open.
876
-
877
- @function up.modal.isOpen
878
- @return {boolean}
879
- @deprecated
880
- Use `up.layer.isOverlay()` instead.
881
- */
882
- isOpen: function() {
883
- up.migrate.deprecated('up.modal.isOpen()', 'up.layer.isOverlay()');
884
- return up.layer.isOverlay();
885
- },
886
- get_flavors: function() {
887
- throw FLAVORS_ERROR;
888
- },
889
- flavor: function() {
890
- throw FLAVORS_ERROR;
891
- }
892
- });
893
-
894
- up.migrate.renamedEvent('up:modal:open', 'up:layer:open');
895
-
896
- up.migrate.renamedEvent('up:modal:opened', 'up:layer:opened');
897
-
898
- up.migrate.renamedEvent('up:modal:close', 'up:layer:dismiss');
899
-
900
- up.migrate.renamedEvent('up:modal:closed', 'up:layer:dismissed');
901
-
902
-
903
- /***
904
- Clicking this link will load the destination via AJAX and open
905
- the given selector in a modal overlay.
906
-
907
- @selector a[up-modal]
908
- @params-note
909
- All attributes for `a[up-layer=new]` may also be used.
910
- @param {string} up-modal
911
- The CSS selector that will be extracted from the response and displayed in a modal dialog.
912
- @deprecated
913
- Use `a[up-layer="new modal"]` instead.
914
- */
915
-
916
- up.migrate.targetMacro('up-modal', {
917
- 'up-layer': 'new modal'
918
- }, function() {
919
- return up.migrate.deprecated('a[up-modal]', 'a[up-layer="new modal"]');
920
- });
921
-
922
-
923
- /***
924
- Clicking this link will load the destination via AJAX and open
925
- the given selector in a modal drawer that slides in from the edge of the screen.
926
-
927
- @selector a[up-drawer]
928
- @params-note
929
- All attributes for `a[up-layer=new]` may also be used.
930
- @param {string} up-drawer
931
- The CSS selector that will be extracted from the response and displayed in a modal dialog.
932
- @deprecated
933
- Use `a[up-layer="new drawer"]` instead.
934
- */
935
-
936
- up.migrate.targetMacro('up-drawer', {
937
- 'up-layer': 'new drawer'
938
- }, function() {
939
- return up.migrate.deprecated('a[up-drawer]', 'a[up-layer="new drawer"]');
940
- });
941
-
942
- }).call(this);
943
-
944
- /***
945
- @module up.layer
946
- */
947
-
948
- (function() {
949
- var e, u;
950
-
951
- u = up.util;
952
-
953
- e = up.element;
954
-
955
- up.popup = u.literal({
956
-
957
- /***
958
- Attaches a popup overlay to the given element or selector.
959
-
960
- @function up.popup.attach
961
- @param {Element|jQuery|string} anchor
962
- The element to which the popup will be attached.
963
- @param {Object} [options]
964
- See options for `up.render()`.
965
- @return {Promise}
966
- @deprecated
967
- Use `up.layer.open({ origin, layer: 'popup' })` instead.
968
- */
969
- attach: function(origin, options) {
970
- if (options == null) {
971
- options = {};
972
- }
973
- origin = up.fragment.get(origin);
974
- up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
975
- return up.layer.open(u.merge(options, {
976
- origin: origin,
977
- layer: 'popup'
978
- }));
979
- },
980
-
981
- /***
982
- Closes a currently open overlay.
983
-
984
- @function up.popup.close
985
- @param {Object} options
986
- @return {Promise}
987
- @deprecated
988
- Use `up.layer.dismiss()` instead.
989
- */
990
- close: function(options) {
991
- if (options == null) {
992
- options = {};
993
- }
994
- up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
995
- return up.layer.dismiss(null, options);
996
- },
997
-
998
- /***
999
- Returns the location URL of the fragment displayed in the current overlay.
1000
-
1001
- @function up.popup.url
1002
- @return {string}
1003
- @deprecated
1004
- Use `up.layer.location` instead.
1005
- */
1006
- url: function() {
1007
- up.migrate.deprecated('up.popup.url()', 'up.layer.location');
1008
- return up.layer.location;
1009
- },
1010
-
1011
- /***
1012
- Returns the location URL of the layer behind the current overlay.
1013
-
1014
- @function up.popup.coveredUrl
1015
- @return {string}
1016
- @deprecated
1017
- Use `up.layer.parent.location` instead.
1018
- */
1019
- coveredUrl: function() {
1020
- var ref;
1021
- up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
1022
- return (ref = up.layer.parent) != null ? ref.location : void 0;
1023
- },
1024
-
1025
- /***
1026
- Sets default options for future popup overlays.
1027
-
1028
- @property up.popup.config
1029
- @deprecated
1030
- Use `up.layer.config.popup` instead.
1031
- */
1032
- get_config: function() {
1033
- up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
1034
- return up.layer.config.popup;
1035
- },
1036
-
1037
- /***
1038
- Returns whether the given element or selector is contained
1039
- within the current layer.
1040
-
1041
- @function up.popup.contains
1042
- @param {string} elementOrSelector
1043
- The element to test
1044
- @return {boolean}
1045
- @deprecated
1046
- Use `up.layer.contains()` instead.
1047
- */
1048
- contains: function(element) {
1049
- up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
1050
- return up.layer.contains(element);
1051
- },
1052
-
1053
- /***
1054
- Returns whether an overlay is currently open.
1055
-
1056
- @function up.popup.isOpen
1057
- @return {boolean}
1058
- @deprecated
1059
- Use `up.layer.isOverlay()` instead.
1060
- */
1061
- isOpen: function() {
1062
- up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
1063
- return up.layer.isOverlay();
1064
- },
1065
- sync: function() {
1066
- up.migrate.deprecated('up.popup.sync()', 'up.layer.sync()');
1067
- return up.layer.sync();
1068
- }
1069
- });
1070
-
1071
- up.migrate.renamedEvent('up:popup:open', 'up:layer:open');
1072
-
1073
- up.migrate.renamedEvent('up:popup:opened', 'up:layer:opened');
1074
-
1075
- up.migrate.renamedEvent('up:popup:close', 'up:layer:dismiss');
1076
-
1077
- up.migrate.renamedEvent('up:popup:closed', 'up:layer:dismissed');
1078
-
1079
- up.migrate.targetMacro('up-popup', {
1080
- 'up-layer': 'new popup'
1081
- }, function() {
1082
- return up.migrate.deprecated('[up-popup]', '[up-layer="new popup"]');
1083
- });
1084
-
1085
- }).call(this);
1086
-
1087
- /***
1088
- Tooltips
1089
- ========
1090
-
1091
- Unpoly used to come with a basic tooltip implementation.
1092
- This feature is now deprecated.
1093
-
1094
- @module up.tooltip
1095
- */
1096
-
1097
- (function() {
1098
- up.tooltip = (function() {
1099
- return up.macro('[up-tooltip]', function(opener) {
1100
- up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
1101
- return up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
1102
- });
1103
- })();
1104
-
1105
- }).call(this);
1106
- (function() {
1107
- var disableProgressBarIfCustomIndicator, mayHaveCustomIndicator, preloadDelayMoved, progressBarDefault, u,
1108
- slice = [].slice;
1109
-
1110
- u = up.util;
1111
-
1112
-
1113
- /***
1114
- @module up.network
1115
- */
1116
-
1117
- up.migrate.renamedPackage('proxy', 'network');
1118
-
1119
- up.migrate.renamedEvent('up:proxy:load', 'up:request:load');
1120
-
1121
- up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded');
1122
-
1123
- up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded');
1124
-
1125
- up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal');
1126
-
1127
- up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted');
1128
-
1129
- up.migrate.renamedEvent('up:proxy:slow', 'up:request:late');
1130
-
1131
- up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover');
1132
-
1133
- preloadDelayMoved = function() {
1134
- return up.migrate.deprecated('up.proxy.config.preloadDelay', 'up.link.config.preloadDelay');
1135
- };
1136
-
1137
- Object.defineProperty(up.network.config, 'preloadDelay', {
1138
- get: function() {
1139
- preloadDelayMoved();
1140
- return up.link.config.preloadDelay;
1141
- },
1142
- set: function(value) {
1143
- preloadDelayMoved();
1144
- return up.link.config.preloadDelay = value;
1145
- }
1146
- });
1147
-
1148
- up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
1149
-
1150
- up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
1151
-
1152
- up.migrate.handleRequestOptions = function(options) {
1153
- return up.migrate.fixKey(options, 'data', 'params');
1154
- };
1155
-
1156
-
1157
- /***
1158
- Makes an AJAX request to the given URL and caches the response.
1159
-
1160
- The function returns a promise that fulfills with the response text.
1161
-
1162
- \#\#\# Example
1163
-
1164
- ```
1165
- up.ajax('/search', { params: { query: 'sunshine' } }).then(function(text) {
1166
- console.log('The response text is %o', text)
1167
- }).catch(function() {
1168
- console.error('The request failed')
1169
- })
1170
- ```
1171
-
1172
- @function up.ajax
1173
- @param {string} [url]
1174
- The URL for the request.
1175
-
1176
- Instead of passing the URL as a string argument, you can also pass it as an `{ url }` option.
1177
- @param {Object} [options]
1178
- See options for `up.request()`.
1179
- @return {Promise<string>}
1180
- A promise for the response text.
1181
- @deprecated
1182
- Use `up.request()` instead.
1183
- */
1184
-
1185
- up.ajax = function() {
1186
- var args, pickResponseText;
1187
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1188
- up.migrate.deprecated('up.ajax()', 'up.request()');
1189
- pickResponseText = function(response) {
1190
- return response.text;
1191
- };
1192
- return up.request.apply(up, args).then(pickResponseText);
1193
- };
1194
-
1195
-
1196
- /***
1197
- Removes all cache entries.
1198
-
1199
- @function up.proxy.clear
1200
- @deprecated
1201
- Use `up.cache.clear()` instead.
1202
- */
1203
-
1204
- up.network.clear = function() {
1205
- up.migrate.deprecated('up.proxy.clear()', 'up.cache.clear()');
1206
- return up.cache.clear();
1207
- };
1208
-
1209
- up.network.preload = function() {
1210
- var args, ref;
1211
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1212
- up.migrate.deprecated('up.proxy.preload(link)', 'up.link.preload(link)');
1213
- return (ref = up.link).preload.apply(ref, args);
1214
- };
1215
-
1216
-
1217
- /***
1218
- @class up.Request
1219
- */
1220
-
1221
- up.Request.prototype.navigate = function() {
1222
- up.migrate.deprecated('up.Request#navigate()', 'up.Request#loadPage()');
1223
- return this.loadPage();
1224
- };
1225
-
1226
-
1227
- /***
1228
- @class up.Response
1229
- */
1230
-
1231
-
1232
- /***
1233
- Returns whether the server responded with a 2xx HTTP status.
1234
-
1235
- @function up.Response#isSuccess
1236
- @return {boolean}
1237
- @deprecated
1238
- Use `up.Response#ok` instead.
1239
- */
1240
-
1241
- up.Response.prototype.isSuccess = function() {
1242
- up.migrate.deprecated('up.Response#isSuccess()', 'up.Response#ok');
1243
- return this.ok;
1244
- };
1245
-
1246
-
1247
- /***
1248
- Returns whether the response was not [successful](/up.Response.prototype.ok).
1249
-
1250
- @function up.Response#isError
1251
- @return {boolean}
1252
- @deprecated
1253
- Use `!up.Response#ok` instead.
1254
- */
1255
-
1256
- up.Response.prototype.isError = function() {
1257
- up.migrate.deprecated('up.Response#isError()', '!up.Response#ok');
1258
- return !this.ok;
1259
- };
1260
-
1261
- mayHaveCustomIndicator = function() {
1262
- var listeners;
1263
- listeners = up.EventListener.allNonDefault(document);
1264
- return u.find(listeners, function(listener) {
1265
- return listener.eventType === 'up:request:late';
1266
- });
1267
- };
1268
-
1269
- progressBarDefault = up.network.config.progressBar;
1270
-
1271
- disableProgressBarIfCustomIndicator = function() {
1272
- return up.network.config.progressBar = function() {
1273
- if (mayHaveCustomIndicator()) {
1274
- up.migrate.warn('Disabled the default progress bar as may have built a custom loading indicator with your up:request:late listener. Please set up.network.config.progressBar to true or false.');
1275
- return false;
1276
- } else {
1277
- return progressBarDefault;
1278
- }
1279
- };
1280
- };
1281
-
1282
- disableProgressBarIfCustomIndicator();
1283
-
1284
- up.on('up:framework:reset', disableProgressBarIfCustomIndicator);
1285
-
1286
- }).call(this);
1287
-
1288
- /***
1289
- @module up.radio
1290
- */
1291
-
1292
- (function() {
1293
- up.migrate.renamedProperty(up.radio.config, 'hungry', 'hungrySelectors');
1294
-
1295
- }).call(this);
1296
-
1297
- /***
1298
- @module up.viewport
1299
- */
1300
-
1301
- (function() {
1302
- var slice = [].slice;
1303
-
1304
- up.migrate.renamedPackage('layout', 'viewport');
1305
-
1306
- up.migrate.renamedProperty(up.viewport.config, 'viewports', 'viewportSelectors');
1307
-
1308
- up.migrate.renamedProperty(up.viewport.config, 'snap', 'revealSnap');
1309
-
1310
-
1311
- /***
1312
- Returns the scrolling container for the given element.
1313
-
1314
- Returns the [document's scrolling element](/up.viewport.root)
1315
- if no closer viewport exists.
1316
-
1317
- @function up.viewport.get
1318
- @param {string|Element|jQuery} target
1319
- @return {Element}
1320
- @deprecated
1321
- Use `up.viewport.get()` instead.
1322
- */
1323
-
1324
- up.viewport.closest = function() {
1325
- var args, ref;
1326
- args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1327
- up.migrate.deprecated('up.viewport.closest()', 'up.viewport.get()');
1328
- return (ref = up.viewport).get.apply(ref, args);
1329
- };
1330
-
1331
- }).call(this);
1332
- (function() {
1333
- up.framework.stopExtension();
1334
-
1335
- }).call(this);
1336
- (function() {
1337
-
1338
-
1339
- }).call(this);