From 9fd5f4c6fe3149c25ef32aea7d470325954a3a3e Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 7 Jul 2017 13:03:37 -0700 Subject: [PATCH 01/20] Contenta JSON API profile. --- composer.json | 8 +++++--- web/sites/default/settings.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 42482ba25..d836ae08c 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "drupal/config_installer": "^1.0", "drupal/console": "^1.0.0-rc8", "drupal/core": "^8", + "contentacms/contenta_jsonapi": "dev-8.x-1.x", "drupal/simple_block": "^1.0@beta", "drush/drush": "~8", "rvtraveller/qs-composer-installer": "^1.1", @@ -39,7 +40,7 @@ "conflict": { "drupal/drupal": "*" }, - "minimum-stability": "alpha", + "minimum-stability": "dev", "prefer-stable": true, "autoload": { "classmap": [ @@ -76,7 +77,7 @@ }, "build-env": { "install-cms": [ - "drush site-install standard --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes", + "drush site-install contenta_jsonapi --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes", "drush pm-enable config_direct_save simple_block --yes", "drush pm-uninstall block_content --yes" ], @@ -96,7 +97,8 @@ ".htaccess", "web.config" ] - } + }, + "enable-patching": true }, "config": { "optimize-autoloader": true, diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 3a4f6be2a..afe20c4af 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -37,4 +37,4 @@ * * See: tests/installer-features/installer.feature */ -$settings['install_profile'] = 'standard'; +$settings['install_profile'] = 'contenta_jsonapi'; From c6ab421dd1757dc8386aef66907bfe79e42bfbbf Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 7 Jul 2017 13:53:37 -0700 Subject: [PATCH 02/20] Update composer.lock too. --- composer.lock | 1720 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 1573 insertions(+), 147 deletions(-) diff --git a/composer.lock b/composer.lock index ec6e1c0e7..743461057 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "04d65fad0128638409056228d8ce1772", + "content-hash": "018a978a792dd5378c508b31eee6beec", "packages": [ { "name": "alchemy/zippy", @@ -336,16 +336,16 @@ }, { "name": "consolidation/output-formatters", - "version": "3.1.9", + "version": "3.1.10", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "2e09069866bae89d3fb545365f997a40745e34d2" + "reference": "3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/2e09069866bae89d3fb545365f997a40745e34d2", - "reference": "2e09069866bae89d3fb545365f997a40745e34d2", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a", + "reference": "3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a", "shasum": "" }, "require": { @@ -381,7 +381,88 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2017-05-08T15:59:33+00:00" + "time": "2017-06-06T19:08:54+00:00" + }, + { + "name": "contentacms/contenta_jsonapi", + "version": "dev-8.x-1.x", + "source": { + "type": "git", + "url": "https://github.com/contentacms/contenta_jsonapi.git", + "reference": "b4f6abf06bbda854b68f9008660493193da81aca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/contentacms/contenta_jsonapi/zipball/b4f6abf06bbda854b68f9008660493193da81aca", + "reference": "b4f6abf06bbda854b68f9008660493193da81aca", + "shasum": "" + }, + "require": { + "composer/installers": "^1.0", + "cweagans/composer-patches": "~1.0", + "drupal/core": "^8.3.4", + "drupal/dropzonejs": "^1.0@alpha", + "drupal/entity_browser": "^1.0", + "drupal/fieldable_path": "^1.0", + "drupal/jsonapi": "^1.0", + "drupal/jsonapi_extras": "^1.0", + "drupal/material_admin": "1.x-dev", + "drupal/materialize": "1.x-dev", + "drupal/media_entity": "^1.6", + "drupal/media_entity_image": "^1.2", + "drupal/openapi": "^1.0@alpha", + "drupal/remote_stream_wrapper": "1.0", + "drupal/schemata": "^1.0@alpha", + "drupal/simple_oauth": "^2.0", + "drupal/subrequests": "^1.0", + "webflo/drupal-core-strict": "8.3.4" + }, + "require-dev": { + "burdamagazinorg/thunder-dev-tools": "dev-master", + "drupal/coder": "^8.2", + "drupal/config_inspector": "1.x-dev", + "drupal/features": "^3.5" + }, + "type": "drupal-profile", + "extra": { + "installer-paths": { + "web/core": [ + "type:drupal-core" + ], + "web/modules/contrib/{$name}": [ + "type:drupal-module" + ], + "web/libraries/{$name}": [ + "type:drupal-library" + ], + "web/profiles/contrib/{$name}": [ + "type:drupal-profile" + ], + "web/themes/contrib/{$name}": [ + "type:drupal-theme" + ], + "drush/contrib/{$name}": [ + "type:drupal-drush" + ] + }, + "patches": { + "drupal/core": { + "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/2788777-33.patch" + }, + "drupal/remote_stream_wrapper": { + "Module installation fails when shipped as part of an install profile": "https://www.drupal.org/files/issues/2886691-2.patch" + }, + "asm89/stack-cors": { + "Add origin matcher for wildcard matching": "https://patch-diff.githubusercontent.com/raw/asm89/stack-cors/pull/42.patch", + "Do not modify request with same origin": "https://github.com/asm89/stack-cors/commit/6daf5757971173b79ddabbd755d59d333c278f42.patch" + } + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "time": "2017-07-06T21:18:12+00:00" }, { "name": "cweagans/composer-patches", @@ -427,6 +508,69 @@ "description": "Provides a way to patch Composer packages.", "time": "2017-03-19T18:18:52+00:00" }, + { + "name": "defuse/php-encryption", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": "~2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "nikic/php-parser": "^2.0|^3.0", + "phpunit/phpunit": "^4|^5" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "time": "2017-05-18T21:28:48+00:00" + }, { "name": "dflydev/dot-access-configuration", "version": "v1.0.1", @@ -1157,33 +1301,34 @@ }, { "name": "drupal/console", - "version": "1.0.0-rc19", + "version": "1.0.0-rc23", "source": { "type": "git", "url": "https://github.com/hechoendrupal/drupal-console.git", - "reference": "98ad4c0362146689f3d4f895394ef35a4f95443d" + "reference": "2bac21223573f5fd8c4d7b725baf5d404e406b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/98ad4c0362146689f3d4f895394ef35a4f95443d", - "reference": "98ad4c0362146689f3d4f895394ef35a4f95443d", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/2bac21223573f5fd8c4d7b725baf5d404e406b0b", + "reference": "2bac21223573f5fd8c4d7b725baf5d404e406b0b", "shasum": "" }, "require": { "alchemy/zippy": "0.4.3", "composer/installers": "~1.0", "doctrine/annotations": "1.2.*", - "doctrine/collections": "~1.3", - "drupal/console-core": "1.0.0-rc19", + "doctrine/collections": "1.3.*", + "drupal/console-core": "1.0.0-rc23", + "drupal/console-dotenv": "~0", "drupal/console-extend-plugin": "~0", "gabordemooij/redbean": "~4.3", "guzzlehttp/guzzle": "~6.1", "php": "^5.5.9 || ^7.0", "psy/psysh": "0.6.* || ~0.8", - "symfony/css-selector": ">=2.7 <3.0", - "symfony/dom-crawler": ">=2.7 <3.3", - "symfony/expression-language": ">=2.7 <3.0", - "symfony/http-foundation": ">=2.7 <3.0" + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8", + "symfony/http-foundation": "~2.8" }, "bin": [ "bin/drupal" @@ -1231,39 +1376,40 @@ "drupal", "symfony" ], - "time": "2017-05-08T16:49:07+00:00" + "time": "2017-06-27T09:27:00+00:00" }, { "name": "drupal/console-core", - "version": "1.0.0-rc19", + "version": "1.0.0-rc23", "source": { "type": "git", "url": "https://github.com/hechoendrupal/drupal-console-core.git", - "reference": "c5be69f660727b38ce6c904dcb0e061e03de7aeb" + "reference": "b1f3680ae19a4d00f8b701b060521bab2cccd6b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/c5be69f660727b38ce6c904dcb0e061e03de7aeb", - "reference": "c5be69f660727b38ce6c904dcb0e061e03de7aeb", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/b1f3680ae19a4d00f8b701b060521bab2cccd6b1", + "reference": "b1f3680ae19a4d00f8b701b060521bab2cccd6b1", "shasum": "" }, "require": { "dflydev/dot-access-configuration": "1.0.1", - "drupal/console-en": "1.0.0-rc19", + "drupal/console-en": "1.0.0-rc23", "php": "^5.5.9 || ^7.0", "stecman/symfony-console-completion": "~0.7", - "symfony/config": ">=2.7 <3.0", - "symfony/console": ">=2.7 <3.0", - "symfony/debug": ">=2.6 <3.0", - "symfony/dependency-injection": ">=2.7 <3.0", - "symfony/event-dispatcher": ">=2.7 <3.0", - "symfony/filesystem": ">=2.7 <3.0", - "symfony/finder": ">=2.7 <3.0", - "symfony/process": ">=2.7 <3.0", - "symfony/translation": ">=2.7 <3.0", - "symfony/yaml": ">=2.7 <3.0", + "symfony/config": "~2.8", + "symfony/console": "~2.8", + "symfony/debug": "~2.8", + "symfony/dependency-injection": "~2.8", + "symfony/event-dispatcher": "~2.8", + "symfony/filesystem": "~2.8", + "symfony/finder": "~2.8", + "symfony/process": "~2.8", + "symfony/translation": "~2.8", + "symfony/yaml": "~2.8", "twig/twig": "^1.23.1", - "webflo/drupal-finder": "0.*" + "webflo/drupal-finder": "^0.3.0", + "webmozart/path-util": "^2.3" }, "type": "project", "autoload": { @@ -1311,20 +1457,59 @@ "drupal", "symfony" ], - "time": "2017-05-08T16:08:29+00:00" + "time": "2017-06-27T09:16:56+00:00" + }, + { + "name": "drupal/console-dotenv", + "version": "0.3.0", + "source": { + "type": "git", + "url": "https://github.com/weknowinc/drupal-console-dotenv.git", + "reference": "94e88646801c2f80ec2e5e66d3d8f21b0b467405" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/weknowinc/drupal-console-dotenv/zipball/94e88646801c2f80ec2e5e66d3d8f21b0b467405", + "reference": "94e88646801c2f80ec2e5e66d3d8f21b0b467405", + "shasum": "" + }, + "require": { + "vlucas/phpdotenv": "^2.3" + }, + "require-dev": { + "drupal/console-core": "~1.0" + }, + "type": "drupal-console-library", + "autoload": { + "psr-4": { + "Drupal\\Console\\Dotenv\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Jesus Manuel Olivas", + "email": "jesus.olivas@gmail.com" + } + ], + "description": "Drupal Console Dotenv", + "time": "2017-07-04T01:14:02+00:00" }, { "name": "drupal/console-en", - "version": "1.0.0-rc19", + "version": "1.0.0-rc23", "source": { "type": "git", "url": "https://github.com/hechoendrupal/drupal-console-en.git", - "reference": "df4da4011500496fc9c1d611cd36343006079915" + "reference": "e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/df4da4011500496fc9c1d611cd36343006079915", - "reference": "df4da4011500496fc9c1d611cd36343006079915", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220", + "reference": "e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220", "shasum": "" }, "type": "drupal-console-language", @@ -1365,20 +1550,20 @@ "drupal", "symfony" ], - "time": "2017-05-05T21:51:49+00:00" + "time": "2017-06-22T19:05:23+00:00" }, { "name": "drupal/console-extend-plugin", - "version": "0.6.0", + "version": "0.9.1", "source": { "type": "git", "url": "https://github.com/hechoendrupal/drupal-console-extend-plugin.git", - "reference": "4e7f57650eefc53eb02c89360bbc1f675c901a73" + "reference": "ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-extend-plugin/zipball/4e7f57650eefc53eb02c89360bbc1f675c901a73", - "reference": "4e7f57650eefc53eb02c89360bbc1f675c901a73", + "url": "https://api.github.com/repos/hechoendrupal/drupal-console-extend-plugin/zipball/ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4", + "reference": "ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4", "shasum": "" }, "require": { @@ -1406,20 +1591,20 @@ } ], "description": "Drupal Console Extend Plugin", - "time": "2017-05-02T14:17:00+00:00" + "time": "2017-07-07T05:12:50+00:00" }, { "name": "drupal/core", - "version": "8.3.2", + "version": "8.3.5", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "82c432cfe728458538d4826c9c4be57dcf35443b" + "reference": "7adfc8c43615258e242868a393e82971a67be51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/82c432cfe728458538d4826c9c4be57dcf35443b", - "reference": "82c432cfe728458538d4826c9c4be57dcf35443b", + "url": "https://api.github.com/repos/drupal/core/zipball/7adfc8c43615258e242868a393e82971a67be51a", + "reference": "7adfc8c43615258e242868a393e82971a67be51a", "shasum": "" }, "require": { @@ -1570,6 +1755,11 @@ "symfony/css-selector": "~2.8" }, "type": "drupal-core", + "extra": { + "patches_applied": { + "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/2788777-33.patch" + } + }, "autoload": { "psr-4": { "Drupal\\Core\\": "lib/Drupal/Core", @@ -1591,7 +1781,853 @@ "GPL-2.0+" ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2017-05-03T17:12:42+00:00" + "time": "2017-07-05T17:03:07+00:00" + }, + { + "name": "drupal/dropzonejs", + "version": "1.0.0-alpha7", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/dropzonejs", + "reference": "8.x-1.0-alpha7" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/dropzonejs-8.x-1.0-alpha7.zip", + "reference": null, + "shasum": "62fc6d46cee1d5fa9885bab3e65b3638172311f6" + }, + "require": { + "drupal/core": "*" + }, + "require-dev": { + "drupal/entity_browser": "*" + }, + "suggest": { + "enyo/dropzone": "Required to user drupal/dropzonejs. Dropzone is an easy to use drag'n'drop library." + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha7", + "datestamp": "1495200183" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Janez Urevc", + "homepage": "https://drupal.org/u/slashrsm", + "role": "Maintainer" + }, + { + "name": "Christian Fritsch", + "homepage": "https://drupal.org/u/chrfritsch", + "role": "Maintainer" + }, + { + "name": "Primoz Hmeljak", + "homepage": "https://drupal.org/u/Primsi", + "role": "Maintainer" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/1998478/committers", + "role": "contributor" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + }, + { + "name": "wouters_f", + "homepage": "https://www.drupal.org/user/721548" + }, + { + "name": "zkday", + "homepage": "https://www.drupal.org/user/888644" + } + ], + "description": "Drupal integration for DropzoneJS - An open source library that provides drag’n’drop file uploads with image previews.", + "homepage": "https://www.drupal.org/project/dropzonejs", + "keywords": [ + "DropzoneJS", + "Drupal" + ], + "support": { + "source": "https://www.drupal.org/project/dropzonejs", + "issues": "https://www.drupal.org/project/issues/dropzonejs", + "irc": "irc://irc.freenode.org/drupal-contribute" + } + }, + { + "name": "drupal/entity", + "version": "1.0.0-alpha4", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/entity", + "reference": "8.x-1.0-alpha4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/entity-8.x-1.0-alpha4.zip", + "reference": null, + "shasum": "c081d3757c159dfee74c9e5acb63bdee81c42e18" + }, + "require": { + "drupal/core": "~8.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha4", + "datestamp": "1481194983" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "bojanz", + "homepage": "https://www.drupal.org/user/86106" + }, + { + "name": "dawehner", + "homepage": "https://www.drupal.org/user/99340" + }, + { + "name": "dixon_", + "homepage": "https://www.drupal.org/user/239911" + }, + { + "name": "fago", + "homepage": "https://www.drupal.org/user/16747" + } + ], + "description": "Provides expanded entity APIs, which will be moved to Drupal core one day.", + "homepage": "http://drupal.org/project/entity", + "support": { + "source": "http://cgit.drupalcode.org/entity" + } + }, + { + "name": "drupal/entity_browser", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/entity_browser", + "reference": "8.x-1.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/entity_browser-8.x-1.0.zip", + "reference": null, + "shasum": "6bd7bbcda1eebacc3685e9edaad2ad29b525b2ad" + }, + "require": { + "drupal/core": "~8.0" + }, + "require-dev": { + "drupal/ctools": "*", + "drupal/inline_entity_form": "*", + "drupal/media_entity": "*", + "drupal/paragraphs": "*", + "drupal/token": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-8.x-1.x": "8.1.x-dev" + }, + "drupal": { + "version": "8.x-1.0", + "datestamp": "1492678144" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Janez Urevc", + "homepage": "https://github.com/slashrsm", + "role": "Maintainer" + }, + { + "name": "Primoz Hmeljak", + "homepage": "https://github.com/primsi", + "role": "Maintainer" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/1943336/committers", + "role": "contributor" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "marcingy", + "homepage": "https://www.drupal.org/user/77320" + }, + { + "name": "samuel.mortenson", + "homepage": "https://www.drupal.org/user/2582268" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Entity browsing and selecting component.", + "homepage": "http://drupal.org/project/entity_browser", + "support": { + "source": "http://cgit.drupalcode.org/entity_browser", + "issues": "http://drupal.org/project/issues/entity_browser", + "irc": "irc://irc.freenode.org/drupal-contribute" + } + }, + { + "name": "drupal/fieldable_path", + "version": "1.0.0-rc4", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/fieldable_path", + "reference": "8.x-1.0-rc4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/fieldable_path-8.x-1.0-rc4.zip", + "reference": null, + "shasum": "2082a6818668d8e4f51f62d7b0abb155ff2304da" + }, + "require": { + "drupal/core": "*" + }, + "require-dev": { + "drupal/pathauto": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-rc4", + "datestamp": "1495283883" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Spleshka", + "homepage": "https://www.drupal.org/user/810676" + } + ], + "description": "Provides a fieldable mirror of \"path\" property for entities.", + "homepage": "https://www.drupal.org/project/fieldable_path", + "support": { + "source": "http://cgit.drupalcode.org/fieldable_path" + } + }, + { + "name": "drupal/jsonapi", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/jsonapi", + "reference": "8.x-1.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jsonapi-8.x-1.0.zip", + "reference": null, + "shasum": "d5bdd22561a6283f7e5ff06635c9d85248927f73" + }, + "require": { + "drupal/core": "^8.2" + }, + "require-dev": { + "justinrainbow/json-schema": "^4.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0", + "datestamp": "1493755084" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "dawehner", + "homepage": "https://www.drupal.org/user/99340" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "gabesullice", + "homepage": "https://www.drupal.org/user/2287430" + } + ], + "description": "Provides a JSON API standards-compliant API for accessing and manipulating Drupal content and configuration entities.", + "homepage": "https://www.drupal.org/project/jsonapi", + "support": { + "source": "http://cgit.drupalcode.org/jsonapi" + } + }, + { + "name": "drupal/jsonapi_extras", + "version": "dev-1.x", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/jsonapi_extras", + "reference": "9a67e446b21791414cada55fe92ec5c049cdd43b" + }, + "require": { + "drupal/core": "~8.0", + "drupal/jsonapi": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.x-dev", + "datestamp": "1499061843" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + } + ], + "description": "Builds on top of JSON API to deliver extra functionality.", + "homepage": "https://www.drupal.org/project/jsonapi_extras", + "support": { + "source": "http://cgit.drupalcode.org/jsonapi_extras" + }, + "time": "2017-07-03 06:08:14" + }, + { + "name": "drupal/material_admin", + "version": "dev-1.x", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/material_admin", + "reference": "ac5e85cc6a85ae66911f3270bdfa7b21031d7b21" + }, + "require": { + "drupal/core": "~8.0" + }, + "type": "drupal-theme", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.x-dev", + "datestamp": "1499432342" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Bcwald", + "homepage": "https://www.drupal.org/user/215794" + }, + { + "name": "samuel.mortenson", + "homepage": "https://www.drupal.org/user/2582268" + } + ], + "homepage": "https://www.drupal.org/project/material_admin", + "support": { + "source": "http://cgit.drupalcode.org/material_admin" + }, + "time": "2017-07-07 14:09:03" + }, + { + "name": "drupal/materialize", + "version": "dev-1.x", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/materialize", + "reference": "449e842d9076316715bd07349e134ff519acf0a6" + }, + "require": { + "drupal/core": "~8.0" + }, + "type": "drupal-theme", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha1+66-dev", + "datestamp": "1492876743" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Archual", + "homepage": "https://www.drupal.org/user/3357566" + }, + { + "name": "Denes.Szabo", + "homepage": "https://www.drupal.org/user/582668" + }, + { + "name": "Mukeysh", + "homepage": "https://www.drupal.org/user/1557576" + }, + { + "name": "asrob", + "homepage": "https://www.drupal.org/user/105777" + } + ], + "homepage": "https://www.drupal.org/project/materialize", + "support": { + "source": "http://cgit.drupalcode.org/materialize" + }, + "time": "2017-04-22 16:04:19" + }, + { + "name": "drupal/media_entity", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/media_entity", + "reference": "8.x-1.6" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_entity-8.x-1.6.zip", + "reference": null, + "shasum": "86fd1478f2448c034660faa30ef34c0e8519fecb" + }, + "require": { + "drupal/core": "~8.1", + "drupal/entity": "^1.0.0-alpha3" + }, + "require-dev": { + "drupal/entity": "*", + "drupal/inline_entity_form": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.6", + "datestamp": "1480363983" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, + { + "name": "Drupal Media Team", + "homepage": "https://www.drupal.org/user/3260690" + }, + { + "name": "Drupal media CI", + "homepage": "https://www.drupal.org/user/3057985" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "boztek", + "homepage": "https://www.drupal.org/user/134410" + }, + { + "name": "chr.fritsch", + "homepage": "https://www.drupal.org/user/2103716" + }, + { + "name": "jcisio", + "homepage": "https://www.drupal.org/user/210762" + }, + { + "name": "katzilla", + "homepage": "https://www.drupal.org/user/260398" + }, + { + "name": "phenaproxima", + "homepage": "https://www.drupal.org/user/205645" + }, + { + "name": "seanB", + "homepage": "https://www.drupal.org/user/545912" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Provides a lean and simple way to store media on Drupal 8 sites.", + "homepage": "https://www.drupal.org/project/media_entity", + "keywords": [ + "Drupal" + ], + "support": { + "source": "https://www.drupal.org/project/media_entity", + "issues": "https://www.drupal.org/project/issues/media_entity" + } + }, + { + "name": "drupal/media_entity_image", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/media_entity_image", + "reference": "8.x-1.2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_entity_image-8.x-1.2.zip", + "reference": null, + "shasum": "d02d1d793a50ea3b9cb5a3219472fdd27980f4f3" + }, + "require": { + "drupal/core": "~8.1", + "drupal/media_entity": "~1.0 || ~8.1.0" + }, + "require-dev": { + "drupal/entity_browser": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.2", + "datestamp": "1470170939" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Drupal Media Team", + "homepage": "https://www.drupal.org/user/3260690" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Local images integration for Drupal Media entity.", + "homepage": "https://www.drupal.org/project/media_entity_image", + "keywords": [ + "Drupal", + "image", + "media" + ], + "support": { + "source": "https://www.drupal.org/project/media_entity_image", + "issues": "https://www.drupal.org/project/issues/media_entity_image" + } + }, + { + "name": "drupal/openapi", + "version": "1.0.0-alpha1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/openapi", + "reference": "8.x-1.0-alpha1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/openapi-8.x-1.0-alpha1.zip", + "reference": null, + "shasum": "580e244c5a53419e95dfb8c7b7b9c67273b8e9b9" + }, + "require": { + "drupal/core": "~8.0", + "drupal/schemata": "^1.0", + "drupal/schemata_json_schema": "*" + }, + "require-dev": { + "drupal/jsonapi": "1.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha1", + "datestamp": "1498657743" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "mrjmd", + "homepage": "https://www.drupal.org/user/1800446" + }, + { + "name": "rogierbom", + "homepage": "https://www.drupal.org/user/1352176" + }, + { + "name": "tedbow", + "homepage": "https://www.drupal.org/user/240860" + } + ], + "description": "Creates OpenAPI specification for Drupal REST resources.", + "homepage": "https://www.drupal.org/project/openapi", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/openapi", + "issues": "http://drupal.org/project/issues/openapi" + } + }, + { + "name": "drupal/remote_stream_wrapper", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/remote_stream_wrapper", + "reference": "8.x-1.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/remote_stream_wrapper-8.x-1.0.zip", + "reference": null, + "shasum": "442094c0a6c097b5d7d757a9c17a6006f2618caa" + }, + "require": { + "drupal/core": "~8.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0", + "datestamp": "1471532939" + }, + "patches_applied": { + "Module installation fails when shipped as part of an install profile": "https://www.drupal.org/files/issues/2886691-2.patch" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, + { + "name": "arthurf", + "homepage": "https://www.drupal.org/user/27259" + }, + { + "name": "becw", + "homepage": "https://www.drupal.org/user/81067" + } + ], + "description": "Provides the ability to use external files over HTTP", + "homepage": "https://www.drupal.org/project/remote_stream_wrapper", + "support": { + "source": "http://cgit.drupalcode.org/remote_stream_wrapper" + } + }, + { + "name": "drupal/schemata", + "version": "1.0.0-alpha2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/schemata", + "reference": "8.x-1.0-alpha2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/schemata-8.x-1.0-alpha2.zip", + "reference": null, + "shasum": "25c350188a7fff372582d468d6fed41425a933d1" + }, + "require": { + "drupal/core": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha2", + "datestamp": "1498495443" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Grayside", + "homepage": "https://www.drupal.org/user/346868" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "pcho", + "homepage": "https://www.drupal.org/user/1619590" + }, + { + "name": "srjosh", + "homepage": "https://www.drupal.org/user/165878" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Provide schema definitions of Drupal entities for type validation, code generation, and documentation.", + "homepage": "https://www.drupal.org/project/schemata", + "support": { + "source": "http://cgit.drupalcode.org/schemata" + } + }, + { + "name": "drupal/schemata_json_schema", + "version": "1.0.0-alpha2", + "require": { + "drupal/core": "~8.0", + "drupal/schemata": "self.version" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha2", + "datestamp": "1498495443" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Grayside", + "homepage": "https://www.drupal.org/user/346868" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "pcho", + "homepage": "https://www.drupal.org/user/1619590" + }, + { + "name": "srjosh", + "homepage": "https://www.drupal.org/user/165878" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Provides a data models for entity types and bundles in JSON schema format.", + "homepage": "https://www.drupal.org/project/schemata", + "support": { + "source": "http://cgit.drupalcode.org/schemata" + } }, { "name": "drupal/simple_block", @@ -1636,18 +2672,112 @@ "source": "http://cgit.drupalcode.org/simple_block" } }, + { + "name": "drupal/simple_oauth", + "version": "2.0.0-rc3", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/simple_oauth", + "reference": "8.x-2.0-rc3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/simple_oauth-8.x-2.0-rc3.zip", + "reference": null, + "shasum": "a672216d3f3ceb13f7b2840cf466169d546f67e2" + }, + "require": { + "drupal/core": "*", + "league/oauth2-server": "~5.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + }, + "drupal": { + "version": "8.x-2.0-rc3", + "datestamp": "1499089742" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/550110", + "email": "mateu.aguilo.bosch@gmail.com" + }, + { + "name": "pcambra", + "homepage": "https://www.drupal.org/user/122101" + } + ], + "description": "The Simple OAuth module for Drupal", + "homepage": "https://www.drupal.org/project/simple_oauth", + "support": { + "source": "http://cgit.drupalcode.org/simple_oauth" + } + }, + { + "name": "drupal/subrequests", + "version": "1.0.0-beta2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/subrequests", + "reference": "8.x-1.0-beta2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/subrequests-8.x-1.0-beta2.zip", + "reference": null, + "shasum": "0c190880febc4d3f1a0c6d550d38e54ef9010ab1" + }, + "require": { + "drupal/core": "*", + "php-jsonpointer/php-jsonpointer": "^3.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta2", + "datestamp": "1499444643" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/550110", + "email": "mateu.aguilo.bosch@gmail.com" + } + ], + "description": "Add a front controller that you can use to make subrequests.", + "homepage": "https://www.drupal.org/project/subrequests", + "support": { + "source": "http://cgit.drupalcode.org/subrequests" + } + }, { "name": "drush/drush", - "version": "8.1.11", + "version": "8.1.12", "source": { "type": "git", "url": "https://github.com/drush-ops/drush.git", - "reference": "8e7c3308dee06083b6bd065e24e009a34fb71d2a" + "reference": "a1d3ab0f1d9ce01556d70015906caaed723f7ba7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drush-ops/drush/zipball/8e7c3308dee06083b6bd065e24e009a34fb71d2a", - "reference": "8e7c3308dee06083b6bd065e24e009a34fb71d2a", + "url": "https://api.github.com/repos/drush-ops/drush/zipball/a1d3ab0f1d9ce01556d70015906caaed723f7ba7", + "reference": "a1d3ab0f1d9ce01556d70015906caaed723f7ba7", "shasum": "" }, "require": { @@ -1739,7 +2869,7 @@ ], "description": "Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.", "homepage": "http://www.drush.org", - "time": "2017-04-21T21:59:44+00:00" + "time": "2017-06-05T22:51:34+00:00" }, { "name": "easyrdf/easyrdf", @@ -2203,6 +3333,191 @@ ], "time": "2015-04-20T18:58:01+00:00" }, + { + "name": "lcobucci/jwt", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "ddce703826f9c5229781933b1a39069e38e6a0f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/ddce703826f9c5229781933b1a39069e38e6a0f3", + "reference": "ddce703826f9c5229781933b1a39069e38e6a0f3", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">=5.5" + }, + "require-dev": { + "mdanter/ecc": "~0.3.1", + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "~4.5", + "squizlabs/php_codesniffer": "~2.3" + }, + "suggest": { + "mdanter/ecc": "Required to use Elliptic Curves based algorithms." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "time": "2016-10-31T20:09:32+00:00" + }, + { + "name": "league/event", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/event.git", + "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/event/zipball/e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", + "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "~2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Event package", + "keywords": [ + "emitter", + "event", + "listener" + ], + "time": "2015-05-21T12:24:47+00:00" + }, + { + "name": "league/oauth2-server", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth2-server.git", + "reference": "26889abdd3dc04b7b9d633991e807159f6d410f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/26889abdd3dc04b7b9d633991e807159f6d410f9", + "reference": "26889abdd3dc04b7b9d633991e807159f6d410f9", + "shasum": "" + }, + "require": { + "defuse/php-encryption": "^2.1", + "ext-openssl": "*", + "lcobucci/jwt": "^3.1", + "league/event": "^2.1", + "paragonie/random_compat": "^2.0", + "php": ">=5.5.9", + "psr/http-message": "^1.0" + }, + "replace": { + "league/oauth2server": "*", + "lncd/oauth2": "*" + }, + "require-dev": { + "indigophp/hash-compat": "^1.1", + "phpunit/phpunit": "^4.8 || ^5.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "indigophp/hash-compat": "Polyfill for hash_equals function for PHP 5.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-V5-WIP": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\OAuth2\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Bilbie", + "email": "hello@alexbilbie.com", + "homepage": "http://www.alexbilbie.com", + "role": "Developer" + } + ], + "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", + "homepage": "https://oauth2.thephpleague.com/", + "keywords": [ + "Authentication", + "api", + "auth", + "authorisation", + "authorization", + "oauth", + "oauth 2", + "oauth 2.0", + "oauth2", + "protect", + "resource", + "secure", + "server" + ], + "time": "2017-07-01T17:37:54+00:00" + }, { "name": "masterminds/html5", "version": "2.2.2", @@ -2270,16 +3585,16 @@ }, { "name": "nikic/php-parser", - "version": "v3.0.5", + "version": "v3.0.6", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d" + "reference": "0808939f81c1347a3c8a82a5925385a08074b0f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2b9e2f71b722f7c53918ab0c25f7646c2013f17d", - "reference": "2b9e2f71b722f7c53918ab0c25f7646c2013f17d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0808939f81c1347a3c8a82a5925385a08074b0f1", + "reference": "0808939f81c1347a3c8a82a5925385a08074b0f1", "shasum": "" }, "require": { @@ -2317,7 +3632,7 @@ "parser", "php" ], - "time": "2017-03-05T18:23:57+00:00" + "time": "2017-06-28T20:53:48+00:00" }, { "name": "paragonie/random_compat", @@ -2422,18 +3737,70 @@ ], "time": "2016-01-21T16:14:31+00:00" }, + { + "name": "php-jsonpointer/php-jsonpointer", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/raphaelstolt/php-jsonpointer.git", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.11", + "phpunit/phpunit": "4.6.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Rs\\Json": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Stolt", + "email": "raphael.stolt@gmail.com", + "homepage": "http://raphaelstolt.blogspot.com/" + } + ], + "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", + "homepage": "https://github.com/raphaelstolt/php-jsonpointer", + "keywords": [ + "json", + "json pointer", + "json traversal" + ], + "time": "2016-08-29T08:51:01+00:00" + }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", "shasum": "" }, "require": { @@ -2469,7 +3836,7 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2015-02-03T12:10:50+00:00" + "time": "2016-01-25T08:17:30+00:00" }, { "name": "psr/http-message", @@ -2570,16 +3937,16 @@ }, { "name": "psy/psysh", - "version": "v0.8.3", + "version": "v0.8.9", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e" + "reference": "58a31cc4404c8f632d8c557bc72056af2d3a83db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", - "reference": "1dd4bbbc64d71e7ec075ffe82b42d9e096dc8d5e", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/58a31cc4404c8f632d8c557bc72056af2d3a83db", + "reference": "58a31cc4404c8f632d8c557bc72056af2d3a83db", "shasum": "" }, "require": { @@ -2609,7 +3976,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-develop": "0.8.x-dev" } }, "autoload": { @@ -2639,7 +4006,7 @@ "interactive", "shell" ], - "time": "2017-03-19T21:40:44+00:00" + "time": "2017-07-06T14:53:52+00:00" }, { "name": "rvtraveller/qs-composer-installer", @@ -2887,7 +4254,7 @@ }, { "name": "symfony/config", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -3004,7 +4371,7 @@ }, { "name": "symfony/css-selector", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3177,16 +4544,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v3.2.8", + "version": "v3.3.4", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286" + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f1ad34e8af09ed17570e027cf0c58a12eddec286", - "reference": "f1ad34e8af09ed17570e027cf0c58a12eddec286", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", + "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", "shasum": "" }, "require": { @@ -3202,7 +4569,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -3229,7 +4596,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-05-25T23:10:31+00:00" }, { "name": "symfony/event-dispatcher", @@ -3293,16 +4660,16 @@ }, { "name": "symfony/expression-language", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/expression-language.git", - "reference": "3de003c1d37ab8a8432ccd112d52228bf0fce134" + "reference": "2b8394d92f012fe3410e55e28c24fd90c9864a01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/3de003c1d37ab8a8432ccd112d52228bf0fce134", - "reference": "3de003c1d37ab8a8432ccd112d52228bf0fce134", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/2b8394d92f012fe3410e55e28c24fd90c9864a01", + "reference": "2b8394d92f012fe3410e55e28c24fd90c9864a01", "shasum": "" }, "require": { @@ -3338,20 +4705,20 @@ ], "description": "Symfony ExpressionLanguage Component", "homepage": "https://symfony.com", - "time": "2017-05-01T14:31:55+00:00" + "time": "2017-06-01T20:52:29+00:00" }, { "name": "symfony/filesystem", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "dc40154e26a0116995e4f2f0c71cb9c2fe0775a3" + "reference": "b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/dc40154e26a0116995e4f2f0c71cb9c2fe0775a3", - "reference": "dc40154e26a0116995e4f2f0c71cb9c2fe0775a3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7", + "reference": "b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7", "shasum": "" }, "require": { @@ -3387,20 +4754,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:07:15+00:00" + "time": "2017-06-20T23:27:56+00:00" }, { "name": "symfony/finder", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "16d55394b31547e4a8494551b85c9b9915545347" + "reference": "4f4e84811004e065a3bb5ceeb1d9aa592630f9ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/16d55394b31547e4a8494551b85c9b9915545347", - "reference": "16d55394b31547e4a8494551b85c9b9915545347", + "url": "https://api.github.com/repos/symfony/finder/zipball/4f4e84811004e065a3bb5ceeb1d9aa592630f9ad", + "reference": "4f4e84811004e065a3bb5ceeb1d9aa592630f9ad", "shasum": "" }, "require": { @@ -3436,7 +4803,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:07:15+00:00" + "time": "2017-06-01T20:52:29+00:00" }, { "name": "symfony/http-foundation", @@ -4247,16 +5614,16 @@ }, { "name": "symfony/var-dumper", - "version": "v2.8.20", + "version": "v2.8.24", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "18ab1b833d2d82eb40a707bc002cbe62a1c22d0b" + "reference": "5fe3ba6d3817ae378d141962616e048ac85ba21d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/18ab1b833d2d82eb40a707bc002cbe62a1c22d0b", - "reference": "18ab1b833d2d82eb40a707bc002cbe62a1c22d0b", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5fe3ba6d3817ae378d141962616e048ac85ba21d", + "reference": "5fe3ba6d3817ae378d141962616e048ac85ba21d", "shasum": "" }, "require": { @@ -4268,7 +5635,7 @@ }, "require-dev": { "ext-iconv": "*", - "twig/twig": "~1.20|~2.0" + "twig/twig": "~1.34|~2.4" }, "suggest": { "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", @@ -4311,7 +5678,7 @@ "debug", "dump" ], - "time": "2017-04-28T06:26:40+00:00" + "time": "2017-06-20T23:27:56+00:00" }, { "name": "symfony/yaml", @@ -4423,18 +5790,68 @@ ], "time": "2016-09-21T23:05:12+00:00" }, + { + "name": "vlucas/phpdotenv", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause-Attribution" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2016-09-01T10:05:43+00:00" + }, { "name": "webflo/drupal-core-strict", - "version": "8.3.2", + "version": "8.3.4", "source": { "type": "git", "url": "https://github.com/webflo/drupal-core-strict.git", - "reference": "1efda80491a0d17ae12a977c07f9ccde05962537" + "reference": "868bf37f32b6c5be93742c57da938868e68da685" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webflo/drupal-core-strict/zipball/1efda80491a0d17ae12a977c07f9ccde05962537", - "reference": "1efda80491a0d17ae12a977c07f9ccde05962537", + "url": "https://api.github.com/repos/webflo/drupal-core-strict/zipball/868bf37f32b6c5be93742c57da938868e68da685", + "reference": "868bf37f32b6c5be93742c57da938868e68da685", "shasum": "" }, "require": { @@ -4522,7 +5939,7 @@ "GPL-2.0+" ], "description": "Locked core dependencies", - "time": "2017-05-03T18:01:43+00:00" + "time": "2017-06-21T19:01:43+00:00" }, { "name": "webflo/drupal-finder", @@ -4910,21 +6327,21 @@ "packages-dev": [ { "name": "behat/behat", - "version": "v3.3.0", + "version": "v3.3.1", "source": { "type": "git", "url": "https://github.com/Behat/Behat.git", - "reference": "15a3a1857457eaa29cdf41564a5e421effb09526" + "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/15a3a1857457eaa29cdf41564a5e421effb09526", - "reference": "15a3a1857457eaa29cdf41564a5e421effb09526", + "url": "https://api.github.com/repos/Behat/Behat/zipball/44a58c1480d6144b2dc2c2bf02b9cef73c83840d", + "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d", "shasum": "" }, "require": { "behat/gherkin": "^4.4.4", - "behat/transliterator": "~1.0", + "behat/transliterator": "^1.2", "container-interop/container-interop": "^1.1", "ext-mbstring": "*", "php": ">=5.3.3", @@ -4988,7 +6405,7 @@ "symfony", "testing" ], - "time": "2016-12-25T13:43:52+00:00" + "time": "2017-05-15T16:49:16+00:00" }, { "name": "behat/gherkin", @@ -5526,25 +6943,27 @@ }, { "name": "drupal/drupal-extension", - "version": "v3.1.5", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/jhedstrom/drupalextension.git", - "reference": "6bfff4967d0efacff51e2ff51a306021012396d8" + "reference": "8610ab76130ae53b3e7522aff6e1ef61287612f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jhedstrom/drupalextension/zipball/6bfff4967d0efacff51e2ff51a306021012396d8", - "reference": "6bfff4967d0efacff51e2ff51a306021012396d8", + "url": "https://api.github.com/repos/jhedstrom/drupalextension/zipball/8610ab76130ae53b3e7522aff6e1ef61287612f2", + "reference": "8610ab76130ae53b3e7522aff6e1ef61287612f2", "shasum": "" }, "require": { - "behat/behat": "~3.0,>=3.0.5", + "behat/behat": "~3.2", "behat/mink": "~1.5", "behat/mink-extension": "~2.0", "behat/mink-goutte-driver": "~1.0", "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "~1.1" + "drupal/drupal-driver": "~1.2", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/event-dispatcher": "~2.7|~3.0" }, "require-dev": { "behat/mink-zombie-driver": "^1.2", @@ -5552,6 +6971,11 @@ "phpunit/phpunit": "3.7.*" }, "type": "behat-extension", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, "autoload": { "psr-0": { "Drupal\\Drupal": "src/", @@ -5576,7 +7000,7 @@ "test", "web" ], - "time": "2015-12-22T20:10:14+00:00" + "time": "2017-06-15T13:59:40+00:00" }, { "name": "drush-ops/behat-drush-endpoint", @@ -5662,16 +7086,16 @@ }, { "name": "instaclick/php-webdriver", - "version": "1.4.3", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/instaclick/php-webdriver.git", - "reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb" + "reference": "6fa959452e774dcaed543faad3a9d1a37d803327" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/0c20707dcf30a32728fd6bdeeab996c887fdb2fb", - "reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb", + "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/6fa959452e774dcaed543faad3a9d1a37d803327", + "reference": "6fa959452e774dcaed543faad3a9d1a37d803327", "shasum": "" }, "require": { @@ -5679,7 +7103,8 @@ "php": ">=5.3.2" }, "require-dev": { - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^4.8", + "satooshi/php-coveralls": "^1.0||^2.0" }, "type": "library", "extra": { @@ -5716,20 +7141,20 @@ "webdriver", "webtest" ], - "time": "2015-06-15T20:19:33+00:00" + "time": "2017-06-30T04:02:48+00:00" }, { "name": "jcalderonzumba/gastonjs", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/jcalderonzumba/gastonjs.git", - "reference": "4d7fe5f8a92f247bafa618189ea0fb60f82fb7ff" + "reference": "575a9c18d8b87990c37252e8d9707b29f0a313f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jcalderonzumba/gastonjs/zipball/4d7fe5f8a92f247bafa618189ea0fb60f82fb7ff", - "reference": "4d7fe5f8a92f247bafa618189ea0fb60f82fb7ff", + "url": "https://api.github.com/repos/jcalderonzumba/gastonjs/zipball/575a9c18d8b87990c37252e8d9707b29f0a313f3", + "reference": "575a9c18d8b87990c37252e8d9707b29f0a313f3", "shasum": "" }, "require": { @@ -5773,7 +7198,7 @@ "headless", "phantomjs" ], - "time": "2016-11-10T11:26:43+00:00" + "time": "2017-03-31T07:31:47+00:00" }, { "name": "jcalderonzumba/mink-phantomjs-driver", @@ -6214,16 +7639,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.35", + "version": "4.8.36", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", "shasum": "" }, "require": { @@ -6282,7 +7707,7 @@ "testing", "xunit" ], - "time": "2017-02-06T05:18:07+00:00" + "time": "2017-06-21T08:07:12+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -6455,23 +7880,23 @@ }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -6503,7 +7928,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08T07:14:41+00:00" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -6763,16 +8188,16 @@ }, { "name": "symfony/browser-kit", - "version": "v3.2.8", + "version": "v3.3.4", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57" + "reference": "3a4435e79a8401746e8525e98039199d0924b4e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9fab1ab6f77b77f3df5fc5250fc6956811699b57", - "reference": "9fab1ab6f77b77f3df5fc5250fc6956811699b57", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/3a4435e79a8401746e8525e98039199d0924b4e5", + "reference": "3a4435e79a8401746e8525e98039199d0924b4e5", "shasum": "" }, "require": { @@ -6789,7 +8214,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -6816,12 +8241,13 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:13:17+00:00" + "time": "2017-06-24T09:29:48+00:00" } ], "aliases": [], - "minimum-stability": "alpha", + "minimum-stability": "dev", "stability-flags": { + "contentacms/contenta_jsonapi": 20, "drupal/simple_block": 10 }, "prefer-stable": true, From b4e69ffc24766a195ee618d9a0524a3bdebccbed Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 7 Jul 2017 15:29:39 -0700 Subject: [PATCH 03/20] Config sync directory needs to point at the Contenta location for installation to work. --- web/sites/default/settings.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index afe20c4af..fb13605ea 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -23,6 +23,13 @@ CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', ); +// Contenta configuration: +// Ideally, we keep our config export in ../config, but it needs to +// be here at first so that installation will work. +// TODO: Better strategy going forward to support both installation and +// relocated configuration directory. +$config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync'; + /** * If there is a local settings file, then include it */ From 85de396cc24368dab147daebeb31e84b0a3dccfd Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 12 Jul 2017 13:49:42 -0700 Subject: [PATCH 04/20] Try pulling some tricks with Contenta installation and configuration. --- web/sites/default/settings.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index fb13605ea..67466c0e9 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -23,12 +23,15 @@ CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', ); -// Contenta configuration: -// Ideally, we keep our config export in ../config, but it needs to -// be here at first so that installation will work. -// TODO: Better strategy going forward to support both installation and -// relocated configuration directory. -$config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync'; +// Check to see if we are serving an installer page. +$is_installer_url = (strpos($_SERVER['SCRIPT_NAME'], '/core/install.php') === 0); +if ($is_installer_url && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY] . '/system.site.yml')) { + // Contenta configuration: + // Ideally, we keep our config export in ../config, but it needs to + // be here at first so that installation will work. + // TODO: Better strategy going forward for this. + $config_directories[CONFIG_SYNC_DIRECTORY] = 'profiles/contrib/contenta_jsonapi/config/sync'; +} /** * If there is a local settings file, then include it @@ -39,9 +42,6 @@ } /** - * Always install the 'standard' profile to stop the installer from - * modifying settings.php. - * - * See: tests/installer-features/installer.feature + * We are going to install the contenta_jsonapi profile. */ $settings['install_profile'] = 'contenta_jsonapi'; From cd1ae813aab26a58f94a8695ea69e6d13f2b817d Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 14 Jul 2017 09:10:00 -0700 Subject: [PATCH 05/20] Also special-case installation via CLI. --- web/sites/default/settings.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 67466c0e9..cf3fb0145 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -23,8 +23,15 @@ CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', ); -// Check to see if we are serving an installer page. +// Check to see if we are serving an installer page from the web server. $is_installer_url = (strpos($_SERVER['SCRIPT_NAME'], '/core/install.php') === 0); +// Also check to see if we are calling the installer from a cli (e.g. Drush) +if (php_sapi_name() == 'cli') { + global $install_state; + if (isset(($install_state))) { + $is_installer_url = true; + } +} if ($is_installer_url && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY] . '/system.site.yml')) { // Contenta configuration: // Ideally, we keep our config export in ../config, but it needs to From bc5aab58dd1fc886a6865d0aeb7e8438f2d192aa Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Wed, 30 Aug 2017 13:40:21 -0700 Subject: [PATCH 06/20] Remove composer.lock, so that each install will get the latest dev build of Contenta. This will not always result in stable results, but since Contenta is evolving rapidly, perhaps this is the best for now. This would work better if we had stable releases of Contenta available, so that we could put ^1 in our composer.json, for example. --- composer.lock | 8257 ------------------------------------------------- 1 file changed, 8257 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 743461057..000000000 --- a/composer.lock +++ /dev/null @@ -1,8257 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "content-hash": "018a978a792dd5378c508b31eee6beec", - "packages": [ - { - "name": "alchemy/zippy", - "version": "0.4.3", - "source": { - "type": "git", - "url": "https://github.com/alchemy-fr/Zippy.git", - "reference": "5ffdc93de0af2770d396bf433d8b2667c77277ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/Zippy/zipball/5ffdc93de0af2770d396bf433d8b2667c77277ea", - "reference": "5ffdc93de0af2770d396bf433d8b2667c77277ea", - "shasum": "" - }, - "require": { - "doctrine/collections": "~1.0", - "ext-mbstring": "*", - "php": ">=5.5", - "symfony/filesystem": "^2.0.5|^3.0", - "symfony/process": "^2.1|^3.0" - }, - "require-dev": { - "ext-zip": "*", - "guzzle/guzzle": "~3.0", - "guzzlehttp/guzzle": "^6.0", - "phpunit/phpunit": "^4.0|^5.0", - "symfony/finder": "^2.0.5|^3.0" - }, - "suggest": { - "ext-zip": "To use the ZipExtensionAdapter", - "guzzle/guzzle": "To use the GuzzleTeleporter with Guzzle 3", - "guzzlehttp/guzzle": "To use the GuzzleTeleporter with Guzzle 6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Alchemy\\Zippy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alchemy", - "email": "dev.team@alchemy.fr", - "homepage": "http://www.alchemy.fr/" - } - ], - "description": "Zippy, the archive manager companion", - "keywords": [ - "bzip", - "compression", - "tar", - "zip" - ], - "time": "2016-11-03T16:10:31+00:00" - }, - { - "name": "asm89/stack-cors", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/asm89/stack-cors.git", - "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/3ae8ef219bb4c9a6caf857421719aa07fa7776cc", - "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/http-foundation": "~2.1|~3.0", - "symfony/http-kernel": "~2.1|~3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Asm89\\Stack": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexander", - "email": "iam.asm89@gmail.com" - } - ], - "description": "Cross-origin resource sharing library and stack middleware", - "homepage": "https://github.com/asm89/stack-cors", - "keywords": [ - "cors", - "stack" - ], - "time": "2016-08-01T12:05:04+00:00" - }, - { - "name": "composer/installers", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/composer/installers.git", - "reference": "d78064c68299743e0161004f2de3a0204e33b804" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804", - "reference": "d78064c68299743e0161004f2de3a0204e33b804", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0" - }, - "replace": { - "roundcube/plugin-installer": "*", - "shama/baton": "*" - }, - "require-dev": { - "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" - }, - "type": "composer-plugin", - "extra": { - "class": "Composer\\Installers\\Plugin", - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Installers\\": "src/Composer/Installers" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kyle Robinson Young", - "email": "kyle@dontkry.com", - "homepage": "https://github.com/shama" - } - ], - "description": "A multi-framework Composer library installer", - "homepage": "https://composer.github.io/installers/", - "keywords": [ - "Craft", - "Dolibarr", - "Hurad", - "ImageCMS", - "MODX Evo", - "Mautic", - "OXID", - "Plentymarkets", - "RadPHP", - "SMF", - "Thelia", - "WolfCMS", - "agl", - "aimeos", - "annotatecms", - "attogram", - "bitrix", - "cakephp", - "chef", - "cockpit", - "codeigniter", - "concrete5", - "croogo", - "dokuwiki", - "drupal", - "elgg", - "expressionengine", - "fuelphp", - "grav", - "installer", - "joomla", - "kohana", - "laravel", - "lithium", - "magento", - "mako", - "mediawiki", - "modulework", - "moodle", - "phpbb", - "piwik", - "ppi", - "puppet", - "reindex", - "roundcube", - "shopware", - "silverstripe", - "symfony", - "typo3", - "wordpress", - "yawik", - "zend", - "zikula" - ], - "time": "2016-08-13T20:53:52+00:00" - }, - { - "name": "composer/semver", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", - "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5", - "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "time": "2016-08-30T16:08:34+00:00" - }, - { - "name": "consolidation/annotated-command", - "version": "2.4.8", - "source": { - "type": "git", - "url": "https://github.com/consolidation/annotated-command.git", - "reference": "6672ea38212f8bffb71fec7eadc8b3372154b17e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/6672ea38212f8bffb71fec7eadc8b3372154b17e", - "reference": "6672ea38212f8bffb71fec7eadc8b3372154b17e", - "shasum": "" - }, - "require": { - "consolidation/output-formatters": "^3.1.5", - "php": ">=5.4.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "psr/log": "^1", - "symfony/console": "^2.8|~3", - "symfony/event-dispatcher": "^2.5|^3", - "symfony/finder": "^2.5|^3" - }, - "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "^2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Consolidation\\AnnotatedCommand\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Greg Anderson", - "email": "greg.1.anderson@greenknowe.org" - } - ], - "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2017-04-03T22:37:00+00:00" - }, - { - "name": "consolidation/output-formatters", - "version": "3.1.10", - "source": { - "type": "git", - "url": "https://github.com/consolidation/output-formatters.git", - "reference": "3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a", - "reference": "3872f19517bfc9da0e14c9e5b6fe0f8c7439ea3a", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "symfony/console": "^2.8|~3", - "symfony/finder": "~2.5|~3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "^2.7", - "victorjonsson/markdowndocs": "^1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Consolidation\\OutputFormatters\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Greg Anderson", - "email": "greg.1.anderson@greenknowe.org" - } - ], - "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2017-06-06T19:08:54+00:00" - }, - { - "name": "contentacms/contenta_jsonapi", - "version": "dev-8.x-1.x", - "source": { - "type": "git", - "url": "https://github.com/contentacms/contenta_jsonapi.git", - "reference": "b4f6abf06bbda854b68f9008660493193da81aca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/contentacms/contenta_jsonapi/zipball/b4f6abf06bbda854b68f9008660493193da81aca", - "reference": "b4f6abf06bbda854b68f9008660493193da81aca", - "shasum": "" - }, - "require": { - "composer/installers": "^1.0", - "cweagans/composer-patches": "~1.0", - "drupal/core": "^8.3.4", - "drupal/dropzonejs": "^1.0@alpha", - "drupal/entity_browser": "^1.0", - "drupal/fieldable_path": "^1.0", - "drupal/jsonapi": "^1.0", - "drupal/jsonapi_extras": "^1.0", - "drupal/material_admin": "1.x-dev", - "drupal/materialize": "1.x-dev", - "drupal/media_entity": "^1.6", - "drupal/media_entity_image": "^1.2", - "drupal/openapi": "^1.0@alpha", - "drupal/remote_stream_wrapper": "1.0", - "drupal/schemata": "^1.0@alpha", - "drupal/simple_oauth": "^2.0", - "drupal/subrequests": "^1.0", - "webflo/drupal-core-strict": "8.3.4" - }, - "require-dev": { - "burdamagazinorg/thunder-dev-tools": "dev-master", - "drupal/coder": "^8.2", - "drupal/config_inspector": "1.x-dev", - "drupal/features": "^3.5" - }, - "type": "drupal-profile", - "extra": { - "installer-paths": { - "web/core": [ - "type:drupal-core" - ], - "web/modules/contrib/{$name}": [ - "type:drupal-module" - ], - "web/libraries/{$name}": [ - "type:drupal-library" - ], - "web/profiles/contrib/{$name}": [ - "type:drupal-profile" - ], - "web/themes/contrib/{$name}": [ - "type:drupal-theme" - ], - "drush/contrib/{$name}": [ - "type:drupal-drush" - ] - }, - "patches": { - "drupal/core": { - "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/2788777-33.patch" - }, - "drupal/remote_stream_wrapper": { - "Module installation fails when shipped as part of an install profile": "https://www.drupal.org/files/issues/2886691-2.patch" - }, - "asm89/stack-cors": { - "Add origin matcher for wildcard matching": "https://patch-diff.githubusercontent.com/raw/asm89/stack-cors/pull/42.patch", - "Do not modify request with same origin": "https://github.com/asm89/stack-cors/commit/6daf5757971173b79ddabbd755d59d333c278f42.patch" - } - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "time": "2017-07-06T21:18:12+00:00" - }, - { - "name": "cweagans/composer-patches", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/cweagans/composer-patches.git", - "reference": "b3036f23b73570ab5d869e345277786c8eb248a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweagans/composer-patches/zipball/b3036f23b73570ab5d869e345277786c8eb248a9", - "reference": "b3036f23b73570ab5d869e345277786c8eb248a9", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": ">=5.3.0" - }, - "require-dev": { - "composer/composer": "~1.0", - "phpunit/phpunit": "~4.6" - }, - "type": "composer-plugin", - "extra": { - "class": "cweagans\\Composer\\Patches" - }, - "autoload": { - "psr-4": { - "cweagans\\Composer\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Cameron Eagans", - "email": "me@cweagans.net" - } - ], - "description": "Provides a way to patch Composer packages.", - "time": "2017-03-19T18:18:52+00:00" - }, - { - "name": "defuse/php-encryption", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/defuse/php-encryption.git", - "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", - "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "paragonie/random_compat": "~2.0", - "php": ">=5.4.0" - }, - "require-dev": { - "nikic/php-parser": "^2.0|^3.0", - "phpunit/phpunit": "^4|^5" - }, - "bin": [ - "bin/generate-defuse-key" - ], - "type": "library", - "autoload": { - "psr-4": { - "Defuse\\Crypto\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Hornby", - "email": "taylor@defuse.ca", - "homepage": "https://defuse.ca/" - }, - { - "name": "Scott Arciszewski", - "email": "info@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "Secure PHP Encryption Library", - "keywords": [ - "aes", - "authenticated encryption", - "cipher", - "crypto", - "cryptography", - "encrypt", - "encryption", - "openssl", - "security", - "symmetric key cryptography" - ], - "time": "2017-05-18T21:28:48+00:00" - }, - { - "name": "dflydev/dot-access-configuration", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/dflydev/dflydev-dot-access-configuration.git", - "reference": "9b65c83159c9003e00284ea1144ad96b69d9c8b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-configuration/zipball/9b65c83159c9003e00284ea1144ad96b69d9c8b9", - "reference": "9b65c83159c9003e00284ea1144ad96b69d9c8b9", - "shasum": "" - }, - "require": { - "dflydev/dot-access-data": "1.*", - "dflydev/placeholder-resolver": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "symfony/yaml": "~2.1" - }, - "suggest": { - "symfony/yaml": "Required for using the YAML Configuration Builders" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Dflydev\\DotAccessConfiguration": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dragonfly Development Inc.", - "email": "info@dflydev.com", - "homepage": "http://dflydev.com" - }, - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - } - ], - "description": "Given a deep data structure representing a configuration, access configuration by dot notation.", - "homepage": "https://github.com/dflydev/dflydev-dot-access-configuration", - "keywords": [ - "config", - "configuration" - ], - "time": "2014-11-14T03:26:12+00:00" - }, - { - "name": "dflydev/dot-access-data", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", - "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Dflydev\\DotAccessData": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dragonfly Development Inc.", - "email": "info@dflydev.com", - "homepage": "http://dflydev.com" - }, - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - }, - { - "name": "Carlos Frutos", - "email": "carlos@kiwing.it", - "homepage": "https://github.com/cfrutos" - } - ], - "description": "Given a deep data structure, access data by dot notation.", - "homepage": "https://github.com/dflydev/dflydev-dot-access-data", - "keywords": [ - "access", - "data", - "dot", - "notation" - ], - "time": "2017-01-20T21:14:22+00:00" - }, - { - "name": "dflydev/placeholder-resolver", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/dflydev/dflydev-placeholder-resolver.git", - "reference": "c498d0cae91b1bb36cc7d60906dab8e62bb7c356" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-placeholder-resolver/zipball/c498d0cae91b1bb36cc7d60906dab8e62bb7c356", - "reference": "c498d0cae91b1bb36cc7d60906dab8e62bb7c356", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Dflydev\\PlaceholderResolver": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dragonfly Development Inc.", - "email": "info@dflydev.com", - "homepage": "http://dflydev.com" - }, - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - } - ], - "description": "Given a data source representing key => value pairs, resolve placeholders like ${foo.bar} to the value associated with the 'foo.bar' key in the data source.", - "homepage": "https://github.com/dflydev/dflydev-placeholder-resolver", - "keywords": [ - "placeholder", - "resolver" - ], - "time": "2012-10-28T21:08:28+00:00" - }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "0.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "project", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" - }, - { - "name": "doctrine/annotations", - "version": "v1.2.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2015-08-31T12:32:49+00:00" - }, - { - "name": "doctrine/cache", - "version": "v1.6.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", - "shasum": "" - }, - "require": { - "php": "~5.5|~7.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2016-10-29T11:16:17+00:00" - }, - { - "name": "doctrine/collections", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Collections\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Collections Abstraction library", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "array", - "collections", - "iterator" - ], - "time": "2015-04-14T22:21:58+00:00" - }, - { - "name": "doctrine/common", - "version": "v2.6.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", - "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": "~5.5|~7.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8|~5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2016-11-30T16:50:46+00:00" - }, - { - "name": "doctrine/inflector", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", - "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ], - "time": "2015-11-06T14:35:42+00:00" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09T13:34:57+00:00" - }, - { - "name": "drupal-composer/drupal-scaffold", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/drupal-composer/drupal-scaffold.git", - "reference": "1374e1031b98beb502abea3854f361304965c628" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/drupal-composer/drupal-scaffold/zipball/1374e1031b98beb502abea3854f361304965c628", - "reference": "1374e1031b98beb502abea3854f361304965c628", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0.0", - "php": ">=5.4.5" - }, - "require-dev": { - "composer/composer": "dev-master", - "phpunit/phpunit": "^4.4.0" - }, - "type": "composer-plugin", - "extra": { - "class": "DrupalComposer\\DrupalScaffold\\Plugin", - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "DrupalComposer\\DrupalScaffold\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Composer Plugin for updating the Drupal scaffold files when using drupal/core", - "time": "2017-05-05T21:26:28+00:00" - }, - { - "name": "drupal/config_direct_save", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/config_direct_save", - "reference": "8.x-1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/config_direct_save-8.x-1.0.zip", - "reference": "8.x-1.0", - "shasum": "dae776d96310aa01aa6e3c536821a1b496ffae1f" - }, - "require": { - "drupal/core": "~8.0" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0", - "datestamp": "1476108239" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "matio89", - "homepage": "https://www.drupal.org/user/2320090" - } - ], - "description": "This module allow you to export configuration after changes", - "homepage": "https://www.drupal.org/project/config_direct_save", - "support": { - "source": "http://cgit.drupalcode.org/config_direct_save" - } - }, - { - "name": "drupal/config_installer", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/config_installer", - "reference": "8.x-1.4" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/config_installer-8.x-1.4.zip", - "reference": "8.x-1.4", - "shasum": "5371ced3d688f6c932992066fa0d5f44f7d6e7dd" - }, - "require": { - "drupal/core": "~8.0" - }, - "type": "drupal-profile", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.4", - "datestamp": "1488072484" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "alexpott", - "homepage": "https://www.drupal.org/user/157725" - } - ], - "homepage": "https://www.drupal.org/project/config_installer", - "support": { - "source": "http://cgit.drupalcode.org/config_installer" - } - }, - { - "name": "drupal/console", - "version": "1.0.0-rc23", - "source": { - "type": "git", - "url": "https://github.com/hechoendrupal/drupal-console.git", - "reference": "2bac21223573f5fd8c4d7b725baf5d404e406b0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/2bac21223573f5fd8c4d7b725baf5d404e406b0b", - "reference": "2bac21223573f5fd8c4d7b725baf5d404e406b0b", - "shasum": "" - }, - "require": { - "alchemy/zippy": "0.4.3", - "composer/installers": "~1.0", - "doctrine/annotations": "1.2.*", - "doctrine/collections": "1.3.*", - "drupal/console-core": "1.0.0-rc23", - "drupal/console-dotenv": "~0", - "drupal/console-extend-plugin": "~0", - "gabordemooij/redbean": "~4.3", - "guzzlehttp/guzzle": "~6.1", - "php": "^5.5.9 || ^7.0", - "psy/psysh": "0.6.* || ~0.8", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8", - "symfony/http-foundation": "~2.8" - }, - "bin": [ - "bin/drupal" - ], - "type": "project", - "autoload": { - "psr-4": { - "Drupal\\Console\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "David Flores", - "email": "dmousex@gmail.com", - "homepage": "http://dmouse.net" - }, - { - "name": "Jesus Manuel Olivas", - "email": "jesus.olivas@gmail.com", - "homepage": "http://jmolivas.com" - }, - { - "name": "Drupal Console Contributors", - "homepage": "https://github.com/hechoendrupal/DrupalConsole/graphs/contributors" - }, - { - "name": "Eduardo Garcia", - "email": "enzo@enzolutions.com", - "homepage": "http://enzolutions.com/" - }, - { - "name": "Omar Aguirre", - "email": "omersguchigu@gmail.com" - } - ], - "description": "The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.", - "homepage": "http://drupalconsole.com/", - "keywords": [ - "console", - "development", - "drupal", - "symfony" - ], - "time": "2017-06-27T09:27:00+00:00" - }, - { - "name": "drupal/console-core", - "version": "1.0.0-rc23", - "source": { - "type": "git", - "url": "https://github.com/hechoendrupal/drupal-console-core.git", - "reference": "b1f3680ae19a4d00f8b701b060521bab2cccd6b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/b1f3680ae19a4d00f8b701b060521bab2cccd6b1", - "reference": "b1f3680ae19a4d00f8b701b060521bab2cccd6b1", - "shasum": "" - }, - "require": { - "dflydev/dot-access-configuration": "1.0.1", - "drupal/console-en": "1.0.0-rc23", - "php": "^5.5.9 || ^7.0", - "stecman/symfony-console-completion": "~0.7", - "symfony/config": "~2.8", - "symfony/console": "~2.8", - "symfony/debug": "~2.8", - "symfony/dependency-injection": "~2.8", - "symfony/event-dispatcher": "~2.8", - "symfony/filesystem": "~2.8", - "symfony/finder": "~2.8", - "symfony/process": "~2.8", - "symfony/translation": "~2.8", - "symfony/yaml": "~2.8", - "twig/twig": "^1.23.1", - "webflo/drupal-finder": "^0.3.0", - "webmozart/path-util": "^2.3" - }, - "type": "project", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "Drupal\\Console\\Core\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "David Flores", - "email": "dmousex@gmail.com", - "homepage": "http://dmouse.net" - }, - { - "name": "Jesus Manuel Olivas", - "email": "jesus.olivas@gmail.com", - "homepage": "http://jmolivas.com" - }, - { - "name": "Drupal Console Contributors", - "homepage": "https://github.com/hechoendrupal/DrupalConsole/graphs/contributors" - }, - { - "name": "Eduardo Garcia", - "email": "enzo@enzolutions.com", - "homepage": "http://enzolutions.com/" - }, - { - "name": "Omar Aguirre", - "email": "omersguchigu@gmail.com" - } - ], - "description": "Drupal Console Core", - "homepage": "http://drupalconsole.com/", - "keywords": [ - "console", - "development", - "drupal", - "symfony" - ], - "time": "2017-06-27T09:16:56+00:00" - }, - { - "name": "drupal/console-dotenv", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/weknowinc/drupal-console-dotenv.git", - "reference": "94e88646801c2f80ec2e5e66d3d8f21b0b467405" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/weknowinc/drupal-console-dotenv/zipball/94e88646801c2f80ec2e5e66d3d8f21b0b467405", - "reference": "94e88646801c2f80ec2e5e66d3d8f21b0b467405", - "shasum": "" - }, - "require": { - "vlucas/phpdotenv": "^2.3" - }, - "require-dev": { - "drupal/console-core": "~1.0" - }, - "type": "drupal-console-library", - "autoload": { - "psr-4": { - "Drupal\\Console\\Dotenv\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Jesus Manuel Olivas", - "email": "jesus.olivas@gmail.com" - } - ], - "description": "Drupal Console Dotenv", - "time": "2017-07-04T01:14:02+00:00" - }, - { - "name": "drupal/console-en", - "version": "1.0.0-rc23", - "source": { - "type": "git", - "url": "https://github.com/hechoendrupal/drupal-console-en.git", - "reference": "e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220", - "reference": "e2461a8cf8bb29aacae0cf0f8a0a2c8d36ed4220", - "shasum": "" - }, - "type": "drupal-console-language", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "David Flores", - "email": "dmousex@gmail.com", - "homepage": "http://dmouse.net" - }, - { - "name": "Jesus Manuel Olivas", - "email": "jesus.olivas@gmail.com", - "homepage": "http://jmolivas.com" - }, - { - "name": "Drupal Console Contributors", - "homepage": "https://github.com/hechoendrupal/DrupalConsole/graphs/contributors" - }, - { - "name": "Eduardo Garcia", - "email": "enzo@enzolutions.com", - "homepage": "http://enzolutions.com/" - }, - { - "name": "Omar Aguirre", - "email": "omersguchigu@gmail.com" - } - ], - "description": "Drupal Console English Language", - "homepage": "http://drupalconsole.com/", - "keywords": [ - "console", - "development", - "drupal", - "symfony" - ], - "time": "2017-06-22T19:05:23+00:00" - }, - { - "name": "drupal/console-extend-plugin", - "version": "0.9.1", - "source": { - "type": "git", - "url": "https://github.com/hechoendrupal/drupal-console-extend-plugin.git", - "reference": "ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/hechoendrupal/drupal-console-extend-plugin/zipball/ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4", - "reference": "ae2a76680f93c0fea31bbcafc6b0bcc234bb2fb4", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "symfony/finder": ">=2.7 <3.0", - "symfony/yaml": ">=2.7 <3.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Drupal\\Console\\Composer\\Plugin\\Extender" - }, - "autoload": { - "psr-4": { - "Drupal\\Console\\Composer\\Plugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Jesus Manuel Olivas", - "email": "jesus.olivas@gmail.com" - } - ], - "description": "Drupal Console Extend Plugin", - "time": "2017-07-07T05:12:50+00:00" - }, - { - "name": "drupal/core", - "version": "8.3.5", - "source": { - "type": "git", - "url": "https://github.com/drupal/core.git", - "reference": "7adfc8c43615258e242868a393e82971a67be51a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/7adfc8c43615258e242868a393e82971a67be51a", - "reference": "7adfc8c43615258e242868a393e82971a67be51a", - "shasum": "" - }, - "require": { - "asm89/stack-cors": "~1.0", - "composer/semver": "~1.0", - "doctrine/annotations": "1.2.*", - "doctrine/common": "^2.5", - "easyrdf/easyrdf": "0.9.*", - "egulias/email-validator": "1.2.*", - "guzzlehttp/guzzle": "^6.2.1", - "masterminds/html5": "~2.1", - "paragonie/random_compat": "^1.0|^2.0", - "php": ">=5.5.9", - "stack/builder": "1.0.*", - "symfony-cmf/routing": "~1.4", - "symfony/class-loader": "~2.8", - "symfony/console": "~2.8", - "symfony/dependency-injection": "~2.8", - "symfony/event-dispatcher": "~2.8", - "symfony/http-foundation": "~2.8", - "symfony/http-kernel": "~2.8", - "symfony/polyfill-iconv": "~1.0", - "symfony/process": "~2.8", - "symfony/psr-http-message-bridge": "^1.0", - "symfony/routing": "~2.8", - "symfony/serializer": "~2.8", - "symfony/translation": "~2.8", - "symfony/validator": "~2.8", - "symfony/yaml": "~2.8", - "twig/twig": "^1.23.1", - "zendframework/zend-diactoros": "~1.1", - "zendframework/zend-feed": "~2.4" - }, - "conflict": { - "drush/drush": "<8.1.10" - }, - "replace": { - "drupal/action": "self.version", - "drupal/aggregator": "self.version", - "drupal/automated_cron": "self.version", - "drupal/ban": "self.version", - "drupal/bartik": "self.version", - "drupal/basic_auth": "self.version", - "drupal/big_pipe": "self.version", - "drupal/block": "self.version", - "drupal/block_content": "self.version", - "drupal/block_place": "self.version", - "drupal/book": "self.version", - "drupal/breakpoint": "self.version", - "drupal/ckeditor": "self.version", - "drupal/classy": "self.version", - "drupal/color": "self.version", - "drupal/comment": "self.version", - "drupal/config": "self.version", - "drupal/config_translation": "self.version", - "drupal/contact": "self.version", - "drupal/content_moderation": "self.version", - "drupal/content_translation": "self.version", - "drupal/contextual": "self.version", - "drupal/core-annotation": "self.version", - "drupal/core-assertion": "self.version", - "drupal/core-bridge": "self.version", - "drupal/core-datetime": "self.version", - "drupal/core-dependency-injection": "self.version", - "drupal/core-diff": "self.version", - "drupal/core-discovery": "self.version", - "drupal/core-event-dispatcher": "self.version", - "drupal/core-file-cache": "self.version", - "drupal/core-filesystem": "self.version", - "drupal/core-gettext": "self.version", - "drupal/core-graph": "self.version", - "drupal/core-http-foundation": "self.version", - "drupal/core-php-storage": "self.version", - "drupal/core-plugin": "self.version", - "drupal/core-proxy-builder": "self.version", - "drupal/core-render": "self.version", - "drupal/core-serialization": "self.version", - "drupal/core-transliteration": "self.version", - "drupal/core-utility": "self.version", - "drupal/core-uuid": "self.version", - "drupal/datetime": "self.version", - "drupal/datetime_range": "self.version", - "drupal/dblog": "self.version", - "drupal/dynamic_page_cache": "self.version", - "drupal/editor": "self.version", - "drupal/entity_reference": "self.version", - "drupal/field": "self.version", - "drupal/field_layout": "self.version", - "drupal/field_ui": "self.version", - "drupal/file": "self.version", - "drupal/filter": "self.version", - "drupal/forum": "self.version", - "drupal/hal": "self.version", - "drupal/help": "self.version", - "drupal/history": "self.version", - "drupal/image": "self.version", - "drupal/inline_form_errors": "self.version", - "drupal/language": "self.version", - "drupal/layout_discovery": "self.version", - "drupal/link": "self.version", - "drupal/locale": "self.version", - "drupal/menu_link_content": "self.version", - "drupal/menu_ui": "self.version", - "drupal/migrate": "self.version", - "drupal/migrate_drupal": "self.version", - "drupal/migrate_drupal_ui": "self.version", - "drupal/minimal": "self.version", - "drupal/node": "self.version", - "drupal/options": "self.version", - "drupal/outside_in": "self.version", - "drupal/page_cache": "self.version", - "drupal/path": "self.version", - "drupal/quickedit": "self.version", - "drupal/rdf": "self.version", - "drupal/responsive_image": "self.version", - "drupal/rest": "self.version", - "drupal/search": "self.version", - "drupal/serialization": "self.version", - "drupal/seven": "self.version", - "drupal/shortcut": "self.version", - "drupal/simpletest": "self.version", - "drupal/standard": "self.version", - "drupal/stark": "self.version", - "drupal/statistics": "self.version", - "drupal/syslog": "self.version", - "drupal/system": "self.version", - "drupal/taxonomy": "self.version", - "drupal/telephone": "self.version", - "drupal/text": "self.version", - "drupal/toolbar": "self.version", - "drupal/tour": "self.version", - "drupal/tracker": "self.version", - "drupal/update": "self.version", - "drupal/user": "self.version", - "drupal/views": "self.version", - "drupal/views_ui": "self.version", - "drupal/workflows": "self.version" - }, - "require-dev": { - "behat/mink": "1.7.x-dev", - "behat/mink-goutte-driver": "~1.2", - "drupal/coder": "8.2.12", - "jcalderonzumba/gastonjs": "~1.0.2", - "jcalderonzumba/mink-phantomjs-driver": "~0.3.1", - "mikey179/vfsstream": "~1.2", - "phpunit/phpunit": ">=4.8.28 <5", - "symfony/browser-kit": ">=2.8.13 <3.0", - "symfony/css-selector": "~2.8" - }, - "type": "drupal-core", - "extra": { - "patches_applied": { - "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/2788777-33.patch" - } - }, - "autoload": { - "psr-4": { - "Drupal\\Core\\": "lib/Drupal/Core", - "Drupal\\Component\\": "lib/Drupal/Component", - "Drupal\\Driver\\": "../drivers/lib/Drupal/Driver" - }, - "classmap": [ - "lib/Drupal.php", - "lib/Drupal/Component/Utility/Timer.php", - "lib/Drupal/Component/Utility/Unicode.php", - "lib/Drupal/Core/Database/Database.php", - "lib/Drupal/Core/DrupalKernel.php", - "lib/Drupal/Core/DrupalKernelInterface.php", - "lib/Drupal/Core/Site/Settings.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2017-07-05T17:03:07+00:00" - }, - { - "name": "drupal/dropzonejs", - "version": "1.0.0-alpha7", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/dropzonejs", - "reference": "8.x-1.0-alpha7" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/dropzonejs-8.x-1.0-alpha7.zip", - "reference": null, - "shasum": "62fc6d46cee1d5fa9885bab3e65b3638172311f6" - }, - "require": { - "drupal/core": "*" - }, - "require-dev": { - "drupal/entity_browser": "*" - }, - "suggest": { - "enyo/dropzone": "Required to user drupal/dropzonejs. Dropzone is an easy to use drag'n'drop library." - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha7", - "datestamp": "1495200183" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Janez Urevc", - "homepage": "https://drupal.org/u/slashrsm", - "role": "Maintainer" - }, - { - "name": "Christian Fritsch", - "homepage": "https://drupal.org/u/chrfritsch", - "role": "Maintainer" - }, - { - "name": "Primoz Hmeljak", - "homepage": "https://drupal.org/u/Primsi", - "role": "Maintainer" - }, - { - "name": "See other contributors", - "homepage": "https://www.drupal.org/node/1998478/committers", - "role": "contributor" - }, - { - "name": "slashrsm", - "homepage": "https://www.drupal.org/user/744628" - }, - { - "name": "wouters_f", - "homepage": "https://www.drupal.org/user/721548" - }, - { - "name": "zkday", - "homepage": "https://www.drupal.org/user/888644" - } - ], - "description": "Drupal integration for DropzoneJS - An open source library that provides drag’n’drop file uploads with image previews.", - "homepage": "https://www.drupal.org/project/dropzonejs", - "keywords": [ - "DropzoneJS", - "Drupal" - ], - "support": { - "source": "https://www.drupal.org/project/dropzonejs", - "issues": "https://www.drupal.org/project/issues/dropzonejs", - "irc": "irc://irc.freenode.org/drupal-contribute" - } - }, - { - "name": "drupal/entity", - "version": "1.0.0-alpha4", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/entity", - "reference": "8.x-1.0-alpha4" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity-8.x-1.0-alpha4.zip", - "reference": null, - "shasum": "c081d3757c159dfee74c9e5acb63bdee81c42e18" - }, - "require": { - "drupal/core": "~8.1" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha4", - "datestamp": "1481194983" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Berdir", - "homepage": "https://www.drupal.org/user/214652" - }, - { - "name": "bojanz", - "homepage": "https://www.drupal.org/user/86106" - }, - { - "name": "dawehner", - "homepage": "https://www.drupal.org/user/99340" - }, - { - "name": "dixon_", - "homepage": "https://www.drupal.org/user/239911" - }, - { - "name": "fago", - "homepage": "https://www.drupal.org/user/16747" - } - ], - "description": "Provides expanded entity APIs, which will be moved to Drupal core one day.", - "homepage": "http://drupal.org/project/entity", - "support": { - "source": "http://cgit.drupalcode.org/entity" - } - }, - { - "name": "drupal/entity_browser", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/entity_browser", - "reference": "8.x-1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_browser-8.x-1.0.zip", - "reference": null, - "shasum": "6bd7bbcda1eebacc3685e9edaad2ad29b525b2ad" - }, - "require": { - "drupal/core": "~8.0" - }, - "require-dev": { - "drupal/ctools": "*", - "drupal/inline_entity_form": "*", - "drupal/media_entity": "*", - "drupal/paragraphs": "*", - "drupal/token": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev", - "dev-8.x-1.x": "8.1.x-dev" - }, - "drupal": { - "version": "8.x-1.0", - "datestamp": "1492678144" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Janez Urevc", - "homepage": "https://github.com/slashrsm", - "role": "Maintainer" - }, - { - "name": "Primoz Hmeljak", - "homepage": "https://github.com/primsi", - "role": "Maintainer" - }, - { - "name": "See other contributors", - "homepage": "https://www.drupal.org/node/1943336/committers", - "role": "contributor" - }, - { - "name": "Primsi", - "homepage": "https://www.drupal.org/user/282629" - }, - { - "name": "marcingy", - "homepage": "https://www.drupal.org/user/77320" - }, - { - "name": "samuel.mortenson", - "homepage": "https://www.drupal.org/user/2582268" - }, - { - "name": "slashrsm", - "homepage": "https://www.drupal.org/user/744628" - } - ], - "description": "Entity browsing and selecting component.", - "homepage": "http://drupal.org/project/entity_browser", - "support": { - "source": "http://cgit.drupalcode.org/entity_browser", - "issues": "http://drupal.org/project/issues/entity_browser", - "irc": "irc://irc.freenode.org/drupal-contribute" - } - }, - { - "name": "drupal/fieldable_path", - "version": "1.0.0-rc4", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/fieldable_path", - "reference": "8.x-1.0-rc4" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/fieldable_path-8.x-1.0-rc4.zip", - "reference": null, - "shasum": "2082a6818668d8e4f51f62d7b0abb155ff2304da" - }, - "require": { - "drupal/core": "*" - }, - "require-dev": { - "drupal/pathauto": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-rc4", - "datestamp": "1495283883" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Spleshka", - "homepage": "https://www.drupal.org/user/810676" - } - ], - "description": "Provides a fieldable mirror of \"path\" property for entities.", - "homepage": "https://www.drupal.org/project/fieldable_path", - "support": { - "source": "http://cgit.drupalcode.org/fieldable_path" - } - }, - { - "name": "drupal/jsonapi", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/jsonapi", - "reference": "8.x-1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/jsonapi-8.x-1.0.zip", - "reference": null, - "shasum": "d5bdd22561a6283f7e5ff06635c9d85248927f73" - }, - "require": { - "drupal/core": "^8.2" - }, - "require-dev": { - "justinrainbow/json-schema": "^4.1" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0", - "datestamp": "1493755084" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "dawehner", - "homepage": "https://www.drupal.org/user/99340" - }, - { - "name": "e0ipso", - "homepage": "https://www.drupal.org/user/550110" - }, - { - "name": "gabesullice", - "homepage": "https://www.drupal.org/user/2287430" - } - ], - "description": "Provides a JSON API standards-compliant API for accessing and manipulating Drupal content and configuration entities.", - "homepage": "https://www.drupal.org/project/jsonapi", - "support": { - "source": "http://cgit.drupalcode.org/jsonapi" - } - }, - { - "name": "drupal/jsonapi_extras", - "version": "dev-1.x", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/jsonapi_extras", - "reference": "9a67e446b21791414cada55fe92ec5c049cdd43b" - }, - "require": { - "drupal/core": "~8.0", - "drupal/jsonapi": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.x-dev", - "datestamp": "1499061843" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "e0ipso", - "homepage": "https://www.drupal.org/user/550110" - } - ], - "description": "Builds on top of JSON API to deliver extra functionality.", - "homepage": "https://www.drupal.org/project/jsonapi_extras", - "support": { - "source": "http://cgit.drupalcode.org/jsonapi_extras" - }, - "time": "2017-07-03 06:08:14" - }, - { - "name": "drupal/material_admin", - "version": "dev-1.x", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/material_admin", - "reference": "ac5e85cc6a85ae66911f3270bdfa7b21031d7b21" - }, - "require": { - "drupal/core": "~8.0" - }, - "type": "drupal-theme", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.x-dev", - "datestamp": "1499432342" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Bcwald", - "homepage": "https://www.drupal.org/user/215794" - }, - { - "name": "samuel.mortenson", - "homepage": "https://www.drupal.org/user/2582268" - } - ], - "homepage": "https://www.drupal.org/project/material_admin", - "support": { - "source": "http://cgit.drupalcode.org/material_admin" - }, - "time": "2017-07-07 14:09:03" - }, - { - "name": "drupal/materialize", - "version": "dev-1.x", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/materialize", - "reference": "449e842d9076316715bd07349e134ff519acf0a6" - }, - "require": { - "drupal/core": "~8.0" - }, - "type": "drupal-theme", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha1+66-dev", - "datestamp": "1492876743" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Archual", - "homepage": "https://www.drupal.org/user/3357566" - }, - { - "name": "Denes.Szabo", - "homepage": "https://www.drupal.org/user/582668" - }, - { - "name": "Mukeysh", - "homepage": "https://www.drupal.org/user/1557576" - }, - { - "name": "asrob", - "homepage": "https://www.drupal.org/user/105777" - } - ], - "homepage": "https://www.drupal.org/project/materialize", - "support": { - "source": "http://cgit.drupalcode.org/materialize" - }, - "time": "2017-04-22 16:04:19" - }, - { - "name": "drupal/media_entity", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/media_entity", - "reference": "8.x-1.6" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/media_entity-8.x-1.6.zip", - "reference": null, - "shasum": "86fd1478f2448c034660faa30ef34c0e8519fecb" - }, - "require": { - "drupal/core": "~8.1", - "drupal/entity": "^1.0.0-alpha3" - }, - "require-dev": { - "drupal/entity": "*", - "drupal/inline_entity_form": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.6", - "datestamp": "1480363983" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Berdir", - "homepage": "https://www.drupal.org/user/214652" - }, - { - "name": "Dave Reid", - "homepage": "https://www.drupal.org/user/53892" - }, - { - "name": "Drupal Media Team", - "homepage": "https://www.drupal.org/user/3260690" - }, - { - "name": "Drupal media CI", - "homepage": "https://www.drupal.org/user/3057985" - }, - { - "name": "Primsi", - "homepage": "https://www.drupal.org/user/282629" - }, - { - "name": "boztek", - "homepage": "https://www.drupal.org/user/134410" - }, - { - "name": "chr.fritsch", - "homepage": "https://www.drupal.org/user/2103716" - }, - { - "name": "jcisio", - "homepage": "https://www.drupal.org/user/210762" - }, - { - "name": "katzilla", - "homepage": "https://www.drupal.org/user/260398" - }, - { - "name": "phenaproxima", - "homepage": "https://www.drupal.org/user/205645" - }, - { - "name": "seanB", - "homepage": "https://www.drupal.org/user/545912" - }, - { - "name": "slashrsm", - "homepage": "https://www.drupal.org/user/744628" - } - ], - "description": "Provides a lean and simple way to store media on Drupal 8 sites.", - "homepage": "https://www.drupal.org/project/media_entity", - "keywords": [ - "Drupal" - ], - "support": { - "source": "https://www.drupal.org/project/media_entity", - "issues": "https://www.drupal.org/project/issues/media_entity" - } - }, - { - "name": "drupal/media_entity_image", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/media_entity_image", - "reference": "8.x-1.2" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/media_entity_image-8.x-1.2.zip", - "reference": null, - "shasum": "d02d1d793a50ea3b9cb5a3219472fdd27980f4f3" - }, - "require": { - "drupal/core": "~8.1", - "drupal/media_entity": "~1.0 || ~8.1.0" - }, - "require-dev": { - "drupal/entity_browser": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.2", - "datestamp": "1470170939" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Drupal Media Team", - "homepage": "https://www.drupal.org/user/3260690" - }, - { - "name": "Primsi", - "homepage": "https://www.drupal.org/user/282629" - }, - { - "name": "slashrsm", - "homepage": "https://www.drupal.org/user/744628" - } - ], - "description": "Local images integration for Drupal Media entity.", - "homepage": "https://www.drupal.org/project/media_entity_image", - "keywords": [ - "Drupal", - "image", - "media" - ], - "support": { - "source": "https://www.drupal.org/project/media_entity_image", - "issues": "https://www.drupal.org/project/issues/media_entity_image" - } - }, - { - "name": "drupal/openapi", - "version": "1.0.0-alpha1", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/openapi", - "reference": "8.x-1.0-alpha1" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/openapi-8.x-1.0-alpha1.zip", - "reference": null, - "shasum": "580e244c5a53419e95dfb8c7b7b9c67273b8e9b9" - }, - "require": { - "drupal/core": "~8.0", - "drupal/schemata": "^1.0", - "drupal/schemata_json_schema": "*" - }, - "require-dev": { - "drupal/jsonapi": "1.0" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha1", - "datestamp": "1498657743" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "mrjmd", - "homepage": "https://www.drupal.org/user/1800446" - }, - { - "name": "rogierbom", - "homepage": "https://www.drupal.org/user/1352176" - }, - { - "name": "tedbow", - "homepage": "https://www.drupal.org/user/240860" - } - ], - "description": "Creates OpenAPI specification for Drupal REST resources.", - "homepage": "https://www.drupal.org/project/openapi", - "keywords": [ - "Drupal" - ], - "support": { - "source": "http://cgit.drupalcode.org/openapi", - "issues": "http://drupal.org/project/issues/openapi" - } - }, - { - "name": "drupal/remote_stream_wrapper", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/remote_stream_wrapper", - "reference": "8.x-1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/remote_stream_wrapper-8.x-1.0.zip", - "reference": null, - "shasum": "442094c0a6c097b5d7d757a9c17a6006f2618caa" - }, - "require": { - "drupal/core": "~8.0" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0", - "datestamp": "1471532939" - }, - "patches_applied": { - "Module installation fails when shipped as part of an install profile": "https://www.drupal.org/files/issues/2886691-2.patch" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Dave Reid", - "homepage": "https://www.drupal.org/user/53892" - }, - { - "name": "arthurf", - "homepage": "https://www.drupal.org/user/27259" - }, - { - "name": "becw", - "homepage": "https://www.drupal.org/user/81067" - } - ], - "description": "Provides the ability to use external files over HTTP", - "homepage": "https://www.drupal.org/project/remote_stream_wrapper", - "support": { - "source": "http://cgit.drupalcode.org/remote_stream_wrapper" - } - }, - { - "name": "drupal/schemata", - "version": "1.0.0-alpha2", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/schemata", - "reference": "8.x-1.0-alpha2" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/schemata-8.x-1.0-alpha2.zip", - "reference": null, - "shasum": "25c350188a7fff372582d468d6fed41425a933d1" - }, - "require": { - "drupal/core": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha2", - "datestamp": "1498495443" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Grayside", - "homepage": "https://www.drupal.org/user/346868" - }, - { - "name": "HalfChem", - "homepage": "https://www.drupal.org/user/1608382" - }, - { - "name": "febbraro", - "homepage": "https://www.drupal.org/user/43670" - }, - { - "name": "jhedstrom", - "homepage": "https://www.drupal.org/user/208732" - }, - { - "name": "pcho", - "homepage": "https://www.drupal.org/user/1619590" - }, - { - "name": "srjosh", - "homepage": "https://www.drupal.org/user/165878" - }, - { - "name": "tekante", - "homepage": "https://www.drupal.org/user/640024" - } - ], - "description": "Provide schema definitions of Drupal entities for type validation, code generation, and documentation.", - "homepage": "https://www.drupal.org/project/schemata", - "support": { - "source": "http://cgit.drupalcode.org/schemata" - } - }, - { - "name": "drupal/schemata_json_schema", - "version": "1.0.0-alpha2", - "require": { - "drupal/core": "~8.0", - "drupal/schemata": "self.version" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-alpha2", - "datestamp": "1498495443" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Grayside", - "homepage": "https://www.drupal.org/user/346868" - }, - { - "name": "HalfChem", - "homepage": "https://www.drupal.org/user/1608382" - }, - { - "name": "febbraro", - "homepage": "https://www.drupal.org/user/43670" - }, - { - "name": "jhedstrom", - "homepage": "https://www.drupal.org/user/208732" - }, - { - "name": "pcho", - "homepage": "https://www.drupal.org/user/1619590" - }, - { - "name": "srjosh", - "homepage": "https://www.drupal.org/user/165878" - }, - { - "name": "tekante", - "homepage": "https://www.drupal.org/user/640024" - } - ], - "description": "Provides a data models for entity types and bundles in JSON schema format.", - "homepage": "https://www.drupal.org/project/schemata", - "support": { - "source": "http://cgit.drupalcode.org/schemata" - } - }, - { - "name": "drupal/simple_block", - "version": "1.0.0-beta1", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/simple_block", - "reference": "8.x-1.0-beta1" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_block-8.x-1.0-beta1.zip", - "reference": null, - "shasum": "3a3555e580993ee1600b6e2eb01ab481ff8d9caa" - }, - "require": { - "drupal/core": "*" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-beta1", - "datestamp": "1485418683" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "claudiu.cristea", - "homepage": "https://www.drupal.org/user/56348" - } - ], - "description": "Provides simple title/content custom blocks stored as config entities and not as content entities.", - "homepage": "https://www.drupal.org/project/simple_block", - "support": { - "source": "http://cgit.drupalcode.org/simple_block" - } - }, - { - "name": "drupal/simple_oauth", - "version": "2.0.0-rc3", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/simple_oauth", - "reference": "8.x-2.0-rc3" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_oauth-8.x-2.0-rc3.zip", - "reference": null, - "shasum": "a672216d3f3ceb13f7b2840cf466169d546f67e2" - }, - "require": { - "drupal/core": "*", - "league/oauth2-server": "~5.1" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - }, - "drupal": { - "version": "8.x-2.0-rc3", - "datestamp": "1499089742" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Mateu Aguiló Bosch", - "homepage": "https://www.drupal.org/user/550110", - "email": "mateu.aguilo.bosch@gmail.com" - }, - { - "name": "pcambra", - "homepage": "https://www.drupal.org/user/122101" - } - ], - "description": "The Simple OAuth module for Drupal", - "homepage": "https://www.drupal.org/project/simple_oauth", - "support": { - "source": "http://cgit.drupalcode.org/simple_oauth" - } - }, - { - "name": "drupal/subrequests", - "version": "1.0.0-beta2", - "source": { - "type": "git", - "url": "https://git.drupal.org/project/subrequests", - "reference": "8.x-1.0-beta2" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/subrequests-8.x-1.0-beta2.zip", - "reference": null, - "shasum": "0c190880febc4d3f1a0c6d550d38e54ef9010ab1" - }, - "require": { - "drupal/core": "*", - "php-jsonpointer/php-jsonpointer": "^3.0" - }, - "type": "drupal-module", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - }, - "drupal": { - "version": "8.x-1.0-beta2", - "datestamp": "1499444643" - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Mateu Aguiló Bosch", - "homepage": "https://www.drupal.org/user/550110", - "email": "mateu.aguilo.bosch@gmail.com" - } - ], - "description": "Add a front controller that you can use to make subrequests.", - "homepage": "https://www.drupal.org/project/subrequests", - "support": { - "source": "http://cgit.drupalcode.org/subrequests" - } - }, - { - "name": "drush/drush", - "version": "8.1.12", - "source": { - "type": "git", - "url": "https://github.com/drush-ops/drush.git", - "reference": "a1d3ab0f1d9ce01556d70015906caaed723f7ba7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/drush-ops/drush/zipball/a1d3ab0f1d9ce01556d70015906caaed723f7ba7", - "reference": "a1d3ab0f1d9ce01556d70015906caaed723f7ba7", - "shasum": "" - }, - "require": { - "consolidation/annotated-command": "~2", - "consolidation/output-formatters": "~3", - "pear/console_table": "~1.3.0", - "php": ">=5.4.5", - "phpdocumentor/reflection-docblock": "^2.0", - "psr/log": "~1.0", - "psy/psysh": "~0.6", - "symfony/console": "~2.7", - "symfony/event-dispatcher": "~2.7", - "symfony/finder": "~2.7", - "symfony/var-dumper": "~2.7", - "symfony/yaml": "~2.3", - "webmozart/path-util": "~2" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "symfony/process": "2.7.*" - }, - "suggest": { - "drush/config-extra": "Provides configuration workflow commands, such as config-merge.", - "ext-pcntl": "*" - }, - "bin": [ - "drush", - "drush.launcher", - "drush.php", - "drush.complete.sh" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Drush": "lib/", - "Consolidation": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Moshe Weitzman", - "email": "weitzman@tejasa.com" - }, - { - "name": "Owen Barton", - "email": "drupal@owenbarton.com" - }, - { - "name": "Mark Sonnabaum", - "email": "marksonnabaum@gmail.com" - }, - { - "name": "Antoine Beaupré", - "email": "anarcat@koumbit.org" - }, - { - "name": "Greg Anderson", - "email": "greg.1.anderson@greenknowe.org" - }, - { - "name": "Jonathan Araña Cruz", - "email": "jonhattan@faita.net" - }, - { - "name": "Jonathan Hedstrom", - "email": "jhedstrom@gmail.com" - }, - { - "name": "Christopher Gervais", - "email": "chris@ergonlogic.com" - }, - { - "name": "Dave Reid", - "email": "dave@davereid.net" - }, - { - "name": "Damian Lee", - "email": "damiankloip@googlemail.com" - } - ], - "description": "Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.", - "homepage": "http://www.drush.org", - "time": "2017-06-05T22:51:34+00:00" - }, - { - "name": "easyrdf/easyrdf", - "version": "0.9.1", - "source": { - "type": "git", - "url": "https://github.com/njh/easyrdf.git", - "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/njh/easyrdf/zipball/acd09dfe0555fbcfa254291e433c45fdd4652566", - "reference": "acd09dfe0555fbcfa254291e433c45fdd4652566", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-pcre": "*", - "php": ">=5.2.8" - }, - "require-dev": { - "phpunit/phpunit": "~3.5", - "sami/sami": "~1.4", - "squizlabs/php_codesniffer": "~1.4.3" - }, - "suggest": { - "ml/json-ld": "~1.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "EasyRdf_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nicholas Humfrey", - "email": "njh@aelius.com", - "homepage": "http://www.aelius.com/njh/", - "role": "Developer" - }, - { - "name": "Alexey Zakhlestin", - "email": "indeyets@gmail.com", - "role": "Developer" - } - ], - "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", - "homepage": "http://www.easyrdf.org/", - "keywords": [ - "Linked Data", - "RDF", - "Semantic Web", - "Turtle", - "rdfa", - "sparql" - ], - "time": "2015-02-27T09:45:49+00:00" - }, - { - "name": "egulias/email-validator", - "version": "1.2.14", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/5642614492f0ca2064c01d60cc33284cc2f731a9", - "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1.0.1", - "php": ">= 5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Egulias\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], - "time": "2017-02-03T22:48:59+00:00" - }, - { - "name": "gabordemooij/redbean", - "version": "v4.3.4", - "source": { - "type": "git", - "url": "https://github.com/gabordemooij/redbean.git", - "reference": "d0944d7f966d7f45a0d973981fe3f64aff0050f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gabordemooij/redbean/zipball/d0944d7f966d7f45a0d973981fe3f64aff0050f0", - "reference": "d0944d7f966d7f45a0d973981fe3f64aff0050f0", - "shasum": "" - }, - "require": { - "php": ">=5.3.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "RedBeanPHP\\": "RedBeanPHP" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "New BSD and GPLv2" - ], - "authors": [ - { - "name": "Gabor de Mooij", - "email": "gabor@redbeanphp.com", - "homepage": "http://redbeanphp.com" - } - ], - "description": "RedBeanPHP ORM", - "homepage": "http://redbeanphp.com/", - "keywords": [ - "orm" - ], - "time": "2017-03-07T22:26:54+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.2.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", - "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2017-02-28T22:50:30+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" - }, - { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "time": "2014-11-20T16:49:30+00:00" - }, - { - "name": "jakub-onderka/php-console-color", - "version": "0.1", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "0.*", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "3.7.*", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleColor": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com", - "homepage": "http://www.acci.cz" - } - ], - "time": "2014-04-08T15:00:19+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.3.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "shasum": "" - }, - "require": { - "jakub-onderka/php-console-color": "~0.1", - "php": ">=5.3.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~0.5", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleHighlighter": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "time": "2015-04-20T18:58:01+00:00" - }, - { - "name": "lcobucci/jwt", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "ddce703826f9c5229781933b1a39069e38e6a0f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/ddce703826f9c5229781933b1a39069e38e6a0f3", - "reference": "ddce703826f9c5229781933b1a39069e38e6a0f3", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "php": ">=5.5" - }, - "require-dev": { - "mdanter/ecc": "~0.3.1", - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2016-10-31T20:09:32+00:00" - }, - { - "name": "league/event", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/event.git", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/event/zipball/e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", - "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "~1.0.1", - "phpspec/phpspec": "~2.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Event\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Event package", - "keywords": [ - "emitter", - "event", - "listener" - ], - "time": "2015-05-21T12:24:47+00:00" - }, - { - "name": "league/oauth2-server", - "version": "5.1.4", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "26889abdd3dc04b7b9d633991e807159f6d410f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/26889abdd3dc04b7b9d633991e807159f6d410f9", - "reference": "26889abdd3dc04b7b9d633991e807159f6d410f9", - "shasum": "" - }, - "require": { - "defuse/php-encryption": "^2.1", - "ext-openssl": "*", - "lcobucci/jwt": "^3.1", - "league/event": "^2.1", - "paragonie/random_compat": "^2.0", - "php": ">=5.5.9", - "psr/http-message": "^1.0" - }, - "replace": { - "league/oauth2server": "*", - "lncd/oauth2": "*" - }, - "require-dev": { - "indigophp/hash-compat": "^1.1", - "phpunit/phpunit": "^4.8 || ^5.0", - "zendframework/zend-diactoros": "^1.0" - }, - "suggest": { - "indigophp/hash-compat": "Polyfill for hash_equals function for PHP 5.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-V5-WIP": "5.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\OAuth2\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" - } - ], - "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", - "homepage": "https://oauth2.thephpleague.com/", - "keywords": [ - "Authentication", - "api", - "auth", - "authorisation", - "authorization", - "oauth", - "oauth 2", - "oauth 2.0", - "oauth2", - "protect", - "resource", - "secure", - "server" - ], - "time": "2017-07-01T17:37:54+00:00" - }, - { - "name": "masterminds/html5", - "version": "2.2.2", - "source": { - "type": "git", - "url": "https://github.com/Masterminds/html5-php.git", - "reference": "7866e93dcf0245de22378414e0c2c7350abc45af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/7866e93dcf0245de22378414e0c2c7350abc45af", - "reference": "7866e93dcf0245de22378414e0c2c7350abc45af", - "shasum": "" - }, - "require": { - "ext-libxml": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "sami/sami": "~2.0", - "satooshi/php-coveralls": "1.0.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "Masterminds\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matt Butcher", - "email": "technosophos@gmail.com" - }, - { - "name": "Asmir Mustafic", - "email": "goetas@gmail.com" - }, - { - "name": "Matt Farina", - "email": "matt@mattfarina.com" - } - ], - "description": "An HTML5 parser and serializer.", - "homepage": "http://masterminds.github.io/html5-php", - "keywords": [ - "HTML5", - "dom", - "html", - "parser", - "querypath", - "serializer", - "xml" - ], - "time": "2016-09-22T11:01:11+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v3.0.6", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0808939f81c1347a3c8a82a5925385a08074b0f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0808939f81c1347a3c8a82a5925385a08074b0f1", - "reference": "0808939f81c1347a3c8a82a5925385a08074b0f1", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2017-06-28T20:53:48+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v2.0.10", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ], - "time": "2017-03-13T16:27:32+00:00" - }, - { - "name": "pear/console_table", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/pear/Console_Table.git", - "reference": "64100b9ee81852f4fa17823e55d0b385a544f976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Console_Table/zipball/64100b9ee81852f4fa17823e55d0b385a544f976", - "reference": "64100b9ee81852f4fa17823e55d0b385a544f976", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "suggest": { - "pear/Console_Color2": ">=0.1.2" - }, - "type": "library", - "autoload": { - "classmap": [ - "Table.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jan Schneider", - "homepage": "http://pear.php.net/user/yunosh" - }, - { - "name": "Tal Peer", - "homepage": "http://pear.php.net/user/tal" - }, - { - "name": "Xavier Noguer", - "homepage": "http://pear.php.net/user/xnoguer" - }, - { - "name": "Richard Heyes", - "homepage": "http://pear.php.net/user/richard" - } - ], - "description": "Library that makes it easy to build console style tables.", - "homepage": "http://pear.php.net/package/Console_Table/", - "keywords": [ - "console" - ], - "time": "2016-01-21T16:14:31+00:00" - }, - { - "name": "php-jsonpointer/php-jsonpointer", - "version": "v3.0.2", - "source": { - "type": "git", - "url": "https://github.com/raphaelstolt/php-jsonpointer.git", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", - "phpunit/phpunit": "4.6.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Rs\\Json": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Raphael Stolt", - "email": "raphael.stolt@gmail.com", - "homepage": "http://raphaelstolt.blogspot.com/" - } - ], - "description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)", - "homepage": "https://github.com/raphaelstolt/php-jsonpointer", - "keywords": [ - "json", - "json pointer", - "json traversal" - ], - "time": "2016-08-29T08:51:01+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2016-01-25T08:17:30+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" - }, - { - "name": "psy/psysh", - "version": "v0.8.9", - "source": { - "type": "git", - "url": "https://github.com/bobthecow/psysh.git", - "reference": "58a31cc4404c8f632d8c557bc72056af2d3a83db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/58a31cc4404c8f632d8c557bc72056af2d3a83db", - "reference": "58a31cc4404c8f632d8c557bc72056af2d3a83db", - "shasum": "" - }, - "require": { - "dnoegel/php-xdg-base-dir": "0.1", - "jakub-onderka/php-console-highlighter": "0.3.*", - "nikic/php-parser": "~1.3|~2.0|~3.0", - "php": ">=5.3.9", - "symfony/console": "~2.3.10|^2.4.2|~3.0", - "symfony/var-dumper": "~2.7|~3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", - "hoa/console": "~3.16|~1.14", - "phpunit/phpunit": "~4.4|~5.0", - "symfony/finder": "~2.1|~3.0" - }, - "suggest": { - "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", - "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." - }, - "bin": [ - "bin/psysh" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "0.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/Psy/functions.php" - ], - "psr-4": { - "Psy\\": "src/Psy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Justin Hileman", - "email": "justin@justinhileman.info", - "homepage": "http://justinhileman.com" - } - ], - "description": "An interactive shell for modern PHP.", - "homepage": "http://psysh.org", - "keywords": [ - "REPL", - "console", - "interactive", - "shell" - ], - "time": "2017-07-06T14:53:52+00:00" - }, - { - "name": "rvtraveller/qs-composer-installer", - "version": "1.1", - "source": { - "type": "git", - "url": "https://github.com/rvtraveller/qs-composer-installer.git", - "reference": "20d6f4397e4b77599646767ad030092a60f5f92a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rvtraveller/qs-composer-installer/zipball/20d6f4397e4b77599646767ad030092a60f5f92a", - "reference": "20d6f4397e4b77599646767ad030092a60f5f92a", - "shasum": "" - }, - "require": { - "composer-plugin-api": "~1.0", - "composer/installers": "~1.0" - }, - "require-dev": { - "composer/composer": "~1.0@dev" - }, - "type": "composer-plugin", - "extra": { - "class": "rvtraveller\\QuicksilverComposerInstaller\\QuicksilverComposerInstallerPlugin" - }, - "autoload": { - "psr-4": { - "rvtraveller\\QuicksilverComposerInstaller\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Install Quicksilver modules for Pantheon into custom locations.", - "homepage": "https://github.com/rvtraveller/qs-composer-installer", - "time": "2017-01-27T20:40:31+00:00" - }, - { - "name": "stack/builder", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/stackphp/builder.git", - "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stackphp/builder/zipball/59fcc9b448a8ce5e338a04c4e2e4aca893e83425", - "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/http-foundation": "~2.1|~3.0", - "symfony/http-kernel": "~2.1|~3.0" - }, - "require-dev": { - "silex/silex": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Stack": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Builder for stack middlewares based on HttpKernelInterface.", - "keywords": [ - "stack" - ], - "time": "2016-06-02T06:58:42+00:00" - }, - { - "name": "stecman/symfony-console-completion", - "version": "0.7.0", - "source": { - "type": "git", - "url": "https://github.com/stecman/symfony-console-completion.git", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb", - "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/console": "~2.3 || ~3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Stecman\\Component\\Symfony\\Console\\BashCompletion\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Holdaway", - "email": "stephen@stecman.co.nz" - } - ], - "description": "Automatic BASH completion for Symfony Console Component based applications.", - "time": "2016-02-24T05:08:54+00:00" - }, - { - "name": "symfony-cmf/routing", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony-cmf/Routing.git", - "reference": "b93704ca098334f56e9b317932f21a4362e620db" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/b93704ca098334f56e9b317932f21a4362e620db", - "reference": "b93704ca098334f56e9b317932f21a4362e620db", - "shasum": "" - }, - "require": { - "php": "^5.3.9|^7.0", - "psr/log": "1.*", - "symfony/http-kernel": "^2.2|3.*", - "symfony/routing": "^2.2|3.*" - }, - "require-dev": { - "friendsofsymfony/jsrouting-bundle": "^1.1", - "symfony-cmf/testing": "^1.3", - "symfony/config": "^2.2|3.*", - "symfony/dependency-injection": "^2.0.5|3.*", - "symfony/event-dispatcher": "^2.1|3.*" - }, - "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Cmf\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony CMF Community", - "homepage": "https://github.com/symfony-cmf/Routing/contributors" - } - ], - "description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers", - "homepage": "http://cmf.symfony.com", - "keywords": [ - "database", - "routing" - ], - "time": "2016-03-31T09:11:39+00:00" - }, - { - "name": "symfony/class-loader", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/class-loader.git", - "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/2c8de07a8a4cc4da9c018ab7a81888b80e762f93", - "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-apcu": "~1.1" - }, - "require-dev": { - "symfony/finder": "^2.0.5|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\ClassLoader\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony ClassLoader Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T19:13:35+00:00" - }, - { - "name": "symfony/config", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "0b8541d18507d10204a08384640ff6df3c739ebe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/0b8541d18507d10204a08384640ff6df3c739ebe", - "reference": "0b8541d18507d10204a08384640ff6df3c739ebe", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3|~3.0.0" - }, - "require-dev": { - "symfony/yaml": "~2.7|~3.0.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2017-04-12T14:07:15+00:00" - }, - { - "name": "symfony/console", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa", - "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T11:00:12+00:00" - }, - { - "name": "symfony/css-selector", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "ba3204654efa779691fac9e948a96b4a7067e4ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ba3204654efa779691fac9e948a96b4a7067e4ab", - "reference": "ba3204654efa779691fac9e948a96b4a7067e4ab", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\CssSelector\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "https://symfony.com", - "time": "2017-05-01T14:31:55+00:00" - }, - { - "name": "symfony/debug", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/e90099a2958d4833a02d05b504cc06e1c234abcc", - "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2|~3.0.0", - "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T19:13:35+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/efdbeefa454a41154fd99a6f0489f0e9cb46c497", - "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/expression-language": "<2.6" - }, - "require-dev": { - "symfony/config": "~2.2|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2017-02-28T12:31:05+00:00" - }, - { - "name": "symfony/dom-crawler", - "version": "v3.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", - "reference": "fc2c588ce376e9fe04a7b8c79e3ec62fe32d95b1", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "symfony/css-selector": "~2.8|~3.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "https://symfony.com", - "time": "2017-05-25T23:10:31+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", - "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2017-02-21T08:33:48+00:00" - }, - { - "name": "symfony/expression-language", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/expression-language.git", - "reference": "2b8394d92f012fe3410e55e28c24fd90c9864a01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/2b8394d92f012fe3410e55e28c24fd90c9864a01", - "reference": "2b8394d92f012fe3410e55e28c24fd90c9864a01", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\ExpressionLanguage\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony ExpressionLanguage Component", - "homepage": "https://symfony.com", - "time": "2017-06-01T20:52:29+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7", - "reference": "b8c9c18eacc525c980d27c7a2c8fd1e09e0ed4c7", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2017-06-20T23:27:56+00:00" - }, - { - "name": "symfony/finder", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "4f4e84811004e065a3bb5ceeb1d9aa592630f9ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/4f4e84811004e065a3bb5ceeb1d9aa592630f9ad", - "reference": "4f4e84811004e065a3bb5ceeb1d9aa592630f9ad", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-06-01T20:52:29+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/88af747e7af17d8d7d439ad4639dc3e23ddd3edd", - "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php54": "~1.0", - "symfony/polyfill-php55": "~1.0" - }, - "require-dev": { - "symfony/expression-language": "~2.4|~3.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/18d7a01ac14ffa5a652a635c402b9777f858fc1a", - "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0", - "symfony/debug": "^2.6.2", - "symfony/event-dispatcher": "^2.6.7|~3.0.0", - "symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "symfony/browser-kit": "~2.3|~3.0.0", - "symfony/class-loader": "~2.1|~3.0.0", - "symfony/config": "~2.8", - "symfony/console": "~2.3|~3.0.0", - "symfony/css-selector": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.8|~3.0.0", - "symfony/dom-crawler": "^2.0.5|~3.0.0", - "symfony/expression-language": "~2.4|~3.0.0", - "symfony/finder": "^2.0.5|~3.0.0", - "symfony/process": "^2.0.5|~3.0.0", - "symfony/routing": "~2.8|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0", - "symfony/templating": "~2.2|~3.0.0", - "symfony/translation": "^2.0.5|~3.0.0", - "symfony/var-dumper": "~2.6|~3.0.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com", - "time": "2017-03-06T03:54:35+00:00" - }, - { - "name": "symfony/polyfill-apcu", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "5d4474f447403c3348e37b70acc2b95475b7befa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa", - "reference": "5d4474f447403c3348e37b70acc2b95475b7befa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "apcu", - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/polyfill-iconv", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cba36f3616d9866b3e52662e88da5c090fac1e97", - "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-iconv": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Iconv extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "iconv", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/polyfill-php54", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0", - "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php54\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/polyfill-php55", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "03e3f0350bca2220e3623a0e340eef194405fc67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/03e3f0350bca2220e3623a0e340eef194405fc67", - "reference": "03e3f0350bca2220e3623a0e340eef194405fc67", - "shasum": "" - }, - "require": { - "ircmaxell/password-compat": "~1.0", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php55\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/process", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/psr-http-message-bridge", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/66085f246d3893cbdbcec5f5ad15ac60546cf0de", - "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "psr/http-message": "~1.0", - "symfony/http-foundation": "~2.3|~3.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "psr/http-message-implementation": "To use the HttpFoundation factory", - "zendframework/zend-diactoros": "To use the Zend Diactoros factory" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\PsrHttpMessage\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", - "keywords": [ - "http", - "http-message", - "psr-7" - ], - "time": "2016-09-14T18:37:20+00:00" - }, - { - "name": "symfony/routing", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "d145cd396f702c497cb24b21785ddac90a23fe71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d145cd396f702c497cb24b21785ddac90a23fe71", - "reference": "d145cd396f702c497cb24b21785ddac90a23fe71", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~2.7|~3.0.0", - "symfony/expression-language": "~2.4|~3.0.0", - "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/yaml": "^2.0.5|~3.0.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Routing Component", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2017-03-02T15:56:34+00:00" - }, - { - "name": "symfony/serializer", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/serializer.git", - "reference": "df3d919f00177f599c8970e86112c7582b08a582" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/df3d919f00177f599c8970e86112c7582b08a582", - "reference": "df3d919f00177f599c8970e86112c7582b08a582", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-php55": "~1.0" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "symfony/config": "~2.2|~3.0.0", - "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "^2.0.5|~3.0.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "symfony/config": "For using the XML mapping loader.", - "symfony/property-access": "For using the ObjectNormalizer.", - "symfony/yaml": "For using the default YAML mapping loader." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Serializer\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Serializer Component", - "homepage": "https://symfony.com", - "time": "2017-03-05T17:40:13+00:00" - }, - { - "name": "symfony/translation", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256", - "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8", - "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", - "symfony/yaml": "~2.2|~3.0.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/validator", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/validator.git", - "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", - "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation": "~2.4|~3.0.0" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "egulias/email-validator": "^1.2.1", - "symfony/config": "~2.2|~3.0.0", - "symfony/expression-language": "~2.4|~3.0.0", - "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", - "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "^2.0.5|~3.0.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Validator\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Validator Component", - "homepage": "https://symfony.com", - "time": "2017-02-28T02:24:56+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v2.8.24", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "5fe3ba6d3817ae378d141962616e048ac85ba21d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5fe3ba6d3817ae378d141962616e048ac85ba21d", - "reference": "5fe3ba6d3817ae378d141962616e048ac85ba21d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" - }, - "require-dev": { - "ext-iconv": "*", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-symfony_debug": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony mechanism for exploring and dumping PHP variables", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "time": "2017-06-20T23:27:56+00:00" - }, - { - "name": "symfony/yaml", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", - "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-03-01T18:13:50+00:00" - }, - { - "name": "twig/twig", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f16a634ab08d87e520da5671ec52153d627f10f6", - "reference": "f16a634ab08d87e520da5671ec52153d627f10f6", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.25-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2016-09-21T23:05:12+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause-Attribution" - ], - "authors": [ - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "time": "2016-09-01T10:05:43+00:00" - }, - { - "name": "webflo/drupal-core-strict", - "version": "8.3.4", - "source": { - "type": "git", - "url": "https://github.com/webflo/drupal-core-strict.git", - "reference": "868bf37f32b6c5be93742c57da938868e68da685" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webflo/drupal-core-strict/zipball/868bf37f32b6c5be93742c57da938868e68da685", - "reference": "868bf37f32b6c5be93742c57da938868e68da685", - "shasum": "" - }, - "require": { - "asm89/stack-cors": "1.0.0", - "composer/installers": "v1.2.0", - "composer/semver": "1.4.2", - "doctrine/annotations": "v1.2.7", - "doctrine/cache": "v1.6.1", - "doctrine/collections": "v1.3.0", - "doctrine/common": "v2.6.2", - "doctrine/inflector": "v1.1.0", - "doctrine/lexer": "v1.0.1", - "easyrdf/easyrdf": "0.9.1", - "egulias/email-validator": "1.2.14", - "guzzlehttp/guzzle": "6.2.3", - "guzzlehttp/promises": "v1.3.1", - "guzzlehttp/psr7": "1.4.2", - "ircmaxell/password-compat": "v1.0.4", - "masterminds/html5": "2.2.2", - "paragonie/random_compat": "v2.0.10", - "psr/http-message": "1.0.1", - "psr/log": "1.0.2", - "stack/builder": "v1.0.4", - "symfony-cmf/routing": "1.4.0", - "symfony/class-loader": "v2.8.18", - "symfony/console": "v2.8.18", - "symfony/debug": "v2.8.18", - "symfony/dependency-injection": "v2.8.18", - "symfony/event-dispatcher": "v2.8.18", - "symfony/http-foundation": "v2.8.18", - "symfony/http-kernel": "v2.8.18", - "symfony/polyfill-apcu": "v1.3.0", - "symfony/polyfill-iconv": "v1.3.0", - "symfony/polyfill-mbstring": "v1.3.0", - "symfony/polyfill-php54": "v1.3.0", - "symfony/polyfill-php55": "v1.3.0", - "symfony/process": "v2.8.18", - "symfony/psr-http-message-bridge": "v1.0.0", - "symfony/routing": "v2.8.18", - "symfony/serializer": "v2.8.18", - "symfony/translation": "v2.8.18", - "symfony/validator": "v2.8.18", - "symfony/yaml": "v2.8.18", - "twig/twig": "v1.25.0", - "wikimedia/composer-merge-plugin": "v1.4.0", - "zendframework/zend-diactoros": "1.3.10", - "zendframework/zend-escaper": "2.5.2", - "zendframework/zend-feed": "2.7.0", - "zendframework/zend-stdlib": "3.0.1" - }, - "require-dev": { - "behat/mink": "dev-master#9ea1cebe3dc529ba3861d87c818f045362c40484", - "behat/mink-browserkit-driver": "v1.3.2", - "behat/mink-goutte-driver": "v1.2.1", - "doctrine/instantiator": "1.0.5", - "drupal/coder": "8.2.12", - "fabpot/goutte": "v3.2.1", - "jcalderonzumba/gastonjs": "v1.0.2", - "jcalderonzumba/mink-phantomjs-driver": "v0.3.1", - "mikey179/vfsstream": "v1.6.4", - "phpdocumentor/reflection-docblock": "2.0.4", - "phpspec/prophecy": "v1.7.0", - "phpunit/php-code-coverage": "2.2.4", - "phpunit/php-file-iterator": "1.4.2", - "phpunit/php-text-template": "1.2.1", - "phpunit/php-timer": "1.0.9", - "phpunit/php-token-stream": "1.4.11", - "phpunit/phpunit": "4.8.35", - "phpunit/phpunit-mock-objects": "2.3.8", - "sebastian/comparator": "1.2.4", - "sebastian/diff": "1.4.1", - "sebastian/environment": "1.3.8", - "sebastian/exporter": "1.2.2", - "sebastian/global-state": "1.1.1", - "sebastian/recursion-context": "1.0.5", - "sebastian/version": "1.0.6", - "squizlabs/php_codesniffer": "2.8.1", - "symfony/browser-kit": "v2.8.18", - "symfony/css-selector": "v2.8.18", - "symfony/dom-crawler": "v2.8.18" - }, - "type": "metapackage", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "description": "Locked core dependencies", - "time": "2017-06-21T19:01:43+00:00" - }, - { - "name": "webflo/drupal-finder", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/webflo/drupal-finder.git", - "reference": "6ef150707aad1755d91f9b0d2108bcc16661e76b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/6ef150707aad1755d91f9b0d2108bcc16661e76b", - "reference": "6ef150707aad1755d91f9b0d2108bcc16661e76b", - "shasum": "" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/DrupalFinder.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Florian Weber", - "email": "florian@webflo.org" - } - ], - "description": "Helper class to locate a Drupal installation from a given path.", - "time": "2017-05-04T08:54:02+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-11-23T20:04:58+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "time": "2015-12-17T08:42:14+00:00" - }, - { - "name": "wikimedia/composer-merge-plugin", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/wikimedia/composer-merge-plugin.git", - "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/ca453f9f13d8b05f86f20ea10be992a782e6f78c", - "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": ">=5.3.2" - }, - "require-dev": { - "composer/composer": "~1.0.0", - "jakub-onderka/php-parallel-lint": "~0.8", - "phpunit/phpunit": "~4.8|~5.0", - "squizlabs/php_codesniffer": "~2.1.0" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - }, - "class": "Wikimedia\\Composer\\MergePlugin" - }, - "autoload": { - "psr-4": { - "Wikimedia\\Composer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bryan Davis", - "email": "bd808@wikimedia.org" - } - ], - "description": "Composer plugin to merge multiple composer.json files", - "time": "2017-03-13T16:52:55+00:00" - }, - { - "name": "zendframework/zend-diactoros", - "version": "1.3.10", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/83e8d98b9915de76c659ce27d683c02a0f99fa90", - "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "~1.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6 || ^5.5", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev", - "dev-develop": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "time": "2017-01-23T04:53:24+00:00" - }, - { - "name": "zendframework/zend-escaper", - "version": "2.5.2", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Escaper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-escaper", - "keywords": [ - "escaper", - "zf2" - ], - "time": "2016-06-30T19:48:38+00:00" - }, - { - "name": "zendframework/zend-feed", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-feed.git", - "reference": "12b328d382aa5200f1de53d4147033b885776b67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/12b328d382aa5200f1de53d4147033b885776b67", - "reference": "12b328d382aa5200f1de53d4147033b885776b67", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "zendframework/zend-escaper": "^2.5", - "zendframework/zend-stdlib": "^2.7 || ^3.0" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "psr/http-message": "^1.0", - "zendframework/zend-cache": "^2.5", - "zendframework/zend-db": "^2.5", - "zendframework/zend-http": "^2.5", - "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-validator": "^2.5" - }, - "suggest": { - "psr/http-message": "PSR-7 ^1.0, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator", - "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests", - "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub", - "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Feed\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides functionality for consuming RSS and Atom feeds", - "homepage": "https://github.com/zendframework/zend-feed", - "keywords": [ - "feed", - "zf2" - ], - "time": "2016-02-11T18:54:29+00:00" - }, - { - "name": "zendframework/zend-stdlib", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8bafa58574204bdff03c275d1d618aaa601588ae", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0" - }, - "require-dev": { - "athletic/athletic": "~0.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-stdlib", - "keywords": [ - "stdlib", - "zf2" - ], - "time": "2016-04-12T21:19:36+00:00" - } - ], - "packages-dev": [ - { - "name": "behat/behat", - "version": "v3.3.1", - "source": { - "type": "git", - "url": "https://github.com/Behat/Behat.git", - "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/44a58c1480d6144b2dc2c2bf02b9cef73c83840d", - "reference": "44a58c1480d6144b2dc2c2bf02b9cef73c83840d", - "shasum": "" - }, - "require": { - "behat/gherkin": "^4.4.4", - "behat/transliterator": "^1.2", - "container-interop/container-interop": "^1.1", - "ext-mbstring": "*", - "php": ">=5.3.3", - "symfony/class-loader": "~2.1||~3.0", - "symfony/config": "~2.3||~3.0", - "symfony/console": "~2.5||~3.0", - "symfony/dependency-injection": "~2.1||~3.0", - "symfony/event-dispatcher": "~2.1||~3.0", - "symfony/translation": "~2.3||~3.0", - "symfony/yaml": "~2.1||~3.0" - }, - "require-dev": { - "herrera-io/box": "~1.6.1", - "phpunit/phpunit": "~4.5", - "symfony/process": "~2.5|~3.0" - }, - "suggest": { - "behat/mink-extension": "for integration with Mink testing framework", - "behat/symfony2-extension": "for integration with Symfony2 web framework", - "behat/yii-extension": "for integration with Yii web framework" - }, - "bin": [ - "bin/behat" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Behat": "src/", - "Behat\\Testwork": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Scenario-oriented BDD framework for PHP 5.3", - "homepage": "http://behat.org/", - "keywords": [ - "Agile", - "BDD", - "ScenarioBDD", - "Scrum", - "StoryBDD", - "User story", - "business", - "development", - "documentation", - "examples", - "symfony", - "testing" - ], - "time": "2017-05-15T16:49:16+00:00" - }, - { - "name": "behat/gherkin", - "version": "v4.4.5", - "source": { - "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", - "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", - "shasum": "" - }, - "require": { - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "~4.5|~5", - "symfony/phpunit-bridge": "~2.7|~3", - "symfony/yaml": "~2.3|~3" - }, - "suggest": { - "symfony/yaml": "If you want to parse features, represented in YAML files" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Gherkin": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Gherkin DSL parser for PHP 5.3", - "homepage": "http://behat.org/", - "keywords": [ - "BDD", - "Behat", - "Cucumber", - "DSL", - "gherkin", - "parser" - ], - "time": "2016-10-30T11:50:56+00:00" - }, - { - "name": "behat/mink", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/minkphp/Mink.git", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9", - "shasum": "" - }, - "require": { - "php": ">=5.3.1", - "symfony/css-selector": "~2.1|~3.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", - "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", - "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", - "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Mink\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Browser controller/emulator abstraction for PHP", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "testing", - "web" - ], - "time": "2016-03-05T08:26:18+00:00" - }, - { - "name": "behat/mink-browserkit-driver", - "version": "v1.3.2", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkBrowserKitDriver.git", - "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/10e67fb4a295efcd62ea0bf16025a85ea19534fb", - "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb", - "shasum": "" - }, - "require": { - "behat/mink": "^1.7.1@dev", - "php": ">=5.3.6", - "symfony/browser-kit": "~2.3|~3.0", - "symfony/dom-crawler": "~2.3|~3.0" - }, - "require-dev": { - "silex/silex": "~1.2", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Symfony2 BrowserKit driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "Mink", - "Symfony2", - "browser", - "testing" - ], - "time": "2016-03-05T08:59:47+00:00" - }, - { - "name": "behat/mink-extension", - "version": "v2.2", - "source": { - "type": "git", - "url": "https://github.com/Behat/MinkExtension.git", - "reference": "5b4bda64ff456104564317e212c823e45cad9d59" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/MinkExtension/zipball/5b4bda64ff456104564317e212c823e45cad9d59", - "reference": "5b4bda64ff456104564317e212c823e45cad9d59", - "shasum": "" - }, - "require": { - "behat/behat": "~3.0,>=3.0.5", - "behat/mink": "~1.5", - "php": ">=5.3.2", - "symfony/config": "~2.2|~3.0" - }, - "require-dev": { - "behat/mink-goutte-driver": "~1.1", - "phpspec/phpspec": "~2.0" - }, - "type": "behat-extension", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\MinkExtension": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - }, - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com" - } - ], - "description": "Mink extension for Behat", - "homepage": "http://extensions.behat.org/mink", - "keywords": [ - "browser", - "gui", - "test", - "web" - ], - "time": "2016-02-15T07:55:18+00:00" - }, - { - "name": "behat/mink-goutte-driver", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkGoutteDriver.git", - "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", - "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", - "shasum": "" - }, - "require": { - "behat/mink": "~1.6@dev", - "behat/mink-browserkit-driver": "~1.2@dev", - "fabpot/goutte": "~1.0.4|~2.0|~3.1", - "php": ">=5.3.1" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Goutte driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "goutte", - "headless", - "testing" - ], - "time": "2016-03-05T09:04:22+00:00" - }, - { - "name": "behat/mink-selenium2-driver", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkSelenium2Driver.git", - "reference": "473a9f3ebe0c134ee1e623ce8a9c852832020288" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkSelenium2Driver/zipball/473a9f3ebe0c134ee1e623ce8a9c852832020288", - "reference": "473a9f3ebe0c134ee1e623ce8a9c852832020288", - "shasum": "" - }, - "require": { - "behat/mink": "~1.7@dev", - "instaclick/php-webdriver": "~1.1", - "php": ">=5.3.1" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Pete Otaqui", - "email": "pete@otaqui.com", - "homepage": "https://github.com/pete-otaqui" - } - ], - "description": "Selenium2 (WebDriver) driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "ajax", - "browser", - "javascript", - "selenium", - "testing", - "webdriver" - ], - "time": "2016-03-05T09:10:18+00:00" - }, - { - "name": "behat/transliterator", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Behat/Transliterator.git", - "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Transliterator/zipball/826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", - "reference": "826ce7e9c2a6664c0d1f381cbb38b1fb80a7ee2c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "chuyskywalker/rolling-curl": "^3.1", - "php-yaoi/php-yaoi": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Transliterator": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Artistic-1.0" - ], - "description": "String transliterator", - "keywords": [ - "i18n", - "slug", - "transliterator" - ], - "time": "2017-04-04T11:38:05+00:00" - }, - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14T21:17:01+00:00" - }, - { - "name": "drupal/drupal-driver", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/jhedstrom/DrupalDriver.git", - "reference": "125d39918c97f7a08e3110d456a0a1db864dae46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jhedstrom/DrupalDriver/zipball/125d39918c97f7a08e3110d456a0a1db864dae46", - "reference": "125d39918c97f7a08e3110d456a0a1db864dae46", - "shasum": "" - }, - "require": { - "symfony/dependency-injection": "~2.6|~3.0", - "symfony/process": "~2.5|~3.0" - }, - "require-dev": { - "drupal/coder": "~8.2.0", - "drush-ops/behat-drush-endpoint": "*", - "mockery/mockery": "0.9.4", - "phpspec/phpspec": "~2.0", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Drupal\\Component": "src/", - "Drupal\\Driver": "src/", - "Drupal\\Tests\\Driver": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Jonathan Hedstrom", - "email": "jhedstrom@gmail.com" - } - ], - "description": "A collection of reusable Drupal drivers", - "homepage": "http://github.com/jhedstrom/DrupalDriver", - "keywords": [ - "drupal", - "test", - "web" - ], - "time": "2016-06-20T16:29:51+00:00" - }, - { - "name": "drupal/drupal-extension", - "version": "v3.3.0", - "source": { - "type": "git", - "url": "https://github.com/jhedstrom/drupalextension.git", - "reference": "8610ab76130ae53b3e7522aff6e1ef61287612f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jhedstrom/drupalextension/zipball/8610ab76130ae53b3e7522aff6e1ef61287612f2", - "reference": "8610ab76130ae53b3e7522aff6e1ef61287612f2", - "shasum": "" - }, - "require": { - "behat/behat": "~3.2", - "behat/mink": "~1.5", - "behat/mink-extension": "~2.0", - "behat/mink-goutte-driver": "~1.0", - "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "~1.2", - "symfony/dependency-injection": "~2.7|~3.0", - "symfony/event-dispatcher": "~2.7|~3.0" - }, - "require-dev": { - "behat/mink-zombie-driver": "^1.2", - "phpspec/phpspec": "~2.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "behat-extension", - "extra": { - "branch-alias": { - "dev-master": "3.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "Drupal\\Drupal": "src/", - "Drupal\\Exception": "src/", - "Drupal\\DrupalExtension": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Jonathan Hedstrom", - "email": "jhedstrom@gmail.com" - } - ], - "description": "Drupal extension for Behat", - "homepage": "http://drupal.org/project/drupalextension", - "keywords": [ - "drupal", - "test", - "web" - ], - "time": "2017-06-15T13:59:40+00:00" - }, - { - "name": "drush-ops/behat-drush-endpoint", - "version": "0.0.4", - "source": { - "type": "git", - "url": "https://github.com/drush-ops/behat-drush-endpoint.git", - "reference": "aba768db7338b2fe1f17693421760baadb37a39e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/drush-ops/behat-drush-endpoint/zipball/aba768db7338b2fe1f17693421760baadb37a39e", - "reference": "aba768db7338b2fe1f17693421760baadb37a39e", - "shasum": "" - }, - "require": { - "composer/installers": "~1.0", - "drupal/drupal-driver": "*", - "php": ">=5.3.0" - }, - "type": "drupal-drush", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPLv2" - ], - "description": "Drush commandfile for use with drupal/drupal-driver.", - "homepage": "https://github.com/drush-ops/behat-drush-endpoint", - "keywords": [ - "Behat", - "Drush", - "testing" - ], - "time": "2015-11-11T07:34:40+00:00" - }, - { - "name": "fabpot/goutte", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/Goutte.git", - "reference": "db5c28f4a010b4161d507d5304e28a7ebf211638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/db5c28f4a010b4161d507d5304e28a7ebf211638", - "reference": "db5c28f4a010b4161d507d5304e28a7ebf211638", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "symfony/browser-kit": "~2.1|~3.0", - "symfony/css-selector": "~2.1|~3.0", - "symfony/dom-crawler": "~2.1|~3.0" - }, - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Goutte\\": "Goutte" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A simple PHP Web Scraper", - "homepage": "https://github.com/FriendsOfPHP/Goutte", - "keywords": [ - "scraper" - ], - "time": "2017-01-03T13:21:43+00:00" - }, - { - "name": "instaclick/php-webdriver", - "version": "1.4.5", - "source": { - "type": "git", - "url": "https://github.com/instaclick/php-webdriver.git", - "reference": "6fa959452e774dcaed543faad3a9d1a37d803327" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/6fa959452e774dcaed543faad3a9d1a37d803327", - "reference": "6fa959452e774dcaed543faad3a9d1a37d803327", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0||^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "WebDriver": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Justin Bishop", - "email": "jubishop@gmail.com", - "role": "Developer" - }, - { - "name": "Anthon Pang", - "email": "apang@softwaredevelopment.ca", - "role": "Fork Maintainer" - } - ], - "description": "PHP WebDriver for Selenium 2", - "homepage": "http://instaclick.com/", - "keywords": [ - "browser", - "selenium", - "webdriver", - "webtest" - ], - "time": "2017-06-30T04:02:48+00:00" - }, - { - "name": "jcalderonzumba/gastonjs", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/jcalderonzumba/gastonjs.git", - "reference": "575a9c18d8b87990c37252e8d9707b29f0a313f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jcalderonzumba/gastonjs/zipball/575a9c18d8b87990c37252e8d9707b29f0a313f3", - "reference": "575a9c18d8b87990c37252e8d9707b29f0a313f3", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "~5.0|~6.0", - "php": ">=5.4" - }, - "require-dev": { - "phpunit/phpunit": "~4.6", - "silex/silex": "~1.2", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "type": "phantomjs-api", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Zumba\\GastonJS\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Juan Francisco Calderón Zumba", - "email": "juanfcz@gmail.com", - "homepage": "http://github.com/jcalderonzumba" - } - ], - "description": "PhantomJS API based server for webpage automation", - "homepage": "https://github.com/jcalderonzumba/gastonjs", - "keywords": [ - "api", - "automation", - "browser", - "headless", - "phantomjs" - ], - "time": "2017-03-31T07:31:47+00:00" - }, - { - "name": "jcalderonzumba/mink-phantomjs-driver", - "version": "v0.3.3", - "source": { - "type": "git", - "url": "https://github.com/jcalderonzumba/MinkPhantomJSDriver.git", - "reference": "008f43670e94acd39273d15add1e7348eb23848d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jcalderonzumba/MinkPhantomJSDriver/zipball/008f43670e94acd39273d15add1e7348eb23848d", - "reference": "008f43670e94acd39273d15add1e7348eb23848d", - "shasum": "" - }, - "require": { - "behat/mink": "~1.7", - "jcalderonzumba/gastonjs": "~1.0", - "php": ">=5.4", - "twig/twig": "~1.20|~2.0" - }, - "require-dev": { - "mink/driver-testsuite": "dev-master", - "phpunit/phpunit": "~4.6" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "0.4.x-dev" - } - }, - "autoload": { - "psr-4": { - "Zumba\\Mink\\Driver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Juan Francisco Calderón Zumba", - "email": "juanfcz@gmail.com", - "homepage": "http://github.com/jcalderonzumba" - } - ], - "description": "PhantomJS driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "ajax", - "browser", - "headless", - "javascript", - "phantomjs", - "testing" - ], - "time": "2016-12-01T10:57:30+00:00" - }, - { - "name": "mikey179/vfsStream", - "version": "v1.6.4", - "source": { - "type": "git", - "url": "https://github.com/mikey179/vfsStream.git", - "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/0247f57b2245e8ad2e689d7cee754b45fbabd592", - "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", - "time": "2016-07-18T14:02:57+00:00" - }, - { - "name": "pantheon-systems/quicksilver-pushback", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/pantheon-systems/quicksilver-pushback.git", - "reference": "7d77e3ec46d8504a00dcf96c12a87d09050c5fed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pantheon-systems/quicksilver-pushback/zipball/7d77e3ec46d8504a00dcf96c12a87d09050c5fed", - "reference": "7d77e3ec46d8504a00dcf96c12a87d09050c5fed", - "shasum": "" - }, - "type": "quicksilver-script", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Push commits made via the Pantheon dashboard back to original GitHub repository.", - "time": "2017-03-09T21:36:10+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2017-03-02T20:05:34+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06T15:47:00+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2016-10-03T07:40:28+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2017-02-27T10:12:30+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.36", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2017-06-21T08:07:12+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02T06:51:40+00:00" - }, - { - "name": "psr/container", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2017-02-14T16:28:37+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2017-05-22T07:24:03+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18T05:49:44+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17T09:04:28+00:00" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "symfony/browser-kit", - "version": "v3.3.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/3a4435e79a8401746e8525e98039199d0924b4e5", - "reference": "3a4435e79a8401746e8525e98039199d0924b4e5", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/dom-crawler": "~2.8|~3.0" - }, - "require-dev": { - "symfony/css-selector": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "https://symfony.com", - "time": "2017-06-24T09:29:48+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "contentacms/contenta_jsonapi": 20, - "drupal/simple_block": 10 - }, - "prefer-stable": true, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} From 12668bcb0f5135dfe9aa5bbb6649e75adaebba05 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:51:56 -0600 Subject: [PATCH 07/20] Contenta composer changes --- composer.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 255905e3b..69cbf0554 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ ], "require": { "composer/installers": "^1.0.20", + "contentacms/contenta_jsonapi": "^1.447", "cweagans/composer-patches": "^1.0", "drupal-composer/drupal-scaffold": "^2.0.1", "drupal/config_direct_save": "^1.0", @@ -39,7 +40,7 @@ "conflict": { "drupal/drupal": "*" }, - "minimum-stability": "alpha", + "minimum-stability": "dev", "prefer-stable": true, "autoload": { "classmap": [ @@ -76,6 +77,12 @@ "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"] }, + "enable-patching": true, + "patches":{ + "asm89/stack-cors": { + "(November 29 2017 06:22:06 PM: See issue #223 on contentacms/contenta_jsonapi) Add origin matcher for wildcard matching": "https://raw.githubusercontent.com/contentacms/contenta_jsonapi_project/8.x-1.x/patches/asm89_stack-cors/pull_request_42.patch" + } + }, "build-env": { "install-cms": [ "drush site-install standard --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes", From 98552f81b1ffda01e74b8827ce24af9eb6767667 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:52:11 -0600 Subject: [PATCH 08/20] Contenta composer.lock changes --- composer.lock | 1610 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1605 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index ae848c3bc..8584bc849 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "fbaec5c3b47ad89fcb34e0fed55f446e", + "content-hash": "0b5dcf7dcf85a450d1dc70d31ea976a6", "packages": [ { "name": "alchemy/zippy", @@ -97,6 +97,9 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "patches_applied": { + "(November 29 2017 06:22:06 PM: See issue #223 on contentacms/contenta_jsonapi) Add origin matcher for wildcard matching": "https://raw.githubusercontent.com/contentacms/contenta_jsonapi_project/8.x-1.x/patches/asm89_stack-cors/pull_request_42.patch" } }, "autoload": { @@ -401,6 +404,86 @@ "description": "Format text by applying transformations provided by plug-in formatters.", "time": "2017-10-12T19:38:03+00:00" }, + { + "name": "contentacms/contenta_jsonapi", + "version": "v1.447", + "source": { + "type": "git", + "url": "https://github.com/contentacms/contenta_jsonapi.git", + "reference": "07229c33e7eb2ee31a93c23e456f003ea725d4df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/contentacms/contenta_jsonapi/zipball/07229c33e7eb2ee31a93c23e456f003ea725d4df", + "reference": "07229c33e7eb2ee31a93c23e456f003ea725d4df", + "shasum": "" + }, + "require": { + "composer/installers": "^1.0.24", + "cweagans/composer-patches": "^1.6.0", + "drupal/consumer_image_styles": "^2.0@rc", + "drupal/consumers": "^1.0@beta", + "drupal/core": "^8.4.2", + "drupal/decoupled_router": "^1.0@beta", + "drupal/dropzonejs": "^1.0@alpha", + "drupal/entity_browser": "^1.0", + "drupal/fieldable_path": "^1.0", + "drupal/graphql": "^3.0@beta", + "drupal/jsonapi": "^1.4", + "drupal/jsonapi_extras": "^1.0@beta", + "drupal/material_admin": "^1.0@alpha", + "drupal/media_entity": "^1.6", + "drupal/media_entity_browser": "^1.0@beta", + "drupal/media_entity_image": "^1.2", + "drupal/openapi": "^1.0@alpha", + "drupal/schemata": "^1.0@alpha", + "drupal/simple_oauth": "^3.3", + "drupal/subrequests": "^2.0@beta" + }, + "require-dev": { + "burdamagazinorg/thunder-dev-tools": "dev-master", + "drupal/coder": "^8.2", + "drupal/config_inspector": "1.x-dev", + "drupal/features": "^3.5", + "guzzlehttp/guzzle": "~6.0" + }, + "type": "drupal-profile", + "extra": { + "installer-paths": { + "web/core": [ + "type:drupal-core" + ], + "web/modules/contrib/{$name}": [ + "type:drupal-module" + ], + "web/libraries/{$name}": [ + "type:drupal-library" + ], + "web/profiles/contrib/{$name}": [ + "type:drupal-profile" + ], + "web/themes/contrib/{$name}": [ + "type:drupal-theme" + ], + "drush/contrib/{$name}": [ + "type:drupal-drush" + ] + }, + "patches": { + "drupal/core": { + "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/drupal-n2788777-105.patch" + }, + "drupal/jsonapi": { + "Make the file URLs full URLs": "https://www.drupal.org/files/issues/2929600--use-full-url-file--2.patch" + } + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "time": "2017-12-09T10:57:15+00:00" + }, { "name": "cweagans/composer-patches", "version": "1.6.2", @@ -445,6 +528,69 @@ "description": "Provides a way to patch Composer packages.", "time": "2017-08-30T16:41:23+00:00" }, + { + "name": "defuse/php-encryption", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "reference": "5176f5abb38d3ea8a6e3ac6cd3bbb54d8185a689", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": "~2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "nikic/php-parser": "^2.0|^3.0", + "phpunit/phpunit": "^4|^5" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "time": "2017-05-18T21:28:48+00:00" + }, { "name": "dflydev/dot-access-configuration", "version": "v1.0.2", @@ -1475,6 +1621,102 @@ "description": "Drupal Console Extend Plugin", "time": "2017-07-28T17:11:54+00:00" }, + { + "name": "drupal/consumer_image_styles", + "version": "2.0.0-rc3", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/consumer_image_styles", + "reference": "8.x-2.0-rc3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/consumer_image_styles-8.x-2.0-rc3.zip", + "reference": "8.x-2.0-rc3", + "shasum": "b8b1f24f0ac91d288b78c977b90b46d15354bc62" + }, + "require": { + "drupal/consumers": "*", + "drupal/core": "*", + "drupal/jsonapi": "^1.3" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + }, + "drupal": { + "version": "8.x-2.0-rc3", + "datestamp": "1506314345", + "security-coverage": { + "status": "not-covered", + "message": "RC releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + } + ], + "description": "Attach image styles to a given consumer", + "homepage": "https://www.drupal.org/project/consumer_image_styles", + "support": { + "source": "http://cgit.drupalcode.org/consumer_image_styles" + } + }, + { + "name": "drupal/consumers", + "version": "1.0.0-beta1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/consumers", + "reference": "8.x-1.0-beta1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/consumers-8.x-1.0-beta1.zip", + "reference": "8.x-1.0-beta1", + "shasum": "87e5472fde6c7cc60ed7dda2af350997ae4767d8" + }, + "require": { + "drupal/core": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta1", + "datestamp": "1505249045", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + } + ], + "description": "Declare all the consumers of your API", + "homepage": "https://www.drupal.org/project/consumers", + "support": { + "source": "http://cgit.drupalcode.org/consumers" + } + }, { "name": "drupal/core", "version": "8.4.2", @@ -1640,6 +1882,11 @@ "symfony/phpunit-bridge": "~3.2.8" }, "type": "drupal-core", + "extra": { + "patches_applied": { + "Allow a profile to be installed from existing config": "https://www.drupal.org/files/issues/drupal-n2788777-105.patch" + } + }, "autoload": { "psr-4": { "Drupal\\Core\\": "lib/Drupal/Core", @@ -1656,12 +1903,992 @@ "lib/Drupal/Core/Site/Settings.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "Drupal is an open source content management platform powering millions of websites and applications.", + "time": "2017-11-03T13:20:16+00:00" + }, + { + "name": "drupal/decoupled_router", + "version": "1.0.0-beta1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/decoupled_router", + "reference": "8.x-1.0-beta1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/decoupled_router-8.x-1.0-beta1.zip", + "reference": "8.x-1.0-beta1", + "shasum": "4be84c7cdb76829a3ff2bd2585a3c6547b4f9c5f" + }, + "require": { + "drupal/core": "~8.0" + }, + "require-dev": { + "drupal/jsonapi": "^1.3", + "drupal/redirect": "^1.0@beta" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta1", + "datestamp": "1511988484", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/550110", + "email": "mateu.aguilo.bosch@gmail.com" + } + ], + "description": "Provides an endpoint that will help you resolve path aliases and redirects for entity related routes.", + "homepage": "https://www.drupal.org/project/decoupled_router", + "support": { + "source": "http://cgit.drupalcode.org/decoupled_router" + } + }, + { + "name": "drupal/dropzonejs", + "version": "1.0.0-alpha8", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/dropzonejs", + "reference": "8.x-1.0-alpha8" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/dropzonejs-8.x-1.0-alpha8.zip", + "reference": "8.x-1.0-alpha8", + "shasum": "646c389e339f8d6e52d2c1eb1e8fd65e4bb45d9a" + }, + "require": { + "drupal/core": "*" + }, + "require-dev": { + "drupal/entity_browser": "*" + }, + "suggest": { + "enyo/dropzone": "Required to user drupal/dropzonejs. Dropzone is an easy to use drag'n'drop library." + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha8", + "datestamp": "1508835844", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Janez Urevc", + "homepage": "https://drupal.org/u/slashrsm", + "role": "Maintainer" + }, + { + "name": "Christian Fritsch", + "homepage": "https://drupal.org/u/chrfritsch", + "role": "Maintainer" + }, + { + "name": "Primoz Hmeljak", + "homepage": "https://drupal.org/u/Primsi", + "role": "Maintainer" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/1998478/committers", + "role": "contributor" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + }, + { + "name": "wouters_f", + "homepage": "https://www.drupal.org/user/721548" + }, + { + "name": "zkday", + "homepage": "https://www.drupal.org/user/888644" + } + ], + "description": "Drupal integration for DropzoneJS - An open source library that provides drag’n’drop file uploads with image previews.", + "homepage": "https://www.drupal.org/project/dropzonejs", + "keywords": [ + "DropzoneJS", + "Drupal" + ], + "support": { + "source": "https://www.drupal.org/project/dropzonejs", + "issues": "https://www.drupal.org/project/issues/dropzonejs", + "irc": "irc://irc.freenode.org/drupal-contribute" + } + }, + { + "name": "drupal/entity", + "version": "1.0.0-beta1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/entity", + "reference": "8.x-1.0-beta1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/entity-8.x-1.0-beta1.zip", + "reference": "8.x-1.0-beta1", + "shasum": "6965349818de8cb820113b6841076162190c1a4c" + }, + "require": { + "drupal/core": "~8.3" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta1", + "datestamp": "1505895844", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "bojanz", + "homepage": "https://www.drupal.org/user/86106" + }, + { + "name": "dawehner", + "homepage": "https://www.drupal.org/user/99340" + }, + { + "name": "dixon_", + "homepage": "https://www.drupal.org/user/239911" + }, + { + "name": "fago", + "homepage": "https://www.drupal.org/user/16747" + } + ], + "description": "Provides expanded entity APIs, which will be moved to Drupal core one day.", + "homepage": "http://drupal.org/project/entity", + "support": { + "source": "http://cgit.drupalcode.org/entity" + } + }, + { + "name": "drupal/entity_browser", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/entity_browser", + "reference": "8.x-1.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/entity_browser-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "4375e996b8d1e103ca5daf9ce352e2af9cab568f" + }, + "require": { + "drupal/core": "~8.0" + }, + "require-dev": { + "drupal/ctools": "*", + "drupal/inline_entity_form": "*", + "drupal/media_entity": "*", + "drupal/paragraphs": "*", + "drupal/token": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-8.x-1.x": "8.1.x-dev" + }, + "drupal": { + "version": "8.x-1.4", + "datestamp": "1512033785", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Janez Urevc", + "homepage": "https://github.com/slashrsm", + "role": "Maintainer" + }, + { + "name": "Primoz Hmeljak", + "homepage": "https://github.com/primsi", + "role": "Maintainer" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/1943336/committers", + "role": "contributor" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "marcingy", + "homepage": "https://www.drupal.org/user/77320" + }, + { + "name": "samuel.mortenson", + "homepage": "https://www.drupal.org/user/2582268" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Entity browsing and selecting component.", + "homepage": "http://drupal.org/project/entity_browser", + "support": { + "source": "http://cgit.drupalcode.org/entity_browser", + "issues": "http://drupal.org/project/issues/entity_browser", + "irc": "irc://irc.freenode.org/drupal-contribute" + } + }, + { + "name": "drupal/fieldable_path", + "version": "1.0.0-rc4", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/fieldable_path", + "reference": "8.x-1.0-rc4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/fieldable_path-8.x-1.0-rc4.zip", + "reference": "8.x-1.0-rc4", + "shasum": "2082a6818668d8e4f51f62d7b0abb155ff2304da" + }, + "require": { + "drupal/core": "*" + }, + "require-dev": { + "drupal/pathauto": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-rc4", + "datestamp": "1495283883", + "security-coverage": { + "status": "not-covered", + "message": "RC releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Spleshka", + "homepage": "https://www.drupal.org/user/810676" + } + ], + "description": "Provides a fieldable mirror of \"path\" property for entities.", + "homepage": "https://www.drupal.org/project/fieldable_path", + "support": { + "source": "http://cgit.drupalcode.org/fieldable_path" + } + }, + { + "name": "drupal/graphql", + "version": "3.0.0-beta2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/graphql", + "reference": "8.x-3.0-beta2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/graphql-8.x-3.0-beta2.zip", + "reference": "8.x-3.0-beta2", + "shasum": "082a42aafc2d27f18f7dfc7b22e4a2a260ff013b" + }, + "require": { + "drupal/core": "~8.0", + "youshido/graphql": "~1.5" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev" + }, + "drupal": { + "version": "8.x-3.0-beta2", + "datestamp": "1513314785", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "fubhy", + "homepage": "https://www.drupal.org/user/761344" + }, + { + "name": "pmelab", + "homepage": "https://www.drupal.org/user/555322" + } + ], + "description": "Exposes your Drupal data model through a GraphQL schema.", + "homepage": "http://drupal.org/project/graphql", + "support": { + "source": "http://cgit.drupalcode.org/graphql" + } + }, + { + "name": "drupal/jsonapi", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/jsonapi", + "reference": "8.x-1.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jsonapi-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "ba38178daaecac2e6b88a5180fccb3edecd00b67" + }, + "require": { + "drupal/core": "^8.2" + }, + "require-dev": { + "justinrainbow/json-schema": "^4.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.4", + "datestamp": "1512815585", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "patches_applied": { + "Make the file URLs full URLs": "https://www.drupal.org/files/issues/2929600--use-full-url-file--2.patch" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Wim Leers", + "homepage": "https://www.drupal.org/user/99777" + }, + { + "name": "dawehner", + "homepage": "https://www.drupal.org/user/99340" + }, + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + }, + { + "name": "gabesullice", + "homepage": "https://www.drupal.org/user/2287430" + } + ], + "description": "Provides a JSON API standards-compliant API for accessing and manipulating Drupal content and configuration entities.", + "homepage": "https://www.drupal.org/project/jsonapi", + "support": { + "source": "http://cgit.drupalcode.org/jsonapi" + } + }, + { + "name": "drupal/jsonapi_extras", + "version": "1.0.0-beta2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/jsonapi_extras", + "reference": "8.x-1.0-beta2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jsonapi_extras-8.x-1.0-beta2.zip", + "reference": "8.x-1.0-beta2", + "shasum": "dd326b7ebfb00d44a8eeb0fd36980a6fee3fe2f1" + }, + "require": { + "drupal/core": "~8.0", + "drupal/jsonapi": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta2", + "datestamp": "1507731243", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "e0ipso", + "homepage": "https://www.drupal.org/user/550110" + } + ], + "description": "Builds on top of JSON API to deliver extra functionality.", + "homepage": "https://www.drupal.org/project/jsonapi_extras", + "support": { + "source": "http://cgit.drupalcode.org/jsonapi_extras" + } + }, + { + "name": "drupal/material_admin", + "version": "1.0.0-alpha2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/material_admin", + "reference": "8.x-1.0-alpha2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/material_admin-8.x-1.0-alpha2.zip", + "reference": "8.x-1.0-alpha2", + "shasum": "49771a7e624550f17960669686723924d7bf6d05" + }, + "require": { + "drupal/core": "~8.0" + }, + "type": "drupal-theme", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha2", + "datestamp": "1513287484", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Bcwald", + "homepage": "https://www.drupal.org/user/215794" + }, + { + "name": "samuel.mortenson", + "homepage": "https://www.drupal.org/user/2582268" + } + ], + "description": "Material Design Admin Theme", + "homepage": "https://www.drupal.org/project/material_admin", + "support": { + "source": "http://cgit.drupalcode.org/material_admin" + } + }, + { + "name": "drupal/media_entity", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/media_entity", + "reference": "8.x-1.7" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_entity-8.x-1.7.zip", + "reference": "8.x-1.7", + "shasum": "5f7ccdf1db07732f3c94e642e60d88746e73cc86" + }, + "require": { + "drupal/core": "*", + "drupal/entity": "*" + }, + "require-dev": { + "drupal/entity": "*", + "drupal/inline_entity_form": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.7", + "datestamp": "1510737185", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Berdir", + "homepage": "https://www.drupal.org/user/214652" + }, + { + "name": "Dave Reid", + "homepage": "https://www.drupal.org/user/53892" + }, + { + "name": "Drupal Media Team", + "homepage": "https://www.drupal.org/user/3260690" + }, + { + "name": "Drupal media CI", + "homepage": "https://www.drupal.org/user/3057985" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "boztek", + "homepage": "https://www.drupal.org/user/134410" + }, + { + "name": "chr.fritsch", + "homepage": "https://www.drupal.org/user/2103716" + }, + { + "name": "jcisio", + "homepage": "https://www.drupal.org/user/210762" + }, + { + "name": "katzilla", + "homepage": "https://www.drupal.org/user/260398" + }, + { + "name": "marcoscano", + "homepage": "https://www.drupal.org/user/1288796" + }, + { + "name": "phenaproxima", + "homepage": "https://www.drupal.org/user/205645" + }, + { + "name": "seanB", + "homepage": "https://www.drupal.org/user/545912" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Media entity API.", + "homepage": "https://www.drupal.org/project/media_entity", + "support": { + "source": "http://cgit.drupalcode.org/media_entity" + } + }, + { + "name": "drupal/media_entity_browser", + "version": "1.0.0-beta3", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/media_entity_browser", + "reference": "8.x-1.0-beta3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_entity_browser-8.x-1.0-beta3.zip", + "reference": "8.x-1.0-beta3", + "shasum": "f6f9f13bb0aa6bfd0a61667a47ca60c5282341d5" + }, + "require": { + "drupal/core": "~8.0", + "drupal/entity_browser": "*", + "drupal/media_entity": "*" + }, + "require-dev": { + "drupal/ctools": "*", + "drupal/entity_browser": "*", + "drupal/media_entity": "*", + "drupal/video_embed_field": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-beta3", + "datestamp": "1487741885", + "security-coverage": { + "status": "not-covered", + "message": "Beta releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Sam152", + "homepage": "https://www.drupal.org/user/1485048" + }, + { + "name": "benjy", + "homepage": "https://www.drupal.org/user/1852732" + }, + { + "name": "larowlan", + "homepage": "https://www.drupal.org/user/395439" + }, + { + "name": "rikki_iki", + "homepage": "https://www.drupal.org/user/1068918" + } + ], + "description": "This module provides an Entity Browser for Media Entity.", + "homepage": "https://www.drupal.org/project/media_entity_browser", + "support": { + "source": "http://cgit.drupalcode.org/media_entity_browser" + } + }, + { + "name": "drupal/media_entity_image", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/media_entity_image", + "reference": "8.x-1.2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_entity_image-8.x-1.2.zip", + "reference": "8.x-1.2", + "shasum": "d02d1d793a50ea3b9cb5a3219472fdd27980f4f3" + }, + "require": { + "drupal/core": "~8.1", + "drupal/media_entity": "~1.0 || ~8.1.0" + }, + "require-dev": { + "drupal/entity_browser": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.2", + "datestamp": "1470170939", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Drupal Media Team", + "homepage": "https://www.drupal.org/user/3260690" + }, + { + "name": "Primsi", + "homepage": "https://www.drupal.org/user/282629" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Local images integration for Drupal Media entity.", + "homepage": "https://www.drupal.org/project/media_entity_image", + "keywords": [ + "Drupal", + "image", + "media" + ], + "support": { + "source": "https://www.drupal.org/project/media_entity_image", + "issues": "https://www.drupal.org/project/issues/media_entity_image" + } + }, + { + "name": "drupal/openapi", + "version": "1.0.0-alpha1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/openapi", + "reference": "8.x-1.0-alpha1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/openapi-8.x-1.0-alpha1.zip", + "reference": "8.x-1.0-alpha1", + "shasum": "580e244c5a53419e95dfb8c7b7b9c67273b8e9b9" + }, + "require": { + "drupal/core": "~8.0", + "drupal/schemata": "^1.0", + "drupal/schemata_json_schema": "*" + }, + "require-dev": { + "drupal/jsonapi": "1.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha1", + "datestamp": "1498657743", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "mrjmd", + "homepage": "https://www.drupal.org/user/1800446" + }, + { + "name": "rogierbom", + "homepage": "https://www.drupal.org/user/1352176" + }, + { + "name": "tedbow", + "homepage": "https://www.drupal.org/user/240860" + } + ], + "description": "Creates OpenAPI specification for Drupal REST resources.", + "homepage": "https://www.drupal.org/project/openapi", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/openapi", + "issues": "http://drupal.org/project/issues/openapi" + } + }, + { + "name": "drupal/schemata", + "version": "1.0.0-alpha2", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/schemata", + "reference": "8.x-1.0-alpha2" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/schemata-8.x-1.0-alpha2.zip", + "reference": "8.x-1.0-alpha2", + "shasum": "25c350188a7fff372582d468d6fed41425a933d1" + }, + "require": { + "drupal/core": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha2", + "datestamp": "1498495443", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Grayside", + "homepage": "https://www.drupal.org/user/346868" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "pcho", + "homepage": "https://www.drupal.org/user/1619590" + }, + { + "name": "srjosh", + "homepage": "https://www.drupal.org/user/165878" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Provide schema definitions of Drupal entities for type validation, code generation, and documentation.", + "homepage": "https://www.drupal.org/project/schemata", + "support": { + "source": "http://cgit.drupalcode.org/schemata" + } + }, + { + "name": "drupal/schemata_json_schema", + "version": "1.0.0-alpha2", + "require": { + "drupal/core": "~8.0", + "drupal/schemata": "self.version" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.0-alpha2", + "datestamp": "1498495443", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", "license": [ "GPL-2.0+" ], - "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2017-11-03T13:20:16+00:00" + "authors": [ + { + "name": "Grayside", + "homepage": "https://www.drupal.org/user/346868" + }, + { + "name": "HalfChem", + "homepage": "https://www.drupal.org/user/1608382" + }, + { + "name": "febbraro", + "homepage": "https://www.drupal.org/user/43670" + }, + { + "name": "jhedstrom", + "homepage": "https://www.drupal.org/user/208732" + }, + { + "name": "pcho", + "homepage": "https://www.drupal.org/user/1619590" + }, + { + "name": "srjosh", + "homepage": "https://www.drupal.org/user/165878" + }, + { + "name": "tekante", + "homepage": "https://www.drupal.org/user/640024" + } + ], + "description": "Provides a data models for entity types and bundles in JSON schema format.", + "homepage": "https://www.drupal.org/project/schemata", + "support": { + "source": "http://cgit.drupalcode.org/schemata" + } }, { "name": "drupal/simple_block", @@ -1710,6 +2937,112 @@ "source": "http://cgit.drupalcode.org/simple_block" } }, + { + "name": "drupal/simple_oauth", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/simple_oauth", + "reference": "8.x-3.3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/simple_oauth-8.x-3.3.zip", + "reference": "8.x-3.3", + "shasum": "08f6c732da67715e86e5fb76a95c77f55cb88e97" + }, + "require": { + "drupal/consumers": "*", + "drupal/core": "^8.3", + "league/oauth2-server": "~6.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev" + }, + "drupal": { + "version": "8.x-3.3", + "datestamp": "1511538185", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/550110", + "email": "mateu.aguilo.bosch@gmail.com" + }, + { + "name": "pcambra", + "homepage": "https://www.drupal.org/user/122101" + } + ], + "description": "The Simple OAuth module for Drupal", + "homepage": "https://www.drupal.org/project/simple_oauth", + "support": { + "source": "http://cgit.drupalcode.org/simple_oauth" + } + }, + { + "name": "drupal/subrequests", + "version": "2.0.0-rc1", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/subrequests", + "reference": "8.x-2.0-rc1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/subrequests-8.x-2.0-rc1.zip", + "reference": "8.x-2.0-rc1", + "shasum": "e33382040888402b4fcf91c52dfd62ca8a4e99da" + }, + "require": { + "drupal/core": "*", + "skyscanner/jsonpath": "dev-master" + }, + "require-dev": { + "justinrainbow/json-schema": "^4.1" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + }, + "drupal": { + "version": "8.x-2.0-rc1", + "datestamp": "1513331585", + "security-coverage": { + "status": "not-covered", + "message": "RC releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Mateu Aguiló Bosch", + "homepage": "https://www.drupal.org/user/550110", + "email": "mateu.aguilo.bosch@gmail.com" + } + ], + "description": "Add a front controller that you can use to make subrequests.", + "homepage": "https://www.drupal.org/project/subrequests", + "support": { + "source": "http://cgit.drupalcode.org/subrequests" + } + }, { "name": "drush/drush", "version": "8.1.15", @@ -2243,6 +3576,182 @@ ], "time": "2015-04-20T18:58:01+00:00" }, + { + "name": "lcobucci/jwt", + "version": "3.2.2", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "0b5930be73582369e10c4d4bb7a12bac927a203c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/0b5930be73582369e10c4d4bb7a12bac927a203c", + "reference": "0b5930be73582369e10c4d4bb7a12bac927a203c", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">=5.5" + }, + "require-dev": { + "mdanter/ecc": "~0.3.1", + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "~4.5", + "squizlabs/php_codesniffer": "~2.3" + }, + "suggest": { + "mdanter/ecc": "Required to use Elliptic Curves based algorithms." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "time": "2017-09-01T08:23:26+00:00" + }, + { + "name": "league/event", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/event.git", + "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/event/zipball/e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", + "reference": "e4bfc88dbcb60c8d8a2939a71f9813e141bbe4cd", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "~2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Event\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Event package", + "keywords": [ + "emitter", + "event", + "listener" + ], + "time": "2015-05-21T12:24:47+00:00" + }, + { + "name": "league/oauth2-server", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth2-server.git", + "reference": "925776958fc3f5278e74363663c20147af32b668" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/925776958fc3f5278e74363663c20147af32b668", + "reference": "925776958fc3f5278e74363663c20147af32b668", + "shasum": "" + }, + "require": { + "defuse/php-encryption": "^2.1", + "ext-openssl": "*", + "lcobucci/jwt": "^3.1", + "league/event": "^2.1", + "paragonie/random_compat": "^2.0", + "php": ">=5.6.0", + "psr/http-message": "^1.0" + }, + "replace": { + "league/oauth2server": "*", + "lncd/oauth2": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0", + "zendframework/zend-diactoros": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\OAuth2\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Bilbie", + "email": "hello@alexbilbie.com", + "homepage": "http://www.alexbilbie.com", + "role": "Developer" + } + ], + "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", + "homepage": "https://oauth2.thephpleague.com/", + "keywords": [ + "Authentication", + "api", + "auth", + "authorisation", + "authorization", + "oauth", + "oauth 2", + "oauth 2.0", + "oauth2", + "protect", + "resource", + "secure", + "server" + ], + "time": "2017-08-03T15:09:23+00:00" + }, { "name": "masterminds/html5", "version": "2.3.0", @@ -2813,6 +4322,54 @@ "homepage": "https://github.com/rvtraveller/qs-composer-installer", "time": "2017-01-27T20:40:31+00:00" }, + { + "name": "skyscanner/jsonpath", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Skyscanner/JsonPath-PHP.git", + "reference": "d08d1efeadad3345257249e35e8cfd65f21256ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Skyscanner/JsonPath-PHP/zipball/d08d1efeadad3345257249e35e8cfd65f21256ae", + "reference": "d08d1efeadad3345257249e35e8cfd65f21256ae", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "sami/sami": ">=3.3.0", + "satooshi/php-coveralls": ">=1.0.1" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonPath\\": "src/Skyscanner/", + "Utilities\\": "src/Skyscanner/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache 2.0" + ], + "authors": [ + { + "name": "Alessio Linares", + "email": "alessio.linares@skyscanner.net", + "role": "Software Engineer" + } + ], + "description": "JSONPath implementation for querying and updating JSON objects", + "keywords": [ + "json", + "jsonpath", + "path" + ], + "time": "2017-09-13 09:14:46" + }, { "name": "stack/builder", "version": "v1.0.4", @@ -4819,6 +6376,49 @@ "description": "Composer plugin to merge multiple composer.json files", "time": "2017-04-25T02:31:25+00:00" }, + { + "name": "youshido/graphql", + "version": "v1.5.2", + "source": { + "type": "git", + "url": "https://github.com/Youshido/GraphQL.git", + "reference": "627de161919059821a5411b9f3d58c26afb81683" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Youshido/GraphQL/zipball/627de161919059821a5411b9f3d58c26afb81683", + "reference": "627de161919059821a5411b9f3d58c26afb81683", + "shasum": "" + }, + "require": { + "php": ">=5.5,<8.0-DEV" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Youshido\\GraphQL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexandr Viniychuk", + "email": "a@viniychuk.com" + }, + { + "name": "Portey Vasil", + "email": "portey@gmail.com" + } + ], + "description": "Pure PHP GraphQL", + "time": "2017-10-20T11:25:48+00:00" + }, { "name": "zendframework/zend-diactoros", "version": "1.4.1", @@ -6947,7 +8547,7 @@ } ], "aliases": [], - "minimum-stability": "alpha", + "minimum-stability": "dev", "stability-flags": { "drupal/simple_block": 10 }, From 71e8d7a86aa3ffd920dd398f79f86205e455fc50 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:53:13 -0600 Subject: [PATCH 09/20] setting profile name in settings.php --- web/sites/default/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 3a4f6be2a..afe20c4af 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -37,4 +37,4 @@ * * See: tests/installer-features/installer.feature */ -$settings['install_profile'] = 'standard'; +$settings['install_profile'] = 'contenta_jsonapi'; From 576786e6981902fbb6b0495145dfe2526f66e6e3 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:53:35 -0600 Subject: [PATCH 10/20] Adding default.services.yml --- web/sites/default/default.services.yml | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 web/sites/default/default.services.yml diff --git a/web/sites/default/default.services.yml b/web/sites/default/default.services.yml new file mode 100644 index 000000000..20254c3ba --- /dev/null +++ b/web/sites/default/default.services.yml @@ -0,0 +1,49 @@ +parameters: + session.storage.options: + gc_probability: 1 + gc_divisor: 100 + gc_maxlifetime: 200000 + cookie_lifetime: 2000000 + twig.config: + debug: false + auto_reload: null + cache: true + renderer.config: + required_cache_contexts: + - 'languages:language_interface' + - theme + - user.permissions + auto_placeholder_conditions: + max-age: 0 + contexts: + - session + - user + tags: { } + http.response.debug_cacheability_headers: false + factory.keyvalue: { } + factory.keyvalue.expirable: { } + filter_protocols: + - http + - https + - ftp + - news + - nntp + - tel + - telnet + - mailto + - irc + - ssh + - sftp + - webcal + - rtsp + cors.config: + enabled: true + allowedHeaders: + - '*' + allowedMethods: + - '*' + allowedOrigins: + - 'localhost:*' + exposedHeaders: false + maxAge: false + supportsCredentials: false From ed9d8addfd32cc0808bccfeff89e18cfe4c94045 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:53:59 -0600 Subject: [PATCH 11/20] allow default.services.yml in .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9a7b2b1c3..579ea00e7 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ web/autoload.php web/index.php web/robots.txt web/sites/default/default.services.pantheon.preproduction.yml -web/sites/default/default.services.yml web/sites/default/default.settings.php web/sites/default/settings.pantheon.php web/sites/development.services.yml From f28e32e87db1798efb2e5e21222261fca3ffe5c0 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 09:57:04 -0600 Subject: [PATCH 12/20] Changing install-cms step in composer.json --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 69cbf0554..f6ded11ab 100644 --- a/composer.json +++ b/composer.json @@ -85,9 +85,7 @@ }, "build-env": { "install-cms": [ - "drush site-install standard --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes", - "drush pm-enable config_direct_save simple_block --yes", - "drush pm-uninstall block_content --yes" + "drush site-install contenta_jsonapi --account-mail={account-mail} --account-name={account-name} --account-pass={account-pass} --site-mail={site-mail} --site-name={site-name} --yes" ], "export-configuration": "drush config-export --yes" }, From 33078591f3176c60e96efc073c786e07b2ae3965 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Fri, 5 Jan 2018 10:27:33 -0600 Subject: [PATCH 13/20] Update settings.php --- web/sites/default/settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index afe20c4af..8de46018f 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -19,9 +19,9 @@ /** * Place the config directory outside of the Drupal root. */ -$config_directories = array( - CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', -); +//$config_directories = array( +// CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', +//); /** * If there is a local settings file, then include it From cc5ed4e337ad95e0d603da436ced4ad69226ea59 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 18:10:41 -0600 Subject: [PATCH 14/20] toggle sync [ci skip] --- web/sites/default/settings.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 8de46018f..773022702 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -19,9 +19,18 @@ /** * Place the config directory outside of the Drupal root. */ -//$config_directories = array( -// CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', -//); +$config_directories = array( + CONFIG_SYNC_DIRECTORY => dirname(DRUPAL_ROOT) . '/config', +); + +// This is a silly way to detect if site install is happening and toggle the +// sync dir accordingly. @todo, I hope to think of a better option. +// Contenta install will fail if the sync dir is set to `/config`. But that is +// what the sync dir should be during normal usage. +$drush_args = drush_get_arguments(); +if (!empty($drush_args[0]) && 'site-install' === $drush_args[0]) { + unset($config_directories[CONFIG_SYNC_DIRECTORY]); +} /** * If there is a local settings file, then include it From aa490935e7fe024c00d7475bcf5ed14bd78f7a56 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 18:13:10 -0600 Subject: [PATCH 15/20] gitignore /keys/ [ci skip] --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 579ea00e7..3e99dca81 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,6 @@ Thumbs.db # Things in the core directory that Drupal 8 commits in the repository. !web/core/**/*.gz + +# Don't commit keys generated by contenta install +/keys/ From 94e3a42d4e8d7016a4e0d7e256d45bb0604afff1 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 18:17:06 -0600 Subject: [PATCH 16/20] Commit the same version of dropzone that is present at https://github.com/contentacms/contenta_jsonapi_project/tree/8.x-1.x/web/libraries/dropzone --- web/libraries/dropzone/.gitignore | 7 + web/libraries/dropzone/.tagconfig | 52 + web/libraries/dropzone/.travis.yml | 10 + web/libraries/dropzone/AMD_footer | 2 + web/libraries/dropzone/AMD_header | 11 + web/libraries/dropzone/CONTRIBUTING.md | 78 + web/libraries/dropzone/Gruntfile.coffee | 83 + web/libraries/dropzone/LICENSE | 12 + web/libraries/dropzone/README.md | 134 ++ web/libraries/dropzone/bower.json | 16 + web/libraries/dropzone/component.json | 10 + web/libraries/dropzone/composer.json | 18 + web/libraries/dropzone/dist/basic.css | 39 + .../dropzone/dist/dropzone-amd-module.js | 1782 +++++++++++++++ web/libraries/dropzone/dist/dropzone.css | 388 ++++ web/libraries/dropzone/dist/dropzone.js | 1767 +++++++++++++++ web/libraries/dropzone/dist/min/basic.min.css | 1 + .../dist/min/dropzone-amd-module.min.js | 2 + .../dropzone/dist/min/dropzone.min.css | 1 + .../dropzone/dist/min/dropzone.min.js | 2 + web/libraries/dropzone/dist/readme.md | 10 + web/libraries/dropzone/index.js | 1 + web/libraries/dropzone/package.json | 57 + web/libraries/dropzone/src/basic.scss | 78 + web/libraries/dropzone/src/dropzone.coffee | 1590 ++++++++++++++ web/libraries/dropzone/src/dropzone.scss | 413 ++++ web/libraries/dropzone/test.sh | 15 + web/libraries/dropzone/test/test.coffee | 1737 +++++++++++++++ web/libraries/dropzone/test/test.html | 22 + web/libraries/dropzone/test/test.js | 1939 +++++++++++++++++ 30 files changed, 10277 insertions(+) create mode 100755 web/libraries/dropzone/.gitignore create mode 100755 web/libraries/dropzone/.tagconfig create mode 100755 web/libraries/dropzone/.travis.yml create mode 100755 web/libraries/dropzone/AMD_footer create mode 100755 web/libraries/dropzone/AMD_header create mode 100755 web/libraries/dropzone/CONTRIBUTING.md create mode 100755 web/libraries/dropzone/Gruntfile.coffee create mode 100755 web/libraries/dropzone/LICENSE create mode 100755 web/libraries/dropzone/README.md create mode 100755 web/libraries/dropzone/bower.json create mode 100755 web/libraries/dropzone/component.json create mode 100755 web/libraries/dropzone/composer.json create mode 100755 web/libraries/dropzone/dist/basic.css create mode 100755 web/libraries/dropzone/dist/dropzone-amd-module.js create mode 100755 web/libraries/dropzone/dist/dropzone.css create mode 100755 web/libraries/dropzone/dist/dropzone.js create mode 100755 web/libraries/dropzone/dist/min/basic.min.css create mode 100755 web/libraries/dropzone/dist/min/dropzone-amd-module.min.js create mode 100755 web/libraries/dropzone/dist/min/dropzone.min.css create mode 100755 web/libraries/dropzone/dist/min/dropzone.min.js create mode 100755 web/libraries/dropzone/dist/readme.md create mode 100755 web/libraries/dropzone/index.js create mode 100755 web/libraries/dropzone/package.json create mode 100755 web/libraries/dropzone/src/basic.scss create mode 100755 web/libraries/dropzone/src/dropzone.coffee create mode 100755 web/libraries/dropzone/src/dropzone.scss create mode 100755 web/libraries/dropzone/test.sh create mode 100755 web/libraries/dropzone/test/test.coffee create mode 100755 web/libraries/dropzone/test/test.html create mode 100755 web/libraries/dropzone/test/test.js diff --git a/web/libraries/dropzone/.gitignore b/web/libraries/dropzone/.gitignore new file mode 100755 index 000000000..0a8439dca --- /dev/null +++ b/web/libraries/dropzone/.gitignore @@ -0,0 +1,7 @@ +build +components +node_modules +.DS_Store +.sass-cache +_site +_config.yaml \ No newline at end of file diff --git a/web/libraries/dropzone/.tagconfig b/web/libraries/dropzone/.tagconfig new file mode 100755 index 000000000..4e0cad936 --- /dev/null +++ b/web/libraries/dropzone/.tagconfig @@ -0,0 +1,52 @@ +{ + "files": [ + { + "name": "src/dropzone.coffee", + "regexs": [ + "Dropzone.version = \"###\"" + ] + }, + { + "name": "dist/dropzone.js", + "regexs": [ + "version = \"###\"" + ] + }, + { + "name": "dist/min/dropzone.min.js", + "regexs": [ + "version=\"###\"" + ] + }, + { + "name": "dist/dropzone-amd-module.js", + "regexs": [ + "version = \"###\"" + ] + }, + { + "name": "dist/min/dropzone-amd-module.min.js", + "regexs": [ + "version=\"###\"" + ] + }, + { + "name": "package.json", + "regexs": [ + "\"version\": \"###\"" + ] + }, + { + "name": "component.json", + "regexs": [ + "\"version\": \"###\"" + ] + }, + { + "name": "bower.json", + "regexs": [ + "\"version\": \"###\"" + ] + } + ] +} diff --git a/web/libraries/dropzone/.travis.yml b/web/libraries/dropzone/.travis.yml new file mode 100755 index 000000000..d03586be7 --- /dev/null +++ b/web/libraries/dropzone/.travis.yml @@ -0,0 +1,10 @@ +language: node_js +node_js: + - 0.10 +before_install: + - npm install -g grunt-cli + - gem install sass +install: npm install +before_script: + - grunt +script: ./test.sh compiled \ No newline at end of file diff --git a/web/libraries/dropzone/AMD_footer b/web/libraries/dropzone/AMD_footer new file mode 100755 index 000000000..9bd866f6f --- /dev/null +++ b/web/libraries/dropzone/AMD_footer @@ -0,0 +1,2 @@ + return module.exports; +})); \ No newline at end of file diff --git a/web/libraries/dropzone/AMD_header b/web/libraries/dropzone/AMD_header new file mode 100755 index 000000000..efe1358d4 --- /dev/null +++ b/web/libraries/dropzone/AMD_header @@ -0,0 +1,11 @@ +// Uses AMD or browser globals to create a jQuery plugin. +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else { + // Browser globals + factory(jQuery); + } +} (function (jQuery) { + var module = { exports: { } }; // Fake component diff --git a/web/libraries/dropzone/CONTRIBUTING.md b/web/libraries/dropzone/CONTRIBUTING.md new file mode 100755 index 000000000..56d9719b4 --- /dev/null +++ b/web/libraries/dropzone/CONTRIBUTING.md @@ -0,0 +1,78 @@ +Contribute +========== + + +> I have changed my branching model recently (November 2013)! Previously +> the latest version was always in develop, and pull request had to be +> made on this branch. This is no longer the case! + + +The latest version is always in the **[master](https://github.com/enyo/dropzone)** +branch. + + +> Please provide a test for any new feature (see the [testing section](#testing) below). + + +Communicate +----------- + +Before you start implementing new features, please create an issue about +it first and discuss your intent. + +It might be something that someone else is already implementing or that +goes against the concepts of Dropzone, and I really hate rejecting pull +requests others spent hours writing on. + + +Developer Dependencies +---------------------- + +The first thing you need to do, is to install the developer dependencies: + +```bash +$ npm install +``` + +This will install all the tools you need to compile the source files and to test +the library. + + +Coffeescript & Sass (-> Javascript & CSS) +------------------------------------------ + +Dropzone is written in [Coffeescript](http://coffeescript.org) and +[Sass](http://sass-lang.com/) so *do not* make +changes to the Javascript or CSS files + +**I will not merge requests written in Javascript or CSS.** + +Please don't include compiled `.js` or `.css` files in your pull requests but only +`.coffee` or `.scss` files. That way pull requests aren't polluted and I can see +immediately what you changed. + + +To build the library use [grunt](http://gruntjs.com). + +```bash +$ grunt -h # Displays available options +$ grunt # compiles all coffeescript and stylus files +$ grunt watch # watches for changes and builds on the fly +``` + +> I recommend using `grunt watch` when you begin developing. This way you can't +> forget to compile the source files and will avoid headaches. + + +Testing +------- + +To test the library, open `test/test.html` in your browser or type `npm test` +which will run the tests in your console in a headless browser. + +The tests are also written in coffeescript in the `test/test.coffee` file, +and compiled with `grunt js` or `grunt watch`. + + +* Thanks for contributing!* + diff --git a/web/libraries/dropzone/Gruntfile.coffee b/web/libraries/dropzone/Gruntfile.coffee new file mode 100755 index 000000000..32ba1f77a --- /dev/null +++ b/web/libraries/dropzone/Gruntfile.coffee @@ -0,0 +1,83 @@ +module.exports = (grunt) -> + + grunt.initConfig + pkg: grunt.file.readJSON "package.json" + + + sass: + options: + sourcemap: 'none' + + default: + files: [ + "dist/basic.css": "src/basic.scss" + "dist/dropzone.css": "src/dropzone.scss" + ] + compressed: + options: + style: 'compressed' + files: [ + "dist/min/basic.min.css": "src/basic.scss" + "dist/min/dropzone.min.css": "src/dropzone.scss" + ] + + coffee: + default: + files: + "dist/dropzone.js": "src/dropzone.coffee" + test: + files: + "test/test.js": "test/*.coffee" + + concat: + amd: + src: [ + "AMD_header" + "dist/dropzone.js" + "AMD_footer" + ] + dest: "dist/dropzone-amd-module.js" + + watch: + js: + files: [ + "src/dropzone.coffee" + ] + tasks: [ "js" ] + options: nospawn: on + test: + files: [ + "test/*.coffee" + ] + tasks: [ "coffee:test" ] + options: nospawn: on + css: + files: [ + "src/*.scss" + ] + tasks: [ "css" ] + options: nospawn: on + + uglify: + js: + files: [ + "dist/min/dropzone-amd-module.min.js": "dist/dropzone-amd-module.js" + "dist/min/dropzone.min.js": "dist/dropzone.js" + ] + + + + grunt.loadNpmTasks "grunt-contrib-coffee" + grunt.loadNpmTasks "grunt-contrib-sass" + grunt.loadNpmTasks "grunt-contrib-concat" + grunt.loadNpmTasks "grunt-contrib-watch" + grunt.loadNpmTasks "grunt-contrib-uglify" + + # Default tasks + grunt.registerTask "default", [ "downloads" ] + + grunt.registerTask "css", "Compile the sass files to css", [ "sass" ] + + grunt.registerTask "js", "Compile coffeescript", [ "coffee", "concat" ] + + grunt.registerTask "downloads", "Compile all stylus and coffeescript files and generate the download files", [ "js", "css", "uglify" ] diff --git a/web/libraries/dropzone/LICENSE b/web/libraries/dropzone/LICENSE new file mode 100755 index 000000000..2ec3379e5 --- /dev/null +++ b/web/libraries/dropzone/LICENSE @@ -0,0 +1,12 @@ +License + +(The MIT License) + +Copyright (c) 2012 Matias Meno +Logo & Website Design (c) 2015 "1910" www.weare1910.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/web/libraries/dropzone/README.md b/web/libraries/dropzone/README.md new file mode 100755 index 000000000..7db7c65f6 --- /dev/null +++ b/web/libraries/dropzone/README.md @@ -0,0 +1,134 @@ +Dropzone.js + +[ ![Codeship Status for enyo/dropzone](https://codeship.com/projects/3fc90800-74e0-0132-38ce-22ab3bab314c/status?branch=master)](https://codeship.com/projects/55087) + +Dropzone.js is a light weight JavaScript library that turns an HTML element into a dropzone. +This means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX. + +* * * + +_If you want support, please use [stackoverflow](http://stackoverflow.com/) with the `dropzone.js` tag and not the +GitHub issues tracker. Only post an issue here if you think you discovered a bug or have a feature request._ + +* * * + +**Please read the [contributing guidelines](CONTRIBUTING.md) before you start working on Dropzone!** + +
+ +
+
+ + +Starting with version 2.0.0 this library does no longer depend on jQuery (but +it still works as a jQuery module). + +Dropzone is compatible with [component](https://github.com/component/component), +there's a standalone version and an [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) +module that's compatible with [RequireJS](http://requirejs.org) in the downloads +folder. + + + + + +## Main features + +- Image thumbnail previews. Simply register the callback `thumbnail(file, data)` and display the image wherever you like +- Retina enabled +- Multiple files and synchronous uploads +- Progress updates +- Support for large files +- Complete theming. The look and feel of Dropzone is just the default theme. You + can define everything yourself by overwriting the default event listeners. +- Well tested + +## Documentation + +For the full documentation and installation please visit www.dropzonejs.com + +Please also refer to the [FAQ](https://github.com/enyo/dropzone/wiki/FAQ). + +## Examples + +For examples, please see the [GitHub wiki](https://github.com/enyo/dropzone/wiki). + +## Usage + +Implicit creation: + +```html +
+``` + +That's it. Really! + +Dropzone will automatically attach to it, and handle file drops. + +Want more control? You can configure dropzones like this: + +```js +// "myAwesomeDropzone" is the camelized version of the ID of your HTML element +Dropzone.options.myAwesomeDropzone = { maxFilesize: 1 }; +``` + +...or instantiate dropzone manually like this: + +```js +new Dropzone("div#my-dropzone", { /* options */ }); +``` + +> Note that dropzones don't have to be forms. But if you choose another element you have to pass the `url` parameter in the options. + +For configuration options please look at the [documentation on the website](http://www.dropzonejs.com/#configuration) +or at the [source](https://github.com/enyo/dropzone/blob/master/src/dropzone.coffee#L90). + + + +### Register for events + +If you want to register to some event you can do so on the `dropzone` object itself: + +```js +Dropzone.options.myDropzone({ + init: function() { + this.on("error", function(file, message) { alert(message); }); + } +}); +// or if you need to access a Dropzone somewhere else: +var myDropzone = Dropzone.forElement("div#my-dropzone"); +myDropzone.on("error", function(file, message) { alert(message); }); +``` + +For a list of all events, please look at the chapter +[»Events«](http://www.dropzonejs.com/#events) in the documentation +or at the [source](src/dropzone.coffee#L43). + + +## Browser support + +- Chrome 7+ +- Firefox 4+ +- IE 10+ +- Opera 12+ (Version 12 for MacOS is disabled because their API is buggy) +- Safari 6+ + +For all the other browsers, dropzone provides an oldschool file input fallback. + +## Why another library? + +I realize that there [are](http://valums.com/ajax-upload/) [already](http://tutorialzine.com/2011/09/html5-file-upload-jquery-php/) [other](http://code.google.com/p/html5uploader/) [libraries](http://blueimp.github.com/jQuery-File-Upload/) out there but the reason I decided to write my own are the following: + +- I didn't want it to be too big, and to cumbersome to dive into. +- I want to design my own elements. I only want to register callbacks so I can update my elements accordingly. +- Big files should get uploaded without a problem. +- I wanted a callback for image previews, that don't kill the browser if too many too big images are viewed. +- I want to use the latest API of browsers. I don't care if it falls back to the normal upload form if the browser is too old. +- I don't think that it's necessary anymore to depend on libraries such as jQuery (especially when providing functionality that isn't available in old browsers anyway). + +MIT License +----------- + +See LICENSE file diff --git a/web/libraries/dropzone/bower.json b/web/libraries/dropzone/bower.json new file mode 100755 index 000000000..2c3730853 --- /dev/null +++ b/web/libraries/dropzone/bower.json @@ -0,0 +1,16 @@ +{ + "name": "dropzone", + "location": "enyo/dropzone", + "version": "4.3.0", + "description": "Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.", + "homepage": "http://www.dropzonejs.com", + "main": [ + "dist/min/dropzone.min.css", + "dist/min/dropzone.min.js" + ], + "ignore": [ + "*", + "!dist", + "!dist/**/*" + ] +} diff --git a/web/libraries/dropzone/component.json b/web/libraries/dropzone/component.json new file mode 100755 index 000000000..06a9f17d9 --- /dev/null +++ b/web/libraries/dropzone/component.json @@ -0,0 +1,10 @@ +{ + "name": "dropzone", + "repo": "enyo/dropzone", + "version": "4.3.0", + "description": "Handles drag and drop of files for you.", + "scripts": [ "index.js", "dist/dropzone.js" ], + "styles": [ "dist/basic.css" ], + "dependencies": { }, + "license": "MIT" +} diff --git a/web/libraries/dropzone/composer.json b/web/libraries/dropzone/composer.json new file mode 100755 index 000000000..6be638756 --- /dev/null +++ b/web/libraries/dropzone/composer.json @@ -0,0 +1,18 @@ +{ + "name": "enyo/dropzone", + "description": "Handles drag and drop of files for you.", + "homepage": "http://www.dropzonejs.com", + "keywords": [ + "dragndrop", + "drag and drop", + "file upload", + "upload" + ], + "authors": [{ + "name": "Matias Meno", + "email": "m@tias.me", + "homepage": "http://www.matiasmeno.com" + }], + "license": "MIT", + "minimum-stability": "dev" +} diff --git a/web/libraries/dropzone/dist/basic.css b/web/libraries/dropzone/dist/basic.css new file mode 100755 index 000000000..b72d7deaa --- /dev/null +++ b/web/libraries/dropzone/dist/basic.css @@ -0,0 +1,39 @@ +/* + * The MIT License + * Copyright (c) 2012 Matias Meno + */ +.dropzone, .dropzone * { + box-sizing: border-box; } + +.dropzone { + position: relative; } + .dropzone .dz-preview { + position: relative; + display: inline-block; + width: 120px; + margin: 0.5em; } + .dropzone .dz-preview .dz-progress { + display: block; + height: 15px; + border: 1px solid #aaa; } + .dropzone .dz-preview .dz-progress .dz-upload { + display: block; + height: 100%; + width: 0; + background: green; } + .dropzone .dz-preview .dz-error-message { + color: red; + display: none; } + .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark { + display: block; } + .dropzone .dz-preview.dz-success .dz-success-mark { + display: block; } + .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark { + position: absolute; + display: none; + left: 30px; + top: 30px; + width: 54px; + height: 58px; + left: 50%; + margin-left: -27px; } diff --git a/web/libraries/dropzone/dist/dropzone-amd-module.js b/web/libraries/dropzone/dist/dropzone-amd-module.js new file mode 100755 index 000000000..18760e680 --- /dev/null +++ b/web/libraries/dropzone/dist/dropzone-amd-module.js @@ -0,0 +1,1782 @@ +// Uses AMD or browser globals to create a jQuery plugin. +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else { + // Browser globals + factory(jQuery); + } +} (function (jQuery) { + var module = { exports: { } }; // Fake component + + +/* + * + * More info at [www.dropzonejs.com](http://www.dropzonejs.com) + * + * Copyright (c) 2012, Matias Meno + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +(function() { + var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, + __slice = [].slice, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + noop = function() {}; + + Emitter = (function() { + function Emitter() {} + + Emitter.prototype.addEventListener = Emitter.prototype.on; + + Emitter.prototype.on = function(event, fn) { + this._callbacks = this._callbacks || {}; + if (!this._callbacks[event]) { + this._callbacks[event] = []; + } + this._callbacks[event].push(fn); + return this; + }; + + Emitter.prototype.emit = function() { + var args, callback, callbacks, event, _i, _len; + event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + this._callbacks = this._callbacks || {}; + callbacks = this._callbacks[event]; + if (callbacks) { + for (_i = 0, _len = callbacks.length; _i < _len; _i++) { + callback = callbacks[_i]; + callback.apply(this, args); + } + } + return this; + }; + + Emitter.prototype.removeListener = Emitter.prototype.off; + + Emitter.prototype.removeAllListeners = Emitter.prototype.off; + + Emitter.prototype.removeEventListener = Emitter.prototype.off; + + Emitter.prototype.off = function(event, fn) { + var callback, callbacks, i, _i, _len; + if (!this._callbacks || arguments.length === 0) { + this._callbacks = {}; + return this; + } + callbacks = this._callbacks[event]; + if (!callbacks) { + return this; + } + if (arguments.length === 1) { + delete this._callbacks[event]; + return this; + } + for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { + callback = callbacks[i]; + if (callback === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; + }; + + return Emitter; + + })(); + + Dropzone = (function(_super) { + var extend, resolveOption; + + __extends(Dropzone, _super); + + Dropzone.prototype.Emitter = Emitter; + + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + dropzone.on("dragEnter", function() { }); + */ + + Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; + + Dropzone.prototype.defaultOptions = { + url: null, + method: "post", + withCredentials: false, + parallelUploads: 2, + uploadMultiple: false, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 10, + thumbnailWidth: 120, + thumbnailHeight: 120, + filesizeBase: 1000, + maxFiles: null, + params: {}, + clickable: true, + ignoreHiddenFiles: true, + acceptedFiles: null, + acceptedMimeTypes: null, + autoProcessQueue: true, + autoQueue: true, + addRemoveLinks: false, + previewsContainer: null, + hiddenInputContainer: "body", + capture: null, + renameFilename: null, + dictDefaultMessage: "Drop files here to upload", + dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", + dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", + dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", + dictInvalidFileType: "You can't upload files of this type.", + dictResponseError: "Server responded with {{statusCode}} code.", + dictCancelUpload: "Cancel upload", + dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", + dictRemoveFile: "Remove file", + dictRemoveFileConfirmation: null, + dictMaxFilesExceeded: "You can not upload any more files.", + accept: function(file, done) { + return done(); + }, + init: function() { + return noop; + }, + forceFallback: false, + fallback: function() { + var child, messageElement, span, _i, _len, _ref; + this.element.className = "" + this.element.className + " dz-browser-not-supported"; + _ref = this.element.getElementsByTagName("div"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (/(^| )dz-message($| )/.test(child.className)) { + messageElement = child; + child.className = "dz-message"; + continue; + } + } + if (!messageElement) { + messageElement = Dropzone.createElement("
"); + this.element.appendChild(messageElement); + } + span = messageElement.getElementsByTagName("span")[0]; + if (span) { + if (span.textContent != null) { + span.textContent = this.options.dictFallbackMessage; + } else if (span.innerText != null) { + span.innerText = this.options.dictFallbackMessage; + } + } + return this.element.appendChild(this.getFallbackForm()); + }, + resize: function(file) { + var info, srcRatio, trgRatio; + info = { + srcX: 0, + srcY: 0, + srcWidth: file.width, + srcHeight: file.height + }; + srcRatio = file.width / file.height; + info.optWidth = this.options.thumbnailWidth; + info.optHeight = this.options.thumbnailHeight; + if ((info.optWidth == null) && (info.optHeight == null)) { + info.optWidth = info.srcWidth; + info.optHeight = info.srcHeight; + } else if (info.optWidth == null) { + info.optWidth = srcRatio * info.optHeight; + } else if (info.optHeight == null) { + info.optHeight = (1 / srcRatio) * info.optWidth; + } + trgRatio = info.optWidth / info.optHeight; + if (file.height < info.optHeight || file.width < info.optWidth) { + info.trgHeight = info.srcHeight; + info.trgWidth = info.srcWidth; + } else { + if (srcRatio > trgRatio) { + info.srcHeight = file.height; + info.srcWidth = info.srcHeight * trgRatio; + } else { + info.srcWidth = file.width; + info.srcHeight = info.srcWidth / trgRatio; + } + } + info.srcX = (file.width - info.srcWidth) / 2; + info.srcY = (file.height - info.srcHeight) / 2; + return info; + }, + + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + drop: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragstart: noop, + dragend: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragenter: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragover: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragleave: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + paste: noop, + reset: function() { + return this.element.classList.remove("dz-started"); + }, + addedfile: function(file) { + var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; + if (this.element === this.previewsContainer) { + this.element.classList.add("dz-started"); + } + if (this.previewsContainer) { + file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); + file.previewTemplate = file.previewElement; + this.previewsContainer.appendChild(file.previewElement); + _ref = file.previewElement.querySelectorAll("[data-dz-name]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + node.textContent = this._renameFilename(file.name); + } + _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + node = _ref1[_j]; + node.innerHTML = this.filesize(file.size); + } + if (this.options.addRemoveLinks) { + file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + file.previewElement.appendChild(file._removeLink); + } + removeFileEvent = (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + if (file.status === Dropzone.UPLOADING) { + return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { + return _this.removeFile(file); + }); + } else { + if (_this.options.dictRemoveFileConfirmation) { + return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { + return _this.removeFile(file); + }); + } else { + return _this.removeFile(file); + } + } + }; + })(this); + _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + removeLink = _ref2[_k]; + _results.push(removeLink.addEventListener("click", removeFileEvent)); + } + return _results; + } + }, + removedfile: function(file) { + var _ref; + if (file.previewElement) { + if ((_ref = file.previewElement) != null) { + _ref.parentNode.removeChild(file.previewElement); + } + } + return this._updateMaxFilesReachedClass(); + }, + thumbnail: function(file, dataUrl) { + var thumbnailElement, _i, _len, _ref; + if (file.previewElement) { + file.previewElement.classList.remove("dz-file-preview"); + _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + thumbnailElement = _ref[_i]; + thumbnailElement.alt = file.name; + thumbnailElement.src = dataUrl; + } + return setTimeout(((function(_this) { + return function() { + return file.previewElement.classList.add("dz-image-preview"); + }; + })(this)), 1); + } + }, + error: function(file, message) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + file.previewElement.classList.add("dz-error"); + if (typeof message !== "String" && message.error) { + message = message.error; + } + _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + _results.push(node.textContent = message); + } + return _results; + } + }, + errormultiple: noop, + processing: function(file) { + if (file.previewElement) { + file.previewElement.classList.add("dz-processing"); + if (file._removeLink) { + return file._removeLink.textContent = this.options.dictCancelUpload; + } + } + }, + processingmultiple: noop, + uploadprogress: function(file, progress, bytesSent) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + if (node.nodeName === 'PROGRESS') { + _results.push(node.value = progress); + } else { + _results.push(node.style.width = "" + progress + "%"); + } + } + return _results; + } + }, + totaluploadprogress: noop, + sending: noop, + sendingmultiple: noop, + success: function(file) { + if (file.previewElement) { + return file.previewElement.classList.add("dz-success"); + } + }, + successmultiple: noop, + canceled: function(file) { + return this.emit("error", file, "Upload canceled."); + }, + canceledmultiple: noop, + complete: function(file) { + if (file._removeLink) { + file._removeLink.textContent = this.options.dictRemoveFile; + } + if (file.previewElement) { + return file.previewElement.classList.add("dz-complete"); + } + }, + completemultiple: noop, + maxfilesexceeded: noop, + maxfilesreached: noop, + queuecomplete: noop, + addedfiles: noop, + previewTemplate: "
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
" + }; + + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + + function Dropzone(element, options) { + var elementOptions, fallback, _ref; + this.element = element; + this.version = Dropzone.version; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.clickableElements = []; + this.listeners = []; + this.files = []; + if (typeof this.element === "string") { + this.element = document.querySelector(this.element); + } + if (!(this.element && (this.element.nodeType != null))) { + throw new Error("Invalid dropzone element."); + } + if (this.element.dropzone) { + throw new Error("Dropzone already attached."); + } + Dropzone.instances.push(this); + this.element.dropzone = this; + elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { + return this.options.fallback.call(this); + } + if (this.options.url == null) { + this.options.url = this.element.getAttribute("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { + throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); + } + if (this.options.acceptedMimeTypes) { + this.options.acceptedFiles = this.options.acceptedMimeTypes; + delete this.options.acceptedMimeTypes; + } + this.options.method = this.options.method.toUpperCase(); + if ((fallback = this.getExistingFallback()) && fallback.parentNode) { + fallback.parentNode.removeChild(fallback); + } + if (this.options.previewsContainer !== false) { + if (this.options.previewsContainer) { + this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); + } else { + this.previewsContainer = this.element; + } + } + if (this.options.clickable) { + if (this.options.clickable === true) { + this.clickableElements = [this.element]; + } else { + this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); + } + } + this.init(); + } + + Dropzone.prototype.getAcceptedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getRejectedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (!file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getFilesWithStatus = function(status) { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === status) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getQueuedFiles = function() { + return this.getFilesWithStatus(Dropzone.QUEUED); + }; + + Dropzone.prototype.getUploadingFiles = function() { + return this.getFilesWithStatus(Dropzone.UPLOADING); + }; + + Dropzone.prototype.getAddedFiles = function() { + return this.getFilesWithStatus(Dropzone.ADDED); + }; + + Dropzone.prototype.getActiveFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.init = function() { + var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; + if (this.element.tagName === "form") { + this.element.setAttribute("enctype", "multipart/form-data"); + } + if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { + this.element.appendChild(Dropzone.createElement("
" + this.options.dictDefaultMessage + "
")); + } + if (this.clickableElements.length) { + setupHiddenFileInput = (function(_this) { + return function() { + if (_this.hiddenFileInput) { + _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput); + } + _this.hiddenFileInput = document.createElement("input"); + _this.hiddenFileInput.setAttribute("type", "file"); + if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { + _this.hiddenFileInput.setAttribute("multiple", "multiple"); + } + _this.hiddenFileInput.className = "dz-hidden-input"; + if (_this.options.acceptedFiles != null) { + _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); + } + if (_this.options.capture != null) { + _this.hiddenFileInput.setAttribute("capture", _this.options.capture); + } + _this.hiddenFileInput.style.visibility = "hidden"; + _this.hiddenFileInput.style.position = "absolute"; + _this.hiddenFileInput.style.top = "0"; + _this.hiddenFileInput.style.left = "0"; + _this.hiddenFileInput.style.height = "0"; + _this.hiddenFileInput.style.width = "0"; + document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput); + return _this.hiddenFileInput.addEventListener("change", function() { + var file, files, _i, _len; + files = _this.hiddenFileInput.files; + if (files.length) { + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _this.addFile(file); + } + } + _this.emit("addedfiles", files); + return setupHiddenFileInput(); + }); + }; + })(this); + setupHiddenFileInput(); + } + this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; + _ref1 = this.events; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + this.on(eventName, this.options[eventName]); + } + this.on("uploadprogress", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("removedfile", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("canceled", (function(_this) { + return function(file) { + return _this.emit("complete", file); + }; + })(this)); + this.on("complete", (function(_this) { + return function(file) { + if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { + return setTimeout((function() { + return _this.emit("queuecomplete"); + }), 0); + } + }; + })(this)); + noPropagation = function(e) { + e.stopPropagation(); + if (e.preventDefault) { + return e.preventDefault(); + } else { + return e.returnValue = false; + } + }; + this.listeners = [ + { + element: this.element, + events: { + "dragstart": (function(_this) { + return function(e) { + return _this.emit("dragstart", e); + }; + })(this), + "dragenter": (function(_this) { + return function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }; + })(this), + "dragover": (function(_this) { + return function(e) { + var efct; + try { + efct = e.dataTransfer.effectAllowed; + } catch (_error) {} + e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; + noPropagation(e); + return _this.emit("dragover", e); + }; + })(this), + "dragleave": (function(_this) { + return function(e) { + return _this.emit("dragleave", e); + }; + })(this), + "drop": (function(_this) { + return function(e) { + noPropagation(e); + return _this.drop(e); + }; + })(this), + "dragend": (function(_this) { + return function(e) { + return _this.emit("dragend", e); + }; + })(this) + } + } + ]; + this.clickableElements.forEach((function(_this) { + return function(clickableElement) { + return _this.listeners.push({ + element: clickableElement, + events: { + "click": function(evt) { + if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { + _this.hiddenFileInput.click(); + } + return true; + } + } + }); + }; + })(this)); + this.enable(); + return this.options.init.call(this); + }; + + Dropzone.prototype.destroy = function() { + var _ref; + this.disable(); + this.removeAllFiles(true); + if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { + this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); + this.hiddenFileInput = null; + } + delete this.element.dropzone; + return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); + }; + + Dropzone.prototype.updateTotalUploadProgress = function() { + var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; + totalBytesSent = 0; + totalBytes = 0; + activeFiles = this.getActiveFiles(); + if (activeFiles.length) { + _ref = this.getActiveFiles(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + totalBytesSent += file.upload.bytesSent; + totalBytes += file.upload.total; + } + totalUploadProgress = 100 * totalBytesSent / totalBytes; + } else { + totalUploadProgress = 100; + } + return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); + }; + + Dropzone.prototype._getParamName = function(n) { + if (typeof this.options.paramName === "function") { + return this.options.paramName(n); + } else { + return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); + } + }; + + Dropzone.prototype._renameFilename = function(name) { + if (typeof this.options.renameFilename !== "function") { + return name; + } + return this.options.renameFilename(name); + }; + + Dropzone.prototype.getFallbackForm = function() { + var existingFallback, fields, fieldsString, form; + if (existingFallback = this.getExistingFallback()) { + return existingFallback; + } + fieldsString = "
"; + if (this.options.dictFallbackText) { + fieldsString += "

" + this.options.dictFallbackText + "

"; + } + fieldsString += "
"; + fields = Dropzone.createElement(fieldsString); + if (this.element.tagName !== "FORM") { + form = Dropzone.createElement("
"); + form.appendChild(fields); + } else { + this.element.setAttribute("enctype", "multipart/form-data"); + this.element.setAttribute("method", this.options.method); + } + return form != null ? form : fields; + }; + + Dropzone.prototype.getExistingFallback = function() { + var fallback, getFallback, tagName, _i, _len, _ref; + getFallback = function(elements) { + var el, _i, _len; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )fallback($| )/.test(el.className)) { + return el; + } + } + }; + _ref = ["div", "form"]; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + tagName = _ref[_i]; + if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { + return fallback; + } + } + }; + + Dropzone.prototype.setupEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.addEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.removeEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.removeEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.disable = function() { + var file, _i, _len, _ref, _results; + this.clickableElements.forEach(function(element) { + return element.classList.remove("dz-clickable"); + }); + this.removeEventListeners(); + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + _results.push(this.cancelUpload(file)); + } + return _results; + }; + + Dropzone.prototype.enable = function() { + this.clickableElements.forEach(function(element) { + return element.classList.add("dz-clickable"); + }); + return this.setupEventListeners(); + }; + + Dropzone.prototype.filesize = function(size) { + var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; + selectedSize = 0; + selectedUnit = "b"; + if (size > 0) { + units = ['TB', 'GB', 'MB', 'KB', 'b']; + for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { + unit = units[i]; + cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; + if (size >= cutoff) { + selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); + selectedUnit = unit; + break; + } + } + selectedSize = Math.round(10 * selectedSize) / 10; + } + return "" + selectedSize + " " + selectedUnit; + }; + + Dropzone.prototype._updateMaxFilesReachedClass = function() { + if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + if (this.getAcceptedFiles().length === this.options.maxFiles) { + this.emit('maxfilesreached', this.files); + } + return this.element.classList.add("dz-max-files-reached"); + } else { + return this.element.classList.remove("dz-max-files-reached"); + } + }; + + Dropzone.prototype.drop = function(e) { + var files, items; + if (!e.dataTransfer) { + return; + } + this.emit("drop", e); + files = e.dataTransfer.files; + this.emit("addedfiles", files); + if (files.length) { + items = e.dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry != null)) { + this._addFilesFromItems(items); + } else { + this.handleFiles(files); + } + } + }; + + Dropzone.prototype.paste = function(e) { + var items, _ref; + if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { + return; + } + this.emit("paste", e); + items = e.clipboardData.items; + if (items.length) { + return this._addFilesFromItems(items); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype._addFilesFromItems = function(items) { + var entry, item, _i, _len, _results; + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { + if (entry.isFile) { + _results.push(this.addFile(item.getAsFile())); + } else if (entry.isDirectory) { + _results.push(this._addFilesFromDirectory(entry, entry.name)); + } else { + _results.push(void 0); + } + } else if (item.getAsFile != null) { + if ((item.kind == null) || item.kind === "file") { + _results.push(this.addFile(item.getAsFile())); + } else { + _results.push(void 0); + } + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.prototype._addFilesFromDirectory = function(directory, path) { + var dirReader, errorHandler, readEntries; + dirReader = directory.createReader(); + errorHandler = function(error) { + return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; + }; + readEntries = (function(_this) { + return function() { + return dirReader.readEntries(function(entries) { + var entry, _i, _len; + if (entries.length > 0) { + for (_i = 0, _len = entries.length; _i < _len; _i++) { + entry = entries[_i]; + if (entry.isFile) { + entry.file(function(file) { + if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { + return; + } + file.fullPath = "" + path + "/" + file.name; + return _this.addFile(file); + }); + } else if (entry.isDirectory) { + _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); + } + } + readEntries(); + } + return null; + }, errorHandler); + }; + })(this); + return readEntries(); + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); + } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { + return done(this.options.dictInvalidFileType); + } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); + return this.emit("maxfilesexceeded", file); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + file.upload = { + progress: 0, + total: file.size, + bytesSent: 0 + }; + this.files.push(file); + file.status = Dropzone.ADDED; + this.emit("addedfile", file); + this._enqueueThumbnail(file); + return this.accept(file, (function(_this) { + return function(error) { + if (error) { + file.accepted = false; + _this._errorProcessing([file], error); + } else { + file.accepted = true; + if (_this.options.autoQueue) { + _this.enqueueFile(file); + } + } + return _this._updateMaxFilesReachedClass(); + }; + })(this)); + }; + + Dropzone.prototype.enqueueFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + this.enqueueFile(file); + } + return null; + }; + + Dropzone.prototype.enqueueFile = function(file) { + if (file.status === Dropzone.ADDED && file.accepted === true) { + file.status = Dropzone.QUEUED; + if (this.options.autoProcessQueue) { + return setTimeout(((function(_this) { + return function() { + return _this.processQueue(); + }; + })(this)), 0); + } + } else { + throw new Error("This file can't be queued because it has already been processed or was rejected."); + } + }; + + Dropzone.prototype._thumbnailQueue = []; + + Dropzone.prototype._processingThumbnail = false; + + Dropzone.prototype._enqueueThumbnail = function(file) { + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this._thumbnailQueue.push(file); + return setTimeout(((function(_this) { + return function() { + return _this._processThumbnailQueue(); + }; + })(this)), 0); + } + }; + + Dropzone.prototype._processThumbnailQueue = function() { + if (this._processingThumbnail || this._thumbnailQueue.length === 0) { + return; + } + this._processingThumbnail = true; + return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { + return function() { + _this._processingThumbnail = false; + return _this._processThumbnailQueue(); + }; + })(this)); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.status === Dropzone.UPLOADING) { + this.cancelUpload(file); + } + this.files = without(this.files, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { + var file, _i, _len, _ref; + if (cancelIfNecessary == null) { + cancelIfNecessary = false; + } + _ref = this.files.slice(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { + this.removeFile(file); + } + } + return null; + }; + + Dropzone.prototype.createThumbnail = function(file, callback) { + var fileReader; + fileReader = new FileReader; + fileReader.onload = (function(_this) { + return function() { + if (file.type === "image/svg+xml") { + _this.emit("thumbnail", file, fileReader.result); + if (callback != null) { + callback(); + } + return; + } + return _this.createThumbnailFromUrl(file, fileReader.result, callback); + }; + })(this); + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) { + var img; + img = document.createElement("img"); + if (crossOrigin) { + img.crossOrigin = crossOrigin; + } + img.onload = (function(_this) { + return function() { + var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; + file.width = img.width; + file.height = img.height; + resizeInfo = _this.options.resize.call(_this, file); + if (resizeInfo.trgWidth == null) { + resizeInfo.trgWidth = resizeInfo.optWidth; + } + if (resizeInfo.trgHeight == null) { + resizeInfo.trgHeight = resizeInfo.optHeight; + } + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + canvas.width = resizeInfo.trgWidth; + canvas.height = resizeInfo.trgHeight; + drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); + thumbnail = canvas.toDataURL("image/png"); + _this.emit("thumbnail", file, thumbnail); + if (callback != null) { + return callback(); + } + }; + })(this); + if (callback != null) { + img.onerror = callback; + } + return img.src = imageUrl; + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength, queuedFiles; + parallelUploads = this.options.parallelUploads; + processingLength = this.getUploadingFiles().length; + i = processingLength; + if (processingLength >= parallelUploads) { + return; + } + queuedFiles = this.getQueuedFiles(); + if (!(queuedFiles.length > 0)) { + return; + } + if (this.options.uploadMultiple) { + return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); + } else { + while (i < parallelUploads) { + if (!queuedFiles.length) { + return; + } + this.processFile(queuedFiles.shift()); + i++; + } + } + }; + + Dropzone.prototype.processFile = function(file) { + return this.processFiles([file]); + }; + + Dropzone.prototype.processFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.processing = true; + file.status = Dropzone.UPLOADING; + this.emit("processing", file); + } + if (this.options.uploadMultiple) { + this.emit("processingmultiple", files); + } + return this.uploadFiles(files); + }; + + Dropzone.prototype._getFilesWithXhr = function(xhr) { + var file, files; + return files = (function() { + var _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.xhr === xhr) { + _results.push(file); + } + } + return _results; + }).call(this); + }; + + Dropzone.prototype.cancelUpload = function(file) { + var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; + if (file.status === Dropzone.UPLOADING) { + groupedFiles = this._getFilesWithXhr(file.xhr); + for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { + groupedFile = groupedFiles[_i]; + groupedFile.status = Dropzone.CANCELED; + } + file.xhr.abort(); + for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { + groupedFile = groupedFiles[_j]; + this.emit("canceled", groupedFile); + } + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", groupedFiles); + } + } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { + file.status = Dropzone.CANCELED; + this.emit("canceled", file); + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", [file]); + } + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + resolveOption = function() { + var args, option; + option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (typeof option === 'function') { + return option.apply(this, args); + } + return option; + }; + + Dropzone.prototype.uploadFile = function(file) { + return this.uploadFiles([file]); + }; + + Dropzone.prototype.uploadFiles = function(files) { + var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + xhr = new XMLHttpRequest(); + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.xhr = xhr; + } + method = resolveOption(this.options.method, files); + url = resolveOption(this.options.url, files); + xhr.open(method, url, true); + xhr.withCredentials = !!this.options.withCredentials; + response = null; + handleError = (function(_this) { + return function() { + var _j, _len1, _results; + _results = []; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); + } + return _results; + }; + })(this); + updateProgress = (function(_this) { + return function(e) { + var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; + if (e != null) { + progress = 100 * e.loaded / e.total; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + file.upload = { + progress: progress, + total: e.total, + bytesSent: e.loaded + }; + } + } else { + allFilesFinished = true; + progress = 100; + for (_k = 0, _len2 = files.length; _k < _len2; _k++) { + file = files[_k]; + if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { + allFilesFinished = false; + } + file.upload.progress = progress; + file.upload.bytesSent = file.upload.total; + } + if (allFilesFinished) { + return; + } + } + _results = []; + for (_l = 0, _len3 = files.length; _l < _len3; _l++) { + file = files[_l]; + _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); + } + return _results; + }; + })(this); + xhr.onload = (function(_this) { + return function(e) { + var _ref; + if (files[0].status === Dropzone.CANCELED) { + return; + } + if (xhr.readyState !== 4) { + return; + } + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + try { + response = JSON.parse(response); + } catch (_error) { + e = _error; + response = "Invalid JSON response from server."; + } + } + updateProgress(); + if (!((200 <= (_ref = xhr.status) && _ref < 300))) { + return handleError(); + } else { + return _this._finished(files, response, e); + } + }; + })(this); + xhr.onerror = (function(_this) { + return function() { + if (files[0].status === Dropzone.CANCELED) { + return; + } + return handleError(); + }; + })(this); + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = updateProgress; + headers = { + "Accept": "application/json", + "Cache-Control": "no-cache", + "X-Requested-With": "XMLHttpRequest" + }; + if (this.options.headers) { + extend(headers, this.options.headers); + } + for (headerName in headers) { + headerValue = headers[headerName]; + if (headerValue) { + xhr.setRequestHeader(headerName, headerValue); + } + } + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + this.emit("sending", file, xhr, formData); + } + if (this.options.uploadMultiple) { + this.emit("sendingmultiple", files, xhr, formData); + } + if (this.element.tagName === "FORM") { + _ref2 = this.element.querySelectorAll("input, textarea, select, button"); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + input = _ref2[_k]; + inputName = input.getAttribute("name"); + inputType = input.getAttribute("type"); + if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { + _ref3 = input.options; + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + option = _ref3[_l]; + if (option.selected) { + formData.append(inputName, option.value); + } + } + } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { + formData.append(inputName, input.value); + } + } + } + for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { + formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name)); + } + return this.submitRequest(xhr, formData, files); + }; + + Dropzone.prototype.submitRequest = function(xhr, formData, files) { + return xhr.send(formData); + }; + + Dropzone.prototype._finished = function(files, responseText, e) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.SUCCESS; + this.emit("success", file, responseText, e); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("successmultiple", files, responseText, e); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + Dropzone.prototype._errorProcessing = function(files, message, xhr) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.ERROR; + this.emit("error", file, message, xhr); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("errormultiple", files, message, xhr); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + return Dropzone; + + })(Emitter); + + Dropzone.version = "4.3.0"; + + Dropzone.options = {}; + + Dropzone.optionsForElement = function(element) { + if (element.getAttribute("id")) { + return Dropzone.options[camelize(element.getAttribute("id"))]; + } else { + return void 0; + } + }; + + Dropzone.instances = []; + + Dropzone.forElement = function(element) { + if (typeof element === "string") { + element = document.querySelector(element); + } + if ((element != null ? element.dropzone : void 0) == null) { + throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); + } + return element.dropzone; + }; + + Dropzone.autoDiscover = true; + + Dropzone.discover = function() { + var checkElements, dropzone, dropzones, _i, _len, _results; + if (document.querySelectorAll) { + dropzones = document.querySelectorAll(".dropzone"); + } else { + dropzones = []; + checkElements = function(elements) { + var el, _i, _len, _results; + _results = []; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )dropzone($| )/.test(el.className)) { + _results.push(dropzones.push(el)); + } else { + _results.push(void 0); + } + } + return _results; + }; + checkElements(document.getElementsByTagName("div")); + checkElements(document.getElementsByTagName("form")); + } + _results = []; + for (_i = 0, _len = dropzones.length; _i < _len; _i++) { + dropzone = dropzones[_i]; + if (Dropzone.optionsForElement(dropzone) !== false) { + _results.push(new Dropzone(dropzone)); + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.isBrowserSupported = function() { + var capableBrowser, regex, _i, _len, _ref; + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { + if (!("classList" in document.createElement("a"))) { + capableBrowser = false; + } else { + _ref = Dropzone.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } + } else { + capableBrowser = false; + } + return capableBrowser; + }; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match.charAt(1).toUpperCase(); + }); + }; + + Dropzone.createElement = function(string) { + var div; + div = document.createElement("div"); + div.innerHTML = string; + return div.childNodes[0]; + }; + + Dropzone.elementInside = function(element, container) { + if (element === container) { + return true; + } + while (element = element.parentNode) { + if (element === container) { + return true; + } + } + return false; + }; + + Dropzone.getElement = function(el, name) { + var element; + if (typeof el === "string") { + element = document.querySelector(el); + } else if (el.nodeType != null) { + element = el; + } + if (element == null) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); + } + return element; + }; + + Dropzone.getElements = function(els, name) { + var e, el, elements, _i, _j, _len, _len1, _ref; + if (els instanceof Array) { + elements = []; + try { + for (_i = 0, _len = els.length; _i < _len; _i++) { + el = els[_i]; + elements.push(this.getElement(el, name)); + } + } catch (_error) { + e = _error; + elements = null; + } + } else if (typeof els === "string") { + elements = []; + _ref = document.querySelectorAll(els); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + el = _ref[_j]; + elements.push(el); + } + } else if (els.nodeType != null) { + elements = [els]; + } + if (!((elements != null) && elements.length)) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); + } + return elements; + }; + + Dropzone.confirm = function(question, accepted, rejected) { + if (window.confirm(question)) { + return accepted(); + } else if (rejected != null) { + return rejected(); + } + }; + + Dropzone.isValidFile = function(file, acceptedFiles) { + var baseMimeType, mimeType, validType, _i, _len; + if (!acceptedFiles) { + return true; + } + acceptedFiles = acceptedFiles.split(","); + mimeType = file.type; + baseMimeType = mimeType.replace(/\/.*$/, ""); + for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { + validType = acceptedFiles[_i]; + validType = validType.trim(); + if (validType.charAt(0) === ".") { + if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { + return true; + } + } else if (/\/\*$/.test(validType)) { + if (baseMimeType === validType.replace(/\/.*$/, "")) { + return true; + } + } else { + if (mimeType === validType) { + return true; + } + } + } + return false; + }; + + if (typeof jQuery !== "undefined" && jQuery !== null) { + jQuery.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + } + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + + Dropzone.ADDED = "added"; + + Dropzone.QUEUED = "queued"; + + Dropzone.ACCEPTED = Dropzone.QUEUED; + + Dropzone.UPLOADING = "uploading"; + + Dropzone.PROCESSING = Dropzone.UPLOADING; + + Dropzone.CANCELED = "canceled"; + + Dropzone.ERROR = "error"; + + Dropzone.SUCCESS = "success"; + + + /* + + Bugfix for iOS 6 and 7 + Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios + based on the work of https://github.com/stomita/ios-imagefile-megapixel + */ + + detectVerticalSquash = function(img) { + var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; + iw = img.naturalWidth; + ih = img.naturalHeight; + canvas = document.createElement("canvas"); + canvas.width = 1; + canvas.height = ih; + ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + data = ctx.getImageData(0, 0, 1, ih).data; + sy = 0; + ey = ih; + py = ih; + while (py > sy) { + alpha = data[(py - 1) * 4 + 3]; + if (alpha === 0) { + ey = py; + } else { + sy = py; + } + py = (ey + sy) >> 1; + } + ratio = py / ih; + if (ratio === 0) { + return 1; + } else { + return ratio; + } + }; + + drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { + var vertSquashRatio; + vertSquashRatio = detectVerticalSquash(img); + return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); + }; + + + /* + * contentloaded.js + * + * Author: Diego Perini (diego.perini at gmail.com) + * Summary: cross-browser wrapper for DOMContentLoaded + * Updated: 20101020 + * License: MIT + * Version: 1.2 + * + * URL: + * http://javascript.nwbox.com/ContentLoaded/ + * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE + */ + + contentLoaded = function(win, fn) { + var add, doc, done, init, poll, pre, rem, root, top; + done = false; + top = true; + doc = win.document; + root = doc.documentElement; + add = (doc.addEventListener ? "addEventListener" : "attachEvent"); + rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); + pre = (doc.addEventListener ? "" : "on"); + init = function(e) { + if (e.type === "readystatechange" && doc.readyState !== "complete") { + return; + } + (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); + if (!done && (done = true)) { + return fn.call(win, e.type || e); + } + }; + poll = function() { + var e; + try { + root.doScroll("left"); + } catch (_error) { + e = _error; + setTimeout(poll, 50); + return; + } + return init("poll"); + }; + if (doc.readyState !== "complete") { + if (doc.createEventObject && root.doScroll) { + try { + top = !win.frameElement; + } catch (_error) {} + if (top) { + poll(); + } + } + doc[add](pre + "DOMContentLoaded", init, false); + doc[add](pre + "readystatechange", init, false); + return win[add](pre + "load", init, false); + } + }; + + Dropzone._autoDiscoverFunction = function() { + if (Dropzone.autoDiscover) { + return Dropzone.discover(); + } + }; + + contentLoaded(window, Dropzone._autoDiscoverFunction); + +}).call(this); + + return module.exports; +})); \ No newline at end of file diff --git a/web/libraries/dropzone/dist/dropzone.css b/web/libraries/dropzone/dist/dropzone.css new file mode 100755 index 000000000..0494d1ccf --- /dev/null +++ b/web/libraries/dropzone/dist/dropzone.css @@ -0,0 +1,388 @@ +/* + * The MIT License + * Copyright (c) 2012 Matias Meno + */ +@-webkit-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-moz-keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@keyframes passing-through { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30%, 70% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } + 100% { + opacity: 0; + -webkit-transform: translateY(-40px); + -moz-transform: translateY(-40px); + -ms-transform: translateY(-40px); + -o-transform: translateY(-40px); + transform: translateY(-40px); } } +@-webkit-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-moz-keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@keyframes slide-in { + 0% { + opacity: 0; + -webkit-transform: translateY(40px); + -moz-transform: translateY(40px); + -ms-transform: translateY(40px); + -o-transform: translateY(40px); + transform: translateY(40px); } + 30% { + opacity: 1; + -webkit-transform: translateY(0px); + -moz-transform: translateY(0px); + -ms-transform: translateY(0px); + -o-transform: translateY(0px); + transform: translateY(0px); } } +@-webkit-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@-moz-keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +@keyframes pulse { + 0% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } + 10% { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); } + 20% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); } } +.dropzone, .dropzone * { + box-sizing: border-box; } + +.dropzone { + min-height: 150px; + border: 2px solid rgba(0, 0, 0, 0.3); + background: white; + padding: 20px 20px; } + .dropzone.dz-clickable { + cursor: pointer; } + .dropzone.dz-clickable * { + cursor: default; } + .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * { + cursor: pointer; } + .dropzone.dz-started .dz-message { + display: none; } + .dropzone.dz-drag-hover { + border-style: solid; } + .dropzone.dz-drag-hover .dz-message { + opacity: 0.5; } + .dropzone .dz-message { + text-align: center; + margin: 2em 0; } + .dropzone .dz-preview { + position: relative; + display: inline-block; + vertical-align: top; + margin: 16px; + min-height: 100px; } + .dropzone .dz-preview:hover { + z-index: 1000; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-file-preview .dz-image { + border-radius: 20px; + background: #999; + background: linear-gradient(to bottom, #eee, #ddd); } + .dropzone .dz-preview.dz-file-preview .dz-details { + opacity: 1; } + .dropzone .dz-preview.dz-image-preview { + background: white; } + .dropzone .dz-preview.dz-image-preview .dz-details { + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; } + .dropzone .dz-preview .dz-remove { + font-size: 14px; + text-align: center; + display: block; + cursor: pointer; + border: none; } + .dropzone .dz-preview .dz-remove:hover { + text-decoration: underline; } + .dropzone .dz-preview:hover .dz-details { + opacity: 1; } + .dropzone .dz-preview .dz-details { + z-index: 20; + position: absolute; + top: 0; + left: 0; + opacity: 0; + font-size: 13px; + min-width: 100%; + max-width: 100%; + padding: 2em 1em; + text-align: center; + color: rgba(0, 0, 0, 0.9); + line-height: 150%; } + .dropzone .dz-preview .dz-details .dz-size { + margin-bottom: 1em; + font-size: 16px; } + .dropzone .dz-preview .dz-details .dz-filename { + white-space: nowrap; } + .dropzone .dz-preview .dz-details .dz-filename:hover span { + border: 1px solid rgba(200, 200, 200, 0.8); + background-color: rgba(255, 255, 255, 0.8); } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) { + overflow: hidden; + text-overflow: ellipsis; } + .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span { + border: 1px solid transparent; } + .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span { + background-color: rgba(255, 255, 255, 0.4); + padding: 0 0.4em; + border-radius: 3px; } + .dropzone .dz-preview:hover .dz-image img { + -webkit-transform: scale(1.05, 1.05); + -moz-transform: scale(1.05, 1.05); + -ms-transform: scale(1.05, 1.05); + -o-transform: scale(1.05, 1.05); + transform: scale(1.05, 1.05); + -webkit-filter: blur(8px); + filter: blur(8px); } + .dropzone .dz-preview .dz-image { + border-radius: 20px; + overflow: hidden; + width: 120px; + height: 120px; + position: relative; + display: block; + z-index: 10; } + .dropzone .dz-preview .dz-image img { + display: block; } + .dropzone .dz-preview.dz-success .dz-success-mark { + -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview.dz-error .dz-error-mark { + opacity: 1; + -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); + animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); } + .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark { + pointer-events: none; + opacity: 0; + z-index: 500; + position: absolute; + display: block; + top: 50%; + left: 50%; + margin-left: -27px; + margin-top: -27px; } + .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg { + display: block; + width: 54px; + height: 54px; } + .dropzone .dz-preview.dz-processing .dz-progress { + opacity: 1; + -webkit-transition: all 0.2s linear; + -moz-transition: all 0.2s linear; + -ms-transition: all 0.2s linear; + -o-transition: all 0.2s linear; + transition: all 0.2s linear; } + .dropzone .dz-preview.dz-complete .dz-progress { + opacity: 0; + -webkit-transition: opacity 0.4s ease-in; + -moz-transition: opacity 0.4s ease-in; + -ms-transition: opacity 0.4s ease-in; + -o-transition: opacity 0.4s ease-in; + transition: opacity 0.4s ease-in; } + .dropzone .dz-preview:not(.dz-processing) .dz-progress { + -webkit-animation: pulse 6s ease infinite; + -moz-animation: pulse 6s ease infinite; + -ms-animation: pulse 6s ease infinite; + -o-animation: pulse 6s ease infinite; + animation: pulse 6s ease infinite; } + .dropzone .dz-preview .dz-progress { + opacity: 1; + z-index: 1000; + pointer-events: none; + position: absolute; + height: 16px; + left: 50%; + top: 50%; + margin-top: -8px; + width: 80px; + margin-left: -40px; + background: rgba(255, 255, 255, 0.9); + -webkit-transform: scale(1); + border-radius: 8px; + overflow: hidden; } + .dropzone .dz-preview .dz-progress .dz-upload { + background: #333; + background: linear-gradient(to bottom, #666, #444); + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 0; + -webkit-transition: width 300ms ease-in-out; + -moz-transition: width 300ms ease-in-out; + -ms-transition: width 300ms ease-in-out; + -o-transition: width 300ms ease-in-out; + transition: width 300ms ease-in-out; } + .dropzone .dz-preview.dz-error .dz-error-message { + display: block; } + .dropzone .dz-preview.dz-error:hover .dz-error-message { + opacity: 1; + pointer-events: auto; } + .dropzone .dz-preview .dz-error-message { + pointer-events: none; + z-index: 1000; + position: absolute; + display: block; + display: none; + opacity: 0; + -webkit-transition: opacity 0.3s ease; + -moz-transition: opacity 0.3s ease; + -ms-transition: opacity 0.3s ease; + -o-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; + border-radius: 8px; + font-size: 13px; + top: 130px; + left: -10px; + width: 140px; + background: #be2626; + background: linear-gradient(to bottom, #be2626, #a92222); + padding: 0.5em 1.2em; + color: white; } + .dropzone .dz-preview .dz-error-message:after { + content: ''; + position: absolute; + top: -6px; + left: 64px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #be2626; } diff --git a/web/libraries/dropzone/dist/dropzone.js b/web/libraries/dropzone/dist/dropzone.js new file mode 100755 index 000000000..895b055a8 --- /dev/null +++ b/web/libraries/dropzone/dist/dropzone.js @@ -0,0 +1,1767 @@ + +/* + * + * More info at [www.dropzonejs.com](http://www.dropzonejs.com) + * + * Copyright (c) 2012, Matias Meno + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + +(function() { + var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, + __slice = [].slice, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + noop = function() {}; + + Emitter = (function() { + function Emitter() {} + + Emitter.prototype.addEventListener = Emitter.prototype.on; + + Emitter.prototype.on = function(event, fn) { + this._callbacks = this._callbacks || {}; + if (!this._callbacks[event]) { + this._callbacks[event] = []; + } + this._callbacks[event].push(fn); + return this; + }; + + Emitter.prototype.emit = function() { + var args, callback, callbacks, event, _i, _len; + event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + this._callbacks = this._callbacks || {}; + callbacks = this._callbacks[event]; + if (callbacks) { + for (_i = 0, _len = callbacks.length; _i < _len; _i++) { + callback = callbacks[_i]; + callback.apply(this, args); + } + } + return this; + }; + + Emitter.prototype.removeListener = Emitter.prototype.off; + + Emitter.prototype.removeAllListeners = Emitter.prototype.off; + + Emitter.prototype.removeEventListener = Emitter.prototype.off; + + Emitter.prototype.off = function(event, fn) { + var callback, callbacks, i, _i, _len; + if (!this._callbacks || arguments.length === 0) { + this._callbacks = {}; + return this; + } + callbacks = this._callbacks[event]; + if (!callbacks) { + return this; + } + if (arguments.length === 1) { + delete this._callbacks[event]; + return this; + } + for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { + callback = callbacks[i]; + if (callback === fn) { + callbacks.splice(i, 1); + break; + } + } + return this; + }; + + return Emitter; + + })(); + + Dropzone = (function(_super) { + var extend, resolveOption; + + __extends(Dropzone, _super); + + Dropzone.prototype.Emitter = Emitter; + + + /* + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + dropzone.on("dragEnter", function() { }); + */ + + Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; + + Dropzone.prototype.defaultOptions = { + url: null, + method: "post", + withCredentials: false, + parallelUploads: 2, + uploadMultiple: false, + maxFilesize: 256, + paramName: "file", + createImageThumbnails: true, + maxThumbnailFilesize: 10, + thumbnailWidth: 120, + thumbnailHeight: 120, + filesizeBase: 1000, + maxFiles: null, + params: {}, + clickable: true, + ignoreHiddenFiles: true, + acceptedFiles: null, + acceptedMimeTypes: null, + autoProcessQueue: true, + autoQueue: true, + addRemoveLinks: false, + previewsContainer: null, + hiddenInputContainer: "body", + capture: null, + renameFilename: null, + dictDefaultMessage: "Drop files here to upload", + dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", + dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", + dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", + dictInvalidFileType: "You can't upload files of this type.", + dictResponseError: "Server responded with {{statusCode}} code.", + dictCancelUpload: "Cancel upload", + dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", + dictRemoveFile: "Remove file", + dictRemoveFileConfirmation: null, + dictMaxFilesExceeded: "You can not upload any more files.", + accept: function(file, done) { + return done(); + }, + init: function() { + return noop; + }, + forceFallback: false, + fallback: function() { + var child, messageElement, span, _i, _len, _ref; + this.element.className = "" + this.element.className + " dz-browser-not-supported"; + _ref = this.element.getElementsByTagName("div"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (/(^| )dz-message($| )/.test(child.className)) { + messageElement = child; + child.className = "dz-message"; + continue; + } + } + if (!messageElement) { + messageElement = Dropzone.createElement("
"); + this.element.appendChild(messageElement); + } + span = messageElement.getElementsByTagName("span")[0]; + if (span) { + if (span.textContent != null) { + span.textContent = this.options.dictFallbackMessage; + } else if (span.innerText != null) { + span.innerText = this.options.dictFallbackMessage; + } + } + return this.element.appendChild(this.getFallbackForm()); + }, + resize: function(file) { + var info, srcRatio, trgRatio; + info = { + srcX: 0, + srcY: 0, + srcWidth: file.width, + srcHeight: file.height + }; + srcRatio = file.width / file.height; + info.optWidth = this.options.thumbnailWidth; + info.optHeight = this.options.thumbnailHeight; + if ((info.optWidth == null) && (info.optHeight == null)) { + info.optWidth = info.srcWidth; + info.optHeight = info.srcHeight; + } else if (info.optWidth == null) { + info.optWidth = srcRatio * info.optHeight; + } else if (info.optHeight == null) { + info.optHeight = (1 / srcRatio) * info.optWidth; + } + trgRatio = info.optWidth / info.optHeight; + if (file.height < info.optHeight || file.width < info.optWidth) { + info.trgHeight = info.srcHeight; + info.trgWidth = info.srcWidth; + } else { + if (srcRatio > trgRatio) { + info.srcHeight = file.height; + info.srcWidth = info.srcHeight * trgRatio; + } else { + info.srcWidth = file.width; + info.srcHeight = info.srcWidth / trgRatio; + } + } + info.srcX = (file.width - info.srcWidth) / 2; + info.srcY = (file.height - info.srcHeight) / 2; + return info; + }, + + /* + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + */ + drop: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragstart: noop, + dragend: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + dragenter: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragover: function(e) { + return this.element.classList.add("dz-drag-hover"); + }, + dragleave: function(e) { + return this.element.classList.remove("dz-drag-hover"); + }, + paste: noop, + reset: function() { + return this.element.classList.remove("dz-started"); + }, + addedfile: function(file) { + var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; + if (this.element === this.previewsContainer) { + this.element.classList.add("dz-started"); + } + if (this.previewsContainer) { + file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); + file.previewTemplate = file.previewElement; + this.previewsContainer.appendChild(file.previewElement); + _ref = file.previewElement.querySelectorAll("[data-dz-name]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + node.textContent = this._renameFilename(file.name); + } + _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + node = _ref1[_j]; + node.innerHTML = this.filesize(file.size); + } + if (this.options.addRemoveLinks) { + file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + ""); + file.previewElement.appendChild(file._removeLink); + } + removeFileEvent = (function(_this) { + return function(e) { + e.preventDefault(); + e.stopPropagation(); + if (file.status === Dropzone.UPLOADING) { + return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { + return _this.removeFile(file); + }); + } else { + if (_this.options.dictRemoveFileConfirmation) { + return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { + return _this.removeFile(file); + }); + } else { + return _this.removeFile(file); + } + } + }; + })(this); + _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); + _results = []; + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + removeLink = _ref2[_k]; + _results.push(removeLink.addEventListener("click", removeFileEvent)); + } + return _results; + } + }, + removedfile: function(file) { + var _ref; + if (file.previewElement) { + if ((_ref = file.previewElement) != null) { + _ref.parentNode.removeChild(file.previewElement); + } + } + return this._updateMaxFilesReachedClass(); + }, + thumbnail: function(file, dataUrl) { + var thumbnailElement, _i, _len, _ref; + if (file.previewElement) { + file.previewElement.classList.remove("dz-file-preview"); + _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + thumbnailElement = _ref[_i]; + thumbnailElement.alt = file.name; + thumbnailElement.src = dataUrl; + } + return setTimeout(((function(_this) { + return function() { + return file.previewElement.classList.add("dz-image-preview"); + }; + })(this)), 1); + } + }, + error: function(file, message) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + file.previewElement.classList.add("dz-error"); + if (typeof message !== "String" && message.error) { + message = message.error; + } + _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + _results.push(node.textContent = message); + } + return _results; + } + }, + errormultiple: noop, + processing: function(file) { + if (file.previewElement) { + file.previewElement.classList.add("dz-processing"); + if (file._removeLink) { + return file._removeLink.textContent = this.options.dictCancelUpload; + } + } + }, + processingmultiple: noop, + uploadprogress: function(file, progress, bytesSent) { + var node, _i, _len, _ref, _results; + if (file.previewElement) { + _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + node = _ref[_i]; + if (node.nodeName === 'PROGRESS') { + _results.push(node.value = progress); + } else { + _results.push(node.style.width = "" + progress + "%"); + } + } + return _results; + } + }, + totaluploadprogress: noop, + sending: noop, + sendingmultiple: noop, + success: function(file) { + if (file.previewElement) { + return file.previewElement.classList.add("dz-success"); + } + }, + successmultiple: noop, + canceled: function(file) { + return this.emit("error", file, "Upload canceled."); + }, + canceledmultiple: noop, + complete: function(file) { + if (file._removeLink) { + file._removeLink.textContent = this.options.dictRemoveFile; + } + if (file.previewElement) { + return file.previewElement.classList.add("dz-complete"); + } + }, + completemultiple: noop, + maxfilesexceeded: noop, + maxfilesreached: noop, + queuecomplete: noop, + addedfiles: noop, + previewTemplate: "
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
" + }; + + extend = function() { + var key, object, objects, target, val, _i, _len; + target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + for (_i = 0, _len = objects.length; _i < _len; _i++) { + object = objects[_i]; + for (key in object) { + val = object[key]; + target[key] = val; + } + } + return target; + }; + + function Dropzone(element, options) { + var elementOptions, fallback, _ref; + this.element = element; + this.version = Dropzone.version; + this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); + this.clickableElements = []; + this.listeners = []; + this.files = []; + if (typeof this.element === "string") { + this.element = document.querySelector(this.element); + } + if (!(this.element && (this.element.nodeType != null))) { + throw new Error("Invalid dropzone element."); + } + if (this.element.dropzone) { + throw new Error("Dropzone already attached."); + } + Dropzone.instances.push(this); + this.element.dropzone = this; + elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; + this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); + if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { + return this.options.fallback.call(this); + } + if (this.options.url == null) { + this.options.url = this.element.getAttribute("action"); + } + if (!this.options.url) { + throw new Error("No URL provided."); + } + if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { + throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); + } + if (this.options.acceptedMimeTypes) { + this.options.acceptedFiles = this.options.acceptedMimeTypes; + delete this.options.acceptedMimeTypes; + } + this.options.method = this.options.method.toUpperCase(); + if ((fallback = this.getExistingFallback()) && fallback.parentNode) { + fallback.parentNode.removeChild(fallback); + } + if (this.options.previewsContainer !== false) { + if (this.options.previewsContainer) { + this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); + } else { + this.previewsContainer = this.element; + } + } + if (this.options.clickable) { + if (this.options.clickable === true) { + this.clickableElements = [this.element]; + } else { + this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); + } + } + this.init(); + } + + Dropzone.prototype.getAcceptedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getRejectedFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (!file.accepted) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getFilesWithStatus = function(status) { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === status) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.getQueuedFiles = function() { + return this.getFilesWithStatus(Dropzone.QUEUED); + }; + + Dropzone.prototype.getUploadingFiles = function() { + return this.getFilesWithStatus(Dropzone.UPLOADING); + }; + + Dropzone.prototype.getAddedFiles = function() { + return this.getFilesWithStatus(Dropzone.ADDED); + }; + + Dropzone.prototype.getActiveFiles = function() { + var file, _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { + _results.push(file); + } + } + return _results; + }; + + Dropzone.prototype.init = function() { + var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; + if (this.element.tagName === "form") { + this.element.setAttribute("enctype", "multipart/form-data"); + } + if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { + this.element.appendChild(Dropzone.createElement("
" + this.options.dictDefaultMessage + "
")); + } + if (this.clickableElements.length) { + setupHiddenFileInput = (function(_this) { + return function() { + if (_this.hiddenFileInput) { + _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput); + } + _this.hiddenFileInput = document.createElement("input"); + _this.hiddenFileInput.setAttribute("type", "file"); + if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { + _this.hiddenFileInput.setAttribute("multiple", "multiple"); + } + _this.hiddenFileInput.className = "dz-hidden-input"; + if (_this.options.acceptedFiles != null) { + _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); + } + if (_this.options.capture != null) { + _this.hiddenFileInput.setAttribute("capture", _this.options.capture); + } + _this.hiddenFileInput.style.visibility = "hidden"; + _this.hiddenFileInput.style.position = "absolute"; + _this.hiddenFileInput.style.top = "0"; + _this.hiddenFileInput.style.left = "0"; + _this.hiddenFileInput.style.height = "0"; + _this.hiddenFileInput.style.width = "0"; + document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput); + return _this.hiddenFileInput.addEventListener("change", function() { + var file, files, _i, _len; + files = _this.hiddenFileInput.files; + if (files.length) { + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _this.addFile(file); + } + } + _this.emit("addedfiles", files); + return setupHiddenFileInput(); + }); + }; + })(this); + setupHiddenFileInput(); + } + this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; + _ref1 = this.events; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + eventName = _ref1[_i]; + this.on(eventName, this.options[eventName]); + } + this.on("uploadprogress", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("removedfile", (function(_this) { + return function() { + return _this.updateTotalUploadProgress(); + }; + })(this)); + this.on("canceled", (function(_this) { + return function(file) { + return _this.emit("complete", file); + }; + })(this)); + this.on("complete", (function(_this) { + return function(file) { + if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { + return setTimeout((function() { + return _this.emit("queuecomplete"); + }), 0); + } + }; + })(this)); + noPropagation = function(e) { + e.stopPropagation(); + if (e.preventDefault) { + return e.preventDefault(); + } else { + return e.returnValue = false; + } + }; + this.listeners = [ + { + element: this.element, + events: { + "dragstart": (function(_this) { + return function(e) { + return _this.emit("dragstart", e); + }; + })(this), + "dragenter": (function(_this) { + return function(e) { + noPropagation(e); + return _this.emit("dragenter", e); + }; + })(this), + "dragover": (function(_this) { + return function(e) { + var efct; + try { + efct = e.dataTransfer.effectAllowed; + } catch (_error) {} + e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; + noPropagation(e); + return _this.emit("dragover", e); + }; + })(this), + "dragleave": (function(_this) { + return function(e) { + return _this.emit("dragleave", e); + }; + })(this), + "drop": (function(_this) { + return function(e) { + noPropagation(e); + return _this.drop(e); + }; + })(this), + "dragend": (function(_this) { + return function(e) { + return _this.emit("dragend", e); + }; + })(this) + } + } + ]; + this.clickableElements.forEach((function(_this) { + return function(clickableElement) { + return _this.listeners.push({ + element: clickableElement, + events: { + "click": function(evt) { + if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { + _this.hiddenFileInput.click(); + } + return true; + } + } + }); + }; + })(this)); + this.enable(); + return this.options.init.call(this); + }; + + Dropzone.prototype.destroy = function() { + var _ref; + this.disable(); + this.removeAllFiles(true); + if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { + this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); + this.hiddenFileInput = null; + } + delete this.element.dropzone; + return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); + }; + + Dropzone.prototype.updateTotalUploadProgress = function() { + var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; + totalBytesSent = 0; + totalBytes = 0; + activeFiles = this.getActiveFiles(); + if (activeFiles.length) { + _ref = this.getActiveFiles(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + totalBytesSent += file.upload.bytesSent; + totalBytes += file.upload.total; + } + totalUploadProgress = 100 * totalBytesSent / totalBytes; + } else { + totalUploadProgress = 100; + } + return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); + }; + + Dropzone.prototype._getParamName = function(n) { + if (typeof this.options.paramName === "function") { + return this.options.paramName(n); + } else { + return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); + } + }; + + Dropzone.prototype._renameFilename = function(name) { + if (typeof this.options.renameFilename !== "function") { + return name; + } + return this.options.renameFilename(name); + }; + + Dropzone.prototype.getFallbackForm = function() { + var existingFallback, fields, fieldsString, form; + if (existingFallback = this.getExistingFallback()) { + return existingFallback; + } + fieldsString = "
"; + if (this.options.dictFallbackText) { + fieldsString += "

" + this.options.dictFallbackText + "

"; + } + fieldsString += "
"; + fields = Dropzone.createElement(fieldsString); + if (this.element.tagName !== "FORM") { + form = Dropzone.createElement("
"); + form.appendChild(fields); + } else { + this.element.setAttribute("enctype", "multipart/form-data"); + this.element.setAttribute("method", this.options.method); + } + return form != null ? form : fields; + }; + + Dropzone.prototype.getExistingFallback = function() { + var fallback, getFallback, tagName, _i, _len, _ref; + getFallback = function(elements) { + var el, _i, _len; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )fallback($| )/.test(el.className)) { + return el; + } + } + }; + _ref = ["div", "form"]; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + tagName = _ref[_i]; + if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { + return fallback; + } + } + }; + + Dropzone.prototype.setupEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.addEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.removeEventListeners = function() { + var elementListeners, event, listener, _i, _len, _ref, _results; + _ref = this.listeners; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elementListeners = _ref[_i]; + _results.push((function() { + var _ref1, _results1; + _ref1 = elementListeners.events; + _results1 = []; + for (event in _ref1) { + listener = _ref1[event]; + _results1.push(elementListeners.element.removeEventListener(event, listener, false)); + } + return _results1; + })()); + } + return _results; + }; + + Dropzone.prototype.disable = function() { + var file, _i, _len, _ref, _results; + this.clickableElements.forEach(function(element) { + return element.classList.remove("dz-clickable"); + }); + this.removeEventListeners(); + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + _results.push(this.cancelUpload(file)); + } + return _results; + }; + + Dropzone.prototype.enable = function() { + this.clickableElements.forEach(function(element) { + return element.classList.add("dz-clickable"); + }); + return this.setupEventListeners(); + }; + + Dropzone.prototype.filesize = function(size) { + var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; + selectedSize = 0; + selectedUnit = "b"; + if (size > 0) { + units = ['TB', 'GB', 'MB', 'KB', 'b']; + for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { + unit = units[i]; + cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; + if (size >= cutoff) { + selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); + selectedUnit = unit; + break; + } + } + selectedSize = Math.round(10 * selectedSize) / 10; + } + return "" + selectedSize + " " + selectedUnit; + }; + + Dropzone.prototype._updateMaxFilesReachedClass = function() { + if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + if (this.getAcceptedFiles().length === this.options.maxFiles) { + this.emit('maxfilesreached', this.files); + } + return this.element.classList.add("dz-max-files-reached"); + } else { + return this.element.classList.remove("dz-max-files-reached"); + } + }; + + Dropzone.prototype.drop = function(e) { + var files, items; + if (!e.dataTransfer) { + return; + } + this.emit("drop", e); + files = e.dataTransfer.files; + this.emit("addedfiles", files); + if (files.length) { + items = e.dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry != null)) { + this._addFilesFromItems(items); + } else { + this.handleFiles(files); + } + } + }; + + Dropzone.prototype.paste = function(e) { + var items, _ref; + if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { + return; + } + this.emit("paste", e); + items = e.clipboardData.items; + if (items.length) { + return this._addFilesFromItems(items); + } + }; + + Dropzone.prototype.handleFiles = function(files) { + var file, _i, _len, _results; + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(this.addFile(file)); + } + return _results; + }; + + Dropzone.prototype._addFilesFromItems = function(items) { + var entry, item, _i, _len, _results; + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { + if (entry.isFile) { + _results.push(this.addFile(item.getAsFile())); + } else if (entry.isDirectory) { + _results.push(this._addFilesFromDirectory(entry, entry.name)); + } else { + _results.push(void 0); + } + } else if (item.getAsFile != null) { + if ((item.kind == null) || item.kind === "file") { + _results.push(this.addFile(item.getAsFile())); + } else { + _results.push(void 0); + } + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.prototype._addFilesFromDirectory = function(directory, path) { + var dirReader, errorHandler, readEntries; + dirReader = directory.createReader(); + errorHandler = function(error) { + return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; + }; + readEntries = (function(_this) { + return function() { + return dirReader.readEntries(function(entries) { + var entry, _i, _len; + if (entries.length > 0) { + for (_i = 0, _len = entries.length; _i < _len; _i++) { + entry = entries[_i]; + if (entry.isFile) { + entry.file(function(file) { + if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { + return; + } + file.fullPath = "" + path + "/" + file.name; + return _this.addFile(file); + }); + } else if (entry.isDirectory) { + _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); + } + } + readEntries(); + } + return null; + }, errorHandler); + }; + })(this); + return readEntries(); + }; + + Dropzone.prototype.accept = function(file, done) { + if (file.size > this.options.maxFilesize * 1024 * 1024) { + return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); + } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { + return done(this.options.dictInvalidFileType); + } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { + done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); + return this.emit("maxfilesexceeded", file); + } else { + return this.options.accept.call(this, file, done); + } + }; + + Dropzone.prototype.addFile = function(file) { + file.upload = { + progress: 0, + total: file.size, + bytesSent: 0 + }; + this.files.push(file); + file.status = Dropzone.ADDED; + this.emit("addedfile", file); + this._enqueueThumbnail(file); + return this.accept(file, (function(_this) { + return function(error) { + if (error) { + file.accepted = false; + _this._errorProcessing([file], error); + } else { + file.accepted = true; + if (_this.options.autoQueue) { + _this.enqueueFile(file); + } + } + return _this._updateMaxFilesReachedClass(); + }; + })(this)); + }; + + Dropzone.prototype.enqueueFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + this.enqueueFile(file); + } + return null; + }; + + Dropzone.prototype.enqueueFile = function(file) { + if (file.status === Dropzone.ADDED && file.accepted === true) { + file.status = Dropzone.QUEUED; + if (this.options.autoProcessQueue) { + return setTimeout(((function(_this) { + return function() { + return _this.processQueue(); + }; + })(this)), 0); + } + } else { + throw new Error("This file can't be queued because it has already been processed or was rejected."); + } + }; + + Dropzone.prototype._thumbnailQueue = []; + + Dropzone.prototype._processingThumbnail = false; + + Dropzone.prototype._enqueueThumbnail = function(file) { + if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { + this._thumbnailQueue.push(file); + return setTimeout(((function(_this) { + return function() { + return _this._processThumbnailQueue(); + }; + })(this)), 0); + } + }; + + Dropzone.prototype._processThumbnailQueue = function() { + if (this._processingThumbnail || this._thumbnailQueue.length === 0) { + return; + } + this._processingThumbnail = true; + return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { + return function() { + _this._processingThumbnail = false; + return _this._processThumbnailQueue(); + }; + })(this)); + }; + + Dropzone.prototype.removeFile = function(file) { + if (file.status === Dropzone.UPLOADING) { + this.cancelUpload(file); + } + this.files = without(this.files, file); + this.emit("removedfile", file); + if (this.files.length === 0) { + return this.emit("reset"); + } + }; + + Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { + var file, _i, _len, _ref; + if (cancelIfNecessary == null) { + cancelIfNecessary = false; + } + _ref = this.files.slice(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { + this.removeFile(file); + } + } + return null; + }; + + Dropzone.prototype.createThumbnail = function(file, callback) { + var fileReader; + fileReader = new FileReader; + fileReader.onload = (function(_this) { + return function() { + if (file.type === "image/svg+xml") { + _this.emit("thumbnail", file, fileReader.result); + if (callback != null) { + callback(); + } + return; + } + return _this.createThumbnailFromUrl(file, fileReader.result, callback); + }; + })(this); + return fileReader.readAsDataURL(file); + }; + + Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) { + var img; + img = document.createElement("img"); + if (crossOrigin) { + img.crossOrigin = crossOrigin; + } + img.onload = (function(_this) { + return function() { + var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; + file.width = img.width; + file.height = img.height; + resizeInfo = _this.options.resize.call(_this, file); + if (resizeInfo.trgWidth == null) { + resizeInfo.trgWidth = resizeInfo.optWidth; + } + if (resizeInfo.trgHeight == null) { + resizeInfo.trgHeight = resizeInfo.optHeight; + } + canvas = document.createElement("canvas"); + ctx = canvas.getContext("2d"); + canvas.width = resizeInfo.trgWidth; + canvas.height = resizeInfo.trgHeight; + drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); + thumbnail = canvas.toDataURL("image/png"); + _this.emit("thumbnail", file, thumbnail); + if (callback != null) { + return callback(); + } + }; + })(this); + if (callback != null) { + img.onerror = callback; + } + return img.src = imageUrl; + }; + + Dropzone.prototype.processQueue = function() { + var i, parallelUploads, processingLength, queuedFiles; + parallelUploads = this.options.parallelUploads; + processingLength = this.getUploadingFiles().length; + i = processingLength; + if (processingLength >= parallelUploads) { + return; + } + queuedFiles = this.getQueuedFiles(); + if (!(queuedFiles.length > 0)) { + return; + } + if (this.options.uploadMultiple) { + return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); + } else { + while (i < parallelUploads) { + if (!queuedFiles.length) { + return; + } + this.processFile(queuedFiles.shift()); + i++; + } + } + }; + + Dropzone.prototype.processFile = function(file) { + return this.processFiles([file]); + }; + + Dropzone.prototype.processFiles = function(files) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.processing = true; + file.status = Dropzone.UPLOADING; + this.emit("processing", file); + } + if (this.options.uploadMultiple) { + this.emit("processingmultiple", files); + } + return this.uploadFiles(files); + }; + + Dropzone.prototype._getFilesWithXhr = function(xhr) { + var file, files; + return files = (function() { + var _i, _len, _ref, _results; + _ref = this.files; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + file = _ref[_i]; + if (file.xhr === xhr) { + _results.push(file); + } + } + return _results; + }).call(this); + }; + + Dropzone.prototype.cancelUpload = function(file) { + var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; + if (file.status === Dropzone.UPLOADING) { + groupedFiles = this._getFilesWithXhr(file.xhr); + for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { + groupedFile = groupedFiles[_i]; + groupedFile.status = Dropzone.CANCELED; + } + file.xhr.abort(); + for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { + groupedFile = groupedFiles[_j]; + this.emit("canceled", groupedFile); + } + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", groupedFiles); + } + } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { + file.status = Dropzone.CANCELED; + this.emit("canceled", file); + if (this.options.uploadMultiple) { + this.emit("canceledmultiple", [file]); + } + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + resolveOption = function() { + var args, option; + option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + if (typeof option === 'function') { + return option.apply(this, args); + } + return option; + }; + + Dropzone.prototype.uploadFile = function(file) { + return this.uploadFiles([file]); + }; + + Dropzone.prototype.uploadFiles = function(files) { + var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + xhr = new XMLHttpRequest(); + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.xhr = xhr; + } + method = resolveOption(this.options.method, files); + url = resolveOption(this.options.url, files); + xhr.open(method, url, true); + xhr.withCredentials = !!this.options.withCredentials; + response = null; + handleError = (function(_this) { + return function() { + var _j, _len1, _results; + _results = []; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); + } + return _results; + }; + })(this); + updateProgress = (function(_this) { + return function(e) { + var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; + if (e != null) { + progress = 100 * e.loaded / e.total; + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + file.upload = { + progress: progress, + total: e.total, + bytesSent: e.loaded + }; + } + } else { + allFilesFinished = true; + progress = 100; + for (_k = 0, _len2 = files.length; _k < _len2; _k++) { + file = files[_k]; + if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { + allFilesFinished = false; + } + file.upload.progress = progress; + file.upload.bytesSent = file.upload.total; + } + if (allFilesFinished) { + return; + } + } + _results = []; + for (_l = 0, _len3 = files.length; _l < _len3; _l++) { + file = files[_l]; + _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); + } + return _results; + }; + })(this); + xhr.onload = (function(_this) { + return function(e) { + var _ref; + if (files[0].status === Dropzone.CANCELED) { + return; + } + if (xhr.readyState !== 4) { + return; + } + response = xhr.responseText; + if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { + try { + response = JSON.parse(response); + } catch (_error) { + e = _error; + response = "Invalid JSON response from server."; + } + } + updateProgress(); + if (!((200 <= (_ref = xhr.status) && _ref < 300))) { + return handleError(); + } else { + return _this._finished(files, response, e); + } + }; + })(this); + xhr.onerror = (function(_this) { + return function() { + if (files[0].status === Dropzone.CANCELED) { + return; + } + return handleError(); + }; + })(this); + progressObj = (_ref = xhr.upload) != null ? _ref : xhr; + progressObj.onprogress = updateProgress; + headers = { + "Accept": "application/json", + "Cache-Control": "no-cache", + "X-Requested-With": "XMLHttpRequest" + }; + if (this.options.headers) { + extend(headers, this.options.headers); + } + for (headerName in headers) { + headerValue = headers[headerName]; + if (headerValue) { + xhr.setRequestHeader(headerName, headerValue); + } + } + formData = new FormData(); + if (this.options.params) { + _ref1 = this.options.params; + for (key in _ref1) { + value = _ref1[key]; + formData.append(key, value); + } + } + for (_j = 0, _len1 = files.length; _j < _len1; _j++) { + file = files[_j]; + this.emit("sending", file, xhr, formData); + } + if (this.options.uploadMultiple) { + this.emit("sendingmultiple", files, xhr, formData); + } + if (this.element.tagName === "FORM") { + _ref2 = this.element.querySelectorAll("input, textarea, select, button"); + for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { + input = _ref2[_k]; + inputName = input.getAttribute("name"); + inputType = input.getAttribute("type"); + if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { + _ref3 = input.options; + for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { + option = _ref3[_l]; + if (option.selected) { + formData.append(inputName, option.value); + } + } + } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { + formData.append(inputName, input.value); + } + } + } + for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { + formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name)); + } + return this.submitRequest(xhr, formData, files); + }; + + Dropzone.prototype.submitRequest = function(xhr, formData, files) { + return xhr.send(formData); + }; + + Dropzone.prototype._finished = function(files, responseText, e) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.SUCCESS; + this.emit("success", file, responseText, e); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("successmultiple", files, responseText, e); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + Dropzone.prototype._errorProcessing = function(files, message, xhr) { + var file, _i, _len; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + file.status = Dropzone.ERROR; + this.emit("error", file, message, xhr); + this.emit("complete", file); + } + if (this.options.uploadMultiple) { + this.emit("errormultiple", files, message, xhr); + this.emit("completemultiple", files); + } + if (this.options.autoProcessQueue) { + return this.processQueue(); + } + }; + + return Dropzone; + + })(Emitter); + + Dropzone.version = "4.3.0"; + + Dropzone.options = {}; + + Dropzone.optionsForElement = function(element) { + if (element.getAttribute("id")) { + return Dropzone.options[camelize(element.getAttribute("id"))]; + } else { + return void 0; + } + }; + + Dropzone.instances = []; + + Dropzone.forElement = function(element) { + if (typeof element === "string") { + element = document.querySelector(element); + } + if ((element != null ? element.dropzone : void 0) == null) { + throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); + } + return element.dropzone; + }; + + Dropzone.autoDiscover = true; + + Dropzone.discover = function() { + var checkElements, dropzone, dropzones, _i, _len, _results; + if (document.querySelectorAll) { + dropzones = document.querySelectorAll(".dropzone"); + } else { + dropzones = []; + checkElements = function(elements) { + var el, _i, _len, _results; + _results = []; + for (_i = 0, _len = elements.length; _i < _len; _i++) { + el = elements[_i]; + if (/(^| )dropzone($| )/.test(el.className)) { + _results.push(dropzones.push(el)); + } else { + _results.push(void 0); + } + } + return _results; + }; + checkElements(document.getElementsByTagName("div")); + checkElements(document.getElementsByTagName("form")); + } + _results = []; + for (_i = 0, _len = dropzones.length; _i < _len; _i++) { + dropzone = dropzones[_i]; + if (Dropzone.optionsForElement(dropzone) !== false) { + _results.push(new Dropzone(dropzone)); + } else { + _results.push(void 0); + } + } + return _results; + }; + + Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; + + Dropzone.isBrowserSupported = function() { + var capableBrowser, regex, _i, _len, _ref; + capableBrowser = true; + if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { + if (!("classList" in document.createElement("a"))) { + capableBrowser = false; + } else { + _ref = Dropzone.blacklistedBrowsers; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + regex = _ref[_i]; + if (regex.test(navigator.userAgent)) { + capableBrowser = false; + continue; + } + } + } + } else { + capableBrowser = false; + } + return capableBrowser; + }; + + without = function(list, rejectedItem) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = list.length; _i < _len; _i++) { + item = list[_i]; + if (item !== rejectedItem) { + _results.push(item); + } + } + return _results; + }; + + camelize = function(str) { + return str.replace(/[\-_](\w)/g, function(match) { + return match.charAt(1).toUpperCase(); + }); + }; + + Dropzone.createElement = function(string) { + var div; + div = document.createElement("div"); + div.innerHTML = string; + return div.childNodes[0]; + }; + + Dropzone.elementInside = function(element, container) { + if (element === container) { + return true; + } + while (element = element.parentNode) { + if (element === container) { + return true; + } + } + return false; + }; + + Dropzone.getElement = function(el, name) { + var element; + if (typeof el === "string") { + element = document.querySelector(el); + } else if (el.nodeType != null) { + element = el; + } + if (element == null) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); + } + return element; + }; + + Dropzone.getElements = function(els, name) { + var e, el, elements, _i, _j, _len, _len1, _ref; + if (els instanceof Array) { + elements = []; + try { + for (_i = 0, _len = els.length; _i < _len; _i++) { + el = els[_i]; + elements.push(this.getElement(el, name)); + } + } catch (_error) { + e = _error; + elements = null; + } + } else if (typeof els === "string") { + elements = []; + _ref = document.querySelectorAll(els); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + el = _ref[_j]; + elements.push(el); + } + } else if (els.nodeType != null) { + elements = [els]; + } + if (!((elements != null) && elements.length)) { + throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); + } + return elements; + }; + + Dropzone.confirm = function(question, accepted, rejected) { + if (window.confirm(question)) { + return accepted(); + } else if (rejected != null) { + return rejected(); + } + }; + + Dropzone.isValidFile = function(file, acceptedFiles) { + var baseMimeType, mimeType, validType, _i, _len; + if (!acceptedFiles) { + return true; + } + acceptedFiles = acceptedFiles.split(","); + mimeType = file.type; + baseMimeType = mimeType.replace(/\/.*$/, ""); + for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { + validType = acceptedFiles[_i]; + validType = validType.trim(); + if (validType.charAt(0) === ".") { + if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { + return true; + } + } else if (/\/\*$/.test(validType)) { + if (baseMimeType === validType.replace(/\/.*$/, "")) { + return true; + } + } else { + if (mimeType === validType) { + return true; + } + } + } + return false; + }; + + if (typeof jQuery !== "undefined" && jQuery !== null) { + jQuery.fn.dropzone = function(options) { + return this.each(function() { + return new Dropzone(this, options); + }); + }; + } + + if (typeof module !== "undefined" && module !== null) { + module.exports = Dropzone; + } else { + window.Dropzone = Dropzone; + } + + Dropzone.ADDED = "added"; + + Dropzone.QUEUED = "queued"; + + Dropzone.ACCEPTED = Dropzone.QUEUED; + + Dropzone.UPLOADING = "uploading"; + + Dropzone.PROCESSING = Dropzone.UPLOADING; + + Dropzone.CANCELED = "canceled"; + + Dropzone.ERROR = "error"; + + Dropzone.SUCCESS = "success"; + + + /* + + Bugfix for iOS 6 and 7 + Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios + based on the work of https://github.com/stomita/ios-imagefile-megapixel + */ + + detectVerticalSquash = function(img) { + var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; + iw = img.naturalWidth; + ih = img.naturalHeight; + canvas = document.createElement("canvas"); + canvas.width = 1; + canvas.height = ih; + ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + data = ctx.getImageData(0, 0, 1, ih).data; + sy = 0; + ey = ih; + py = ih; + while (py > sy) { + alpha = data[(py - 1) * 4 + 3]; + if (alpha === 0) { + ey = py; + } else { + sy = py; + } + py = (ey + sy) >> 1; + } + ratio = py / ih; + if (ratio === 0) { + return 1; + } else { + return ratio; + } + }; + + drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { + var vertSquashRatio; + vertSquashRatio = detectVerticalSquash(img); + return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); + }; + + + /* + * contentloaded.js + * + * Author: Diego Perini (diego.perini at gmail.com) + * Summary: cross-browser wrapper for DOMContentLoaded + * Updated: 20101020 + * License: MIT + * Version: 1.2 + * + * URL: + * http://javascript.nwbox.com/ContentLoaded/ + * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE + */ + + contentLoaded = function(win, fn) { + var add, doc, done, init, poll, pre, rem, root, top; + done = false; + top = true; + doc = win.document; + root = doc.documentElement; + add = (doc.addEventListener ? "addEventListener" : "attachEvent"); + rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); + pre = (doc.addEventListener ? "" : "on"); + init = function(e) { + if (e.type === "readystatechange" && doc.readyState !== "complete") { + return; + } + (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); + if (!done && (done = true)) { + return fn.call(win, e.type || e); + } + }; + poll = function() { + var e; + try { + root.doScroll("left"); + } catch (_error) { + e = _error; + setTimeout(poll, 50); + return; + } + return init("poll"); + }; + if (doc.readyState !== "complete") { + if (doc.createEventObject && root.doScroll) { + try { + top = !win.frameElement; + } catch (_error) {} + if (top) { + poll(); + } + } + doc[add](pre + "DOMContentLoaded", init, false); + doc[add](pre + "readystatechange", init, false); + return win[add](pre + "load", init, false); + } + }; + + Dropzone._autoDiscoverFunction = function() { + if (Dropzone.autoDiscover) { + return Dropzone.discover(); + } + }; + + contentLoaded(window, Dropzone._autoDiscoverFunction); + +}).call(this); diff --git a/web/libraries/dropzone/dist/min/basic.min.css b/web/libraries/dropzone/dist/min/basic.min.css new file mode 100755 index 000000000..5238d5cae --- /dev/null +++ b/web/libraries/dropzone/dist/min/basic.min.css @@ -0,0 +1 @@ +.dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:0.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px} diff --git a/web/libraries/dropzone/dist/min/dropzone-amd-module.min.js b/web/libraries/dropzone/dist/min/dropzone-amd-module.min.js new file mode 100755 index 000000000..5d5d66c5e --- /dev/null +++ b/web/libraries/dropzone/dist/min/dropzone-amd-module.min.js @@ -0,0 +1,2 @@ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b={exports:{}};return function(){var c,d,e,f,g,h,i,j,k=[].slice,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=function(){},d=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),c=function(a){function b(a,d){var e,f,g;if(this.element=a,this.version=b.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(b.instances.push(this),this.element.dropzone=this,e=null!=(g=b.optionsForElement(this.element))?g:{},this.options=c({},this.defaultOptions,e,null!=d?d:{}),this.options.forceFallback||!b.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?b.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:b.getElements(this.options.clickable,"clickable")),this.init()}var c,e;return m(b,a),b.prototype.Emitter=d,b.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],b.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return i},forceFallback:!1,fallback:function(){var a,c,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(c=a,a.className="dz-message");return c||(c=b.createElement('
'),this.element.appendChild(c)),d=c.getElementsByTagName("span")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:i,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:i,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)c=l[f],c.textContent=this._renameFilename(a.name);for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)c=m[g],c.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(c){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:i,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:i,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:i,sending:i,sendingmultiple:i,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:i,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:i,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:i,maxfilesexceeded:i,maxfilesreached:i,queuecomplete:i,addedfiles:i,previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
'},c=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?k.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},b.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},b.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},b.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},b.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(b.QUEUED)},b.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(b.UPLOADING)},b.prototype.getAddedFiles=function(){return this.getFilesWithStatus(b.ADDED)},b.prototype.getActiveFiles=function(){var a,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)a=e[c],(a.status===b.UPLOADING||a.status===b.QUEUED)&&f.push(a);return f},b.prototype.init=function(){var a,c,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return a.emit("addedfiles",c),d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),c=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(b){return c(b),a.emit("dragenter",b)}}(this),dragover:function(a){return function(b){var d;try{d=b.dataTransfer.effectAllowed}catch(e){}return b.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",c(b),a.emit("dragover",b)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(b){return c(b),a.drop(b)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(c){return a.listeners.push({element:c,events:{click:function(d){return(c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},b.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)},b.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},b.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},b.prototype._renameFilename=function(a){return"function"!=typeof this.options.renameFilename?a:this.options.renameFilename(a)},b.prototype.getFallbackForm=function(){var a,c,d,e;return(a=this.getExistingFallback())?a:(d='
',this.options.dictFallbackText&&(d+="

"+this.options.dictFallbackText+"

"),d+='
',c=b.createElement(d),"FORM"!==this.element.tagName?(e=b.createElement('
'),e.appendChild(c)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:c)},b.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},b.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},b.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},b.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},b.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},b.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;if(d=0,e="b",a>0){for(g=["TB","GB","MB","KB","b"],c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return""+d+" "+e},b.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},b.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},b.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},b.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},b.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},b.prototype._addFilesFromDirectory=function(a,b){var c,d,e;return c=a.createReader(),d=function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0},(e=function(a){return function(){return c.readEntries(function(c){var d,f,g;if(c.length>0){for(f=0,g=c.length;g>f;f++)d=c[f],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name);e()}return null},d)}}(this))()},b.prototype.accept=function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)},b.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},b.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},b.prototype.enqueueFile=function(a){if(a.status!==b.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=b.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},b.prototype._thumbnailQueue=[],b.prototype._processingThumbnail=!1,b.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},b.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},b.prototype.removeFile=function(a){return a.status===b.UPLOADING&&this.cancelUpload(a),this.files=j(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},b.prototype.removeAllFiles=function(a){var c,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)c=f[d],(c.status!==b.UPLOADING||a)&&this.removeFile(c);return null},b.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):d.createThumbnailFromUrl(a,c.result,b)}}(this),c.readAsDataURL(a)},b.prototype.createThumbnailFromUrl=function(a,b,c,d){var e;return e=document.createElement("img"),d&&(e.crossOrigin=d),e.onload=function(b){return function(){var d,f,g,i,j,k,l,m;return a.width=e.width,a.height=e.height,g=b.options.resize.call(b,a),null==g.trgWidth&&(g.trgWidth=g.optWidth),null==g.trgHeight&&(g.trgHeight=g.optHeight),d=document.createElement("canvas"),f=d.getContext("2d"),d.width=g.trgWidth,d.height=g.trgHeight,h(f,e,null!=(j=g.srcX)?j:0,null!=(k=g.srcY)?k:0,g.srcWidth,g.srcHeight,null!=(l=g.trgX)?l:0,null!=(m=g.trgY)?m:0,g.trgWidth,g.trgHeight),i=d.toDataURL("image/png"),b.emit("thumbnail",a,i),null!=c?c():void 0}}(this),null!=c&&(e.onerror=c),e.src=b},b.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},b.prototype.processFile=function(a){return this.processFiles([a])},b.prototype.processFiles=function(a){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],c.processing=!0,c.status=b.UPLOADING,this.emit("processing",c);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},b.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},b.prototype.cancelUpload=function(a){var c,d,e,f,g,h,i;if(a.status===b.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)c=d[e],c.status=b.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)c=d[f],this.emit("canceled",c);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===b.ADDED||i===b.QUEUED)&&(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},b.prototype.uploadFile=function(a){return this.uploadFiles([a])},b.prototype.uploadFiles=function(a){var d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)d=a[x],d.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(b){return function(){var c,e,f;for(f=[],c=0,e=a.length;e>c;c++)d=a[c],f.push(b._errorProcessing(a,s||b.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(b){return function(c){var e,f,g,h,i,j,k,l,m;if(null!=c)for(f=100*c.loaded/c.total,g=0,j=a.length;j>g;g++)d=a[g],d.upload={progress:f,total:c.total,bytesSent:c.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)d=a[h],(100!==d.upload.progress||d.upload.bytesSent!==d.upload.total)&&(e=!1),d.upload.progress=f,d.upload.bytesSent=d.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)d=a[i],m.push(b.emit("uploadprogress",d,f,d.upload.bytesSent));return m}}(this),w.onload=function(c){return function(d){var e;if(a[0].status!==b.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?c._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==b.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&c(j,this.options.headers);for(h in j)i=j[h],i&&w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)d=a[y],this.emit("sending",d,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],this._renameFilename(a[k].name));return this.submitRequest(w,f,a)},b.prototype.submitRequest=function(a,b){return a.send(b)},b.prototype._finished=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.SUCCESS,this.emit("success",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b.prototype._errorProcessing=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.ERROR,this.emit("error",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b}(d),c.version="4.3.0",c.options={},c.optionsForElement=function(a){return a.getAttribute("id")?c.options[e(a.getAttribute("id"))]:void 0},c.instances=[],c.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},c.autoDiscover=!0,c.discover=function(){var a,b,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],a=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},a(document.getElementsByTagName("div")),a(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)b=d[e],g.push(c.optionsForElement(b)!==!1?new c(b):void 0);return g},c.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],c.isBrowserSupported=function(){var a,b,d,e,f;if(a=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=c.blacklistedBrowsers,d=0,e=f.length;e>d;d++)b=f[d],b.test(navigator.userAgent)&&(a=!1);else a=!1;else a=!1;return a},j=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},e=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},c.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},c.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},c.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},c.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},c.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},c.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0 +}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0}else if(d===e)return!0;return!1},"undefined"!=typeof a&&null!==a&&(a.fn.dropzone=function(a){return this.each(function(){return new c(this,a)})}),"undefined"!=typeof b&&null!==b?b.exports=c:window.Dropzone=c,c.ADDED="added",c.QUEUED="queued",c.ACCEPTED=c.QUEUED,c.UPLOADING="uploading",c.PROCESSING=c.UPLOADING,c.CANCELED="canceled",c.ERROR="error",c.SUCCESS="success",g=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},h=function(a,b,c,d,e,f,h,i,j,k){var l;return l=g(b),a.drawImage(b,c,d,e,f,h,i,j,k/l)},f=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},c._autoDiscoverFunction=function(){return c.autoDiscover?c.discover():void 0},f(window,c._autoDiscoverFunction)}.call(this),b.exports}); \ No newline at end of file diff --git a/web/libraries/dropzone/dist/min/dropzone.min.css b/web/libraries/dropzone/dist/min/dropzone.min.css new file mode 100755 index 000000000..d04515e27 --- /dev/null +++ b/web/libraries/dropzone/dist/min/dropzone.min.css @@ -0,0 +1 @@ +@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,0.3);background:white;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:0.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:white}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;-ms-transition:opacity 0.2s linear;-o-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,0.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,0.8);background-color:rgba(255,255,255,0.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,0.4);padding:0 0.4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05, 1.05);-moz-transform:scale(1.05, 1.05);-ms-transform:scale(1.05, 1.05);-o-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity 0.4s ease-in;-moz-transition:opacity 0.4s ease-in;-ms-transition:opacity 0.4s ease-in;-o-transition:opacity 0.4s ease-in;transition:opacity 0.4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,0.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom, #666, #444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width 300ms ease-in-out;-moz-transition:width 300ms ease-in-out;-ms-transition:width 300ms ease-in-out;-o-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity 0.3s ease;-moz-transition:opacity 0.3s ease;-ms-transition:opacity 0.3s ease;-o-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom, #be2626, #a92222);padding:0.5em 1.2em;color:white}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626} diff --git a/web/libraries/dropzone/dist/min/dropzone.min.js b/web/libraries/dropzone/dist/min/dropzone.min.js new file mode 100755 index 000000000..2d5dbca78 --- /dev/null +++ b/web/libraries/dropzone/dist/min/dropzone.min.js @@ -0,0 +1,2 @@ +(function(){var a,b,c,d,e,f,g,h,i=[].slice,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=function(){},b=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),a=function(a){function c(a,b){var e,f,g;if(this.element=a,this.version=c.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(c.instances.push(this),this.element.dropzone=this,e=null!=(g=c.optionsForElement(this.element))?g:{},this.options=d({},this.defaultOptions,e,null!=b?b:{}),this.options.forceFallback||!c.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?c.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:c.getElements(this.options.clickable,"clickable")),this.init()}var d,e;return k(c,a),c.prototype.Emitter=b,c.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],c.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return g},forceFallback:!1,fallback:function(){var a,b,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(b=a,a.className="dz-message");return b||(b=c.createElement('
'),this.element.appendChild(b)),d=b.getElementsByTagName("span")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:g,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:g,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var b,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=c.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)b=l[f],b.textContent=this._renameFilename(a.name);for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)b=m[g],b.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=c.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(b){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===c.UPLOADING?c.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?c.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:g,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:g,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:g,sending:g,sendingmultiple:g,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:g,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:g,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:g,maxfilesexceeded:g,maxfilesreached:g,queuecomplete:g,addedfiles:g,previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
'},d=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?i.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},c.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},c.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},c.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},c.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(c.QUEUED)},c.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(c.UPLOADING)},c.prototype.getAddedFiles=function(){return this.getFilesWithStatus(c.ADDED)},c.prototype.getActiveFiles=function(){var a,b,d,e,f;for(e=this.files,f=[],b=0,d=e.length;d>b;b++)a=e[b],(a.status===c.UPLOADING||a.status===c.QUEUED)&&f.push(a);return f},c.prototype.init=function(){var a,b,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(c.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return a.emit("addedfiles",c),d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),b=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(c){return b(c),a.emit("dragenter",c)}}(this),dragover:function(a){return function(c){var d;try{d=c.dataTransfer.effectAllowed}catch(e){}return c.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",b(c),a.emit("dragover",c)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(c){return b(c),a.drop(c)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(b){return a.listeners.push({element:b,events:{click:function(d){return(b!==a.element||d.target===a.element||c.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},c.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,c.instances.splice(c.instances.indexOf(this),1)},c.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},c.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},c.prototype._renameFilename=function(a){return"function"!=typeof this.options.renameFilename?a:this.options.renameFilename(a)},c.prototype.getFallbackForm=function(){var a,b,d,e;return(a=this.getExistingFallback())?a:(d='
',this.options.dictFallbackText&&(d+="

"+this.options.dictFallbackText+"

"),d+='
',b=c.createElement(d),"FORM"!==this.element.tagName?(e=c.createElement('
'),e.appendChild(b)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:b)},c.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},c.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},c.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},c.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},c.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},c.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;if(d=0,e="b",a>0){for(g=["TB","GB","MB","KB","b"],c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return""+d+" "+e},c.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},c.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},c.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},c.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},c.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},c.prototype._addFilesFromDirectory=function(a,b){var c,d,e;return c=a.createReader(),d=function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0},(e=function(a){return function(){return c.readEntries(function(c){var d,f,g;if(c.length>0){for(f=0,g=c.length;g>f;f++)d=c[f],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name);e()}return null},d)}}(this))()},c.prototype.accept=function(a,b){return a.size>1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):c.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},c.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=c.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},c.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},c.prototype.enqueueFile=function(a){if(a.status!==c.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=c.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},c.prototype._thumbnailQueue=[],c.prototype._processingThumbnail=!1,c.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},c.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},c.prototype.removeFile=function(a){return a.status===c.UPLOADING&&this.cancelUpload(a),this.files=h(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},c.prototype.removeAllFiles=function(a){var b,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)b=f[d],(b.status!==c.UPLOADING||a)&&this.removeFile(b);return null},c.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):d.createThumbnailFromUrl(a,c.result,b)}}(this),c.readAsDataURL(a)},c.prototype.createThumbnailFromUrl=function(a,b,c,d){var e;return e=document.createElement("img"),d&&(e.crossOrigin=d),e.onload=function(b){return function(){var d,g,h,i,j,k,l,m;return a.width=e.width,a.height=e.height,h=b.options.resize.call(b,a),null==h.trgWidth&&(h.trgWidth=h.optWidth),null==h.trgHeight&&(h.trgHeight=h.optHeight),d=document.createElement("canvas"),g=d.getContext("2d"),d.width=h.trgWidth,d.height=h.trgHeight,f(g,e,null!=(j=h.srcX)?j:0,null!=(k=h.srcY)?k:0,h.srcWidth,h.srcHeight,null!=(l=h.trgX)?l:0,null!=(m=h.trgY)?m:0,h.trgWidth,h.trgHeight),i=d.toDataURL("image/png"),b.emit("thumbnail",a,i),null!=c?c():void 0}}(this),null!=c&&(e.onerror=c),e.src=b},c.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},c.prototype.processFile=function(a){return this.processFiles([a])},c.prototype.processFiles=function(a){var b,d,e;for(d=0,e=a.length;e>d;d++)b=a[d],b.processing=!0,b.status=c.UPLOADING,this.emit("processing",b);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},c.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},c.prototype.cancelUpload=function(a){var b,d,e,f,g,h,i;if(a.status===c.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)b=d[e],b.status=c.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)b=d[f],this.emit("canceled",b);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===c.ADDED||i===c.QUEUED)&&(a.status=c.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},c.prototype.uploadFile=function(a){return this.uploadFiles([a])},c.prototype.uploadFiles=function(a){var b,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)b=a[x],b.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(c){return function(){var d,e,f;for(f=[],d=0,e=a.length;e>d;d++)b=a[d],f.push(c._errorProcessing(a,s||c.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(c){return function(d){var e,f,g,h,i,j,k,l,m;if(null!=d)for(f=100*d.loaded/d.total,g=0,j=a.length;j>g;g++)b=a[g],b.upload={progress:f,total:d.total,bytesSent:d.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)b=a[h],(100!==b.upload.progress||b.upload.bytesSent!==b.upload.total)&&(e=!1),b.upload.progress=f,b.upload.bytesSent=b.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)b=a[i],m.push(c.emit("uploadprogress",b,f,b.upload.bytesSent));return m}}(this),w.onload=function(b){return function(d){var e;if(a[0].status!==c.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?b._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==c.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&d(j,this.options.headers);for(h in j)i=j[h],i&&w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)b=a[y],this.emit("sending",b,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],this._renameFilename(a[k].name));return this.submitRequest(w,f,a)},c.prototype.submitRequest=function(a,b){return a.send(b)},c.prototype._finished=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.SUCCESS,this.emit("success",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c.prototype._errorProcessing=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.ERROR,this.emit("error",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c}(b),a.version="4.3.0",a.options={},a.optionsForElement=function(b){return b.getAttribute("id")?a.options[c(b.getAttribute("id"))]:void 0},a.instances=[],a.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},a.autoDiscover=!0,a.discover=function(){var b,c,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],b=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},b(document.getElementsByTagName("div")),b(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)c=d[e],g.push(a.optionsForElement(c)!==!1?new a(c):void 0);return g},a.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],a.isBrowserSupported=function(){var b,c,d,e,f;if(b=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=a.blacklistedBrowsers,d=0,e=f.length;e>d;d++)c=f[d],c.test(navigator.userAgent)&&(b=!1);else b=!1;else b=!1;return b},h=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},c=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},a.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},a.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},a.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},a.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},a.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},a.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0 +}else if(d===e)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(b){return this.each(function(){return new a(this,b)})}),"undefined"!=typeof module&&null!==module?module.exports=a:window.Dropzone=a,a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success",e=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},a._autoDiscoverFunction=function(){return a.autoDiscover?a.discover():void 0},d(window,a._autoDiscoverFunction)}).call(this); \ No newline at end of file diff --git a/web/libraries/dropzone/dist/readme.md b/web/libraries/dropzone/dist/readme.md new file mode 100755 index 000000000..f281e0464 --- /dev/null +++ b/web/libraries/dropzone/dist/readme.md @@ -0,0 +1,10 @@ +# Warning! + +You shouldn't pull these files from the github master branch directly! + +They might be outdated or not working at all since I normally only push them +when I create a version release. + +To be sure to get a proper release, please go to the +[dropzone releases section on github](https://github.com/enyo/dropzone/releases/latest). + diff --git a/web/libraries/dropzone/index.js b/web/libraries/dropzone/index.js new file mode 100755 index 000000000..f300153ac --- /dev/null +++ b/web/libraries/dropzone/index.js @@ -0,0 +1 @@ +module.exports = require("./lib/dropzone.js"); // Exposing dropzone diff --git a/web/libraries/dropzone/package.json b/web/libraries/dropzone/package.json new file mode 100755 index 000000000..007757026 --- /dev/null +++ b/web/libraries/dropzone/package.json @@ -0,0 +1,57 @@ +{ + "name": "dropzone", + "version": "4.3.0", + "description": "Handles drag and drop of files for you.", + "keywords": [ + "dragndrop", + "drag and drop", + "file upload", + "upload" + ], + "homepage": "http://www.dropzonejs.com", + "main": "./dist/dropzone.js", + "maintainers": [ + { + "name": "Matias Meno", + "email": "m@tias.me", + "web": "http://www.matiasmeno.com" + } + ], + "contributors": [ + { + "name": "Matias Meno", + "email": "m@tias.me", + "web": "http://www.matiasmeno.com" + } + ], + "scripts": { + "test": "./test.sh" + }, + "bugs": { + "email": "m@tias.me", + "url": "https://github.com/enyo/dropzone/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://www.opensource.org/licenses/MIT" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/enyo/dropzone.git" + }, + "dependencies": {}, + "devDependencies": { + "chai": "1.7.x", + "grunt": "^0.4.4", + "grunt-contrib-coffee": "^0.10.1", + "grunt-contrib-concat": "^0.4.0", + "grunt-contrib-sass": "^0.8.1", + "grunt-contrib-uglify": "^0.4.0", + "grunt-contrib-watch": "^0.6.1", + "mocha": "^1.18.2", + "mocha-phantomjs": "^3.3.2", + "sinon": "1.9.1" + } +} diff --git a/web/libraries/dropzone/src/basic.scss b/web/libraries/dropzone/src/basic.scss new file mode 100755 index 000000000..52b932917 --- /dev/null +++ b/web/libraries/dropzone/src/basic.scss @@ -0,0 +1,78 @@ +/* + * The MIT License + * Copyright (c) 2012 Matias Meno + */ + +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +.dropzone, .dropzone * { + box-sizing: border-box; +} +.dropzone { + + position: relative; + + .dz-preview { + position: relative; + display: inline-block; + width: 120px; + margin: 0.5em; + + .dz-progress { + display: block; + height: 15px; + border: 1px solid #aaa; + .dz-upload { + display: block; + height: 100%; + width: 0; + background: green; + } + } + + .dz-error-message { + color: red; + display: none; + } + &.dz-error { + .dz-error-message, .dz-error-mark { + display: block; + } + } + &.dz-success { + .dz-success-mark { + display: block; + } + } + + .dz-error-mark, .dz-success-mark { + position: absolute; + display: none; + left: 30px; + top: 30px; + width: 54px; + height: 58px; + left: 50%; + margin-left: -(54px/2); + } + + + } + +} \ No newline at end of file diff --git a/web/libraries/dropzone/src/dropzone.coffee b/web/libraries/dropzone/src/dropzone.coffee new file mode 100755 index 000000000..d9bd22349 --- /dev/null +++ b/web/libraries/dropzone/src/dropzone.coffee @@ -0,0 +1,1590 @@ +### +# +# More info at [www.dropzonejs.com](http://www.dropzonejs.com) +# +# Copyright (c) 2012, Matias Meno +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +### + + +noop = -> + + +# The Emitter class provides the ability to call `.on()` on Dropzone to listen +# to events. +# It is strongly based on component's emitter class, and I removed the +# functionality because of the dependency hell with different frameworks. +class Emitter + + # Add an event listener for given event + addEventListener: @::on + on: (event, fn) -> + @_callbacks = @_callbacks || {} + # Create namespace for this event + @_callbacks[event] = [] unless @_callbacks[event] + @_callbacks[event].push fn + return @ + + + emit: (event, args...) -> + @_callbacks = @_callbacks || {} + callbacks = @_callbacks[event] + + if callbacks + callback.apply @, args for callback in callbacks + + return @ + + # Remove event listener for given event. If fn is not provided, all event + # listeners for that event will be removed. If neither is provided, all + # event listeners will be removed. + removeListener: @::off + removeAllListeners: @::off + removeEventListener: @::off + off: (event, fn) -> + if !@_callbacks || arguments.length == 0 + @_callbacks = {} + return @ + + # specific event + callbacks = @_callbacks[event] + return @ unless callbacks + + # remove all handlers + if arguments.length == 1 + delete @_callbacks[event] + return @ + + # remove specific handler + for callback, i in callbacks + if callback == fn + callbacks.splice i, 1 + break + + return @ + +class Dropzone extends Emitter + + # Exposing the emitter class, mainly for tests + Emitter: Emitter + + ### + This is a list of all available events you can register on a dropzone object. + + You can register an event handler like this: + + dropzone.on("dragEnter", function() { }); + + ### + events: [ + "drop" + "dragstart" + "dragend" + "dragenter" + "dragover" + "dragleave" + "addedfile" + "addedfiles" + "removedfile" + "thumbnail" + "error" + "errormultiple" + "processing" + "processingmultiple" + "uploadprogress" + "totaluploadprogress" + "sending" + "sendingmultiple" + "success" + "successmultiple" + "canceled" + "canceledmultiple" + "complete" + "completemultiple" + "reset" + "maxfilesexceeded" + "maxfilesreached" + "queuecomplete" + ] + + + + defaultOptions: + url: null + method: "post" + withCredentials: no + parallelUploads: 2 + uploadMultiple: no # Whether to send multiple files in one request. + maxFilesize: 256 # in MB + paramName: "file" # The name of the file param that gets transferred. + createImageThumbnails: true + maxThumbnailFilesize: 10 # in MB. When the filename exceeds this limit, the thumbnail will not be generated. + thumbnailWidth: 120 + thumbnailHeight: 120 + + # The base that is used to calculate the filesize. You can change this to + # 1024 if you would rather display kibibytes, mebibytes, etc... + # 1024 is technically incorrect, + # because `1024 bytes` are `1 kibibyte` not `1 kilobyte`. + # You can change this to `1024` if you don't care about validity. + filesizeBase: 1000 + + # Can be used to limit the maximum number of files that will be handled + # by this Dropzone + maxFiles: null + + # Can be an object of additional parameters to transfer to the server. + # This is the same as adding hidden input fields in the form element. + params: { } + + # If true, the dropzone will present a file selector when clicked. + clickable: yes + + # Whether hidden files in directories should be ignored. + ignoreHiddenFiles: yes + + # You can set accepted mime types here. + # + # The default implementation of the `accept()` function will check this + # property, and if the Dropzone is clickable this will be used as + # `accept` attribute. + # + # This is a comma separated list of mime types or extensions. E.g.: + # + # audio/*,video/*,image/png,.pdf + # + # See https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept + # for a reference. + acceptedFiles: null + + # @deprecated + # Use acceptedFiles instead. + acceptedMimeTypes: null + + # If false, files will be added to the queue but the queue will not be + # processed automatically. + # This can be useful if you need some additional user input before sending + # files (or if you want want all files sent at once). + # If you're ready to send the file simply call myDropzone.processQueue() + autoProcessQueue: on + + # If false, files added to the dropzone will not be queued by default. + # You'll have to call `enqueueFile(file)` manually. + autoQueue: on + + # If true, Dropzone will add a link to each file preview to cancel/remove + # the upload. + # See dictCancelUpload and dictRemoveFile to use different words. + addRemoveLinks: no + + # A CSS selector or HTML element for the file previews container. + # If null, the dropzone element itself will be used. + # If false, previews won't be rendered. + previewsContainer: null + + # Selector for hidden input container + hiddenInputContainer: "body" + + # If null, no capture type will be specified + # If camera, mobile devices will skip the file selection and choose camera + # If microphone, mobile devices will skip the file selection and choose the microphone + # If camcorder, mobile devices will skip the file selection and choose the camera in video mode + # On apple devices multiple must be set to false. AcceptedFiles may need to + # be set to an appropriate mime type (e.g. "image/*", "audio/*", or "video/*"). + capture: null + + # Before the file is appended to the formData, the function _renameFilename is performed for file.name + # which executes the function defined in renameFilename + renameFilename: null + + # Dictionary + + # The text used before any files are dropped + dictDefaultMessage: "Drop files here to upload" + + # The text that replaces the default message text it the browser is not supported + dictFallbackMessage: "Your browser does not support drag'n'drop file uploads." + + # The text that will be added before the fallback form + # If null, no text will be added at all. + dictFallbackText: "Please use the fallback form below to upload your files like in the olden days." + + # If the filesize is too big. + dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB." + + # If the file doesn't match the file type. + dictInvalidFileType: "You can't upload files of this type." + + # If the server response was invalid. + dictResponseError: "Server responded with {{statusCode}} code." + + # If used, the text to be used for the cancel upload link. + dictCancelUpload: "Cancel upload" + + # If used, the text to be used for confirmation when cancelling upload. + dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?" + + # If used, the text to be used to remove a file. + dictRemoveFile: "Remove file" + + # If this is not null, then the user will be prompted before removing a file. + dictRemoveFileConfirmation: null + + # Displayed when the maxFiles have been exceeded + # You can use {{maxFiles}} here, which will be replaced by the option. + dictMaxFilesExceeded: "You can not upload any more files." + + + # If `done()` is called without argument the file is accepted + # If you call it with an error message, the file is rejected + # (This allows for asynchronous validation). + accept: (file, done) -> done() + + + # Called when dropzone initialized + # You can add event listeners here + init: -> noop + + # Used to debug dropzone and force the fallback form. + forceFallback: off + + # Called when the browser does not support drag and drop + fallback: -> + # This code should pass in IE7... :( + @element.className = "#{@element.className} dz-browser-not-supported" + + for child in @element.getElementsByTagName "div" + if /(^| )dz-message($| )/.test child.className + messageElement = child + child.className = "dz-message" # Removes the 'dz-default' class + continue + unless messageElement + messageElement = Dropzone.createElement """
""" + @element.appendChild messageElement + + span = messageElement.getElementsByTagName("span")[0] + if span + if span.textContent? + span.textContent = @options.dictFallbackMessage + else if span.innerText? + span.innerText = @options.dictFallbackMessage + + @element.appendChild @getFallbackForm() + + + + # Gets called to calculate the thumbnail dimensions. + # + # You can use file.width, file.height, options.thumbnailWidth and + # options.thumbnailHeight to calculate the dimensions. + # + # The dimensions are going to be used like this: + # + # var info = @options.resize.call(this, file); + # ctx.drawImage(img, info.srcX, info.srcY, info.srcWidth, info.srcHeight, info.trgX, info.trgY, info.trgWidth, info.trgHeight); + # + # srcX, srcy, trgX and trgY can be omitted (in which case 0 is assumed). + # trgWidth and trgHeight can be omitted (in which case the options.thumbnailWidth / options.thumbnailHeight are used) + resize: (file) -> + info = + srcX: 0 + srcY: 0 + srcWidth: file.width + srcHeight: file.height + + srcRatio = file.width / file.height + + info.optWidth = @options.thumbnailWidth + info.optHeight = @options.thumbnailHeight + + # automatically calculate dimensions if not specified + if !info.optWidth? and !info.optHeight? + info.optWidth = info.srcWidth + info.optHeight = info.srcHeight + else if !info.optWidth? + info.optWidth = srcRatio * info.optHeight + else if !info.optHeight? + info.optHeight = (1/srcRatio) * info.optWidth + + trgRatio = info.optWidth / info.optHeight + + if file.height < info.optHeight or file.width < info.optWidth + # This image is smaller than the canvas + info.trgHeight = info.srcHeight + info.trgWidth = info.srcWidth + + else + # Image is bigger and needs rescaling + if srcRatio > trgRatio + info.srcHeight = file.height + info.srcWidth = info.srcHeight * trgRatio + else + info.srcWidth = file.width + info.srcHeight = info.srcWidth / trgRatio + + info.srcX = (file.width - info.srcWidth) / 2 + info.srcY = (file.height - info.srcHeight) / 2 + + return info + + + ### + Those functions register themselves to the events on init and handle all + the user interface specific stuff. Overwriting them won't break the upload + but can break the way it's displayed. + You can overwrite them if you don't like the default behavior. If you just + want to add an additional event handler, register it on the dropzone object + and don't overwrite those options. + ### + + + + + # Those are self explanatory and simply concern the DragnDrop. + drop: (e) -> @element.classList.remove "dz-drag-hover" + dragstart: noop + dragend: (e) -> @element.classList.remove "dz-drag-hover" + dragenter: (e) -> @element.classList.add "dz-drag-hover" + dragover: (e) -> @element.classList.add "dz-drag-hover" + dragleave: (e) -> @element.classList.remove "dz-drag-hover" + + paste: noop + + # Called whenever there are no files left in the dropzone anymore, and the + # dropzone should be displayed as if in the initial state. + reset: -> + @element.classList.remove "dz-started" + + # Called when a file is added to the queue + # Receives `file` + addedfile: (file) -> + @element.classList.add "dz-started" if @element == @previewsContainer + + if @previewsContainer + file.previewElement = Dropzone.createElement @options.previewTemplate.trim() + file.previewTemplate = file.previewElement # Backwards compatibility + + @previewsContainer.appendChild file.previewElement + node.textContent = @_renameFilename(file.name) for node in file.previewElement.querySelectorAll("[data-dz-name]") + node.innerHTML = @filesize file.size for node in file.previewElement.querySelectorAll("[data-dz-size]") + + if @options.addRemoveLinks + file._removeLink = Dropzone.createElement """#{@options.dictRemoveFile}""" + file.previewElement.appendChild file._removeLink + + removeFileEvent = (e) => + e.preventDefault() + e.stopPropagation() + if file.status == Dropzone.UPLOADING + Dropzone.confirm @options.dictCancelUploadConfirmation, => @removeFile file + else + if @options.dictRemoveFileConfirmation + Dropzone.confirm @options.dictRemoveFileConfirmation, => @removeFile file + else + @removeFile file + + removeLink.addEventListener "click", removeFileEvent for removeLink in file.previewElement.querySelectorAll("[data-dz-remove]") + + + # Called whenever a file is removed. + removedfile: (file) -> + file.previewElement?.parentNode.removeChild file.previewElement if file.previewElement + @_updateMaxFilesReachedClass() + + # Called when a thumbnail has been generated + # Receives `file` and `dataUrl` + thumbnail: (file, dataUrl) -> + if file.previewElement + file.previewElement.classList.remove "dz-file-preview" + for thumbnailElement in file.previewElement.querySelectorAll("[data-dz-thumbnail]") + thumbnailElement.alt = file.name + thumbnailElement.src = dataUrl + + setTimeout (=> file.previewElement.classList.add "dz-image-preview"), 1 + + # Called whenever an error occurs + # Receives `file` and `message` + error: (file, message) -> + if file.previewElement + file.previewElement.classList.add "dz-error" + message = message.error if typeof message != "String" and message.error + node.textContent = message for node in file.previewElement.querySelectorAll("[data-dz-errormessage]") + + errormultiple: noop + + # Called when a file gets processed. Since there is a cue, not all added + # files are processed immediately. + # Receives `file` + processing: (file) -> + if file.previewElement + file.previewElement.classList.add "dz-processing" + file._removeLink.textContent = @options.dictCancelUpload if file._removeLink + + processingmultiple: noop + + # Called whenever the upload progress gets updated. + # Receives `file`, `progress` (percentage 0-100) and `bytesSent`. + # To get the total number of bytes of the file, use `file.size` + uploadprogress: (file, progress, bytesSent) -> + if file.previewElement + for node in file.previewElement.querySelectorAll("[data-dz-uploadprogress]") + if node.nodeName is 'PROGRESS' + node.value = progress + else + node.style.width = "#{progress}%" + + # Called whenever the total upload progress gets updated. + # Called with totalUploadProgress (0-100), totalBytes and totalBytesSent + totaluploadprogress: noop + + # Called just before the file is sent. Gets the `xhr` object as second + # parameter, so you can modify it (for example to add a CSRF token) and a + # `formData` object to add additional information. + sending: noop + + sendingmultiple: noop + + # When the complete upload is finished and successful + # Receives `file` + success: (file) -> + file.previewElement.classList.add "dz-success" if file.previewElement + + successmultiple: noop + + # When the upload is canceled. + canceled: (file) -> @emit "error", file, "Upload canceled." + + canceledmultiple: noop + + # When the upload is finished, either with success or an error. + # Receives `file` + complete: (file) -> + file._removeLink.textContent = @options.dictRemoveFile if file._removeLink + file.previewElement.classList.add "dz-complete" if file.previewElement + + completemultiple: noop + + maxfilesexceeded: noop + + maxfilesreached: noop + + queuecomplete: noop + + addedfiles: noop + + + # This template will be chosen when a new file is dropped. + previewTemplate: """ +
+
+
+
+
+
+
+
+
+ + Check + + + + + +
+
+ + Error + + + + + + + +
+
+ """ + + # global utility + extend = (target, objects...) -> + for object in objects + target[key] = val for key, val of object + target + + constructor: (@element, options) -> + # For backwards compatibility since the version was in the prototype previously + @version = Dropzone.version + + @defaultOptions.previewTemplate = @defaultOptions.previewTemplate.replace /\n*/g, "" + + @clickableElements = [ ] + @listeners = [ ] + @files = [] # All files + + @element = document.querySelector @element if typeof @element == "string" + + # Not checking if instance of HTMLElement or Element since IE9 is extremely weird. + throw new Error "Invalid dropzone element." unless @element and @element.nodeType? + + throw new Error "Dropzone already attached." if @element.dropzone + + # Now add this dropzone to the instances. + Dropzone.instances.push @ + + # Put the dropzone inside the element itself. + @element.dropzone = @ + + elementOptions = Dropzone.optionsForElement(@element) ? { } + + @options = extend { }, @defaultOptions, elementOptions, options ? { } + + # If the browser failed, just call the fallback and leave + return @options.fallback.call this if @options.forceFallback or !Dropzone.isBrowserSupported() + + # @options.url = @element.getAttribute "action" unless @options.url? + @options.url = @element.getAttribute "action" unless @options.url? + + throw new Error "No URL provided." unless @options.url + + throw new Error "You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated." if @options.acceptedFiles and @options.acceptedMimeTypes + + # Backwards compatibility + if @options.acceptedMimeTypes + @options.acceptedFiles = @options.acceptedMimeTypes + delete @options.acceptedMimeTypes + + @options.method = @options.method.toUpperCase() + + if (fallback = @getExistingFallback()) and fallback.parentNode + # Remove the fallback + fallback.parentNode.removeChild fallback + + # Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false + if @options.previewsContainer != false + if @options.previewsContainer + @previewsContainer = Dropzone.getElement @options.previewsContainer, "previewsContainer" + else + @previewsContainer = @element + + if @options.clickable + if @options.clickable == yes + @clickableElements = [ @element ] + else + @clickableElements = Dropzone.getElements @options.clickable, "clickable" + + + @init() + + + # Returns all files that have been accepted + getAcceptedFiles: -> file for file in @files when file.accepted + + # Returns all files that have been rejected + # Not sure when that's going to be useful, but added for completeness. + getRejectedFiles: -> file for file in @files when not file.accepted + + getFilesWithStatus: (status) -> file for file in @files when file.status == status + + # Returns all files that are in the queue + getQueuedFiles: -> @getFilesWithStatus Dropzone.QUEUED + + getUploadingFiles: -> @getFilesWithStatus Dropzone.UPLOADING + + getAddedFiles: -> @getFilesWithStatus Dropzone.ADDED + + # Files that are either queued or uploading + getActiveFiles: -> file for file in @files when file.status == Dropzone.UPLOADING or file.status == Dropzone.QUEUED + + + init: -> + # In case it isn't set already + @element.setAttribute("enctype", "multipart/form-data") if @element.tagName == "form" + + if @element.classList.contains("dropzone") and !@element.querySelector(".dz-message") + @element.appendChild Dropzone.createElement """
#{@options.dictDefaultMessage}
""" + + if @clickableElements.length + setupHiddenFileInput = => + @hiddenFileInput.parentNode.removeChild @hiddenFileInput if @hiddenFileInput + @hiddenFileInput = document.createElement "input" + @hiddenFileInput.setAttribute "type", "file" + @hiddenFileInput.setAttribute "multiple", "multiple" if !@options.maxFiles? || @options.maxFiles > 1 + @hiddenFileInput.className = "dz-hidden-input" + + @hiddenFileInput.setAttribute "accept", @options.acceptedFiles if @options.acceptedFiles? + @hiddenFileInput.setAttribute "capture", @options.capture if @options.capture? + + # Not setting `display="none"` because some browsers don't accept clicks + # on elements that aren't displayed. + @hiddenFileInput.style.visibility = "hidden" + @hiddenFileInput.style.position = "absolute" + @hiddenFileInput.style.top = "0" + @hiddenFileInput.style.left = "0" + @hiddenFileInput.style.height = "0" + @hiddenFileInput.style.width = "0" + document.querySelector(@options.hiddenInputContainer).appendChild @hiddenFileInput + @hiddenFileInput.addEventListener "change", => + files = @hiddenFileInput.files + @addFile file for file in files if files.length + @emit "addedfiles", files + setupHiddenFileInput() + setupHiddenFileInput() + + @URL = window.URL ? window.webkitURL + + + # Setup all event listeners on the Dropzone object itself. + # They're not in @setupEventListeners() because they shouldn't be removed + # again when the dropzone gets disabled. + @on eventName, @options[eventName] for eventName in @events + + @on "uploadprogress", => @updateTotalUploadProgress() + + @on "removedfile", => @updateTotalUploadProgress() + + @on "canceled", (file) => @emit "complete", file + + # Emit a `queuecomplete` event if all files finished uploading. + @on "complete", (file) => + if @getAddedFiles().length == 0 and @getUploadingFiles().length == 0 and @getQueuedFiles().length == 0 + # This needs to be deferred so that `queuecomplete` really triggers after `complete` + setTimeout (=> @emit "queuecomplete"), 0 + + + noPropagation = (e) -> + e.stopPropagation() + if e.preventDefault + e.preventDefault() + else + e.returnValue = false + + # Create the listeners + @listeners = [ + { + element: @element + events: + "dragstart": (e) => + @emit "dragstart", e + "dragenter": (e) => + noPropagation e + @emit "dragenter", e + "dragover": (e) => + # Makes it possible to drag files from chrome's download bar + # http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar + # Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception) + try efct = e.dataTransfer.effectAllowed + e.dataTransfer.dropEffect = if 'move' == efct or 'linkMove' == efct then 'move' else 'copy' + + noPropagation e + @emit "dragover", e + "dragleave": (e) => + @emit "dragleave", e + "drop": (e) => + noPropagation e + @drop e + "dragend": (e) => + @emit "dragend", e + + # This is disabled right now, because the browsers don't implement it properly. + # "paste": (e) => + # noPropagation e + # @paste e + } + ] + + @clickableElements.forEach (clickableElement) => + @listeners.push + element: clickableElement + events: + "click": (evt) => + # Only the actual dropzone or the message element should trigger file selection + if (clickableElement != @element) or (evt.target == @element or Dropzone.elementInside evt.target, @element.querySelector ".dz-message") + @hiddenFileInput.click() # Forward the click + return true + + @enable() + + @options.init.call @ + + # Not fully tested yet + destroy: -> + @disable() + @removeAllFiles true + if @hiddenFileInput?.parentNode + @hiddenFileInput.parentNode.removeChild @hiddenFileInput + @hiddenFileInput = null + delete @element.dropzone + Dropzone.instances.splice Dropzone.instances.indexOf(this), 1 + + + updateTotalUploadProgress: -> + totalBytesSent = 0 + totalBytes = 0 + + activeFiles = @getActiveFiles() + + if activeFiles.length + for file in @getActiveFiles() + totalBytesSent += file.upload.bytesSent + totalBytes += file.upload.total + totalUploadProgress = 100 * totalBytesSent / totalBytes + else + totalUploadProgress = 100 + + @emit "totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent + + # @options.paramName can be a function taking one parameter rather than a string. + # A parameter name for a file is obtained simply by calling this with an index number. + _getParamName: (n) -> + if typeof @options.paramName is "function" + @options.paramName n + else + "#{@options.paramName}#{if @options.uploadMultiple then "[#{n}]" else ""}" + + # If @options.renameFilename is a function, + # the function will be used to rename the file.name before appending it to the formData + _renameFilename: (name) -> + return name unless typeof @options.renameFilename is "function" + @options.renameFilename name + + # Returns a form that can be used as fallback if the browser does not support DragnDrop + # + # If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided. + # This code has to pass in IE7 :( + getFallbackForm: -> + return existingFallback if existingFallback = @getExistingFallback() + + fieldsString = """
""" + fieldsString += """

#{@options.dictFallbackText}

""" if @options.dictFallbackText + fieldsString += """
""" + + fields = Dropzone.createElement fieldsString + if @element.tagName isnt "FORM" + form = Dropzone.createElement("""
""") + form.appendChild fields + else + # Make sure that the enctype and method attributes are set properly + @element.setAttribute "enctype", "multipart/form-data" + @element.setAttribute "method", @options.method + form ? fields + + + # Returns the fallback elements if they exist already + # + # This code has to pass in IE7 :( + getExistingFallback: -> + getFallback = (elements) -> return el for el in elements when /(^| )fallback($| )/.test el.className + + for tagName in [ "div", "form" ] + return fallback if fallback = getFallback @element.getElementsByTagName tagName + + + # Activates all listeners stored in @listeners + setupEventListeners: -> + for elementListeners in @listeners + elementListeners.element.addEventListener event, listener, false for event, listener of elementListeners.events + + + # Deactivates all listeners stored in @listeners + removeEventListeners: -> + for elementListeners in @listeners + elementListeners.element.removeEventListener event, listener, false for event, listener of elementListeners.events + + # Removes all event listeners and cancels all files in the queue or being processed. + disable: -> + @clickableElements.forEach (element) -> element.classList.remove "dz-clickable" + @removeEventListeners() + + @cancelUpload file for file in @files + + enable: -> + @clickableElements.forEach (element) -> element.classList.add "dz-clickable" + @setupEventListeners() + + # Returns a nicely formatted filesize + filesize: (size) -> + selectedSize = 0 + selectedUnit = "b" + + if size > 0 + units = [ 'TB', 'GB', 'MB', 'KB', 'b' ] + + for unit, i in units + cutoff = Math.pow(@options.filesizeBase, 4 - i) / 10 + + if size >= cutoff + selectedSize = size / Math.pow(@options.filesizeBase, 4 - i) + selectedUnit = unit + break + + selectedSize = Math.round(10 * selectedSize) / 10 # Cutting of digits + + "#{selectedSize} #{selectedUnit}" + + + # Adds or removes the `dz-max-files-reached` class from the form. + _updateMaxFilesReachedClass: -> + if @options.maxFiles? and @getAcceptedFiles().length >= @options.maxFiles + @emit 'maxfilesreached', @files if @getAcceptedFiles().length == @options.maxFiles + @element.classList.add "dz-max-files-reached" + else + @element.classList.remove "dz-max-files-reached" + + + + drop: (e) -> + return unless e.dataTransfer + @emit "drop", e + + files = e.dataTransfer.files + @emit "addedfiles", files + + # Even if it's a folder, files.length will contain the folders. + if files.length + items = e.dataTransfer.items + if items and items.length and (items[0].webkitGetAsEntry?) + # The browser supports dropping of folders, so handle items instead of files + @_addFilesFromItems items + else + @handleFiles files + return + + paste: (e) -> + return unless e?.clipboardData?.items? + + @emit "paste", e + items = e.clipboardData.items + + @_addFilesFromItems items if items.length + + + handleFiles: (files) -> + @addFile file for file in files + + # When a folder is dropped (or files are pasted), items must be handled + # instead of files. + _addFilesFromItems: (items) -> + for item in items + if item.webkitGetAsEntry? and entry = item.webkitGetAsEntry() + if entry.isFile + @addFile item.getAsFile() + else if entry.isDirectory + # Append all files from that directory to files + @_addFilesFromDirectory entry, entry.name + else if item.getAsFile? + if !item.kind? or item.kind == "file" + @addFile item.getAsFile() + + + # Goes through the directory, and adds each file it finds recursively + _addFilesFromDirectory: (directory, path) -> + dirReader = directory.createReader() + + errorHandler = (error) -> console?.log? error + + readEntries = () => + dirReader.readEntries (entries) => + if entries.length > 0 + for entry in entries + if entry.isFile + entry.file (file) => + return if @options.ignoreHiddenFiles and file.name.substring(0, 1) is '.' + file.fullPath = "#{path}/#{file.name}" + @addFile file + else if entry.isDirectory + @_addFilesFromDirectory entry, "#{path}/#{entry.name}" + + # Recursively call readEntries() again, since browser only handle + # the first 100 entries. + # See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries + readEntries() + return null + , errorHandler + + readEntries() + + + + # If `done()` is called without argument the file is accepted + # If you call it with an error message, the file is rejected + # (This allows for asynchronous validation) + # + # This function checks the filesize, and if the file.type passes the + # `acceptedFiles` check. + accept: (file, done) -> + if file.size > @options.maxFilesize * 1024 * 1024 + done @options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", @options.maxFilesize) + else unless Dropzone.isValidFile file, @options.acceptedFiles + done @options.dictInvalidFileType + else if @options.maxFiles? and @getAcceptedFiles().length >= @options.maxFiles + done @options.dictMaxFilesExceeded.replace "{{maxFiles}}", @options.maxFiles + @emit "maxfilesexceeded", file + else + @options.accept.call this, file, done + + addFile: (file) -> + file.upload = + progress: 0 + # Setting the total upload size to file.size for the beginning + # It's actual different than the size to be transmitted. + total: file.size + bytesSent: 0 + @files.push file + + file.status = Dropzone.ADDED + + @emit "addedfile", file + + @_enqueueThumbnail file + + @accept file, (error) => + if error + file.accepted = false + @_errorProcessing [ file ], error # Will set the file.status + else + file.accepted = true + @enqueueFile file if @options.autoQueue # Will set .accepted = true + @_updateMaxFilesReachedClass() + + + # Wrapper for enqueueFile + enqueueFiles: (files) -> @enqueueFile file for file in files; null + + enqueueFile: (file) -> + if file.status == Dropzone.ADDED and file.accepted == true + file.status = Dropzone.QUEUED + if @options.autoProcessQueue + setTimeout (=> @processQueue()), 0 # Deferring the call + else + throw new Error "This file can't be queued because it has already been processed or was rejected." + + + _thumbnailQueue: [ ] + _processingThumbnail: no + _enqueueThumbnail: (file) -> + if @options.createImageThumbnails and file.type.match(/image.*/) and file.size <= @options.maxThumbnailFilesize * 1024 * 1024 + @_thumbnailQueue.push(file) + setTimeout (=> @_processThumbnailQueue()), 0 # Deferring the call + + _processThumbnailQueue: -> + return if @_processingThumbnail or @_thumbnailQueue.length == 0 + + @_processingThumbnail = yes + @createThumbnail @_thumbnailQueue.shift(), => + @_processingThumbnail = no + @_processThumbnailQueue() + + + # Can be called by the user to remove a file + removeFile: (file) -> + @cancelUpload file if file.status == Dropzone.UPLOADING + @files = without @files, file + + @emit "removedfile", file + @emit "reset" if @files.length == 0 + + # Removes all files that aren't currently processed from the list + removeAllFiles: (cancelIfNecessary = off) -> + # Create a copy of files since removeFile() changes the @files array. + for file in @files.slice() + @removeFile file if file.status != Dropzone.UPLOADING || cancelIfNecessary + return null + + createThumbnail: (file, callback) -> + + fileReader = new FileReader + + fileReader.onload = => + + # Don't bother creating a thumbnail for SVG images since they're vector + if file.type == "image/svg+xml" + @emit "thumbnail", file, fileReader.result + callback() if callback? + return + + @createThumbnailFromUrl file, fileReader.result, callback + + fileReader.readAsDataURL file + + createThumbnailFromUrl: (file, imageUrl, callback, crossOrigin) -> + # Not using `new Image` here because of a bug in latest Chrome versions. + # See https://github.com/enyo/dropzone/pull/226 + img = document.createElement "img" + + img.crossOrigin = crossOrigin if crossOrigin + + img.onload = => + file.width = img.width + file.height = img.height + + resizeInfo = @options.resize.call @, file + + resizeInfo.trgWidth ?= resizeInfo.optWidth + resizeInfo.trgHeight ?= resizeInfo.optHeight + + canvas = document.createElement "canvas" + ctx = canvas.getContext "2d" + canvas.width = resizeInfo.trgWidth + canvas.height = resizeInfo.trgHeight + + # This is a bugfix for iOS' scaling bug. + drawImageIOSFix ctx, img, resizeInfo.srcX ? 0, resizeInfo.srcY ? 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX ? 0, resizeInfo.trgY ? 0, resizeInfo.trgWidth, resizeInfo.trgHeight + + thumbnail = canvas.toDataURL "image/png" + + @emit "thumbnail", file, thumbnail + callback() if callback? + + img.onerror = callback if callback? + + img.src = imageUrl + + + # Goes through the queue and processes files if there aren't too many already. + processQueue: -> + parallelUploads = @options.parallelUploads + processingLength = @getUploadingFiles().length + i = processingLength + + # There are already at least as many files uploading than should be + return if processingLength >= parallelUploads + + queuedFiles = @getQueuedFiles() + + return unless queuedFiles.length > 0 + + if @options.uploadMultiple + # The files should be uploaded in one request + @processFiles queuedFiles.slice 0, (parallelUploads - processingLength) + else + while i < parallelUploads + return unless queuedFiles.length # Nothing left to process + @processFile queuedFiles.shift() + i++ + + + # Wrapper for `processFiles` + processFile: (file) -> @processFiles [ file ] + + + # Loads the file, then calls finishedLoading() + processFiles: (files) -> + for file in files + file.processing = yes # Backwards compatibility + file.status = Dropzone.UPLOADING + + @emit "processing", file + + @emit "processingmultiple", files if @options.uploadMultiple + + @uploadFiles files + + + + _getFilesWithXhr: (xhr) -> files = (file for file in @files when file.xhr == xhr) + + + # Cancels the file upload and sets the status to CANCELED + # **if** the file is actually being uploaded. + # If it's still in the queue, the file is being removed from it and the status + # set to CANCELED. + cancelUpload: (file) -> + if file.status == Dropzone.UPLOADING + groupedFiles = @_getFilesWithXhr file.xhr + groupedFile.status = Dropzone.CANCELED for groupedFile in groupedFiles + file.xhr.abort() + @emit "canceled", groupedFile for groupedFile in groupedFiles + @emit "canceledmultiple", groupedFiles if @options.uploadMultiple + + else if file.status in [ Dropzone.ADDED, Dropzone.QUEUED ] + file.status = Dropzone.CANCELED + @emit "canceled", file + @emit "canceledmultiple", [ file ] if @options.uploadMultiple + + @processQueue() if @options.autoProcessQueue + + resolveOption = (option, args...) -> + if typeof option == 'function' + return option.apply(@, args) + option + + # Wrapper for uploadFiles() + uploadFile: (file) -> @uploadFiles [ file ] + + uploadFiles: (files) -> + xhr = new XMLHttpRequest() + + # Put the xhr object in the file objects to be able to reference it later. + file.xhr = xhr for file in files + + method = resolveOption @options.method, files + url = resolveOption @options.url, files + xhr.open method, url, true + + # Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179 + xhr.withCredentials = !!@options.withCredentials + + + response = null + + handleError = => + for file in files + @_errorProcessing files, response || @options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr + + + updateProgress = (e) => + if e? + progress = 100 * e.loaded / e.total + + for file in files + file.upload = + progress: progress + total: e.total + bytesSent: e.loaded + else + # Called when the file finished uploading + + allFilesFinished = yes + + progress = 100 + + for file in files + allFilesFinished = no unless file.upload.progress == 100 and file.upload.bytesSent == file.upload.total + file.upload.progress = progress + file.upload.bytesSent = file.upload.total + + # Nothing to do, all files already at 100% + return if allFilesFinished + + for file in files + @emit "uploadprogress", file, progress, file.upload.bytesSent + + xhr.onload = (e) => + return if files[0].status == Dropzone.CANCELED + + return unless xhr.readyState is 4 + + response = xhr.responseText + + if xhr.getResponseHeader("content-type") and ~xhr.getResponseHeader("content-type").indexOf "application/json" + try + response = JSON.parse response + catch e + response = "Invalid JSON response from server." + + updateProgress() + + unless 200 <= xhr.status < 300 + handleError() + else + @_finished files, response, e + + xhr.onerror = => + return if files[0].status == Dropzone.CANCELED + handleError() + + # Some browsers do not have the .upload property + progressObj = xhr.upload ? xhr + progressObj.onprogress = updateProgress + + headers = + "Accept": "application/json", + "Cache-Control": "no-cache", + "X-Requested-With": "XMLHttpRequest", + + extend headers, @options.headers if @options.headers + + for headerName, headerValue of headers + xhr.setRequestHeader headerName, headerValue if headerValue + + formData = new FormData() + + # Adding all @options parameters + formData.append key, value for key, value of @options.params if @options.params + + # Let the user add additional data if necessary + @emit "sending", file, xhr, formData for file in files + @emit "sendingmultiple", files, xhr, formData if @options.uploadMultiple + + + # Take care of other input elements + if @element.tagName == "FORM" + for input in @element.querySelectorAll "input, textarea, select, button" + inputName = input.getAttribute "name" + inputType = input.getAttribute "type" + + if input.tagName == "SELECT" and input.hasAttribute "multiple" + # Possibly multiple values + formData.append inputName, option.value for option in input.options when option.selected + else if !inputType or (inputType.toLowerCase() not in [ "checkbox", "radio" ]) or input.checked + formData.append inputName, input.value + + + # Finally add the file + # Has to be last because some servers (eg: S3) expect the file to be the + # last parameter + formData.append @_getParamName(i), files[i], @_renameFilename(files[i].name) for i in [0..files.length-1] + + @submitRequest xhr, formData, files + + submitRequest: (xhr, formData, files) -> + xhr.send formData + + # Called internally when processing is finished. + # Individual callbacks have to be called in the appropriate sections. + _finished: (files, responseText, e) -> + for file in files + file.status = Dropzone.SUCCESS + @emit "success", file, responseText, e + @emit "complete", file + if @options.uploadMultiple + @emit "successmultiple", files, responseText, e + @emit "completemultiple", files + + @processQueue() if @options.autoProcessQueue + + # Called internally when processing is finished. + # Individual callbacks have to be called in the appropriate sections. + _errorProcessing: (files, message, xhr) -> + for file in files + file.status = Dropzone.ERROR + @emit "error", file, message, xhr + @emit "complete", file + if @options.uploadMultiple + @emit "errormultiple", files, message, xhr + @emit "completemultiple", files + + @processQueue() if @options.autoProcessQueue + + + +Dropzone.version = "4.3.0" + + +# This is a map of options for your different dropzones. Add configurations +# to this object for your different dropzone elemens. +# +# Example: +# +# Dropzone.options.myDropzoneElementId = { maxFilesize: 1 }; +# +# To disable autoDiscover for a specific element, you can set `false` as an option: +# +# Dropzone.options.myDisabledElementId = false; +# +# And in html: +# +#
+Dropzone.options = { } + + +# Returns the options for an element or undefined if none available. +Dropzone.optionsForElement = (element) -> + # Get the `Dropzone.options.elementId` for this element if it exists + if element.getAttribute("id") then Dropzone.options[camelize element.getAttribute "id"] else undefined + + +# Holds a list of all dropzone instances +Dropzone.instances = [ ] + +# Returns the dropzone for given element if any +Dropzone.forElement = (element) -> + element = document.querySelector element if typeof element == "string" + throw new Error "No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone." unless element?.dropzone? + return element.dropzone + + +# Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements. +Dropzone.autoDiscover = on + +# Looks for all .dropzone elements and creates a dropzone for them +Dropzone.discover = -> + if document.querySelectorAll + dropzones = document.querySelectorAll ".dropzone" + else + dropzones = [ ] + # IE :( + checkElements = (elements) -> + for el in elements + dropzones.push el if /(^| )dropzone($| )/.test el.className + checkElements document.getElementsByTagName "div" + checkElements document.getElementsByTagName "form" + + for dropzone in dropzones + # Create a dropzone unless auto discover has been disabled for specific element + new Dropzone dropzone unless Dropzone.optionsForElement(dropzone) == false + + + +# Since the whole Drag'n'Drop API is pretty new, some browsers implement it, +# but not correctly. +# So I created a blacklist of userAgents. Yes, yes. Browser sniffing, I know. +# But what to do when browsers *theoretically* support an API, but crash +# when using it. +# +# This is a list of regular expressions tested against navigator.userAgent +# +# ** It should only be used on browser that *do* support the API, but +# incorrectly ** +# +Dropzone.blacklistedBrowsers = [ + # The mac os version of opera 12 seems to have a problem with the File drag'n'drop API. + /opera.*Macintosh.*version\/12/i + # /MSIE\ 10/i +] + + +# Checks if the browser is supported +Dropzone.isBrowserSupported = -> + capableBrowser = yes + + if window.File and window.FileReader and window.FileList and window.Blob and window.FormData and document.querySelector + unless "classList" of document.createElement "a" + capableBrowser = no + else + # The browser supports the API, but may be blacklisted. + for regex in Dropzone.blacklistedBrowsers + if regex.test navigator.userAgent + capableBrowser = no + continue + else + capableBrowser = no + + capableBrowser + + + + +# Returns an array without the rejected item +without = (list, rejectedItem) -> item for item in list when item isnt rejectedItem + +# abc-def_ghi -> abcDefGhi +camelize = (str) -> str.replace /[\-_](\w)/g, (match) -> match.charAt(1).toUpperCase() + +# Creates an element from string +Dropzone.createElement = (string) -> + div = document.createElement "div" + div.innerHTML = string + div.childNodes[0] + +# Tests if given element is inside (or simply is) the container +Dropzone.elementInside = (element, container) -> + return yes if element == container # Coffeescript doesn't support do/while loops + return yes while element = element.parentNode when element == container + return no + + + +Dropzone.getElement = (el, name) -> + if typeof el == "string" + element = document.querySelector el + else if el.nodeType? + element = el + throw new Error "Invalid `#{name}` option provided. Please provide a CSS selector or a plain HTML element." unless element? + return element + + +Dropzone.getElements = (els, name) -> + if els instanceof Array + elements = [ ] + try + elements.push @getElement el, name for el in els + catch e + elements = null + else if typeof els == "string" + elements = [ ] + elements.push el for el in document.querySelectorAll els + else if els.nodeType? + elements = [ els ] + + throw new Error "Invalid `#{name}` option provided. Please provide a CSS selector, a plain HTML element or a list of those." unless elements? and elements.length + + return elements + +# Asks the user the question and calls accepted or rejected accordingly +# +# The default implementation just uses `window.confirm` and then calls the +# appropriate callback. +Dropzone.confirm = (question, accepted, rejected) -> + if window.confirm question + accepted() + else if rejected? + rejected() + +# Validates the mime type like this: +# +# https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept +Dropzone.isValidFile = (file, acceptedFiles) -> + return yes unless acceptedFiles # If there are no accepted mime types, it's OK + acceptedFiles = acceptedFiles.split "," + + mimeType = file.type + baseMimeType = mimeType.replace /\/.*$/, "" + + for validType in acceptedFiles + validType = validType.trim() + if validType.charAt(0) == "." + return yes if file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) != -1 + else if /\/\*$/.test validType + # This is something like a image/* mime type + return yes if baseMimeType == validType.replace /\/.*$/, "" + else + return yes if mimeType == validType + + return no + + +# Augment jQuery +if jQuery? + jQuery.fn.dropzone = (options) -> + this.each -> new Dropzone this, options + + + + +if module? + module.exports = Dropzone +else + window.Dropzone = Dropzone + + + + + +# Dropzone file status codes +Dropzone.ADDED = "added" + +Dropzone.QUEUED = "queued" +# For backwards compatibility. Now, if a file is accepted, it's either queued +# or uploading. +Dropzone.ACCEPTED = Dropzone.QUEUED + +Dropzone.UPLOADING = "uploading" +Dropzone.PROCESSING = Dropzone.UPLOADING # alias + +Dropzone.CANCELED = "canceled" +Dropzone.ERROR = "error" +Dropzone.SUCCESS = "success" + + + + + +### + +Bugfix for iOS 6 and 7 +Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios +based on the work of https://github.com/stomita/ios-imagefile-megapixel + +### + +# Detecting vertical squash in loaded image. +# Fixes a bug which squash image vertically while drawing into canvas for some images. +# This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel +detectVerticalSquash = (img) -> + iw = img.naturalWidth + ih = img.naturalHeight + canvas = document.createElement("canvas") + canvas.width = 1 + canvas.height = ih + ctx = canvas.getContext("2d") + ctx.drawImage img, 0, 0 + data = ctx.getImageData(0, 0, 1, ih).data + + + # search image edge pixel position in case it is squashed vertically. + sy = 0 + ey = ih + py = ih + while py > sy + alpha = data[(py - 1) * 4 + 3] + + if alpha is 0 then ey = py else sy = py + + py = (ey + sy) >> 1 + ratio = (py / ih) + + if (ratio is 0) then 1 else ratio + +# A replacement for context.drawImage +# (args are for source and destination). +drawImageIOSFix = (ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) -> + vertSquashRatio = detectVerticalSquash img + ctx.drawImage img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio + + + + + + + + +### +# contentloaded.js +# +# Author: Diego Perini (diego.perini at gmail.com) +# Summary: cross-browser wrapper for DOMContentLoaded +# Updated: 20101020 +# License: MIT +# Version: 1.2 +# +# URL: +# http://javascript.nwbox.com/ContentLoaded/ +# http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE +### + +# @win window reference +# @fn function reference +contentLoaded = (win, fn) -> + done = false + top = true + doc = win.document + root = doc.documentElement + add = (if doc.addEventListener then "addEventListener" else "attachEvent") + rem = (if doc.addEventListener then "removeEventListener" else "detachEvent") + pre = (if doc.addEventListener then "" else "on") + init = (e) -> + return if e.type is "readystatechange" and doc.readyState isnt "complete" + ((if e.type is "load" then win else doc))[rem] pre + e.type, init, false + fn.call win, e.type or e if not done and (done = true) + + poll = -> + try + root.doScroll "left" + catch e + setTimeout poll, 50 + return + init "poll" + + unless doc.readyState is "complete" + if doc.createEventObject and root.doScroll + try + top = not win.frameElement + poll() if top + doc[add] pre + "DOMContentLoaded", init, false + doc[add] pre + "readystatechange", init, false + win[add] pre + "load", init, false + + +# As a single function to be able to write tests. +Dropzone._autoDiscoverFunction = -> Dropzone.discover() if Dropzone.autoDiscover +contentLoaded window, Dropzone._autoDiscoverFunction diff --git a/web/libraries/dropzone/src/dropzone.scss b/web/libraries/dropzone/src/dropzone.scss new file mode 100755 index 000000000..b99bedea0 --- /dev/null +++ b/web/libraries/dropzone/src/dropzone.scss @@ -0,0 +1,413 @@ +/* + * The MIT License + * Copyright (c) 2012 Matias Meno + */ + +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +@mixin keyframes($name) { + @-webkit-keyframes #{$name} { + @content; + } + @-moz-keyframes #{$name} { + @content; + } + @keyframes #{$name} { + @content; + } +} + + +@mixin prefix($map, $vendors: webkit moz ms o) { + @each $prop, $value in $map { + @if $vendors { + @each $vendor in $vendors { + #{"-" + $vendor + "-" + $prop}: #{$value}; + } + } + // Dump regular property anyway + #{$prop}: #{$value}; + } +} + + +@include keyframes(passing-through) { + + 0% { + opacity: 0; + @include prefix((transform: translateY(40px))); + } + + 30%, 70% { + opacity: 1; + @include prefix((transform: translateY(0px))); + } + + 100% { + opacity: 0; + @include prefix((transform: translateY(-40px))); + } +} + + +@include keyframes(slide-in) { + + 0% { + opacity: 0; + @include prefix((transform: translateY(40px))); + } + + 30% { + opacity: 1; + @include prefix((transform: translateY(0px))); + } +} + + + +@include keyframes(pulse) { + + 0% { @include prefix((transform: scale(1))); } + 10% { @include prefix((transform: scale(1.1))); } + 20% { @include prefix((transform: scale(1))); } + +} + + + +.dropzone, .dropzone * { + box-sizing: border-box; +} +.dropzone { + + $image-size: 120px; + + $image-border-radius: 20px; + + &.dz-clickable { + cursor: pointer; + + * { + cursor: default; + } + .dz-message { + &, * { + cursor: pointer; + } + } + } + + min-height: 150px; + border: 2px solid rgba(0, 0, 0, 0.3); + background: white; + padding: 20px 20px; + + &.dz-started { + .dz-message { + display: none; + } + } + + &.dz-drag-hover { + border-style: solid; + .dz-message { + opacity: 0.5; + } + } + .dz-message { + text-align: center; + margin: 2em 0; + + + } + + + + .dz-preview { + position: relative; + display: inline-block; + + vertical-align: top; + + margin: 16px; + min-height: 100px; + + &:hover { + // Making sure that always the hovered preview element is on top + z-index: 1000; + .dz-details { + opacity: 1; + } + } + + &.dz-file-preview { + + .dz-image { + border-radius: $image-border-radius; + background: #999; + background: linear-gradient(to bottom, #eee, #ddd); + } + + .dz-details { + opacity: 1; + } + } + + &.dz-image-preview { + background: white; + .dz-details { + @include prefix((transition: opacity 0.2s linear)); + } + } + + .dz-remove { + font-size: 14px; + text-align: center; + display: block; + cursor: pointer; + border: none; + &:hover { + text-decoration: underline; + } + } + + &:hover .dz-details { + opacity: 1; + } + .dz-details { + $background-color: #444; + + z-index: 20; + + position: absolute; + top: 0; + left: 0; + + opacity: 0; + + font-size: 13px; + min-width: 100%; + max-width: 100%; + padding: 2em 1em; + text-align: center; + color: rgba(0, 0, 0, 0.9); + + $width: 120px; + + line-height: 150%; + + .dz-size { + margin-bottom: 1em; + font-size: 16px; + } + + .dz-filename { + + white-space: nowrap; + + &:hover { + span { + border: 1px solid rgba(200, 200, 200, 0.8); + background-color: rgba(255, 255, 255, 0.8); + } + } + &:not(:hover) { + span { + border: 1px solid transparent; + } + overflow: hidden; + text-overflow: ellipsis; + } + + } + + .dz-filename, .dz-size { + span { + background-color: rgba(255, 255, 255, 0.4); + padding: 0 0.4em; + border-radius: 3px; + } + } + + } + + &:hover { + .dz-image { + // opacity: 0.8; + img { + @include prefix((transform: scale(1.05, 1.05))); // Getting rid of that white bleed-in + @include prefix((filter: blur(8px)), webkit); // Getting rid of that white bleed-in + } + } + } + .dz-image { + border-radius: $image-border-radius; + overflow: hidden; + width: $image-size; + height: $image-size; + position: relative; + display: block; + z-index: 10; + + img { + display: block; + } + } + + + &.dz-success { + .dz-success-mark { + @include prefix((animation: passing-through 3s cubic-bezier(0.770, 0.000, 0.175, 1.000))); + } + } + &.dz-error { + .dz-error-mark { + opacity: 1; + @include prefix((animation: slide-in 3s cubic-bezier(0.770, 0.000, 0.175, 1.000))); + } + } + + + .dz-success-mark, .dz-error-mark { + + $image-height: 54px; + $image-width: 54px; + + pointer-events: none; + + opacity: 0; + z-index: 500; + + position: absolute; + display: block; + top: 50%; + left: 50%; + margin-left: -($image-width/2); + margin-top: -($image-height/2); + + svg { + display: block; + width: $image-width; + height: $image-height; + } + } + + + &.dz-processing .dz-progress { + opacity: 1; + @include prefix((transition: all 0.2s linear)); + } + &.dz-complete .dz-progress { + opacity: 0; + @include prefix((transition: opacity 0.4s ease-in)); + } + + &:not(.dz-processing) { + .dz-progress { + @include prefix((animation: pulse 6s ease infinite)); + } + } + .dz-progress { + + opacity: 1; + z-index: 1000; + + pointer-events: none; + position: absolute; + height: 16px; + left: 50%; + top: 50%; + margin-top: -8px; + + width: 80px; + margin-left: -40px; + + // border: 2px solid #333; + background: rgba(255, 255, 255, 0.9); + + // Fix for chrome bug: https://code.google.com/p/chromium/issues/detail?id=157218 + -webkit-transform: scale(1); + + + border-radius: 8px; + + overflow: hidden; + + .dz-upload { + background: #333; + background: linear-gradient(to bottom, #666, #444); + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 0; + @include prefix((transition: width 300ms ease-in-out)); + } + + } + + &.dz-error { + .dz-error-message { + display: block; + } + &:hover .dz-error-message { + opacity: 1; + pointer-events: auto; + } + } + + .dz-error-message { + $width: $image-size + 20px; + $color: rgb(190, 38, 38); + + pointer-events: none; + z-index: 1000; + position: absolute; + display: block; + display: none; + opacity: 0; + @include prefix((transition: opacity 0.3s ease)); + border-radius: 8px; + font-size: 13px; + top: $image-size + 10px; + left: -10px; + width: $width; + background: $color; + background: linear-gradient(to bottom, $color, darken($color, 5%)); + padding: 0.5em 1.2em; + color: white; + + // The triangle pointing up + &:after { + content: ''; + position: absolute; + top: -6px; + left: $width / 2 - 6px; + width: 0; + height: 0; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid $color; + } + } + + } +} + + diff --git a/web/libraries/dropzone/test.sh b/web/libraries/dropzone/test.sh new file mode 100755 index 000000000..3b06c6a03 --- /dev/null +++ b/web/libraries/dropzone/test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ $# -gt 0 ] + then + if [ $1 != "compiled" ] + then + echo + echo "Invalid argument passed. Call './test.sh compiled' if don't want to compile the source before." + echo + exit 1 + fi +else + grunt +fi +./node_modules/mocha-phantomjs/bin/mocha-phantomjs test/test.html diff --git a/web/libraries/dropzone/test/test.coffee b/web/libraries/dropzone/test/test.coffee new file mode 100755 index 000000000..241894a81 --- /dev/null +++ b/web/libraries/dropzone/test/test.coffee @@ -0,0 +1,1737 @@ +chai.should() + +describe "Dropzone", -> + + + getMockFile = -> + status: Dropzone.ADDED + accepted: true + name: "test file name" + size: 123456 + type: "text/html" + + + xhr = null + beforeEach -> xhr = sinon.useFakeXMLHttpRequest() + + describe "Emitter", -> + + emitter = null + beforeEach -> emitter = new Dropzone::Emitter() + + + it ".on() should return the object itself", -> + (emitter.on "test", ->).should.equal emitter + + it ".on() should properly register listeners", -> + (emitter._callbacks == undefined).should.be.true + callback = -> + callback2 = -> + emitter.on "test", callback + emitter.on "test", callback2 + emitter.on "test2", callback + emitter._callbacks.test.length.should.equal 2 + emitter._callbacks.test[0].should.equal callback + emitter._callbacks.test[1].should.equal callback2 + emitter._callbacks.test2.length.should.equal 1 + emitter._callbacks.test2[0].should.equal callback + + it ".emit() should return the object itself", -> + emitter.emit('test').should.equal emitter + + it ".emit() should properly invoke all registered callbacks with arguments", -> + callCount1 = 0 + callCount12 = 0 + callCount2 = 0 + callback1 = (var1, var2) -> + callCount1++ + var1.should.equal 'callback1 var1' + var2.should.equal 'callback1 var2' + callback12 = (var1, var2) -> + callCount12++ + var1.should.equal 'callback1 var1' + var2.should.equal 'callback1 var2' + callback2 = (var1, var2) -> + callCount2++ + var1.should.equal 'callback2 var1' + var2.should.equal 'callback2 var2' + + emitter.on "test1", callback1 + emitter.on "test1", callback12 + emitter.on "test2", callback2 + + callCount1.should.equal 0 + callCount12.should.equal 0 + callCount2.should.equal 0 + + emitter.emit "test1", "callback1 var1", "callback1 var2" + + callCount1.should.equal 1 + callCount12.should.equal 1 + callCount2.should.equal 0 + + emitter.emit "test2", "callback2 var1", "callback2 var2" + + callCount1.should.equal 1 + callCount12.should.equal 1 + callCount2.should.equal 1 + + emitter.emit "test1", "callback1 var1", "callback1 var2" + + callCount1.should.equal 2 + callCount12.should.equal 2 + callCount2.should.equal 1 + + describe ".off()", -> + + callback1 = -> + callback2 = -> + callback3 = -> + callback4 = -> + + beforeEach -> + emitter._callbacks = + 'test1': [ callback1, callback2 ] + 'test2': [ callback3 ] + 'test3': [ callback1, callback4 ] + 'test4': [ ] + + it "should work without any listeners", -> + emitter._callbacks = undefined + emt = emitter.off() + emitter._callbacks.should.eql {} + emt.should.equal emitter + + it "should properly remove all event listeners", -> + emt = emitter.off() + emitter._callbacks.should.eql {} + emt.should.equal emitter + + it "should properly remove all event listeners for specific event", -> + emitter.off "test1" + (emitter._callbacks["test1"] == undefined).should.be.true + emitter._callbacks["test2"].length.should.equal 1 + emitter._callbacks["test3"].length.should.equal 2 + emt = emitter.off "test2" + (emitter._callbacks["test2"] == undefined).should.be.true + emt.should.equal emitter + + it "should properly remove specific event listener", -> + emitter.off "test1", callback1 + emitter._callbacks["test1"].length.should.equal 1 + emitter._callbacks["test1"][0].should.equal callback2 + emitter._callbacks["test3"].length.should.equal 2 + emt = emitter.off "test3", callback4 + emitter._callbacks["test3"].length.should.equal 1 + emitter._callbacks["test3"][0].should.equal callback1 + emt.should.equal emitter + + + + + describe "static functions", -> + + describe "Dropzone.createElement()", -> + + element = Dropzone.createElement """
Hallo
""" + + it "should properly create an element from a string", -> + element.tagName.should.equal "DIV" + it "should properly add the correct class", -> + element.classList.contains("test").should.be.ok + it "should properly create child elements", -> + element.querySelector("span").tagName.should.equal "SPAN" + it "should always return only one element", -> + element = Dropzone.createElement """
""" + element.tagName.should.equal "DIV" + + describe "Dropzone.elementInside()", -> + element = Dropzone.createElement """
""" + document.body.appendChild element + + child1 = element.querySelector ".child1" + child2 = element.querySelector ".child2" + + after -> document.body.removeChild element + + it "should return yes if elements are the same", -> + Dropzone.elementInside(element, element).should.be.ok + it "should return yes if element is direct child", -> + Dropzone.elementInside(child1, element).should.be.ok + it "should return yes if element is some child", -> + Dropzone.elementInside(child2, element).should.be.ok + Dropzone.elementInside(child2, document.body).should.be.ok + it "should return no unless element is some child", -> + Dropzone.elementInside(element, child1).should.not.be.ok + Dropzone.elementInside(document.body, child1).should.not.be.ok + + describe "Dropzone.optionsForElement()", -> + testOptions = + url: "/some/url" + method: "put" + + before -> Dropzone.options.testElement = testOptions + after -> delete Dropzone.options.testElement + + element = document.createElement "div" + + it "should take options set in Dropzone.options from camelized id", -> + element.id = "test-element" + Dropzone.optionsForElement(element).should.equal testOptions + + it "should return undefined if no options set", -> + element.id = "test-element2" + expect(Dropzone.optionsForElement(element)).to.equal undefined + + it "should return undefined and not throw if it's a form with an input element of the name 'id'", -> + element = Dropzone.createElement """
""" + expect(Dropzone.optionsForElement(element)).to.equal undefined + + it "should ignore input fields with the name='id'", -> + element = Dropzone.createElement """
""" + Dropzone.optionsForElement(element).should.equal testOptions + + describe "Dropzone.forElement()", -> + element = document.createElement "div" + element.id = "some-test-element" + dropzone = null + before -> + document.body.appendChild element + dropzone = new Dropzone element, url: "/test" + after -> + dropzone.disable() + document.body.removeChild element + + it "should throw an exception if no dropzone attached", -> + expect(-> Dropzone.forElement document.createElement "div").to.throw "No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone." + + it "should accept css selectors", -> + expect(Dropzone.forElement "#some-test-element").to.equal dropzone + + it "should accept native elements", -> + expect(Dropzone.forElement element).to.equal dropzone + + describe "Dropzone.discover()", -> + element1 = document.createElement "div" + element1.className = "dropzone" + element2 = element1.cloneNode() + element3 = element1.cloneNode() + + element1.id = "test-element-1" + element2.id = "test-element-2" + element3.id = "test-element-3" + + describe "specific options", -> + before -> + Dropzone.options.testElement1 = url: "test-url" + Dropzone.options.testElement2 = false # Disabled + document.body.appendChild element1 + document.body.appendChild element2 + Dropzone.discover() + after -> + document.body.removeChild element1 + document.body.removeChild element2 + + it "should find elements with a .dropzone class", -> + element1.dropzone.should.be.ok + + it "should not create dropzones with disabled options", -> + expect(element2.dropzone).to.not.be.ok + + describe "Dropzone.autoDiscover", -> + before -> + Dropzone.options.testElement3 = url: "test-url" + document.body.appendChild element3 + after -> + document.body.removeChild element3 + + it "should create dropzones even if Dropzone.autoDiscover == false", -> + # Because the check is in the actual contentLoaded function. + Dropzone.autoDiscover = off + Dropzone.discover() + expect(element3.dropzone).to.be.ok + + it "should not automatically be called if Dropzone.autoDiscover == false", -> + Dropzone.autoDiscover = off + Dropzone.discover = -> expect(false).to.be.ok + Dropzone._autoDiscoverFunction() + + + describe "Dropzone.isValidFile()", -> + it "should return true if called without acceptedFiles", -> + Dropzone.isValidFile({ type: "some/type" }, null).should.be.ok + + it "should properly validate if called with concrete mime types", -> + acceptedMimeTypes = "text/html,image/jpeg,application/json" + + Dropzone.isValidFile({ type: "text/html" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/jpeg" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "application/json" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/bmp" }, acceptedMimeTypes).should.not.be.ok + + it "should properly validate if called with base mime types", -> + acceptedMimeTypes = "text/*,image/*,application/*" + + Dropzone.isValidFile({ type: "text/html" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/jpeg" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "application/json" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/bmp" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "some/type" }, acceptedMimeTypes).should.not.be.ok + + it "should properly validate if called with mixed mime types", -> + acceptedMimeTypes = "text/*,image/jpeg,application/*" + + Dropzone.isValidFile({ type: "text/html" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/jpeg" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/bmp" }, acceptedMimeTypes).should.not.be.ok + Dropzone.isValidFile({ type: "application/json" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "some/type" }, acceptedMimeTypes).should.not.be.ok + + it "should properly validate even with spaces in between", -> + acceptedMimeTypes = "text/html , image/jpeg, application/json" + + Dropzone.isValidFile({ type: "text/html" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ type: "image/jpeg" }, acceptedMimeTypes).should.be.ok + + it "should properly validate extensions", -> + acceptedMimeTypes = "text/html , image/jpeg, .pdf ,.png" + + Dropzone.isValidFile({ name: "somxsfsd", type: "text/html" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ name: "somesdfsdf", type: "image/jpeg" }, acceptedMimeTypes).should.be.ok + Dropzone.isValidFile({ name: "somesdfadfadf", type: "application/json" }, acceptedMimeTypes).should.not.be.ok + Dropzone.isValidFile({ name: "some-file file.pdf", type: "random/type" }, acceptedMimeTypes).should.be.ok + # .pdf has to be in the end + Dropzone.isValidFile({ name: "some-file.pdf file.gif", type: "random/type" }, acceptedMimeTypes).should.not.be.ok + Dropzone.isValidFile({ name: "some-file file.png", type: "random/type" }, acceptedMimeTypes).should.be.ok + + describe "Dropzone.confirm", -> + beforeEach -> sinon.stub window, "confirm" + afterEach -> window.confirm.restore() + it "should forward to window.confirm and call the callbacks accordingly", -> + accepted = rejected = no + window.confirm.returns yes + Dropzone.confirm "test question", (-> accepted = yes), (-> rejected = yes) + window.confirm.args[0][0].should.equal "test question" + accepted.should.equal yes + rejected.should.equal no + + accepted = rejected = no + window.confirm.returns no + Dropzone.confirm "test question 2", (-> accepted = yes), (-> rejected = yes) + window.confirm.args[1][0].should.equal "test question 2" + accepted.should.equal no + rejected.should.equal yes + + it "should not error if rejected is not provided", -> + accepted = rejected = no + window.confirm.returns no + Dropzone.confirm "test question", (-> accepted = yes) + window.confirm.args[0][0].should.equal "test question" + # Nothing should have changed since there is no rejected function. + accepted.should.equal no + rejected.should.equal no + + + describe "Dropzone.getElement() / getElements()", -> + tmpElements = [ ] + + beforeEach -> + tmpElements = [ ] + tmpElements.push Dropzone.createElement """
""" + tmpElements.push Dropzone.createElement """
""" + tmpElements.push Dropzone.createElement """
""" + tmpElements.forEach (el) -> document.body.appendChild el + + afterEach -> + tmpElements.forEach (el) -> document.body.removeChild el + + describe ".getElement()", -> + it "should accept a string", -> + el = Dropzone.getElement ".tmptest" + el.should.equal tmpElements[0] + el = Dropzone.getElement "#tmptest1" + el.should.equal tmpElements[1] + it "should accept a node", -> + el = Dropzone.getElement tmpElements[2] + el.should.equal tmpElements[2] + it "should fail if invalid selector", -> + errorMessage = "Invalid `clickable` option provided. Please provide a CSS selector or a plain HTML element." + expect(-> Dropzone.getElement "lblasdlfsfl", "clickable").to.throw errorMessage + expect(-> Dropzone.getElement { "lblasdlfsfl" }, "clickable").to.throw errorMessage + expect(-> Dropzone.getElement [ "lblasdlfsfl" ], "clickable").to.throw errorMessage + + describe ".getElements()", -> + it "should accept a list of strings", -> + els = Dropzone.getElements [ ".tmptest", "#tmptest1" ] + els.should.eql [ tmpElements[0], tmpElements[1] ] + it "should accept a list of nodes", -> + els = Dropzone.getElements [ tmpElements[0], tmpElements[2] ] + els.should.eql [ tmpElements[0], tmpElements[2] ] + it "should accept a mixed list", -> + els = Dropzone.getElements [ "#tmptest1", tmpElements[2] ] + els.should.eql [ tmpElements[1], tmpElements[2] ] + it "should accept a string selector", -> + els = Dropzone.getElements ".random" + els.should.eql [ tmpElements[1], tmpElements[2] ] + it "should accept a single node", -> + els = Dropzone.getElements tmpElements[1] + els.should.eql [ tmpElements[1] ] + it "should fail if invalid selector", -> + errorMessage = "Invalid `clickable` option provided. Please provide a CSS selector, a plain HTML element or a list of those." + expect(-> Dropzone.getElements "lblasdlfsfl", "clickable").to.throw errorMessage + expect(-> Dropzone.getElements [ "lblasdlfsfl" ], "clickable").to.throw errorMessage + + describe "constructor()", -> + + dropzone = null + + afterEach -> dropzone.destroy() if dropzone? + + it "should throw an exception if the element is invalid", -> + expect(-> dropzone = new Dropzone "#invalid-element").to.throw "Invalid dropzone element." + + it "should throw an exception if assigned twice to the same element", -> + element = document.createElement "div" + dropzone = new Dropzone element, url: "url" + expect(-> new Dropzone element, url: "url").to.throw "Dropzone already attached." + + it "should throw an exception if both acceptedFiles and acceptedMimeTypes are specified", -> + element = document.createElement "div" + expect(-> dropzone = new Dropzone element, url: "test", acceptedFiles: "param", acceptedMimeTypes: "types").to.throw "You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated." + + it "should set itself as element.dropzone", -> + element = document.createElement "div" + dropzone = new Dropzone element, url: "url" + element.dropzone.should.equal dropzone + + it "should add itself to Dropzone.instances", -> + element = document.createElement "div" + dropzone = new Dropzone element, url: "url" + Dropzone.instances[Dropzone.instances.length - 1].should.equal dropzone + + it "should use the action attribute not the element with the name action", -> + element = Dropzone.createElement """
""" + dropzone = new Dropzone element + dropzone.options.url.should.equal "real-action" + + describe "options", -> + element = null + element2 = null + beforeEach -> + element = document.createElement "div" + element.id = "test-element" + element2 = document.createElement "div" + element2.id = "test-element2" + Dropzone.options.testElement = url: "/some/url", parallelUploads: 10 + afterEach -> delete Dropzone.options.testElement + + it "should take the options set in Dropzone.options", -> + dropzone = new Dropzone element + dropzone.options.url.should.equal "/some/url" + dropzone.options.parallelUploads.should.equal 10 + + it "should prefer passed options over Dropzone.options", -> + dropzone = new Dropzone element, url: "/some/other/url" + dropzone.options.url.should.equal "/some/other/url" + + it "should take the default options if nothing set in Dropzone.options", -> + dropzone = new Dropzone element2, url: "/some/url" + dropzone.options.parallelUploads.should.equal 2 + + it "should call the fallback function if forceFallback == true", (done) -> + dropzone = new Dropzone element, + url: "/some/other/url" + forceFallback: on + fallback: -> done() + + it "should set acceptedFiles if deprecated acceptedMimetypes option has been passed", -> + dropzone = new Dropzone element, + url: "/some/other/url" + acceptedMimeTypes: "my/type" + dropzone.options.acceptedFiles.should.equal "my/type" + + describe "options.clickable", -> + clickableElement = null + dropzone = null + beforeEach -> + clickableElement = document.createElement "div" + clickableElement.className = "some-clickable" + document.body.appendChild clickableElement + afterEach -> + document.body.removeChild clickableElement + dropzone.destroy if dropzone? + + it "should use the default element if clickable == true", -> + dropzone = new Dropzone element, clickable: yes + dropzone.clickableElements.should.eql [ dropzone.element ] + it "should lookup the element if clickable is a CSS selector", -> + dropzone = new Dropzone element, clickable: ".some-clickable" + dropzone.clickableElements.should.eql [ clickableElement ] + it "should simply use the provided element", -> + dropzone = new Dropzone element, clickable: clickableElement + dropzone.clickableElements.should.eql [ clickableElement ] + it "should accept multiple clickable elements", -> + dropzone = new Dropzone element, clickable: [ document.body, ".some-clickable" ] + dropzone.clickableElements.should.eql [ document.body, clickableElement ] + it "should throw an exception if the element is invalid", -> + expect(-> dropzone = new Dropzone element, clickable: ".some-invalid-clickable").to.throw "Invalid `clickable` option provided. Please provide a CSS selector, a plain HTML element or a list of those." + + + + + describe "init()", -> + describe "clickable", -> + + dropzones = + "using acceptedFiles": new Dropzone(Dropzone.createElement("""
"""), { clickable: yes, acceptedFiles: "audio/*,video/*" }) + "using acceptedMimeTypes": new Dropzone(Dropzone.createElement("""
"""), { clickable: yes, acceptedMimeTypes: "audio/*,video/*" }) + + it "should not add an accept attribute if no acceptParameter", -> + dropzone = new Dropzone (Dropzone.createElement """
"""), clickable: yes, acceptParameter: null, acceptedMimeTypes: null + dropzone.hiddenFileInput.hasAttribute("accept").should.be.false + + + for name, dropzone of dropzones + describe name, -> + do (dropzone) -> + it "should create a hidden file input if clickable", -> + dropzone.hiddenFileInput.should.be.ok + dropzone.hiddenFileInput.tagName.should.equal "INPUT" + + it "should use the acceptParameter", -> + dropzone.hiddenFileInput.getAttribute("accept").should.equal "audio/*,video/*" + + it "should create a new input element when something is selected to reset the input field", -> + for i in [0..3] + hiddenFileInput = dropzone.hiddenFileInput + event = document.createEvent "HTMLEvents" + event.initEvent "change", true, true + hiddenFileInput.dispatchEvent event + dropzone.hiddenFileInput.should.not.equal hiddenFileInput + Dropzone.elementInside(hiddenFileInput, document).should.not.be.ok + + it "should create a .dz-message element", -> + element = Dropzone.createElement """
""" + dropzone = new Dropzone element, clickable: yes, acceptParameter: null, acceptedMimeTypes: null + element.querySelector(".dz-message").should.be.instanceof Element + + it "should not create a .dz-message element if there already is one", -> + element = Dropzone.createElement """
""" + msg = Dropzone.createElement """
TEST
""" + element.appendChild msg + + dropzone = new Dropzone element, clickable: yes, acceptParameter: null, acceptedMimeTypes: null + element.querySelector(".dz-message").should.equal msg + + element.querySelectorAll(".dz-message").length.should.equal 1 + + + + describe "options", -> + + element = null + dropzone = null + + beforeEach -> + element = Dropzone.createElement """
""" + dropzone = new Dropzone element, maxFilesize: 4, url: "url", acceptedMimeTypes: "audio/*,image/png", maxFiles: 3 + + describe "file specific", -> + file = null + beforeEach -> + file = + name: "test name" + size: 2 * 1024 * 1024 + width: 200 + height: 100 + dropzone.options.addedfile.call dropzone, file + + describe ".addedFile()", -> + it "should properly create the previewElement", -> + file.previewElement.should.be.instanceof Element + + file.previewElement.querySelector("[data-dz-name]").innerHTML.should.eql "test name" + file.previewElement.querySelector("[data-dz-size]").innerHTML.should.eql "2.1 MB" + + describe ".error()", -> + it "should properly insert the error", -> + dropzone.options.error.call dropzone, file, "test message" + + file.previewElement.querySelector("[data-dz-errormessage]").innerHTML.should.eql "test message" + + it "should properly insert the error when provided with an object containing the error", -> + dropzone.options.error.call dropzone, file, error: "test message" + + file.previewElement.querySelector("[data-dz-errormessage]").innerHTML.should.eql "test message" + + describe ".thumbnail()", -> + it "should properly insert the error", -> + transparentGif = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" + dropzone.options.thumbnail.call dropzone, file, transparentGif + thumbnail = file.previewElement.querySelector("[data-dz-thumbnail]") + thumbnail.src.should.eql transparentGif + thumbnail.alt.should.eql "test name" + + describe ".uploadprogress()", -> + it "should properly set the width", -> + dropzone.options.uploadprogress.call dropzone, file, 0 + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql "0%" + dropzone.options.uploadprogress.call dropzone, file, 80 + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql "80%" + dropzone.options.uploadprogress.call dropzone, file, 90 + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql "90%" + dropzone.options.uploadprogress.call dropzone, file, 100 + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql "100%" + + describe ".resize()", -> + + describe "with default thumbnail settings", -> + it "should properly return target dimensions", -> + + info = dropzone.options.resize.call dropzone, file + + info.optWidth.should.eql 120 + info.optHeight.should.eql 120 + + describe "with null thumbnail settings", -> + it "should properly return target dimensions", -> + testSettings = [ + [null, null], + [null, 150], + [150, null] + ] + + for setting, i in testSettings + dropzone.options.thumbnailWidth = setting[0] + dropzone.options.thumbnailHeight = setting[1] + + info = dropzone.options.resize.call dropzone, file + + if i is 0 + info.optWidth.should.eql 200 + info.optHeight.should.eql 100 + + if i is 1 + info.optWidth.should.eql 300 + info.optHeight.should.eql 150 + + if i is 2 + info.optWidth.should.eql 150 + info.optHeight.should.eql 75 + + describe "instance", -> + + element = null + dropzone = null + requests = null + beforeEach -> + requests = [ ] + xhr.onCreate = (xhr) -> requests.push xhr + + element = Dropzone.createElement """
""" + document.body.appendChild element + dropzone = new Dropzone element, maxFilesize: 4, maxFiles: 100, url: "url", acceptedMimeTypes: "audio/*,image/png", uploadprogress: -> + afterEach -> + document.body.removeChild element + dropzone.destroy() + xhr.restore() + + describe ".accept()", -> + + it "should pass if the filesize is OK", -> + dropzone.accept { size: 2 * 1024 * 1024, type: "audio/mp3" }, (err) -> expect(err).to.be.undefined + + it "shouldn't pass if the filesize is too big", -> + dropzone.accept { size: 10 * 1024 * 1024, type: "audio/mp3" }, (err) -> err.should.eql "File is too big (10MiB). Max filesize: 4MiB." + + it "should properly accept files which mime types are listed in acceptedFiles", -> + + dropzone.accept { type: "audio/mp3" }, (err) -> expect(err).to.be.undefined + dropzone.accept { type: "image/png" }, (err) -> expect(err).to.be.undefined + dropzone.accept { type: "audio/wav" }, (err) -> expect(err).to.be.undefined + + it "should properly reject files when the mime type isn't listed in acceptedFiles", -> + dropzone.accept { type: "image/jpeg" }, (err) -> err.should.eql "You can't upload files of this type." + + it "should fail if maxFiles has been exceeded and call the event maxfilesexceeded", -> + sinon.stub dropzone, "getAcceptedFiles" + file = { type: "audio/mp3" } + + dropzone.getAcceptedFiles.returns { length: 99 } + + dropzone.options.dictMaxFilesExceeded = "You can only upload {{maxFiles}} files." + + called = no + dropzone.on "maxfilesexceeded", (lfile) -> + lfile.should.equal file + called = yes + + dropzone.accept file, (err) -> expect(err).to.be.undefined + called.should.not.be.ok + + dropzone.getAcceptedFiles.returns { length: 100 } + dropzone.accept file, (err) -> expect(err).to.equal "You can only upload 100 files." + called.should.be.ok + + dropzone.getAcceptedFiles.restore() + + it "should properly handle if maxFiles is 0", -> + file = { type: "audio/mp3" } + + dropzone.options.maxFiles = 0 + + called = no + dropzone.on "maxfilesexceeded", (lfile) -> + lfile.should.equal file + called = yes + + dropzone.accept file, (err) -> expect(err).to.equal "You can not upload any more files." + called.should.be.ok + + + + describe ".removeFile()", -> + it "should abort uploading if file is currently being uploaded", (done) -> + mockFile = getMockFile() + dropzone.uploadFile = (file) -> + dropzone.accept = (file, done) -> done() + + sinon.stub dropzone, "cancelUpload" + + dropzone.addFile mockFile + setTimeout -> + mockFile.status.should.equal Dropzone.UPLOADING + dropzone.getUploadingFiles()[0].should.equal mockFile + + dropzone.cancelUpload.callCount.should.equal 0 + dropzone.removeFile mockFile + dropzone.cancelUpload.callCount.should.equal 1 + done() + , 10 + + describe ".cancelUpload()", -> + it "should properly cancel upload if file currently uploading", (done) -> + mockFile = getMockFile() + + dropzone.accept = (file, done) -> done() + + dropzone.addFile mockFile + + setTimeout -> + mockFile.status.should.equal Dropzone.UPLOADING + dropzone.getUploadingFiles()[0].should.equal mockFile + dropzone.cancelUpload mockFile + mockFile.status.should.equal Dropzone.CANCELED + dropzone.getUploadingFiles().length.should.equal 0 + dropzone.getQueuedFiles().length.should.equal 0 + done() + , 10 + + it "should properly cancel the upload if file is not yet uploading", -> + mockFile = getMockFile() + + dropzone.accept = (file, done) -> done() + + # Making sure the file stays in the queue. + dropzone.options.parallelUploads = 0 + + dropzone.addFile mockFile + mockFile.status.should.equal Dropzone.QUEUED + dropzone.getQueuedFiles()[0].should.equal mockFile + + dropzone.cancelUpload mockFile + mockFile.status.should.equal Dropzone.CANCELED + dropzone.getQueuedFiles().length.should.equal 0 + dropzone.getUploadingFiles().length.should.equal 0 + + it "should call processQueue()", (done) -> + mockFile = getMockFile() + + dropzone.accept = (file, done) -> done() + + # Making sure the file stays in the queue. + dropzone.options.parallelUploads = 0 + + sinon.spy dropzone, "processQueue" + + dropzone.addFile mockFile + setTimeout -> + dropzone.processQueue.callCount.should.equal 1 + + dropzone.cancelUpload mockFile + + dropzone.processQueue.callCount.should.equal 2 + done() + , 10 + + it "should properly cancel all files with the same XHR if uploadMultiple is true", (done) -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + + dropzone.accept = (file, done) -> done() + + # Making sure the file stays in the queue. + dropzone.options.uploadMultiple = yes + dropzone.options.parallelUploads = 3 + + sinon.spy dropzone, "processFiles" + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + + setTimeout -> + dropzone.processFiles.callCount.should.equal 1 + + sinon.spy mock1.xhr, "abort" + + dropzone.cancelUpload mock1 + + expect(mock1.xhr == mock2.xhr == mock3.xhr).to.be.ok + + mock1.status.should.equal Dropzone.CANCELED + mock2.status.should.equal Dropzone.CANCELED + mock3.status.should.equal Dropzone.CANCELED + + # The XHR should only be aborted once! + mock1.xhr.abort.callCount.should.equal 1 + + done() + , 10 + + + + describe ".disable()", -> + it "should properly cancel all pending uploads", (done) -> + dropzone.accept = (file, done) -> done() + + dropzone.options.parallelUploads = 1 + + dropzone.addFile getMockFile() + dropzone.addFile getMockFile() + + setTimeout -> + + dropzone.getUploadingFiles().length.should.equal 1 + dropzone.getQueuedFiles().length.should.equal 1 + dropzone.files.length.should.equal 2 + + sinon.spy requests[0], "abort" + + requests[0].abort.callCount.should.equal 0 + + dropzone.disable() + + requests[0].abort.callCount.should.equal 1 + + dropzone.getUploadingFiles().length.should.equal 0 + dropzone.getQueuedFiles().length.should.equal 0 + dropzone.files.length.should.equal 2 + + dropzone.files[0].status.should.equal Dropzone.CANCELED + dropzone.files[1].status.should.equal Dropzone.CANCELED + done() + , 10 + + describe ".destroy()", -> + it "should properly cancel all pending uploads and remove all file references", (done) -> + dropzone.accept = (file, done) -> done() + + dropzone.options.parallelUploads = 1 + + dropzone.addFile getMockFile() + dropzone.addFile getMockFile() + + + setTimeout -> + dropzone.getUploadingFiles().length.should.equal 1 + dropzone.getQueuedFiles().length.should.equal 1 + dropzone.files.length.should.equal 2 + + sinon.spy dropzone, "disable" + + dropzone.destroy() + + dropzone.disable.callCount.should.equal 1 + element.should.not.have.property "dropzone" + done() + , 10 + + it "should be able to create instance of dropzone on the same element after destroy", -> + dropzone.destroy() + ( -> new Dropzone element, maxFilesize: 4, url: "url", acceptedMimeTypes: "audio/*,image/png", uploadprogress: -> ).should.not.throw( Error ) + + it "should remove itself from Dropzone.instances", -> + (Dropzone.instances.indexOf(dropzone) != -1).should.be.ok + dropzone.destroy() + (Dropzone.instances.indexOf(dropzone) == -1).should.be.ok + + + + describe ".filesize()", -> + + it "should handle files with 0 size properly", -> + dropzone.filesize(0).should.eql "0 b" + + it "should convert to KiloBytes, etc..", -> + + dropzone.options.filesizeBase.should.eql 1000 # Just making sure the default config is correct + + dropzone.filesize(2 * 1000 * 1000).should.eql "2 MB" + dropzone.filesize(2 * 1024 * 1024).should.eql "2.1 MB" + + dropzone.filesize(2 * 1000 * 1000 * 1000).should.eql "2 GB" + dropzone.filesize(2 * 1024 * 1024 * 1024).should.eql "2.1 GB" + + dropzone.filesize(2.5111 * 1000 * 1000 * 1000).should.eql "2.5 GB" + dropzone.filesize(1.1 * 1000).should.eql "1.1 KB" + dropzone.filesize(999 * 1000).should.eql "1 MB" + + it "should convert to KibiBytes, etc.. when the filesizeBase is changed to 1024", -> + + dropzone.options.filesizeBase = 1024 + + dropzone.filesize(2 * 1024 * 1024).should.eql "2 MB" + dropzone.filesize(2 * 1000 * 1000).should.eql "1.9 MB" + + + describe "._updateMaxFilesReachedClass()", -> + it "should properly add the dz-max-files-reached class", -> + dropzone.getAcceptedFiles = -> length: 10 + dropzone.options.maxFiles = 10 + dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok + dropzone._updateMaxFilesReachedClass() + dropzone.element.classList.contains("dz-max-files-reached").should.be.ok + it "should fire the 'maxfilesreached' event when appropriate", -> + spy = sinon.spy() + dropzone.on "maxfilesreached", -> spy() + dropzone.getAcceptedFiles = -> length: 9 + dropzone.options.maxFiles = 10 + dropzone._updateMaxFilesReachedClass() + spy.should.not.have.been.called + dropzone.getAcceptedFiles = -> length: 10 + dropzone._updateMaxFilesReachedClass() + spy.should.have.been.called + dropzone.getAcceptedFiles = -> length: 11 + dropzone._updateMaxFilesReachedClass() + spy.should.have.been.calledOnce #ie, it has not been called again + + it "should properly remove the dz-max-files-reached class", -> + dropzone.getAcceptedFiles = -> length: 10 + dropzone.options.maxFiles = 10 + dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok + dropzone._updateMaxFilesReachedClass() + dropzone.element.classList.contains("dz-max-files-reached").should.be.ok + dropzone.getAcceptedFiles = -> length: 9 + dropzone._updateMaxFilesReachedClass() + dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok + + describe "events", -> + + describe "progress updates", -> + + it "should properly emit a totaluploadprogress event", (done) -> + dropzone.files = [ + { + size: 1990 + accepted: true + status: Dropzone.UPLOADING + upload: + progress: 20 + total: 2000 # The bytes to upload are higher than the file size + bytesSent: 400 + } + { + size: 1990 + accepted: true + status: Dropzone.UPLOADING + upload: + progress: 10 + total: 2000 # The bytes to upload are higher than the file size + bytesSent: 200 + } + ] + + _called = 0 + + dropzone.on "totaluploadprogress", (progress) -> + progress.should.equal totalProgressExpectation + done() if ++_called == 3 + + totalProgressExpectation = 15 + dropzone.emit "uploadprogress", { } + + totalProgressExpectation = 97.5 + dropzone.files[0].upload.bytesSent = 2000 + dropzone.files[1].upload.bytesSent = 1900 + # It shouldn't matter that progress is not properly updated since the total size + # should be calculated from the bytes + dropzone.emit "uploadprogress", { } + + totalProgressExpectation = 100 + dropzone.files[0].upload.bytesSent = 2000 + dropzone.files[1].upload.bytesSent = 2000 + # It shouldn't matter that progress is not properly updated since the total size + # should be calculated from the bytes + dropzone.emit "uploadprogress", { } + + # Just so the afterEach hook doesn't try to cancel them. + dropzone.files[0].status = Dropzone.CANCELED + dropzone.files[1].status = Dropzone.CANCELED + + + describe "helper function", -> + element = null + dropzone = null + beforeEach -> + element = Dropzone.createElement """
""" + dropzone = new Dropzone element, url: "url" + + describe "getExistingFallback()", -> + it "should return undefined if no fallback", -> + expect(dropzone.getExistingFallback()).to.equal undefined + + it "should only return the fallback element if it contains exactly fallback", -> + element.appendChild Dropzone.createElement """
""" + element.appendChild Dropzone.createElement """
""" + expect(dropzone.getExistingFallback()).to.equal undefined + + it "should return divs as fallback", -> + fallback = Dropzone.createElement """
""" + element.appendChild fallback + fallback.should.equal dropzone.getExistingFallback() + it "should return forms as fallback", -> + fallback = Dropzone.createElement """
""" + element.appendChild fallback + fallback.should.equal dropzone.getExistingFallback() + + describe "getFallbackForm()", -> + it "should use the paramName without [0] if uploadMultiple is false", -> + dropzone.options.uploadMultiple = false + dropzone.options.paramName = "myFile" + fallback = dropzone.getFallbackForm() + fileInput = fallback.querySelector "input[type=file]" + fileInput.name.should.equal "myFile" + it "should properly add [0] to the file name if uploadMultiple is true", -> + dropzone.options.uploadMultiple = yes + dropzone.options.paramName = "myFile" + fallback = dropzone.getFallbackForm() + fileInput = fallback.querySelector "input[type=file]" + fileInput.name.should.equal "myFile[0]" + + + describe "getAcceptedFiles() / getRejectedFiles()", -> + mock1 = mock2 = mock3 = mock4 = null + beforeEach -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock4 = getMockFile() + dropzone.options.accept = (file, done) -> + if file in [ mock1, mock3 ] + done() + else + done "error" + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + dropzone.addFile mock4 + + it "getAcceptedFiles() should only return accepted files", -> + dropzone.getAcceptedFiles().should.eql [ mock1, mock3 ] + it "getRejectedFiles() should only return rejected files", -> + dropzone.getRejectedFiles().should.eql [ mock2, mock4 ] + + describe "getQueuedFiles()", -> + it "should return all files with the status Dropzone.QUEUED", -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock4 = getMockFile() + + dropzone.options.accept = (file, done) -> file.done = done + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + dropzone.addFile mock4 + + dropzone.getQueuedFiles().should.eql [ ] + + mock1.done() + mock3.done() + + dropzone.getQueuedFiles().should.eql [ mock1, mock3 ] + mock1.status.should.equal Dropzone.QUEUED + mock3.status.should.equal Dropzone.QUEUED + mock2.status.should.equal Dropzone.ADDED + mock4.status.should.equal Dropzone.ADDED + + + describe "getUploadingFiles()", -> + it "should return all files with the status Dropzone.UPLOADING", (done) -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock4 = getMockFile() + + dropzone.options.accept = (file, _done) -> file.done = _done + dropzone.uploadFile = -> + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + dropzone.addFile mock4 + + dropzone.getUploadingFiles().should.eql [ ] + + mock1.done() + mock3.done() + + setTimeout (-> + dropzone.getUploadingFiles().should.eql [ mock1, mock3 ] + mock1.status.should.equal Dropzone.UPLOADING + mock3.status.should.equal Dropzone.UPLOADING + mock2.status.should.equal Dropzone.ADDED + mock4.status.should.equal Dropzone.ADDED + done() + ), 10 + + + describe "getActiveFiles()", -> + it "should return all files with the status Dropzone.UPLOADING or Dropzone.QUEUED", (done) -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock4 = getMockFile() + + dropzone.options.accept = (file, _done) -> file.done = _done + dropzone.uploadFile = -> + dropzone.options.parallelUploads = 2 + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + dropzone.addFile mock4 + + dropzone.getActiveFiles().should.eql [ ] + + mock1.done() + mock3.done() + mock4.done() + + setTimeout (-> + dropzone.getActiveFiles().should.eql [ mock1, mock3, mock4 ] + mock1.status.should.equal Dropzone.UPLOADING + mock3.status.should.equal Dropzone.UPLOADING + mock2.status.should.equal Dropzone.ADDED + mock4.status.should.equal Dropzone.QUEUED + done() + ), 10 + + + describe "getFilesWithStatus()", -> + it "should return all files with provided status", -> + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock4 = getMockFile() + + dropzone.options.accept = (file, _done) -> file.done = _done + dropzone.uploadFile = -> + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + dropzone.addFile mock4 + + dropzone.getFilesWithStatus(Dropzone.ADDED).should.eql [ mock1, mock2, mock3, mock4 ] + + mock1.status = Dropzone.UPLOADING + mock3.status = Dropzone.QUEUED + mock4.status = Dropzone.QUEUED + + dropzone.getFilesWithStatus(Dropzone.ADDED).should.eql [ mock2 ] + dropzone.getFilesWithStatus(Dropzone.UPLOADING).should.eql [ mock1 ] + dropzone.getFilesWithStatus(Dropzone.QUEUED).should.eql [ mock3, mock4 ] + + + + + describe "file handling", -> + mockFile = null + dropzone = null + + + beforeEach -> + mockFile = getMockFile() + + element = Dropzone.createElement """
""" + dropzone = new Dropzone element, url: "/the/url" + + afterEach -> + dropzone.destroy() + + + describe "addFile()", -> + it "should properly set the status of the file", -> + doneFunction = null + + dropzone.accept = (file, done) -> doneFunction = done + dropzone.processFile = -> + dropzone.uploadFile = -> + + dropzone.addFile mockFile + + mockFile.status.should.eql Dropzone.ADDED + doneFunction() + mockFile.status.should.eql Dropzone.QUEUED + + mockFile = getMockFile() + dropzone.addFile mockFile + + mockFile.status.should.eql Dropzone.ADDED + doneFunction("error") + mockFile.status.should.eql Dropzone.ERROR + + it "should properly set the status of the file if autoProcessQueue is false and not call processQueue", (done) -> + doneFunction = null + dropzone.options.autoProcessQueue = false + dropzone.accept = (file, done) -> doneFunction = done + dropzone.processFile = -> + dropzone.uploadFile = -> + + dropzone.addFile mockFile + sinon.stub dropzone, "processQueue" + + mockFile.status.should.eql Dropzone.ADDED + doneFunction() + mockFile.status.should.eql Dropzone.QUEUED + dropzone.processQueue.callCount.should.equal 0 + setTimeout (-> + dropzone.processQueue.callCount.should.equal 0 + done() + ), 10 + + it "should not add the file to the queue if autoQueue is false", -> + doneFunction = null + dropzone.options.autoQueue = false + dropzone.accept = (file, done) -> doneFunction = done + dropzone.processFile = -> + dropzone.uploadFile = -> + + dropzone.addFile mockFile + + mockFile.status.should.eql Dropzone.ADDED + doneFunction() + mockFile.status.should.eql Dropzone.ADDED + + it "should create a remove link if configured to do so", -> + dropzone.options.addRemoveLinks = true + dropzone.processFile = -> + dropzone.uploadFile = -> + + sinon.stub dropzone, "processQueue" + dropzone.addFile mockFile + + dropzone.files[0].previewElement.querySelector("a[data-dz-remove].dz-remove").should.be.ok + + + it "should attach an event handler to data-dz-remove links", -> + dropzone.options.previewTemplate = """ +
+
+
+
+ +
+
+
+
+
+ + +
+ """ + + sinon.stub dropzone, "processQueue" + + dropzone.addFile mockFile + + file = dropzone.files[0] + removeLink1 = file.previewElement.querySelector("a[data-dz-remove].link1") + removeLink2 = file.previewElement.querySelector("a[data-dz-remove].link2") + + sinon.stub dropzone, "removeFile" + + event = document.createEvent "HTMLEvents" + event.initEvent "click", true, true + removeLink1.dispatchEvent event + + dropzone.removeFile.callCount.should.eql 1 + + event = document.createEvent "HTMLEvents" + event.initEvent "click", true, true + removeLink2.dispatchEvent event + + dropzone.removeFile.callCount.should.eql 2 + + + + describe "thumbnails", -> + it "should properly queue the thumbnail creation", (done) -> + doneFunction = null + + dropzone.accept = (file, done) -> doneFunction = done + dropzone.processFile = -> + dropzone.uploadFile = -> + + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock1.type = "image/jpg" + mock2.type = "image/jpg" + mock3.type = "image/jpg" + + dropzone.on "thumbnail", -> + console.log "HII" + + ct_file = ct_callback = null + dropzone.createThumbnail = (file, callback) -> + ct_file = file + ct_callback = callback + + sinon.spy dropzone, "createThumbnail" + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 + + dropzone.files.length.should.eql 3 + setTimeout (-> + dropzone.createThumbnail.callCount.should.eql 1 + mock1.should.equal ct_file + ct_callback() + dropzone.createThumbnail.callCount.should.eql 2 + mock2.should.equal ct_file + ct_callback() + dropzone.createThumbnail.callCount.should.eql 3 + mock3.should.equal ct_file + + done() + ), 10 + + + # dropzone.addFile mock1 + + describe "when file is SVG", -> + it "should use the SVG image itself", (done) -> + + createBlob = (data, type) -> + try + new Blob([data], type: type) + catch e + BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || + window.MozBlobBuilder || window.MSBlobBuilder + builder = new BlobBuilder() + builder.append(data.buffer || data) + builder.getBlob(type) + + blob = createBlob('foo', 'image/svg+xml') + + dropzone.on "thumbnail", (file, dataURI) -> + file.should.equal blob + fileReader = new FileReader + fileReader.onload = -> + fileReader.result.should.equal dataURI + done() + fileReader.readAsDataURL(file) + + dropzone.createThumbnail(blob) + + describe "enqueueFile()", -> + it "should be wrapped by enqueueFiles()", -> + sinon.stub dropzone, "enqueueFile" + + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + + dropzone.enqueueFiles [ mock1, mock2, mock3 ] + + dropzone.enqueueFile.callCount.should.equal 3 + dropzone.enqueueFile.args[0][0].should.equal mock1 + dropzone.enqueueFile.args[1][0].should.equal mock2 + dropzone.enqueueFile.args[2][0].should.equal mock3 + + it "should fail if the file has already been processed", -> + mockFile.status = Dropzone.ERROR + expect((-> dropzone.enqueueFile(mockFile))).to.throw "This file can't be queued because it has already been processed or was rejected." + mockFile.status = Dropzone.COMPLETE + expect((-> dropzone.enqueueFile(mockFile))).to.throw "This file can't be queued because it has already been processed or was rejected." + mockFile.status = Dropzone.UPLOADING + expect((-> dropzone.enqueueFile(mockFile))).to.throw "This file can't be queued because it has already been processed or was rejected." + + it "should set the status to QUEUED and call processQueue asynchronously if everything's ok", (done) -> + mockFile.status = Dropzone.ADDED + sinon.stub dropzone, "processQueue" + dropzone.processQueue.callCount.should.equal 0 + dropzone.enqueueFile mockFile + mockFile.status.should.equal Dropzone.QUEUED + dropzone.processQueue.callCount.should.equal 0 + setTimeout -> + dropzone.processQueue.callCount.should.equal 1 + done() + , 10 + + describe "uploadFiles()", -> + requests = null + + + + beforeEach -> + requests = [ ] + + xhr.onCreate = (xhr) -> requests.push xhr + + afterEach -> + xhr.restore() + + # Removed this test because multiple filenames can be transmitted now + # it "should properly urlencode the filename for the headers" + + it "should be wrapped by uploadFile()", -> + sinon.stub dropzone, "uploadFiles" + + dropzone.uploadFile mockFile + + dropzone.uploadFiles.callCount.should.equal 1 + dropzone.uploadFiles.calledWith([ mockFile ]).should.be.ok + + it "should use url options if strings", (done) -> + + dropzone.addFile mockFile + + setTimeout -> + expect(requests.length).to.equal 1 + expect(requests[0].url).to.equal dropzone.options.url + expect(requests[0].method).to.equal dropzone.options.method + done() + , 10 + + it "should call url options if functions", (done) -> + method = "PUT" + url = "/custom/upload/url" + + dropzone.options.method = sinon.stub().returns method + dropzone.options.url = sinon.stub().returns url + + dropzone.addFile mockFile + + setTimeout -> + dropzone.options.method.callCount.should.equal 1 + dropzone.options.url.callCount.should.equal 1 + sinon.assert.calledWith dropzone.options.method, [mockFile] + sinon.assert.calledWith dropzone.options.url, [mockFile] + expect(requests.length).to.equal 1 + expect(requests[0].url).to.equal url + expect(requests[0].method).to.equal method + done() + , 10 + + it "should ignore the onreadystate callback if readyState != 4", (done) -> + dropzone.addFile mockFile + + setTimeout -> + + mockFile.status.should.eql Dropzone.UPLOADING + + requests[0].status = 200 + requests[0].readyState = 3 + requests[0].onload() + + mockFile.status.should.eql Dropzone.UPLOADING + + requests[0].readyState = 4 + requests[0].onload() + + mockFile.status.should.eql Dropzone.SUCCESS + done() + , 10 + + + it "should emit error and errormultiple when response was not OK", (done) -> + dropzone.options.uploadMultiple = yes + + error = no + errormultiple = no + complete = no + completemultiple = no + dropzone.on "error", -> error = yes + dropzone.on "errormultiple", -> errormultiple = yes + dropzone.on "complete", -> complete = yes + dropzone.on "completemultiple", -> completemultiple = yes + + dropzone.addFile mockFile + + setTimeout -> + + mockFile.status.should.eql Dropzone.UPLOADING + + requests[0].status = 400 + requests[0].readyState = 4 + requests[0].onload() + + expect(yes == error == errormultiple == complete == completemultiple).to.be.ok + + done() + , 10 + + it "should include hidden files in the form and unchecked checkboxes and radiobuttons should be excluded", (done) -> + element = Dropzone.createElement """
+ + + + + + +
""" + dropzone = new Dropzone element, url: "/the/url" + + + formData = null + dropzone.on "sending", (file, xhr, tformData) -> + formData = tformData + sinon.spy tformData, "append" + + mock1 = getMockFile() + + dropzone.addFile mock1 + + setTimeout -> + formData.append.callCount.should.equal 5 + + formData.append.args[0][0].should.eql "test" + formData.append.args[0][1].should.eql "hidden" + + formData.append.args[1][0].should.eql "checked" + formData.append.args[1][1].should.eql "value1" + + formData.append.args[2][0].should.eql "radio1" + formData.append.args[2][1].should.eql "radiovalue2" + + formData.append.args[3][0].should.eql "select" + formData.append.args[3][1].should.eql "2" + + formData.append.args[4][0].should.eql "file" + formData.append.args[4][1].should.equal mock1 + + # formData.append.args[1][0].should.eql "myName[]" + done() + , 10 + + + it "should all values of a select that has the multiple attribute", (done) -> + element = Dropzone.createElement """
+ +
""" + dropzone = new Dropzone element, url: "/the/url" + + + formData = null + dropzone.on "sending", (file, xhr, tformData) -> + formData = tformData + sinon.spy tformData, "append" + + mock1 = getMockFile() + + dropzone.addFile mock1 + + setTimeout -> + formData.append.callCount.should.equal 3 + + formData.append.args[0][0].should.eql "select" + formData.append.args[0][1].should.eql "value2" + + formData.append.args[1][0].should.eql "select" + formData.append.args[1][1].should.eql "value4" + + formData.append.args[2][0].should.eql "file" + formData.append.args[2][1].should.equal mock1 + + # formData.append.args[1][0].should.eql "myName[]" + done() + , 10 + + + + describe "settings()", -> + it "should correctly set `withCredentials` on the xhr object", -> + dropzone.uploadFile mockFile + requests.length.should.eql 1 + requests[0].withCredentials.should.eql no + dropzone.options.withCredentials = yes + dropzone.uploadFile mockFile + requests.length.should.eql 2 + requests[1].withCredentials.should.eql yes + + it "should correctly override headers on the xhr object", -> + dropzone.options.headers = {"Foo-Header": "foobar"} + dropzone.uploadFile mockFile + requests[0].requestHeaders["Foo-Header"].should.eql 'foobar' + + it "should not set headers on the xhr object that are empty", -> + dropzone.options.headers = {"X-Requested-With": null} + dropzone.uploadFile mockFile + Object.keys(requests[0].requestHeaders).should.not.contain("X-Requested-With") + + it "should properly use the paramName without [n] as file upload if uploadMultiple is false", (done) -> + dropzone.options.uploadMultiple = false + dropzone.options.paramName = "myName" + + formData = [ ] + sendingCount = 0 + dropzone.on "sending", (files, xhr, tformData) -> + sendingCount++ + + formData.push tformData + sinon.spy tformData, "append" + + + mock1 = getMockFile() + mock2 = getMockFile() + + dropzone.addFile mock1 + dropzone.addFile mock2 + + setTimeout -> + sendingCount.should.equal 2 + + formData.length.should.equal 2 + formData[0].append.callCount.should.equal 1 + formData[1].append.callCount.should.equal 1 + formData[0].append.args[0][0].should.eql "myName" + formData[0].append.args[0][0].should.eql "myName" + + done() + , 10 + + + it "should properly use the paramName with [n] as file upload if uploadMultiple is true", (done) -> + dropzone.options.uploadMultiple = yes + dropzone.options.paramName = "myName" + + formData = null + sendingMultipleCount = 0 + sendingCount = 0 + dropzone.on "sending", (file, xhr, tformData) -> sendingCount++ + dropzone.on "sendingmultiple", (files, xhr, tformData) -> + sendingMultipleCount++ + formData = tformData + sinon.spy tformData, "append" + + mock1 = getMockFile() + mock2 = getMockFile() + + dropzone.addFile mock1 + dropzone.addFile mock2 + + setTimeout -> + sendingCount.should.equal 2 + sendingMultipleCount.should.equal 1 + dropzone.uploadFiles [ mock1, mock2 ] + formData.append.callCount.should.equal 2 + formData.append.args[0][0].should.eql "myName[0]" + formData.append.args[1][0].should.eql "myName[1]" + done() + , 10 + + + it "should not change the file name if the options.renameFilename is not set", (done) -> + mockFilename = 'T3sT ;:_-.,!¨@&%&' + + renamedFilename = dropzone._renameFilename(mockFilename) + + setTimeout -> + renamedFilename.should.equal mockFilename + done() + , 10 + + it "should rename the file name if options.renamedFilename is set", (done) -> + dropzone.options.renameFilename = (name) -> + name.toLowerCase().replace(/[^\w]/gi, '') + renamedFilename = dropzone._renameFilename('T3sT ;:_-.,!¨@&%&') + setTimeout -> + renamedFilename.should.equal 't3st_' + done() + , 10 + + describe "should properly set status of file", -> + it "should correctly set `withCredentials` on the xhr object", (done) -> + dropzone.addFile mockFile + + setTimeout -> + mockFile.status.should.eql Dropzone.UPLOADING + + requests.length.should.equal 1 + requests[0].status = 400 + requests[0].readyState = 4 + + requests[0].onload() + + mockFile.status.should.eql Dropzone.ERROR + + + mockFile = getMockFile() + dropzone.addFile mockFile + + setTimeout -> + mockFile.status.should.eql Dropzone.UPLOADING + + requests.length.should.equal 2 + requests[1].status = 200 + requests[1].readyState = 4 + + requests[1].onload() + + mockFile.status.should.eql Dropzone.SUCCESS + done() + , 10 + , 10 + + describe "complete file", -> + it "should properly emit the queuecomplete event when the complete queue is finished", (done) -> + + mock1 = getMockFile() + mock2 = getMockFile() + mock3 = getMockFile() + mock1.status = Dropzone.ADDED + mock2.status = Dropzone.ADDED + mock3.status = Dropzone.ADDED + mock1.name = "mock1" + mock2.name = "mock2" + mock3.name = "mock3" + + + dropzone.uploadFiles = (files) -> + setTimeout (=> + @_finished files, null, null + ), 1 + + completedFiles = 0 + dropzone.on "complete", (file) -> + completedFiles++ + + dropzone.on "queuecomplete", -> + completedFiles.should.equal 3 + done() + + dropzone.addFile mock1 + dropzone.addFile mock2 + dropzone.addFile mock3 diff --git a/web/libraries/dropzone/test/test.html b/web/libraries/dropzone/test/test.html new file mode 100755 index 000000000..68bb24941 --- /dev/null +++ b/web/libraries/dropzone/test/test.html @@ -0,0 +1,22 @@ + + + + +
+ + + + + + + + + diff --git a/web/libraries/dropzone/test/test.js b/web/libraries/dropzone/test/test.js new file mode 100755 index 000000000..487f7dd31 --- /dev/null +++ b/web/libraries/dropzone/test/test.js @@ -0,0 +1,1939 @@ +(function() { + chai.should(); + + describe("Dropzone", function() { + var getMockFile, xhr; + getMockFile = function() { + return { + status: Dropzone.ADDED, + accepted: true, + name: "test file name", + size: 123456, + type: "text/html" + }; + }; + xhr = null; + beforeEach(function() { + return xhr = sinon.useFakeXMLHttpRequest(); + }); + describe("Emitter", function() { + var emitter; + emitter = null; + beforeEach(function() { + return emitter = new Dropzone.prototype.Emitter(); + }); + it(".on() should return the object itself", function() { + return (emitter.on("test", function() {})).should.equal(emitter); + }); + it(".on() should properly register listeners", function() { + var callback, callback2; + (emitter._callbacks === void 0).should.be["true"]; + callback = function() {}; + callback2 = function() {}; + emitter.on("test", callback); + emitter.on("test", callback2); + emitter.on("test2", callback); + emitter._callbacks.test.length.should.equal(2); + emitter._callbacks.test[0].should.equal(callback); + emitter._callbacks.test[1].should.equal(callback2); + emitter._callbacks.test2.length.should.equal(1); + return emitter._callbacks.test2[0].should.equal(callback); + }); + it(".emit() should return the object itself", function() { + return emitter.emit('test').should.equal(emitter); + }); + it(".emit() should properly invoke all registered callbacks with arguments", function() { + var callCount1, callCount12, callCount2, callback1, callback12, callback2; + callCount1 = 0; + callCount12 = 0; + callCount2 = 0; + callback1 = function(var1, var2) { + callCount1++; + var1.should.equal('callback1 var1'); + return var2.should.equal('callback1 var2'); + }; + callback12 = function(var1, var2) { + callCount12++; + var1.should.equal('callback1 var1'); + return var2.should.equal('callback1 var2'); + }; + callback2 = function(var1, var2) { + callCount2++; + var1.should.equal('callback2 var1'); + return var2.should.equal('callback2 var2'); + }; + emitter.on("test1", callback1); + emitter.on("test1", callback12); + emitter.on("test2", callback2); + callCount1.should.equal(0); + callCount12.should.equal(0); + callCount2.should.equal(0); + emitter.emit("test1", "callback1 var1", "callback1 var2"); + callCount1.should.equal(1); + callCount12.should.equal(1); + callCount2.should.equal(0); + emitter.emit("test2", "callback2 var1", "callback2 var2"); + callCount1.should.equal(1); + callCount12.should.equal(1); + callCount2.should.equal(1); + emitter.emit("test1", "callback1 var1", "callback1 var2"); + callCount1.should.equal(2); + callCount12.should.equal(2); + return callCount2.should.equal(1); + }); + return describe(".off()", function() { + var callback1, callback2, callback3, callback4; + callback1 = function() {}; + callback2 = function() {}; + callback3 = function() {}; + callback4 = function() {}; + beforeEach(function() { + return emitter._callbacks = { + 'test1': [callback1, callback2], + 'test2': [callback3], + 'test3': [callback1, callback4], + 'test4': [] + }; + }); + it("should work without any listeners", function() { + var emt; + emitter._callbacks = void 0; + emt = emitter.off(); + emitter._callbacks.should.eql({}); + return emt.should.equal(emitter); + }); + it("should properly remove all event listeners", function() { + var emt; + emt = emitter.off(); + emitter._callbacks.should.eql({}); + return emt.should.equal(emitter); + }); + it("should properly remove all event listeners for specific event", function() { + var emt; + emitter.off("test1"); + (emitter._callbacks["test1"] === void 0).should.be["true"]; + emitter._callbacks["test2"].length.should.equal(1); + emitter._callbacks["test3"].length.should.equal(2); + emt = emitter.off("test2"); + (emitter._callbacks["test2"] === void 0).should.be["true"]; + return emt.should.equal(emitter); + }); + return it("should properly remove specific event listener", function() { + var emt; + emitter.off("test1", callback1); + emitter._callbacks["test1"].length.should.equal(1); + emitter._callbacks["test1"][0].should.equal(callback2); + emitter._callbacks["test3"].length.should.equal(2); + emt = emitter.off("test3", callback4); + emitter._callbacks["test3"].length.should.equal(1); + emitter._callbacks["test3"][0].should.equal(callback1); + return emt.should.equal(emitter); + }); + }); + }); + describe("static functions", function() { + describe("Dropzone.createElement()", function() { + var element; + element = Dropzone.createElement("
Hallo
"); + it("should properly create an element from a string", function() { + return element.tagName.should.equal("DIV"); + }); + it("should properly add the correct class", function() { + return element.classList.contains("test").should.be.ok; + }); + it("should properly create child elements", function() { + return element.querySelector("span").tagName.should.equal("SPAN"); + }); + return it("should always return only one element", function() { + element = Dropzone.createElement("
"); + return element.tagName.should.equal("DIV"); + }); + }); + describe("Dropzone.elementInside()", function() { + var child1, child2, element; + element = Dropzone.createElement("
"); + document.body.appendChild(element); + child1 = element.querySelector(".child1"); + child2 = element.querySelector(".child2"); + after(function() { + return document.body.removeChild(element); + }); + it("should return yes if elements are the same", function() { + return Dropzone.elementInside(element, element).should.be.ok; + }); + it("should return yes if element is direct child", function() { + return Dropzone.elementInside(child1, element).should.be.ok; + }); + it("should return yes if element is some child", function() { + Dropzone.elementInside(child2, element).should.be.ok; + return Dropzone.elementInside(child2, document.body).should.be.ok; + }); + return it("should return no unless element is some child", function() { + Dropzone.elementInside(element, child1).should.not.be.ok; + return Dropzone.elementInside(document.body, child1).should.not.be.ok; + }); + }); + describe("Dropzone.optionsForElement()", function() { + var element, testOptions; + testOptions = { + url: "/some/url", + method: "put" + }; + before(function() { + return Dropzone.options.testElement = testOptions; + }); + after(function() { + return delete Dropzone.options.testElement; + }); + element = document.createElement("div"); + it("should take options set in Dropzone.options from camelized id", function() { + element.id = "test-element"; + return Dropzone.optionsForElement(element).should.equal(testOptions); + }); + it("should return undefined if no options set", function() { + element.id = "test-element2"; + return expect(Dropzone.optionsForElement(element)).to.equal(void 0); + }); + it("should return undefined and not throw if it's a form with an input element of the name 'id'", function() { + element = Dropzone.createElement("
"); + return expect(Dropzone.optionsForElement(element)).to.equal(void 0); + }); + return it("should ignore input fields with the name='id'", function() { + element = Dropzone.createElement("
"); + return Dropzone.optionsForElement(element).should.equal(testOptions); + }); + }); + describe("Dropzone.forElement()", function() { + var dropzone, element; + element = document.createElement("div"); + element.id = "some-test-element"; + dropzone = null; + before(function() { + document.body.appendChild(element); + return dropzone = new Dropzone(element, { + url: "/test" + }); + }); + after(function() { + dropzone.disable(); + return document.body.removeChild(element); + }); + it("should throw an exception if no dropzone attached", function() { + return expect(function() { + return Dropzone.forElement(document.createElement("div")); + }).to["throw"]("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); + }); + it("should accept css selectors", function() { + return expect(Dropzone.forElement("#some-test-element")).to.equal(dropzone); + }); + return it("should accept native elements", function() { + return expect(Dropzone.forElement(element)).to.equal(dropzone); + }); + }); + describe("Dropzone.discover()", function() { + var element1, element2, element3; + element1 = document.createElement("div"); + element1.className = "dropzone"; + element2 = element1.cloneNode(); + element3 = element1.cloneNode(); + element1.id = "test-element-1"; + element2.id = "test-element-2"; + element3.id = "test-element-3"; + describe("specific options", function() { + before(function() { + Dropzone.options.testElement1 = { + url: "test-url" + }; + Dropzone.options.testElement2 = false; + document.body.appendChild(element1); + document.body.appendChild(element2); + return Dropzone.discover(); + }); + after(function() { + document.body.removeChild(element1); + return document.body.removeChild(element2); + }); + it("should find elements with a .dropzone class", function() { + return element1.dropzone.should.be.ok; + }); + return it("should not create dropzones with disabled options", function() { + return expect(element2.dropzone).to.not.be.ok; + }); + }); + return describe("Dropzone.autoDiscover", function() { + before(function() { + Dropzone.options.testElement3 = { + url: "test-url" + }; + return document.body.appendChild(element3); + }); + after(function() { + return document.body.removeChild(element3); + }); + it("should create dropzones even if Dropzone.autoDiscover == false", function() { + Dropzone.autoDiscover = false; + Dropzone.discover(); + return expect(element3.dropzone).to.be.ok; + }); + return it("should not automatically be called if Dropzone.autoDiscover == false", function() { + Dropzone.autoDiscover = false; + Dropzone.discover = function() { + return expect(false).to.be.ok; + }; + return Dropzone._autoDiscoverFunction(); + }); + }); + }); + describe("Dropzone.isValidFile()", function() { + it("should return true if called without acceptedFiles", function() { + return Dropzone.isValidFile({ + type: "some/type" + }, null).should.be.ok; + }); + it("should properly validate if called with concrete mime types", function() { + var acceptedMimeTypes; + acceptedMimeTypes = "text/html,image/jpeg,application/json"; + Dropzone.isValidFile({ + type: "text/html" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "image/jpeg" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "application/json" + }, acceptedMimeTypes).should.be.ok; + return Dropzone.isValidFile({ + type: "image/bmp" + }, acceptedMimeTypes).should.not.be.ok; + }); + it("should properly validate if called with base mime types", function() { + var acceptedMimeTypes; + acceptedMimeTypes = "text/*,image/*,application/*"; + Dropzone.isValidFile({ + type: "text/html" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "image/jpeg" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "application/json" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "image/bmp" + }, acceptedMimeTypes).should.be.ok; + return Dropzone.isValidFile({ + type: "some/type" + }, acceptedMimeTypes).should.not.be.ok; + }); + it("should properly validate if called with mixed mime types", function() { + var acceptedMimeTypes; + acceptedMimeTypes = "text/*,image/jpeg,application/*"; + Dropzone.isValidFile({ + type: "text/html" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "image/jpeg" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + type: "image/bmp" + }, acceptedMimeTypes).should.not.be.ok; + Dropzone.isValidFile({ + type: "application/json" + }, acceptedMimeTypes).should.be.ok; + return Dropzone.isValidFile({ + type: "some/type" + }, acceptedMimeTypes).should.not.be.ok; + }); + it("should properly validate even with spaces in between", function() { + var acceptedMimeTypes; + acceptedMimeTypes = "text/html , image/jpeg, application/json"; + Dropzone.isValidFile({ + type: "text/html" + }, acceptedMimeTypes).should.be.ok; + return Dropzone.isValidFile({ + type: "image/jpeg" + }, acceptedMimeTypes).should.be.ok; + }); + return it("should properly validate extensions", function() { + var acceptedMimeTypes; + acceptedMimeTypes = "text/html , image/jpeg, .pdf ,.png"; + Dropzone.isValidFile({ + name: "somxsfsd", + type: "text/html" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + name: "somesdfsdf", + type: "image/jpeg" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + name: "somesdfadfadf", + type: "application/json" + }, acceptedMimeTypes).should.not.be.ok; + Dropzone.isValidFile({ + name: "some-file file.pdf", + type: "random/type" + }, acceptedMimeTypes).should.be.ok; + Dropzone.isValidFile({ + name: "some-file.pdf file.gif", + type: "random/type" + }, acceptedMimeTypes).should.not.be.ok; + return Dropzone.isValidFile({ + name: "some-file file.png", + type: "random/type" + }, acceptedMimeTypes).should.be.ok; + }); + }); + return describe("Dropzone.confirm", function() { + beforeEach(function() { + return sinon.stub(window, "confirm"); + }); + afterEach(function() { + return window.confirm.restore(); + }); + it("should forward to window.confirm and call the callbacks accordingly", function() { + var accepted, rejected; + accepted = rejected = false; + window.confirm.returns(true); + Dropzone.confirm("test question", (function() { + return accepted = true; + }), (function() { + return rejected = true; + })); + window.confirm.args[0][0].should.equal("test question"); + accepted.should.equal(true); + rejected.should.equal(false); + accepted = rejected = false; + window.confirm.returns(false); + Dropzone.confirm("test question 2", (function() { + return accepted = true; + }), (function() { + return rejected = true; + })); + window.confirm.args[1][0].should.equal("test question 2"); + accepted.should.equal(false); + return rejected.should.equal(true); + }); + return it("should not error if rejected is not provided", function() { + var accepted, rejected; + accepted = rejected = false; + window.confirm.returns(false); + Dropzone.confirm("test question", (function() { + return accepted = true; + })); + window.confirm.args[0][0].should.equal("test question"); + accepted.should.equal(false); + return rejected.should.equal(false); + }); + }); + }); + describe("Dropzone.getElement() / getElements()", function() { + var tmpElements; + tmpElements = []; + beforeEach(function() { + tmpElements = []; + tmpElements.push(Dropzone.createElement("
")); + tmpElements.push(Dropzone.createElement("
")); + tmpElements.push(Dropzone.createElement("
")); + return tmpElements.forEach(function(el) { + return document.body.appendChild(el); + }); + }); + afterEach(function() { + return tmpElements.forEach(function(el) { + return document.body.removeChild(el); + }); + }); + describe(".getElement()", function() { + it("should accept a string", function() { + var el; + el = Dropzone.getElement(".tmptest"); + el.should.equal(tmpElements[0]); + el = Dropzone.getElement("#tmptest1"); + return el.should.equal(tmpElements[1]); + }); + it("should accept a node", function() { + var el; + el = Dropzone.getElement(tmpElements[2]); + return el.should.equal(tmpElements[2]); + }); + return it("should fail if invalid selector", function() { + var errorMessage; + errorMessage = "Invalid `clickable` option provided. Please provide a CSS selector or a plain HTML element."; + expect(function() { + return Dropzone.getElement("lblasdlfsfl", "clickable"); + }).to["throw"](errorMessage); + expect(function() { + return Dropzone.getElement({ + "lblasdlfsfl": "lblasdlfsfl" + }, "clickable"); + }).to["throw"](errorMessage); + return expect(function() { + return Dropzone.getElement(["lblasdlfsfl"], "clickable"); + }).to["throw"](errorMessage); + }); + }); + return describe(".getElements()", function() { + it("should accept a list of strings", function() { + var els; + els = Dropzone.getElements([".tmptest", "#tmptest1"]); + return els.should.eql([tmpElements[0], tmpElements[1]]); + }); + it("should accept a list of nodes", function() { + var els; + els = Dropzone.getElements([tmpElements[0], tmpElements[2]]); + return els.should.eql([tmpElements[0], tmpElements[2]]); + }); + it("should accept a mixed list", function() { + var els; + els = Dropzone.getElements(["#tmptest1", tmpElements[2]]); + return els.should.eql([tmpElements[1], tmpElements[2]]); + }); + it("should accept a string selector", function() { + var els; + els = Dropzone.getElements(".random"); + return els.should.eql([tmpElements[1], tmpElements[2]]); + }); + it("should accept a single node", function() { + var els; + els = Dropzone.getElements(tmpElements[1]); + return els.should.eql([tmpElements[1]]); + }); + return it("should fail if invalid selector", function() { + var errorMessage; + errorMessage = "Invalid `clickable` option provided. Please provide a CSS selector, a plain HTML element or a list of those."; + expect(function() { + return Dropzone.getElements("lblasdlfsfl", "clickable"); + }).to["throw"](errorMessage); + return expect(function() { + return Dropzone.getElements(["lblasdlfsfl"], "clickable"); + }).to["throw"](errorMessage); + }); + }); + }); + describe("constructor()", function() { + var dropzone; + dropzone = null; + afterEach(function() { + if (dropzone != null) { + return dropzone.destroy(); + } + }); + it("should throw an exception if the element is invalid", function() { + return expect(function() { + return dropzone = new Dropzone("#invalid-element"); + }).to["throw"]("Invalid dropzone element."); + }); + it("should throw an exception if assigned twice to the same element", function() { + var element; + element = document.createElement("div"); + dropzone = new Dropzone(element, { + url: "url" + }); + return expect(function() { + return new Dropzone(element, { + url: "url" + }); + }).to["throw"]("Dropzone already attached."); + }); + it("should throw an exception if both acceptedFiles and acceptedMimeTypes are specified", function() { + var element; + element = document.createElement("div"); + return expect(function() { + return dropzone = new Dropzone(element, { + url: "test", + acceptedFiles: "param", + acceptedMimeTypes: "types" + }); + }).to["throw"]("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); + }); + it("should set itself as element.dropzone", function() { + var element; + element = document.createElement("div"); + dropzone = new Dropzone(element, { + url: "url" + }); + return element.dropzone.should.equal(dropzone); + }); + it("should add itself to Dropzone.instances", function() { + var element; + element = document.createElement("div"); + dropzone = new Dropzone(element, { + url: "url" + }); + return Dropzone.instances[Dropzone.instances.length - 1].should.equal(dropzone); + }); + it("should use the action attribute not the element with the name action", function() { + var element; + element = Dropzone.createElement("
"); + dropzone = new Dropzone(element); + return dropzone.options.url.should.equal("real-action"); + }); + return describe("options", function() { + var element, element2; + element = null; + element2 = null; + beforeEach(function() { + element = document.createElement("div"); + element.id = "test-element"; + element2 = document.createElement("div"); + element2.id = "test-element2"; + return Dropzone.options.testElement = { + url: "/some/url", + parallelUploads: 10 + }; + }); + afterEach(function() { + return delete Dropzone.options.testElement; + }); + it("should take the options set in Dropzone.options", function() { + dropzone = new Dropzone(element); + dropzone.options.url.should.equal("/some/url"); + return dropzone.options.parallelUploads.should.equal(10); + }); + it("should prefer passed options over Dropzone.options", function() { + dropzone = new Dropzone(element, { + url: "/some/other/url" + }); + return dropzone.options.url.should.equal("/some/other/url"); + }); + it("should take the default options if nothing set in Dropzone.options", function() { + dropzone = new Dropzone(element2, { + url: "/some/url" + }); + return dropzone.options.parallelUploads.should.equal(2); + }); + it("should call the fallback function if forceFallback == true", function(done) { + return dropzone = new Dropzone(element, { + url: "/some/other/url", + forceFallback: true, + fallback: function() { + return done(); + } + }); + }); + it("should set acceptedFiles if deprecated acceptedMimetypes option has been passed", function() { + dropzone = new Dropzone(element, { + url: "/some/other/url", + acceptedMimeTypes: "my/type" + }); + return dropzone.options.acceptedFiles.should.equal("my/type"); + }); + return describe("options.clickable", function() { + var clickableElement; + clickableElement = null; + dropzone = null; + beforeEach(function() { + clickableElement = document.createElement("div"); + clickableElement.className = "some-clickable"; + return document.body.appendChild(clickableElement); + }); + afterEach(function() { + document.body.removeChild(clickableElement); + if (dropzone != null) { + return dropzone.destroy; + } + }); + it("should use the default element if clickable == true", function() { + dropzone = new Dropzone(element, { + clickable: true + }); + return dropzone.clickableElements.should.eql([dropzone.element]); + }); + it("should lookup the element if clickable is a CSS selector", function() { + dropzone = new Dropzone(element, { + clickable: ".some-clickable" + }); + return dropzone.clickableElements.should.eql([clickableElement]); + }); + it("should simply use the provided element", function() { + dropzone = new Dropzone(element, { + clickable: clickableElement + }); + return dropzone.clickableElements.should.eql([clickableElement]); + }); + it("should accept multiple clickable elements", function() { + dropzone = new Dropzone(element, { + clickable: [document.body, ".some-clickable"] + }); + return dropzone.clickableElements.should.eql([document.body, clickableElement]); + }); + return it("should throw an exception if the element is invalid", function() { + return expect(function() { + return dropzone = new Dropzone(element, { + clickable: ".some-invalid-clickable" + }); + }).to["throw"]("Invalid `clickable` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); + }); + }); + }); + }); + describe("init()", function() { + describe("clickable", function() { + var dropzone, dropzones, name, _results; + dropzones = { + "using acceptedFiles": new Dropzone(Dropzone.createElement("
"), { + clickable: true, + acceptedFiles: "audio/*,video/*" + }), + "using acceptedMimeTypes": new Dropzone(Dropzone.createElement("
"), { + clickable: true, + acceptedMimeTypes: "audio/*,video/*" + }) + }; + it("should not add an accept attribute if no acceptParameter", function() { + var dropzone; + dropzone = new Dropzone(Dropzone.createElement("
"), { + clickable: true, + acceptParameter: null, + acceptedMimeTypes: null + }); + return dropzone.hiddenFileInput.hasAttribute("accept").should.be["false"]; + }); + _results = []; + for (name in dropzones) { + dropzone = dropzones[name]; + _results.push(describe(name, function() { + return (function(dropzone) { + it("should create a hidden file input if clickable", function() { + dropzone.hiddenFileInput.should.be.ok; + return dropzone.hiddenFileInput.tagName.should.equal("INPUT"); + }); + it("should use the acceptParameter", function() { + return dropzone.hiddenFileInput.getAttribute("accept").should.equal("audio/*,video/*"); + }); + return it("should create a new input element when something is selected to reset the input field", function() { + var event, hiddenFileInput, i, _i, _results1; + _results1 = []; + for (i = _i = 0; _i <= 3; i = ++_i) { + hiddenFileInput = dropzone.hiddenFileInput; + event = document.createEvent("HTMLEvents"); + event.initEvent("change", true, true); + hiddenFileInput.dispatchEvent(event); + dropzone.hiddenFileInput.should.not.equal(hiddenFileInput); + _results1.push(Dropzone.elementInside(hiddenFileInput, document).should.not.be.ok); + } + return _results1; + }); + })(dropzone); + })); + } + return _results; + }); + it("should create a .dz-message element", function() { + var dropzone, element; + element = Dropzone.createElement("
"); + dropzone = new Dropzone(element, { + clickable: true, + acceptParameter: null, + acceptedMimeTypes: null + }); + return element.querySelector(".dz-message").should.be["instanceof"](Element); + }); + return it("should not create a .dz-message element if there already is one", function() { + var dropzone, element, msg; + element = Dropzone.createElement("
"); + msg = Dropzone.createElement("
TEST
"); + element.appendChild(msg); + dropzone = new Dropzone(element, { + clickable: true, + acceptParameter: null, + acceptedMimeTypes: null + }); + element.querySelector(".dz-message").should.equal(msg); + return element.querySelectorAll(".dz-message").length.should.equal(1); + }); + }); + describe("options", function() { + var dropzone, element; + element = null; + dropzone = null; + beforeEach(function() { + element = Dropzone.createElement("
"); + return dropzone = new Dropzone(element, { + maxFilesize: 4, + url: "url", + acceptedMimeTypes: "audio/*,image/png", + maxFiles: 3 + }); + }); + return describe("file specific", function() { + var file; + file = null; + beforeEach(function() { + file = { + name: "test name", + size: 2 * 1024 * 1024, + width: 200, + height: 100 + }; + return dropzone.options.addedfile.call(dropzone, file); + }); + describe(".addedFile()", function() { + return it("should properly create the previewElement", function() { + file.previewElement.should.be["instanceof"](Element); + file.previewElement.querySelector("[data-dz-name]").innerHTML.should.eql("test name"); + return file.previewElement.querySelector("[data-dz-size]").innerHTML.should.eql("2.1 MB"); + }); + }); + describe(".error()", function() { + it("should properly insert the error", function() { + dropzone.options.error.call(dropzone, file, "test message"); + return file.previewElement.querySelector("[data-dz-errormessage]").innerHTML.should.eql("test message"); + }); + return it("should properly insert the error when provided with an object containing the error", function() { + dropzone.options.error.call(dropzone, file, { + error: "test message" + }); + return file.previewElement.querySelector("[data-dz-errormessage]").innerHTML.should.eql("test message"); + }); + }); + describe(".thumbnail()", function() { + return it("should properly insert the error", function() { + var thumbnail, transparentGif; + transparentGif = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="; + dropzone.options.thumbnail.call(dropzone, file, transparentGif); + thumbnail = file.previewElement.querySelector("[data-dz-thumbnail]"); + thumbnail.src.should.eql(transparentGif); + return thumbnail.alt.should.eql("test name"); + }); + }); + describe(".uploadprogress()", function() { + return it("should properly set the width", function() { + dropzone.options.uploadprogress.call(dropzone, file, 0); + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql("0%"); + dropzone.options.uploadprogress.call(dropzone, file, 80); + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql("80%"); + dropzone.options.uploadprogress.call(dropzone, file, 90); + file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql("90%"); + dropzone.options.uploadprogress.call(dropzone, file, 100); + return file.previewElement.querySelector("[data-dz-uploadprogress]").style.width.should.eql("100%"); + }); + }); + return describe(".resize()", function() { + describe("with default thumbnail settings", function() { + return it("should properly return target dimensions", function() { + var info; + info = dropzone.options.resize.call(dropzone, file); + info.optWidth.should.eql(120); + return info.optHeight.should.eql(120); + }); + }); + return describe("with null thumbnail settings", function() { + return it("should properly return target dimensions", function() { + var i, info, setting, testSettings, _i, _len, _results; + testSettings = [[null, null], [null, 150], [150, null]]; + _results = []; + for (i = _i = 0, _len = testSettings.length; _i < _len; i = ++_i) { + setting = testSettings[i]; + dropzone.options.thumbnailWidth = setting[0]; + dropzone.options.thumbnailHeight = setting[1]; + info = dropzone.options.resize.call(dropzone, file); + if (i === 0) { + info.optWidth.should.eql(200); + info.optHeight.should.eql(100); + } + if (i === 1) { + info.optWidth.should.eql(300); + info.optHeight.should.eql(150); + } + if (i === 2) { + info.optWidth.should.eql(150); + _results.push(info.optHeight.should.eql(75)); + } else { + _results.push(void 0); + } + } + return _results; + }); + }); + }); + }); + }); + describe("instance", function() { + var dropzone, element, requests; + element = null; + dropzone = null; + requests = null; + beforeEach(function() { + requests = []; + xhr.onCreate = function(xhr) { + return requests.push(xhr); + }; + element = Dropzone.createElement("
"); + document.body.appendChild(element); + return dropzone = new Dropzone(element, { + maxFilesize: 4, + maxFiles: 100, + url: "url", + acceptedMimeTypes: "audio/*,image/png", + uploadprogress: function() {} + }); + }); + afterEach(function() { + document.body.removeChild(element); + dropzone.destroy(); + return xhr.restore(); + }); + describe(".accept()", function() { + it("should pass if the filesize is OK", function() { + return dropzone.accept({ + size: 2 * 1024 * 1024, + type: "audio/mp3" + }, function(err) { + return expect(err).to.be.undefined; + }); + }); + it("shouldn't pass if the filesize is too big", function() { + return dropzone.accept({ + size: 10 * 1024 * 1024, + type: "audio/mp3" + }, function(err) { + return err.should.eql("File is too big (10MiB). Max filesize: 4MiB."); + }); + }); + it("should properly accept files which mime types are listed in acceptedFiles", function() { + dropzone.accept({ + type: "audio/mp3" + }, function(err) { + return expect(err).to.be.undefined; + }); + dropzone.accept({ + type: "image/png" + }, function(err) { + return expect(err).to.be.undefined; + }); + return dropzone.accept({ + type: "audio/wav" + }, function(err) { + return expect(err).to.be.undefined; + }); + }); + it("should properly reject files when the mime type isn't listed in acceptedFiles", function() { + return dropzone.accept({ + type: "image/jpeg" + }, function(err) { + return err.should.eql("You can't upload files of this type."); + }); + }); + it("should fail if maxFiles has been exceeded and call the event maxfilesexceeded", function() { + var called, file; + sinon.stub(dropzone, "getAcceptedFiles"); + file = { + type: "audio/mp3" + }; + dropzone.getAcceptedFiles.returns({ + length: 99 + }); + dropzone.options.dictMaxFilesExceeded = "You can only upload {{maxFiles}} files."; + called = false; + dropzone.on("maxfilesexceeded", function(lfile) { + lfile.should.equal(file); + return called = true; + }); + dropzone.accept(file, function(err) { + return expect(err).to.be.undefined; + }); + called.should.not.be.ok; + dropzone.getAcceptedFiles.returns({ + length: 100 + }); + dropzone.accept(file, function(err) { + return expect(err).to.equal("You can only upload 100 files."); + }); + called.should.be.ok; + return dropzone.getAcceptedFiles.restore(); + }); + return it("should properly handle if maxFiles is 0", function() { + var called, file; + file = { + type: "audio/mp3" + }; + dropzone.options.maxFiles = 0; + called = false; + dropzone.on("maxfilesexceeded", function(lfile) { + lfile.should.equal(file); + return called = true; + }); + dropzone.accept(file, function(err) { + return expect(err).to.equal("You can not upload any more files."); + }); + return called.should.be.ok; + }); + }); + describe(".removeFile()", function() { + return it("should abort uploading if file is currently being uploaded", function(done) { + var mockFile; + mockFile = getMockFile(); + dropzone.uploadFile = function(file) {}; + dropzone.accept = function(file, done) { + return done(); + }; + sinon.stub(dropzone, "cancelUpload"); + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.equal(Dropzone.UPLOADING); + dropzone.getUploadingFiles()[0].should.equal(mockFile); + dropzone.cancelUpload.callCount.should.equal(0); + dropzone.removeFile(mockFile); + dropzone.cancelUpload.callCount.should.equal(1); + return done(); + }, 10); + }); + }); + describe(".cancelUpload()", function() { + it("should properly cancel upload if file currently uploading", function(done) { + var mockFile; + mockFile = getMockFile(); + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.equal(Dropzone.UPLOADING); + dropzone.getUploadingFiles()[0].should.equal(mockFile); + dropzone.cancelUpload(mockFile); + mockFile.status.should.equal(Dropzone.CANCELED); + dropzone.getUploadingFiles().length.should.equal(0); + dropzone.getQueuedFiles().length.should.equal(0); + return done(); + }, 10); + }); + it("should properly cancel the upload if file is not yet uploading", function() { + var mockFile; + mockFile = getMockFile(); + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.options.parallelUploads = 0; + dropzone.addFile(mockFile); + mockFile.status.should.equal(Dropzone.QUEUED); + dropzone.getQueuedFiles()[0].should.equal(mockFile); + dropzone.cancelUpload(mockFile); + mockFile.status.should.equal(Dropzone.CANCELED); + dropzone.getQueuedFiles().length.should.equal(0); + return dropzone.getUploadingFiles().length.should.equal(0); + }); + it("should call processQueue()", function(done) { + var mockFile; + mockFile = getMockFile(); + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.options.parallelUploads = 0; + sinon.spy(dropzone, "processQueue"); + dropzone.addFile(mockFile); + return setTimeout(function() { + dropzone.processQueue.callCount.should.equal(1); + dropzone.cancelUpload(mockFile); + dropzone.processQueue.callCount.should.equal(2); + return done(); + }, 10); + }); + return it("should properly cancel all files with the same XHR if uploadMultiple is true", function(done) { + var mock1, mock2, mock3; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.options.uploadMultiple = true; + dropzone.options.parallelUploads = 3; + sinon.spy(dropzone, "processFiles"); + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + return setTimeout(function() { + var _ref; + dropzone.processFiles.callCount.should.equal(1); + sinon.spy(mock1.xhr, "abort"); + dropzone.cancelUpload(mock1); + expect((mock1.xhr === (_ref = mock2.xhr) && _ref === mock3.xhr)).to.be.ok; + mock1.status.should.equal(Dropzone.CANCELED); + mock2.status.should.equal(Dropzone.CANCELED); + mock3.status.should.equal(Dropzone.CANCELED); + mock1.xhr.abort.callCount.should.equal(1); + return done(); + }, 10); + }); + }); + describe(".disable()", function() { + return it("should properly cancel all pending uploads", function(done) { + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.options.parallelUploads = 1; + dropzone.addFile(getMockFile()); + dropzone.addFile(getMockFile()); + return setTimeout(function() { + dropzone.getUploadingFiles().length.should.equal(1); + dropzone.getQueuedFiles().length.should.equal(1); + dropzone.files.length.should.equal(2); + sinon.spy(requests[0], "abort"); + requests[0].abort.callCount.should.equal(0); + dropzone.disable(); + requests[0].abort.callCount.should.equal(1); + dropzone.getUploadingFiles().length.should.equal(0); + dropzone.getQueuedFiles().length.should.equal(0); + dropzone.files.length.should.equal(2); + dropzone.files[0].status.should.equal(Dropzone.CANCELED); + dropzone.files[1].status.should.equal(Dropzone.CANCELED); + return done(); + }, 10); + }); + }); + describe(".destroy()", function() { + it("should properly cancel all pending uploads and remove all file references", function(done) { + dropzone.accept = function(file, done) { + return done(); + }; + dropzone.options.parallelUploads = 1; + dropzone.addFile(getMockFile()); + dropzone.addFile(getMockFile()); + return setTimeout(function() { + dropzone.getUploadingFiles().length.should.equal(1); + dropzone.getQueuedFiles().length.should.equal(1); + dropzone.files.length.should.equal(2); + sinon.spy(dropzone, "disable"); + dropzone.destroy(); + dropzone.disable.callCount.should.equal(1); + element.should.not.have.property("dropzone"); + return done(); + }, 10); + }); + it("should be able to create instance of dropzone on the same element after destroy", function() { + dropzone.destroy(); + return (function() { + return new Dropzone(element, { + maxFilesize: 4, + url: "url", + acceptedMimeTypes: "audio/*,image/png", + uploadprogress: function() {} + }); + }).should.not["throw"](Error); + }); + return it("should remove itself from Dropzone.instances", function() { + (Dropzone.instances.indexOf(dropzone) !== -1).should.be.ok; + dropzone.destroy(); + return (Dropzone.instances.indexOf(dropzone) === -1).should.be.ok; + }); + }); + describe(".filesize()", function() { + it("should handle files with 0 size properly", function() { + return dropzone.filesize(0).should.eql("0 b"); + }); + it("should convert to KiloBytes, etc..", function() { + dropzone.options.filesizeBase.should.eql(1000); + dropzone.filesize(2 * 1000 * 1000).should.eql("2 MB"); + dropzone.filesize(2 * 1024 * 1024).should.eql("2.1 MB"); + dropzone.filesize(2 * 1000 * 1000 * 1000).should.eql("2 GB"); + dropzone.filesize(2 * 1024 * 1024 * 1024).should.eql("2.1 GB"); + dropzone.filesize(2.5111 * 1000 * 1000 * 1000).should.eql("2.5 GB"); + dropzone.filesize(1.1 * 1000).should.eql("1.1 KB"); + return dropzone.filesize(999 * 1000).should.eql("1 MB"); + }); + return it("should convert to KibiBytes, etc.. when the filesizeBase is changed to 1024", function() { + dropzone.options.filesizeBase = 1024; + dropzone.filesize(2 * 1024 * 1024).should.eql("2 MB"); + return dropzone.filesize(2 * 1000 * 1000).should.eql("1.9 MB"); + }); + }); + describe("._updateMaxFilesReachedClass()", function() { + it("should properly add the dz-max-files-reached class", function() { + dropzone.getAcceptedFiles = function() { + return { + length: 10 + }; + }; + dropzone.options.maxFiles = 10; + dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok; + dropzone._updateMaxFilesReachedClass(); + return dropzone.element.classList.contains("dz-max-files-reached").should.be.ok; + }); + it("should fire the 'maxfilesreached' event when appropriate", function() { + var spy; + spy = sinon.spy(); + dropzone.on("maxfilesreached", function() { + return spy(); + }); + dropzone.getAcceptedFiles = function() { + return { + length: 9 + }; + }; + dropzone.options.maxFiles = 10; + dropzone._updateMaxFilesReachedClass(); + spy.should.not.have.been.called; + dropzone.getAcceptedFiles = function() { + return { + length: 10 + }; + }; + dropzone._updateMaxFilesReachedClass(); + spy.should.have.been.called; + dropzone.getAcceptedFiles = function() { + return { + length: 11 + }; + }; + dropzone._updateMaxFilesReachedClass(); + return spy.should.have.been.calledOnce; + }); + return it("should properly remove the dz-max-files-reached class", function() { + dropzone.getAcceptedFiles = function() { + return { + length: 10 + }; + }; + dropzone.options.maxFiles = 10; + dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok; + dropzone._updateMaxFilesReachedClass(); + dropzone.element.classList.contains("dz-max-files-reached").should.be.ok; + dropzone.getAcceptedFiles = function() { + return { + length: 9 + }; + }; + dropzone._updateMaxFilesReachedClass(); + return dropzone.element.classList.contains("dz-max-files-reached").should.not.be.ok; + }); + }); + return describe("events", function() { + return describe("progress updates", function() { + return it("should properly emit a totaluploadprogress event", function(done) { + var totalProgressExpectation, _called; + dropzone.files = [ + { + size: 1990, + accepted: true, + status: Dropzone.UPLOADING, + upload: { + progress: 20, + total: 2000, + bytesSent: 400 + } + }, { + size: 1990, + accepted: true, + status: Dropzone.UPLOADING, + upload: { + progress: 10, + total: 2000, + bytesSent: 200 + } + } + ]; + _called = 0; + dropzone.on("totaluploadprogress", function(progress) { + progress.should.equal(totalProgressExpectation); + if (++_called === 3) { + return done(); + } + }); + totalProgressExpectation = 15; + dropzone.emit("uploadprogress", {}); + totalProgressExpectation = 97.5; + dropzone.files[0].upload.bytesSent = 2000; + dropzone.files[1].upload.bytesSent = 1900; + dropzone.emit("uploadprogress", {}); + totalProgressExpectation = 100; + dropzone.files[0].upload.bytesSent = 2000; + dropzone.files[1].upload.bytesSent = 2000; + dropzone.emit("uploadprogress", {}); + dropzone.files[0].status = Dropzone.CANCELED; + return dropzone.files[1].status = Dropzone.CANCELED; + }); + }); + }); + }); + describe("helper function", function() { + var dropzone, element; + element = null; + dropzone = null; + beforeEach(function() { + element = Dropzone.createElement("
"); + return dropzone = new Dropzone(element, { + url: "url" + }); + }); + describe("getExistingFallback()", function() { + it("should return undefined if no fallback", function() { + return expect(dropzone.getExistingFallback()).to.equal(void 0); + }); + it("should only return the fallback element if it contains exactly fallback", function() { + element.appendChild(Dropzone.createElement("
")); + element.appendChild(Dropzone.createElement("
")); + return expect(dropzone.getExistingFallback()).to.equal(void 0); + }); + it("should return divs as fallback", function() { + var fallback; + fallback = Dropzone.createElement("
"); + element.appendChild(fallback); + return fallback.should.equal(dropzone.getExistingFallback()); + }); + return it("should return forms as fallback", function() { + var fallback; + fallback = Dropzone.createElement("
"); + element.appendChild(fallback); + return fallback.should.equal(dropzone.getExistingFallback()); + }); + }); + describe("getFallbackForm()", function() { + it("should use the paramName without [0] if uploadMultiple is false", function() { + var fallback, fileInput; + dropzone.options.uploadMultiple = false; + dropzone.options.paramName = "myFile"; + fallback = dropzone.getFallbackForm(); + fileInput = fallback.querySelector("input[type=file]"); + return fileInput.name.should.equal("myFile"); + }); + return it("should properly add [0] to the file name if uploadMultiple is true", function() { + var fallback, fileInput; + dropzone.options.uploadMultiple = true; + dropzone.options.paramName = "myFile"; + fallback = dropzone.getFallbackForm(); + fileInput = fallback.querySelector("input[type=file]"); + return fileInput.name.should.equal("myFile[0]"); + }); + }); + describe("getAcceptedFiles() / getRejectedFiles()", function() { + var mock1, mock2, mock3, mock4; + mock1 = mock2 = mock3 = mock4 = null; + beforeEach(function() { + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock4 = getMockFile(); + dropzone.options.accept = function(file, done) { + if (file === mock1 || file === mock3) { + return done(); + } else { + return done("error"); + } + }; + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + return dropzone.addFile(mock4); + }); + it("getAcceptedFiles() should only return accepted files", function() { + return dropzone.getAcceptedFiles().should.eql([mock1, mock3]); + }); + return it("getRejectedFiles() should only return rejected files", function() { + return dropzone.getRejectedFiles().should.eql([mock2, mock4]); + }); + }); + describe("getQueuedFiles()", function() { + return it("should return all files with the status Dropzone.QUEUED", function() { + var mock1, mock2, mock3, mock4; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock4 = getMockFile(); + dropzone.options.accept = function(file, done) { + return file.done = done; + }; + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + dropzone.addFile(mock4); + dropzone.getQueuedFiles().should.eql([]); + mock1.done(); + mock3.done(); + dropzone.getQueuedFiles().should.eql([mock1, mock3]); + mock1.status.should.equal(Dropzone.QUEUED); + mock3.status.should.equal(Dropzone.QUEUED); + mock2.status.should.equal(Dropzone.ADDED); + return mock4.status.should.equal(Dropzone.ADDED); + }); + }); + describe("getUploadingFiles()", function() { + return it("should return all files with the status Dropzone.UPLOADING", function(done) { + var mock1, mock2, mock3, mock4; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock4 = getMockFile(); + dropzone.options.accept = function(file, _done) { + return file.done = _done; + }; + dropzone.uploadFile = function() {}; + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + dropzone.addFile(mock4); + dropzone.getUploadingFiles().should.eql([]); + mock1.done(); + mock3.done(); + return setTimeout((function() { + dropzone.getUploadingFiles().should.eql([mock1, mock3]); + mock1.status.should.equal(Dropzone.UPLOADING); + mock3.status.should.equal(Dropzone.UPLOADING); + mock2.status.should.equal(Dropzone.ADDED); + mock4.status.should.equal(Dropzone.ADDED); + return done(); + }), 10); + }); + }); + describe("getActiveFiles()", function() { + return it("should return all files with the status Dropzone.UPLOADING or Dropzone.QUEUED", function(done) { + var mock1, mock2, mock3, mock4; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock4 = getMockFile(); + dropzone.options.accept = function(file, _done) { + return file.done = _done; + }; + dropzone.uploadFile = function() {}; + dropzone.options.parallelUploads = 2; + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + dropzone.addFile(mock4); + dropzone.getActiveFiles().should.eql([]); + mock1.done(); + mock3.done(); + mock4.done(); + return setTimeout((function() { + dropzone.getActiveFiles().should.eql([mock1, mock3, mock4]); + mock1.status.should.equal(Dropzone.UPLOADING); + mock3.status.should.equal(Dropzone.UPLOADING); + mock2.status.should.equal(Dropzone.ADDED); + mock4.status.should.equal(Dropzone.QUEUED); + return done(); + }), 10); + }); + }); + return describe("getFilesWithStatus()", function() { + return it("should return all files with provided status", function() { + var mock1, mock2, mock3, mock4; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock4 = getMockFile(); + dropzone.options.accept = function(file, _done) { + return file.done = _done; + }; + dropzone.uploadFile = function() {}; + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + dropzone.addFile(mock4); + dropzone.getFilesWithStatus(Dropzone.ADDED).should.eql([mock1, mock2, mock3, mock4]); + mock1.status = Dropzone.UPLOADING; + mock3.status = Dropzone.QUEUED; + mock4.status = Dropzone.QUEUED; + dropzone.getFilesWithStatus(Dropzone.ADDED).should.eql([mock2]); + dropzone.getFilesWithStatus(Dropzone.UPLOADING).should.eql([mock1]); + return dropzone.getFilesWithStatus(Dropzone.QUEUED).should.eql([mock3, mock4]); + }); + }); + }); + return describe("file handling", function() { + var dropzone, mockFile; + mockFile = null; + dropzone = null; + beforeEach(function() { + var element; + mockFile = getMockFile(); + element = Dropzone.createElement("
"); + return dropzone = new Dropzone(element, { + url: "/the/url" + }); + }); + afterEach(function() { + return dropzone.destroy(); + }); + describe("addFile()", function() { + it("should properly set the status of the file", function() { + var doneFunction; + doneFunction = null; + dropzone.accept = function(file, done) { + return doneFunction = done; + }; + dropzone.processFile = function() {}; + dropzone.uploadFile = function() {}; + dropzone.addFile(mockFile); + mockFile.status.should.eql(Dropzone.ADDED); + doneFunction(); + mockFile.status.should.eql(Dropzone.QUEUED); + mockFile = getMockFile(); + dropzone.addFile(mockFile); + mockFile.status.should.eql(Dropzone.ADDED); + doneFunction("error"); + return mockFile.status.should.eql(Dropzone.ERROR); + }); + it("should properly set the status of the file if autoProcessQueue is false and not call processQueue", function(done) { + var doneFunction; + doneFunction = null; + dropzone.options.autoProcessQueue = false; + dropzone.accept = function(file, done) { + return doneFunction = done; + }; + dropzone.processFile = function() {}; + dropzone.uploadFile = function() {}; + dropzone.addFile(mockFile); + sinon.stub(dropzone, "processQueue"); + mockFile.status.should.eql(Dropzone.ADDED); + doneFunction(); + mockFile.status.should.eql(Dropzone.QUEUED); + dropzone.processQueue.callCount.should.equal(0); + return setTimeout((function() { + dropzone.processQueue.callCount.should.equal(0); + return done(); + }), 10); + }); + it("should not add the file to the queue if autoQueue is false", function() { + var doneFunction; + doneFunction = null; + dropzone.options.autoQueue = false; + dropzone.accept = function(file, done) { + return doneFunction = done; + }; + dropzone.processFile = function() {}; + dropzone.uploadFile = function() {}; + dropzone.addFile(mockFile); + mockFile.status.should.eql(Dropzone.ADDED); + doneFunction(); + return mockFile.status.should.eql(Dropzone.ADDED); + }); + it("should create a remove link if configured to do so", function() { + dropzone.options.addRemoveLinks = true; + dropzone.processFile = function() {}; + dropzone.uploadFile = function() {}; + sinon.stub(dropzone, "processQueue"); + dropzone.addFile(mockFile); + return dropzone.files[0].previewElement.querySelector("a[data-dz-remove].dz-remove").should.be.ok; + }); + it("should attach an event handler to data-dz-remove links", function() { + var event, file, removeLink1, removeLink2; + dropzone.options.previewTemplate = "
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
"; + sinon.stub(dropzone, "processQueue"); + dropzone.addFile(mockFile); + file = dropzone.files[0]; + removeLink1 = file.previewElement.querySelector("a[data-dz-remove].link1"); + removeLink2 = file.previewElement.querySelector("a[data-dz-remove].link2"); + sinon.stub(dropzone, "removeFile"); + event = document.createEvent("HTMLEvents"); + event.initEvent("click", true, true); + removeLink1.dispatchEvent(event); + dropzone.removeFile.callCount.should.eql(1); + event = document.createEvent("HTMLEvents"); + event.initEvent("click", true, true); + removeLink2.dispatchEvent(event); + return dropzone.removeFile.callCount.should.eql(2); + }); + return describe("thumbnails", function() { + it("should properly queue the thumbnail creation", function(done) { + var ct_callback, ct_file, doneFunction, mock1, mock2, mock3; + doneFunction = null; + dropzone.accept = function(file, done) { + return doneFunction = done; + }; + dropzone.processFile = function() {}; + dropzone.uploadFile = function() {}; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock1.type = "image/jpg"; + mock2.type = "image/jpg"; + mock3.type = "image/jpg"; + dropzone.on("thumbnail", function() { + return console.log("HII"); + }); + ct_file = ct_callback = null; + dropzone.createThumbnail = function(file, callback) { + ct_file = file; + return ct_callback = callback; + }; + sinon.spy(dropzone, "createThumbnail"); + dropzone.addFile(mock1); + dropzone.addFile(mock2); + dropzone.addFile(mock3); + dropzone.files.length.should.eql(3); + return setTimeout((function() { + dropzone.createThumbnail.callCount.should.eql(1); + mock1.should.equal(ct_file); + ct_callback(); + dropzone.createThumbnail.callCount.should.eql(2); + mock2.should.equal(ct_file); + ct_callback(); + dropzone.createThumbnail.callCount.should.eql(3); + mock3.should.equal(ct_file); + return done(); + }), 10); + }); + return describe("when file is SVG", function() { + return it("should use the SVG image itself", function(done) { + var blob, createBlob; + createBlob = function(data, type) { + var BlobBuilder, builder, e; + try { + return new Blob([data], { + type: type + }); + } catch (_error) { + e = _error; + BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder; + builder = new BlobBuilder(); + builder.append(data.buffer || data); + return builder.getBlob(type); + } + }; + blob = createBlob('foo', 'image/svg+xml'); + dropzone.on("thumbnail", function(file, dataURI) { + var fileReader; + file.should.equal(blob); + fileReader = new FileReader; + fileReader.onload = function() { + fileReader.result.should.equal(dataURI); + return done(); + }; + return fileReader.readAsDataURL(file); + }); + return dropzone.createThumbnail(blob); + }); + }); + }); + }); + describe("enqueueFile()", function() { + it("should be wrapped by enqueueFiles()", function() { + var mock1, mock2, mock3; + sinon.stub(dropzone, "enqueueFile"); + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + dropzone.enqueueFiles([mock1, mock2, mock3]); + dropzone.enqueueFile.callCount.should.equal(3); + dropzone.enqueueFile.args[0][0].should.equal(mock1); + dropzone.enqueueFile.args[1][0].should.equal(mock2); + return dropzone.enqueueFile.args[2][0].should.equal(mock3); + }); + it("should fail if the file has already been processed", function() { + mockFile.status = Dropzone.ERROR; + expect((function() { + return dropzone.enqueueFile(mockFile); + })).to["throw"]("This file can't be queued because it has already been processed or was rejected."); + mockFile.status = Dropzone.COMPLETE; + expect((function() { + return dropzone.enqueueFile(mockFile); + })).to["throw"]("This file can't be queued because it has already been processed or was rejected."); + mockFile.status = Dropzone.UPLOADING; + return expect((function() { + return dropzone.enqueueFile(mockFile); + })).to["throw"]("This file can't be queued because it has already been processed or was rejected."); + }); + return it("should set the status to QUEUED and call processQueue asynchronously if everything's ok", function(done) { + mockFile.status = Dropzone.ADDED; + sinon.stub(dropzone, "processQueue"); + dropzone.processQueue.callCount.should.equal(0); + dropzone.enqueueFile(mockFile); + mockFile.status.should.equal(Dropzone.QUEUED); + dropzone.processQueue.callCount.should.equal(0); + return setTimeout(function() { + dropzone.processQueue.callCount.should.equal(1); + return done(); + }, 10); + }); + }); + describe("uploadFiles()", function() { + var requests; + requests = null; + beforeEach(function() { + requests = []; + return xhr.onCreate = function(xhr) { + return requests.push(xhr); + }; + }); + afterEach(function() { + return xhr.restore(); + }); + it("should be wrapped by uploadFile()", function() { + sinon.stub(dropzone, "uploadFiles"); + dropzone.uploadFile(mockFile); + dropzone.uploadFiles.callCount.should.equal(1); + return dropzone.uploadFiles.calledWith([mockFile]).should.be.ok; + }); + it("should use url options if strings", function(done) { + dropzone.addFile(mockFile); + return setTimeout(function() { + expect(requests.length).to.equal(1); + expect(requests[0].url).to.equal(dropzone.options.url); + expect(requests[0].method).to.equal(dropzone.options.method); + return done(); + }, 10); + }); + it("should call url options if functions", function(done) { + var method, url; + method = "PUT"; + url = "/custom/upload/url"; + dropzone.options.method = sinon.stub().returns(method); + dropzone.options.url = sinon.stub().returns(url); + dropzone.addFile(mockFile); + return setTimeout(function() { + dropzone.options.method.callCount.should.equal(1); + dropzone.options.url.callCount.should.equal(1); + sinon.assert.calledWith(dropzone.options.method, [mockFile]); + sinon.assert.calledWith(dropzone.options.url, [mockFile]); + expect(requests.length).to.equal(1); + expect(requests[0].url).to.equal(url); + expect(requests[0].method).to.equal(method); + return done(); + }, 10); + }); + it("should ignore the onreadystate callback if readyState != 4", function(done) { + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.eql(Dropzone.UPLOADING); + requests[0].status = 200; + requests[0].readyState = 3; + requests[0].onload(); + mockFile.status.should.eql(Dropzone.UPLOADING); + requests[0].readyState = 4; + requests[0].onload(); + mockFile.status.should.eql(Dropzone.SUCCESS); + return done(); + }, 10); + }); + it("should emit error and errormultiple when response was not OK", function(done) { + var complete, completemultiple, error, errormultiple; + dropzone.options.uploadMultiple = true; + error = false; + errormultiple = false; + complete = false; + completemultiple = false; + dropzone.on("error", function() { + return error = true; + }); + dropzone.on("errormultiple", function() { + return errormultiple = true; + }); + dropzone.on("complete", function() { + return complete = true; + }); + dropzone.on("completemultiple", function() { + return completemultiple = true; + }); + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.eql(Dropzone.UPLOADING); + requests[0].status = 400; + requests[0].readyState = 4; + requests[0].onload(); + expect((((true === error && error === errormultiple) && errormultiple === complete) && complete === completemultiple)).to.be.ok; + return done(); + }, 10); + }); + it("should include hidden files in the form and unchecked checkboxes and radiobuttons should be excluded", function(done) { + var element, formData, mock1; + element = Dropzone.createElement("
\n \n \n \n \n \n \n
"); + dropzone = new Dropzone(element, { + url: "/the/url" + }); + formData = null; + dropzone.on("sending", function(file, xhr, tformData) { + formData = tformData; + return sinon.spy(tformData, "append"); + }); + mock1 = getMockFile(); + dropzone.addFile(mock1); + return setTimeout(function() { + formData.append.callCount.should.equal(5); + formData.append.args[0][0].should.eql("test"); + formData.append.args[0][1].should.eql("hidden"); + formData.append.args[1][0].should.eql("checked"); + formData.append.args[1][1].should.eql("value1"); + formData.append.args[2][0].should.eql("radio1"); + formData.append.args[2][1].should.eql("radiovalue2"); + formData.append.args[3][0].should.eql("select"); + formData.append.args[3][1].should.eql("2"); + formData.append.args[4][0].should.eql("file"); + formData.append.args[4][1].should.equal(mock1); + return done(); + }, 10); + }); + it("should all values of a select that has the multiple attribute", function(done) { + var element, formData, mock1; + element = Dropzone.createElement("
\n \n
"); + dropzone = new Dropzone(element, { + url: "/the/url" + }); + formData = null; + dropzone.on("sending", function(file, xhr, tformData) { + formData = tformData; + return sinon.spy(tformData, "append"); + }); + mock1 = getMockFile(); + dropzone.addFile(mock1); + return setTimeout(function() { + formData.append.callCount.should.equal(3); + formData.append.args[0][0].should.eql("select"); + formData.append.args[0][1].should.eql("value2"); + formData.append.args[1][0].should.eql("select"); + formData.append.args[1][1].should.eql("value4"); + formData.append.args[2][0].should.eql("file"); + formData.append.args[2][1].should.equal(mock1); + return done(); + }, 10); + }); + describe("settings()", function() { + it("should correctly set `withCredentials` on the xhr object", function() { + dropzone.uploadFile(mockFile); + requests.length.should.eql(1); + requests[0].withCredentials.should.eql(false); + dropzone.options.withCredentials = true; + dropzone.uploadFile(mockFile); + requests.length.should.eql(2); + return requests[1].withCredentials.should.eql(true); + }); + it("should correctly override headers on the xhr object", function() { + dropzone.options.headers = { + "Foo-Header": "foobar" + }; + dropzone.uploadFile(mockFile); + return requests[0].requestHeaders["Foo-Header"].should.eql('foobar'); + }); + it("should not set headers on the xhr object that are empty", function() { + dropzone.options.headers = { + "X-Requested-With": null + }; + dropzone.uploadFile(mockFile); + return Object.keys(requests[0].requestHeaders).should.not.contain("X-Requested-With"); + }); + it("should properly use the paramName without [n] as file upload if uploadMultiple is false", function(done) { + var formData, mock1, mock2, sendingCount; + dropzone.options.uploadMultiple = false; + dropzone.options.paramName = "myName"; + formData = []; + sendingCount = 0; + dropzone.on("sending", function(files, xhr, tformData) { + sendingCount++; + formData.push(tformData); + return sinon.spy(tformData, "append"); + }); + mock1 = getMockFile(); + mock2 = getMockFile(); + dropzone.addFile(mock1); + dropzone.addFile(mock2); + return setTimeout(function() { + sendingCount.should.equal(2); + formData.length.should.equal(2); + formData[0].append.callCount.should.equal(1); + formData[1].append.callCount.should.equal(1); + formData[0].append.args[0][0].should.eql("myName"); + formData[0].append.args[0][0].should.eql("myName"); + return done(); + }, 10); + }); + return it("should properly use the paramName with [n] as file upload if uploadMultiple is true", function(done) { + var formData, mock1, mock2, sendingCount, sendingMultipleCount; + dropzone.options.uploadMultiple = true; + dropzone.options.paramName = "myName"; + formData = null; + sendingMultipleCount = 0; + sendingCount = 0; + dropzone.on("sending", function(file, xhr, tformData) { + return sendingCount++; + }); + dropzone.on("sendingmultiple", function(files, xhr, tformData) { + sendingMultipleCount++; + formData = tformData; + return sinon.spy(tformData, "append"); + }); + mock1 = getMockFile(); + mock2 = getMockFile(); + dropzone.addFile(mock1); + dropzone.addFile(mock2); + return setTimeout(function() { + sendingCount.should.equal(2); + sendingMultipleCount.should.equal(1); + dropzone.uploadFiles([mock1, mock2]); + formData.append.callCount.should.equal(2); + formData.append.args[0][0].should.eql("myName[0]"); + formData.append.args[1][0].should.eql("myName[1]"); + return done(); + }, 10); + }); + }); + it("should not change the file name if the options.renameFilename is not set", function(done) { + var mockFilename, renamedFilename; + mockFilename = 'T3sT ;:_-.,!¨@&%&'; + renamedFilename = dropzone._renameFilename(mockFilename); + return setTimeout(function() { + renamedFilename.should.equal(mockFilename); + return done(); + }, 10); + }); + it("should rename the file name if options.renamedFilename is set", function(done) { + var renamedFilename; + dropzone.options.renameFilename = function(name) { + return name.toLowerCase().replace(/[^\w]/gi, ''); + }; + renamedFilename = dropzone._renameFilename('T3sT ;:_-.,!¨@&%&'); + return setTimeout(function() { + renamedFilename.should.equal('t3st_'); + return done(); + }, 10); + }); + return describe("should properly set status of file", function() { + return it("should correctly set `withCredentials` on the xhr object", function(done) { + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.eql(Dropzone.UPLOADING); + requests.length.should.equal(1); + requests[0].status = 400; + requests[0].readyState = 4; + requests[0].onload(); + mockFile.status.should.eql(Dropzone.ERROR); + mockFile = getMockFile(); + dropzone.addFile(mockFile); + return setTimeout(function() { + mockFile.status.should.eql(Dropzone.UPLOADING); + requests.length.should.equal(2); + requests[1].status = 200; + requests[1].readyState = 4; + requests[1].onload(); + mockFile.status.should.eql(Dropzone.SUCCESS); + return done(); + }, 10); + }, 10); + }); + }); + }); + return describe("complete file", function() { + return it("should properly emit the queuecomplete event when the complete queue is finished", function(done) { + var completedFiles, mock1, mock2, mock3; + mock1 = getMockFile(); + mock2 = getMockFile(); + mock3 = getMockFile(); + mock1.status = Dropzone.ADDED; + mock2.status = Dropzone.ADDED; + mock3.status = Dropzone.ADDED; + mock1.name = "mock1"; + mock2.name = "mock2"; + mock3.name = "mock3"; + dropzone.uploadFiles = function(files) { + return setTimeout(((function(_this) { + return function() { + return _this._finished(files, null, null); + }; + })(this)), 1); + }; + completedFiles = 0; + dropzone.on("complete", function(file) { + return completedFiles++; + }); + dropzone.on("queuecomplete", function() { + completedFiles.should.equal(3); + return done(); + }); + dropzone.addFile(mock1); + dropzone.addFile(mock2); + return dropzone.addFile(mock3); + }); + }); + }); + }); + +}).call(this); From 8adc847109ee9f3d791e89a196d7aaf864ff8ebe Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 18:27:59 -0600 Subject: [PATCH 17/20] set contenta sync dir --- web/sites/default/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 773022702..e3b94e694 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -29,7 +29,7 @@ // what the sync dir should be during normal usage. $drush_args = drush_get_arguments(); if (!empty($drush_args[0]) && 'site-install' === $drush_args[0]) { - unset($config_directories[CONFIG_SYNC_DIRECTORY]); + $config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync'; } /** From efa149aba2e89a7ca40ccbaf58079fbb50be33cb Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 19:50:46 -0600 Subject: [PATCH 18/20] set contenta sync dir --- web/sites/default/settings.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index e3b94e694..e75156fcc 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -27,11 +27,14 @@ // sync dir accordingly. @todo, I hope to think of a better option. // Contenta install will fail if the sync dir is set to `/config`. But that is // what the sync dir should be during normal usage. -$drush_args = drush_get_arguments(); -if (!empty($drush_args[0]) && 'site-install' === $drush_args[0]) { +if (function_exists('drush_get_arguments')) { + $drush_args = drush_get_arguments(); + if (!empty($drush_args[0]) && 'site-install' === $drush_args[0]) { $config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync'; + } } + /** * If there is a local settings file, then include it */ From 574b796ebc2d23f5f89c6b00bf2ee245118c42fb Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Tue, 9 Jan 2018 21:17:23 -0600 Subject: [PATCH 19/20] Remove scenario that won't pass with Contenta --- tests/features/content.feature | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/features/content.feature b/tests/features/content.feature index b59664255..e77a811fa 100644 --- a/tests/features/content.feature +++ b/tests/features/content.feature @@ -84,18 +84,3 @@ Feature: Content Then I should see "Tag one" And I should see "Tag two" - @api - Scenario: Create nodes with specific authorship - Given users: - | name | mail | status | - | Joe User | joe@example.com | 1 | - And "article" content: - | title | author | promote | - | Article by Joe | Joe User | 1 | - When I am logged in as a user with the "administrator" role - And I am on the homepage - Then I should see the link "Article by Joe" - When I follow "Article by Joe" - Then I should see the text "Article by Joe" - # Todo: The node is created by 'Anonymous', but it should be created by 'Joe User' - # And I should see the link "Joe User" From ff3c985b34325c33d944cd668f1dc7cee7210bf9 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Wed, 17 Jan 2018 14:36:48 -0600 Subject: [PATCH 20/20] going back to old install hack --- web/sites/default/settings.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 887ef2c22..0d42f6e6b 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -24,16 +24,23 @@ ); -// This is a silly way to detect if site install is happening and toggle the -// sync dir accordingly. @todo, I hope to think of a better option. -// Contenta install will fail if the sync dir is set to `/config`. But that is -// what the sync dir should be during normal usage. -if (function_exists('drush_get_arguments')) { - $drush_args = drush_get_arguments(); - if (!empty($drush_args[0]) && 'site-install' === $drush_args[0]) { - $config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync'; + +// Check to see if we are serving an installer page from the web server. +$is_installer_url = (strpos($_SERVER['SCRIPT_NAME'], '/core/install.php') === 0); +// Also check to see if we are calling the installer from a cli (e.g. Drush) +if (php_sapi_name() == 'cli') { + global $install_state; + if (isset(($install_state))) { + $is_installer_url = true; } } +if ($is_installer_url && !file_exists($config_directories[CONFIG_SYNC_DIRECTORY] . '/system.site.yml')) { + // Contenta configuration: + // Ideally, we keep our config export in ../config, but it needs to + // be here at first so that installation will work. + // TODO: Better strategy going forward for this. + $config_directories[CONFIG_SYNC_DIRECTORY] = 'profiles/contrib/contenta_jsonapi/config/sync'; +} /** * If there is a local settings file, then include it