diff --git a/.gitignore b/.gitignore index 9ca9becdb..d07ffc1dd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,11 @@ report.txt demosaved.csv src/assets/css/tainacan-embeds.css src/assets/css/tainacan-embeds.css.map +src/assets/css/tainacan-reports.css +src/assets/css/tainacan-reports.css.map .DS_Store src/.DS_Store src/assets/css/tainacan-gutenberg-block-dynamic-items-list.css src/assets/css/tainacan-gutenberg-block-dynamic-items-list.css.map +tests/wordpress-test +tests/wordpress-tests-lib diff --git a/.travis.yml b/.travis.yml index 1d45456cc..b08104189 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ sudo: true language: php php: -- 7.1 +#- 8.0 - 7.2 +- 7.1 - 5.6 matrix: allow_failures: @@ -32,7 +33,7 @@ install: - sudo mv ./tests/bootstrap-config-sample.php ./tests/bootstrap-config.php - sudo ./tests/bin/install-wp-tests.sh test travis "" /tmp/wordpress localhost latest true -- composer install +- if [[ $TRAVIS_PHP_VERSION = 7.1 || $TRAVIS_PHP_VERSION = 5.6 ]]; then composer install --ignore-platform-reqs; else composer install; fi - sudo mkdir /tmp/wordpress/wordpress-test/wp-content/uploads - sudo chmod -R 777 /tmp/wordpress/wordpress-test/wp-content/uploads - sudo wget https://phar.phpunit.de/phpunit-6.5.7.phar -P /tmp diff --git a/README.md b/README.md index e4b4950ac..841f8822f 100644 --- a/README.md +++ b/README.md @@ -20,17 +20,23 @@ Tainacan is a software solution for building, managing and publishing digital re ### Features -**Easy installation**. As a WordPress plugin, Tainacan can be easily installed on and integrated to an existing WordPress website. +#### Easy install +- As a WordPress plugin, Tainacan can be easily installed on and integrated to an existing WordPress website. -**Metadata and filters**. Use a metadata standard or choose whatever set of metadata you want to describe the items in your collections. You can choose which metadata will be used as a filter when browsing the collection. +#### Metadata and filters +- Use standard metadata or choose whatever set of metadata you want to describe the items in your collections. You can choose which metadata will be used as a filter when browsing the collection. -**Faceted search**. Browse your collection (and let the public browse it) using a faceted search interface with the filters you have chosen. +#### Faceted search +- Browse (and let the public browse it) your collection using a faceted search interface with filters you have chosen. -**Manage taxonomies**. Manage vocabularies that can be used accross all your collections. +#### Manage taxonomies +- Manage vocabularies that can be used accross all your collections. -**Themes**. Tainacan [has its own default theme](https://wordpress.org/themes/tainacan-interface/), which helps you present your collections in a beautiful and effective way as it is developed to incorporate all of Tainacan functionalities. However, it will also work with any WordPress theme. For developers, it will be easy to add Tainacan specific features to an existing theme. +#### Themes +- Tainacan [has its own default theme](https://wordpress.org/themes/tainacan-interface/), which helps you present your collections in a beautiful and effective way as it is developed to incorporate all of Tainacan functionalities. However, it will also work with any WordPress theme. For developers, it will be easy to add Tainacan specific features to an existing theme. -**API and interoperability**. Tainacan implements a RESTful API (read and write) to allow other applications to interact with your repository. Expose you collection in different formats, such as JSON, JSON-LD and OAI-PMH. If your collection uses a custom standard, you can map it to well-known stardards such as DublinCore. +#### API and interoperability +- Tainacan implements a RESTful API (read and write) to allow other applications to interact with your repository. Expose you collection in different formats, such as JSON, JSON-LD and OAI-PMH. If your collection uses a custom standard, you can map it to well-known stardards such as DublinCore. ### Showcases diff --git a/bootstrap-config-sample.php b/bootstrap-config-sample.php index cfb8a21bf..665eeac28 100644 --- a/bootstrap-config-sample.php +++ b/bootstrap-config-sample.php @@ -3,5 +3,3 @@ return [ 'tests_dir' => '/tmp/wordpress-tests-lib', ]; - - ?> \ No newline at end of file diff --git a/build-watch.sh b/build-watch.sh index 0c17fdcb5..c1e355644 100755 --- a/build-watch.sh +++ b/build-watch.sh @@ -1,12 +1,11 @@ #!/bin/bash -## Run the build script whenever there is a change in src folder - +## Runs build script whenever there is a change in src folder echo 'Watching changes on src/' current_OS=`uname` -# For macOS (Darwin) is needed fsevents-tools installed (you can use homebrew install fsevents-tools) +# For macOS (Darwin), you can install fsevents-tools via Homebrew: `brew install fsevents-tools` if [ $current_OS == "Darwin" ]; then echo notifyloop src ./build.sh diff --git a/build.sh b/build.sh index 0217b9435..ccd25386e 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,6 @@ #!/bin/bash +# Loads user-defined variables at build-config file source build-config.cfg ## Only run npm build if there was a change in a .js or .vue file @@ -18,7 +19,7 @@ if [ $current_OS == "Darwin" ]; then find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5 {} \; | sort -k 2 | md5 > last-package-build.md5 else find src *.js -type f \( -name "*.js" -or -name "*.vue" -or -name "webpack.common.js" -or -name "webpack.dev.js" -or -name "webpack.prod.js" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-js-build.md5 - find ./src/views/admin/scss/ ./src/views/gutenberg-blocks ./src/views/gutenberg-blocks/tainacan-collections/collections-list ./src/views/gutenberg-blocks/tainacan-facets/facets-list ./src/views/gutenberg-blocks/tainacan-items/dynamic-items-list ./src/views/gutenberg-blocks/tainacan-items/items-list ./src/views/gutenberg-blocks/tainacan-terms/terms-list -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5 + find ./src/views/admin/scss/ ./src/views/roles/ ./src/views/media-component/ ./src/views/reports/ ./src/views/gutenberg-blocks ./src/views/gutenberg-blocks/tainacan-collections/collections-list ./src/views/gutenberg-blocks/tainacan-facets/facets-list ./src/views/gutenberg-blocks/tainacan-items/dynamic-items-list ./src/views/gutenberg-blocks/tainacan-items/items-list ./src/views/gutenberg-blocks/tainacan-terms/terms-list -type f \( -name "*.scss" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-sass-build.md5 find ./composer.json -type f \( -name "composer.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-composer-build.md5 find ./package.json -type f \( -name "package.json" -or -name "package-lock.json" \) -exec md5sum {} \; | sort -k 2 | md5sum > last-package-build.md5 fi diff --git a/compile-sass.sh b/compile-sass.sh index cdfdc2787..88be95d24 100644 --- a/compile-sass.sh +++ b/compile-sass.sh @@ -2,42 +2,45 @@ # Executa o comando 'sass' para verificar se existe (veja http://stackoverflow.com/a/677212/329911) command -v sass >/dev/null 2>&1 || { - echo >&2 "SASS parece não está disponivel."; + echo >&2 "Sass parece não estar disponivel."; exit 1; } - -# Define o caminho. + echo "Compilando Sass..." sass -E 'UTF-8' --cache-location .tmp/sass-cache-1 src/views/admin/scss/tainacan-admin.scss:src/assets/css/tainacan-admin.css sass -E 'UTF-8' --cache-location .tmp/sass-cache-2 src/views/roles/tainacan-roles.scss:src/assets/css/tainacan-roles.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-3 src/views/gutenberg-blocks/tainacan-collections/collections-list/collections-list.scss:src/assets/css/tainacan-gutenberg-block-collections-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-3 src/views/reports/tainacan-reports.scss:src/assets/css/tainacan-reports.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-4 src/views/gutenberg-blocks/tainacan-collections/carousel-collections-list/carousel-collections-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-4 src/views/media-component/media-component.scss:src/assets/css/media-component.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-5 src/views/gutenberg-blocks/tainacan-items/items-list/items-list.scss:src/assets/css/tainacan-gutenberg-block-items-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-5 src/views/gutenberg-blocks/tainacan-collections/collections-list/collections-list.scss:src/assets/css/tainacan-gutenberg-block-collections-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-6 src/views/gutenberg-blocks/tainacan-items/dynamic-items-list/dynamic-items-list.scss:src/assets/css/tainacan-gutenberg-block-dynamic-items-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-6 src/views/gutenberg-blocks/tainacan-collections/carousel-collections-list/carousel-collections-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-7 src/views/gutenberg-blocks/tainacan-items/search-bar/search-bar.scss:src/assets/css/tainacan-gutenberg-block-search-bar.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-7 src/views/gutenberg-blocks/tainacan-items/items-list/items-list.scss:src/assets/css/tainacan-gutenberg-block-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-8 src/views/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-8 src/views/gutenberg-blocks/tainacan-items/dynamic-items-list/dynamic-items-list.scss:src/assets/css/tainacan-gutenberg-block-dynamic-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-9 src/views/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-9 src/views/gutenberg-blocks/tainacan-items/search-bar/search-bar.scss:src/assets/css/tainacan-gutenberg-block-search-bar.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-10 src/views/gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss:src/assets/css/tainacan-gutenberg-block-terms-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-10 src/views/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-11 src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list.scss:src/assets/css/tainacan-gutenberg-block-facets-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-12 src/views/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-12 src/views/gutenberg-blocks/tainacan-terms/carousel-terms-list/carousel-terms-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-terms-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-12 src/views/gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss:src/assets/css/tainacan-gutenberg-block-terms-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-13 src/views/gutenberg-blocks/tainacan-facets/faceted-search/faceted-search.scss:src/assets/css/tainacan-gutenberg-block-faceted-search.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-13 src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list.scss:src/assets/css/tainacan-gutenberg-block-facets-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-14 src/views/gutenberg-blocks/tainacan-items/item-submission-form/item-submission-form.scss:src/assets/css/tainacan-gutenberg-block-item-submission-form.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-14 src/views/gutenberg-blocks/tainacan-terms/carousel-terms-list/carousel-terms-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-terms-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-15 src/views/gutenberg-blocks/gutenberg-blocks-style.scss:src/assets/css/tainacan-gutenberg-block-common-styles.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-15 src/views/gutenberg-blocks/tainacan-facets/faceted-search/faceted-search.scss:src/assets/css/tainacan-gutenberg-block-faceted-search.css + +sass -E 'UTF-8' --cache-location .tmp/sass-cache-16 src/views/gutenberg-blocks/tainacan-items/item-submission-form/item-submission-form.scss:src/assets/css/tainacan-gutenberg-block-item-submission-form.css + +sass -E 'UTF-8' --cache-location .tmp/sass-cache-17 src/views/gutenberg-blocks/gutenberg-blocks-style.scss:src/assets/css/tainacan-gutenberg-block-common-styles.css echo "Compilação do Sass Concluído!" exit 0 diff --git a/composer.json b/composer.json index d03574e01..b0615d74a 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,24 @@ { - "name": "medialabufg/tainacan", + "name": "tainacan/tainacan", "description": "Transforme seu site wordpress em um repositório digital.", "type": "wordpress-plugin", "require": { "respect/validation": "^1.1", - "smalot/pdfparser": "*" + "smalot/pdfparser": "*", + "kornrunner/blurhash": "^1.1" }, "require-dev": { "squizlabs/php_codesniffer": "^2.2 || ^3.0.2", - "wimg/php-compatibility": "*" + "phpcompatibility/php-compatibility": "*" }, "prefer-stable" : true, "minimum-stability": "dev", "config": { - "vendor-dir": "src/vendor" + "vendor-dir": "src/vendor", + "platform-check": false }, "scripts": { - "post-install-cmd": "\"src/vendor/bin/phpcs\" --config-set installed_paths src/vendor/wimg/php-compatibility", - "post-update-cmd" : "\"src/vendor/bin/phpcs\" --config-set installed_paths src/vendor/wimg/php-compatibility" + "post-install-cmd": "\"src/vendor/bin/phpcs\" --config-set installed_paths src/vendor/phpcompatibility/php-compatibility", + "post-update-cmd" : "\"src/vendor/bin/phpcs\" --config-set installed_paths src/vendor/phpcompatibility/php-compatibility" } } diff --git a/composer.lock b/composer.lock index 55daf5138..375b61091 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,51 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e2a614836d1857e45c4f9be57073c2b2", + "content-hash": "8eb9217097c6d62dba6409b24f81c0ad", "packages": [ + { + "name": "kornrunner/blurhash", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/kornrunner/php-blurhash.git", + "reference": "5a09325353229c108c8d2ff129ec08b447753f9b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kornrunner/php-blurhash/zipball/5a09325353229c108c8d2ff129ec08b447753f9b", + "reference": "5a09325353229c108c8d2ff129ec08b447753f9b", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "ocramius/package-versions": "<1.5", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^8.2", + "vimeo/psalm": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "kornrunner\\Blurhash\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Boris Momčilović", + "email": "boris.momcilovic@gmail.com" + } + ], + "description": "Pure PHP implementation of Blurhash", + "homepage": "https://github.com/kornrunner/php-blurhash", + "time": "2020-04-15T22:06:04+00:00" + }, { "name": "respect/validation", "version": "1.1.31", @@ -71,26 +114,26 @@ }, { "name": "smalot/pdfparser", - "version": "v0.14.0", + "version": "v0.18.1", "source": { "type": "git", "url": "https://github.com/smalot/pdfparser.git", - "reference": "ec72a99028ba5e21a0acad92047b85e128cbf81f" + "reference": "b47f26425e32a814dc1ee55e3ce669b9e73b8458" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smalot/pdfparser/zipball/ec72a99028ba5e21a0acad92047b85e128cbf81f", - "reference": "ec72a99028ba5e21a0acad92047b85e128cbf81f", + "url": "https://api.github.com/repos/smalot/pdfparser/zipball/b47f26425e32a814dc1ee55e3ce669b9e73b8458", + "reference": "b47f26425e32a814dc1ee55e3ce669b9e73b8458", "shasum": "" }, "require": { - "ext-mbstring": "*", "ext-zlib": "*", - "php": ">=5.3.0", - "tecnickcom/tcpdf": "~6.0" + "php": ">=5.6", + "symfony/polyfill-mbstring": "^1.18" }, "require-dev": { - "atoum/atoum": "^2.8 | ^3.0" + "friendsofphp/php-cs-fixer": "^2.16", + "symfony/phpunit-bridge": "^5.2" }, "type": "library", "autoload": { @@ -104,12 +147,12 @@ ], "authors": [ { - "name": "Sebastien Malot", + "name": "Sebastien MALOT", "email": "sebastien@malot.fr" } ], "description": "Pdf parser library. Can read and extract information from pdf file.", - "homepage": "http://www.pdfparser.org", + "homepage": "https://www.pdfparser.org", "keywords": [ "extract", "parse", @@ -117,24 +160,24 @@ "pdf", "text" ], - "time": "2019-01-23T09:14:37+00:00" + "time": "2021-01-05T08:52:07+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.12.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", + "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -142,7 +185,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -176,135 +223,39 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" - }, - { - "name": "tecnickcom/tcpdf", - "version": "6.2.26", - "source": { - "type": "git", - "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "367241059ca166e3a76490f4448c284e0a161f15" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/367241059ca166e3a76490f4448c284e0a161f15", - "reference": "367241059ca166e3a76490f4448c284e0a161f15", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ + "funding": [ { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "role": "lead" + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" } ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "http://www.tcpdf.org/", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "time": "2018-10-16T17:24:05+00:00" + "time": "2020-10-23T14:02:19+00:00" } ], "packages-dev": [ { - "name": "squizlabs/php_codesniffer", - "version": "3.4.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8", - "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2019-04-10T23:49:02+00:00" - }, - { - "name": "wimg/php-compatibility", - "version": "9.3.1", + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196" + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196", - "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", "shasum": "" }, "require": { @@ -349,8 +300,58 @@ "phpcs", "standards" ], - "abandoned": "phpcompatibility/php-compatibility", - "time": "2019-09-05T18:36:49+00:00" + "time": "2019-12-27T09:44:58+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.5.8", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2020-10-23T02:01:07+00:00" } ], "aliases": [], @@ -359,5 +360,6 @@ "prefer-stable": true, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.0.0" } diff --git a/package-lock.json b/package-lock.json index d7672c623..78fc06528 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1665,6 +1665,19 @@ } } }, + "apexcharts": { + "version": "3.26.3", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.26.3.tgz", + "integrity": "sha512-zbP7RBBV2CGffoVMIuTCUG64YbEUzV8IIT7iNVLMtY/OAVXTjPksDxSqKIniTvgJoscKe6sx4P56qDpBSU19VA==", + "requires": { + "svg.draggable.js": "^2.2.2", + "svg.easing.js": "^2.0.0", + "svg.filter.js": "^2.0.2", + "svg.pathmorphing.js": "^0.1.3", + "svg.resize.js": "^1.4.3", + "svg.select.js": "^3.0.1" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -2145,6 +2158,11 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, + "blurhash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/blurhash/-/blurhash-1.1.3.tgz", + "integrity": "sha512-yUhPJvXexbqbyijCIE/T2NCXcj9iNPhWmOKbPTuR/cm7Q5snXYIfnVnz6m7MWOXxODMz/Cr3UcVkRdHiuDVRDw==" + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -2367,11 +2385,11 @@ } }, "buefy": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.4.tgz", - "integrity": "sha512-LRSIYVNrKTPQhmNRegASkntX+ObtZ7aSSA/3cybDKXzGtPNy8g8cl2tp79Rl8/LBVH/KkRT5rmmzJ21nxz9IcQ==", + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.7.tgz", + "integrity": "sha512-Fli0ZjNDgtFtHm0LItWmfhNJ1oLjDwPzUWccvwXXoo2mADXaH8JQxyhY+drUuUV5/GMu5PtwqQSqPgZy942VZg==", "requires": { - "bulma": "0.9.1" + "bulma": "0.9.2" } }, "buffer": { @@ -2410,9 +2428,9 @@ "dev": true }, "bulma": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.1.tgz", - "integrity": "sha512-LSF69OumXg2HSKl2+rN0/OEXJy7WFEb681wtBlNS/ulJYR27J3rORHibdXZ6GVb/vyUzzYK/Arjyh56wjbFedA==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.2.tgz", + "integrity": "sha512-e14EF+3VSZ488yL/lJH0tR8mFWiEQVCMi/BQUMi2TGMBOk+zrDg4wryuwm/+dRSHJw0gMawp2tsW7X1JYUCE3A==" }, "bytes": { "version": "3.0.0", @@ -2987,6 +3005,11 @@ } } }, + "countup.js": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.0.7.tgz", + "integrity": "sha512-FO0nQdvG1iQwHp28wdvkErxnNUSbdkzztqZ6YNHKLHydngD2tdiKEW8dFrqpahF3tj+Ma70h0vyYrCBzxlVWdg==" + }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -3508,18 +3531,32 @@ "dev": true }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + } } }, "emoji-regex": { @@ -3687,9 +3724,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "ms": { @@ -5434,9 +5471,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, "hpack.js": { "version": "2.1.6", @@ -5755,9 +5792,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", - "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { @@ -5814,9 +5851,9 @@ "dev": true }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "string-width": { @@ -6422,9 +6459,15 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true }, "loglevel": { "version": "1.6.8", @@ -6799,6 +6842,15 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz", "integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg==" }, + "moment-locales-webpack-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.2.0.tgz", + "integrity": "sha512-QAi5v0OlPUP7GXviKMtxnpBAo8WmTHrUNN7iciAhNOEAd9evCOvuN0g1N7ThIg3q11GLCkjY1zQ2saRcf/43nQ==", + "dev": true, + "requires": { + "lodash.difference": "^4.5.0" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -6890,9 +6942,9 @@ "dev": true }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", "dev": true }, "node-gyp": { @@ -7534,6 +7586,11 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "photoswipe": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-4.1.3.tgz", + "integrity": "sha512-89Z43IRUyw7ycTolo+AaiDn3W1EEIfox54hERmm9bI12IB9cvRfHSHez3XhAyU8XW2EAFrC+2sKMhh7SJwn0bA==" + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -8238,9 +8295,9 @@ "dev": true }, "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "randombytes": { @@ -8410,8 +8467,7 @@ "regenerator-runtime": { "version": "0.13.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==" }, "regenerator-transform": { "version": "0.14.4", @@ -8855,12 +8911,12 @@ "dev": true }, "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", + "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", "dev": true, "requires": { - "node-forge": "0.9.0" + "node-forge": "^0.10.0" } }, "semver": { @@ -9465,9 +9521,9 @@ "integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==" }, "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -9978,6 +10034,70 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, + "svg.draggable.js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", + "integrity": "sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==", + "requires": { + "svg.js": "^2.0.1" + } + }, + "svg.easing.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/svg.easing.js/-/svg.easing.js-2.0.0.tgz", + "integrity": "sha1-iqmUawqOJ4V6XEChDrpAkeVpHxI=", + "requires": { + "svg.js": ">=2.3.x" + } + }, + "svg.filter.js": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/svg.filter.js/-/svg.filter.js-2.0.2.tgz", + "integrity": "sha1-kQCOFROJ3ZIwd5/L5uLJo2LRwgM=", + "requires": { + "svg.js": "^2.2.5" + } + }, + "svg.js": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz", + "integrity": "sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==" + }, + "svg.pathmorphing.js": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz", + "integrity": "sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==", + "requires": { + "svg.js": "^2.4.0" + } + }, + "svg.resize.js": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/svg.resize.js/-/svg.resize.js-1.4.3.tgz", + "integrity": "sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==", + "requires": { + "svg.js": "^2.6.5", + "svg.select.js": "^2.1.2" + }, + "dependencies": { + "svg.select.js": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-2.1.2.tgz", + "integrity": "sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==", + "requires": { + "svg.js": "^2.2.5" + } + } + } + }, + "svg.select.js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-3.0.1.tgz", + "integrity": "sha512-h5IS/hKkuVCbKSieR9uQCj9w+zLHoPh+ce19bBYyqF53g6mnPB8sAtIbe1s9dh2S2fCmYX2xel1Ln3PJBbK4kw==", + "requires": { + "svg.js": "^2.6.5" + } + }, "swiper": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz", @@ -10017,9 +10137,9 @@ "dev": true }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "string-width": { @@ -10602,9 +10722,9 @@ } }, "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", "dev": true, "requires": { "querystringify": "^2.1.1", @@ -10643,13 +10763,29 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "v-tooltip": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.3.tgz", - "integrity": "sha512-KZZY3s+dcijzZmV2qoDH4rYmjMZ9YKGBVoUznZKQX0e3c2GjpJm3Sldzz8HHH2Ud87JqhZPB4+4gyKZ6m98cKQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.1.3.tgz", + "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==", "requires": { - "lodash": "^4.17.15", - "popper.js": "^1.16.0", - "vue-resize": "^0.4.5" + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "popper.js": "^1.16.1", + "vue-resize": "^1.0.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + } } }, "v8-compile-cache": { @@ -10694,11 +10830,26 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz", "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" }, + "vue-apexcharts": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/vue-apexcharts/-/vue-apexcharts-1.6.1.tgz", + "integrity": "sha512-ILn3/55IvZQUgsc7+jKDjPfHfGUlcUQi/lDrLjRe5g7gfjj99o8otXoHwMeib3CBHYdQXNG9foe1vzv7RdUzXA==" + }, "vue-awesome-swiper": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz", "integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ==" }, + "vue-blurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/vue-blurhash/-/vue-blurhash-0.1.4.tgz", + "integrity": "sha512-B76GgfHXHkdmYgAfI2rZl3BgCMD9OxAgn4Jw2Ro0a8ZoAKa6gqTWUrTo5EGXOftm/EKuMYi1Cc+UcAvV0jnoRw==" + }, + "vue-countup-v2": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vue-countup-v2/-/vue-countup-v2-4.0.0.tgz", + "integrity": "sha512-XjKeHo1ndRlJtXvHd6B1eWOpbrJDdNU3rdYZwVPv2YlUXbvthsBT4kms5Fc/mn9RdXPrMX2H/ktAAQtKjWFisw==" + }, "vue-eslint-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", @@ -10766,9 +10917,22 @@ "integrity": "sha512-viecHQiHVLez7HlYUQsv1wJb2MT/RDSzkDp6m3In41vPrk6OsBmT2qRE8LZqYIA4daIwrnx/Xm8h4fjOpuE3hw==" }, "vue-resize": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.5.tgz", - "integrity": "sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", + "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==", + "requires": { + "@babel/runtime": "^7.13.10" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } }, "vue-router": { "version": "3.1.6", @@ -10934,15 +11098,6 @@ "stream-each": "^1.1.0", "through2": "^2.0.0" } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } } } }, @@ -11028,6 +11183,15 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -11915,9 +12079,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index 1e6fec6c9..494b57d20 100644 --- a/package.json +++ b/package.json @@ -8,21 +8,28 @@ "build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details --progress --hide-modules" }, "dependencies": { + "apexcharts": "^3.26.3", + "countup.js": "^2.0.7", "axios": "^0.21.1", - "buefy": "^0.9.4", - "bulma": "^0.9.1", + "blurhash": "^1.1.3", + "buefy": "^0.9.7", + "bulma": "^0.9.2", "css-vars-ponyfill": "^2.3.1", "mdi": "^2.2.43", "moment": "^2.25.3", "node-sass": "^4.14.1", + "photoswipe": "^4.1.3", "qs": "^6.9.4", "react": "^16.13.1", "react-dom": "^16.13.1", "swiper": "^5.2.0", "t": "^0.5.1", - "v-tooltip": "^2.0.3", + "v-tooltip": "^2.1.3", "vue": "^2.6.11", + "vue-apexcharts": "^1.6.1", "vue-awesome-swiper": "^4.1.1", + "vue-blurhash": "^0.1.4", + "vue-countup-v2": "^4.0.0", "vue-masonry-css": "^1.0.3", "vue-router": "^3.1.6", "vue-the-mask": "^0.11.1", @@ -42,6 +49,7 @@ "eslint-loader": "^2.2.1", "eslint-plugin-vue": "^5.2.3", "file-loader": "^2.0.0", + "moment-locales-webpack-plugin": "^1.2.0", "postcss-loader": "^3.0.0", "sass-loader": "^7.3.1", "style-loader": "^0.23.1", diff --git a/run-tests.sh b/run-tests.sh index c02426ef5..18164401d 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1,4 +1,4 @@ #!/bin/bash -echo "Running unit tests in PHPUnit..." +echo "Running all unit tests [PHPUnit] ..." phpunit diff --git a/src/assets/css/media-component.css b/src/assets/css/media-component.css new file mode 100644 index 000000000..f2b015783 --- /dev/null +++ b/src/assets/css/media-component.css @@ -0,0 +1,945 @@ +/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + Styles for basic PhotoSwipe functionality (sliding area, open/close transitions) +*/ +/* pswp = photoswipe */ +.pswp { + display: none; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + overflow: hidden; + -ms-touch-action: none; + touch-action: none; + z-index: 9999999; + -webkit-text-size-adjust: 100%; + /* create separate layer, to avoid paint on window.onscroll in webkit/blink */ + -webkit-backface-visibility: hidden; + outline: none; } + .pswp * { + box-sizing: border-box; } + .pswp img { + max-width: none; } + +/* style is added when JS option showHideOpacity is set to true */ +.pswp--animate_opacity { + /* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */ + opacity: 0.001; + will-change: opacity; + /* for open/close transition */ + transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp--open { + display: block; } + +.pswp--zoom-allowed .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; } + +.pswp--zoomed-in .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; } + +.pswp--dragging .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; } + +/* + Background is added as a separate element. + As animating opacity is much faster than animating rgba() background-color. +*/ +.pswp__bg { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + opacity: 0; + transform: translateZ(0); + -webkit-backface-visibility: hidden; + will-change: opacity; } + +.pswp__scroll-wrap { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; } + +.pswp__container, +.pswp__zoom-wrap { + -ms-touch-action: none; + touch-action: none; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; } + +/* Prevent selection and tap highlights */ +.pswp__container, +.pswp__img { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-touch-callout: none; } + +.pswp__zoom-wrap { + position: absolute; + width: 100%; + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + transform-origin: left top; + /* for open/close transition */ + transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp__bg { + will-change: opacity; + /* for open/close transition */ + transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp--animated-in .pswp__bg, +.pswp--animated-in .pswp__zoom-wrap { + -webkit-transition: none; + transition: none; } + +.pswp__container, +.pswp__zoom-wrap { + -webkit-backface-visibility: hidden; } + +.pswp__item { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; } + +.pswp__img { + position: absolute; + width: auto; + height: auto; + top: 0; + left: 0; } + +/* + stretched thumbnail or div placeholder element (see below) + style is added to avoid flickering in webkit/blink when layers overlap +*/ +.pswp__img--placeholder { + -webkit-backface-visibility: hidden; } + +/* + div element that matches size of large image + large image loads on top of it +*/ +.pswp__img--placeholder--blank { + background: #222; } + +.pswp--ie .pswp__img { + width: 100% !important; + height: auto !important; + left: 0; + top: 0; } + +/* + Error message appears when image is not loaded + (JS option errorMsg controls markup) +*/ +.pswp__error-msg { + position: absolute; + left: 0; + top: 50%; + width: 100%; + text-align: center; + font-size: 14px; + line-height: 16px; + margin-top: -8px; + color: #CCC; } + +.pswp__error-msg a { + color: #CCC; + text-decoration: underline; } + +/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + + Contents: + + 1. Buttons + 2. Share modal and links + 3. Index indicator ("1 of X" counter) + 4. Caption + 5. Loading indicator + 6. Additional styles (root element, top bar, idle state, hidden state, etc.) + +*/ +/* + + 1. Buttons + + */ +/* + + + + + + +
+
+
+
+
+
+
+ + +
+
+
+ + + + + +
+
+
+ + + + +is_post_an_item($post)) - return null; - - $item = new Entities\Item($post); - - return $item; - + return \Tainacan\Theme_Helper::get_instance()->tainacan_get_item($post_id); } /** @@ -468,17 +818,19 @@ function tainacan_get_item($post_id = 0) { * @param string|integer The property to be checked. If a string is passed, it will check against * one of the native property of the item, such as title, description and creation_date. * If an integer is passed, it will check against the IDs of the metadata. + * + * @param int|string $item_id (Optional) The item ID. Default is the global $post * * @return bool */ -function tainacan_current_view_displays($property) { +function tainacan_current_view_displays($property, $item_id = 0) { global $view_mode_displayed_metadata; // Core metadata appear in fetch_only as metadata if ($property == 'title' || $property == 'description') { - $item = tainacan_get_item(); + $item = tainacan_get_item($item_id); $core_getter_method = "get_core_{$property}_metadatum"; - $property = $item->get_collection()->$core_getter_method()->get_id(); + $property = $item->get_collection()->$core_getter_method()->get_id(); } if (is_string($property)) { @@ -562,3 +914,86 @@ function tainacan_get_initials($string, $one = false) { $result = strtoupper($first . $second); return apply_filters('tainacan-get-initials', $result, $string, $one); } + +/** + * Gets the icon mime type using our custom plugin thumbnails + * + * @param string $mime_type The mime_type or type of the file + * @param string $image_size The image size + * + * @return string + */ +function tainacan_get_the_mime_type_icon($mime_type, $image_size = 'medium') { + global $TAINACAN_BASE_URL; + $images_path = $TAINACAN_BASE_URL . '/assets/images/'; + + $icon_file = ''; + + switch($image_size) { + case 'full': + case 'large': + case 'tainacan-large-full': + $image_size = ''; + break; + case 'small': + case 'tainacan-small': + case 'thumbnail': + $image_size = '_small'; + break; + case '': + case 'medium': + case 'tainacan-medium': + case 'tainacan-medium-full': + case 'medium_large': + default: + $image_size = '_medium'; + } + + switch($mime_type) { + case 'image': + case 'image/png': + case 'image/jpeg': + case 'image/gif': + case 'image/bmp': + case 'image/webp': + case 'image/svg+xml': + $icon_file = 'placeholder_image'; + break; + case 'audio': + case 'audio/midi': + case 'audio/mpeg': + case 'audio/mp3': + case 'audio/webm': + case 'audio/ogg': + case 'audio/wav': + $icon_file = 'placeholder_audio'; + break; + case 'text': + case 'text/plain': + case 'text/html': + case 'text/css': + case 'text/javascript': + case 'text/csv': + $icon_file = 'placeholder_text'; + break; + case 'video': + case 'video/webm': + case 'video/ogg': + case 'video/mpeg': + case 'video/mp4': + $icon_file = 'placeholder_video'; + break; + case 'url': + $icon_file = 'placeholder_url'; + break; + case 'application/pdf': + $icon_file = 'placeholder_pdf'; + break; + case 'attachment': + case 'empty': + default: + $icon_file = 'placeholder_attachment'; + } + + return $images_path . $icon_file . $image_size . '.png'; +} diff --git a/src/classes/traits/class-tainacan-entity-collection-relation.php b/src/classes/traits/class-tainacan-entity-collection-relation.php index 572800f02..a36628de6 100644 --- a/src/classes/traits/class-tainacan-entity-collection-relation.php +++ b/src/classes/traits/class-tainacan-entity-collection-relation.php @@ -36,6 +36,19 @@ trait Entity_Collection_Relation { if($this->collection instanceof Entities\Collection){ return $this->collection; } + } else { + $post = get_post($this->get_id()); + if (!$post || !$post->post_type) + return null; + $post_type = $post->post_type; + $matches = array(); + $regex = '/' . Collection::$db_identifier_prefix . '([a-zA-Z0-9_]*)' . Collection::$db_identifier_sufix . '/'; + preg_match($regex, $post_type, $matches); + $collection_id = $matches[1]; + if (is_numeric($collection_id)) { + $this->set_collection_id($collection_id); + return $this->get_collection(); + } } return null; diff --git a/src/readme.txt b/src/readme.txt index b8cccfaef..aa5d375a4 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -1,10 +1,10 @@ === Tainacan === -Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros, tainacan +Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros, tainacan, r-guimaraes, suelanesilva, ccaio, alanargomes, ateneagarcia123, rodrigo0freire, clarandreozzi Tags: museums, libraries, archives, GLAM, collections, repository -Requires at least: 4.8 +Requires at least: 5.0 Tested up to: 5.6 Requires PHP: 5.6 -Stable tag: 0.17.4 +Stable tag: 0.18 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html diff --git a/src/tainacan.php b/src/tainacan.php index 3dd583fad..3d1d0ef07 100644 --- a/src/tainacan.php +++ b/src/tainacan.php @@ -2,15 +2,15 @@ /* Plugin Name: Tainacan Plugin URI: https://tainacan.org/ -Description: Open source, powerfull and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional respository platform. +Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform. Author: Tainacan.org -Version: 0.17.4 +Version: 0.18 Text Domain: tainacan License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html */ -const TAINACAN_VERSION = '0.17.4'; +const TAINACAN_VERSION = '0.18'; defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); $TAINACAN_BASE_URL = plugins_url('', __FILE__); diff --git a/src/views/admin/admin.vue b/src/views/admin/admin.vue index b5d446c6c..0a504c205 100644 --- a/src/views/admin/admin.vue +++ b/src/views/admin/admin.vue @@ -20,15 +20,16 @@ @click="isMenuCompressed = !isMenuCompressed"> - + @@ -99,7 +100,8 @@ hideCancel: true }, ariaRole: 'alertdialog', - ariaModal: true + ariaModal: true, + customClass: 'tainacan-modal' }); } }); diff --git a/src/views/admin/components/edition/collection-edition-form.vue b/src/views/admin/components/edition/collection-edition-form.vue index 4034e3401..8eee48549 100644 --- a/src/views/admin/components/edition/collection-edition-form.vue +++ b/src/views/admin/components/edition/collection-edition-form.vue @@ -4,6 +4,7 @@ :class="{'repository-level-page' : isNewCollection }"> +
{{ $i18n.get('label_empty_thumbnail') }} + :src="$thumbHelper.getEmptyThumbnailPlaceholder()">
  - + + :label="$i18n.getHelperTitle('collections', 'allow_comments')">   { - resp.request.then((collections) => { - this.collections = collections; - this.isFetchingCollections = false; - }) - .catch((error) => { - this.$console.error(error); - this.isFetchingCollections = false; - }); - }) - .catch(() => { - this.isFetchingCollections = false; - }); + // DISABLED IN 0.18 AS WE DISCUSS BETTER IMPLEMENTATION FOR COLLECTIONS HIERARCHY + // this.isFetchingCollections = true; + // this.fetchAllCollectionNames() + // .then((resp) => { + // resp.request.then((collections) => { + // this.collections = collections; + // this.isFetchingCollections = false; + // }) + // .catch((error) => { + // this.$console.error(error); + // this.isFetchingCollections = false; + // }); + // }) + // .catch(() => { + // this.isFetchingCollections = false; + // }); this.isLoading = false; }); @@ -949,22 +951,23 @@ export default { this.form.status = 'publish'; // Generates options for parent collection - this.isFetchingCollections = true; - this.fetchAllCollectionNames() - .then((resp) => { - resp.request.then((collections) => { - this.collections = collections; - this.isFetchingCollections = false; - }) - .catch((error) => { - this.$console.error(error); - this.isFetchingCollections = false; - }); - }) - .catch((error) => { - this.$console.error(error); - this.isFetchingCollections = false; - }); + // DISABLED IN 0.18 AS WE DISCUSS BETTER IMPLEMENTATION FOR COLLECTIONS HIERARCHY + // this.isFetchingCollections = true; + // this.fetchAllCollectionNames() + // .then((resp) => { + // resp.request.then((collections) => { + // this.collections = collections; + // this.isFetchingCollections = false; + // }) + // .catch((error) => { + // this.$console.error(error); + // this.isFetchingCollections = false; + // }); + // }) + // .catch((error) => { + // this.$console.error(error); + // this.isFetchingCollections = false; + // }); this.isLoading = false; diff --git a/src/views/admin/components/edition/filter-edition-form.vue b/src/views/admin/components/edition/filter-edition-form.vue index ee962a6d1..837fc229a 100644 --- a/src/views/admin/components/edition/filter-edition-form.vue +++ b/src/views/admin/components/edition/filter-edition-form.vue @@ -72,7 +72,7 @@ - {{ $i18n.get('publish_visibility') }} + {{ $i18n.get('status_public') }}
- {{ $i18n.get('private_visibility') }} + {{ $i18n.get('status_private') }}
diff --git a/src/views/admin/components/edition/importer-edition-form.vue b/src/views/admin/components/edition/importer-edition-form.vue index 2fcd5417b..a58c30e73 100644 --- a/src/views/admin/components/edition/importer-edition-form.vue +++ b/src/views/admin/components/edition/importer-edition-form.vue @@ -167,8 +167,8 @@ (importer.accepts.file && importer.accepts.url && !importerFile && !url)" id="button-submit-importer-creation" @click.prevent="onFinishImporter()" - :class="{'is-loading': isLoadingRun }" - class="button is-success">{{ $i18n.get('run') }} + :class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }" + class="button">{{ $i18n.get('run') }}
{{ $i18n.get('next') }} + :class="{ 'is-loading': isLoadingUpload, 'is-success': !isLoadingUpload }" + class="button">{{ $i18n.get('next') }}
@@ -500,7 +500,7 @@ export default { margin: 12px 0 6px 0; } - .modal .animation-content { + .tainacan-modal .animation-content { width: 100%; z-index: 99999; diff --git a/src/views/admin/components/edition/importer-mapping-form.vue b/src/views/admin/components/edition/importer-mapping-form.vue index 514917566..a415f47a2 100644 --- a/src/views/admin/components/edition/importer-mapping-form.vue +++ b/src/views/admin/components/edition/importer-mapping-form.vue @@ -37,7 +37,6 @@

{{ $i18n.get('info_metadata_mapping_helper') }}


- +
+ + + + {{ $i18n.get('label_set_all_create_metadada') }} + + + + + + {{ $i18n.get('label_add_more_metadata') }} +
@@ -183,7 +202,8 @@ :active.sync="isNewMetadatumModalActive" trap-focus aria-modal - aria-role="dialog"> + aria-role="dialog" + custom-class="tainacan-modal">
- - - - - {{ $i18n.get('label_add_more_metadata') }}
{{ $i18n.get('run') }} + :class="{ 'is-loading': isLoadingRun, 'is-success': !isLoadingRun }" + class="button">{{ $i18n.get('run') }}
@@ -293,7 +304,8 @@ autofocus role="dialog" tabindex="-1" - aria-modal> + aria-modal + custom-class="tainacan-modal">

{{ $i18n.get('instruction_select_title_mapping') }}

@@ -404,7 +416,7 @@ export default { metadataSearchCancel: undefined, showTitlePromptModal: false, selectedTitle: undefined, - formErrorMessage: '' + formErrorMessage: '', } }, computed: { @@ -785,6 +797,12 @@ export default { this.showTitlePromptModal = false; this.onRunImporter(); + }, + createAllMetadata() { + this.mappedCollection['mapping'] = {}; + this.importerSourceInfo.source_metadata.forEach((metadatum, index) => { + this.mappedCollection['mapping']['create_metadata'+ index] = metadatum; + }); } } } @@ -911,6 +929,7 @@ export default { } .mapping-header { + width: 100%; display: flex; justify-content: space-between; align-items: center; @@ -939,7 +958,7 @@ export default { } } - .modal .animation-content { + .tainacan-modal .animation-content { width: 100%; z-index: 99999; diff --git a/src/views/admin/components/edition/item-bulk-edition-form.vue b/src/views/admin/components/edition/item-bulk-edition-form.vue index 2cf43ed11..d7e0fa2b7 100644 --- a/src/views/admin/components/edition/item-bulk-edition-form.vue +++ b/src/views/admin/components/edition/item-bulk-edition-form.vue @@ -86,10 +86,10 @@ v-for="(item, index) of uploadedItems" :key="item.id"> + :src="$thumbHelper.getSrc(item['thumbnail'], 'tainacan-small', item.document_mimetype)" > @@ -197,7 +197,6 @@ export default { isLoading: false, isCreatingSequenceEditGroup: false, submitedFileList: [], - thumbPlaceholderPath: tainacan_plugin.base_url + '/assets/images/placeholder_square.png', uploadedItems: [], amountFinished: 0 } @@ -331,7 +330,8 @@ export default { collectionId: this.collectionId }, width: 'calc(100% - (2 * var(--tainacan-one-column)))', - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, deleteOneItem(itemId, index) { @@ -352,7 +352,8 @@ export default { }); } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, } diff --git a/src/views/admin/components/edition/item-edition-form.vue b/src/views/admin/components/edition/item-edition-form.vue index 760d54471..26b8f44d5 100644 --- a/src/views/admin/components/edition/item-edition-form.vue +++ b/src/views/admin/components/edition/item-edition-form.vue @@ -217,7 +217,8 @@ scroll="keep" trap-focus aria-modal - aria-role="dialog"> + aria-role="dialog" + custom-class="tainacan-modal">

{{ $i18n.get('instruction_write_text') }}

@@ -258,7 +259,8 @@ role="dialog" tabindex="-1" aria-modal - aria-role="dialog"> + aria-role="dialog" + custom-class="tainacan-modal">

{{ $i18n.get('instruction_insert_url') }}

@@ -305,17 +307,21 @@ :size="178" :file="{ media_type: 'image', - thumbnails: { 'tainacan-medium': [ item.thumbnail['tainacan-medium'] ? item.thumbnail['tainacan-medium'][0] : item.thumbnail.medium[0] ] }, + thumbnails: { 'tainacan-medium': [ $thumbHelper.getSrc(item['thumbnail'], 'tainacan-medium', item.document_mimetype) ] }, title: $i18n.get('label_thumbnail'), - description: `` + $i18n.get(` + description: `` + $i18n.get(` }"/>
- {{ $i18n.get('label_empty_thumbnail') }} + + {{ $i18n.get('label_empty_thumbnail') }} + + :src="$thumbHelper.getEmptyThumbnailPlaceholder(item.document_mimetype)">
- {{ $i18n.get('publish_visibility') }} + {{ $i18n.get('status_public') }} - {{ $i18n.get('private_visibility') }} + {{ $i18n.get('status_private') }}
@@ -835,7 +841,6 @@ export default { }, thumbnail: {}, formErrorMessage: '', - thumbPlaceholderPath: tainacan_plugin.base_url + '/assets/images/placeholder_square.png', thumbnailMediaFrame: undefined, attachmentMediaFrame: undefined, fileMediaFrame: undefined, @@ -988,7 +993,8 @@ export default { next(); }, }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); } else { next() @@ -1229,6 +1235,7 @@ export default { this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type }) .then(item => { this.item.document_as_html = item.document_as_html; + this.item.document_mimetype = item.document_mimetype; this.isLoading = false; }) .catch((errors) => { @@ -1260,6 +1267,7 @@ export default { this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type }) .then(item => { this.item.document_as_html = item.document_as_html; + this.item.document_mimetype = item.document_mimetype; this.isLoading = false; let oldThumbnail = this.item.thumbnail; @@ -1295,6 +1303,7 @@ export default { document_type: this.form.document_type }) .then(() => { + this.item.document_mimetype = 'empty'; this.isLoadingAttachments = true; this.fetchAttachments({ page: 1, @@ -1356,7 +1365,8 @@ export default { }); } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, @@ -1378,6 +1388,7 @@ export default { .then((item) => { this.isLoading = false; this.item.document_as_html = item.document_as_html; + this.item.document_mimetype = item.document_mimetype; let oldThumbnail = this.item.thumbnail; if (item.document_type == 'attachment' && oldThumbnail != item.thumbnail ) @@ -1477,7 +1488,8 @@ export default { this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId)) } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, loadExistingItem() { diff --git a/src/views/admin/components/edition/metadatum-edition-form.vue b/src/views/admin/components/edition/metadatum-edition-form.vue index 76c15d251..ac85bf85b 100644 --- a/src/views/admin/components/edition/metadatum-edition-form.vue +++ b/src/views/admin/components/edition/metadatum-edition-form.vue @@ -89,7 +89,7 @@ - {{ $i18n.get('publish_visibility') }} + {{ $i18n.get('status_public') }} @@ -102,7 +102,7 @@ - {{ $i18n.get('private_visibility') }} + {{ $i18n.get('status_private') }} @@ -316,8 +316,8 @@ if (this.closedByForm) { this.editedMetadatum.saved = true; } else { - this.oldForm.saved = this.editForm.saved; - if (JSON.stringify(this.editForm) != JSON.stringify(this.oldForm)) + this.$set(this.oldForm, 'saved', this.editForm.saved); + if (!_.isEqual(this.editForm, this.oldForm)) this.editedMetadatum.saved = false; else this.editedMetadatum.saved = true; @@ -341,7 +341,8 @@ metadatumId: metadatum.id, isRepositoryLevel: this.isRepositoryLevel, index: this.index, - options: this.editForm + options: this.editForm, + includeOptionsAsHtml: true }) .then(() => { this.editForm = {}; @@ -380,7 +381,8 @@ metadatumId: metadatum.id, isRepositoryLevel: this.isRepositoryLevel, index: this.index, - options: formObj + options: formObj, + includeOptionsAsHtml: true }) .then(() => { this.editForm = {}; diff --git a/src/views/admin/components/edition/taxonomy-edition-form.vue b/src/views/admin/components/edition/taxonomy-edition-form.vue index 67f2dfa6b..d3a9e8803 100644 --- a/src/views/admin/components/edition/taxonomy-edition-form.vue +++ b/src/views/admin/components/edition/taxonomy-edition-form.vue @@ -193,10 +193,10 @@

+ class="button">{{ $i18n.get('save') }}
@@ -299,7 +299,8 @@ next(); } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); } else if (this.isEditingTerm) { this.$buefy.modal.open({ @@ -313,7 +314,8 @@ next(); } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); } else { next(); diff --git a/src/views/admin/components/edition/term-edition-form.vue b/src/views/admin/components/edition/term-edition-form.vue index 5c53f36e5..805f16c19 100644 --- a/src/views/admin/components/edition/term-edition-form.vue +++ b/src/views/admin/components/edition/term-edition-form.vue @@ -74,7 +74,7 @@ class="image-placeholder">{{ $i18n.get('label_empty_term_image') }} + :src="(editForm.header_image === undefined || editForm.header_image === false) ? $thumbHelper.getEmptyThumbnailPlaceholder() : editForm.header_image">
{ this.updateSelectedValues(); - this.$emit('updateParentCollapse', res.data.values.length > 0 ); + + if (res && res.data && res.data.values) + this.$emit('updateParentCollapse', res.data.values.length > 0 ); }) .catch( (error) => { if (isCancel(error)) { @@ -133,7 +135,6 @@ }); }, updateSelectedValues() { - if ( !this.query || !this.query.metaquery || !Array.isArray( this.query.metaquery ) ) return false; @@ -180,7 +181,8 @@ this.loadOptions(); } }, - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, } @@ -191,7 +193,7 @@ .view-all-button { - font-size: 0.75em; + font-size: 0.75em !important; padding: 0.1em 1em; } diff --git a/src/views/admin/components/filter-types/date/Date.vue b/src/views/admin/components/filter-types/date/Date.vue index a1ee40320..ac1d849c3 100644 --- a/src/views/admin/components/filter-types/date/Date.vue +++ b/src/views/admin/components/filter-types/date/Date.vue @@ -63,6 +63,8 @@ v-if="filterTypeOptions.type == 'year'" :placeholder="$i18n.get('instruction_type_value_year')" :aria-labelledby="'filter-label-id-' + filter.id" + :aria-minus-label="$i18n.get('label_decrease')" + :aria-plus-label="$i18n.get('label_increase')" size="is-small" step="1" @input="emitOnlyYear($event)" diff --git a/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue b/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue index 33de83638..2c9e1b2a5 100644 --- a/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue +++ b/src/views/admin/components/filter-types/numeric-interval/NumericInterval.vue @@ -2,6 +2,8 @@
{ this.updateSelectedValues(); - - this.$emit('updateParentCollapse', res.data.values.length > 0 ); + + if (res && res.data && res.data.values) + this.$emit('updateParentCollapse', res.data.values.length > 0 ); }) .catch( error => { if (isCancel(error)) diff --git a/src/views/admin/components/filter-types/taginput/Taginput.vue b/src/views/admin/components/filter-types/taginput/Taginput.vue index 5f970c83b..a528bb875 100644 --- a/src/views/admin/components/filter-types/taginput/Taginput.vue +++ b/src/views/admin/components/filter-types/taginput/Taginput.vue @@ -157,7 +157,7 @@ let metadata = this.query.metaquery[ index ]; if (this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship') { - let query = qs.stringify({ postin: metadata.value, fetch_only: 'title,thumbnail', fetch_only_meta: '' }); + let query = qs.stringify({ postin: metadata.value, fetch_only: 'title,thumbnail,document_mimetype', fetch_only_meta: '' }); let endpoint = '/items/'; if (this.relatedCollectionId != '') @@ -173,7 +173,7 @@ this.selected.push({ label: item.title, value: item.id, - img: item.thumbnail && item.thumbnail.thumbnail && item.thumbnail.thumbnail[0] ? item.thumbnail.thumbnail[0] : null + img: item.thumbnail ? this.$thumbHelper.getSrc(item['thumbnail'], 'tainacan-small', item.document_mimetype) : null }); } } diff --git a/src/views/admin/components/filter-types/tainacan-filter-item.vue b/src/views/admin/components/filter-types/tainacan-filter-item.vue index dfd5d3605..b85227d8e 100644 --- a/src/views/admin/components/filter-types/tainacan-filter-item.vue +++ b/src/views/admin/components/filter-types/tainacan-filter-item.vue @@ -95,16 +95,20 @@ &:not(:last-child) { margin-bottom: 0; - padding-bottom: 0.75em; + padding-bottom: 0.25em; } .collapse-trigger { margin-left: -7px; + button { + background-color: inherit !important; + color: inherit !important; + } .icon { margin-right: 5px; } .collapse-label { - display: inline-block; + display: inline; width: 100%; overflow-x: hidden; text-overflow: ellipsis; @@ -128,6 +132,7 @@ align-items: center; border: none; background-color: transparent; + color: var(--tainacan-label-color); text-align: left; cursor: pointer; outline: none; diff --git a/src/views/admin/components/filter-types/taxonomy/Checkbox.vue b/src/views/admin/components/filter-types/taxonomy/Checkbox.vue index 5cfcb35be..2464af055 100644 --- a/src/views/admin/components/filter-types/taxonomy/Checkbox.vue +++ b/src/views/admin/components/filter-types/taxonomy/Checkbox.vue @@ -180,10 +180,11 @@ }); promise.request .then((res) => { - this.prepareOptionsForTaxonomy(res.data.values ? res.data.values : res.data); this.isLoadingOptions = false; - - this.$emit('updateParentCollapse', res.data.values.length > 0 ); + this.prepareOptionsForTaxonomy(res.data.values ? res.data.values : res.data); + + if (res && res.data && res.data.values) + this.$emit('updateParentCollapse', res.data.values.length > 0 ); }) .catch( error => { if (isCancel(error)) { @@ -279,7 +280,6 @@ // }); } } - this.$emit('sendValuesToTags', { label: onlyLabels, taxonomy: this.taxonomy, value: this.selected }); }, onSelect() { @@ -314,7 +314,8 @@ } }, width: 'calc(100% - (4 * var(--tainacan-one-column)))', - trapFocus: true + trapFocus: true, + customClass: 'tainacan-modal' }); }, prepareOptionsForTaxonomy(items) { @@ -351,7 +352,7 @@ diff --git a/src/views/admin/components/other/metadatum-details.vue b/src/views/admin/components/other/metadatum-details.vue new file mode 100644 index 000000000..5d8e2ed93 --- /dev/null +++ b/src/views/admin/components/other/metadatum-details.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/src/views/admin/components/other/processes-popup.vue b/src/views/admin/components/other/processes-popup.vue index 0cb8f80ee..ab5182181 100644 --- a/src/views/admin/components/other/processes-popup.vue +++ b/src/views/admin/components/other/processes-popup.vue @@ -5,19 +5,21 @@ class="processes-popup-backdrop" />