unpoly-rails 2.7.1.1 → 2.7.2.1

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.

Potentially problematic release.


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

@@ -14,9 +14,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
14
  return to.concat(ar || Array.prototype.slice.call(from));
15
15
  };
16
16
  var u = up.util;
17
- /*-
18
- @module up.migrate
19
- */
20
17
  up.migrate = (function () {
21
18
  var config = new up.Config(function () { return ({
22
19
  logLevel: 'warn'
@@ -40,7 +37,6 @@ up.migrate = (function () {
40
37
  u.renameKey(object, oldKey, newKey);
41
38
  }
42
39
  }
43
- // Maps old event type to new event type
44
40
  var renamedEvents = {};
45
41
  function renamedEvent(oldType, newType) {
46
42
  renamedEvents[oldType] = newType;
@@ -56,8 +52,6 @@ up.migrate = (function () {
56
52
  }
57
53
  }
58
54
  function fixEventTypes(eventTypes) {
59
- // Remove duplicates as e.g. up:history:pushed and up:history:replaced
60
- // both map to up:location:changed.
61
55
  return u.uniq(u.map(eventTypes, fixEventType));
62
56
  }
63
57
  function renamedPackage(oldName, newName) {
@@ -84,7 +78,6 @@ up.migrate = (function () {
84
78
  function deprecated(deprecatedExpression, replacementExpression) {
85
79
  warn("".concat(deprecatedExpression, " has been deprecated. Use ").concat(replacementExpression, " instead."));
86
80
  }
87
- // Returns a resolved promise that prints a warning when #then() is called.
88
81
  function formerlyAsync(label) {
89
82
  var promise = Promise.resolve();
90
83
  var oldThen = promise.then;
@@ -117,19 +110,6 @@ up.migrate = (function () {
117
110
  /* 2 */
118
111
  /***/ (function() {
119
112
 
120
- /*-
121
- @module up.util
122
- */
123
- /*-
124
- Returns a copy of the given object that only contains
125
- the given keys.
126
-
127
- @function up.util.only
128
- @param {Object} object
129
- @param {Array} ...keys
130
- @deprecated
131
- Use `up.util.pick()` instead.
132
- */
133
113
  up.util.only = function (object) {
134
114
  var keys = [];
135
115
  for (var _i = 1; _i < arguments.length; _i++) {
@@ -138,16 +118,6 @@ up.util.only = function (object) {
138
118
  up.migrate.deprecated('up.util.only(object, ...keys)', 'up.util.pick(object, keys)');
139
119
  return up.util.pick(object, keys);
140
120
  };
141
- /*-
142
- Returns a copy of the given object that contains all except
143
- the given keys.
144
-
145
- @function up.util.except
146
- @param {Object} object
147
- @param {Array} ...keys
148
- @deprecated
149
- Use `up.util.omit(object, keys)` (with an array argument) instead of `up.util.object(...keys)` (with rest arguments).
150
- */
151
121
  up.util.except = function (object) {
152
122
  var keys = [];
153
123
  for (var _i = 1; _i < arguments.length; _i++) {
@@ -237,15 +207,6 @@ up.util.nextFrame = function () {
237
207
  up.migrate.warn('up.util.nextFrame() has been renamed to up.util.task()');
238
208
  return (_a = up.util).task.apply(_a, args);
239
209
  };
240
- /*-
241
- Calls the given function for the given number of times.
242
-
243
- @function up.util.times
244
- @param {number} count
245
- @param {Function()} block
246
- @deprecated
247
- Use a `for` loop instead.
248
- */
249
210
  up.util.times = function (count, block) {
250
211
  for (var i = 0; i < count; i++) {
251
212
  block();
@@ -281,26 +242,6 @@ up.browser.isSupported = function () {
281
242
  /* 4 */
282
243
  /***/ (function() {
283
244
 
284
- /*-
285
- @module up.element
286
- */
287
- /*-
288
- Returns the first descendant element matching the given selector.
289
-
290
- @function up.element.first
291
- @param {Element} [parent=document]
292
- The parent element whose descendants to search.
293
-
294
- If omitted, all elements in the `document` will be searched.
295
- @param {string} selector
296
- The CSS selector to match.
297
- @return {Element|undefined|null}
298
- The first element matching the selector.
299
-
300
- Returns `null` or `undefined` if no element macthes.
301
- @deprecated
302
- Use `up.element.get()` instead.
303
- */
304
245
  up.element.first = function () {
305
246
  var _a;
306
247
  var args = [];
@@ -325,30 +266,7 @@ up.element.createFromHtml = function () {
325
266
  /* 5 */
326
267
  /***/ (function() {
327
268
 
328
- /*-
329
- @module up.event
330
- */
331
269
  up.migrate.renamedPackage('bus', 'event');
332
- /*-
333
- [Emits an event](/up.emit) and returns whether no listener
334
- has prevented the default action.
335
-
336
- ### Example
337
-
338
- ```javascript
339
- if (up.event.nobodyPrevents('disk:erase')) {
340
- Disk.erase()
341
- })
342
- ```
343
-
344
- @function up.event.nobodyPrevents
345
- @param {string} eventType
346
- @param {Object} eventProps
347
- @return {boolean}
348
- whether no listener has prevented the default action
349
- @deprecated
350
- Use `!up.emit(type).defaultPrevented` instead.
351
- */
352
270
  up.event.nobodyPrevents = function () {
353
271
  var args = [];
354
272
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -367,8 +285,6 @@ up.event.nobodyPrevents = function () {
367
285
  var u = up.util;
368
286
  var e = up.element;
369
287
  up.migrate.postCompile = function (elements, compiler) {
370
- // up.compiler() has a legacy { keep } option that will automatically
371
- // set [up-keep] on the elements it compiles
372
288
  var keepValue;
373
289
  if (keepValue = compiler.keep) {
374
290
  up.migrate.warn('The { keep: true } option for up.compiler() has been removed. Have the compiler set [up-keep] attribute instead.');
@@ -400,9 +316,6 @@ up.migrate.targetMacro = function (queryAttr, fixedResultAttrs, callback) {
400
316
  /* 7 */
401
317
  /***/ (function() {
402
318
 
403
- /*-
404
- @module up.form
405
- */
406
319
  up.migrate.renamedProperty(up.form.config, 'fields', 'fieldSelectors');
407
320
  up.migrate.renamedProperty(up.form.config, 'submitButtons', 'submitButtonSelectors');
408
321
 
@@ -423,102 +336,18 @@ var __assign = (this && this.__assign) || function () {
423
336
  return __assign.apply(this, arguments);
424
337
  };
425
338
  var u = up.util;
426
- /*-
427
- @module up.fragment
428
- */
429
339
  up.migrate.renamedPackage('flow', 'fragment');
430
340
  up.migrate.renamedPackage('dom', 'fragment');
431
341
  up.migrate.renamedProperty(up.fragment.config, 'fallbacks', 'mainTargets');
432
342
  up.migrate.handleResponseDocOptions = function (docOptions) { return up.migrate.fixKey(docOptions, 'html', 'document'); };
433
- /*-
434
- Replaces elements on the current page with corresponding elements
435
- from a new page fetched from the server.
436
-
437
- @function up.replace
438
- @param {string|Element|jQuery} target
439
- The CSS selector to update. You can also pass a DOM element or jQuery element
440
- here, in which case a selector will be inferred from the element's class and ID.
441
- @param {string} url
442
- The URL to fetch from the server.
443
- @param {Object} [options]
444
- See `options` for `up.render()`.
445
- @return {Promise}
446
- A promise that fulfills when the page has been updated.
447
- @deprecated
448
- Use `up.render()` or `up.navigate()` instead.
449
- */
450
343
  up.replace = function (target, url, options) {
451
344
  up.migrate.deprecated('up.replace(target, url)', 'up.navigate(target, { url })');
452
345
  return up.navigate(__assign(__assign({}, options), { target: target, url: url }));
453
346
  };
454
- /*-
455
- Updates a selector on the current page with the
456
- same selector from the given HTML string.
457
-
458
- ### Example
459
-
460
- Let's say your current HTML looks like this:
461
-
462
- <div class="one">old one</div>
463
- <div class="two">old two</div>
464
-
465
- We now replace the second `<div>`, using an HTML string
466
- as the source:
467
-
468
- html = '<div class="one">new one</div>' +
469
- '<div class="two">new two</div>'
470
-
471
- up.extract('.two', html)
472
-
473
- Unpoly looks for the selector `.two` in the strings and updates its
474
- contents in the current page. The current page now looks like this:
475
-
476
- <div class="one">old one</div>
477
- <div class="two">new two</div>
478
-
479
- Note how only `.two` has changed. The update for `.one` was
480
- discarded, since it didn't match the selector.
481
-
482
- @function up.extract
483
- @param {string|Element|jQuery} target
484
- @param {string} html
485
- @param {Object} [options]
486
- See options for [`up.render()`](/up.render).
487
- @return {Promise}
488
- A promise that will be fulfilled when the selector was updated.
489
- @deprecated
490
- Use `up.render()` or `up.navigate()` instead.
491
- */
492
347
  up.extract = function (target, document, options) {
493
348
  up.migrate.deprecated('up.extract(target, document)', 'up.navigate(target, { document })');
494
349
  return up.navigate(__assign(__assign({}, options), { target: target, document: document }));
495
350
  };
496
- /*-
497
- Returns the first element matching the given selector, but
498
- ignores elements that are being [destroyed](/up.destroy) or that are being
499
- removed by a [transition](/up.morph).
500
-
501
- Returns `undefined` if no element matches these conditions.
502
-
503
- @function up.fragment.first
504
- @param {Element|jQuery} [root=document]
505
- The root element for the search. Only the root's children will be matched.
506
-
507
- May be omitted to search through all elements in the `document`.
508
- @param {string} selector
509
- The selector to match
510
- @param {string} [options.layer='current']
511
- The the layer in which to find the element.
512
-
513
- @see layer-option
514
- @param {string|Element|jQuery} [options.origin]
515
- An second element or selector that can be referenced as `:origin` in the first selector:
516
- @return {Element|undefined}
517
- The first element that is neither a ghost or being destroyed,
518
- or `undefined` if no such element was found.
519
- @deprecated
520
- Use `up.fragment.get()` instead.
521
- */
522
351
  up.fragment.first = function () {
523
352
  var _a;
524
353
  var args = [];
@@ -531,7 +360,6 @@ up.fragment.first = function () {
531
360
  up.first = up.fragment.first;
532
361
  up.migrate.handleScrollOptions = function (options) {
533
362
  if (u.isUndefined(options.scroll)) {
534
- // Rewrite deprecated { reveal } option (it had multiple variants)
535
363
  if (u.isString(options.reveal)) {
536
364
  up.migrate.deprecated("Option { reveal: '".concat(options.reveal, "' }"), "{ scroll: '".concat(options.reveal, "' }"));
537
365
  options.scroll = options.reveal;
@@ -544,12 +372,10 @@ up.migrate.handleScrollOptions = function (options) {
544
372
  up.migrate.deprecated('Option { reveal: false }', "{ scroll: false }");
545
373
  options.scroll = false;
546
374
  }
547
- // Rewrite deprecated { resetScroll } option
548
375
  if (u.isDefined(options.resetScroll)) {
549
376
  up.migrate.deprecated('Option { resetScroll: true }', "{ scroll: 'reset' }");
550
377
  options.scroll = 'teset';
551
378
  }
552
- // Rewrite deprecated { restoreScroll } option
553
379
  if (u.isDefined(options.restoreScroll)) {
554
380
  up.migrate.deprecated('Option { restoreScroll: true }', "{ scroll: 'restore' }");
555
381
  options.scroll = 'restore';
@@ -560,8 +386,6 @@ up.migrate.handleHistoryOption = function (options) {
560
386
  if (u.isString(options.history) && (options.history !== 'auto')) {
561
387
  up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead.");
562
388
  options.location = options.history;
563
- // Also the URL in { history } is truthy, keeping a value in there would also inherit to failOptions,
564
- // where it would be expanded to { failLocation }.
565
389
  options.history = 'auto';
566
390
  }
567
391
  };
@@ -581,17 +405,7 @@ up.migrate.preprocessRenderOptions = function (options) {
581
405
  /* 9 */
582
406
  /***/ (function() {
583
407
 
584
- /*-
585
- @module up.history
586
- */
587
408
  up.migrate.renamedProperty(up.history.config, 'popTargets', 'restoreTargets');
588
- /*-
589
- Returns a normalized URL for the current history entry.
590
-
591
- @function up.history.url
592
- @return {string}
593
- @deprecated Use the `up.history.location` property instead.
594
- */
595
409
  up.history.url = function () {
596
410
  up.migrate.deprecated('up.history.url()', 'up.history.location');
597
411
  return up.history.location;
@@ -600,7 +414,6 @@ up.migrate.renamedEvent('up:history:push', 'up:location:changed');
600
414
  up.migrate.renamedEvent('up:history:pushed', 'up:location:changed');
601
415
  up.migrate.renamedEvent('up:history:restore', 'up:location:changed');
602
416
  up.migrate.renamedEvent('up:history:restored', 'up:location:changed');
603
- // There was never an up:history:replace (present tense) event
604
417
  up.migrate.renamedEvent('up:history:replaced', 'up:location:changed');
605
418
 
606
419
 
@@ -608,9 +421,6 @@ up.migrate.renamedEvent('up:history:replaced', 'up:location:changed');
608
421
  /* 10 */
609
422
  /***/ (function() {
610
423
 
611
- /*-
612
- @module up.feedback
613
- */
614
424
  up.migrate.renamedPackage('navigation', 'feedback');
615
425
  up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
616
426
 
@@ -619,46 +429,16 @@ up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
619
429
  /* 11 */
620
430
  /***/ (function() {
621
431
 
622
- /*-
623
- @module up.link
624
- */
625
432
  up.migrate.parseFollowOptions = function (parser) {
626
- parser.string('flavor'); // Renamed to { mode }.
627
- parser.string('width'); // Removed overlay option.
628
- parser.string('height'); // Removed overlay option.
629
- parser.boolean('closable'); // Renamed to { dismissable }.
630
- parser.booleanOrString('reveal'); // legacy option for { scroll: 'target' }
631
- parser.boolean('resetScroll'); // legacy option for { scroll: 'top' }
632
- parser.boolean('restoreScroll'); // legacy option for { scroll: 'restore' }
633
- parser.booleanOrString('historyVisible'); // short-lived legacy option for { history }
433
+ parser.string('flavor');
434
+ parser.string('width');
435
+ parser.string('height');
436
+ parser.boolean('closable');
437
+ parser.booleanOrString('reveal');
438
+ parser.boolean('resetScroll');
439
+ parser.boolean('restoreScroll');
440
+ parser.booleanOrString('historyVisible');
634
441
  };
635
- /*-
636
- [Follows](/up.follow) this link as fast as possible.
637
-
638
- This is done by:
639
-
640
- - [Following the link through AJAX](/a-up-follow) instead of a full page load
641
- - [Preloading the link's destination URL](/a-up-preload)
642
- - [Triggering the link on `mousedown`](/a-up-instant) instead of on `click`
643
-
644
- ### Example
645
-
646
- Use `[up-dash]` like this:
647
-
648
- <a href="/users" up-dash=".main">User list</a>
649
-
650
- This is shorthand for:
651
-
652
- <a href="/users" up-target=".main" up-instant up-preload>User list</a>
653
-
654
- @selector a[up-dash]
655
- @param [up-dash='body']
656
- The CSS selector to replace
657
-
658
- 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)).
659
- @deprecated
660
- To accelerate all links use `up.link.config.instantSelectors` and `up.link.config.preloadSelectors`.
661
- */
662
442
  up.migrate.targetMacro('up-dash', { 'up-preload': '', 'up-instant': '' }, function () { return up.migrate.deprecated('a[up-dash]', 'up.link.config.instantSelectors or up.link.config.preloadSelectors'); });
663
443
 
664
444
 
@@ -666,9 +446,6 @@ up.migrate.targetMacro('up-dash', { 'up-preload': '', 'up-instant': '' }, functi
666
446
  /* 12 */
667
447
  /***/ (function() {
668
448
 
669
- /*-
670
- @module up.layer
671
- */
672
449
  up.migrate.handleLayerOptions = function (options) {
673
450
  up.migrate.fixKey(options, 'flavor', 'mode');
674
451
  up.migrate.fixKey(options, 'closable', 'dismissable');
@@ -702,20 +479,6 @@ up.migrate.handleTetherOptions = function (options) {
702
479
  options.align = align;
703
480
  }
704
481
  };
705
- /*-
706
- When this element is clicked, closes a currently open overlay.
707
-
708
- Does nothing if no overlay is currently open.
709
-
710
- To make a link that closes the current overlay, but follows to
711
- a fallback destination on the root layer:
712
-
713
- <a href="/fallback" up-close>Okay</a>
714
-
715
- @selector a[up-close]
716
- @deprecated
717
- Use `a[up-dismiss]` instead.
718
- */
719
482
  up.migrate.registerLayerCloser = function (layer) {
720
483
  return layer.registerClickCloser('up-close', function (value, closeOptions) {
721
484
  up.migrate.deprecated('[up-close]', '[up-dismiss]');
@@ -733,9 +496,6 @@ up.util.getter(up.Layer.prototype, 'historyVisible', function () {
733
496
  /* 13 */
734
497
  /***/ (function() {
735
498
 
736
- /*-
737
- @module up.layer
738
- */
739
499
  var __assign = (this && this.__assign) || function () {
740
500
  __assign = Object.assign || function(t) {
741
501
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -749,135 +509,44 @@ var __assign = (this && this.__assign) || function () {
749
509
  };
750
510
  var 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.');
751
511
  up.modal = {
752
- /*-
753
- Opens a modal overlay for the given URL.
754
-
755
- @function up.modal.visit
756
- @param {string} url
757
- The URL to load.
758
- @param {Object} options
759
- See options for `up.render()`.
760
- @deprecated
761
- Use `up.layer.open({ url, mode: "modal" })` instead.
762
- */
763
512
  visit: function (url, options) {
764
513
  if (options === void 0) { options = {}; }
765
514
  up.migrate.deprecated('up.modal.visit(url)', 'up.layer.open({ url, mode: "modal" })');
766
515
  return up.layer.open(__assign(__assign({}, options), { url: url, mode: 'modal' }));
767
516
  },
768
- /*-
769
- Opens the given link's destination in a modal overlay.
770
-
771
- @function up.modal.follow
772
- @param {Element|jQuery|string} linkOrSelector
773
- The link to follow.
774
- @param {string} [options]
775
- See options for `up.render()`.
776
- @return {Promise}
777
- A promise that will be fulfilled when the modal has been opened.
778
- @deprecated
779
- Use `up.follow(link, { layer: "modal" })` instead.
780
- */
781
517
  follow: function (link, options) {
782
518
  if (options === void 0) { options = {}; }
783
519
  up.migrate.deprecated('up.modal.follow(link)', 'up.follow(link, { layer: "modal" })');
784
520
  return up.follow(link, __assign(__assign({}, options), { layer: 'modal' }));
785
521
  },
786
- /*-
787
- [Extracts](/up.extract) the given CSS selector from the given HTML string and
788
- opens the results in a modal overlay.
789
-
790
- @function up.modal.extract
791
- @param {string} selector
792
- The CSS selector to extract from the HTML.
793
- @param {string} document
794
- The HTML containing the modal content.
795
- @param {Object} options
796
- See options for [`up.modal.follow()`](/up.modal.follow).
797
- @return {Promise}
798
- A promise that will be fulfilled when the modal has been opened.
799
- @deprecated
800
- Use `up.layer.open({ document, mode: "modal" })` instead.
801
- */
802
522
  extract: function (target, html, options) {
803
523
  if (options === void 0) { options = {}; }
804
524
  up.migrate.deprecated('up.modal.extract(target, document)', 'up.layer.open({ document, mode: "modal" })');
805
525
  return up.layer.open(__assign(__assign({}, options), { target: target, html: html, layer: 'modal' }));
806
526
  },
807
- /*-
808
- Closes a currently open overlay.
809
-
810
- @function up.modal.close
811
- @param {Object} options
812
- @return {Promise}
813
- @deprecated
814
- Use `up.layer.dismiss()` instead.
815
- */
816
527
  close: function (options) {
817
528
  if (options === void 0) { options = {}; }
818
529
  up.migrate.deprecated('up.modal.close()', 'up.layer.dismiss()');
819
530
  up.layer.dismiss(null, options);
820
531
  return up.migrate.formerlyAsync('up.layer.dismiss()');
821
532
  },
822
- /*-
823
- Returns the location URL of the fragment displayed in the current overlay.
824
-
825
- @function up.modal.url
826
- @return {string}
827
- @deprecated
828
- Use `up.layer.location` instead.
829
- */
830
533
  url: function () {
831
534
  up.migrate.deprecated('up.modal.url()', 'up.layer.location');
832
535
  return up.layer.location;
833
536
  },
834
- /*-
835
- Returns the location URL of the layer behind the current overlay.
836
-
837
- @function up.modal.coveredUrl
838
- @return {string}
839
- @deprecated
840
- Use `up.layer.parent.location` instead.
841
- */
842
537
  coveredUrl: function () {
843
538
  var _a;
844
539
  up.migrate.deprecated('up.modal.coveredUrl()', 'up.layer.parent.location');
845
540
  return (_a = up.layer.parent) === null || _a === void 0 ? void 0 : _a.location;
846
541
  },
847
- /*-
848
- Sets default options for future modal overlays.
849
-
850
- @property up.modal.config
851
- @deprecated
852
- Use `up.layer.config.modal` instead.
853
- */
854
542
  get config() {
855
543
  up.migrate.deprecated('up.modal.config', 'up.layer.config.modal');
856
544
  return up.layer.config.modal;
857
545
  },
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
546
  contains: function (element) {
870
547
  up.migrate.deprecated('up.modal.contains()', 'up.layer.contains()');
871
548
  return up.layer.contains(element);
872
549
  },
873
- /*-
874
- Returns whether an overlay is currently open.
875
-
876
- @function up.modal.isOpen
877
- @return {boolean}
878
- @deprecated
879
- Use `up.layer.isOverlay()` instead.
880
- */
881
550
  isOpen: function () {
882
551
  up.migrate.deprecated('up.modal.isOpen()', 'up.layer.isOverlay()');
883
552
  return up.layer.isOverlay();
@@ -893,31 +562,7 @@ up.migrate.renamedEvent('up:modal:open', 'up:layer:open');
893
562
  up.migrate.renamedEvent('up:modal:opened', 'up:layer:opened');
894
563
  up.migrate.renamedEvent('up:modal:close', 'up:layer:dismiss');
895
564
  up.migrate.renamedEvent('up:modal:closed', 'up:layer:dismissed');
896
- /*-
897
- Clicking this link will load the destination via AJAX and open
898
- the given selector in a modal overlay.
899
-
900
- @selector a[up-modal]
901
- @params-note
902
- All attributes for `a[up-layer=new]` may also be used.
903
- @param {string} up-modal
904
- The CSS selector that will be extracted from the response and displayed in a modal dialog.
905
- @deprecated
906
- Use `a[up-layer="new modal"]` instead.
907
- */
908
565
  up.migrate.targetMacro('up-modal', { 'up-layer': 'new modal' }, function () { return up.migrate.deprecated('a[up-modal]', 'a[up-layer="new modal"]'); });
909
- /*-
910
- Clicking this link will load the destination via AJAX and open
911
- the given selector in a modal drawer that slides in from the edge of the screen.
912
-
913
- @selector a[up-drawer]
914
- @params-note
915
- All attributes for `a[up-layer=new]` may also be used.
916
- @param {string} up-drawer
917
- The CSS selector that will be extracted from the response and displayed in a modal dialog.
918
- @deprecated
919
- Use `a[up-layer="new drawer"]` instead.
920
- */
921
566
  up.migrate.targetMacro('up-drawer', { 'up-layer': 'new drawer' }, function () { return up.migrate.deprecated('a[up-drawer]', 'a[up-layer="new drawer"]'); });
922
567
 
923
568
 
@@ -925,9 +570,6 @@ up.migrate.targetMacro('up-drawer', { 'up-layer': 'new drawer' }, function () {
925
570
  /* 14 */
926
571
  /***/ (function() {
927
572
 
928
- /*-
929
- @module up.layer
930
- */
931
573
  var __assign = (this && this.__assign) || function () {
932
574
  __assign = Object.assign || function(t) {
933
575
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -940,98 +582,35 @@ var __assign = (this && this.__assign) || function () {
940
582
  return __assign.apply(this, arguments);
941
583
  };
942
584
  up.popup = {
943
- /*-
944
- Attaches a popup overlay to the given element or selector.
945
-
946
- @function up.popup.attach
947
- @param {Element|jQuery|string} anchor
948
- The element to which the popup will be attached.
949
- @param {Object} [options]
950
- See options for `up.render()`.
951
- @return {Promise}
952
- @deprecated
953
- Use `up.layer.open({ origin, layer: 'popup' })` instead.
954
- */
955
585
  attach: function (origin, options) {
956
586
  if (options === void 0) { options = {}; }
957
587
  origin = up.fragment.get(origin);
958
588
  up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
959
589
  return up.layer.open(__assign(__assign({}, options), { origin: origin, layer: 'popup' }));
960
590
  },
961
- /*-
962
- Closes a currently open overlay.
963
-
964
- @function up.popup.close
965
- @param {Object} options
966
- @return {Promise}
967
- @deprecated
968
- Use `up.layer.dismiss()` instead.
969
- */
970
591
  close: function (options) {
971
592
  if (options === void 0) { options = {}; }
972
593
  up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
973
594
  up.layer.dismiss(null, options);
974
595
  return up.migrate.formerlyAsync('up.layer.dismiss()');
975
596
  },
976
- /*-
977
- Returns the location URL of the fragment displayed in the current overlay.
978
-
979
- @function up.popup.url
980
- @return {string}
981
- @deprecated
982
- Use `up.layer.location` instead.
983
- */
984
597
  url: function () {
985
598
  up.migrate.deprecated('up.popup.url()', 'up.layer.location');
986
599
  return up.layer.location;
987
600
  },
988
- /*-
989
- Returns the location URL of the layer behind the current overlay.
990
-
991
- @function up.popup.coveredUrl
992
- @return {string}
993
- @deprecated
994
- Use `up.layer.parent.location` instead.
995
- */
996
601
  coveredUrl: function () {
997
602
  var _a;
998
603
  up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
999
604
  return (_a = up.layer.parent) === null || _a === void 0 ? void 0 : _a.location;
1000
605
  },
1001
- /*-
1002
- Sets default options for future popup overlays.
1003
-
1004
- @property up.popup.config
1005
- @deprecated
1006
- Use `up.layer.config.popup` instead.
1007
- */
1008
606
  get config() {
1009
607
  up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
1010
608
  return up.layer.config.popup;
1011
609
  },
1012
- /*-
1013
- Returns whether the given element or selector is contained
1014
- within the current layer.
1015
-
1016
- @function up.popup.contains
1017
- @param {string} elementOrSelector
1018
- The element to test
1019
- @return {boolean}
1020
- @deprecated
1021
- Use `up.layer.contains()` instead.
1022
- */
1023
610
  contains: function (element) {
1024
611
  up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
1025
612
  return up.layer.contains(element);
1026
613
  },
1027
- /*-
1028
- Returns whether an overlay is currently open.
1029
-
1030
- @function up.popup.isOpen
1031
- @return {boolean}
1032
- @deprecated
1033
- Use `up.layer.isOverlay()` instead.
1034
- */
1035
614
  isOpen: function () {
1036
615
  up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
1037
616
  return up.layer.isOverlay();
@@ -1052,15 +631,6 @@ up.migrate.targetMacro('up-popup', { 'up-layer': 'new popup' }, function () { re
1052
631
  /* 15 */
1053
632
  /***/ (function() {
1054
633
 
1055
- /*-
1056
- Tooltips
1057
- ========
1058
-
1059
- Unpoly used to come with a basic tooltip implementation.
1060
- This feature is now deprecated.
1061
-
1062
- @module up.tooltip
1063
- */
1064
634
  up.macro('[up-tooltip]', function (opener) {
1065
635
  up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
1066
636
  up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
@@ -1072,17 +642,14 @@ up.macro('[up-tooltip]', function (opener) {
1072
642
  /***/ (function() {
1073
643
 
1074
644
  var u = up.util;
1075
- /*-
1076
- @module up.network
1077
- */
1078
645
  up.migrate.renamedPackage('proxy', 'network');
1079
- up.migrate.renamedEvent('up:proxy:load', 'up:request:load'); // renamed in 1.0.0
1080
- up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded'); // renamed in 0.50.0
1081
- up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded'); // renamed in 1.0.0
1082
- up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal'); // renamed in 1.0.0
1083
- up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted'); // renamed in 1.0.0
1084
- up.migrate.renamedEvent('up:proxy:slow', 'up:request:late'); // renamed in 1.0.0
1085
- up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover'); // renamed in 1.0.0
646
+ up.migrate.renamedEvent('up:proxy:load', 'up:request:load');
647
+ up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded');
648
+ up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded');
649
+ up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal');
650
+ up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted');
651
+ up.migrate.renamedEvent('up:proxy:slow', 'up:request:late');
652
+ up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover');
1086
653
  var preloadDelayMoved = function () { return up.migrate.deprecated('up.proxy.config.preloadDelay', 'up.link.config.preloadDelay'); };
1087
654
  Object.defineProperty(up.network.config, 'preloadDelay', {
1088
655
  get: function () {
@@ -1097,33 +664,6 @@ Object.defineProperty(up.network.config, 'preloadDelay', {
1097
664
  up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
1098
665
  up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
1099
666
  up.migrate.handleRequestOptions = function (options) { return up.migrate.fixKey(options, 'data', 'params'); };
1100
- /*-
1101
- Makes an AJAX request to the given URL and caches the response.
1102
-
1103
- The function returns a promise that fulfills with the response text.
1104
-
1105
- ### Example
1106
-
1107
- ```
1108
- up.ajax('/search', { params: { query: 'sunshine' } }).then(function(text) {
1109
- console.log('The response text is %o', text)
1110
- }).catch(function() {
1111
- console.error('The request failed')
1112
- })
1113
- ```
1114
-
1115
- @function up.ajax
1116
- @param {string} [url]
1117
- The URL for the request.
1118
-
1119
- Instead of passing the URL as a string argument, you can also pass it as an `{ url }` option.
1120
- @param {Object} [options]
1121
- See options for `up.request()`.
1122
- @return {Promise<string>}
1123
- A promise for the response text.
1124
- @deprecated
1125
- Use `up.request()` instead.
1126
- */
1127
667
  up.ajax = function () {
1128
668
  var args = [];
1129
669
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -1133,13 +673,6 @@ up.ajax = function () {
1133
673
  var pickResponseText = function (response) { return response.text; };
1134
674
  return up.request.apply(up, args).then(pickResponseText);
1135
675
  };
1136
- /*-
1137
- Removes all cache entries.
1138
-
1139
- @function up.proxy.clear
1140
- @deprecated
1141
- Use `up.cache.clear()` instead.
1142
- */
1143
676
  up.network.clear = function () {
1144
677
  up.migrate.deprecated('up.proxy.clear()', 'up.cache.clear()');
1145
678
  up.cache.clear();
@@ -1153,36 +686,14 @@ up.network.preload = function () {
1153
686
  up.migrate.deprecated('up.proxy.preload(link)', 'up.link.preload(link)');
1154
687
  return (_a = up.link).preload.apply(_a, args);
1155
688
  };
1156
- /*-
1157
- @class up.Request
1158
- */
1159
689
  up.Request.prototype.navigate = function () {
1160
690
  up.migrate.deprecated('up.Request#navigate()', 'up.Request#loadPage()');
1161
691
  this.loadPage();
1162
692
  };
1163
- /*-
1164
- @class up.Response
1165
- */
1166
- /*-
1167
- Returns whether the server responded with a 2xx HTTP status.
1168
-
1169
- @function up.Response#isSuccess
1170
- @return {boolean}
1171
- @deprecated
1172
- Use `up.Response#ok` instead.
1173
- */
1174
693
  up.Response.prototype.isSuccess = function () {
1175
694
  up.migrate.deprecated('up.Response#isSuccess()', 'up.Response#ok');
1176
695
  return this.ok;
1177
696
  };
1178
- /*-
1179
- Returns whether the response was not [successful](/up.Response.prototype.ok).
1180
-
1181
- @function up.Response#isError
1182
- @return {boolean}
1183
- @deprecated
1184
- Use `!up.Response#ok` instead.
1185
- */
1186
697
  up.Response.prototype.isError = function () {
1187
698
  up.migrate.deprecated('up.Response#isError()', '!up.Response#ok');
1188
699
  return !this.ok;
@@ -1211,9 +722,6 @@ up.on('up:framework:reset', disableProgressBarIfCustomIndicator);
1211
722
  /* 17 */
1212
723
  /***/ (function() {
1213
724
 
1214
- /*-
1215
- @module up.radio
1216
- */
1217
725
  up.migrate.renamedProperty(up.radio.config, 'hungry', 'hungrySelectors');
1218
726
 
1219
727
 
@@ -1221,24 +729,9 @@ up.migrate.renamedProperty(up.radio.config, 'hungry', 'hungrySelectors');
1221
729
  /* 18 */
1222
730
  /***/ (function() {
1223
731
 
1224
- /*-
1225
- @module up.viewport
1226
- */
1227
732
  up.migrate.renamedPackage('layout', 'viewport');
1228
733
  up.migrate.renamedProperty(up.viewport.config, 'viewports', 'viewportSelectors');
1229
734
  up.migrate.renamedProperty(up.viewport.config, 'snap', 'revealSnap');
1230
- /*-
1231
- Returns the scrolling container for the given element.
1232
-
1233
- Returns the [document's scrolling element](/up.viewport.root)
1234
- if no closer viewport exists.
1235
-
1236
- @function up.viewport.closest
1237
- @param {string|Element|jQuery} target
1238
- @return {Element}
1239
- @deprecated
1240
- Use `up.viewport.get()` instead.
1241
- */
1242
735
  up.viewport.closest = function () {
1243
736
  var _a;
1244
737
  var args = [];
@@ -1281,7 +774,6 @@ up.viewport.closest = function () {
1281
774
  var __webpack_exports__ = {};
1282
775
  // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
1283
776
  !function() {
1284
- // We are going to add compilers and event handlers that should not be reset during specs.
1285
777
  up.framework.startExtension();
1286
778
  __webpack_require__(1);
1287
779
  __webpack_require__(2);