disco_app 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +37 -0
- data/app/assets/components/disco_app/buttons/model-destroy-button.es6.jsx +31 -0
- data/app/assets/components/disco_app/forms/model-form.es6.jsx +64 -0
- data/app/assets/components/embedded_app/bar.es6.jsx +31 -0
- data/app/assets/components/shopify/buttons/_buttons.scss +546 -0
- data/app/assets/components/shopify/buttons/button.es6.jsx +15 -0
- data/app/assets/components/shopify/card/_card.scss +342 -0
- data/app/assets/components/shopify/card/card-header.es6.jsx +34 -0
- data/app/assets/components/shopify/card/card-section.es6.jsx +26 -0
- data/app/assets/components/shopify/card/card.es6.jsx +16 -0
- data/app/assets/components/shopify/image/_image.scss +82 -0
- data/app/assets/components/shopify/table/_table.scss +18 -0
- data/app/assets/components/shopify/typography/_typography.scss +23 -0
- data/app/assets/components/shopify/typography/ui-heading.es6.jsx +16 -0
- data/app/assets/components/shopify/ui-layout/_ui-layout.scss +157 -0
- data/app/assets/components/shopify/ui-layout/ui-annotated-section.es6.jsx +29 -0
- data/app/assets/components/shopify/ui-layout/ui-empty-state.es6.jsx +35 -0
- data/app/assets/components/shopify/ui-layout/ui-footer-help.es6.jsx +13 -0
- data/app/assets/components/shopify/ui-layout/ui-layout-item.es6.jsx +11 -0
- data/app/assets/components/shopify/ui-layout/ui-layout-section.es6.jsx +19 -0
- data/app/assets/components/shopify/ui-layout/ui-layout-sections.es6.jsx +11 -0
- data/app/assets/components/shopify/ui-layout/ui-layout.es6.jsx +11 -0
- data/app/assets/components/shopify/ui-layout/ui-page-actions.es6.jsx +13 -0
- data/app/assets/components/shopify/ui-layout/ui-page-actions__buttons.es6.jsx +27 -0
- data/app/assets/components/shopify/ui-stack/_ui-stack.scss +39 -0
- data/app/assets/components/shopify/ui-stack/ui-stack-item.es6.jsx +21 -0
- data/app/assets/components/shopify/ui-stack/ui-stack.es6.jsx +24 -0
- data/app/assets/images/disco_app/icon.svg +1 -0
- data/app/assets/images/disco_app/icons.svg +0 -0
- data/app/assets/javascripts/disco_app/components/custom/filterable_shop_list.js.jsx +61 -0
- data/app/assets/javascripts/disco_app/components/custom/inline-radio-options.es6.jsx +59 -0
- data/app/assets/javascripts/disco_app/components/custom/rules-editor.es6.jsx +432 -0
- data/app/assets/javascripts/disco_app/components/custom/shop_filter_query.js.jsx +13 -0
- data/app/assets/javascripts/disco_app/components/custom/shop_filter_tab.js.jsx +34 -0
- data/app/assets/javascripts/disco_app/components/custom/shop_filter_tabs.js.jsx +21 -0
- data/app/assets/javascripts/disco_app/components/custom/shop_list.js.jsx +142 -0
- data/app/assets/javascripts/disco_app/components/custom/shop_row.js.jsx +43 -0
- data/app/assets/javascripts/disco_app/components/custom/shopify_admin_link.js.jsx +29 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/base_form.es6.jsx +72 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/base_input.es6.jsx +20 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-checkbox.es6.jsx +30 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-radio.es6.jsx +30 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-select.es6.jsx +45 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-text.es6.jsx +69 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-textarea.es6.jsx +48 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/input-time.es6.jsx +7 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/ui-form__element.es6.jsx +17 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/ui-form__group.es6.jsx +11 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/forms/ui-form__section.es6.jsx +11 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/icons/icon-chevron.es6.jsx +33 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/icons/next-icon.es6.jsx +19 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/input_select.es6.jsx +21 -0
- data/app/assets/javascripts/disco_app/components/ui-kit/tables/table.es6.jsx +27 -0
- data/app/assets/javascripts/disco_app/components.js +3 -0
- data/app/assets/javascripts/disco_app/disco_app.js +9 -0
- data/app/assets/javascripts/disco_app/frame.js +152 -0
- data/app/assets/javascripts/disco_app/shopify-turbolinks.js +7 -0
- data/app/assets/javascripts/disco_app/ui-kit.js +1 -0
- data/app/assets/stylesheets/disco_app/admin/_header.scss +75 -0
- data/app/assets/stylesheets/disco_app/admin/_layout.scss +32 -0
- data/app/assets/stylesheets/disco_app/admin/_nav.scss +184 -0
- data/app/assets/stylesheets/disco_app/admin.scss +11 -0
- data/app/assets/stylesheets/disco_app/disco_app.scss +26 -0
- data/app/assets/stylesheets/disco_app/frame/_buttons.scss +54 -0
- data/app/assets/stylesheets/disco_app/frame/_forms.scss +26 -0
- data/app/assets/stylesheets/disco_app/frame/_layout.scss +77 -0
- data/app/assets/stylesheets/disco_app/frame/_type.scss +25 -0
- data/app/assets/stylesheets/disco_app/frame.scss +10 -0
- data/app/assets/stylesheets/disco_app/mixins/_flexbox.scss +400 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-forms.scss +69 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-icons.scss +28 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-kit.scss +5121 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-layout.scss +15 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-tabs.scss +75 -0
- data/app/assets/stylesheets/disco_app/ui-kit/_ui-type.scss +13 -0
- data/app/controllers/disco_app/admin/app_settings_controller.rb +3 -0
- data/app/controllers/disco_app/admin/application_controller.rb +3 -0
- data/app/controllers/disco_app/admin/concerns/app_settings_controller.rb +24 -0
- data/app/controllers/disco_app/admin/concerns/authenticated_controller.rb +20 -0
- data/app/controllers/disco_app/admin/concerns/plans_controller.rb +54 -0
- data/app/controllers/disco_app/admin/concerns/shops_controller.rb +7 -0
- data/app/controllers/disco_app/admin/concerns/subscriptions_controller.rb +29 -0
- data/app/controllers/disco_app/admin/plans_controller.rb +3 -0
- data/app/controllers/disco_app/admin/resources/shops_controller.rb +3 -0
- data/app/controllers/disco_app/admin/shops_controller.rb +3 -0
- data/app/controllers/disco_app/admin/subscriptions_controller.rb +3 -0
- data/app/controllers/disco_app/charges_controller.rb +47 -0
- data/app/controllers/disco_app/concerns/app_proxy_controller.rb +40 -0
- data/app/controllers/disco_app/concerns/authenticated_controller.rb +56 -0
- data/app/controllers/disco_app/concerns/carrier_request_controller.rb +35 -0
- data/app/controllers/disco_app/frame_controller.rb +9 -0
- data/app/controllers/disco_app/install_controller.rb +27 -0
- data/app/controllers/disco_app/subscriptions_controller.rb +32 -0
- data/app/controllers/disco_app/webhooks_controller.rb +46 -0
- data/app/controllers/sessions_controller.rb +28 -0
- data/app/helpers/disco_app/application_helper.rb +68 -0
- data/app/jobs/disco_app/app_installed_job.rb +3 -0
- data/app/jobs/disco_app/app_uninstalled_job.rb +3 -0
- data/app/jobs/disco_app/concerns/app_installed_job.rb +39 -0
- data/app/jobs/disco_app/concerns/app_uninstalled_job.rb +20 -0
- data/app/jobs/disco_app/concerns/render_asset_group_job.rb +8 -0
- data/app/jobs/disco_app/concerns/shop_update_job.rb +13 -0
- data/app/jobs/disco_app/concerns/subscription_changed_job.rb +7 -0
- data/app/jobs/disco_app/concerns/synchronise_carrier_service_job.rb +55 -0
- data/app/jobs/disco_app/concerns/synchronise_resources_job.rb +12 -0
- data/app/jobs/disco_app/concerns/synchronise_webhooks_job.rb +52 -0
- data/app/jobs/disco_app/render_asset_group_job.rb +3 -0
- data/app/jobs/disco_app/shop_job.rb +27 -0
- data/app/jobs/disco_app/shop_update_job.rb +3 -0
- data/app/jobs/disco_app/subscription_changed_job.rb +3 -0
- data/app/jobs/disco_app/synchronise_carrier_service_job.rb +3 -0
- data/app/jobs/disco_app/synchronise_resources_job.rb +3 -0
- data/app/jobs/disco_app/synchronise_webhooks_job.rb +3 -0
- data/app/models/disco_app/app_settings.rb +3 -0
- data/app/models/disco_app/application_charge.rb +18 -0
- data/app/models/disco_app/concerns/app_settings.rb +7 -0
- data/app/models/disco_app/concerns/can_be_liquified.rb +45 -0
- data/app/models/disco_app/concerns/has_metafields.rb +48 -0
- data/app/models/disco_app/concerns/plan.rb +26 -0
- data/app/models/disco_app/concerns/plan_code.rb +15 -0
- data/app/models/disco_app/concerns/renders_assets.rb +166 -0
- data/app/models/disco_app/concerns/shop.rb +86 -0
- data/app/models/disco_app/concerns/subscription.rb +60 -0
- data/app/models/disco_app/concerns/synchronises.rb +58 -0
- data/app/models/disco_app/concerns/taggable.rb +16 -0
- data/app/models/disco_app/plan.rb +3 -0
- data/app/models/disco_app/plan_code.rb +3 -0
- data/app/models/disco_app/recurring_application_charge.rb +18 -0
- data/app/models/disco_app/session_storage.rb +18 -0
- data/app/models/disco_app/shop.rb +3 -0
- data/app/models/disco_app/subscription.rb +3 -0
- data/app/resources/disco_app/admin/resources/concerns/shop_resource.rb +100 -0
- data/app/resources/disco_app/admin/resources/shop_resource.rb +4 -0
- data/app/services/disco_app/carrier_request_service.rb +15 -0
- data/app/services/disco_app/charges_service.rb +81 -0
- data/app/services/disco_app/proxy_service.rb +17 -0
- data/app/services/disco_app/subscription_service.rb +46 -0
- data/app/services/disco_app/webhook_service.rb +30 -0
- data/app/views/disco_app/admin/app_settings/edit.html.erb +5 -0
- data/app/views/disco_app/admin/plans/_form.html.erb +72 -0
- data/app/views/disco_app/admin/plans/_plan_code_fields.html.erb +15 -0
- data/app/views/disco_app/admin/plans/edit.html.erb +7 -0
- data/app/views/disco_app/admin/plans/index.html.erb +43 -0
- data/app/views/disco_app/admin/plans/new.html.erb +7 -0
- data/app/views/disco_app/admin/shops/index.html.erb +13 -0
- data/app/views/disco_app/admin/subscriptions/edit.html.erb +33 -0
- data/app/views/disco_app/charges/activate.html.erb +1 -0
- data/app/views/disco_app/charges/create.html.erb +1 -0
- data/app/views/disco_app/charges/new.html.erb +23 -0
- data/app/views/disco_app/frame/frame.html.erb +36 -0
- data/app/views/disco_app/install/installing.html.erb +22 -0
- data/app/views/disco_app/install/uninstalling.html.erb +1 -0
- data/app/views/disco_app/proxy_errors/404.html.erb +1 -0
- data/app/views/disco_app/shared/_card.html.erb +14 -0
- data/app/views/disco_app/shared/_icons.html.erb +1 -0
- data/app/views/disco_app/shared/_section.html.erb +17 -0
- data/app/views/disco_app/subscriptions/new.html.erb +25 -0
- data/app/views/layouts/admin/_nav_items.erb +20 -0
- data/app/views/layouts/admin.html.erb +67 -0
- data/app/views/layouts/application.html.erb +18 -0
- data/app/views/layouts/embedded_app.html.erb +50 -0
- data/app/views/layouts/embedded_app_modal.html.erb +28 -0
- data/app/views/sessions/new.html.erb +28 -0
- data/config/routes.rb +63 -0
- data/db/migrate/20150525000000_create_shops_if_not_existent.rb +110 -0
- data/lib/disco_app/configuration.rb +45 -0
- data/lib/disco_app/constants.rb +4 -0
- data/lib/disco_app/engine.rb +26 -0
- data/lib/disco_app/session.rb +14 -0
- data/lib/disco_app/support/file_fixtures.rb +23 -0
- data/lib/disco_app/test_help.rb +11 -0
- data/lib/disco_app/version.rb +3 -0
- data/lib/disco_app.rb +7 -0
- data/lib/generators/disco_app/USAGE +5 -0
- data/lib/generators/disco_app/disco_app_generator.rb +236 -0
- data/lib/generators/disco_app/templates/assets/javascripts/application.js +17 -0
- data/lib/generators/disco_app/templates/assets/javascripts/components.js +3 -0
- data/lib/generators/disco_app/templates/assets/stylesheets/application.scss +5 -0
- data/lib/generators/disco_app/templates/config/database.yml.tt +20 -0
- data/lib/generators/disco_app/templates/config/newrelic.yml +26 -0
- data/lib/generators/disco_app/templates/config/puma.rb +15 -0
- data/lib/generators/disco_app/templates/controllers/home_controller.rb +7 -0
- data/lib/generators/disco_app/templates/initializers/disco_app.rb +28 -0
- data/lib/generators/disco_app/templates/initializers/rollbar.rb +19 -0
- data/lib/generators/disco_app/templates/initializers/session_store.rb +2 -0
- data/lib/generators/disco_app/templates/initializers/shopify_app.rb +7 -0
- data/lib/generators/disco_app/templates/initializers/shopify_session_repository.rb +7 -0
- data/lib/generators/disco_app/templates/root/CHECKS +4 -0
- data/lib/generators/disco_app/templates/root/Procfile +2 -0
- data/lib/generators/disco_app/templates/views/home/index.html.erb +2 -0
- data/lib/tasks/carrier_service.rake +10 -0
- data/lib/tasks/database.rake +8 -0
- data/lib/tasks/sessions.rake +9 -0
- data/lib/tasks/shops.rake +10 -0
- data/lib/tasks/start.rake +3 -0
- data/lib/tasks/webhooks.rake +10 -0
- data/test/controllers/disco_app/admin/shops_controller_test.rb +54 -0
- data/test/controllers/disco_app/charges_controller_test.rb +99 -0
- data/test/controllers/disco_app/install_controller_test.rb +50 -0
- data/test/controllers/disco_app/subscriptions_controller_test.rb +68 -0
- data/test/controllers/disco_app/webhooks_controller_test.rb +58 -0
- data/test/controllers/home_controller_test.rb +92 -0
- data/test/controllers/proxy_controller_test.rb +42 -0
- data/test/disco_app_test.rb +7 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +17 -0
- data/test/dummy/app/assets/stylesheets/application.scss +5 -0
- data/test/dummy/app/controllers/application_controller.rb +6 -0
- data/test/dummy/app/controllers/carrier_request_controller.rb +10 -0
- data/test/dummy/app/controllers/disco_app/admin/shops_controller.rb +8 -0
- data/test/dummy/app/controllers/home_controller.rb +7 -0
- data/test/dummy/app/controllers/proxy_controller.rb +8 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/carts_update_job.rb +7 -0
- data/test/dummy/app/jobs/disco_app/app_installed_job.rb +16 -0
- data/test/dummy/app/jobs/disco_app/app_uninstalled_job.rb +11 -0
- data/test/dummy/app/jobs/products_create_job.rb +7 -0
- data/test/dummy/app/jobs/products_delete_job.rb +7 -0
- data/test/dummy/app/jobs/products_update_job.rb +7 -0
- data/test/dummy/app/models/cart.rb +24 -0
- data/test/dummy/app/models/disco_app/shop.rb +20 -0
- data/test/dummy/app/models/js_configuration.rb +8 -0
- data/test/dummy/app/models/product.rb +9 -0
- data/test/dummy/app/models/widget_configuration.rb +10 -0
- data/test/dummy/app/views/assets/script_tag.js.erb +1 -0
- data/test/dummy/app/views/assets/test.js.erb +1 -0
- data/test/dummy/app/views/assets/widget.js.erb +2 -0
- data/test/dummy/app/views/assets/widget.scss.erb +3 -0
- data/test/dummy/app/views/home/index.html.erb +2 -0
- data/test/dummy/app/views/snippets/widget.liquid.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +38 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.codeship.yml +23 -0
- data/test/dummy/config/database.gitlab-ci.yml +24 -0
- data/test/dummy/config/database.yml +20 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +85 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/disco_app.rb +28 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/omniauth.rb +9 -0
- data/test/dummy/config/initializers/session_store.rb +2 -0
- data/test/dummy/config/initializers/shopify_app.rb +7 -0
- data/test/dummy/config/initializers/shopify_session_repository.rb +7 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +11 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/migrate/20160307182229_create_products.rb +11 -0
- data/test/dummy/db/migrate/20160530160739_create_asset_models.rb +19 -0
- data/test/dummy/db/migrate/20161105054746_create_carts.rb +13 -0
- data/test/dummy/db/schema.rb +152 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/api/widget_store/assets/create_script_tag_js_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_script_tag_js_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/create_script_tag_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_script_tag_response.json +10 -0
- data/test/fixtures/api/widget_store/assets/create_test_js_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_test_js_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/create_widget_js_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_widget_js_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/create_widget_liquid_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_widget_liquid_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/create_widget_scss_request.json +6 -0
- data/test/fixtures/api/widget_store/assets/create_widget_scss_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/get_script_tags_empty_request.json +1 -0
- data/test/fixtures/api/widget_store/assets/get_script_tags_empty_response.json +1 -0
- data/test/fixtures/api/widget_store/assets/get_script_tags_preexisting_request.json +1 -0
- data/test/fixtures/api/widget_store/assets/get_script_tags_preexisting_response.json +12 -0
- data/test/fixtures/api/widget_store/assets/update_script_tag_request.json +10 -0
- data/test/fixtures/api/widget_store/assets/update_script_tag_response.json +10 -0
- data/test/fixtures/api/widget_store/carrier_services.json +1 -0
- data/test/fixtures/api/widget_store/carrier_services_create.json +8 -0
- data/test/fixtures/api/widget_store/charges/activate_application_charge_request.json +16 -0
- data/test/fixtures/api/widget_store/charges/activate_application_charge_response.json +1 -0
- data/test/fixtures/api/widget_store/charges/activate_recurring_application_charge_request.json +20 -0
- data/test/fixtures/api/widget_store/charges/activate_recurring_application_charge_response.json +1 -0
- data/test/fixtures/api/widget_store/charges/create_application_charge_request.json +9 -0
- data/test/fixtures/api/widget_store/charges/create_application_charge_response.json +16 -0
- data/test/fixtures/api/widget_store/charges/create_recurring_application_charge_request.json +9 -0
- data/test/fixtures/api/widget_store/charges/create_recurring_application_charge_response.json +20 -0
- data/test/fixtures/api/widget_store/charges/create_second_recurring_application_charge_request.json +9 -0
- data/test/fixtures/api/widget_store/charges/create_second_recurring_application_charge_response.json +20 -0
- data/test/fixtures/api/widget_store/charges/get_accepted_application_charge_response.json +16 -0
- data/test/fixtures/api/widget_store/charges/get_accepted_recurring_application_charge_response.json +20 -0
- data/test/fixtures/api/widget_store/charges/get_declined_application_charge_response.json +16 -0
- data/test/fixtures/api/widget_store/charges/get_declined_recurring_application_charge_response.json +20 -0
- data/test/fixtures/api/widget_store/charges/get_pending_application_charge_response.json +16 -0
- data/test/fixtures/api/widget_store/charges/get_pending_recurring_application_charge_response.json +20 -0
- data/test/fixtures/api/widget_store/products/write_metafields_multiple_namespaces_request.json +31 -0
- data/test/fixtures/api/widget_store/products/write_metafields_multiple_namespaces_response.json +1 -0
- data/test/fixtures/api/widget_store/products/write_metafields_single_namespace_request.json +19 -0
- data/test/fixtures/api/widget_store/products/write_metafields_single_namespace_response.json +1 -0
- data/test/fixtures/api/widget_store/shop.json +46 -0
- data/test/fixtures/api/widget_store/webhooks.json +1 -0
- data/test/fixtures/assets/test.js +1 -0
- data/test/fixtures/assets/test.min.js +1 -0
- data/test/fixtures/carts.yml +5 -0
- data/test/fixtures/disco_app/application_charges.yml +11 -0
- data/test/fixtures/disco_app/plan_codes.yml +13 -0
- data/test/fixtures/disco_app/plans.yml +37 -0
- data/test/fixtures/disco_app/recurring_application_charges.yml +11 -0
- data/test/fixtures/disco_app/shops.yml +10 -0
- data/test/fixtures/disco_app/subscriptions.yml +22 -0
- data/test/fixtures/js_configurations.yml +3 -0
- data/test/fixtures/liquid/model.liquid +8 -0
- data/test/fixtures/products.yml +4 -0
- data/test/fixtures/webhooks/app_uninstalled.json +46 -0
- data/test/fixtures/webhooks/cart_updated.json +28 -0
- data/test/fixtures/webhooks/product_created.json +167 -0
- data/test/fixtures/webhooks/product_deleted.json +3 -0
- data/test/fixtures/webhooks/product_updated.json +167 -0
- data/test/fixtures/widget_configurations.yml +4 -0
- data/test/integration/synchronises_test.rb +62 -0
- data/test/jobs/disco_app/app_installed_job_test.rb +57 -0
- data/test/jobs/disco_app/app_uninstalled_job_test.rb +30 -0
- data/test/jobs/disco_app/synchronise_carrier_service_job_test.rb +25 -0
- data/test/jobs/disco_app/synchronise_webhooks_job_test.rb +30 -0
- data/test/models/disco_app/can_be_liquified_test.rb +55 -0
- data/test/models/disco_app/has_metafields_test.rb +40 -0
- data/test/models/disco_app/plan_test.rb +5 -0
- data/test/models/disco_app/renders_assets_test.rb +109 -0
- data/test/models/disco_app/session_test.rb +31 -0
- data/test/models/disco_app/shop_test.rb +43 -0
- data/test/models/disco_app/subscription_test.rb +19 -0
- data/test/services/disco_app/charges_service_test.rb +112 -0
- data/test/services/disco_app/subscription_service_test.rb +60 -0
- data/test/support/test_file_fixtures.rb +29 -0
- data/test/support/test_shopify_api.rb +16 -0
- data/test/test_helper.rb +57 -0
- metadata +970 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cff3f8aab2482607eafbbf0bec88e11dca418c4af76d9a4a74b6fba9d1d08f9d
|
4
|
+
data.tar.gz: 2ea82e6129fd1c1fa0f87c604cdbd3b0c781098c4fdc3e7c16ba238e87eae6f9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3f33ce9c3604c826e8b2a35db6d414c98ad1b6c40bb231716e81a9a52f873666147c2b6bd8630e43c676866413da4c95a3ace3f493c8363d71a7b858ea34b439
|
7
|
+
data.tar.gz: d19ae72a0539f46e34091befa91775c388200c50cf09a10df6e5d8460ccaf6bd89620b6e101fc2070a29c58a8e9ebba4a0817aaff2878c78c8dfc6e8392f3d22
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'DiscoApp'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -0,0 +1,31 @@
|
|
1
|
+
const ModelDestroyButton = ({ label, modelName, modelUrl, modelsUrl }) => {
|
2
|
+
|
3
|
+
const openModal = () => {
|
4
|
+
ShopifyApp.Modal.confirm({
|
5
|
+
title: 'Delete ' + modelName + '?',
|
6
|
+
message: 'Are you sure you want to delete this ' + modelName + '?',
|
7
|
+
okButton: 'Delete ' + modelName,
|
8
|
+
cancelButton: 'Cancel',
|
9
|
+
style: 'danger'
|
10
|
+
}, handleModalResult);
|
11
|
+
};
|
12
|
+
|
13
|
+
const handleModalResult = (result) => {
|
14
|
+
if(result) {
|
15
|
+
$.ajax({
|
16
|
+
url: modelUrl,
|
17
|
+
method: 'DELETE',
|
18
|
+
contentType: 'application/json',
|
19
|
+
dataType: 'json',
|
20
|
+
success: function() {
|
21
|
+
window.location.href = modelsUrl;
|
22
|
+
}
|
23
|
+
});
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
return (
|
28
|
+
<Button destroy={true} onClick={openModal}>{label}</Button>
|
29
|
+
);
|
30
|
+
|
31
|
+
};
|
@@ -0,0 +1,64 @@
|
|
1
|
+
class ModelForm extends BaseForm {
|
2
|
+
|
3
|
+
render() {
|
4
|
+
const { modelTitle, modelName, modelUrl, modelsUrl, children, authenticityToken } = this.props;
|
5
|
+
const errors = this.renderErrors();
|
6
|
+
|
7
|
+
return(
|
8
|
+
<form action={modelUrl ? modelUrl : modelsUrl} acceptCharset="UTF-8" method="POST" data-shopify-app-submit="ea.save">
|
9
|
+
<input type="hidden" name="utf8" value="✓"/>
|
10
|
+
<input type="hidden" name="_method" value={modelUrl ? 'patch' : 'post'} />
|
11
|
+
<input type="hidden" name="authenticity_token" value={authenticityToken}/>
|
12
|
+
|
13
|
+
{(() => {
|
14
|
+
if (!errors) return false;
|
15
|
+
return (
|
16
|
+
{errors}
|
17
|
+
);
|
18
|
+
})()}
|
19
|
+
|
20
|
+
{children}
|
21
|
+
|
22
|
+
<ModelFormEmbeddedAppBar modelTitle={modelTitle} modelsUrl={modelsUrl} />
|
23
|
+
<ModelFormPageActions modelName={modelName} modelUrl={modelUrl} modelsUrl={modelsUrl} />
|
24
|
+
</form>
|
25
|
+
)
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
const ModelFormEmbeddedAppBar = ({ modelTitle, modelsUrl }) => {
|
30
|
+
const buttons = {
|
31
|
+
primary: {
|
32
|
+
label: "Save",
|
33
|
+
message: "ea.save"
|
34
|
+
},
|
35
|
+
secondary: [{
|
36
|
+
label: "Cancel",
|
37
|
+
href: modelsUrl
|
38
|
+
}]
|
39
|
+
};
|
40
|
+
|
41
|
+
return (
|
42
|
+
<EmbeddedAppBar title={modelTitle} buttons={buttons} />
|
43
|
+
);
|
44
|
+
};
|
45
|
+
|
46
|
+
const ModelFormPageActions = ({ modelName, modelUrl, modelsUrl }) => {
|
47
|
+
const primary = [
|
48
|
+
<a href={modelsUrl} className="btn">Cancel</a>,
|
49
|
+
<Button type="submit" primary={true}>{'Save' + (modelUrl ? '' : ' ' + modelName)}</Button>
|
50
|
+
];
|
51
|
+
|
52
|
+
const secondary = modelUrl ? [
|
53
|
+
<ModelDestroyButton
|
54
|
+
label={'Delete ' + modelName}
|
55
|
+
modelName={modelName}
|
56
|
+
modelUrl={modelUrl}
|
57
|
+
modelsUrl={modelsUrl}
|
58
|
+
/>
|
59
|
+
] : [];
|
60
|
+
|
61
|
+
return (
|
62
|
+
<UIPageActions primary={primary} secondary={secondary} />
|
63
|
+
);
|
64
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class EmbeddedAppBar extends React.Component {
|
2
|
+
|
3
|
+
componentDidMount() {
|
4
|
+
const { title, icon, buttons, breadcrumb } = this.props;
|
5
|
+
ShopifyApp.Bar.initialize({
|
6
|
+
title: title || DiscoApp.INITIAL_TITLE,
|
7
|
+
icon: icon || DiscoApp.INITIAL_ICON,
|
8
|
+
buttons: buttons,
|
9
|
+
breadcrumb: breadcrumb
|
10
|
+
});
|
11
|
+
}
|
12
|
+
|
13
|
+
render() {
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
|
17
|
+
}
|
18
|
+
|
19
|
+
EmbeddedAppBar.propTypes = {
|
20
|
+
title: React.PropTypes.string,
|
21
|
+
icon: React.PropTypes.string,
|
22
|
+
buttons: React.PropTypes.object,
|
23
|
+
breadcrumbs: React.PropTypes.object
|
24
|
+
};
|
25
|
+
|
26
|
+
EmbeddedAppBar.defaultProps = {
|
27
|
+
title: undefined,
|
28
|
+
icon: undefined,
|
29
|
+
buttons: {},
|
30
|
+
breadcrumbs: undefined
|
31
|
+
};
|
@@ -0,0 +1,546 @@
|
|
1
|
+
.btn {
|
2
|
+
color: rgba(0,0,0,0.9);
|
3
|
+
font-size: 1.14286rem;
|
4
|
+
line-height: 1.71429rem;
|
5
|
+
font-weight: 400;
|
6
|
+
text-transform: initial;
|
7
|
+
letter-spacing: initial;
|
8
|
+
-webkit-font-smoothing: antialiased;
|
9
|
+
-moz-osx-font-smoothing: grayscale;
|
10
|
+
line-height: 1.14286rem;
|
11
|
+
box-sizing: border-box;
|
12
|
+
cursor: pointer;
|
13
|
+
display: inline-block;
|
14
|
+
padding: 9px 15px;
|
15
|
+
margin: 0;
|
16
|
+
border-radius: 3px;
|
17
|
+
height: auto;
|
18
|
+
white-space: nowrap;
|
19
|
+
text-transform: none;
|
20
|
+
font-family: inherit;
|
21
|
+
font-weight: normal;
|
22
|
+
position: relative;
|
23
|
+
vertical-align: middle;
|
24
|
+
-webkit-user-select: none;
|
25
|
+
-moz-user-select: none;
|
26
|
+
-ms-user-select: none;
|
27
|
+
user-select: none;
|
28
|
+
-webkit-appearance: none;
|
29
|
+
-webkit-tap-highlight-color: transparent;
|
30
|
+
}
|
31
|
+
|
32
|
+
.btn-default, .btn {
|
33
|
+
background-color: #ffffff;
|
34
|
+
color: #0078bd;
|
35
|
+
border: 1px solid #d3dbe2;
|
36
|
+
}
|
37
|
+
|
38
|
+
.btn-default:hover, .btn:hover, .btn-default:focus, .btn:focus, .btn-default.focus, .focus.btn, .btn-default:active, .btn:active, .btn-default.active, .active.btn {
|
39
|
+
border: 1px solid #d3dbe2;
|
40
|
+
background-color: #f5f6f7;
|
41
|
+
color: #0078bd;
|
42
|
+
text-decoration: none;
|
43
|
+
}
|
44
|
+
|
45
|
+
.btn-default:active, .btn:active, .btn-default.active, .active.btn, .btn-default.rte-command-active, .rte-command-active.btn {
|
46
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1) inset;
|
47
|
+
background: #f5f6f7;
|
48
|
+
}
|
49
|
+
|
50
|
+
.btn-primary {
|
51
|
+
background-color: #0078bd;
|
52
|
+
color: #ffffff;
|
53
|
+
border: 1px solid #0078bd;
|
54
|
+
}
|
55
|
+
|
56
|
+
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active {
|
57
|
+
border: 1px solid #0069a6;
|
58
|
+
background-color: #0069a6;
|
59
|
+
color: #ffffff;
|
60
|
+
text-decoration: none;
|
61
|
+
}
|
62
|
+
|
63
|
+
.btn-primary:active, .btn-primary.active, .btn-primary.rte-command-active {
|
64
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
65
|
+
background: #0069a6;
|
66
|
+
}
|
67
|
+
|
68
|
+
.btn-destroy {
|
69
|
+
background-color: #ffffff;
|
70
|
+
color: #0078bd;
|
71
|
+
border: 1px solid #d3dbe2;
|
72
|
+
}
|
73
|
+
|
74
|
+
.btn-destroy:hover, .btn-destroy:focus, .btn-destroy.focus, .btn-destroy:active, .btn-destroy.active {
|
75
|
+
border: 1px solid #d3dbe2;
|
76
|
+
background-color: #ff5d5d;
|
77
|
+
color: #0078bd;
|
78
|
+
text-decoration: none;
|
79
|
+
}
|
80
|
+
|
81
|
+
.btn-destroy:active, .btn-destroy.active, .btn-destroy.rte-command-active {
|
82
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
83
|
+
background: #ff5d5d;
|
84
|
+
}
|
85
|
+
|
86
|
+
.btn-destroy-no-hover {
|
87
|
+
background-color: #ff5d5d;
|
88
|
+
color: #ffffff;
|
89
|
+
border: 1px solid #ff5d5d;
|
90
|
+
}
|
91
|
+
|
92
|
+
.btn-destroy-no-hover:hover, .btn-destroy-no-hover:focus, .btn-destroy-no-hover.focus, .btn-destroy-no-hover:active, .btn-destroy-no-hover.active {
|
93
|
+
border: 1px solid #d83e3e;
|
94
|
+
background-color: #d83e3e;
|
95
|
+
color: #ffffff;
|
96
|
+
text-decoration: none;
|
97
|
+
}
|
98
|
+
|
99
|
+
.btn-destroy-no-hover:active, .btn-destroy-no-hover.active, .btn-destroy-no-hover.rte-command-active {
|
100
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
101
|
+
background: #d83e3e;
|
102
|
+
}
|
103
|
+
|
104
|
+
.btn-disabled {
|
105
|
+
background-color: #fafbfc;
|
106
|
+
color: #c3cfd8;
|
107
|
+
border: 1px solid #d3dbe2;
|
108
|
+
}
|
109
|
+
|
110
|
+
.btn-disabled:hover, .btn-disabled:focus, .btn-disabled.focus, .btn-disabled:active, .btn-disabled.active {
|
111
|
+
border: 1px solid #d3dbe2;
|
112
|
+
background-color: #fafbfc;
|
113
|
+
color: #c3cfd8;
|
114
|
+
text-decoration: none;
|
115
|
+
}
|
116
|
+
|
117
|
+
.btn-disabled:active, .btn-disabled.active, .btn-disabled.rte-command-active {
|
118
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1) inset;
|
119
|
+
background: #fafbfc;
|
120
|
+
}
|
121
|
+
|
122
|
+
.btn-purchase {
|
123
|
+
background-color: #96bf48;
|
124
|
+
color: #ffffff;
|
125
|
+
border: 1px solid #96bf48;
|
126
|
+
}
|
127
|
+
|
128
|
+
.btn-purchase:hover, .btn-purchase:focus, .btn-purchase.focus, .btn-purchase:active, .btn-purchase.active {
|
129
|
+
border: 1px solid #7ba232;
|
130
|
+
background-color: #7ba232;
|
131
|
+
color: #ffffff;
|
132
|
+
text-decoration: none;
|
133
|
+
}
|
134
|
+
|
135
|
+
.btn-purchase:active, .btn-purchase.active, .btn-purchase.rte-command-active {
|
136
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
137
|
+
background: #7ba232;
|
138
|
+
}
|
139
|
+
|
140
|
+
.btn--facebook {
|
141
|
+
background-color: #3b5998;
|
142
|
+
color: #ffffff;
|
143
|
+
border: 1px solid #3b5998;
|
144
|
+
}
|
145
|
+
|
146
|
+
.btn--facebook:hover, .btn--facebook:focus, .btn--facebook.focus, .btn--facebook:active, .btn--facebook.active {
|
147
|
+
border: 1px solid #344e86;
|
148
|
+
background-color: #344e86;
|
149
|
+
color: #ffffff;
|
150
|
+
text-decoration: none;
|
151
|
+
}
|
152
|
+
|
153
|
+
.btn--facebook:active, .btn--facebook.active, .btn--facebook.rte-command-active {
|
154
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
155
|
+
background: #344e86;
|
156
|
+
}
|
157
|
+
|
158
|
+
.btn--twitter {
|
159
|
+
background-color: #55acee;
|
160
|
+
color: #ffffff;
|
161
|
+
border: 1px solid #55acee;
|
162
|
+
}
|
163
|
+
|
164
|
+
.btn--twitter:hover, .btn--twitter:focus, .btn--twitter.focus, .btn--twitter:active, .btn--twitter.active {
|
165
|
+
border: 1px solid #3ea1ec;
|
166
|
+
background-color: #3ea1ec;
|
167
|
+
color: #ffffff;
|
168
|
+
text-decoration: none;
|
169
|
+
}
|
170
|
+
|
171
|
+
.btn--twitter:active, .btn--twitter.active, .btn--twitter.rte-command-active {
|
172
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
173
|
+
background: #3ea1ec;
|
174
|
+
}
|
175
|
+
|
176
|
+
.btn-warning {
|
177
|
+
background-color: transparent;
|
178
|
+
color: #6f4f0c;
|
179
|
+
border: 1px solid #6f4f0c;
|
180
|
+
}
|
181
|
+
|
182
|
+
.btn-warning:hover, .btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active {
|
183
|
+
border: 1px solid #6f4f0c;
|
184
|
+
background-color: rgba(111, 79, 12, 0.1);
|
185
|
+
color: #6f4f0c;
|
186
|
+
text-decoration: none;
|
187
|
+
}
|
188
|
+
|
189
|
+
.btn-warning:active, .btn-warning.active, .btn-warning.rte-command-active {
|
190
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
191
|
+
background: rgba(111, 79, 12, 0.1);
|
192
|
+
}
|
193
|
+
|
194
|
+
.btn--outline {
|
195
|
+
background-color: transparent;
|
196
|
+
color: #31373d;
|
197
|
+
border: 1px solid #31373d;
|
198
|
+
}
|
199
|
+
|
200
|
+
.btn--outline:hover, .btn--outline:focus, .btn--outline.focus, .btn--outline:active, .btn--outline.active {
|
201
|
+
border: 1px solid #31373d;
|
202
|
+
background-color: rgba(49, 55, 61, 0.1);
|
203
|
+
color: #31373d;
|
204
|
+
text-decoration: none;
|
205
|
+
}
|
206
|
+
|
207
|
+
.btn--outline:active, .btn--outline.active, .btn--outline.rte-command-active {
|
208
|
+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2) inset;
|
209
|
+
background: rgba(49, 55, 61, 0.1);
|
210
|
+
}
|
211
|
+
|
212
|
+
.btn.has-loading::before {
|
213
|
+
background-position: 50% 50% !important;
|
214
|
+
background-repeat: no-repeat !important;
|
215
|
+
content: "";
|
216
|
+
display: none;
|
217
|
+
height: 100%;
|
218
|
+
left: 0;
|
219
|
+
position: absolute;
|
220
|
+
top: 0;
|
221
|
+
width: 100%;
|
222
|
+
}
|
223
|
+
|
224
|
+
.btn:not(.btn-disabled).is-loading, .btn:not(.btn-disabled).is-loading:hover {
|
225
|
+
border: 1px solid #d3dbe2;
|
226
|
+
cursor: default;
|
227
|
+
color: transparent;
|
228
|
+
text-shadow: none;
|
229
|
+
}
|
230
|
+
|
231
|
+
.btn:not(.btn-disabled).is-loading::before, .btn:not(.btn-disabled).is-loading:hover::before {
|
232
|
+
display: block;
|
233
|
+
}
|
234
|
+
|
235
|
+
.btn:disabled {
|
236
|
+
cursor: default;
|
237
|
+
}
|
238
|
+
|
239
|
+
.btn::-moz-focus-inner {
|
240
|
+
border: 0;
|
241
|
+
padding: 0;
|
242
|
+
}
|
243
|
+
|
244
|
+
.btn .next-icon {
|
245
|
+
margin-top: -13px;
|
246
|
+
margin-bottom: -13px;
|
247
|
+
}
|
248
|
+
|
249
|
+
.btn .ico {
|
250
|
+
vertical-align: middle;
|
251
|
+
margin-top: -17px;
|
252
|
+
margin-bottom: -13px;
|
253
|
+
}
|
254
|
+
|
255
|
+
.btn.attached-to-right {
|
256
|
+
border-radius: 0 3px 3px 0;
|
257
|
+
position: relative;
|
258
|
+
left: -2px;
|
259
|
+
}
|
260
|
+
|
261
|
+
.btn-large {
|
262
|
+
font-size: 16px;
|
263
|
+
padding: 13px 30px;
|
264
|
+
margin: 15px 0;
|
265
|
+
}
|
266
|
+
|
267
|
+
.btn-slim {
|
268
|
+
padding: 6.5px 10px;
|
269
|
+
}
|
270
|
+
|
271
|
+
.btn-extra-slim {
|
272
|
+
font-size: 11px;
|
273
|
+
padding: 3.5px 6px;
|
274
|
+
}
|
275
|
+
|
276
|
+
.btn.btn--full-width {
|
277
|
+
width: 100%;
|
278
|
+
line-height: 1.3;
|
279
|
+
white-space: normal;
|
280
|
+
padding: 13px 15px;
|
281
|
+
}
|
282
|
+
|
283
|
+
.btn-destroy:hover, .btn-destroy:focus, .btn-destroy:active {
|
284
|
+
border: 1px solid #ff5d5d;
|
285
|
+
color: #ffffff;
|
286
|
+
}
|
287
|
+
|
288
|
+
.btn-disabled.btn-disabled,
|
289
|
+
input[type="submit"].btn-disabled,
|
290
|
+
.btn.disabled {
|
291
|
+
cursor: default;
|
292
|
+
box-shadow: none;
|
293
|
+
background: #fafbfc;
|
294
|
+
color: #c3cfd8;
|
295
|
+
border: 1px solid #d3dbe2;
|
296
|
+
}
|
297
|
+
|
298
|
+
.btn-disabled.btn-disabled.btn--outline,
|
299
|
+
input[type="submit"].btn-disabled.btn--outline,
|
300
|
+
.btn.disabled.btn--outline {
|
301
|
+
background: transparent;
|
302
|
+
color: #95a7b7;
|
303
|
+
border-color: #95a7b7;
|
304
|
+
}
|
305
|
+
|
306
|
+
.btn-more::before {
|
307
|
+
content: "•••";
|
308
|
+
text-indent: 0;
|
309
|
+
display: block;
|
310
|
+
font-size: 13px;
|
311
|
+
}
|
312
|
+
|
313
|
+
.btn-skip {
|
314
|
+
z-index: 226;
|
315
|
+
border-radius: 0;
|
316
|
+
left: 0;
|
317
|
+
min-width: 240px;
|
318
|
+
padding: 20px 0 !important;
|
319
|
+
text-align: center;
|
320
|
+
top: 0;
|
321
|
+
}
|
322
|
+
|
323
|
+
.btn--icon {
|
324
|
+
padding-left: 9px;
|
325
|
+
padding-right: 9px;
|
326
|
+
}
|
327
|
+
|
328
|
+
.btn--icon.btn-large {
|
329
|
+
padding-left: 13px;
|
330
|
+
padding-right: 13px;
|
331
|
+
}
|
332
|
+
|
333
|
+
.btn--icon.btn-slim {
|
334
|
+
padding-left: 7px;
|
335
|
+
padding-right: 7px;
|
336
|
+
}
|
337
|
+
|
338
|
+
.btn--icon--tiny {
|
339
|
+
padding: 1px;
|
340
|
+
}
|
341
|
+
|
342
|
+
.btn--plain,
|
343
|
+
.btn--link {
|
344
|
+
background-color: transparent !important;
|
345
|
+
border: none;
|
346
|
+
cursor: pointer;
|
347
|
+
color: #0078bd;
|
348
|
+
text-decoration: none;
|
349
|
+
vertical-align: initial;
|
350
|
+
}
|
351
|
+
|
352
|
+
.btn--plain:hover, .btn--plain:focus, .btn--plain:active,
|
353
|
+
.btn--link:hover,
|
354
|
+
.btn--link:focus,
|
355
|
+
.btn--link:active {
|
356
|
+
background: transparent;
|
357
|
+
box-shadow: none;
|
358
|
+
border: none;
|
359
|
+
}
|
360
|
+
|
361
|
+
.btn--plain:hover,
|
362
|
+
.btn--link:hover {
|
363
|
+
color: #0069a6;
|
364
|
+
text-decoration: underline;
|
365
|
+
}
|
366
|
+
|
367
|
+
.btn--link {
|
368
|
+
height: auto;
|
369
|
+
padding: 0;
|
370
|
+
line-height: 18px;
|
371
|
+
white-space: normal;
|
372
|
+
text-align: left;
|
373
|
+
}
|
374
|
+
|
375
|
+
.btn--plain--flush-right {
|
376
|
+
margin-right: -15px;
|
377
|
+
}
|
378
|
+
|
379
|
+
.btn--link.btn-disabled,
|
380
|
+
.btn--plain.btn-disabled {
|
381
|
+
border: none;
|
382
|
+
color: #c3cfd8;
|
383
|
+
}
|
384
|
+
|
385
|
+
.btn--link.btn-disabled:hover, .btn--link.btn-disabled:active, .btn--link.btn-disabled:focus,
|
386
|
+
.btn--plain.btn-disabled:hover,
|
387
|
+
.btn--plain.btn-disabled:active,
|
388
|
+
.btn--plain.btn-disabled:focus {
|
389
|
+
text-decoration: none;
|
390
|
+
}
|
391
|
+
|
392
|
+
.segmented {
|
393
|
+
padding: 0;
|
394
|
+
line-height: 22px;
|
395
|
+
font-size: 0;
|
396
|
+
margin: 0;
|
397
|
+
display: inline-block;
|
398
|
+
vertical-align: middle;
|
399
|
+
}
|
400
|
+
|
401
|
+
.segmented > li {
|
402
|
+
position: relative;
|
403
|
+
}
|
404
|
+
|
405
|
+
.segmented > li .btn {
|
406
|
+
display: inline-block;
|
407
|
+
position: static;
|
408
|
+
border-radius: 0px 0px 0px 0px;
|
409
|
+
border-left-width: 0 !important;
|
410
|
+
}
|
411
|
+
|
412
|
+
.segmented > li .btn.btn-primary {
|
413
|
+
border: 1px solid #0078bd;
|
414
|
+
border-right-color: #3e89b5;
|
415
|
+
}
|
416
|
+
|
417
|
+
.segmented > li {
|
418
|
+
list-style-type: none;
|
419
|
+
display: inline-block;
|
420
|
+
margin: 0;
|
421
|
+
}
|
422
|
+
|
423
|
+
.segmented > li:first-child .btn, .segmented > li.first-child .btn {
|
424
|
+
border-radius: 3px 0px 0px 3px;
|
425
|
+
border-left-width: 1px !important;
|
426
|
+
}
|
427
|
+
|
428
|
+
.segmented > li:last-child .btn {
|
429
|
+
border-radius: 0px 3px 3px 0px;
|
430
|
+
}
|
431
|
+
|
432
|
+
.segmented > li:last-child .btn.btn-primary {
|
433
|
+
border-right-color: #0078bd;
|
434
|
+
}
|
435
|
+
|
436
|
+
.segmented > li.middle-child > .btn {
|
437
|
+
border-radius: 0px;
|
438
|
+
}
|
439
|
+
|
440
|
+
.segmented > li:only-child > .btn, .segmented > li.only-child > .btn {
|
441
|
+
border-radius: 3px 3px 3px 3px;
|
442
|
+
border-left-width: 1px !important;
|
443
|
+
}
|
444
|
+
|
445
|
+
.segmented .btn.active {
|
446
|
+
color: #c3cfd8;
|
447
|
+
}
|
448
|
+
|
449
|
+
.segmented .btn.active.btn-primary {
|
450
|
+
color: #ffffff;
|
451
|
+
}
|
452
|
+
|
453
|
+
.segmented .btn.active:hover {
|
454
|
+
cursor: default;
|
455
|
+
}
|
456
|
+
|
457
|
+
.buttons {
|
458
|
+
text-align: right;
|
459
|
+
padding: 10px;
|
460
|
+
background: #fafbfc;
|
461
|
+
border-top: 1px solid #d3dbe2;
|
462
|
+
border-bottom: 1px solid #d3dbe2;
|
463
|
+
}
|
464
|
+
|
465
|
+
.buttons.slim {
|
466
|
+
padding: 5px 10px;
|
467
|
+
}
|
468
|
+
|
469
|
+
.buttons.slim .btn {
|
470
|
+
padding: 6px 10px;
|
471
|
+
}
|
472
|
+
|
473
|
+
.buttons.plain {
|
474
|
+
background: none;
|
475
|
+
padding: 13px 0;
|
476
|
+
border-bottom: none;
|
477
|
+
border-top: 1px solid #d3dbe2;
|
478
|
+
}
|
479
|
+
|
480
|
+
.buttons.connected {
|
481
|
+
background: #fafbfc;
|
482
|
+
border: 1px solid #d3dbe2;
|
483
|
+
border-top: none;
|
484
|
+
}
|
485
|
+
|
486
|
+
.buttons .text-action {
|
487
|
+
line-height: 32px;
|
488
|
+
}
|
489
|
+
|
490
|
+
.button-group {
|
491
|
+
display: -webkit-box;
|
492
|
+
display: -webkit-flex;
|
493
|
+
display: -ms-flexbox;
|
494
|
+
display: flex;
|
495
|
+
-webkit-flex-wrap: wrap;
|
496
|
+
-ms-flex-wrap: wrap;
|
497
|
+
flex-wrap: wrap;
|
498
|
+
margin-right: -10px;
|
499
|
+
margin-top: -10px;
|
500
|
+
-webkit-box-align: center;
|
501
|
+
-webkit-align-items: center;
|
502
|
+
-ms-flex-align: center;
|
503
|
+
align-items: center;
|
504
|
+
}
|
505
|
+
|
506
|
+
.button-group .btn {
|
507
|
+
margin-right: 10px;
|
508
|
+
margin-top: 10px;
|
509
|
+
}
|
510
|
+
|
511
|
+
.button-group .button-group {
|
512
|
+
margin-right: 0;
|
513
|
+
}
|
514
|
+
|
515
|
+
.button-group--right-aligned {
|
516
|
+
-webkit-box-pack: end;
|
517
|
+
-webkit-justify-content: flex-end;
|
518
|
+
-ms-flex-pack: end;
|
519
|
+
justify-content: flex-end;
|
520
|
+
}
|
521
|
+
|
522
|
+
.btn-separate {
|
523
|
+
margin-left: 5px;
|
524
|
+
}
|
525
|
+
|
526
|
+
.btn-separate-left {
|
527
|
+
margin-right: 5px;
|
528
|
+
}
|
529
|
+
|
530
|
+
.btn-separate-top {
|
531
|
+
margin-top: 10px;
|
532
|
+
}
|
533
|
+
|
534
|
+
.btn--plain, .btn--link {
|
535
|
+
font-size: 14px;
|
536
|
+
background-color: transparent !important;
|
537
|
+
border: none;
|
538
|
+
cursor: pointer;
|
539
|
+
color: #0078bd;
|
540
|
+
text-decoration: none;
|
541
|
+
vertical-align: initial;
|
542
|
+
-webkit-user-select: text;
|
543
|
+
-moz-user-select: text;
|
544
|
+
-ms-user-select: text;
|
545
|
+
user-select: text;
|
546
|
+
}
|