unpoly-rails 0.62.1 → 2.0.0.pre.rc6

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 (340) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/CHANGELOG.md +60 -1
  4. data/README.md +3 -11
  5. data/README_RAILS.md +295 -14
  6. data/dist/unpoly-bootstrap3.css +9 -14
  7. data/dist/unpoly-bootstrap3.js +4 -18
  8. data/dist/unpoly-bootstrap3.min.css +1 -1
  9. data/dist/unpoly-bootstrap3.min.js +1 -1
  10. data/dist/unpoly-bootstrap4.css +9 -0
  11. data/dist/unpoly-bootstrap4.js +16 -0
  12. data/dist/unpoly-bootstrap4.min.css +1 -0
  13. data/dist/unpoly-bootstrap4.min.js +1 -0
  14. data/dist/unpoly-bootstrap5.css +9 -0
  15. data/dist/unpoly-bootstrap5.js +14 -0
  16. data/dist/unpoly-bootstrap5.min.css +1 -0
  17. data/dist/unpoly-bootstrap5.min.js +1 -0
  18. data/dist/unpoly-migrate.js +1225 -0
  19. data/dist/unpoly-migrate.min.js +1 -0
  20. data/dist/unpoly.css +109 -140
  21. data/dist/unpoly.js +15805 -10558
  22. data/dist/unpoly.min.css +1 -1
  23. data/dist/unpoly.min.js +6 -4
  24. data/lib/unpoly-rails.rb +9 -3
  25. data/lib/unpoly/rails/change.rb +372 -0
  26. data/lib/unpoly/rails/change/cache.rb +26 -0
  27. data/lib/unpoly/rails/change/context.rb +80 -0
  28. data/lib/unpoly/rails/change/field.rb +117 -0
  29. data/lib/unpoly/rails/change/field_definition.rb +74 -0
  30. data/lib/unpoly/rails/change/layer.rb +60 -0
  31. data/lib/unpoly/rails/controller.rb +47 -0
  32. data/lib/unpoly/rails/error.rb +5 -0
  33. data/lib/unpoly/rails/request_echo_headers.rb +2 -2
  34. data/lib/unpoly/rails/version.rb +1 -1
  35. data/lib/unpoly/tasks.rb +55 -0
  36. metadata +43 -313
  37. data/.gitignore +0 -10
  38. data/.ruby-version +0 -1
  39. data/Gemfile +0 -8
  40. data/Gemfile.lock +0 -45
  41. data/Rakefile +0 -145
  42. data/bower.json +0 -27
  43. data/design/animation-ghosting.txt +0 -72
  44. data/design/design.txt +0 -34
  45. data/design/draft.html.erb +0 -48
  46. data/design/draft.rb +0 -9
  47. data/design/es6.js +0 -32
  48. data/design/ghost-debugging.txt +0 -118
  49. data/design/homepage.txt +0 -236
  50. data/design/ie11.txt +0 -9
  51. data/design/measure_import_node.js +0 -330
  52. data/design/measure_jquery/element_list.js +0 -41
  53. data/design/measure_jquery/up.on_vs_addEventListener.js +0 -56
  54. data/design/positioning.txt +0 -28
  55. data/design/query-params-in-form-actions/cases.html +0 -125
  56. data/design/rename.txt +0 -0
  57. data/design/test_rejected_promise.txt +0 -5
  58. data/design/unpoly errors.txt +0 -19
  59. data/lib/assets/javascripts/unpoly-bootstrap3.coffee +0 -2
  60. data/lib/assets/javascripts/unpoly-bootstrap3/feedback-ext.coffee +0 -5
  61. data/lib/assets/javascripts/unpoly-bootstrap3/form-ext.coffee +0 -1
  62. data/lib/assets/javascripts/unpoly-bootstrap3/modal-ext.coffee +0 -14
  63. data/lib/assets/javascripts/unpoly-bootstrap3/viewport-ext.coffee +0 -5
  64. data/lib/assets/javascripts/unpoly.coffee +0 -28
  65. data/lib/assets/javascripts/unpoly/browser.coffee.erb +0 -240
  66. data/lib/assets/javascripts/unpoly/classes/body_shifter.coffee +0 -45
  67. data/lib/assets/javascripts/unpoly/classes/cache.coffee +0 -127
  68. data/lib/assets/javascripts/unpoly/classes/compile_pass.coffee +0 -93
  69. data/lib/assets/javascripts/unpoly/classes/config.coffee +0 -9
  70. data/lib/assets/javascripts/unpoly/classes/css_transition.coffee +0 -118
  71. data/lib/assets/javascripts/unpoly/classes/divertible_chain.coffee +0 -39
  72. data/lib/assets/javascripts/unpoly/classes/event_listener.coffee +0 -116
  73. data/lib/assets/javascripts/unpoly/classes/extract_cascade.coffee +0 -86
  74. data/lib/assets/javascripts/unpoly/classes/extract_plan.coffee +0 -111
  75. data/lib/assets/javascripts/unpoly/classes/field_observer.coffee +0 -80
  76. data/lib/assets/javascripts/unpoly/classes/focus_follower.coffee +0 -29
  77. data/lib/assets/javascripts/unpoly/classes/follow_variant.coffee +0 -64
  78. data/lib/assets/javascripts/unpoly/classes/html_parser.coffee +0 -46
  79. data/lib/assets/javascripts/unpoly/classes/motion_controller.coffee +0 -157
  80. data/lib/assets/javascripts/unpoly/classes/params.coffee.erb +0 -544
  81. data/lib/assets/javascripts/unpoly/classes/record.coffee +0 -22
  82. data/lib/assets/javascripts/unpoly/classes/rect.js +0 -21
  83. data/lib/assets/javascripts/unpoly/classes/request.coffee +0 -246
  84. data/lib/assets/javascripts/unpoly/classes/response.coffee +0 -157
  85. data/lib/assets/javascripts/unpoly/classes/reveal_motion.coffee +0 -102
  86. data/lib/assets/javascripts/unpoly/classes/scroll_motion.coffee +0 -67
  87. data/lib/assets/javascripts/unpoly/classes/selector.coffee +0 -60
  88. data/lib/assets/javascripts/unpoly/classes/store/memory.coffee +0 -26
  89. data/lib/assets/javascripts/unpoly/classes/store/session.coffee +0 -59
  90. data/lib/assets/javascripts/unpoly/classes/tether.coffee +0 -105
  91. data/lib/assets/javascripts/unpoly/classes/url_set.coffee +0 -32
  92. data/lib/assets/javascripts/unpoly/cookie.coffee +0 -56
  93. data/lib/assets/javascripts/unpoly/element.coffee.erb +0 -1126
  94. data/lib/assets/javascripts/unpoly/event.coffee.erb +0 -445
  95. data/lib/assets/javascripts/unpoly/feedback.coffee +0 -353
  96. data/lib/assets/javascripts/unpoly/form.coffee.erb +0 -1075
  97. data/lib/assets/javascripts/unpoly/fragment.coffee.erb +0 -928
  98. data/lib/assets/javascripts/unpoly/framework.coffee +0 -67
  99. data/lib/assets/javascripts/unpoly/history.coffee +0 -268
  100. data/lib/assets/javascripts/unpoly/legacy.coffee +0 -60
  101. data/lib/assets/javascripts/unpoly/link.coffee.erb +0 -622
  102. data/lib/assets/javascripts/unpoly/log.coffee +0 -248
  103. data/lib/assets/javascripts/unpoly/modal.coffee.erb +0 -827
  104. data/lib/assets/javascripts/unpoly/motion.coffee.erb +0 -668
  105. data/lib/assets/javascripts/unpoly/namespace.coffee.erb +0 -5
  106. data/lib/assets/javascripts/unpoly/popup.coffee.erb +0 -515
  107. data/lib/assets/javascripts/unpoly/protocol.coffee +0 -298
  108. data/lib/assets/javascripts/unpoly/proxy.coffee +0 -672
  109. data/lib/assets/javascripts/unpoly/radio.coffee +0 -60
  110. data/lib/assets/javascripts/unpoly/rails.coffee +0 -24
  111. data/lib/assets/javascripts/unpoly/syntax.coffee.erb +0 -476
  112. data/lib/assets/javascripts/unpoly/toast.coffee +0 -67
  113. data/lib/assets/javascripts/unpoly/tooltip.coffee +0 -276
  114. data/lib/assets/javascripts/unpoly/util.coffee.erb +0 -1676
  115. data/lib/assets/javascripts/unpoly/viewport.coffee.erb +0 -830
  116. data/lib/assets/stylesheets/unpoly-bootstrap3.sass +0 -1
  117. data/lib/assets/stylesheets/unpoly-bootstrap3/modal-ext.sass +0 -27
  118. data/lib/assets/stylesheets/unpoly.sass +0 -1
  119. data/lib/assets/stylesheets/unpoly/close.sass +0 -2
  120. data/lib/assets/stylesheets/unpoly/dom.sass +0 -5
  121. data/lib/assets/stylesheets/unpoly/layout.sass +0 -2
  122. data/lib/assets/stylesheets/unpoly/link.sass +0 -2
  123. data/lib/assets/stylesheets/unpoly/modal.sass +0 -116
  124. data/lib/assets/stylesheets/unpoly/popup.sass +0 -7
  125. data/lib/assets/stylesheets/unpoly/toast.sass +0 -33
  126. data/lib/assets/stylesheets/unpoly/tooltip.sass +0 -62
  127. data/lib/unpoly/rails/inspector.rb +0 -149
  128. data/lib/unpoly/rails/inspector_accessor.rb +0 -30
  129. data/package.json +0 -38
  130. data/spec_app/.firefox-version +0 -1
  131. data/spec_app/.gitignore +0 -17
  132. data/spec_app/.rspec +0 -2
  133. data/spec_app/Gemfile +0 -30
  134. data/spec_app/Gemfile.lock +0 -229
  135. data/spec_app/README.rdoc +0 -28
  136. data/spec_app/Rakefile +0 -6
  137. data/spec_app/app/assets/images/.keep +0 -0
  138. data/spec_app/app/assets/images/favicon.png +0 -0
  139. data/spec_app/app/assets/images/grid.png +0 -0
  140. data/spec_app/app/assets/javascripts/bootstrap_manifest.coffee +0 -6
  141. data/spec_app/app/assets/javascripts/integration_test.coffee +0 -6
  142. data/spec_app/app/assets/javascripts/jasmine_specs.coffee +0 -6
  143. data/spec_app/app/assets/stylesheets/_helpers.sass +0 -5
  144. data/spec_app/app/assets/stylesheets/bootstrap_manifest.sass +0 -2
  145. data/spec_app/app/assets/stylesheets/integration_test.sass +0 -88
  146. data/spec_app/app/assets/stylesheets/jasmine_specs.sass +0 -20
  147. data/spec_app/app/controllers/application_controller.rb +0 -14
  148. data/spec_app/app/controllers/binding_test_controller.rb +0 -51
  149. data/spec_app/app/controllers/compiler_test_controller.rb +0 -5
  150. data/spec_app/app/controllers/css_test_controller.rb +0 -5
  151. data/spec_app/app/controllers/error_test_controller.rb +0 -5
  152. data/spec_app/app/controllers/form_test/basics_controller.rb +0 -14
  153. data/spec_app/app/controllers/form_test/redirects_controller.rb +0 -17
  154. data/spec_app/app/controllers/form_test/uploads_controller.rb +0 -15
  155. data/spec_app/app/controllers/hash_test_controller.rb +0 -5
  156. data/spec_app/app/controllers/method_test_controller.rb +0 -16
  157. data/spec_app/app/controllers/motion_test_controller.rb +0 -5
  158. data/spec_app/app/controllers/pages_controller.rb +0 -9
  159. data/spec_app/app/controllers/replace_test_controller.rb +0 -5
  160. data/spec_app/app/controllers/reveal_test_controller.rb +0 -5
  161. data/spec_app/app/controllers/scroll_test_controller.rb +0 -5
  162. data/spec_app/app/helpers/application_helper.rb +0 -2
  163. data/spec_app/app/mailers/.keep +0 -0
  164. data/spec_app/app/models/concerns/.keep +0 -0
  165. data/spec_app/app/views/compiler_test/timestamp.erb +0 -9
  166. data/spec_app/app/views/css_test/modal.erb +0 -47
  167. data/spec_app/app/views/css_test/modal_contents.erb +0 -5
  168. data/spec_app/app/views/css_test/modal_contents_wide.erb +0 -5
  169. data/spec_app/app/views/css_test/popup.erb +0 -81
  170. data/spec_app/app/views/css_test/popup_contents.erb +0 -5
  171. data/spec_app/app/views/css_test/tooltip.erb +0 -48
  172. data/spec_app/app/views/error_test/trigger.erb +0 -80
  173. data/spec_app/app/views/error_test/unexpected_response.erb +0 -3
  174. data/spec_app/app/views/form_test/basics/new.erb +0 -60
  175. data/spec_app/app/views/form_test/redirects/new.erb +0 -27
  176. data/spec_app/app/views/form_test/redirects/target.erb +0 -4
  177. data/spec_app/app/views/form_test/submission_result.erb +0 -30
  178. data/spec_app/app/views/form_test/uploads/new.erb +0 -44
  179. data/spec_app/app/views/hash_test/unpoly.erb +0 -30
  180. data/spec_app/app/views/hash_test/vanilla.erb +0 -13
  181. data/spec_app/app/views/layouts/integration_test.erb +0 -22
  182. data/spec_app/app/views/layouts/jasmine_rails/spec_runner.html.erb +0 -20
  183. data/spec_app/app/views/method_test/form_target.erb +0 -17
  184. data/spec_app/app/views/method_test/page1.erb +0 -11
  185. data/spec_app/app/views/method_test/page2.erb +0 -6
  186. data/spec_app/app/views/motion_test/animations.erb +0 -16
  187. data/spec_app/app/views/motion_test/transitions.erb +0 -13
  188. data/spec_app/app/views/pages/start.erb +0 -79
  189. data/spec_app/app/views/replace_test/_nav.erb +0 -6
  190. data/spec_app/app/views/replace_test/page1.erb +0 -14
  191. data/spec_app/app/views/replace_test/page2.erb +0 -14
  192. data/spec_app/app/views/replace_test/table.erb +0 -16
  193. data/spec_app/app/views/reveal_test/long1.erb +0 -17
  194. data/spec_app/app/views/reveal_test/long2.erb +0 -17
  195. data/spec_app/app/views/reveal_test/within_document_viewport.erb +0 -24
  196. data/spec_app/app/views/reveal_test/within_overflowing_div_viewport.erb +0 -28
  197. data/spec_app/app/views/scroll_test/long1.erb +0 -30
  198. data/spec_app/bin/bundle +0 -3
  199. data/spec_app/bin/rails +0 -8
  200. data/spec_app/bin/rake +0 -8
  201. data/spec_app/bin/setup +0 -29
  202. data/spec_app/bin/spring +0 -18
  203. data/spec_app/config.ru +0 -4
  204. data/spec_app/config/application.rb +0 -28
  205. data/spec_app/config/boot.rb +0 -3
  206. data/spec_app/config/database.yml +0 -25
  207. data/spec_app/config/environment.rb +0 -5
  208. data/spec_app/config/environments/development.rb +0 -41
  209. data/spec_app/config/environments/production.rb +0 -79
  210. data/spec_app/config/environments/test.rb +0 -42
  211. data/spec_app/config/initializers/assets.rb +0 -19
  212. data/spec_app/config/initializers/backtrace_silencers.rb +0 -7
  213. data/spec_app/config/initializers/bower_rails.rb +0 -16
  214. data/spec_app/config/initializers/cookies_serializer.rb +0 -3
  215. data/spec_app/config/initializers/filter_parameter_logging.rb +0 -4
  216. data/spec_app/config/initializers/inflections.rb +0 -16
  217. data/spec_app/config/initializers/mime_types.rb +0 -4
  218. data/spec_app/config/initializers/session_store.rb +0 -3
  219. data/spec_app/config/initializers/wrap_parameters.rb +0 -14
  220. data/spec_app/config/locales/en.yml +0 -23
  221. data/spec_app/config/routes.rb +0 -30
  222. data/spec_app/config/secrets.yml +0 -22
  223. data/spec_app/db/schema.rb +0 -23
  224. data/spec_app/db/seeds.rb +0 -7
  225. data/spec_app/lib/assets/.keep +0 -0
  226. data/spec_app/lib/tasks/.keep +0 -0
  227. data/spec_app/lib/tasks/cucumber.rake +0 -65
  228. data/spec_app/log/.keep +0 -0
  229. data/spec_app/public/404.html +0 -67
  230. data/spec_app/public/422.html +0 -67
  231. data/spec_app/public/500.html +0 -66
  232. data/spec_app/public/favicon.ico +0 -0
  233. data/spec_app/public/robots.txt +0 -5
  234. data/spec_app/script/cucumber +0 -10
  235. data/spec_app/spec/controllers/binding_test_controller_spec.rb +0 -248
  236. data/spec_app/spec/javascripts/helpers/agent_detector.coffee +0 -20
  237. data/spec_app/spec/javascripts/helpers/async_sequence.js.coffee +0 -103
  238. data/spec_app/spec/javascripts/helpers/browser_switches.js.coffee +0 -21
  239. data/spec_app/spec/javascripts/helpers/enable_logging.js.coffee +0 -2
  240. data/spec_app/spec/javascripts/helpers/fixture.js.coffee +0 -25
  241. data/spec_app/spec/javascripts/helpers/index.js.coffee +0 -1
  242. data/spec_app/spec/javascripts/helpers/jquery_no_conflict.js +0 -1
  243. data/spec_app/spec/javascripts/helpers/knife.js.coffee +0 -69
  244. data/spec_app/spec/javascripts/helpers/last_request.js.coffee +0 -25
  245. data/spec_app/spec/javascripts/helpers/mock_ajax.js.coffee +0 -8
  246. data/spec_app/spec/javascripts/helpers/mock_clock.js.coffee +0 -2
  247. data/spec_app/spec/javascripts/helpers/parse_form_data.js.coffee +0 -24
  248. data/spec_app/spec/javascripts/helpers/promise_state.js +0 -18
  249. data/spec_app/spec/javascripts/helpers/protect_jasmine_runner.coffee +0 -12
  250. data/spec_app/spec/javascripts/helpers/remove_body_margin.js.coffee +0 -8
  251. data/spec_app/spec/javascripts/helpers/reset_history.js.coffee +0 -23
  252. data/spec_app/spec/javascripts/helpers/reset_knife.js.coffee +0 -2
  253. data/spec_app/spec/javascripts/helpers/reset_up.js.coffee +0 -25
  254. data/spec_app/spec/javascripts/helpers/restore_body_scroll.js.coffee +0 -5
  255. data/spec_app/spec/javascripts/helpers/show_lib_versions.coffee +0 -12
  256. data/spec_app/spec/javascripts/helpers/spec_util.coffee +0 -47
  257. data/spec_app/spec/javascripts/helpers/to_be_around.js.coffee +0 -8
  258. data/spec_app/spec/javascripts/helpers/to_be_array.coffee +0 -5
  259. data/spec_app/spec/javascripts/helpers/to_be_attached.coffee +0 -9
  260. data/spec_app/spec/javascripts/helpers/to_be_blank.js.coffee +0 -8
  261. data/spec_app/spec/javascripts/helpers/to_be_detached.coffee +0 -9
  262. data/spec_app/spec/javascripts/helpers/to_be_element.js.coffee +0 -8
  263. data/spec_app/spec/javascripts/helpers/to_be_error.coffee +0 -8
  264. data/spec_app/spec/javascripts/helpers/to_be_given.js.coffee +0 -8
  265. data/spec_app/spec/javascripts/helpers/to_be_hidden.js.coffee +0 -8
  266. data/spec_app/spec/javascripts/helpers/to_be_jquery.js.coffee +0 -5
  267. data/spec_app/spec/javascripts/helpers/to_be_missing.js.coffee +0 -8
  268. data/spec_app/spec/javascripts/helpers/to_be_present.js.coffee +0 -8
  269. data/spec_app/spec/javascripts/helpers/to_be_scrolled_to.coffee +0 -11
  270. data/spec_app/spec/javascripts/helpers/to_be_visible.js.coffee +0 -9
  271. data/spec_app/spec/javascripts/helpers/to_contain.js.coffee +0 -8
  272. data/spec_app/spec/javascripts/helpers/to_end_with.js.coffee +0 -11
  273. data/spec_app/spec/javascripts/helpers/to_equal_jquery.js.coffee +0 -8
  274. data/spec_app/spec/javascripts/helpers/to_equal_node_list.coffee +0 -7
  275. data/spec_app/spec/javascripts/helpers/to_equal_via_is_equal.js.coffee +0 -7
  276. data/spec_app/spec/javascripts/helpers/to_have_class.js.coffee +0 -10
  277. data/spec_app/spec/javascripts/helpers/to_have_descendant.js.coffee +0 -10
  278. data/spec_app/spec/javascripts/helpers/to_have_length.js.coffee +0 -8
  279. data/spec_app/spec/javascripts/helpers/to_have_opacity.coffee +0 -15
  280. data/spec_app/spec/javascripts/helpers/to_have_own_property.js.coffee +0 -8
  281. data/spec_app/spec/javascripts/helpers/to_have_request_method.js.coffee +0 -16
  282. data/spec_app/spec/javascripts/helpers/to_have_text.js.coffee +0 -9
  283. data/spec_app/spec/javascripts/helpers/to_have_unhandled_rejections.coffee +0 -18
  284. data/spec_app/spec/javascripts/helpers/to_match_list.coffee +0 -14
  285. data/spec_app/spec/javascripts/helpers/to_match_selector.coffee +0 -8
  286. data/spec_app/spec/javascripts/helpers/to_match_text.js.coffee +0 -13
  287. data/spec_app/spec/javascripts/helpers/to_match_url.coffee +0 -14
  288. data/spec_app/spec/javascripts/helpers/trigger.js.coffee +0 -200
  289. data/spec_app/spec/javascripts/helpers/wait_until_dom_ready.js.coffee +0 -5
  290. data/spec_app/spec/javascripts/support/jasmine.yml +0 -51
  291. data/spec_app/spec/javascripts/up/browser_spec.js.coffee +0 -150
  292. data/spec_app/spec/javascripts/up/classes/cache_spec.js.coffee +0 -82
  293. data/spec_app/spec/javascripts/up/classes/config_spec.coffee +0 -24
  294. data/spec_app/spec/javascripts/up/classes/divertible_chain_spec.coffee +0 -45
  295. data/spec_app/spec/javascripts/up/classes/focus_tracker_spec.coffee +0 -34
  296. data/spec_app/spec/javascripts/up/classes/params_spec.coffee +0 -557
  297. data/spec_app/spec/javascripts/up/classes/request_spec.coffee +0 -50
  298. data/spec_app/spec/javascripts/up/classes/scroll_motion_spec.js.coffee +0 -51
  299. data/spec_app/spec/javascripts/up/classes/store/memory_spec.js.coffee +0 -70
  300. data/spec_app/spec/javascripts/up/classes/store/session_spec.js.coffee +0 -114
  301. data/spec_app/spec/javascripts/up/element_spec.coffee +0 -897
  302. data/spec_app/spec/javascripts/up/event_spec.js.coffee +0 -530
  303. data/spec_app/spec/javascripts/up/feedback_spec.js.coffee +0 -401
  304. data/spec_app/spec/javascripts/up/form_spec.js.coffee +0 -1527
  305. data/spec_app/spec/javascripts/up/fragment_spec.js.coffee +0 -2624
  306. data/spec_app/spec/javascripts/up/history_spec.js.coffee +0 -340
  307. data/spec_app/spec/javascripts/up/jquery_spec.js.coffee +0 -4
  308. data/spec_app/spec/javascripts/up/legacy_spec.js.coffee +0 -27
  309. data/spec_app/spec/javascripts/up/link_spec.js.coffee +0 -1098
  310. data/spec_app/spec/javascripts/up/log_spec.js.coffee +0 -119
  311. data/spec_app/spec/javascripts/up/modal_spec.js.coffee +0 -939
  312. data/spec_app/spec/javascripts/up/motion_spec.js.coffee +0 -582
  313. data/spec_app/spec/javascripts/up/popup_spec.js.coffee +0 -508
  314. data/spec_app/spec/javascripts/up/protocol_spec.js.coffee +0 -39
  315. data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +0 -1137
  316. data/spec_app/spec/javascripts/up/radio_spec.js.coffee +0 -212
  317. data/spec_app/spec/javascripts/up/rails_spec.js.coffee +0 -118
  318. data/spec_app/spec/javascripts/up/spec_spec.js.coffee +0 -9
  319. data/spec_app/spec/javascripts/up/syntax_spec.js.coffee +0 -304
  320. data/spec_app/spec/javascripts/up/toast_spec.js.coffee +0 -37
  321. data/spec_app/spec/javascripts/up/tooltip_spec.js.coffee +0 -163
  322. data/spec_app/spec/javascripts/up/util_spec.js.coffee +0 -1420
  323. data/spec_app/spec/javascripts/up/viewport_spec.js.coffee +0 -655
  324. data/spec_app/spec/spec_helper.rb +0 -62
  325. data/spec_app/test/controllers/.keep +0 -0
  326. data/spec_app/test/fixtures/.keep +0 -0
  327. data/spec_app/test/helpers/.keep +0 -0
  328. data/spec_app/test/integration/.keep +0 -0
  329. data/spec_app/test/mailers/.keep +0 -0
  330. data/spec_app/test/models/.keep +0 -0
  331. data/spec_app/test/test_helper.rb +0 -10
  332. data/spec_app/vendor/asset-libs/es6-promise-4.1.6/es6-promise.auto.js +0 -1159
  333. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.bower.json +0 -43
  334. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.gitignore +0 -6
  335. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.npmignore +0 -10
  336. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.pairs +0 -6
  337. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/.travis.yml +0 -56
  338. data/spec_app/vendor/asset-libs/jasmine-ajax-3.3.1/jasmine-ajax.js +0 -790
  339. data/spec_app/vendor/assets/.keep +0 -0
  340. data/unpoly-rails.gemspec +0 -24
@@ -1,14 +1,9 @@
1
- .up-modal-content {
2
- padding: 0; }
3
-
4
- .up-modal-dialog {
5
- margin: 0; }
6
-
7
- .up-modal[up-flavor='drawer'] .up-modal-content {
8
- border-radius: 0;
9
- border-top: none;
10
- border-bottom: none; }
11
- .up-modal[up-flavor='drawer'][up-position='left'] .up-modal-content {
12
- border-left: none; }
13
- .up-modal[up-flavor='drawer'][up-position='right'] .up-modal-content {
14
- border-right: none; }
1
+ up-modal .container,
2
+ up-modal .container-fluid,
3
+ up-drawer .container,
4
+ up-drawer .container-fluid,
5
+ up-popup .container,
6
+ up-popup .container-fluid {
7
+ padding-left: 0;
8
+ padding-right: 0;
9
+ max-width: none; }
@@ -1,30 +1,16 @@
1
1
  (function() {
2
2
  up.feedback.config.currentClasses.push('active');
3
3
 
4
- up.feedback.config.navs.push('.nav');
4
+ up.feedback.config.navSelectors.push('.nav', '.navbar');
5
5
 
6
- }).call(this);
7
- (function() {
8
- up.form.config.validateTargets.unshift('.form-group:has(&)');
9
-
10
- }).call(this);
11
- (function() {
12
- up.modal.config.template = "<div class=\"up-modal\">\n <div class=\"up-modal-backdrop\"></div>\n <div class=\"up-modal-viewport\">\n <div class=\"up-modal-dialog modal-dialog\">\n <div class=\"up-modal-content modal-content\"></div>\n </div>\n </div>\n</div>";
6
+ up.form.config.validateTargets.unshift('.form-group:has(:origin)');
13
7
 
14
- }).call(this);
15
- (function() {
16
8
  up.viewport.config.fixedTop.push('.navbar-fixed-top');
17
9
 
18
10
  up.viewport.config.fixedBottom.push('.navbar-fixed-bottom');
19
11
 
20
- up.viewport.config.anchoredRight.push('.navbar-fixed-top');
21
-
22
- up.viewport.config.anchoredRight.push('.navbar-fixed-bottom');
23
-
24
- up.viewport.config.anchoredRight.push('.footer');
25
-
26
- }).call(this);
27
- (function() {
12
+ up.viewport.config.anchoredRight.push('.navbar-fixed-top', '.navbar-fixed-bottom');
28
13
 
14
+ up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg)?(-\d+)?$/);
29
15
 
30
16
  }).call(this);
@@ -1 +1 @@
1
- .up-modal-content{padding:0}.up-modal-dialog{margin:0}.up-modal[up-flavor='drawer'] .up-modal-content{border-radius:0;border-top:none;border-bottom:none}.up-modal[up-flavor='drawer'][up-position='left'] .up-modal-content{border-left:none}.up-modal[up-flavor='drawer'][up-position='right'] .up-modal-content{border-right:none}
1
+ up-modal .container,up-modal .container-fluid,up-drawer .container,up-drawer .container-fluid,up-popup .container,up-popup .container-fluid{padding-left:0;padding-right:0;max-width:none}
@@ -1 +1 @@
1
- (function(){up.feedback.config.currentClasses.push("active"),up.feedback.config.navs.push(".nav")}).call(this),function(){up.form.config.validateTargets.unshift(".form-group:has(&)")}.call(this),function(){up.modal.config.template='<div class="up-modal">\n <div class="up-modal-backdrop"></div>\n <div class="up-modal-viewport">\n <div class="up-modal-dialog modal-dialog">\n <div class="up-modal-content modal-content"></div>\n </div>\n </div>\n</div>'}.call(this),function(){up.viewport.config.fixedTop.push(".navbar-fixed-top"),up.viewport.config.fixedBottom.push(".navbar-fixed-bottom"),up.viewport.config.anchoredRight.push(".navbar-fixed-top"),up.viewport.config.anchoredRight.push(".navbar-fixed-bottom"),up.viewport.config.anchoredRight.push(".footer")}.call(this),function(){}.call(this);
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)?(-\d+)?$/)}).call(this);
@@ -0,0 +1,9 @@
1
+ up-modal .container,
2
+ up-modal .container-fluid,
3
+ up-drawer .container,
4
+ up-drawer .container-fluid,
5
+ up-popup .container,
6
+ up-popup .container-fluid {
7
+ padding-left: 0;
8
+ padding-right: 0;
9
+ max-width: none; }
@@ -0,0 +1,16 @@
1
+ (function() {
2
+ up.feedback.config.currentClasses.push('active');
3
+
4
+ up.feedback.config.navSelectors.push('.nav', '.navbar');
5
+
6
+ up.form.config.validateTargets.unshift('.form-group:has(:origin)');
7
+
8
+ up.viewport.config.fixedTop.push('.navbar.fixed-top');
9
+
10
+ up.viewport.config.fixedBottom.push('.navbar.fixed-bottom');
11
+
12
+ up.viewport.config.anchoredRight.push('.navbar.fixed-top', '.navbar.fixed-bottom');
13
+
14
+ up.fragment.config.badTargetClasses.push('row', /^col(-xs|-sm|-md|-lg|-xl)?(-\d+)?$/, /^[mp][tblrxy]?-\d+$/);
15
+
16
+ }).call(this);
@@ -0,0 +1 @@
1
+ up-modal .container,up-modal .container-fluid,up-drawer .container,up-drawer .container-fluid,up-popup .container,up-popup .container-fluid{padding-left:0;padding-right:0;max-width:none}
@@ -0,0 +1 @@
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);
@@ -0,0 +1,9 @@
1
+ up-modal .container,
2
+ up-modal .container-fluid,
3
+ up-drawer .container,
4
+ up-drawer .container-fluid,
5
+ up-popup .container,
6
+ up-popup .container-fluid {
7
+ padding-left: 0;
8
+ padding-right: 0;
9
+ max-width: none; }
@@ -0,0 +1,14 @@
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);
@@ -0,0 +1 @@
1
+ up-modal .container,up-modal .container-fluid,up-drawer .container,up-drawer .container-fluid,up-popup .container,up-popup .container-fluid{padding-left:0;padding-right:0;max-width:none}
@@ -0,0 +1 @@
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);
@@ -0,0 +1,1225 @@
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, ['DEPRECATION', 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
+
305
+ /***
306
+ @module up.form
307
+ */
308
+
309
+ (function() {
310
+ up.migrate.renamedProperty(up.form.config, 'fields', 'fieldSelectors');
311
+
312
+ up.migrate.renamedProperty(up.form.config, 'submitButtons', 'submitButtonSelectors');
313
+
314
+ }).call(this);
315
+ (function() {
316
+ var u,
317
+ slice = [].slice;
318
+
319
+ u = up.util;
320
+
321
+
322
+ /***
323
+ @module up.fragment
324
+ */
325
+
326
+ up.migrate.renamedPackage('flow', 'fragment');
327
+
328
+ up.migrate.renamedPackage('dom', 'fragment');
329
+
330
+ up.migrate.renamedProperty(up.fragment.config, 'fallbacks', 'mainTargets');
331
+
332
+ up.migrate.handleResponseDocOptions = function(docOptions) {
333
+ return up.migrate.fixKey(docOptions, 'html', 'document');
334
+ };
335
+
336
+
337
+ /***
338
+ Replaces elements on the current page with corresponding elements
339
+ from a new page fetched from the server.
340
+
341
+ @function up.replace
342
+ @param {string|Element|jQuery} target
343
+ The CSS selector to update. You can also pass a DOM element or jQuery element
344
+ here, in which case a selector will be inferred from the element's class and ID.
345
+ @param {string} url
346
+ The URL to fetch from the server.
347
+ @param {Object} [options]
348
+ See `options` for `up.render()`.
349
+ @return {Promise}
350
+ A promise that fulfills when the page has been updated.
351
+ @deprecated
352
+ Use `up.render()` or `up.navigate()` instead.
353
+ */
354
+
355
+ up.replace = function(target, url, options) {
356
+ up.migrate.deprecated('up.replace(target, url)', 'up.navigate(target, { url })');
357
+ return up.navigate(u.merge(options, {
358
+ target: target,
359
+ url: url
360
+ }));
361
+ };
362
+
363
+
364
+ /***
365
+ Updates a selector on the current page with the
366
+ same selector from the given HTML string.
367
+
368
+ \#\#\# Example
369
+
370
+ Let's say your current HTML looks like this:
371
+
372
+ <div class="one">old one</div>
373
+ <div class="two">old two</div>
374
+
375
+ We now replace the second `<div>`, using an HTML string
376
+ as the source:
377
+
378
+ html = '<div class="one">new one</div>' +
379
+ '<div class="two">new two</div>';
380
+
381
+ up.extract('.two', html)
382
+
383
+ Unpoly looks for the selector `.two` in the strings and updates its
384
+ contents in the current page. The current page now looks like this:
385
+
386
+ <div class="one">old one</div>
387
+ <div class="two">new two</div>
388
+
389
+ Note how only `.two` has changed. The update for `.one` was
390
+ discarded, since it didn't match the selector.
391
+
392
+ @function up.extract
393
+ @param {string|Element|jQuery} target
394
+ @param {string} html
395
+ @param {Object} [options]
396
+ See options for [`up.render()`](/up.render).
397
+ @return {Promise}
398
+ A promise that will be fulfilled when the selector was updated.
399
+ @deprecated
400
+ Use `up.render()` or `up.navigate()` instead.
401
+ */
402
+
403
+ up.extract = function(target, document, options) {
404
+ up.migrate.deprecated('up.extract(target, document)', 'up.navigate(target, { document })');
405
+ return up.navigate(u.merge(options, {
406
+ target: target,
407
+ document: document
408
+ }));
409
+ };
410
+
411
+
412
+ /***
413
+ Returns the first element matching the given selector, but
414
+ ignores elements that are being [destroyed](/up.destroy) or that are being
415
+ removed by a [transition](/up.morph).
416
+
417
+ Returns `undefined` if no element matches these conditions.
418
+
419
+ @function up.fragment.first
420
+ @param {Element|jQuery} [root=document]
421
+ The root element for the search. Only the root's children will be matched.
422
+
423
+ May be omitted to search through all elements in the `document`.
424
+ @param {string} selector
425
+ The selector to match
426
+ @param {string} [options.layer='current']
427
+ The the layer in which to find the element.
428
+
429
+ @see layer-option
430
+ @param {string|Element|jQuery} [options.origin]
431
+ An second element or selector that can be referenced as `:origin` in the first selector:
432
+ @return {Element|undefined}
433
+ The first element that is neither a ghost or being destroyed,
434
+ or `undefined` if no such element was found.
435
+ @deprecated
436
+ Use `up.fragment.get()` instead.
437
+ */
438
+
439
+ up.fragment.first = function() {
440
+ var args, ref;
441
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
442
+ up.migrate.deprecated('up.fragment.first()', 'up.fragment.get()');
443
+ return (ref = up.fragment).get.apply(ref, args);
444
+ };
445
+
446
+ up.first = up.fragment.first;
447
+
448
+ up.migrate.handleScrollOptions = function(options) {
449
+ if (u.isUndefined(options.scroll)) {
450
+ if (u.isString(options.reveal)) {
451
+ up.migrate.deprecated("Option { reveal: '" + options.reveal + "' }", "{ scroll: '" + options.reveal + "' }");
452
+ options.scroll = options.reveal;
453
+ } else if (options.reveal === true) {
454
+ up.migrate.deprecated('Option { reveal: true }', "{ scroll: 'target' }");
455
+ options.scroll = 'target';
456
+ } else if (options.reveal === false) {
457
+ up.migrate.deprecated('Option { reveal: false }', "{ scroll: false }");
458
+ options.scroll = false;
459
+ }
460
+ if (u.isDefined(options.resetScroll)) {
461
+ up.migrate.deprecated('Option { resetScroll: true }', "{ scroll: 'reset' }");
462
+ options.scroll = 'teset';
463
+ }
464
+ if (u.isDefined(options.restoreScroll)) {
465
+ up.migrate.deprecated('Option { restoreScroll: true }', "{ scroll: 'restore' }");
466
+ return options.scroll = 'restore';
467
+ }
468
+ }
469
+ };
470
+
471
+ up.migrate.handleHistoryOption = function(options) {
472
+ if (u.isString(options.history) && options.history !== 'auto') {
473
+ up.migrate.warn("Passing a URL as { history } option is deprecated. Pass it as { location } instead.");
474
+ options.location = options.history;
475
+ return options.history = 'auto';
476
+ }
477
+ };
478
+
479
+ up.migrate.handleRenderOptions = function(options) {
480
+ var i, len, prop, ref, results;
481
+ up.migrate.handleHistoryOption(options);
482
+ ref = ['target', 'origin'];
483
+ results = [];
484
+ for (i = 0, len = ref.length; i < len; i++) {
485
+ prop = ref[i];
486
+ if (u.isJQuery(options[prop])) {
487
+ up.migrate.warn('Passing a jQuery collection as { %s } is deprecated. Pass it as a native element instead.', prop);
488
+ results.push(options[prop] = up.element.get(options[prop]));
489
+ } else {
490
+ results.push(void 0);
491
+ }
492
+ }
493
+ return results;
494
+ };
495
+
496
+ }).call(this);
497
+
498
+ /***
499
+ @module up.history
500
+ */
501
+
502
+ (function() {
503
+ up.migrate.renamedProperty(up.history.config, 'popTargets', 'restoreTargets');
504
+
505
+
506
+ /***
507
+ Returns a normalized URL for the current history entry.
508
+
509
+ @function up.history.url
510
+ @return {string}
511
+ @deprecated Use the `up.history.location` property instead.
512
+ */
513
+
514
+ up.history.url = function() {
515
+ up.migrate.deprecated('up.history.url()', 'up.history.location');
516
+ return up.history.location;
517
+ };
518
+
519
+ up.migrate.renamedEvent('up:history:push', 'up:location:changed');
520
+
521
+ up.migrate.renamedEvent('up:history:pushed', 'up:location:changed');
522
+
523
+ up.migrate.renamedEvent('up:history:restore', 'up:location:changed');
524
+
525
+ up.migrate.renamedEvent('up:history:restored', 'up:location:changed');
526
+
527
+ up.migrate.renamedEvent('up:history:replaced', 'up:location:changed');
528
+
529
+ }).call(this);
530
+
531
+ /***
532
+ @module up.feedback
533
+ */
534
+
535
+ (function() {
536
+ up.migrate.renamedPackage('navigation', 'feedback');
537
+
538
+ up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
539
+
540
+ }).call(this);
541
+ (function() {
542
+ up.migrate.parseFollowOptions = function(parser) {
543
+ parser.string('flavor');
544
+ parser.string('width');
545
+ parser.string('height');
546
+ parser.boolean('closable');
547
+ parser.booleanOrString('reveal');
548
+ parser.boolean('resetScroll');
549
+ return parser.boolean('restoreScroll');
550
+ };
551
+
552
+ }).call(this);
553
+
554
+ /***
555
+ @module up.layer
556
+ */
557
+
558
+ (function() {
559
+ up.migrate.handleLayerOptions = function(options) {
560
+ var dimensionKey, i, len, ref;
561
+ up.migrate.fixKey(options, 'flavor', 'mode');
562
+ up.migrate.fixKey(options, 'closable', 'dismissable');
563
+ up.migrate.fixKey(options, 'closeLabel', 'dismissLabel');
564
+ ref = ['width', 'maxWidth', 'height'];
565
+ for (i = 0, len = ref.length; i < len; i++) {
566
+ dimensionKey = ref[i];
567
+ if (options[dimensionKey]) {
568
+ up.migrate.warn("Layer option { " + dimensionKey + " } has been removed. Use { size } or { class } instead.");
569
+ }
570
+ }
571
+ if (options.sticky) {
572
+ up.migrate.warn('Layer option { sticky } has been removed. Give links an [up-peel=false] attribute to prevent layer dismissal on click.');
573
+ }
574
+ if (options.template) {
575
+ up.migrate.warn('Layer option { template } has been removed. Use { class } or modify the layer HTML on up:layer:open.');
576
+ }
577
+ if (options.layer === 'page') {
578
+ up.migrate.warn("Option { layer: 'page' } has been renamed to { layer: 'root' }.");
579
+ options.layer = 'root';
580
+ }
581
+ if (options.layer === 'modal' || options.layer === 'popup') {
582
+ up.migrate.warn("Option { layer: '" + options.layer + "' } has been removed. Did you mean { layer: 'overlay' }?");
583
+ return options.layer = 'overlay';
584
+ }
585
+ };
586
+
587
+ up.migrate.handleTetherOptions = function(options) {
588
+ var align, position, ref;
589
+ ref = options.position.split('-'), position = ref[0], align = ref[1];
590
+ if (align) {
591
+ up.migrate.warn('The position value %o is deprecated. Use %o instead.', options.position, {
592
+ position: position,
593
+ align: align
594
+ });
595
+ options.position = position;
596
+ return options.align = align;
597
+ }
598
+ };
599
+
600
+
601
+ /***
602
+ When this element is clicked, closes a currently open overlay.
603
+
604
+ Does nothing if no overlay is currently open.
605
+
606
+ To make a link that closes the current overlay, but follows to
607
+ a fallback destination on the root layer:
608
+
609
+ <a href="/fallback" up-close>Okay</a>
610
+
611
+ @selector a[up-close]
612
+ @deprecated
613
+ Use `a[up-dismiss]` instead.
614
+ */
615
+
616
+ up.migrate.registerLayerCloser = function(layer) {
617
+ return layer.registerClickCloser('up-close', (function(_this) {
618
+ return function(value, closeOptions) {
619
+ up.migrate.deprecated('[up-close]', '[up-dismiss]');
620
+ return layer.dismiss(value, closeOptions);
621
+ };
622
+ })(this));
623
+ };
624
+
625
+ up.migrate.handleLayerConfig = function(config) {
626
+ return up.migrate.fixKey(config, 'history', 'historyVisible');
627
+ };
628
+
629
+ }).call(this);
630
+
631
+ /***
632
+ @module up.layer
633
+ */
634
+
635
+ (function() {
636
+ var FLAVORS_ERROR, u;
637
+
638
+ u = up.util;
639
+
640
+ 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.');
641
+
642
+ up.modal = u.literal({
643
+
644
+ /***
645
+ Opens a modal overlay for the given URL.
646
+
647
+ @function up.modal.visit
648
+ @param {string} url
649
+ The URL to load.
650
+ @param {Object} options
651
+ See options for `up.render()`.
652
+ @deprecated
653
+ Use `up.layer.open({ url, mode: "modal" })` instead.
654
+ */
655
+ visit: function(url, options) {
656
+ if (options == null) {
657
+ options = {};
658
+ }
659
+ up.migrate.deprecated('up.modal.visit(url)', 'up.layer.open({ url, mode: "modal" })');
660
+ return up.layer.open(u.merge(options, {
661
+ url: url,
662
+ mode: 'modal'
663
+ }));
664
+ },
665
+
666
+ /***
667
+ Opens the given link's destination in a modal overlay.
668
+
669
+ @function up.modal.follow
670
+ @param {Element|jQuery|string} linkOrSelector
671
+ The link to follow.
672
+ @param {string} [options]
673
+ See options for `up.render()`.
674
+ @return {Promise}
675
+ A promise that will be fulfilled when the modal has been opened.
676
+ @deprecated
677
+ Use `up.follow(link, { layer: "modal" })` instead.
678
+ */
679
+ follow: function(link, options) {
680
+ if (options == null) {
681
+ options = {};
682
+ }
683
+ up.migrate.deprecated('up.modal.follow(link)', 'up.follow(link, { layer: "modal" })');
684
+ return up.follow(link, u.merge(options, {
685
+ layer: 'modal'
686
+ }));
687
+ },
688
+
689
+ /***
690
+ [Extracts](/up.extract) the given CSS selector from the given HTML string and
691
+ opens the results in a modal overlay.
692
+
693
+ @function up.modal.extract
694
+ @param {string} selector
695
+ The CSS selector to extract from the HTML.
696
+ @param {string} document
697
+ The HTML containing the modal content.
698
+ @param {Object} options
699
+ See options for [`up.modal.follow()`](/up.modal.follow).
700
+ @return {Promise}
701
+ A promise that will be fulfilled when the modal has been opened.
702
+ @deprecated
703
+ Use `up.layer.open({ document, mode: "modal" })` instead.
704
+ */
705
+ extract: function(target, html, options) {
706
+ if (options == null) {
707
+ options = {};
708
+ }
709
+ up.migrate.deprecated('up.modal.extract(target, document)', 'up.layer.open({ document, mode: "modal" })');
710
+ return up.layer.open(u.merge(options, {
711
+ target: target,
712
+ html: html,
713
+ layer: 'modal'
714
+ }));
715
+ },
716
+
717
+ /***
718
+ Closes a currently open overlay.
719
+
720
+ @function up.modal.close
721
+ @param {Object} options
722
+ @return {Promise}
723
+ @deprecated
724
+ Use `up.layer.dismiss()` instead.
725
+ */
726
+ close: function(options) {
727
+ if (options == null) {
728
+ options = {};
729
+ }
730
+ up.migrate.deprecated('up.modal.close()', 'up.layer.dismiss()');
731
+ up.layer.dismiss(null, options);
732
+ return up.migrate.formerlyAsync('up.layer.dismiss()');
733
+ },
734
+
735
+ /***
736
+ Returns the location URL of the fragment displayed in the current overlay.
737
+
738
+ @function up.modal.url
739
+ @return {string}
740
+ @deprecated
741
+ Use `up.layer.location` instead.
742
+ */
743
+ url: function() {
744
+ up.migrate.deprecated('up.modal.url()', 'up.layer.location');
745
+ return up.layer.location;
746
+ },
747
+
748
+ /***
749
+ Returns the location URL of the layer behind the current overlay.
750
+
751
+ @function up.modal.coveredUrl
752
+ @return {string}
753
+ @deprecated
754
+ Use `up.layer.parent.location` instead.
755
+ */
756
+ coveredUrl: function() {
757
+ var ref;
758
+ up.migrate.deprecated('up.modal.coveredUrl()', 'up.layer.parent.location');
759
+ return (ref = up.layer.parent) != null ? ref.location : void 0;
760
+ },
761
+
762
+ /***
763
+ Sets default options for future modal overlays.
764
+
765
+ @property up.modal.config
766
+ @deprecated
767
+ Use `up.layer.config.modal` instead.
768
+ */
769
+ get_config: function() {
770
+ up.migrate.deprecated('up.modal.config', 'up.layer.config.modal');
771
+ return up.layer.config.modal;
772
+ },
773
+
774
+ /***
775
+ Returns whether the given element or selector is contained
776
+ within the current layer.
777
+
778
+ @function up.modal.contains
779
+ @param {string} elementOrSelector
780
+ The element to test
781
+ @return {boolean}
782
+ @deprecated
783
+ Use `up.layer.contains()` instead.
784
+ */
785
+ contains: function(element) {
786
+ up.migrate.deprecated('up.modal.contains()', 'up.layer.contains()');
787
+ return up.layer.contains(element);
788
+ },
789
+
790
+ /***
791
+ Returns whether an overlay is currently open.
792
+
793
+ @function up.modal.isOpen
794
+ @return {boolean}
795
+ @deprecated
796
+ Use `up.layer.isOverlay()` instead.
797
+ */
798
+ isOpen: function() {
799
+ up.migrate.deprecated('up.modal.isOpen()', 'up.layer.isOverlay()');
800
+ return up.layer.isOverlay();
801
+ },
802
+ get_flavors: function() {
803
+ throw FLAVORS_ERROR;
804
+ },
805
+ flavor: function() {
806
+ throw FLAVORS_ERROR;
807
+ }
808
+ });
809
+
810
+ up.migrate.renamedEvent('up:modal:open', 'up:layer:open');
811
+
812
+ up.migrate.renamedEvent('up:modal:opened', 'up:layer:opened');
813
+
814
+ up.migrate.renamedEvent('up:modal:close', 'up:layer:dismiss');
815
+
816
+ up.migrate.renamedEvent('up:modal:closed', 'up:layer:dismissed');
817
+
818
+
819
+ /***
820
+ Clicking this link will load the destination via AJAX and open
821
+ the given selector in a modal overlay.
822
+
823
+ @selector a[up-modal]
824
+ @params-note
825
+ All attributes for `a[up-layer=new]` may also be used.
826
+ @param {string} up-modal
827
+ The CSS selector that will be extracted from the response and displayed in a modal dialog.
828
+ @deprecated
829
+ Use `a[up-layer=modal]` instead.
830
+ */
831
+
832
+ up.link.targetMacro('up-modal', {
833
+ 'up-layer': 'new modal'
834
+ }, function() {
835
+ return up.migrate.deprecated('a[up-modal]', 'a[up-layer="new modal"]');
836
+ });
837
+
838
+
839
+ /***
840
+ Clicking this link will load the destination via AJAX and open
841
+ the given selector in a modal drawer that slides in from the edge of the screen.
842
+
843
+ @selector a[up-drawer]
844
+ @params-note
845
+ All attributes for `a[up-layer=new]` may also be used.
846
+ @param {string} up-drawer
847
+ The CSS selector that will be extracted from the response and displayed in a modal dialog.
848
+ @deprecated
849
+ Use `a[up-layer=drawer]` instead.
850
+ */
851
+
852
+ up.link.targetMacro('up-drawer', {
853
+ 'up-layer': 'new drawer'
854
+ }, function() {
855
+ return up.migrate.deprecated('a[up-drawer]', 'a[up-layer="new drawer"]');
856
+ });
857
+
858
+ }).call(this);
859
+ (function() {
860
+ var e, u;
861
+
862
+ u = up.util;
863
+
864
+ e = up.element;
865
+
866
+ up.popup = u.literal({
867
+
868
+ /***
869
+ Attaches a popup overlay to the given element or selector.
870
+
871
+ @function up.popup.attach
872
+ @param {Element|jQuery|string} anchor
873
+ The element to which the popup will be attached.
874
+ @param {Object} [options]
875
+ See options for `up.render()`.
876
+ @return {Promise}
877
+ @deprecated
878
+ Use `up.layer.open({ origin, layer: 'popup' })` instead.
879
+ */
880
+ attach: function(origin, options) {
881
+ if (options == null) {
882
+ options = {};
883
+ }
884
+ origin = up.fragment.get(origin);
885
+ up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
886
+ return up.layer.open(u.merge(options, {
887
+ origin: origin,
888
+ layer: 'popup'
889
+ }));
890
+ },
891
+
892
+ /***
893
+ Closes a currently open overlay.
894
+
895
+ @function up.popup.close
896
+ @param {Object} options
897
+ @return {Promise}
898
+ @deprecated
899
+ Use `up.layer.dismiss()` instead.
900
+ */
901
+ close: function(options) {
902
+ if (options == null) {
903
+ options = {};
904
+ }
905
+ up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
906
+ return up.layer.dismiss(null, options);
907
+ },
908
+
909
+ /***
910
+ Returns the location URL of the fragment displayed in the current overlay.
911
+
912
+ @function up.popup.url
913
+ @return {string}
914
+ @deprecated
915
+ Use `up.layer.location` instead.
916
+ */
917
+ url: function() {
918
+ up.migrate.deprecated('up.popup.url()', 'up.layer.location');
919
+ return up.layer.location;
920
+ },
921
+
922
+ /***
923
+ Returns the location URL of the layer behind the current overlay.
924
+
925
+ @function up.popup.coveredUrl
926
+ @return {string}
927
+ @deprecated
928
+ Use `up.layer.parent.location` instead.
929
+ */
930
+ coveredUrl: function() {
931
+ var ref;
932
+ up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
933
+ return (ref = up.layer.parent) != null ? ref.location : void 0;
934
+ },
935
+
936
+ /***
937
+ Sets default options for future popup overlays.
938
+
939
+ @property up.popup.config
940
+ @deprecated
941
+ Use `up.layer.config.popup` instead.
942
+ */
943
+ get_config: function() {
944
+ up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
945
+ return up.layer.config.popup;
946
+ },
947
+
948
+ /***
949
+ Returns whether the given element or selector is contained
950
+ within the current layer.
951
+
952
+ @function up.popup.contains
953
+ @param {string} elementOrSelector
954
+ The element to test
955
+ @return {boolean}
956
+ @deprecated
957
+ Use `up.layer.contains()` instead.
958
+ */
959
+ contains: function(element) {
960
+ up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
961
+ return up.layer.contains(element);
962
+ },
963
+
964
+ /***
965
+ Returns whether an overlay is currently open.
966
+
967
+ @function up.popup.isOpen
968
+ @return {boolean}
969
+ @deprecated
970
+ Use `up.layer.isOverlay()` instead.
971
+ */
972
+ isOpen: function() {
973
+ up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
974
+ return up.layer.isOverlay();
975
+ },
976
+ sync: function() {
977
+ up.migrate.deprecated('up.popup.sync()', 'up.layer.sync()');
978
+ return up.layer.sync();
979
+ }
980
+ });
981
+
982
+ up.migrate.renamedEvent('up:popup:open', 'up:layer:open');
983
+
984
+ up.migrate.renamedEvent('up:popup:opened', 'up:layer:opened');
985
+
986
+ up.migrate.renamedEvent('up:popup:close', 'up:layer:dismiss');
987
+
988
+ up.migrate.renamedEvent('up:popup:closed', 'up:layer:dismissed');
989
+
990
+ up.link.targetMacro('up-popup', {
991
+ 'up-layer': 'new popup'
992
+ }, function() {
993
+ return up.migrate.deprecated('[up-popup]', '[up-layer="new popup"]');
994
+ });
995
+
996
+ }).call(this);
997
+
998
+ /***
999
+ Tooltips
1000
+ ========
1001
+
1002
+ Unpoly used to come with a basic tooltip implementation.
1003
+ This feature is now deprecated.
1004
+
1005
+ @module up.tooltip
1006
+ */
1007
+
1008
+ (function() {
1009
+ up.tooltip = (function() {
1010
+ return up.macro('[up-tooltip]', function(opener) {
1011
+ up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
1012
+ return up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
1013
+ });
1014
+ })();
1015
+
1016
+ }).call(this);
1017
+ (function() {
1018
+ var preloadDelayMoved, u,
1019
+ slice = [].slice;
1020
+
1021
+ u = up.util;
1022
+
1023
+
1024
+ /***
1025
+ @module up.network
1026
+ */
1027
+
1028
+ up.migrate.renamedPackage('proxy', 'network');
1029
+
1030
+ up.migrate.renamedEvent('up:proxy:load', 'up:request:load');
1031
+
1032
+ up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded');
1033
+
1034
+ up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded');
1035
+
1036
+ up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal');
1037
+
1038
+ up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted');
1039
+
1040
+ up.migrate.renamedEvent('up:proxy:slow', 'up:request:late');
1041
+
1042
+ up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover');
1043
+
1044
+ preloadDelayMoved = function() {
1045
+ return up.migrate.deprecated('up.proxy.config.preloadDelay', 'up.link.config.preloadDelay');
1046
+ };
1047
+
1048
+ Object.defineProperty(up.network.config, 'preloadDelay', {
1049
+ get: function() {
1050
+ preloadDelayMoved();
1051
+ return up.link.config.preloadDelay;
1052
+ },
1053
+ set: function(value) {
1054
+ preloadDelayMoved();
1055
+ return up.link.config.preloadDelay = value;
1056
+ }
1057
+ });
1058
+
1059
+ up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
1060
+
1061
+ up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
1062
+
1063
+ up.migrate.handleNetworkPreloadArgs = function() {
1064
+ var args, ref;
1065
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1066
+ if (u.isElementish(args[0])) {
1067
+ up.migrate.warn('up.proxy.preload(link) has been renamed to up.link.preload(link)');
1068
+ return (ref = up.link).preload.apply(ref, args);
1069
+ }
1070
+ };
1071
+
1072
+ up.migrate.handleRequestOptions = function(options) {
1073
+ return up.migrate.fixKey(options, 'data', 'params');
1074
+ };
1075
+
1076
+
1077
+ /***
1078
+ Makes an AJAX request to the given URL and caches the response.
1079
+
1080
+ The function returns a promise that fulfills with the response text.
1081
+
1082
+ \#\#\# Example
1083
+
1084
+ up.request('/search', { params: { query: 'sunshine' } }).then(function(text) {
1085
+ console.log('The response text is %o', text)
1086
+ }).catch(function() {
1087
+ console.error('The request failed')
1088
+ })
1089
+
1090
+ @function up.ajax
1091
+ @param {string} [url]
1092
+ The URL for the request.
1093
+
1094
+ Instead of passing the URL as a string argument, you can also pass it as an `{ url }` option.
1095
+ @param {Object} [options]
1096
+ See options for `up.request()`.
1097
+ @return {Promise<string>}
1098
+ A promise for the response text.
1099
+ @deprecated
1100
+ Use `up.request()` instead.
1101
+ */
1102
+
1103
+ up.ajax = function() {
1104
+ var args, pickResponseText;
1105
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1106
+ up.migrate.deprecated('up.ajax()', 'up.request()');
1107
+ pickResponseText = function(response) {
1108
+ return response.text;
1109
+ };
1110
+ return up.request.apply(up, args).then(pickResponseText);
1111
+ };
1112
+
1113
+
1114
+ /***
1115
+ Removes all cache entries.
1116
+
1117
+ @function up.proxy.clear
1118
+ @deprecated
1119
+ Use `up.cache.clear()` instead.
1120
+ */
1121
+
1122
+ up.network.clear = function() {
1123
+ up.migrate.deprecated('up.proxy.clear()', 'up.cache.clear()');
1124
+ return up.cache.clear();
1125
+ };
1126
+
1127
+
1128
+ /***
1129
+ @class up.Request
1130
+ */
1131
+
1132
+ up.Request.prototype.navigate = function() {
1133
+ up.migrate.deprecated('up.Request#navigate()', 'up.Request#loadPage()');
1134
+ return this.loadPage();
1135
+ };
1136
+
1137
+
1138
+ /***
1139
+ @class up.Response
1140
+ */
1141
+
1142
+
1143
+ /***
1144
+ Returns whether the server responded with a 2xx HTTP status.
1145
+
1146
+ @function up.Response#isSuccess
1147
+ @return {boolean}
1148
+ @deprecated
1149
+ Use `up.Response#ok` instead.
1150
+ */
1151
+
1152
+ up.Response.prototype.isSuccess = function() {
1153
+ up.migrate.deprecated('up.Response#isSuccess()', 'up.Response#ok');
1154
+ return this.ok;
1155
+ };
1156
+
1157
+
1158
+ /***
1159
+ Returns whether the response was not [successful](/up.Response.prototype.ok).
1160
+
1161
+ @function up.Response#isError
1162
+ @return {boolean}
1163
+ @deprecated
1164
+ Use `!up.Response#ok` instead.
1165
+ */
1166
+
1167
+ up.Response.prototype.isError = function() {
1168
+ up.migrate.deprecated('up.Response#isError()', '!up.Response#ok');
1169
+ return !this.ok;
1170
+ };
1171
+
1172
+ }).call(this);
1173
+
1174
+ /***
1175
+ @module up.radio
1176
+ */
1177
+
1178
+ (function() {
1179
+ up.migrate.renamedProperty(up.radio.config, 'hungry', 'hungrySelectors');
1180
+
1181
+ }).call(this);
1182
+
1183
+ /***
1184
+ @module up.viewport
1185
+ */
1186
+
1187
+ (function() {
1188
+ var slice = [].slice;
1189
+
1190
+ up.migrate.renamedPackage('layout', 'viewport');
1191
+
1192
+ up.migrate.renamedProperty(up.viewport.config, 'viewports', 'viewportSelectors');
1193
+
1194
+ up.migrate.renamedProperty(up.viewport.config, 'snap', 'revealSnap');
1195
+
1196
+
1197
+ /***
1198
+ Returns the scrolling container for the given element.
1199
+
1200
+ Returns the [document's scrolling element](/up.viewport.root)
1201
+ if no closer viewport exists.
1202
+
1203
+ @function up.viewport.get
1204
+ @param {string|Element|jQuery} target
1205
+ @return {Element}
1206
+ @deprecated
1207
+ Use `up.viewport.get()` instead.
1208
+ */
1209
+
1210
+ up.viewport.closest = function() {
1211
+ var args, ref;
1212
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
1213
+ up.migrate.deprecated('up.viewport.closest()', 'up.viewport.get()');
1214
+ return (ref = up.viewport).get.apply(ref, args);
1215
+ };
1216
+
1217
+ }).call(this);
1218
+ (function() {
1219
+ up.framework.stopExtension();
1220
+
1221
+ }).call(this);
1222
+ (function() {
1223
+
1224
+
1225
+ }).call(this);