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