Merge tag '0.21.0' into develop

release 0.21.0
This commit is contained in:
vnmedeiros 2024-04-22 13:56:26 -03:00
commit 52d52f5868
119 changed files with 1826 additions and 2299 deletions

View File

@ -61,7 +61,7 @@ Please refer to our [Developers Documentation](https://tainacan.github.io/tainac
Tainacan is a free, open-source software licensed under **GPLv3**. Contributions to the codebase will abide to the same license; other contributions may be under additional or other terms. Tainacan is a free, open-source software licensed under **GPLv3**. Contributions to the codebase will abide to the same license; other contributions may be under additional or other terms.
To contribute to our project, you can report bugs and other issues, or suggest new features. You are also free to submit pull requests or translate Tainacan to multiple languages. If you are interested in contributing, you can get started by reading our [contribution guidelines](docs/CONTRIBUTING.md). To contribute to our project, you can report bugs and other issues, or suggest new features. You are also free to submit pull requests or translate Tainacan to multiple languages. If you are interested in contributing, you can get started by reading our [contribution guidelines](https://tainacan.github.io/tainacan-wiki/#/dev/CONTRIBUTING).
### Acknowledgements ### Acknowledgements

2248
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,11 +8,11 @@
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production" "build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --progress --mode production"
}, },
"dependencies": { "dependencies": {
"@ntohq/buefy-next": "^0.1.2", "@ntohq/buefy-next": "^0.1.3",
"@vue-leaflet/vue-leaflet": "^0.10.1", "@vue-leaflet/vue-leaflet": "^0.10.1",
"another-vue3-blurhash": "^0.0.1", "another-vue3-blurhash": "^0.0.1",
"apexcharts": "^3.47.0", "apexcharts": "^3.48.0",
"axios": "^1.6.7", "axios": "^1.6.8",
"blurhash": "^2.0.5", "blurhash": "^2.0.5",
"bulma": "^0.9.4", "bulma": "^0.9.4",
"conditioner-core": "^2.3.3", "conditioner-core": "^2.3.3",
@ -31,7 +31,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"sortablejs": "^1.15.2", "sortablejs": "^1.15.2",
"sortablejs-vue3": "^1.2.11", "sortablejs-vue3": "^1.2.11",
"swiper": "^11.0.7", "swiper": "^11.1.0",
"vue": "^3.4.21", "vue": "^3.4.21",
"vue-countup-v3": "^1.4.1", "vue-countup-v3": "^1.4.1",
"vue-imask": "^7.5.0", "vue-imask": "^7.5.0",
@ -40,31 +40,31 @@
"vuex": "^4.1.0" "vuex": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.23.7", "@babel/core": "^7.24.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.23.8", "@babel/preset-env": "^7.24.3",
"@babel/preset-react": "^7.23.3", "@babel/preset-react": "^7.24.1",
"@types/leaflet": "^1.9.8", "@types/leaflet": "^1.9.8",
"@types/masonry-layout": "^4.2.7", "@types/masonry-layout": "^4.2.7",
"@vue/compiler-sfc": "3.4.15", "@vue/compiler-sfc": "3.4.21",
"acorn": "^8.11.3", "acorn": "^8.11.3",
"ajv": "^8.12.0", "ajv": "^8.12.0",
"autoprefixer": "^10.4.17", "autoprefixer": "^10.4.19",
"babel-loader": "^9.1.3", "babel-loader": "^9.1.3",
"circular-dependency-plugin": "5.2.2", "circular-dependency-plugin": "5.2.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"css-loader": "^6.9.1", "css-loader": "^6.10.0",
"eslint": "^8.56.0", "eslint": "^8.57.0",
"eslint-plugin-vue": "^9.20.1", "eslint-plugin-vue": "^9.24.0",
"eslint-webpack-plugin": "^4.0.1", "eslint-webpack-plugin": "^4.1.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"moment-locales-webpack-plugin": "^1.2.0", "moment-locales-webpack-plugin": "^1.2.0",
"postcss-loader": "7.3.3", "postcss-loader": "8.1.1",
"sass-loader": "^13.3.2", "sass-loader": "^13.3.2",
"style-loader": "^3.3.4", "style-loader": "^3.3.4",
"terser-webpack-plugin": "5.3.10", "terser-webpack-plugin": "5.3.10",
"vue-loader": "^17.4.2", "vue-loader": "^17.4.2",
"webpack": "^5.89.0", "webpack": "^5.91.0",
"webpack-bundle-analyzer": "^4.10.1", "webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4", "webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1", "webpack-dev-server": "^4.15.1",

View File

@ -1,5 +1,5 @@
/** /**
* Swiper 11.0.7 * Swiper 11.1.1
* Most modern mobile touch slider and framework with hardware accelerated transitions * Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com * https://swiperjs.com
* *
@ -7,7 +7,7 @@
* *
* Released under the MIT License * Released under the MIT License
* *
* Released on: February 27, 2024 * Released on: April 9, 2024
*/ */
@font-face { @font-face {
font-family: 'swiper-icons'; font-family: 'swiper-icons';

View File

@ -1,5 +1,5 @@
/** /**
* Swiper 11.0.7 * Swiper 11.1.1
* Most modern mobile touch slider and framework with hardware accelerated transitions * Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com * https://swiperjs.com
* *
@ -7,7 +7,7 @@
* *
* Released under the MIT License * Released under the MIT License
* *
* Released on: February 27, 2024 * Released on: April 9, 2024
*/ */
@font-face { @font-face {
font-family: 'swiper-icons'; font-family: 'swiper-icons';

View File

@ -1,5 +1,5 @@
/** /**
* Swiper 11.0.7 * Swiper 11.1.1
* Most modern mobile touch slider and framework with hardware accelerated transitions * Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com * https://swiperjs.com
* *
@ -7,7 +7,7 @@
* *
* Released under the MIT License * Released under the MIT License
* *
* Released on: February 27, 2024 * Released on: April 9, 2024
*/ */
@font-face { @font-face {
font-family: 'swiper-icons'; font-family: 'swiper-icons';

View File

@ -1,5 +1,5 @@
/** /**
* Swiper 11.0.7 * Swiper 11.1.1
* Most modern mobile touch slider and framework with hardware accelerated transitions * Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com * https://swiperjs.com
* *
@ -7,7 +7,7 @@
* *
* Released under the MIT License * Released under the MIT License
* *
* Released on: February 27, 2024 * Released on: April 9, 2024
*/ */
@font-face { @font-face {
font-family: 'swiper-icons'; font-family: 'swiper-icons';

View File

@ -104,6 +104,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
if ( ! empty( $this->data ) ) { if ( ! empty( $this->data ) ) {
global $wpdb; global $wpdb;
$wpdb->query('START TRANSACTION');
$wpdb->insert( $wpdb->insert(
$this->table, $this->table,
[ [
@ -119,6 +120,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
] ]
); );
$this->ID = $wpdb->insert_id; $this->ID = $wpdb->insert_id;
$wpdb->query('COMMIT');
} }
return $this; return $this;
@ -139,6 +141,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
if (!isset($batch->output)) { if (!isset($batch->output)) {
$batch->output = ''; $batch->output = '';
} }
$wpdb->query('START TRANSACTION');
$wpdb->update( $wpdb->update(
$this->table, $this->table,
[ [
@ -150,6 +153,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
], ],
['ID' => $key] ['ID' => $key]
); );
$wpdb->query('COMMIT');
} }
return $this; return $this;
@ -164,6 +168,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
*/ */
public function open( $key ) { public function open( $key ) {
global $wpdb; global $wpdb;
$wpdb->query('START TRANSACTION');
$wpdb->update( $wpdb->update(
$this->table, $this->table,
[ [
@ -171,6 +176,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
], ],
['ID' => $key] ['ID' => $key]
); );
$wpdb->query('COMMIT');
return $this; return $this;
} }
@ -196,12 +202,13 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
$params['progress_label'] = __('Process completed with errors','tainacan'); $params['progress_label'] = __('Process completed with errors','tainacan');
$params['progress_value'] = 100; $params['progress_value'] = 100;
} }
$wpdb->query('START TRANSACTION');
$wpdb->update( $wpdb->update(
$this->table, $this->table,
$params, $params,
['ID' => $key] ['ID' => $key]
); );
$wpdb->query('COMMIT');
return $this; return $this;
} }
@ -214,10 +221,12 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
*/ */
public function delete( $key ) { public function delete( $key ) {
global $wpdb; global $wpdb;
$wpdb->query('START TRANSACTION');
$wpdb->delete( $wpdb->delete(
$this->table, $this->table,
['ID' => $key] ['ID' => $key]
); );
$wpdb->query('COMMIT');
return $this; return $this;
} }
@ -353,7 +362,8 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
$task = $this->task( $task ); $task = $this->task( $task );
} catch (\Exception $e) { } catch (\Exception $e) {
// TODO: Add Stacktrace // TODO: Add Stacktrace
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Fatal Error: ' . $e->getMessage()]]); $this->debug('Fatal Error: ' . $e->getMessage());
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Try Fatal Error: ' . $e->getMessage()]]);
$this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Process aborted']]); $this->write_error_log($batch->key, [['datetime' => date("Y-m-d H:i:s"), 'message' => 'Process aborted']]);
$task = false; $task = false;
$close_status = 'errored'; $close_status = 'errored';
@ -398,9 +408,9 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
global $wpdb; global $wpdb;
$table = $this->table; $table = $this->table;
$wpdb->query('START TRANSACTION');
$wpdb->query( $wpdb->prepare( "DELETE FROM {$table} WHERE done = FALSE AND action LIKE %s", $this->action ) ); // @codingStandardsIgnoreLine. $wpdb->query( $wpdb->prepare( "DELETE FROM {$table} WHERE done = FALSE AND action LIKE %s", $this->action ) ); // @codingStandardsIgnoreLine.
$wpdb->query('COMMIT');
return $this; return $this;
} }

View File

@ -1184,17 +1184,26 @@ class Item extends Entity {
if ( $metadata_section->is_conditional_section() ) { if ( $metadata_section->is_conditional_section() ) {
$rules = $metadata_section->get_conditional_section_rules(); $rules = $metadata_section->get_conditional_section_rules();
if ( !empty($rules) ) { if ( !empty($rules) ) {
foreach ( $rules as $meta_id => $meta_values_conditional ) { foreach ( $rules as $meta_id => $meta_values_conditional ) {
$meta_values = []; $meta_values = [];
$metadatum = new \Tainacan\Entities\Metadatum($meta_id); $metadatum = new \Tainacan\Entities\Metadatum($meta_id);
$metadatum_type = $metadatum->get_metadata_type_object(); $metadatum_type = $metadatum->get_metadata_type_object();
if ( $metadatum_type->get_primitive_type() == 'term' ) { if ( $metadatum_type->get_primitive_type() == 'term' ) {
$item_metadata = new \Tainacan\Entities\Item_Metadata_Entity($this, $metadatum); $item_metadata = new \Tainacan\Entities\Item_Metadata_Entity($this, $metadatum);
$term_values = $metadatum->is_multiple() ? $item_metadata->get_value() : array( $item_metadata->get_value() );
if ( $metadatum->is_multiple() ) {
$term_values = $item_metadata->get_value();
$meta_values = array_map(function($term) { $meta_values = array_map(function($term) {
return $term->get_id(); return $term->get_id();
}, $term_values); }, $term_values);
} else {
$term_values = $item_metadata->get_value();
$meta_values = $term_values == false ? [] : [ $term_values->get_id() ];
}
} else { } else {
$item_id = $this->get_id(); $item_id = $this->get_id();
$meta_values = get_post_meta( $item_id, $meta_id ); $meta_values = get_post_meta( $item_id, $meta_id );

View File

@ -81,7 +81,7 @@
* @var string * @var string
* @access protected * @access protected
*/ */
protected $cron_interval; protected $cron_interval = 5;
/** /**
* Initiate new background process * Initiate new background process
@ -289,8 +289,11 @@
* @return $this * @return $this
*/ */
protected function unlock_process() { protected function unlock_process() {
$this->debug('unlocking process'); $this->debug('unlocking process: '. $this->identifier . '_process_lock');
global $wpdb;
$wpdb->query('START TRANSACTION');
delete_site_transient( $this->identifier . '_process_lock' ); delete_site_transient( $this->identifier . '_process_lock' );
$wpdb->query('COMMIT');
return $this; return $this;
} }

View File

@ -16,56 +16,6 @@ class Dublin_Core extends Mapper {
public $prefixes = [ public $prefixes = [
'dc' => 'http://purl.org/dc/elements/1.1/' 'dc' => 'http://purl.org/dc/elements/1.1/'
]; ];
public $metadata = [
'dc:contributor' => [
'label' => 'Contributor'
],
'dc:coverage' => [
'label' => 'Coverage'
],
'dc:creator' => [
'label' => 'Creator',
],
'dc:date' => [
'label' => 'Date',
'metadata_type' => 'date'
],
'dc:description' => [
'label' => 'Description',
'core_metadatum' => 'description'
],
'dc:format' => [
'label' => 'Format',
],
'dc:identifier' => [
'label' => 'Identifier'
],
'dc:language' => [
'label' => 'Language'
],
'dc:publisher' => [
'label' => 'Publisher'
],
'dc:relation' => [
'label' => 'Relation'
],
'dc:rights' => [
'label' => 'Rights'
],
'dc:source' => [
'label' => 'Source'
],
'dc:subject' => [
'label' => 'Subject'
],
'dc:title' => [
'label' => 'Title',
'core_metadatum' => 'title'
],
'dc:type' => [
'label' => 'Type'
]
];
/** XML especial case **/ /** XML especial case **/
const XML_DC_NAMESPACE = 'http://purl.org/dc/elements/1.1/'; const XML_DC_NAMESPACE = 'http://purl.org/dc/elements/1.1/';
@ -74,4 +24,75 @@ class Dublin_Core extends Mapper {
public $XML_append_root = 'rdf:Description'; public $XML_append_root = 'rdf:Description';
/** END: XML especial case **/ /** END: XML especial case **/
function __construct() {
parent::__construct();
/* Metadata should be set here to allow translable labels */
$this->metadata = [
'dc:contributor' => [
/* translators: Label for the dc:contributor field in the Dublin Core standard */
'label' => __( 'Contributor', 'tainacan')
],
'dc:coverage' => [
/* translators: Label for the dc:coverage field in the Dublin Core standard */
'label' => __( 'Coverage', 'tainacan')
],
'dc:creator' => [
/* translators: Label for the dc:creator field in the Dublin Core standard */
'label' => __( 'Creator', 'tainacan')
],
'dc:date' => [
/* translators: Label for the dc:date field in the Dublin Core standard */
'label' => __( 'Date', 'tainacan'),
'metadata_type' => 'date'
],
'dc:description' => [
/* translators: Label for the dc:description field in the Dublin Core standard */
'label' => __( 'Description', 'tainacan'),
'core_metadatum' => 'description'
],
'dc:format' => [
/* translators: Label for the dc:format field in the Dublin Core standard */
'label' => __( 'Format', 'tainacan')
],
'dc:identifier' => [
/* translators: Label for the dc:identifier field in the Dublin Core standard */
'label' => __( 'Identifier', 'tainacan')
],
'dc:language' => [
/* translators: Label for the dc:language field in the Dublin Core standard */
'label' => __( 'Language', 'tainacan')
],
'dc:publisher' => [
/* translators: Label for the dc:publisher field in the Dublin Core standard */
'label' => __( 'Publisher', 'tainacan')
],
'dc:relation' => [
/* translators: Label for the dc:relation field in the Dublin Core standard */
'label' => __( 'Relation', 'tainacan')
],
'dc:rights' => [
/* translators: Label for the dc:rights field in the Dublin Core standard */
'label' => __( 'Rights', 'tainacan')
],
'dc:source' => [
/* translators: Label for the dc:source field in the Dublin Core standard */
'label' => __( 'Source', 'tainacan')
],
'dc:subject' => [
/* translators: Label for the dc:subject field in the Dublin Core standard */
'label' => __( 'Subject', 'tainacan')
],
'dc:title' => [
/* translators: Label for the dc:title field in the Dublin Core standard */
'label' => __( 'Title', 'tainacan'),
'core_metadatum' => 'title'
],
'dc:type' => [
/* translators: Label for the dc:type field in the Dublin Core standard */
'label' => __( 'Type', 'tainacan')
]
];
}
} }

View File

@ -66,4 +66,5 @@ abstract class Mapper {
return $url; return $url;
} }
function __construct() {}
} }

View File

@ -70,8 +70,10 @@ class Item_Metadata extends Repository {
if ( $unique ) { if ( $unique ) {
$item_metadata_value = $this->sanitize_value( $item_metadata->get_value() ); $item_metadata_value = $this->sanitize_value( $item_metadata->get_value() );
if ( !is_numeric($item_metadata->get_value()) && empty( $item_metadata->get_value() ) ) { if ( !is_numeric($item_metadata->get_value()) && empty( $item_metadata->get_value() ) ) {
if ( $item_metadata->get_metadatum()->get_parent() > 0 ) if ( $item_metadata->get_metadatum()->get_parent() > 0 ) {
delete_metadata_by_mid( 'post', $item_metadata->get_meta_id() ); delete_metadata_by_mid( 'post', $item_metadata->get_meta_id() );
$this->upclean_compound_value( $item_metadata);
}
else else
delete_post_meta( $item_metadata->get_item()->get_id(), $item_metadata->get_metadatum()->get_id() ); delete_post_meta( $item_metadata->get_item()->get_id(), $item_metadata->get_metadatum()->get_id() );
} elseif ( is_int( $item_metadata->get_meta_id() ) ) { } elseif ( is_int( $item_metadata->get_meta_id() ) ) {
@ -205,7 +207,40 @@ class Item_Metadata extends Repository {
/** /**
* *
* @return null|ind the meta id of the created compound metadata * @return null|int the meta id of the update compound metadata
*/
public function upclean_compound_value(Entities\Item_Metadata_Entity $item_metadata) {
try {
if ( ! $item_metadata->get_parent_meta_id() > 0 ) return null;
$current_value = get_metadata_by_mid( 'post', $item_metadata->get_parent_meta_id() );
if ( is_object( $current_value ) ) {
$current_value = $current_value->meta_value;
}
if ( ! is_array( $current_value ) ) {
return null;
}
global $wpdb;
$meta_ids = implode(',', $current_value);
$query = $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_ID IN ($meta_ids)", $item_metadata->get_item()->get_id() );
$rows = $wpdb->get_results($query, ARRAY_A );
if ( is_array( $rows ) ) {
$upclean_values = array_map(function($row) {
return intval($row['meta_id']);
}, $rows);
update_metadata_by_mid( 'post', $item_metadata->get_parent_meta_id(), $upclean_values );
}
} catch (\Exception $e) {
error_log($e);
return null;
}
}
/**
*
* @return null|int the meta id of the created compound metadata
*/ */
public function add_compound_value( Entities\Item_Metadata_Entity $item_metadata, $meta_id ) { public function add_compound_value( Entities\Item_Metadata_Entity $item_metadata, $meta_id ) {
@ -370,6 +405,8 @@ class Item_Metadata extends Repository {
if ( empty($row['meta_value']) ) if ( empty($row['meta_value']) )
continue; continue;
$value = $this->extract_compound_value( maybe_unserialize( $row['meta_value'] ), $item_metadata->get_item(), $row['meta_id'] ); $value = $this->extract_compound_value( maybe_unserialize( $row['meta_value'] ), $item_metadata->get_item(), $row['meta_id'] );
if ( empty($value) )
continue;
if ( $unique ) { if ( $unique ) {
$return_value = $value; $return_value = $value;
break; break;

View File

@ -137,7 +137,7 @@ class Terms extends Repository {
if ( $mapped['map'] != 'termmeta' ) { if ( $mapped['map'] != 'termmeta' ) {
$get_ = 'get_' . $prop; $get_ = 'get_' . $prop;
if ( $term->WP_Term->{$mapped['map']} || if ( isset($term->WP_Term->{$mapped['map']}) ||
($mapped['map'] == 'parent' && $term->WP_Term->{$mapped['map']} >= 0) ) { ($mapped['map'] == 'parent' && $term->WP_Term->{$mapped['map']} >= 0) ) {
$args[ $mapped['map'] ] = $term->$get_(); $args[ $mapped['map'] ] = $term->$get_();

View File

@ -2,9 +2,9 @@
Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros, tainacan, suelanesilva, ccaio, alanargomes, ateneagarcia123, rodrigo0freire, clarandreozzi Contributors: andrebenedito, daltonmartins, fabianobn, jacsonp, leogermani, weryques, wetah, eduardohumberto, ravipassos, jessicafpx, marinagiolo, omarceloavila, vnmedeiros, tainacan, suelanesilva, ccaio, alanargomes, ateneagarcia123, rodrigo0freire, clarandreozzi
Tags: museums, archives, GLAM, collections, repository Tags: museums, archives, GLAM, collections, repository
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.4 Tested up to: 6.5
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.20.8 Stable tag: 0.21.0
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html

View File

@ -5,17 +5,17 @@ Plugin URI: https://tainacan.org/
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. 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 Author: Tainacan.org
Author URI: https://tainacan.org/ Author URI: https://tainacan.org/
Version: 0.20.8 Version: 0.21.0
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.4 Tested up to: 6.5
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.20.8 Stable tag: 0.21.0
Text Domain: tainacan Text Domain: tainacan
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/ */
const TAINACAN_VERSION = '0.20.8'; const TAINACAN_VERSION = '0.21.0';
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
$TAINACAN_BASE_URL = plugins_url('', __FILE__); $TAINACAN_BASE_URL = plugins_url('', __FILE__);

View File

@ -1308,7 +1308,7 @@ export default {
this.form.default_view_mode = this.collection.default_view_mode; this.form.default_view_mode = this.collection.default_view_mode;
this.form.default_order = this.collection.default_order; this.form.default_order = this.collection.default_order;
this.form.default_orderby = this.collection.default_orderby; this.form.default_orderby = this.collection.default_orderby;
this.form.enabled_view_modes = []; this.form.enabled_view_modes = this.collection.enabled_view_modes;
this.form.allow_comments = this.collection.allow_comments; this.form.allow_comments = this.collection.allow_comments;
this.form.allows_submission = this.collection.allows_submission; this.form.allows_submission = this.collection.allows_submission;
this.form.submission_anonymous_user = this.collection.submission_anonymous_user; this.form.submission_anonymous_user = this.collection.submission_anonymous_user;

View File

@ -423,9 +423,9 @@ export default {
} }
}, },
computed: { computed: {
metadatumTypes() { ...mapGetters('metadata', {
return this.getMetadatumTypes(); 'metadatumTypes': 'getMetadatumTypes'
}, }),
collectionNonChildMetadata() { collectionNonChildMetadata() {
return Array.isArray(this.collectionMetadata) ? this.collectionMetadata.filter((metadatum) => !this.checkIfMetadatumIsChild(metadatum)) : []; return Array.isArray(this.collectionMetadata) ? this.collectionMetadata.filter((metadatum) => !this.checkIfMetadatumIsChild(metadatum)) : [];
} }
@ -476,12 +476,6 @@ export default {
'fetchMetadatumTypes', 'fetchMetadatumTypes',
'sendMetadatum' 'sendMetadatum'
]), ]),
...mapGetters('metadata', [
'getMetadatumTypes'
]),
...mapGetters('bgprocess', [
'getProcess'
]),
...mapActions('collection', [ ...mapActions('collection', [
'fetchCollectionBasics' 'fetchCollectionBasics'
]), ]),

View File

@ -209,12 +209,9 @@ export default {
} }
}, },
computed: { computed: {
uploadedFileList() { ...mapGetters('collection', {
return this.getFiles(); 'collection': 'getCollection'
}, })
collection() {
return this.getCollection()
}
}, },
created() { created() {
// Obtains collection ID // Obtains collection ID
@ -233,10 +230,6 @@ export default {
'sendFile', 'sendFile',
'cleanFiles', 'cleanFiles',
'deleteItem' 'deleteItem'
]),
...mapGetters('collection', [
'getFiles',
'getCollection'
]), ]),
...mapActions('item', [ ...mapActions('item', [
'sendItem', 'sendItem',

View File

@ -397,7 +397,7 @@
<i class="tainacan-icon tainacan-icon-metadata" /> <i class="tainacan-icon tainacan-icon-metadata" />
</span> </span>
<span <span
v-if="metadataSections.length > 1 && collection.item_enable_metadata_enumeration === 'yes'" v-if="metadataSections.length > 1 && collection && collection.item_enable_metadata_enumeration === 'yes'"
style="opacity: 0.65;" style="opacity: 0.65;"
class="metadata-section-enumeration"> class="metadata-section-enumeration">
{{ Number(sectionIndex) + 1 }}. {{ Number(sectionIndex) + 1 }}.
@ -443,7 +443,7 @@
:hide-help-buttons="false" :hide-help-buttons="false"
:help-info-bellow-label="false" :help-info-bellow-label="false"
:is-mobile-screen="isMobileScreen" :is-mobile-screen="isMobileScreen"
:enumerate-metadatum="metadataSections.length > 1 && collection.item_enable_metadata_enumeration === 'yes' ? ( (Number(sectionIndex) + 1) + '.' + (Number(getMetadatumOrderInSection(sectionIndex, itemMetadatum.metadatum)) + 1) ) : false" :enumerate-metadatum="metadataSections.length > 1 && collection && collection.item_enable_metadata_enumeration === 'yes' ? ( (Number(sectionIndex) + 1) + '.' + (Number(getMetadatumOrderInSection(sectionIndex, itemMetadatum.metadatum)) + 1) ) : false"
:is-last-metadatum="index > 2 && (index == itemMetadata.length - 1)" :is-last-metadatum="index > 2 && (index == itemMetadata.length - 1)"
:is-focused="focusedMetadatum === index" :is-focused="focusedMetadatum === index"
:is-metadata-navigation="isMetadataNavigation" :is-metadata-navigation="isMetadataNavigation"
@ -671,7 +671,7 @@
<template v-else> <template v-else>
<span <span
v-if="form.status === 'auto-draft'" v-if="form.status === 'auto-draft'"
class="has-text-danger"> class="has-text-warning">
{{ $i18n.get('info_autodraft_updated') }} {{ $i18n.get('info_autodraft_updated') }}
</span> </span>
<span v-else> <span v-else>
@ -849,9 +849,9 @@ export default {
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection() 'collection': 'getCollection'
}, }),
itemMetadata() { itemMetadata() {
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata())); const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
@ -877,21 +877,17 @@ export default {
}); });
return tweakedItemMetadata; return tweakedItemMetadata;
}, },
metadataSections() { ...mapGetters('metadata', {
return this.getMetadataSections(); 'metadataSections': 'getMetadataSections'
}, }),
lastUpdated() { ...mapGetters('item', {
return this.getLastUpdated(); 'totalAttachments': 'getTotalAttachments',
}, 'lastUpdated': 'getLastUpdated'
group() { }),
return this.getGroup(); ...mapGetters('bulkedition', {
}, 'itemIdInSequence': 'getItemIdInSequence',
itemIdInSequence() { 'group': 'getGroup'
return this.getItemIdInSequence(); }),
},
totalAttachments() {
return this.getTotalAttachments();
},
totalRelatedItems() { totalRelatedItems() {
return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false; return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false;
}, },
@ -1144,30 +1140,17 @@ export default {
]), ]),
...mapGetters('item',[ ...mapGetters('item',[
'getItemMetadata', 'getItemMetadata',
'getTotalAttachments',
'getLastUpdated',
'getAttachments'
]), ]),
...mapActions('collection', [ ...mapActions('collection', [
'deleteItem', 'deleteItem',
]), ]),
...mapGetters('collection', [
'getCollection',
]),
...mapActions('bulkedition', [ ...mapActions('bulkedition', [
'fetchItemIdInSequence', 'fetchItemIdInSequence',
'fetchSequenceGroup' 'fetchSequenceGroup'
]), ]),
...mapGetters('bulkedition', [
'getItemIdInSequence',
'getGroup'
]),
...mapActions('metadata',[ ...mapActions('metadata',[
'fetchMetadataSections' 'fetchMetadataSections'
]), ]),
...mapGetters('metadata',[
'getMetadataSections'
]),
onSubmit(status, sequenceDirection) { onSubmit(status, sequenceDirection) {
// Puts loading on Item edition // Puts loading on Item edition

View File

@ -209,7 +209,7 @@
:value="Array.isArray(selectedConditionalValue) ? selectedConditionalValue[0] : selectedConditionalValue" :value="Array.isArray(selectedConditionalValue) ? selectedConditionalValue[0] : selectedConditionalValue"
:allow-new="false" :allow-new="false"
:maxtags="1" :maxtags="1"
@input="selectConditionalValue" @update:value="($event) => selectConditionalValue($event)"
/> />
</b-field> </b-field>
</transition> </transition>

View File

@ -97,7 +97,7 @@
</b-field> </b-field>
<b-field <b-field
v-if="form.metadata_type_object.component != 'tainacan-compound'" v-if="form.metadata_type_object.component != 'tainacan-geocoordinate' && form.metadata_type_object.component != 'tainacan-compound'"
:addons="false" :addons="false"
:type="formErrors['placeholder'] != undefined ? 'is-danger' : ''" :type="formErrors['placeholder'] != undefined ? 'is-danger' : ''"
:message="formErrors['placeholder'] != undefined ? formErrors['placeholder'] : ''"> :message="formErrors['placeholder'] != undefined ? formErrors['placeholder'] : ''">
@ -407,7 +407,7 @@
import FormNumeric from '../metadata-types/numeric/FormNumeric.vue'; import FormNumeric from '../metadata-types/numeric/FormNumeric.vue';
import FormUser from '../metadata-types/user/FormUser.vue'; import FormUser from '../metadata-types/user/FormUser.vue';
import FormGeoCoordinate from '../metadata-types/geocoordinate/FormGeoCoordinate.vue'; import FormGeoCoordinate from '../metadata-types/geocoordinate/FormGeoCoordinate.vue';
import FormURL from '../metadata-types/url/FormURL.vue'; import FormUrl from '../metadata-types/url/FormUrl.vue';
export default { export default {
name: 'MetadatumEditionForm', name: 'MetadatumEditionForm',
@ -420,7 +420,7 @@
'tainacan-form-numeric': FormNumeric, 'tainacan-form-numeric': FormNumeric,
'tainacan-form-user': FormUser, 'tainacan-form-user': FormUser,
'tainacan-form-geocoordinate': FormGeoCoordinate, 'tainacan-form-geocoordinate': FormGeoCoordinate,
'tainacan-form-url': FormURL 'tainacan-form-url': FormUrl
}, },
mixins: [ formHooks ], mixins: [ formHooks ],
props: { props: {

View File

@ -268,7 +268,7 @@
<script> <script>
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import { permalinkGetter, formHooks } from "../../js/mixins"; import { permalinkGetter, formHooks } from "../../js/mixins";
import { mapActions, mapGetters } from 'vuex'; import { mapActions } from 'vuex';
import TermsList from '../lists/terms-list.vue'; import TermsList from '../lists/terms-list.vue';
import CustomDialog from '../other/custom-dialog.vue'; import CustomDialog from '../other/custom-dialog.vue';
@ -389,9 +389,6 @@
'fetchTaxonomy', 'fetchTaxonomy',
'fetchOnlySlug' 'fetchOnlySlug'
]), ]),
...mapGetters('taxonomy',[
'getTaxonomy',
]),
onChangeTab(tab) { onChangeTab(tab) {
this.tabIndex = tab; this.tabIndex = tab;
if (this.tabIndex == 1) { if (this.tabIndex == 1) {

View File

@ -92,9 +92,9 @@
} }
}, },
computed: { computed: {
facetsFromItemSearch() { ...mapGetters('search', {
return this.getFacets(); 'facetsFromItemSearch': 'getFacets'
} }),
}, },
watch: { watch: {
selected: { selected: {
@ -147,9 +147,6 @@
this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions); this.$eventBusSearchEmitter.off('hasToReloadFacets', this.reloadOptions);
}, },
methods: { methods: {
...mapGetters('search', [
'getFacets'
]),
reloadOptions(shouldReload) { reloadOptions(shouldReload) {
if ( !this.isUsingElasticSearch && shouldReload ) if ( !this.isUsingElasticSearch && shouldReload )
this.loadOptions(); this.loadOptions();

View File

@ -114,12 +114,10 @@
} }
}, },
computed: { computed: {
attachments() { ...mapGetters('item', {
return this.getAttachments(); 'attachments': 'getAttachments',
}, 'totalAttachments': 'getTotalAttachments'
totalAttachments() { })
return this.getTotalAttachments();
}
}, },
watch: { watch: {
shouldLoadAttachments() { shouldLoadAttachments() {
@ -134,10 +132,6 @@
...mapActions('item', [ ...mapActions('item', [
'fetchAttachments', 'fetchAttachments',
]), ]),
...mapGetters('item', [
'getAttachments',
'getTotalAttachments'
]),
onChangeAttachmentsPerPage(value) { onChangeAttachmentsPerPage(value) {
if (value != this.attachmentsPerPage) { if (value != this.attachmentsPerPage) {

View File

@ -223,7 +223,7 @@
</a> </a>
<a <a
v-if="metadataSection.current_user_can_delete" v-if="metadataSection.current_user_can_delete"
:disabled="metadataSection.metadata_object_list.length" :disabled="metadataSection.metadata_object_list.length > 0"
:style="{ visibility: metadataSection.collection_id != collectionId || metadataSection.id === 'default_section' || metadataSection.metadata_object_list.length ? 'hidden' : 'visible' }" :style="{ visibility: metadataSection.collection_id != collectionId || metadataSection.id === 'default_section' || metadataSection.metadata_object_list.length ? 'hidden' : 'visible' }"
@click.prevent="removeMetadataSection(metadataSection)"> @click.prevent="removeMetadataSection(metadataSection)">
<span <span
@ -276,7 +276,8 @@
chosenClass: 'sortable-chosen', chosenClass: 'sortable-chosen',
filter: '.not-sortable-item', filter: '.not-sortable-item',
preventOnFilter: false, preventOnFilter: false,
animation: 250 animation: 250,
dataIdAttr: 'data-metadatum-id'
}" }"
@update="handleChange($event, sectionIndex)" @update="handleChange($event, sectionIndex)"
@add="handleChange($event, sectionIndex)" @add="handleChange($event, sectionIndex)"
@ -285,6 +286,10 @@
<div <div
v-if="metadatum != undefined && metadatum.parent == 0" v-if="metadatum != undefined && metadatum.parent == 0"
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)" v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)"
:key="metadatum.id"
:data-metadatum-id="metadatum.id"
:data-collection-id="metadatum.collection_id"
:data-original-section-index="sectionIndex"
class="active-metadatum-item" class="active-metadatum-item"
:class="{ :class="{
'is-compact-item': !isCollapseOpen(metadatum.id), 'is-compact-item': !isCollapseOpen(metadatum.id),
@ -642,7 +647,8 @@ export default {
'moveMetadataSectionUp', 'moveMetadataSectionUp',
'moveMetadataSectionDown', 'moveMetadataSectionDown',
'moveMetadatumUp', 'moveMetadatumUp',
'moveMetadatumDown' 'moveMetadatumDown',
'moveMetadatum'
]), ]),
...mapGetters('metadata',[ ...mapGetters('metadata',[
'getMetadataSections', 'getMetadataSections',
@ -656,6 +662,7 @@ export default {
case 'remove': case 'remove':
this.removeMetadataSection(this.activeFiltersList[$event.oldIndex]); this.removeMetadataSection(this.activeFiltersList[$event.oldIndex]);
break; break;
case 'change':
case 'update': { case 'update': {
const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList)); const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList));
const element = newMetadataSectionsList.splice($event.oldIndex, 1)[0]; const element = newMetadataSectionsList.splice($event.oldIndex, 1)[0];
@ -677,37 +684,52 @@ export default {
this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex); this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex, sectionIndex);
$event.originalTarget.removeChild($event.item) $event.originalTarget.removeChild($event.item)
} else { } else {
this.isLoadingMetadataSections = true;
this.updateMetadatum({ const previousSectionIndex = $event.item.dataset['originalSectionIndex'];
collectionId: this.collectionId,
metadatumId: this.activeMetadataSectionsList[sectionIndex].metadata_object_list[$event.oldIndex].id,
isRepositoryLevel: this.activeMetadataSectionsList[sectionIndex].metadata_object_list[$event.oldIndex].collection_id === 'default',
index: $event.newIndex,
options: {},
includeOptionsAsHtml: true,
sectionId: this.activeMetadataSectionsList[sectionIndex].id
});
const previousSectionMetadataObjectList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList[previousSectionIndex].metadata_object_list));
const newSectionMetadataObjectList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList[sectionIndex].metadata_object_list)); const newSectionMetadataObjectList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList[sectionIndex].metadata_object_list));
const element = newSectionMetadataObjectList.splice($event.oldIndex, 1)[0]; const element = previousSectionMetadataObjectList.splice($event.oldIndex, 1)[0];
newSectionMetadataObjectList.splice($event.newIndex, 0, element); newSectionMetadataObjectList.splice($event.newIndex, 0, element);
const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList)); const newMetadataSectionsList = JSON.parse(JSON.stringify(this.activeMetadataSectionsList));
newMetadataSectionsList[sectionIndex].metadata_object_list = newSectionMetadataObjectList; newMetadataSectionsList[sectionIndex].metadata_object_list = newSectionMetadataObjectList;
this.updateMetadataSections(newMetadataSectionsList); newMetadataSectionsList[previousSectionIndex].metadata_object_list = previousSectionMetadataObjectList;
this.updateMetadataSectionsOrder(sectionIndex); this.updateMetadataSections(newMetadataSectionsList);
$event.originalTarget.removeChild($event.item);
this.updateMetadatum({
collectionId: this.collectionId,
metadatumId: $event.item.dataset['metadatumId'],
isRepositoryLevel: $event.item.dataset['collectionId'] === 'default',
index: $event.newIndex,
options: {},
includeOptionsAsHtml: true,
sectionId: this.activeMetadataSectionsList[sectionIndex].id
}).then(() => {
this.updateMetadataSectionsOrder(newMetadataSectionsList)
.then( () => this.isLoadingMetadataSections = false )
.catch( () => this.isLoadingMetadataSections = false );
}).catch(() => {
this.isLoadingMetadataSections = false;
});
} }
break; break;
case 'update': case 'change':
case 'update': {
this.moveMetadatum({ newIndex: $event.newIndex, oldIndex: $event.oldIndex, sectionIndex: sectionIndex });
this.updateMetadataOrder(sectionIndex); this.updateMetadataOrder(sectionIndex);
break; break;
} }
}
}, },
updateMetadataOrder(sectionIndex) { updateMetadataOrder(sectionIndex) {
let metadataOrder = []; let metadataOrder = [];
for (let metadatum of this.activeMetadataSectionsList[sectionIndex].metadata_object_list) for (let metadatum of this.activeMetadataSectionsList[sectionIndex].metadata_object_list)
if (metadatum != undefined) if (metadatum != undefined)
metadataOrder.push({ metadataOrder.push({
@ -717,17 +739,16 @@ export default {
this.isUpdatingMetadataOrder = true; this.isUpdatingMetadataOrder = true;
this.updateCollectionMetadataOrder({ collectionId: this.collectionId, metadataOrder: metadataOrder, metadataSectionId: this.activeMetadataSectionsList[sectionIndex].id }) this.updateCollectionMetadataOrder({ collectionId: this.collectionId, metadataOrder: metadataOrder, metadataSectionId: this.activeMetadataSectionsList[sectionIndex].id })
.then(() => { .then(() => this.isUpdatingMetadataOrder = false)
this.isUpdatingMetadataOrder = false
})
.catch(() => this.isUpdatingMetadataOrder = false); .catch(() => this.isUpdatingMetadataOrder = false);
}, },
updateMetadataSectionsOrder() { updateMetadataSectionsOrder(metadataSectionsList) {
if (metadataSectionsList == undefined)
metadataSectionsList = this.activeMetadataSectionsList;
let metadataSectionsOrder = []; let metadataSectionsOrder = [];
for (let metadataSection of this.activeMetadataSectionsList) for (let metadataSection of metadataSectionsList)
if (metadataSection != undefined) { if (metadataSection != undefined) {
metadataSectionsOrder.push({ metadataSectionsOrder.push({
'id': metadataSection.id, 'id': metadataSection.id,
@ -756,12 +777,13 @@ export default {
onChangeEnableSection($event, index) { onChangeEnableSection($event, index) {
let metadataSectionsOrder = []; let metadataSectionsOrder = [];
for (let metadataSection of this.activeMetadataSectionsList) for (let metadataSection of this.activeMetadataSectionsList)
if (metadataSection != undefined) if (metadataSection != undefined) {
metadataSectionsOrder.push({ metadataSectionsOrder.push({
'id': metadataSection.id, 'id': metadataSection.id,
'enabled': metadataSection.enabled, 'enabled': metadataSection.enabled,
'metadata_order': metadataSection.metadata_object_list.map((aMetadatum) => { return { 'id': aMetadatum.id, 'enabled': aMetadatum.enabled } }) 'metadata_order': metadataSection.metadata_object_list.map((aMetadatum) => { return { 'id': aMetadatum.id, 'enabled': aMetadatum.enabled } })
}); });
}
metadataSectionsOrder[index].enabled = $event; metadataSectionsOrder[index].enabled = $event;
this.isUpdatingMetadataSectionsOrder = true; this.isUpdatingMetadataSectionsOrder = true;
@ -771,7 +793,6 @@ export default {
}, },
addMetadatumViaButton(metadatumType) { addMetadatumViaButton(metadatumType) {
this.addNewMetadatum(metadatumType, this.activeMetadataSectionsList[0].metadata_object_list.length, 0); this.addNewMetadatum(metadatumType, this.activeMetadataSectionsList[0].metadata_object_list.length, 0);
// Higlights the clicked metadatum // Higlights the clicked metadatum
this.highlightedMetadatum = metadatumType.name; this.highlightedMetadatum = metadatumType.name;
this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum); this.$emit('on-update-highlighted-metadatum', this.highlightedMetadatum);

View File

@ -2045,12 +2045,16 @@ export default {
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection',
}, }),
highlightedItem () { ...mapGetters('bulkedition', {
return this.getHighlightedItem(); 'groupId': 'getGroupId'
}, }),
...mapGetters('search', {
'highlightedItem': 'getHighlightedItem',
'itemsPerPage': 'getItemsPerPage'
}),
selectedItems () { selectedItems () {
if (this.$adminOptions.itemsSingleSelectionMode || this.$adminOptions.itemsMultipleSelectionMode) if (this.$adminOptions.itemsSingleSelectionMode || this.$adminOptions.itemsMultipleSelectionMode)
this.$eventBusSearch.setSelectedItemsForIframe(this.getSelectedItems()); this.$eventBusSearch.setSelectedItemsForIframe(this.getSelectedItems());
@ -2078,9 +2082,6 @@ export default {
} }
return true; return true;
}, },
itemsPerPage(){
return this.getItemsPerPage();
},
totalPages(){ totalPages(){
return Math.ceil(Number(this.totalItems)/Number(this.itemsPerPage)); return Math.ceil(Number(this.totalItems)/Number(this.itemsPerPage));
}, },
@ -2245,11 +2246,11 @@ export default {
itemsLocations: { itemsLocations: {
handler() { handler() {
setTimeout(() => { setTimeout(() => {
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].leafletObject ) {
if (this.itemsLocations.length == 1) if (this.itemsLocations.length == 1)
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] });
else else
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] });
} }
}, 500); }, 500);
}, },
@ -2276,10 +2277,6 @@ export default {
deep: true deep: true
} }
}, },
mounted() {
if (this.highlightsItem)
setTimeout(() => this.$eventBusSearch.highlightsItem(null), 3000);
},
created() { created() {
this.shouldUseLegacyMasonyCols = wp !== undefined && wp.hooks !== undefined && wp.hooks.hasFilter('tainacan_use_legacy_masonry_view_mode_cols') && wp.hooks.applyFilters('tainacan_use_legacy_masonry_view_mode_cols', false); this.shouldUseLegacyMasonyCols = wp !== undefined && wp.hooks !== undefined && wp.hooks.hasFilter('tainacan_use_legacy_masonry_view_mode_cols') && wp.hooks.applyFilters('tainacan_use_legacy_masonry_view_mode_cols', false);
}, },
@ -2287,9 +2284,6 @@ export default {
...mapActions('collection', [ ...mapActions('collection', [
'deleteItem', 'deleteItem',
]), ]),
...mapGetters('collection', [
'getCollection',
]),
...mapActions('bulkedition', [ ...mapActions('bulkedition', [
'createEditGroup', 'createEditGroup',
'createSequenceEditGroup', 'createSequenceEditGroup',
@ -2297,9 +2291,6 @@ export default {
'deleteItemsInBulk', 'deleteItemsInBulk',
'untrashItemsInBulk' 'untrashItemsInBulk'
]), ]),
...mapGetters('bulkedition', [
'getGroupId'
]),
...mapActions('search', [ ...mapActions('search', [
'setSeletecItems', 'setSeletecItems',
'cleanSelectedItems', 'cleanSelectedItems',
@ -2307,12 +2298,8 @@ export default {
'removeSelectedItem' 'removeSelectedItem'
]), ]),
...mapGetters('search', [ ...mapGetters('search', [
'getOrder',
'getOrderBy',
'getStatus', 'getStatus',
'getSelectedItems', 'getSelectedItems',
'getHighlightedItem',
'getItemsPerPage'
]), ]),
setSelectedItemChecked(itemId) { setSelectedItemChecked(itemId) {
if (this.$adminOptions.itemsSingleSelectionMode) { if (this.$adminOptions.itemsSingleSelectionMode) {
@ -2350,8 +2337,7 @@ export default {
object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems, object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems,
collectionId: this.collectionId collectionId: this.collectionId
}).then(() => { }).then(() => {
let sequenceId = this.getGroupId(); this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, this.groupId, 1));
this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, sequenceId, 1));
}); });
}, },
selectAllItemsOnPage() { selectAllItemsOnPage() {
@ -2401,11 +2387,9 @@ export default {
collectionId: this.collectionId, collectionId: this.collectionId,
object: [itemId] object: [itemId]
}).then(() => { }).then(() => {
let groupId = this.getGroupId();
this.untrashItemsInBulk({ this.untrashItemsInBulk({
collectionId: this.collectionId, collectionId: this.collectionId,
groupId: groupId groupId: this.groupId
}).then(() => this.$eventBusSearch.loadItems() ); }).then(() => this.$eventBusSearch.loadItems() );
}); });
} }
@ -2453,11 +2437,9 @@ export default {
collectionId: this.collectionId, collectionId: this.collectionId,
object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems
}).then(() => { }).then(() => {
let groupId = this.getGroupId();
this.untrashItemsInBulk({ this.untrashItemsInBulk({
collectionId: this.collectionId, collectionId: this.collectionId,
groupId: groupId groupId: this.groupId
}).then(() => { }).then(() => {
this.$eventBusSearch.loadItems(); this.$eventBusSearch.loadItems();
this.$emitter.emit('openProcessesPopup'); this.$emitter.emit('openProcessesPopup');
@ -2485,12 +2467,10 @@ export default {
collectionId: this.collectionId, collectionId: this.collectionId,
object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems object: Object.keys(this.queryAllItemsSelected).length ? this.queryAllItemsSelected : this.selectedItems
}).then(() => { }).then(() => {
let groupId = this.getGroupId();
if (this.isOnTrash) { if (this.isOnTrash) {
this.deleteItemsInBulk({ this.deleteItemsInBulk({
collectionId: this.collectionId, collectionId: this.collectionId,
groupId: groupId groupId: this.groupId
}).then(() => { }).then(() => {
this.$eventBusSearch.loadItems(); this.$eventBusSearch.loadItems();
this.$emitter.emit('openProcessesPopup'); this.$emitter.emit('openProcessesPopup');
@ -2498,7 +2478,7 @@ export default {
} else { } else {
this.trashItemsInBulk({ this.trashItemsInBulk({
collectionId: this.collectionId, collectionId: this.collectionId,
groupId: groupId groupId: this.groupId
}).then(() => { }).then(() => {
this.$eventBusSearch.loadItems(); this.$eventBusSearch.loadItems();
this.$emitter.emit('openProcessesPopup'); this.$emitter.emit('openProcessesPopup');
@ -2513,7 +2493,17 @@ export default {
}); });
}, },
filterBySelectedItems() { filterBySelectedItems() {
this.$eventBusSearch.filterBySelectedItems(this.selectedItems); let newQuery = {
postin: JSON.parse(JSON.stringify(this.selectedItems)),
}
if ( this.$route.query['fetch_only'] )
newQuery['fetch_only'] = this.$route.query['fetch_only'];
if ( this.$route.query['fetch_only_meta'] )
newQuery['fetch_only_meta'] = this.$route.query['fetch_only_meta'];
this.$router.replace({ path: this.$route.path, query: newQuery });
}, },
openItem() { openItem() {
if (this.contextMenuItem != null) { if (this.contextMenuItem != null) {
@ -2635,25 +2625,25 @@ export default {
this.$userPrefs.set(prefsGeocoordinateMetadatum, id); this.$userPrefs.set(prefsGeocoordinateMetadatum, id);
}, },
onMapReady() { onMapReady() {
if ( LeafletActiveArea && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) if ( LeafletActiveArea && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].leafletObject )
this.$refs['tainacan-admin-view-mode-map'].mapObject.setActiveArea('leaflet-active-area'); this.$refs['tainacan-admin-view-mode-map'].leafletObject.setActiveArea('leaflet-active-area');
}, },
clearSelectedMarkers() { clearSelectedMarkers() {
this.mapSelectedItemId = false; this.mapSelectedItemId = false;
this.selectedMarkerIndexes = []; this.selectedMarkerIndexes = [];
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].leafletObject ) {
if (this.itemsLocations.length == 1) if (this.itemsLocations.length == 1)
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] });
else else
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 48], paddingTopRight: [48, 48] });
} }
}, },
showItemByLocation(index) { showItemByLocation(index) {
this.mapSelectedItemId = this.itemsLocations[index].item.id; this.mapSelectedItemId = this.itemsLocations[index].item.id;
this.selectedMarkerIndexes = []; this.selectedMarkerIndexes = [];
this.selectedMarkerIndexes.push(index); this.selectedMarkerIndexes.push(index);
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].leafletObject )
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] });
}, },
showLocationsByItem(item) { showLocationsByItem(item) {
this.mapSelectedItemId = item.id; this.mapSelectedItemId = item.id;
@ -2666,11 +2656,11 @@ export default {
}) })
if ( selectedLocationsByItem.length) { if ( selectedLocationsByItem.length) {
if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-admin-view-mode-map'] && this.$refs['tainacan-admin-view-mode-map'].leafletObject ) {
if (selectedLocationsByItem.length > 1) if (selectedLocationsByItem.length > 1)
this.$refs['tainacan-admin-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] });
else else
this.$refs['tainacan-admin-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] }); this.$refs['tainacan-admin-view-mode-map'].leafletObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16, paddingTopLeft: [48, 286], paddingTopRight: [48, 48] });
} }
} else { } else {
this.$buefy.snackbar.open({ this.$buefy.snackbar.open({

View File

@ -230,14 +230,12 @@ export default {
} }
}, },
computed: { computed: {
metadatumMappers() { ...mapGetters('metadata', {
return this.getMetadatumMappers(); 'metadatumMappers': 'getMetadatumMappers',
}, 'activeMetadatumList': 'getMetadata'
}),
isNewMetadataMapperMetadataDisabled() { isNewMetadataMapperMetadataDisabled() {
return !this.newMetadataLabel || !this.newMetadataUri; return !this.newMetadataLabel || !this.newMetadataUri;
},
activeMetadatumList() {
return this.getMetadata();
} }
}, },
mounted() { mounted() {
@ -277,10 +275,6 @@ export default {
'fetchMetadatumMappers', 'fetchMetadatumMappers',
'updateMetadataMapperMetadata', 'updateMetadataMapperMetadata',
]), ]),
...mapGetters('metadata',[
'getMetadatumMappers',
'getMetadata'
]),
loadMetadataMappers() { loadMetadataMappers() {
this.isLoadingMetadatumMappers = true; this.isLoadingMetadatumMappers = true;
this.fetchMetadatumMappers() this.fetchMetadatumMappers()

View File

@ -10,7 +10,7 @@
{{ $i18n.get('label_available_metadata_types') }} {{ $i18n.get('label_available_metadata_types') }}
</h3> </h3>
<sortable <sortable
:list="availableMetadatumList" :list="availableMetadataTypes"
item-key="id" item-key="id"
:options="{ :options="{
group: { group: {
@ -19,6 +19,7 @@
put: false, put: false,
revertClone: true revertClone: true
}, },
draggable: '.available-metadatum-item',
sort: false, sort: false,
dragClass: 'sortable-drag' dragClass: 'sortable-drag'
}"> }">
@ -27,7 +28,7 @@
:id="metadatum.component" :id="metadatum.component"
class="available-metadatum-item" class="available-metadatum-item"
:class="{ 'highlighted-metadatum' : highlightedMetadatum == metadatum.name, 'inherited-metadatum': metadatum.inherited || isRepositoryLevel }" :class="{ 'highlighted-metadatum' : highlightedMetadatum == metadatum.name, 'inherited-metadatum': metadatum.inherited || isRepositoryLevel }"
@click.prevent.once="addMetadatumViaButton(metadatum)"> @click.prevent="addMetadatumViaButton(metadatum)">
<span <span
v-tooltip="{ v-tooltip="{
content: $i18n.get('instruction_click_or_drag_metadatum_create'), content: $i18n.get('instruction_click_or_drag_metadatum_create'),
@ -84,6 +85,7 @@
put: false, put: false,
revertClone: true revertClone: true
}, },
draggable: '.available-metadatum-item',
sort: false, sort: false,
dragClass: 'sortable-drag' dragClass: 'sortable-drag'
}"> }">
@ -91,7 +93,7 @@
<div <div
:id="metadataSection.id" :id="metadataSection.id"
class="available-metadata-section-item" class="available-metadata-section-item"
@click.prevent="addMetadataSectionViaButton()"> @click="addMetadataSectionViaButton()">
<span <span
v-tooltip="{ v-tooltip="{
content: $i18n.get('instruction_click_or_drag_metadatum_create'), content: $i18n.get('instruction_click_or_drag_metadatum_create'),
@ -164,14 +166,9 @@ export default {
} }
}, },
computed: { computed: {
availableMetadatumList: { ...mapGetters('metadata', {
get() { 'availableMetadataTypes': 'getMetadatumTypes'
return this.getMetadatumTypes(); }),
},
set(value) {
return this.updateMetadatumTypes(value);
}
},
}, },
mounted() { mounted() {
@ -190,9 +187,6 @@ export default {
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadatumTypes' 'fetchMetadatumTypes'
]), ]),
...mapGetters('metadata',[
'getMetadatumTypes'
]),
addMetadatumViaButton(metadatumType) { addMetadatumViaButton(metadatumType) {
this.$emitter.emit('addMetadatumViaButton', metadatumType); this.$emitter.emit('addMetadatumViaButton', metadatumType);
}, },

View File

@ -90,6 +90,7 @@
class="active-metadata-area" class="active-metadata-area"
:options="{ :options="{
group: { name:'metadata', pull: false, put: true }, group: { name:'metadata', pull: false, put: true },
sort: false,
handle: '.handle', handle: '.handle',
ghostClass: 'sortable-ghost', ghostClass: 'sortable-ghost',
chosenClass: 'sortable-chosen', chosenClass: 'sortable-chosen',
@ -362,12 +363,16 @@ export default {
'cleanMetadata' 'cleanMetadata'
]), ]),
...mapGetters('metadata',[ ...mapGetters('metadata',[
'getMetadata' 'getMetadata',
'getMetadatumTypes'
]), ]),
handleChange($event) { handleChange($event) {
switch ($event.type) { switch ($event.type) {
case 'add': case 'add':
this.addNewMetadatum(this.activeMetadatumList[$event.oldIndex], $event.newIndex); if ( !$event.from.classList.contains('active-metadata-area') ) {
this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex);
$event.originalTarget.removeChild($event.item);
}
break; break;
case 'remove': case 'remove':
this.removeMetadatum(this.activeMetadatumList[$event.oldIndex]); this.removeMetadatum(this.activeMetadatumList[$event.oldIndex]);

View File

@ -293,7 +293,7 @@ export default {
TermEditionForm: defineAsyncComponent(() => import('../edition/term-edition-form.vue')) TermEditionForm: defineAsyncComponent(() => import('../edition/term-edition-form.vue'))
}, },
props: { props: {
taxonomyId: String, taxonomyId: [ String, Number ],
currentUserCanEditTaxonomy: Boolean, currentUserCanEditTaxonomy: Boolean,
selected: Array, selected: Array,
selectedColumnIndex: Number, selectedColumnIndex: Number,

View File

@ -92,14 +92,14 @@
<b-dropdown-item <b-dropdown-item
id="item-delete-selected-terms" id="item-delete-selected-terms"
aria-role="listitem" aria-role="listitem"
@click="$emit('deleteSelectedTerms')"> @click="$emitter.emit('deleteSelectedTerms')">
{{ $i18n.get('label_delete_permanently') }} {{ $i18n.get('label_delete_permanently') }}
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item <b-dropdown-item
v-if="isHierarchical" v-if="isHierarchical"
id="item-update-selected-terms" id="item-update-selected-terms"
aria-role="listitem" aria-role="listitem"
@click="$emit('updateSelectedTermsParent')"> @click="$emitter.emit('updateSelectedTermsParent')">
{{ $i18n.get('label_update_parent') }} {{ $i18n.get('label_update_parent') }}
</b-dropdown-item> </b-dropdown-item>
</b-dropdown> </b-dropdown>
@ -129,14 +129,10 @@ export default {
TermsListHierarchical TermsListHierarchical
}, },
props: { props: {
taxonomyId: String, taxonomyId: [ String, Number ],
currentUserCanEditTaxonomy: Boolean, currentUserCanEditTaxonomy: Boolean,
isHierarchical: Boolean isHierarchical: Boolean
}, },
emits: [
'deleteSelectedTerms',
'updateSelectedTermsParent'
],
data() { data() {
return { return {
searchString: '', searchString: '',

View File

@ -75,6 +75,7 @@
:is-focused="(focusedGroupMetadatum === groupIndex) && (focusedChildMetadatum === childIndex)" :is-focused="(focusedGroupMetadatum === groupIndex) && (focusedChildMetadatum === childIndex)"
:is-metadata-navigation="isMetadataNavigation" :is-metadata-navigation="isMetadataNavigation"
:enumerate-metadatum="enumerateMetadatum ? ( enumerateMetadatum + ( childItemMetadataGroups.length > 1 ? ( '.' + (Number(groupIndex) + 1) ) : '' ) + '.' + (Number(childIndex) + 1) ) : false" :enumerate-metadatum="enumerateMetadatum ? ( enumerateMetadatum + ( childItemMetadataGroups.length > 1 ? ( '.' + (Number(groupIndex) + 1) ) : '' ) + '.' + (Number(childIndex) + 1) ) : false"
@input="($event) => $emitter.emit('updateValueFromCompound', $event)"
@change-collapse="onChangeCollapse($event, groupIndex, childIndex)" @change-collapse="onChangeCollapse($event, groupIndex, childIndex)"
@touchstart="isMetadataNavigation ? setMetadatumChildFocus({ groupIndex: groupIndex, childIndex: childIndex, scrollIntoView: false }): ''" @touchstart="isMetadataNavigation ? setMetadatumChildFocus({ groupIndex: groupIndex, childIndex: childIndex, scrollIntoView: false }): ''"
@mousedown="isMetadataNavigation ? setMetadatumChildFocus({ groupIndex: groupIndex, childIndex: childIndex, scrollIntoView: false }) : ''" @mousedown="isMetadataNavigation ? setMetadatumChildFocus({ groupIndex: groupIndex, childIndex: childIndex, scrollIntoView: false }) : ''"

View File

@ -34,10 +34,14 @@
preventOnFilter: false, preventOnFilter: false,
animation: 250 animation: 250
}" }"
@change="handleChange"> @update="handleChange($event)"
@add="handleChange($event)"
@remove="handleChange($event)">
<template #item="{ element: metadatum, index }"> <template #item="{ element: metadatum, index }">
<div <div
v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)" v-show="(metadataNameFilterString == '' || filterByMetadatumName(metadatum)) && filterByMetadatumType(metadatum)"
:data-metadatum-id="metadatum.id"
:data-collection-id="metadatum.collection_id"
class="active-metadatum-item" class="active-metadatum-item"
:class="{ :class="{
'not-sortable-item': metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadatum.parent == 0 || metadatum.collection_id != collectionId || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied, 'not-sortable-item': metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder || metadatum.parent == 0 || metadatum.collection_id != collectionId || metadataNameFilterString != '' || hasSomeMetadataTypeFilterApplied,
@ -235,7 +239,7 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import MetadatumEditionForm from '../../edition/metadatum-edition-form.vue'; import MetadatumEditionForm from '../../edition/metadatum-edition-form.vue';
import MetadatumDetails from '../../other/metadatum-details.vue'; import MetadatumDetails from '../../other/metadatum-details.vue';
import CustomDialog from '../../other/custom-dialog.vue'; import CustomDialog from '../../other/custom-dialog.vue';
@ -326,17 +330,22 @@
'deleteMetadatum', 'deleteMetadatum',
'updateChildMetadataOrder' 'updateChildMetadataOrder'
]), ]),
...mapGetters('metadata',[
'getMetadatumTypes'
]),
handleChange($event) { handleChange($event) {
switch ($event.type) { switch ($event.type) {
case 'add': case 'add':
this.addNewMetadatum(this.childrenMetadata[$event.oldIndex], $event.newIndex); if ( !$event.from.classList.contains('active-metadata-area') ) {
this.addNewMetadatum(this.getMetadatumTypes()[$event.oldIndex], $event.newIndex);
$event.originalTarget.removeChild($event.item);
}
break; break;
case 'remove': case 'remove':
this.removeMetadatum(this.childrenMetadata[$event.oldIndex]); this.removeMetadatum(this.childrenMetadata[$event.oldIndex]);
break; break;
case 'change':
case 'update': { case 'update': {
const newChildrenMetadata = JSON.parse(JSON.stringify(this.childrenMetadata)); const newChildrenMetadata = JSON.parse(JSON.stringify(this.childrenMetadata));
const element = newChildrenMetadata.splice($event.oldIndex, 1)[0]; const element = newChildrenMetadata.splice($event.oldIndex, 1)[0];
newChildrenMetadata.splice($event.newIndex, 0, element); newChildrenMetadata.splice($event.newIndex, 0, element);
@ -443,6 +452,9 @@
this.updateMetadataOrder(); this.updateMetadataOrder();
}, },
isAvailableChildMetadata(to, from, item) { isAvailableChildMetadata(to, from, item) {
if (!item || !item.id)
return false;
if (from.el && from.el.className === 'active-metadata-area') if (from.el && from.el.className === 'active-metadata-area')
return false; return false;
@ -470,15 +482,16 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.child-metadata-list-container { .child-metadata-list-container {
position: relative; position: relative;
margin-left: 42px; margin-left: 42px;
border-left: 1px solid var(--tainacan-gray2); border-left: 1px solid var(--tainacan-gray2);
section.field { section.field {
padding: 0.5em 1em 0 1em; padding: 0.5em 1em 0 1em !important;
position: absolute; position: absolute;
width: 100%; width: 100% !important;
} }
.children-icon { .children-icon {
position: absolute; position: absolute;

View File

@ -260,16 +260,22 @@ class Compound extends Metadata_Type {
private function get_meta_html(Item_Metadata_Entity $meta) { private function get_meta_html(Item_Metadata_Entity $meta) {
$html = ''; $html = '';
if ($meta instanceof Item_Metadata_Entity && !empty($meta->get_value_as_html())) { if ($meta instanceof Item_Metadata_Entity && !empty($meta->get_value_as_html())) {
ob_start(); ob_start();
?> ?>
<div class="tainacan-metadatum metadata-type-<?php echo $meta->get_metadatum()->get_metadata_type_object()->get_slug(); ?> metadata-slug-<?php echo $meta->get_metadatum()->get_slug(); ?>"> <div class="tainacan-metadatum metadata-type-<?php echo $meta->get_metadatum()->get_metadata_type_object()->get_slug(); ?> metadata-slug-<?php echo $meta->get_metadatum()->get_slug(); ?>">
<h4 class="label"> <?php
<?php echo esc_html($meta->get_metadatum()->get_name()); ?> $child_label = $meta->get_metadatum()->get_name();
</h4> $child_label_before = apply_filters('tainacan-get-child-item-metadatum-as-html-before-label', '<h4 class="label child-metadatum-label">', $meta);
<p> $child_label_after = apply_filters('tainacan-get-child-item-metadatum-as-html-after-label', '</h4>', $meta);
<?php echo wp_kses_tainacan($meta->get_value_as_html()); ?> echo $child_label_before . esc_html($child_label) . $child_label_after;
</p>
$child_value = $meta->get_value_as_html();
$child_value_before = apply_filters('tainacan-get-child-item-metadatum-as-html-before-value', '<p class="child-metadatum-value">', $meta);
$child_value_after = apply_filters('tainacan-get-child-item-metadatum-as-html-after-value', '</p>', $meta);
echo $child_value_before . wp_kses_tainacan($child_value) . $child_value_after;
?>
</div> </div>
<?php <?php
$html = ob_get_contents(); $html = ob_get_contents();

View File

@ -76,7 +76,7 @@
props: { props: {
value: [ String, Object, Array ] value: [ String, Object, Array ]
}, },
emits: ['input'], emits: ['update:value'],
data() { data() {
return { return {
mapProvider: String, mapProvider: String,
@ -96,7 +96,7 @@
}, },
methods: { methods: {
emitValues(){ emitValues(){
this.$emit('input',{ this.$emit('update:value',{
map_provider: this.mapProvider, map_provider: this.mapProvider,
attribution: this.attribution, attribution: this.attribution,
initial_zoom: this.initialZoom, initial_zoom: this.initialZoom,

View File

@ -181,11 +181,11 @@
handler() { handler() {
const mapComponentRef = 'map--' + this.itemMetadatumIdentifier; const mapComponentRef = 'map--' + this.itemMetadatumIdentifier;
nextTick(() => { nextTick(() => {
if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].mapObject && this.selectedLatLng.length != undefined) { if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].leafletObject && this.selectedLatLng.length != undefined) {
if (this.selectedLatLng.length == 1) if (this.selectedLatLng.length == 1)
this.$refs[mapComponentRef].mapObject.panInsideBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom }); this.$refs[mapComponentRef].leafletObject.panInsideBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom });
else else
this.$refs[mapComponentRef].mapObject.flyToBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom }); this.$refs[mapComponentRef].leafletObject.flyToBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom });
} }
}); });
}, },
@ -213,8 +213,8 @@
this.$emitter.off('itemEditionFormResize', () => this.handleWindowResize(mapComponentRef)); this.$emitter.off('itemEditionFormResize', () => this.handleWindowResize(mapComponentRef));
}, },
methods: { methods: {
onUpdateFromLatitudeInput: _.debounce( function($event) { onUpdateFromLatitudeInput: _.debounce( function(value) {
let newLatitude = $event.target.value; let newLatitude = value;
if ( !isNaN(newLatitude) ) { if ( !isNaN(newLatitude) ) {
this.latitude = newLatitude; this.latitude = newLatitude;
this.onUpdateFromLatitudeAndLongitude(); this.onUpdateFromLatitudeAndLongitude();
@ -232,8 +232,8 @@
} }
} }
}, 250), }, 250),
onUpdateFromLongitudeInput: _.debounce( function($event) { onUpdateFromLongitudeInput: _.debounce( function(value) {
let newLongitude = $event.target.value; let newLongitude = value;
if ( !isNaN(newLongitude) ) { if ( !isNaN(newLongitude) ) {
this.longitude = newLongitude; this.longitude = newLongitude;
@ -304,8 +304,8 @@
const existingSelectedIndex = this.selected.indexOf(this.latitude + ',' + this.longitude); const existingSelectedIndex = this.selected.indexOf(this.latitude + ',' + this.longitude);
this.editingMarkerIndex = existingSelectedIndex; this.editingMarkerIndex = existingSelectedIndex;
const mapComponentRef = 'map--' + this.itemMetadatumIdentifier; const mapComponentRef = 'map--' + this.itemMetadatumIdentifier;
if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].mapObject ) if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].leafletObject )
this.$refs[mapComponentRef].mapObject.panInsideBounds([ this.selectedLatLng[existingSelectedIndex] ], { animate: true, maxZoom: this.maxZoom }); this.$refs[mapComponentRef].leafletObject.panInsideBounds([ this.selectedLatLng[existingSelectedIndex] ], { animate: true, maxZoom: this.maxZoom });
} }
}, },
onMarkerRemove(index) { onMarkerRemove(index) {
@ -319,14 +319,14 @@
}, },
handleWindowResize(mapComponentRef) { handleWindowResize(mapComponentRef) {
setTimeout(() => { setTimeout(() => {
if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].mapObject ) { if ( this.$refs[mapComponentRef] && this.$refs[mapComponentRef].leafletObject ) {
this.$refs[mapComponentRef].mapObject.invalidateSize(true); this.$refs[mapComponentRef].leafletObject.invalidateSize(true);
if ( this.selectedLatLng.length != undefined) { if ( this.selectedLatLng.length != undefined) {
if (this.selectedLatLng.length == 1) if (this.selectedLatLng.length == 1)
this.$refs[mapComponentRef].mapObject.panInsideBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom }); this.$refs[mapComponentRef].leafletObject.panInsideBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom });
else else
this.$refs[mapComponentRef].mapObject.flyToBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom }); this.$refs[mapComponentRef].leafletObject.flyToBounds(this.selectedLatLng, { animate: true, maxZoom: this.maxZoom });
} }
} }
}, 500); }, 500);

View File

@ -4,7 +4,7 @@
:ref="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')" :ref="'tainacan-item-metadatum_id-' + itemMetadatum.metadatum.id + (itemMetadatum.parent_meta_id ? ('_parent_meta_id-' + itemMetadatum.parent_meta_id) : '')"
:disabled="disabled" :disabled="disabled"
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''" :placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ''"
:model-value="Number(value)" :model-value="value === 0 || value ? Number(value) : null"
lang="en" lang="en"
:min="getMin" :min="getMin"
:max="getMax" :max="getMax"
@ -52,6 +52,12 @@
if ( inputRef && !inputRef.checkHtml5Validity()) if ( inputRef && !inputRef.checkHtml5Validity())
return; return;
// Allowing empty value as a state different of 0
if ( value === null || value === undefined || value === '' )
value = '';
else
value = Number(value);
this.$emit('update:value', value); this.$emit('update:value', value);
}, },
onBlur() { onBlur() {

View File

@ -148,7 +148,7 @@
metadatum: [ String, Object ], metadatum: [ String, Object ],
errors: [ String, Object, Array ] errors: [ String, Object, Array ]
}, },
emits: ['input'], emits: ['update:value'],
data(){ data(){
return { return {
icon: '', icon: '',
@ -296,7 +296,7 @@
this.collectionMessage = ''; this.collectionMessage = '';
}, },
emitValues(){ emitValues(){
this.$emit('input',{ this.$emit('update:value',{
collection_id: this.collection, collection_id: this.collection,
search: this.modelSearch, search: this.modelSearch,
display_in_related_items: this.modelDisplayInRelatedItems, display_in_related_items: this.modelDisplayInRelatedItems,

View File

@ -175,9 +175,9 @@
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
}, }),
maxMultipleValues() { maxMultipleValues() {
return ( return (
this.itemMetadatum && this.itemMetadatum &&
@ -271,9 +271,6 @@
} }
}, },
methods: { methods: {
...mapGetters('collection', [
'getCollection'
]),
onInput(newSelected) { onInput(newSelected) {
// First we reset the input // First we reset the input
this.search(''); this.search('');

View File

@ -30,10 +30,10 @@ class Relationship extends Metadata_Type {
<div class="dropdown-menu" style=""> <div class="dropdown-menu" style="">
<div class="dropdown-content"> <div class="dropdown-content">
<a class="dropdown-item is-hovered"> <a class="dropdown-item is-hovered">
<span>'. __('Collection') . ' 2 <strong>'._('item') . ' 9</strong>9</span> <span>'. __('Collection') . ' 3 <strong>'._('item') . ' 2</strong>9</span>
</a> </a>
<a class="dropdown-item"> <a class="dropdown-item">
<span>'. __('Collection') . ' 3 <strong>'._('item') . ' 9</strong>9</span> <span>'. __('Collection') . ' 3 <strong>'._('item') . ' 4</strong>9</span>
</a> </a>
<a class="dropdown-item"> <a class="dropdown-item">
<span>'. __('Collection') . ' 3 <strong>'._('item') . ' 9</strong>8</span> <span>'. __('Collection') . ' 3 <strong>'._('item') . ' 9</strong>8</span>

View File

@ -12,6 +12,7 @@
:disabled="disabled" :disabled="disabled"
:placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('label_selectbox_init')" :placeholder="itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : $i18n.get('label_selectbox_init')"
:model-value="value" :model-value="value"
:class="{ 'has-placeholder-selected': value === '' }"
@update:model-value="onSelected($event)"> @update:model-value="onSelected($event)">
<option value=""> <option value="">
{{ itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ($i18n.get('label_selectbox_init') + '...') }} {{ itemMetadatum.metadatum.placeholder ? itemMetadatum.metadatum.placeholder : ($i18n.get('label_selectbox_init') + '...') }}

View File

@ -181,7 +181,7 @@
TainacanCompound: defineAsyncComponent(() => import('./compound/TainacanCompound.vue')), TainacanCompound: defineAsyncComponent(() => import('./compound/TainacanCompound.vue')),
TainacanUser: defineAsyncComponent(() => import('./user/TainacanUser.vue')), TainacanUser: defineAsyncComponent(() => import('./user/TainacanUser.vue')),
TainacanGeocoordinate: defineAsyncComponent(() => import('./geocoordinate/TainacanGeoCoordinate.vue')), TainacanGeocoordinate: defineAsyncComponent(() => import('./geocoordinate/TainacanGeoCoordinate.vue')),
TainacanURL: defineAsyncComponent(() => import('./url/TainacanURL.vue')) TainacanUrl: defineAsyncComponent(() => import('./url/TainacanUrl.vue'))
}, },
props: { props: {
itemMetadatum: Object, itemMetadatum: Object,
@ -326,7 +326,10 @@
// A single term value // A single term value
case 'Object': case 'Object':
if (this.values.length && this.values[0] == this.itemMetadatum.value.id) if (
( Array.isArray(this.values) && this.values.length && this.values[0] == this.itemMetadatum.value.id ) ||
( this.values == this.itemMetadatum.value.id )
)
return; return;
break; break;
@ -336,7 +339,6 @@
return; return;
} }
} }
// If none is the case, the value is update request is sent to the API // If none is the case, the value is update request is sent to the API
this.$emit('input', { this.$emit('input', {
itemId: this.itemMetadatum.item.id, itemId: this.itemMetadatum.item.id,

View File

@ -183,7 +183,7 @@
metadatum: [ String, Object ], metadatum: [ String, Object ],
errors: [ String, Object, Array ] errors: [ String, Object, Array ]
}, },
emits: ['input'], emits: ['update:value'],
data(){ data(){
return { return {
isReady: false, isReady: false,
@ -211,7 +211,6 @@
if ( this.metadatum && this.metadatum.multiple === 'no' ) { if ( this.metadatum && this.metadatum.multiple === 'no' ) {
let types = Object.keys( this.single_types ); let types = Object.keys( this.single_types );
let hasValue = this.value && this.value.input_type && types.indexOf( this.value.input_type ) >= 0; let hasValue = this.value && this.value.input_type && types.indexOf( this.value.input_type ) >= 0;
if (hasValue) if (hasValue)
this.setInputType(this.value.input_type) this.setInputType(this.value.input_type)
else { else {
@ -327,7 +326,7 @@
this.taxonomyMessage = ''; this.taxonomyMessage = '';
}, },
emitValues(){ emitValues(){
this.$emit('input',{ this.$emit('update:value',{
taxonomy_id: this.taxonomy_id, taxonomy_id: this.taxonomy_id,
input_type: this.input_type, input_type: this.input_type,
allow_new_terms: this.allow_new_terms, allow_new_terms: this.allow_new_terms,

View File

@ -48,7 +48,7 @@
<template v-if="allowNewFromOptions && itemMetadatum.item"> <template v-if="allowNewFromOptions && itemMetadatum.item">
<!-- Term creation modal, used on admin for a complete term creation --> <!-- Term creation modal, used on admin for a complete term creation -->
<b-modal <b-modal
v-model:active="isTermCreationModalOpen" :model-value="isTermCreationModalOpen"
:width="768" :width="768"
trap-focus trap-focus
aria-role="dialog" aria-role="dialog"

View File

@ -43,6 +43,9 @@
</div> </div>
</div> </div>
</template> </template>
<template #empty>
{{ $i18n.get('info_nothing_like_this_so_far') }}
</template>
</b-autocomplete> </b-autocomplete>
</div> </div>
</template> </template>

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <section>
<b-field <b-field
:addons="false" :addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'link-as-button')"> :label="$i18n.getHelperTitle('tainacan-url', 'link-as-button')">
@ -16,6 +16,7 @@
</b-field> </b-field>
<b-field <b-field
v-if="linkAsButton == 'no'"
:addons="false" :addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'force-iframe')"> :label="$i18n.getHelperTitle('tainacan-url', 'force-iframe')">
&nbsp; &nbsp;
@ -30,8 +31,11 @@
:message="$i18n.getHelperMessage('tainacan-url', 'force-iframe')" /> :message="$i18n.getHelperMessage('tainacan-url', 'force-iframe')" />
</b-field> </b-field>
<b-field <transition name="filter-item">
<div
v-if="forceIframe == 'yes'" v-if="forceIframe == 'yes'"
style="break-inside: avoid;">
<b-field
:addons="false"> :addons="false">
<label class="label is-inline-block"> <label class="label is-inline-block">
{{ $i18n.getHelperTitle('tainacan-url', 'iframe-min-height') }} {{ $i18n.getHelperTitle('tainacan-url', 'iframe-min-height') }}
@ -63,7 +67,6 @@
</b-field> </b-field>
<b-field <b-field
v-if="forceIframe == 'yes'"
:addons="false" :addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'is-image')"> :label="$i18n.getHelperTitle('tainacan-url', 'is-image')">
&nbsp; &nbsp;
@ -78,6 +81,9 @@
:message="$i18n.getHelperMessage('tainacan-url', 'is-image')" /> :message="$i18n.getHelperMessage('tainacan-url', 'is-image')" />
</b-field> </b-field>
</div> </div>
</transition>
</section>
</template> </template>
<script> <script>

View File

@ -31,7 +31,6 @@
<script> <script>
export default { export default {
name: 'TainacanMetadataTypeURL',
props: { props: {
itemMetadatum: Object, itemMetadatum: Object,
value: [String, Number, Array], value: [String, Number, Array],

View File

@ -593,9 +593,9 @@
} }
}, },
computed: { computed: {
activity() { ...mapGetters('activity', {
return this.getActivity(); 'activity': 'getActivity'
}, }),
relatedToLink() { relatedToLink() {
switch(this.activity.object_type) { switch(this.activity.object_type) {
case 'Tainacan\\Entities\\Collection': case 'Tainacan\\Entities\\Collection':
@ -651,9 +651,6 @@
...mapActions('activity', [ ...mapActions('activity', [
'fetchActivity' 'fetchActivity'
]), ]),
...mapGetters('activity', [
'getActivity'
]),
approveActivity(){ approveActivity(){
this.$emit('approveActivity', this.activity.id); this.$emit('approveActivity', this.activity.id);
}, },

View File

@ -99,7 +99,7 @@
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}" :class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
:disabled="bulkEditionProcedures[criterion].isDone" :disabled="bulkEditionProcedures[criterion].isDone"
class="tainacan-bulk-edition-field" class="tainacan-bulk-edition-field"
@input="addToBulkEditionProcedures($event, 'oldValue', criterion)" @update:value="($event) => addToBulkEditionProcedures($event, 'oldValue', criterion)"
/> />
<div class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last tainacan-by-text"> <div class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last tainacan-by-text">
@ -117,7 +117,7 @@
:class="{'is-field-history': bulkEditionProcedures[criterion].isDone}" :class="{'is-field-history': bulkEditionProcedures[criterion].isDone}"
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last" class="tainacan-bulk-edition-field tainacan-bulk-edition-field-not-last"
:disabled="bulkEditionProcedures[criterion].isDone" :disabled="bulkEditionProcedures[criterion].isDone"
@input="addToBulkEditionProcedures($event, 'newValue', criterion)" @update:value="($event) => addToBulkEditionProcedures($event, 'newValue', criterion)"
/> />
</div> </div>
@ -128,7 +128,7 @@
:disabled="bulkEditionProcedures[criterion].isDone" :disabled="bulkEditionProcedures[criterion].isDone"
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last" class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last"
:placeholder="$i18n.get('instruction_select_a_status2')" :placeholder="$i18n.get('instruction_select_a_status2')"
@update:model-value="addToBulkEditionProcedures($event, 'newValue', criterion)"> @update:model-update:value="($event) => addToBulkEditionProcedures($event, 'newValue', criterion)">
<option <option
v-for="(statusOption, index) of $statusHelper.getStatuses().filter(option => { return option.value != 'trash' })" v-for="(statusOption, index) of $statusHelper.getStatuses().filter(option => { return option.value != 'trash' })"
:key="index" :key="index"
@ -144,7 +144,7 @@
:disabled="bulkEditionProcedures[criterion].isDone" :disabled="bulkEditionProcedures[criterion].isDone"
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last" class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last"
:placeholder="$i18n.get('instruction_select_a_comments_status')" :placeholder="$i18n.get('instruction_select_a_comments_status')"
@update:model-value="addToBulkEditionProcedures($event, 'newValue', criterion)"> @update:model-update:value="($event) => addToBulkEditionProcedures($event, 'newValue', criterion)">
<option <option
v-for="(statusOption, index) of $commentsStatusHelper.getStatuses()" v-for="(statusOption, index) of $commentsStatusHelper.getStatuses()"
:key="index" :key="index"
@ -202,7 +202,7 @@
:class="{ 'is-field-history': bulkEditionProcedures[criterion].isDone }" :class="{ 'is-field-history': bulkEditionProcedures[criterion].isDone }"
class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last" class="tainacan-bulk-edition-field tainacan-bulk-edition-field-last"
:disabled="bulkEditionProcedures[criterion].isDone || bulkEditionProcedures[criterion].isExecuting" :disabled="bulkEditionProcedures[criterion].isDone || bulkEditionProcedures[criterion].isExecuting"
@input="addToBulkEditionProcedures($event, 'newValue', criterion)" @update:value="($event) => addToBulkEditionProcedures($event, 'newValue', criterion)"
/> />
</template> </template>
</template> </template>
@ -329,7 +329,7 @@
TainacanCompound: defineAsyncComponent(() => import('../metadata-types/compound/TainacanCompound.vue')), TainacanCompound: defineAsyncComponent(() => import('../metadata-types/compound/TainacanCompound.vue')),
TainacanUser: defineAsyncComponent(() => import('../metadata-types/user/TainacanUser.vue')), TainacanUser: defineAsyncComponent(() => import('../metadata-types/user/TainacanUser.vue')),
TainacanGeocoordinate: defineAsyncComponent(() => import('../metadata-types/geocoordinate/TainacanGeoCoordinate.vue')), TainacanGeocoordinate: defineAsyncComponent(() => import('../metadata-types/geocoordinate/TainacanGeoCoordinate.vue')),
TainacanURL: defineAsyncComponent(() => import('../metadata-types/url/TainacanURL.vue')) TainacanUrl: defineAsyncComponent(() => import('../metadata-types/url/TainacanUrl.vue'))
}, },
props: { props: {
modalTitle: String, modalTitle: String,
@ -367,9 +367,9 @@
} }
}, },
computed: { computed: {
metadata() { ...mapGetters('metadata', {
return this.getMetadata(); 'metadata': 'getMetadata'
} })
}, },
created(){ created(){
if (this.collectionId) { if (this.collectionId) {
@ -436,9 +436,6 @@
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadata' 'fetchMetadata'
]), ]),
...mapGetters('metadata', [
'getMetadata'
]),
finalizeProcedure(criterion){ finalizeProcedure(criterion){
Object.assign(this.bulkEditionProcedures[criterion], { 'isDone': true }); Object.assign(this.bulkEditionProcedures[criterion], { 'isDone': true });

View File

@ -110,9 +110,9 @@ export default {
} }
}, },
computed: { computed: {
roles() { ...mapGetters('capability', {
return this.getRoles(); 'roles': 'getRoles',
} })
}, },
created() { created() {
this.isLoading = true; this.isLoading = true;
@ -126,9 +126,6 @@ export default {
'addCapabilityToRole', 'addCapabilityToRole',
'removeCapabilityFromRole' 'removeCapabilityFromRole'
]), ]),
...mapGetters('capability', [
'getRoles',
]),
updateRole(role, value) { updateRole(role, value) {
if (value) if (value)
this.addCapabilityToRole({ capabilityKey: this.capabilityKey.replace('%d', 'all'), role: role }) this.addCapabilityToRole({ capabilityKey: this.capabilityKey.replace('%d', 'all'), role: role })

View File

@ -130,9 +130,9 @@ export default {
} }
}, },
computed: { computed: {
metadatumMappers() { ...mapGetters('metadata', {
return this.getMetadatumMappers(); 'metadatumMappers': 'getMetadatumMappers'
}, }),
hasPresetsHook() { hasPresetsHook() {
if (wp !== undefined && wp.hooks !== undefined) if (wp !== undefined && wp.hooks !== undefined)
return wp.hooks.hasFilter(`tainacan_collections_presets`); return wp.hooks.hasFilter(`tainacan_collections_presets`);
@ -172,9 +172,6 @@ export default {
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadatumMappers' 'fetchMetadatumMappers'
]), ]),
...mapGetters('metadata', [
'getMetadatumMappers'
]),
onNewCollectionPreset(collectionPreset) { onNewCollectionPreset(collectionPreset) {
this.isCreatingCollectionPreset = true; this.isCreatingCollectionPreset = true;
axios.post(collectionPreset.endpoint) axios.post(collectionPreset.endpoint)

View File

@ -141,9 +141,9 @@ export default {
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
} })
}, },
watch: { watch: {
'$route': { '$route': {
@ -160,11 +160,6 @@ export default {
this.activeRoute = this.$route.name; this.activeRoute = this.$route.name;
this.pageTitle = this.$route.meta.title; this.pageTitle = this.$route.meta.title;
},
methods: {
...mapGetters('collection', [
'getCollection'
])
} }
} }
</script> </script>

View File

@ -132,14 +132,11 @@ export default {
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
} })
}, },
methods: { methods: {
...mapGetters('collection', [
'getCollection'
]),
openAvailableExportersModal(){ openAvailableExportersModal(){
this.$buefy.modal.open({ this.$buefy.modal.open({

View File

@ -72,12 +72,12 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters('collection', {
'collection': 'getCollection'
}),
slotPassed() { slotPassed() {
const slots = useSlots(); const slots = useSlots();
return !!slots['default']; return !!slots['default'];
},
collection() {
return this.getCollection();
}, },
collectionBreadCrumbItem() { collectionBreadCrumbItem() {
return { return {
@ -111,9 +111,6 @@ export default {
this.$emitter.on('onCollectionBreadCrumbUpdate', this.collectionBreadCrumbUpdate); this.$emitter.on('onCollectionBreadCrumbUpdate', this.collectionBreadCrumbUpdate);
}, },
methods: { methods: {
...mapGetters('collection', [
'getCollection'
]),
collectionBreadCrumbUpdate(breadCrumbItems) { collectionBreadCrumbUpdate(breadCrumbItems) {
this.childrenBreadCrumbItems = breadCrumbItems; this.childrenBreadCrumbItems = breadCrumbItems;
} }

View File

@ -62,12 +62,12 @@ export default {
isRepositoryLevel: Boolean isRepositoryLevel: Boolean
}, },
computed: { computed: {
status() { ...mapGetters('search', {
return this.getStatus(); 'status': 'getStatus'
}, }),
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
}, }),
repositoryTotalItems() { repositoryTotalItems() {
if (!this.$adminOptions.hideItemsListStatusTabsTotalItems) { if (!this.$adminOptions.hideItemsListStatusTabsTotalItems) {
@ -94,11 +94,7 @@ export default {
} }
}, },
methods: { methods: {
...mapGetters('search', [
'getStatus'
]),
...mapGetters('collection', [ ...mapGetters('collection', [
'getCollection',
'getCollections' 'getCollections'
]), ]),
onChangeTab(status) { onChangeTab(status) {

View File

@ -8,7 +8,7 @@
class="tainacan-form tainacan-dialog dialog"> class="tainacan-form tainacan-dialog dialog">
<div <div
class="modal-card" class="modal-card"
style="width: auto"> style="width: auto; max-width: 560px;">
<div class="modal-custom-icon"> <div class="modal-custom-icon">
<span class="icon is-large"> <span class="icon is-large">
<i <i

View File

@ -139,10 +139,14 @@
type: Function, type: Function,
default: () => {} default: () => {}
}, },
hideCancel: {
type: Boolean,
default: false,
},
taxonomyId: '', taxonomyId: '',
excludeTree: '', excludeTree: '',
isHierarchical: Boolean, isHierarchical: Boolean,
initialTermParent: String, initialTermParent: [ String, Number ],
initialTermParentName: String initialTermParentName: String
}, },
emits: [ emits: [

View File

@ -106,6 +106,10 @@
type: Function, type: Function,
default: () => {} default: () => {}
}, },
hideCancel: {
type: Boolean,
default: false,
},
amountOfTerms: { amountOfTerms: {
type: Number, type: Number,
default: 1 default: 1

View File

@ -311,24 +311,20 @@
} }
}, },
computed: { computed: {
filters() { ...mapGetters('collection', {
return this.getFilters(); 'collection': 'getCollection'
}, }),
repositoryCollectionFilters() { ...mapGetters('search', {
return this.getRepositoryCollectionFilters(); 'getQuery': 'getPostQuery'
}, }),
taxonomyFilters() { ...mapGetters('filter', {
return this.getTaxonomyFilters(); 'filters': 'getFilters',
}, 'taxonomyFilters': 'getTaxonomyFilters',
getQuery() { 'repositoryCollectionFilters': 'getRepositoryCollectionFilters'
return this.getPostQuery(); }),
},
taxonomyId () { taxonomyId () {
const taxonomyArray = this.taxonomy.split("_"); const taxonomyArray = this.taxonomy.split("_");
return taxonomyArray[taxonomyArray.length - 1]; return taxonomyArray[taxonomyArray.length - 1];
},
collection() {
return this.getCollection();
} }
}, },
watch: { watch: {
@ -394,11 +390,7 @@
}, },
methods: { methods: {
...mapGetters('search',[
'getPostQuery'
]),
...mapGetters('collection',[ ...mapGetters('collection',[
'getCollection',
'getCollections' 'getCollections'
]), ]),
...mapActions('collection',[ ...mapActions('collection',[
@ -409,11 +401,6 @@
'fetchTaxonomyFilters', 'fetchTaxonomyFilters',
'fetchRepositoryCollectionFilters' 'fetchRepositoryCollectionFilters'
]), ]),
...mapGetters('filter', [
'getFilters',
'getTaxonomyFilters',
'getRepositoryCollectionFilters'
]),
prepareFilters() { prepareFilters() {
// Cancels previous Request // Cancels previous Request
if (this.filtersSearchCancel != undefined) if (this.filtersSearchCancel != undefined)

View File

@ -95,6 +95,9 @@
} }
}, },
computed: { computed: {
...mapGetters('search', {
'totalItems': 'getTotalItems'
}),
filterTags() { filterTags() {
let tags = this.getFilterTags(); let tags = this.getFilterTags();
let flattenTags = []; let flattenTags = [];
@ -127,9 +130,6 @@
}); });
return flattenTags; return flattenTags;
},
totalItems() {
return this.getTotalItems()
} }
}, },
watch: { watch: {
@ -166,8 +166,7 @@
}, },
methods: { methods: {
...mapGetters('search',[ ...mapGetters('search',[
'getFilterTags', 'getFilterTags'
'getTotalItems'
]), ]),
removeMetaQuery({ filterId, value, singleLabel, label, taxonomy, metadatumId, metadatumName, argType }) { removeMetaQuery({ filterId, value, singleLabel, label, taxonomy, metadatumId, metadatumName, argType }) {
this.$eventBusSearch.resetPageOnStore(); this.$eventBusSearch.resetPageOnStore();

View File

@ -123,15 +123,11 @@ export default {
} }
}, },
computed: { computed: {
totalItems(){ ...mapGetters('search', {
return this.getTotalItems(); 'totalItems': 'getTotalItems',
}, 'page': 'getPage',
page(){ 'itemsPerPage': 'getItemsPerPage'
return this.getPage(); }),
},
itemsPerPage(){
return this.getItemsPerPage();
},
totalPages(){ totalPages(){
return Math.ceil(Number(this.totalItems)/Number(this.itemsPerPage)); return Math.ceil(Number(this.totalItems)/Number(this.itemsPerPage));
}, },
@ -150,20 +146,13 @@ export default {
} }
}, },
methods: { methods: {
...mapGetters('search', [
'getTotalItems',
'getPage',
'getItemsPerPage',
'getPostQuery'
]),
onChangeItemsPerPage(value) { onChangeItemsPerPage(value) {
if ( this.itemsPerPage == value){ if ( this.itemsPerPage == value )
return false; return false;
} else if (Number(value) > Number(this.maxItemsPerPage)) { else if ( Number(value) > Number(this.maxItemsPerPage) )
this.$eventBusSearch.setItemsPerPage(this.maxItemsPerPage); this.$eventBusSearch.setItemsPerPage(this.maxItemsPerPage);
} else { else
this.$eventBusSearch.setItemsPerPage(value); this.$eventBusSearch.setItemsPerPage(value);
}
}, },
onPageChange(page) { onPageChange(page) {
if(page == 0) if(page == 0)

View File

@ -146,6 +146,7 @@ UserPrefsPlugin.install = function (app, options = {}) {
'collections_per_page': 12, 'collections_per_page': 12,
'taxonomies_per_page': 12, 'taxonomies_per_page': 12,
'activities_per_page': 12, 'activities_per_page': 12,
'processes_per_page': 12,
'order': 'DESC', 'order': 'DESC',
'order_by': 'date', 'order_by': 'date',
'view_mode': undefined, 'view_mode': undefined,

View File

@ -187,13 +187,6 @@ export default {
cleanSelectedItems() { cleanSelectedItems() {
app.config.globalProperties.$store.dispatch('search/cleanSelectedItems'); app.config.globalProperties.$store.dispatch('search/cleanSelectedItems');
}, },
async filterBySelectedItems(selectedItems) {
await app.config.globalProperties.$router.replace({ path: app.config.globalProperties.$route.path, query: { postin: selectedItems } });
},
highlightsItem(itemId) {
app.config.globalProperties.$store.dispatch('search/highlightsItem', itemId);
this.updateURLQueries();
},
exitViewModeWithoutPagination() { exitViewModeWithoutPagination() {
app.config.globalProperties.$eventBusSearchEmitter.emit( 'exitViewModeWithoutPagination', true); app.config.globalProperties.$eventBusSearchEmitter.emit( 'exitViewModeWithoutPagination', true);
}, },
@ -251,6 +244,7 @@ export default {
app.config.globalProperties.$store.dispatch('search/cleanFilterTags'); app.config.globalProperties.$store.dispatch('search/cleanFilterTags');
app.config.globalProperties.$store.dispatch('search/cleanMetaQueries', { keepCollections: true }); app.config.globalProperties.$store.dispatch('search/cleanMetaQueries', { keepCollections: true });
app.config.globalProperties.$store.dispatch('search/cleanTaxQueries'); app.config.globalProperties.$store.dispatch('search/cleanTaxQueries');
app.config.globalProperties.$store.dispatch('search/removePostIn');
this.updateURLQueries(); this.updateURLQueries();
} }
} }

View File

@ -45,9 +45,9 @@ export const dynamicFilterTypeMixin = {
}, },
emits: ['update-parent-collapse'], emits: ['update-parent-collapse'],
computed: { computed: {
facetsFromItemSearch() { ...mapGetters('search', {
return this.getFacets(); 'facetsFromItemSearch': 'getFacets'
} }),
}, },
watch: { watch: {
isLoadingItems: { isLoadingItems: {
@ -59,9 +59,6 @@ export const dynamicFilterTypeMixin = {
} }
}, },
methods: { methods: {
...mapGetters('search', [
'getFacets'
]),
getValuesPlainText({ metadatumId, search, isRepositoryLevel, valuesToIgnore, offset, number, isInCheckboxModal, getSelected = '0', countItems = true }) { getValuesPlainText({ metadatumId, search, isRepositoryLevel, valuesToIgnore, offset, number, isInCheckboxModal, getSelected = '0', countItems = true }) {
if (isInCheckboxModal || search || !this.isUsingElasticSearch) { if (isInCheckboxModal || search || !this.isUsingElasticSearch) {

View File

@ -3,9 +3,11 @@ import { mapActions } from 'vuex';
export const itemMetadataMixin = { export const itemMetadataMixin = {
created() { created() {
this.$emitter.on('removeCompoundGroup', this.removeItemMetadataGroup); this.$emitter.on('removeCompoundGroup', this.removeItemMetadataGroup);
this.$emitter.on('updateValueFromCompound', this.updateItemMetadataValue);
}, },
beforeDestroy() { beforeDestroy() {
this.$emitter.off('removeCompoundGroup', this.removeItemMetadataGroup); this.$emitter.off('removeCompoundGroup', this.removeItemMetadataGroup);
this.$emitter.off('updateValueFromCompound', this.updateItemMetadataValue);
}, },
data () { data () {
return { return {
@ -20,7 +22,7 @@ export const itemMetadataMixin = {
if (this.errors.length > 0 && this.errors[0].errors && this.errors[0].errors.length) { if (this.errors.length > 0 && this.errors[0].errors && this.errors[0].errors.length) {
for (let error of this.errors) for (let error of this.errors)
this.$emitter.on('updateErrorMessageOf#' + (error.metadatum_id + (error.parent_meta_id ? '-' + error.parent_meta_id : '')), error); this.$emitter.emit('updateErrorMessageOf#' + (error.metadatum_id + (error.parent_meta_id ? '-' + error.parent_meta_id : '')), error);
} }
}, },
deep: true deep: true
@ -37,7 +39,7 @@ export const itemMetadataMixin = {
if (itemId) { if (itemId) {
this.isUpdatingValues = true;; this.isUpdatingValues = true;
if (values.length > 0 && values[0] && values[0].value) { if (values.length > 0 && values[0] && values[0].value) {
let onlyValues = values.map((aValueObject) => aValueObject.value); let onlyValues = values.map((aValueObject) => aValueObject.value);
@ -59,7 +61,7 @@ export const itemMetadataMixin = {
this.$emitter.emit('updateErrorMessageOf#' + (parentMetaId ? metadatumId + '-' + parentMetaId : metadatumId), this.errors[index]); this.$emitter.emit('updateErrorMessageOf#' + (parentMetaId ? metadatumId + '-' + parentMetaId : metadatumId), this.errors[index]);
}) })
.catch(({ error_message, error, item_metadata }) => { .catch(({ error_message, error, item_metadata }) => {
this.isUpdatingValues = false;; this.isUpdatingValues = false;
let index = this.errors.findIndex( errorItem => errorItem.metadatum_id == metadatumId && (parentMetaId ? errorItem.parent_meta_id == parentMetaId : true )); let index = this.errors.findIndex( errorItem => errorItem.metadatum_id == metadatumId && (parentMetaId ? errorItem.parent_meta_id == parentMetaId : true ));
let messages = []; let messages = [];
@ -94,7 +96,7 @@ export const itemMetadataMixin = {
// In the item submission, we don't want to block submission or clear errors before a re-submission is performed, // In the item submission, we don't want to block submission or clear errors before a re-submission is performed,
// as the validation depends on a single server-side request. Thus, we do not update error arary here. // as the validation depends on a single server-side request. Thus, we do not update error arary here.
this.isUpdatingValues = false;; this.isUpdatingValues = false;
} }
/** /**
@ -115,7 +117,7 @@ export const itemMetadataMixin = {
}, },
removeItemMetadataGroup({ itemId, metadatumId, parentMetaId, parentMetadatum }) { removeItemMetadataGroup({ itemId, metadatumId, parentMetaId, parentMetadatum }) {
this.isUpdatingValues = true;; this.isUpdatingValues = true;
if (itemId && metadatumId && parentMetaId) { if (itemId && metadatumId && parentMetaId) {

View File

@ -422,6 +422,10 @@ export const moveMetadatumDown = ({ commit }, { index, sectionIndex }) => {
commit('moveMetadatumDown', { index, sectionIndex }); commit('moveMetadatumDown', { index, sectionIndex });
} }
export const moveMetadatum = ({ commit }, { newIndex, oldIndex, sectionIndex }) => {
commit('moveMetadatum', { newIndex, oldIndex, sectionIndex });
}
// METADATA SECTION METADATA LIST // METADATA SECTION METADATA LIST
export const fetchMetadataSectionMetadata = ({commit}, { collectionId , metadataSectionId }) => { export const fetchMetadataSectionMetadata = ({commit}, { collectionId , metadataSectionId }) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {

View File

@ -187,7 +187,6 @@ export const deleteMetadatumInsideMetadataSection = (state, metadatum) => {
const existingIndex = existingParentChildrenObject.findIndex((aMetadatum) => aMetadatum.id == metadatum.id); const existingIndex = existingParentChildrenObject.findIndex((aMetadatum) => aMetadatum.id == metadatum.id);
if (existingIndex >= 0) if (existingIndex >= 0)
existingParentChildrenObject.splice(existingIndex, 1); existingParentChildrenObject.splice(existingIndex, 1);
existingParent.metadata_type_options.children_objects = existingParentChildrenObject; existingParent.metadata_type_options.children_objects = existingParentChildrenObject;
metadataSection['metadata_object_list'].splice(existingParentIndex, 1, existingParent); metadataSection['metadata_object_list'].splice(existingParentIndex, 1, existingParent);
@ -241,3 +240,7 @@ export const moveMetadatumUp = (state, { index, sectionIndex }) => {
export const moveMetadatumDown = (state, { index, sectionIndex }) => { export const moveMetadatumDown = (state, { index, sectionIndex }) => {
state.metadataSections[sectionIndex].metadata_object_list.splice(index + 1, 0, state.metadataSections[sectionIndex].metadata_object_list.splice(index, 1)[0]); state.metadataSections[sectionIndex].metadata_object_list.splice(index + 1, 0, state.metadataSections[sectionIndex].metadata_object_list.splice(index, 1)[0]);
} }
export const moveMetadatum = (state, { newIndex, oldIndex, sectionIndex }) => {
state.metadataSections[sectionIndex].metadata_object_list.splice(newIndex, 0, state.metadataSections[sectionIndex].metadata_object_list.splice(oldIndex, 1)[0]);
}

View File

@ -183,7 +183,3 @@ export const cleanSelectedItems = ({ commit }) => {
export const removeSelectedItem = ({ commit }, selectedItem ) => { export const removeSelectedItem = ({ commit }, selectedItem ) => {
commit('removeSelectedItem', selectedItem); commit('removeSelectedItem', selectedItem);
}; };
export const highlightsItem = ({ commit }, itemId ) => {
commit('setHighlightedItem', itemId);
};

View File

@ -186,9 +186,9 @@ export default {
} }
}, },
computed: { computed: {
collections() { ...mapGetters('collection', {
return this.getCollections(); 'collections': 'getCollections'
} }),
}, },
mounted() { mounted() {
this.loadCollections(); this.loadCollections();
@ -198,9 +198,6 @@ export default {
'fetchCollections', 'fetchCollections',
'cleanCollections' 'cleanCollections'
]), ]),
...mapGetters('collection', [
'getCollections'
]),
loadCollections() { loadCollections() {
this.cleanCollections(); this.cleanCollections();
this.isLoadingCollections = true; this.isLoadingCollections = true;

View File

@ -391,6 +391,9 @@
} }
}, },
computed: { computed: {
...mapGetters('bgprocess', {
'processes': 'getProcesses'
}),
activities(){ activities(){
let activitiesList = this.getActivities(); let activitiesList = this.getActivities();
@ -400,9 +403,6 @@
moment(activity['log_date'], 'YYYY-MM-DD h:mm:ss').format('DD/MM/YYYY, hh:mm:ss'); moment(activity['log_date'], 'YYYY-MM-DD h:mm:ss').format('DD/MM/YYYY, hh:mm:ss');
return activitiesList; return activitiesList;
},
processes(){
return this.getProcesses();
} }
}, },
created() { created() {
@ -451,9 +451,6 @@
...mapActions('bgprocess', [ ...mapActions('bgprocess', [
'fetchProcesses', 'fetchProcesses',
]), ]),
...mapGetters('bgprocess', [
'getProcesses'
]),
onChangeTab(tab) { onChangeTab(tab) {
this.tab = tab; this.tab = tab;
if (this.tab == 'processes') { if (this.tab == 'processes') {

View File

@ -102,6 +102,9 @@
} }
}, },
computed: { computed: {
...mapGetters('collection', {
'collection': 'getCollection'
}),
capabilities() { capabilities() {
const capabilities = this.getCapabilities() const capabilities = this.getCapabilities()
@ -140,9 +143,6 @@
} else { } else {
return [] return []
} }
},
collection() {
return this.getCollection();
} }
}, },
mounted() { mounted() {
@ -160,9 +160,6 @@
...mapGetters('capability', [ ...mapGetters('capability', [
'getCapabilities' 'getCapabilities'
]), ]),
...mapGetters('collection', [
'getCollection'
]),
loadCapabilities() { loadCapabilities() {
this.isLoading = true; this.isLoading = true;

View File

@ -433,12 +433,10 @@ export default {
} }
}, },
computed: { computed: {
collections() { ...mapGetters('collection', {
return this.getCollections(); 'collections': 'getCollections',
}, 'repositoryTotalCollections': 'getRepositoryTotalCollections'
repositoryTotalCollections(){ }),
return this.getRepositoryTotalCollections();
},
collectionTaxonomies() { collectionTaxonomies() {
let collectionTaxonomies = this.getCollectionTaxonomies(); let collectionTaxonomies = this.getCollectionTaxonomies();
@ -510,8 +508,6 @@ export default {
'fetchMetadatumMappers' 'fetchMetadatumMappers'
]), ]),
...mapGetters('collection', [ ...mapGetters('collection', [
'getCollections',
'getRepositoryTotalCollections',
'getCollectionTaxonomies' 'getCollectionTaxonomies'
]), ]),
onChangeTab(status) { onChangeTab(status) {

View File

@ -537,6 +537,9 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters('collection', {
'collection': 'getCollection',
}),
activeFiltersList: { activeFiltersList: {
get() { get() {
return this.getFilters(); return this.getFilters();
@ -545,9 +548,6 @@ export default {
this.updateFilters(value); this.updateFilters(value);
} }
}, },
collection() {
return this.getCollection();
}
}, },
watch: { watch: {
'$route.query': { '$route.query': {
@ -624,8 +624,7 @@ export default {
'moveFilterDown' 'moveFilterDown'
]), ]),
...mapGetters('filter',[ ...mapGetters('filter',[
'getFilters', 'getFilters'
'getFilterTypes'
]), ]),
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadata', 'fetchMetadata',
@ -633,9 +632,6 @@ export default {
...mapGetters('metadata', [ ...mapGetters('metadata', [
'getMetadata', 'getMetadata',
]), ]),
...mapGetters('collection', [
'getCollection',
]),
handleChangeOnFilter($event) { handleChangeOnFilter($event) {
switch( $event.type ) { switch( $event.type ) {
case 'add': case 'add':
@ -644,6 +640,7 @@ export default {
case 'remove': case 'remove':
this.removeFilter(this.activeFiltersList[$event.oldIndex]); this.removeFilter(this.activeFiltersList[$event.oldIndex]);
break; break;
case 'change':
case 'update': { case 'update': {
const newActiveFiltersList = JSON.parse(JSON.stringify(this.activeFiltersList)); const newActiveFiltersList = JSON.parse(JSON.stringify(this.activeFiltersList));
const element = newActiveFiltersList.splice($event.oldIndex, 1)[0]; const element = newActiveFiltersList.splice($event.oldIndex, 1)[0];
@ -710,9 +707,8 @@ export default {
this.activeFiltersList.splice(this.newFilterIndex, 1); this.activeFiltersList.splice(this.newFilterIndex, 1);
}, },
handleChangeOnMetadata($event) { handleChangeOnMetadata($event) {
if ($event.removed) { if ( $event.type == 'removed' )
this.oldMetadatumIndex = $event.removed.oldIndex; this.oldMetadatumIndex = $event.removed.oldIndex;
}
}, },
updateFiltersOrder() { updateFiltersOrder() {
let filtersOrder = []; let filtersOrder = [];
@ -1124,6 +1120,12 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }
.not-saved { .not-saved {
font-style: italic; font-style: italic;

View File

@ -748,46 +748,32 @@
} }
}, },
computed: { computed: {
...mapGetters('collection', {
'items': 'getItems',
'collection': 'getCollection'
}),
...mapGetters('metadata', {
'metadata': 'getMetadata'
}),
...mapGetters('search', {
'searchQuery': 'getSearchQuery',
'sentenceMode': 'getSentenceMode',
'status': 'getStatus',
'orderBy': 'getOrderBy',
'order': 'getOrder',
'totalItems': 'getTotalItems',
'adminViewMode': 'getAdminViewMode',
'metaKey': 'getMetaKey'
}),
isSortingByCustomMetadata() { isSortingByCustomMetadata() {
return (this.orderBy != undefined && this.orderBy != '' && this.orderBy != 'title' && this.orderBy != 'date' && this.orderBy != 'modified'); return (this.orderBy != undefined && this.orderBy != '' && this.orderBy != 'title' && this.orderBy != 'date' && this.orderBy != 'modified');
}, },
items() {
return this.getItems();
},
totalItems() {
this.updateCollectionInfo();
return this.getTotalItems();
},
metadata() {
return this.getMetadata();
},
collection() {
return this.getCollection();
},
searchQuery() {
return this.getSearchQuery();
},
status() {
return this.getStatus();
},
sentenceMode() {
return this.getSentenceMode();
},
adminViewMode() {
const currentAdminViewMode = this.getAdminViewMode();
return ['table', 'cards', 'records', 'grid', 'masonry', 'list', 'map'].indexOf(currentAdminViewMode) >= 0 ? currentAdminViewMode : 'table';
},
orderBy() {
return this.getOrderBy();
},
order() {
return this.getOrder();
},
showLoading() { showLoading() {
return this.isLoadingItems || this.isLoadingMetadata; return this.isLoadingItems || this.isLoadingMetadata;
}, },
metaKey() { adminViewMode() {
return this.getMetaKey(); const currentAdminViewMode = this.getAdminViewMode();
return ['table', 'cards', 'records', 'grid', 'masonry', 'list', 'map'].indexOf(currentAdminViewMode) >= 0 ? currentAdminViewMode : 'table';
}, },
orderByName() { orderByName() {
const metadatumName = this.$orderByHelper.getOrderByMetadatumName({ const metadatumName = this.$orderByHelper.getOrderByMetadatumName({
@ -949,6 +935,9 @@
this.$refs['filters-modal'].focus(); this.$refs['filters-modal'].focus();
}, 800); }, 800);
} }
},
totalItems() {
this.updateCollectionInfo();
} }
}, },
created() { created() {
@ -1030,28 +1019,14 @@
}, },
methods: { methods: {
...mapGetters('collection', [
'getItems',
'getCollection'
]),
...mapActions('collection', [ ...mapActions('collection', [
'fetchCollectionBasics' 'fetchCollectionBasics'
]), ]),
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadata' 'fetchMetadata'
]), ]),
...mapGetters('metadata', [
'getMetadata'
]),
...mapGetters('search', [ ...mapGetters('search', [
'getSearchQuery',
'getSentenceMode',
'getStatus',
'getOrderBy',
'getOrder',
'getTotalItems',
'getAdminViewMode', 'getAdminViewMode',
'getMetaKey'
]), ]),
onOpenImportersModal() { onOpenImportersModal() {
this.$buefy.modal.open({ this.$buefy.modal.open({

View File

@ -83,9 +83,9 @@ export default {
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
}, }),
repositoryTabLabel() { repositoryTabLabel() {
let label = this.$i18n.get('metadata'); let label = this.$i18n.get('metadata');
const metadata = this.getMetadata(); const metadata = this.getMetadata();
@ -115,9 +115,6 @@ export default {
this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('metadata') }]); this.$emitter.emit('onCollectionBreadCrumbUpdate', [{ path: '', label: this.$i18n.get('metadata') }]);
}, },
methods: { methods: {
...mapGetters('collection',[
'getCollection'
]),
...mapGetters('metadata',[ ...mapGetters('metadata',[
'getMetadatumTypes', 'getMetadatumTypes',
'getMetadata', 'getMetadata',
@ -360,6 +357,12 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
} }
.not-saved { .not-saved {
font-style: italic; font-style: italic;

View File

@ -283,12 +283,10 @@
} }
}, },
computed: { computed: {
taxonomies(){ ...mapGetters('taxonomy', {
return this.get(); 'taxonomies': 'get',
}, 'repositoryTotalTaxonomies': 'getRepositoryTotalTaxonomies'
repositoryTotalTaxonomies(){ }),
return this.getRepositoryTotalTaxonomies();
},
statusOptionsForTaxonomies() { statusOptionsForTaxonomies() {
return this.$statusHelper.getStatuses().filter((status) => status.slug != 'draft' && (status.slug != 'private' || (status.slug == 'private' && this.$userCaps.hasCapability('tnc_rep_read_private_taxonomies')))); return this.$statusHelper.getStatuses().filter((status) => status.slug != 'draft' && (status.slug != 'private' || (status.slug == 'private' && this.$userCaps.hasCapability('tnc_rep_read_private_taxonomies'))));
} }
@ -325,10 +323,6 @@
...mapActions('taxonomy', [ ...mapActions('taxonomy', [
'fetch', 'fetch',
]), ]),
...mapGetters('taxonomy', [
'get',
'getRepositoryTotalTaxonomies'
]),
onChangeTab(status) { onChangeTab(status) {
this.page = 1; this.page = 1;
this.status = status; this.status = status;

View File

@ -476,18 +476,16 @@
} }
}, },
computed: { computed: {
collection() { ...mapGetters('collection', {
return this.getCollection(); 'collection': 'getCollection'
}, }),
metadataSections() { ...mapGetters('metadata', {
return this.getMetadataSections(); 'metadataSections': 'getMetadataSections'
}, }),
item() { ...mapGetters('item', {
// Fills hook forms with it's real values 'item': 'getItem',
this.updateExtraFormData(this.getItem()); 'totalAttachments': 'getTotalAttachments'
}),
return this.getItem();
},
itemMetadata() { itemMetadata() {
const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata())); const realItemMetadata = JSON.parse(JSON.stringify(this.getItemMetadata()));
const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => { const tweakedItemMetadata = realItemMetadata.map((anItemMetadatum) => {
@ -515,9 +513,6 @@
totalRelatedItems() { totalRelatedItems() {
return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false; return (this.item && this.item.related_items) ? Object.values(this.item.related_items).reduce((totalItems, aRelatedItemsGroup) => totalItems + parseInt(aRelatedItemsGroup.total_items), 0) : false;
}, },
totalAttachments() {
return this.getTotalAttachments();
},
itemVisibility() { itemVisibility() {
return (this.collection && this.collection.status == 'publish' && this.item && this.item.status == 'publish') ? 'open_access' : 'restrict_access' return (this.collection && this.collection.status == 'publish' && this.item && this.item.status == 'publish') ? 'open_access' : 'restrict_access'
}, },
@ -554,6 +549,12 @@
return !this.$adminOptions.hideItemSingleAttachments && (this.collection && this.collection.item_enable_attachments === 'yes'); return !this.$adminOptions.hideItemSingleAttachments && (this.collection && this.collection.item_enable_attachments === 'yes');
} }
}, },
watch: {
item() {
// Fills hook forms with it's real values
this.updateExtraFormData(this.item);
}
},
created() { created() {
// Obtains item and collection ID // Obtains item and collection ID
this.collectionId = this.$route.params.collectionId; this.collectionId = this.$route.params.collectionId;
@ -609,19 +610,11 @@
'fetchItemMetadata', 'fetchItemMetadata',
]), ]),
...mapGetters('item', [ ...mapGetters('item', [
'getItem', 'getItemMetadata'
'getItemMetadata',
'getTotalAttachments'
]),
...mapGetters('collection', [
'getCollection'
]), ]),
...mapActions('metadata',[ ...mapActions('metadata',[
'fetchMetadataSections' 'fetchMetadataSections'
]), ]),
...mapGetters('metadata',[
'getMetadataSections'
]),
loadMetadata() { loadMetadata() {
// Obtains Item Metadatum // Obtains Item Metadatum
this.fetchItemMetadata(this.itemId).then(() => { this.fetchItemMetadata(this.itemId).then(() => {

View File

@ -43,7 +43,11 @@
&:hover { &:hover {
border-color: var(--tainacan-input-color) !important; border-color: var(--tainacan-input-color) !important;
} }
&.has-placeholder-selected,
&.has-placeholder-selected:hover,
&.has-placeholder-selected:focus {
color: var(--tainacan-info-color) !important;
}
} }
&:not(.is-loading)::after { &:not(.is-loading)::after {
content: "arrowdown" !important; content: "arrowdown" !important;

View File

@ -49,7 +49,7 @@
background-color: var(--tainacan-red1); background-color: var(--tainacan-red1);
} }
} }
a[disabled] { a[disabled="true"] {
opacity: 0.5; opacity: 0.5;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;

View File

@ -238,10 +238,10 @@ export default class CollectionsModal extends React.Component {
) )
} }
</ul> </ul>
{ this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> : null }
</div> </div>
) )
: this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : : this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no collections found.', 'tainacan') }</p> <p>{ __('Sorry, no collections found.', 'tainacan') }</p>
</div> </div>
@ -269,7 +269,7 @@ export default class CollectionsModal extends React.Component {
</li> </li>
) )
} }
{ this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> : null }
</ul> </ul>
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Showing', 'tainacan') + " " + this.state.modalCollections.length + " " + __('of', 'tainacan') + " " + this.state.totalModalCollections + " " + __('collections', 'tainacan') + "."}</p> <p>{ __('Showing', 'tainacan') + " " + this.state.modalCollections.length + " " + __('of', 'tainacan') + " " + this.state.totalModalCollections + " " + __('collections', 'tainacan') + "."}</p>

View File

@ -88,7 +88,7 @@ export default function ({ attributes, setAttributes, isSelected, clientId }) {
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id } id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }
href={ collection.url }> href={ collection.url }>
{ ( !showCollectionThumbnail && Array.isArray(collectionItems) ) ? { ( !showCollectionThumbnail && Array.isArray(collectionItems) ) ?
<div class="collection-items-grid"> <div className="collection-items-grid">
<img <img
src={ collectionItems[0] ? thumbHelper.getSrc(collectionItems[0]['thumbnail'], imageSize, collectionItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` } src={ collectionItems[0] ? thumbHelper.getSrc(collectionItems[0]['thumbnail'], imageSize, collectionItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` }
srcSet={ collectionItems[0] ? thumbHelper.getSrcSet(collectionItems[0]['thumbnail'], imageSize, collectionItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` } srcSet={ collectionItems[0] ? thumbHelper.getSrcSet(collectionItems[0]['thumbnail'], imageSize, collectionItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` }
@ -424,12 +424,12 @@ export default function ({ attributes, setAttributes, isSelected, clientId }) {
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div> <div>
{ isSelected && collections.length ? { isSelected && collections.length ?
<div class="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div> <div className="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div>
: null : null
} }
{ collections.length ? ( { collections.length ? (
@ -445,7 +445,7 @@ export default function ({ attributes, setAttributes, isSelected, clientId }) {
</ul> </ul>
</div> </div>
<button <button
class="swiper-button-prev" className="swiper-button-prev"
slot="button-prev" slot="button-prev"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg
@ -464,7 +464,7 @@ export default function ({ attributes, setAttributes, isSelected, clientId }) {
</svg> </svg>
</button> </button>
<button <button
class="swiper-button-next" className="swiper-button-next"
slot="button-next" slot="button-next"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg

View File

@ -103,7 +103,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
<a <a
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id } id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
href={ item.url }> href={ item.url }>
<div class="items-list-item--image-wrap"> <div className="items-list-item--image-wrap">
<img <img
src={ thumbHelper.getSrc(item['thumbnail'], imageSize, item['document_mimetype']) } src={ thumbHelper.getSrc(item['thumbnail'], imageSize, item['document_mimetype']) }
srcSet={ thumbHelper.getSrcSet(item['thumbnail'], imageSize, item['document_mimetype']) } srcSet={ thumbHelper.getSrcSet(item['thumbnail'], imageSize, item['document_mimetype']) }
@ -580,13 +580,13 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
<div> { <div> {
isLoadingCollection ? isLoadingCollection ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> </div>
: :
<a <a
href={ collection.url ? collection.url : '' } href={ collection.url ? collection.url : '' }
class="carousel-items-collection-header"> className="carousel-items-collection-header">
<div <div
style={{ style={{
backgroundColor: collectionBackgroundColor ? collectionBackgroundColor : '', backgroundColor: collectionBackgroundColor ? collectionBackgroundColor : '',
@ -599,21 +599,21 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
((!collection || !collection.thumbnail || (!collection.thumbnail['tainacan-medium'] && !collection.thumbnail['medium'])) && (!collection || !collection.header_image) ? 'only-collection-name' : '') ((!collection || !collection.thumbnail || (!collection.thumbnail['tainacan-medium'] && !collection.thumbnail['medium'])) && (!collection || !collection.header_image) ? 'only-collection-name' : '')
}> }>
<h3 style={{ color: collectionTextColor ? collectionTextColor : '' }}> <h3 style={{ color: collectionTextColor ? collectionTextColor : '' }}>
{ showCollectionLabel ? <span class="label">{ __('Collection', 'tainacan') }<br/></span> : null } { showCollectionLabel ? <span className="label">{ __('Collection', 'tainacan') }<br/></span> : null }
{ collection && collection.name ? collection.name : '' } { collection && collection.name ? collection.name : '' }
</h3> </h3>
</div> </div>
{ {
collection && collection.thumbnail && (collection.thumbnail['tainacan-medium'] || collection.thumbnail['medium']) ? collection && collection.thumbnail && (collection.thumbnail['tainacan-medium'] || collection.thumbnail['medium']) ?
<div <div
class="collection-thumbnail" className="collection-thumbnail"
style={{ style={{
backgroundImage: 'url(' + (collection.thumbnail['tainacan-medium'] != undefined ? (collection.thumbnail['tainacan-medium'][0]) : (collection.thumbnail['medium'][0])) + ')', backgroundImage: 'url(' + (collection.thumbnail['tainacan-medium'] != undefined ? (collection.thumbnail['tainacan-medium'][0]) : (collection.thumbnail['medium'][0])) + ')',
}}/> }}/>
: null : null
} }
<div <div
class="collection-header-image" className="collection-header-image"
style={{ style={{
backgroundImage: collection.header_image ? 'url(' + collection.header_image + ')' : '', backgroundImage: collection.header_image ? 'url(' + collection.header_image + ')' : '',
minHeight: collection && collection.header_image ? '' : '80px', minHeight: collection && collection.header_image ? '' : '80px',
@ -667,12 +667,12 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div> <div>
{ isSelected && items.length ? { isSelected && items.length ?
<div class="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div> <div className="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div>
: null : null
} }
{ items.length ? ( { items.length ? (
@ -692,7 +692,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
</ul> </ul>
</div> </div>
<button <button
class="swiper-button-prev" className="swiper-button-prev"
slot="button-prev" slot="button-prev"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg
@ -711,7 +711,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
</svg> </svg>
</button> </button>
<button <button
class="swiper-button-next" className="swiper-button-next"
slot="button-next" slot="button-next"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg

View File

@ -89,7 +89,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id } id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }
href={ term.url }> href={ term.url }>
{ ( !showTermThumbnail && Array.isArray(termItems) ) ? { ( !showTermThumbnail && Array.isArray(termItems) ) ?
<div class="term-items-grid"> <div className="term-items-grid">
<img <img
src={ termItems[0] ? thumbHelper.getSrc(termItems[0]['thumbnail'], 'tainacan-medium', termItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` } src={ termItems[0] ? thumbHelper.getSrc(termItems[0]['thumbnail'], 'tainacan-medium', termItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` }
srcSet={ termItems[0] ? thumbHelper.getSrcSet(termItems[0]['thumbnail'], 'tainacan-medium', termItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` } srcSet={ termItems[0] ? thumbHelper.getSrcSet(termItems[0]['thumbnail'], 'tainacan-medium', termItems[0]['document_mimetype']) :`${tainacan_blocks.base_url}/assets/images/placeholder_square.png` }
@ -433,12 +433,12 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div> <div>
{ isSelected && terms.length ? { isSelected && terms.length ?
<div class="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div> <div className="preview-warning">{__('Warning: this is just a demonstration. To see the carousel in action, either preview or publish your post.', 'tainacan')}</div>
: null : null
} }
{ terms.length ? ( { terms.length ? (
@ -454,7 +454,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
</ul> </ul>
</div> </div>
<button <button
class="swiper-button-prev" className="swiper-button-prev"
slot="button-prev" slot="button-prev"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg
@ -473,7 +473,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }){
</svg> </svg>
</button> </button>
<button <button
class="swiper-button-next" className="swiper-button-next"
slot="button-next" slot="button-next"
style={{ cursor: 'not-allowed' }}> style={{ cursor: 'not-allowed' }}>
<svg <svg

View File

@ -240,10 +240,10 @@ export default class CollectionsModal extends React.Component {
) )
} }
</ul> </ul>
{ this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> : null }
</div> </div>
) )
: this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : : this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no collections found.', 'tainacan') }</p> <p>{ __('Sorry, no collections found.', 'tainacan') }</p>
</div> </div>
@ -271,7 +271,7 @@ export default class CollectionsModal extends React.Component {
</li> </li>
) )
} }
{ this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> : null }
</ul> </ul>
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Showing', 'tainacan') + " " + this.state.modalCollections.length + " " + __('of', 'tainacan') + " " + this.state.totalModalCollections + " " + __('collections', 'tainacan') + "."}</p> <p>{ __('Showing', 'tainacan') + " " + this.state.modalCollections.length + " " + __('of', 'tainacan') + " " + this.state.totalModalCollections + " " + __('collections', 'tainacan') + "."}</p>

View File

@ -32,9 +32,9 @@ export default function({ attributes, setAttributes, isSelected }) {
<button <button
onClick={ () => removeCollectionOfId(collection.id) } onClick={ () => removeCollectionOfId(collection.id) }
type="button" type="button"
class="components-button has-icon" className="components-button has-icon"
aria-label={__('Remove', 'tainacan')}> aria-label={__('Remove', 'tainacan')}>
<span class="dashicon dashicons dashicons-no-alt" /> <span className="dashicon dashicons dashicons-no-alt" />
</button> </button>
<a <a
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id } id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }

View File

@ -886,13 +886,13 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
<div> { <div> {
isLoadingCollection ? isLoadingCollection ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> </div>
: :
<a <a
href={ collection.url ? collection.url : '' } href={ collection.url ? collection.url : '' }
class="dynamic-items-collection-header"> className="dynamic-items-collection-header">
<div <div
style={{ style={{
backgroundColor: collectionBackgroundColor ? collectionBackgroundColor : '', backgroundColor: collectionBackgroundColor ? collectionBackgroundColor : '',
@ -905,21 +905,21 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
((!collection || !collection.thumbnail || (!collection.thumbnail['tainacan-medium'] && !collection.thumbnail['medium'])) && (!collection || !collection.header_image) ? 'only-collection-name' : '') ((!collection || !collection.thumbnail || (!collection.thumbnail['tainacan-medium'] && !collection.thumbnail['medium'])) && (!collection || !collection.header_image) ? 'only-collection-name' : '')
}> }>
<h3 style={{ color: collectionTextColor ? collectionTextColor : '' }}> <h3 style={{ color: collectionTextColor ? collectionTextColor : '' }}>
{ showCollectionLabel ? <span class="label">{ __('Collection', 'tainacan') }<br/></span> : null } { showCollectionLabel ? <span className="label">{ __('Collection', 'tainacan') }<br/></span> : null }
{ collection && collection.name ? collection.name : '' } { collection && collection.name ? collection.name : '' }
</h3> </h3>
</div> </div>
{ {
collection && collection.thumbnail && (collection.thumbnail['tainacan-medium'] || collection.thumbnail['medium']) ? collection && collection.thumbnail && (collection.thumbnail['tainacan-medium'] || collection.thumbnail['medium']) ?
<div <div
class="collection-thumbnail" className="collection-thumbnail"
style={{ style={{
backgroundImage: 'url(' + (collection.thumbnail['tainacan-medium'] != undefined ? (collection.thumbnail['tainacan-medium'][0]) : (collection.thumbnail['medium'][0])) + ')', backgroundImage: 'url(' + (collection.thumbnail['tainacan-medium'] != undefined ? (collection.thumbnail['tainacan-medium'][0]) : (collection.thumbnail['medium'][0])) + ')',
}}/> }}/>
: null : null
} }
<div <div
class="collection-header-image" className="collection-header-image"
style={{ style={{
backgroundImage: collection.header_image ? 'url(' + collection.header_image + ')' : '', backgroundImage: collection.header_image ? 'url(' + collection.header_image + ')' : '',
minHeight: collection && collection.header_image ? '' : '80px', minHeight: collection && collection.header_image ? '' : '80px',
@ -933,12 +933,12 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
{ {
showSearchBar ? showSearchBar ?
<div class="dynamic-items-search-bar"> <div className="dynamic-items-search-bar">
<Button <Button
onClick={ () => { order = 'asc'; setAttributes({ order: order }); setContent(); }} onClick={ () => { order = 'asc'; setAttributes({ order: order }); setContent(); }}
className={order == 'asc' ? 'sorting-button-selected' : ''} className={order == 'asc' ? 'sorting-button-selected' : ''}
label={__('Sort ascending', 'tainacan')}> label={__('Sort ascending', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg width="24" height="24" viewBox="-2 -4 20 20"> <svg width="24" height="24" viewBox="-2 -4 20 20">
<path d="M6.7,10.8l-3.3,3.3L0,10.8h2.5V0h1.7v10.8H6.7z M11.7,0.8H8.3v1.7h3.3V0.8z M14.2,5.8H8.3v1.7h5.8V5.8z M16.7,10.8H8.3v1.7 h8.3V10.8z"/> <path d="M6.7,10.8l-3.3,3.3L0,10.8h2.5V0h1.7v10.8H6.7z M11.7,0.8H8.3v1.7h3.3V0.8z M14.2,5.8H8.3v1.7h5.8V5.8z M16.7,10.8H8.3v1.7 h8.3V10.8z"/>
@ -950,7 +950,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
onClick={ () => { order = 'desc'; setAttributes({ order: order }); setContent(); }} onClick={ () => { order = 'desc'; setAttributes({ order: order }); setContent(); }}
className={order == 'desc' ? 'sorting-button-selected' : ''} className={order == 'desc' ? 'sorting-button-selected' : ''}
label={__('Sort descending', 'tainacan')}> label={__('Sort descending', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg width="24" height="24" viewBox="-2 -4 20 20"> <svg width="24" height="24" viewBox="-2 -4 20 20">
<path d="M6.7,3.3H4.2v10.8H2.5V3.3H0L3.3,0L6.7,3.3z M11.6,2.5H8.3v1.7h3.3V2.5z M14.1,7.5H8.3v1.7h5.8V7.5z M16.6,12.5H8.3v1.7 h8.3V12.5z"/> <path d="M6.7,3.3H4.2v10.8H2.5V3.3H0L3.3,0L6.7,3.3z M11.6,2.5H8.3v1.7h3.3V2.5z M14.1,7.5H8.3v1.7h5.8V7.5z M16.6,12.5H8.3v1.7 h8.3V12.5z"/>
@ -961,10 +961,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
<Button <Button
onClick={ () => { setContent(); }} onClick={ () => { setContent(); }}
label={__('Search', 'tainacan')}> label={__('Search', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg width="24" height="24" viewBox="-2 -4 20 20"> <svg width="24" height="24" viewBox="-2 -4 20 20">
<path class="st0" d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5 <path className="st0" d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5
c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6 c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6
c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2 c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2
c-0.1,0-0.6,0.2-0.6,0.1c0,0-4.2-4.2-4.2-4.2c0,0-0.8,0.3-0.8,0.4c-1.3,0.4-2.8,0.5-4.1-0.1c-0.7-0.3-1.3-0.7-1.8-1.2 c-0.1,0-0.6,0.2-0.6,0.1c0,0-4.2-4.2-4.2-4.2c0,0-0.8,0.3-0.8,0.4c-1.3,0.4-2.8,0.5-4.1-0.1c-0.7-0.3-1.3-0.7-1.8-1.2
@ -980,10 +980,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
onChange={ (value) => { _.debounce(applySearchString(value), 300); } } onChange={ (value) => { _.debounce(applySearchString(value), 300); } }
type="text"/> type="text"/>
<Button <Button
class="previous-button" className="previous-button"
disabled disabled
label={__('Previous page', 'tainacan')}> label={__('Previous page', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg <svg
width="30" width="30"
@ -998,10 +998,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
</span> </span>
</Button> </Button>
<Button <Button
class="next-button" className="next-button"
disabled disabled
label={__('Next page', 'tainacan')}> label={__('Next page', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg <svg
width="30" width="30"
@ -1062,7 +1062,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div> <div>

View File

@ -353,7 +353,7 @@ export default class CollectionModal extends React.Component {
} }
</div> </div>
</div> </div>
) : this.state.isLoadingCollections ? <div class="spinner-container"><Spinner /></div> : ) : this.state.isLoadingCollections ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no collection found.', 'tainacan') }</p> <p>{ __('Sorry, no collection found.', 'tainacan') }</p>
</div> </div>

View File

@ -227,7 +227,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
onClick={ onToggle } onClick={ onToggle }
aria-expanded={ isOpen }> aria-expanded={ isOpen }>
{ __('Items list source', 'tainacan') } { __('Items list source', 'tainacan') }
<span class="components-dropdown-menu__indicator"></span> <span className="components-dropdown-menu__indicator"></span>
</ToolbarButton> </ToolbarButton>
) } ) }
renderContent={ ( { onToggle } ) => ( renderContent={ ( { onToggle } ) => (
@ -808,7 +808,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
) : ) :
( (
<div style={{ fontSize: (baseFontSize - 2) + 'px' }}> <div style={{ fontSize: (baseFontSize - 2) + 'px' }}>
<div class="preview-warning"> <div className="preview-warning">
{ __('Warning: this is just a demonstration. To see the items list, either preview or publish your post.', 'tainacan') } { __('Warning: this is just a demonstration. To see the items list, either preview or publish your post.', 'tainacan') }
</div> </div>
<div <div
@ -828,139 +828,139 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
'--tainacan-primary': primaryColor, '--tainacan-primary': primaryColor,
'--tainacan-secondary': secondaryColor '--tainacan-secondary': secondaryColor
}} }}
class="items-list-placeholder"> className="items-list-placeholder">
<div class="search-control"> <div className="search-control">
{ {
!hideSearch ? !hideSearch ?
<span class="fake-searchbar"> <span className="fake-searchbar">
{ !hideAdvancedSearch ? <span class="fake-advanced-searchbar"></span> : null } { !hideAdvancedSearch ? <span className="fake-advanced-searchbar"></span> : null }
</span> </span>
: null : null
} }
{ {
showFiltersButtonInsideSearchControl && !hideHideFiltersButton ? <span class="fake-button"><div class="fake-icon"></div><div class="fake-text"></div></span> : null showFiltersButtonInsideSearchControl && !hideHideFiltersButton ? <span className="fake-button"><div className="fake-icon"></div><div className="fake-text"></div></span> : null
} }
{ {
!hideDisplayedMetadataButton ? !hideDisplayedMetadataButton ?
<span class="fake-button"><div class="fake-text"></div></span> <span className="fake-button"><div className="fake-text"></div></span>
:null :null
} }
{ {
!hideSortingArea ? !hideSortingArea ?
<span class="fake-button"> { !hideSortByButton ? <div class="fake-text"></div> : null }<div class="fake-icon"></div><div class="fake-text"></div></span> <span className="fake-button"> { !hideSortByButton ? <div className="fake-text"></div> : null }<div className="fake-icon"></div><div className="fake-text"></div></span>
:null :null
} }
{ {
!showInlineViewModeOptions ? !showInlineViewModeOptions ?
<span class="fake-button"><div class="fake-icon"></div><div class="fake-text"></div></span> <span className="fake-button"><div className="fake-icon"></div><div className="fake-text"></div></span>
: :
<div class="fake-buttons-group"> <div className="fake-buttons-group">
{ Array(3).fill().map( () => <div class="fake-button"><div class="fake-icon"></div></div> )} { Array(3).fill().map( () => <div className="fake-button"><div className="fake-icon"></div></div> )}
{ showFullscreenWithViewModes ? <span class="fake-button"><div class="fake-icon"></div></span> : null } { showFullscreenWithViewModes ? <span className="fake-button"><div className="fake-icon"></div></span> : null }
</div> </div>
} }
{ {
!showFullscreenWithViewModes ? <span class="fake-button"><div class="fake-icon"></div><div class="fake-text"></div></span> : null !showFullscreenWithViewModes ? <span className="fake-button"><div className="fake-icon"></div><div className="fake-text"></div></span> : null
} }
{ {
!hideExposersButton ? <span class="fake-button"><div class="fake-icon"></div><div class="fake-text"></div></span> : null !hideExposersButton ? <span className="fake-button"><div className="fake-icon"></div><div className="fake-text"></div></span> : null
} }
</div> </div>
<div class="below-search-control"> <div className="below-search-control">
{ !showFiltersButtonInsideSearchControl & !hideHideFiltersButton && !hideFilters ? <span class="fake-hide-button"><div class="fake-icon"></div></span> : null } { !showFiltersButtonInsideSearchControl & !hideHideFiltersButton && !hideFilters ? <span className="fake-hide-button"><div className="fake-icon"></div></span> : null }
{ {
!hideFilters && !filtersAsModal && !startWithFiltersHidden ? !hideFilters && !filtersAsModal && !startWithFiltersHidden ?
<div <div
style={{ style={{
flexBasis: filtersAreaWidth + '%' flexBasis: filtersAreaWidth + '%'
}} }}
class="filters"> className="filters">
<div class="fake-filters-heading"></div> <div className="fake-filters-heading"></div>
{ Array(2).fill().map( () => { { Array(2).fill().map( () => {
return <div class="fake-filter"> return <div className="fake-filter">
<span class="fake-text"></span> <span className="fake-text"></span>
<span class="fake-searchbar"></span> <span className="fake-searchbar"></span>
</div> </div>
} )} } )}
<div class="fake-filter"> <div className="fake-filter">
<span class="fake-text"></span> <span className="fake-text"></span>
<div class="fake-checkbox-list"> <div className="fake-checkbox-list">
{ Array(4).fill().map( () => { { Array(4).fill().map( () => {
return <div> return <div>
<span class="fake-checkbox"></span> <span className="fake-checkbox"></span>
<span class="fake-text"></span> <span className="fake-text"></span>
</div> </div>
} ) } } ) }
<div class="fake-link"></div> <div className="fake-link"></div>
</div> </div>
</div> </div>
<div class="fake-filter"> <div className="fake-filter">
<span class="fake-text"></span> <span className="fake-text"></span>
<span class="fake-searchbar"></span> <span className="fake-searchbar"></span>
</div> </div>
<div class="fake-filter"> <div className="fake-filter">
<span class="fake-text"></span> <span className="fake-text"></span>
<div class="fake-checkbox-list"> <div className="fake-checkbox-list">
{ Array(2).fill().map( () => { { Array(2).fill().map( () => {
return <div> return <div>
<span class="fake-checkbox"></span> <span className="fake-checkbox"></span>
<span class="fake-text"></span> <span className="fake-text"></span>
</div> </div>
} ) } } ) }
<div class="fake-link"></div> <div className="fake-link"></div>
</div> </div>
</div> </div>
</div> </div>
: null : null
} }
<div class="aside-filters"> <div className="aside-filters">
<div className={ 'items' + (hideItemsThumbnail ? ' items-without-thumbnail' : '') }> <div className={ 'items' + (hideItemsThumbnail ? ' items-without-thumbnail' : '') }>
{ Array(5).fill().map( () => { { Array(5).fill().map( () => {
return <div class="fake-item"> return <div className="fake-item">
<div class="fake-item-header"> <div className="fake-item-header">
<div class="fake-text"></div> <div className="fake-text"></div>
</div> </div>
<div <div
style={{ style={{
backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : '' backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : ''
}} }}
class="fake-item-thumb"></div> className="fake-item-thumb"></div>
{ Array(3).fill().map( () => <div class="fake-item-description"></div> ) } { Array(3).fill().map( () => <div className="fake-item-description"></div> ) }
</div> </div>
} ) } } ) }
<div class="fake-item fake-item-hovered"> <div className="fake-item fake-item-hovered">
<div class="fake-item-header"> <div className="fake-item-header">
<div class="fake-tooltip"><div class="fake-link"></div></div> <div className="fake-tooltip"><div className="fake-link"></div></div>
<div class="fake-text"></div> <div className="fake-text"></div>
</div> </div>
<div <div
style={{ style={{
backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : '' backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : ''
}} }}
class="fake-item-thumb"></div> className="fake-item-thumb"></div>
{ Array(3).fill().map( () => <div class="fake-item-description"></div> ) } { Array(3).fill().map( () => <div className="fake-item-description"></div> ) }
</div> </div>
{ Array(2).fill().map( () => { { Array(2).fill().map( () => {
return <div class="fake-item"> return <div className="fake-item">
<div class="fake-item-header"> <div className="fake-item-header">
<div class="fake-text"></div> <div className="fake-text"></div>
</div> </div>
<div <div
style={{ style={{
backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : '' backgroundImage: tainacan_plugin ? 'url("' + tainacan_plugin.base_url + '/assets/images/placeholder_square.png")' : ''
}} }}
class="fake-item-thumb"></div> className="fake-item-thumb"></div>
{ Array(3).fill().map( () => <div class="fake-item-description"></div> ) } { Array(3).fill().map( () => <div className="fake-item-description"></div> ) }
</div> </div>
} ) } } ) }
</div> </div>
{ !hidePaginationArea ? { !hidePaginationArea ?
<div class="pagination"> <div className="pagination">
<span class="fake-text"></span> <span className="fake-text"></span>
{ !hideItemsPerPageButton ? <span class="fake-button"><div class="fake-text"></div></span> : null } { !hideItemsPerPageButton ? <span className="fake-button"><div className="fake-text"></div></span> : null }
{ !hideGoToPageButton ? <span class="fake-button"><div class="fake-text"></div></span> : null } { !hideGoToPageButton ? <span className="fake-button"><div className="fake-text"></div></span> : null }
<div class="fake-buttons-group"> <div className="fake-buttons-group">
{ Array(6).fill().map( () => <div class="fake-link"></div> ) } { Array(6).fill().map( () => <div className="fake-link"></div> ) }
</div> </div>
</div> </div>
: null } : null }

View File

@ -325,10 +325,10 @@ export default class TermModal extends React.Component {
} } /> } } />
} }
</ul> </ul>
{ this.state.isLoadingTerms ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingTerms ? <div className="spinner-container"><Spinner /></div> : null }
</div> </div>
) )
: this.state.isLoadingTerms ? <div class="spinner-container"><Spinner /></div> : : this.state.isLoadingTerms ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no terms found.', 'tainacan') }</p> <p>{ __('Sorry, no terms found.', 'tainacan') }</p>
</div> </div>
@ -350,7 +350,7 @@ export default class TermModal extends React.Component {
} } /> } } />
} }
</ul> </ul>
{ this.state.isLoadingTerms ? <div class="spinner-container"><Spinner /></div> : null } { this.state.isLoadingTerms ? <div className="spinner-container"><Spinner /></div> : null }
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Showing', 'tainacan') + " " + this.state.modalTerms.length + " " + __('of', 'tainacan') + " " + this.state.totalModalTerms + " " + __('terms', 'tainacan') + "."}</p> <p>{ __('Showing', 'tainacan') + " " + this.state.modalTerms.length + " " + __('of', 'tainacan') + " " + this.state.totalModalTerms + " " + __('terms', 'tainacan') + "."}</p>
{ {
@ -365,7 +365,7 @@ export default class TermModal extends React.Component {
} }
</div> </div>
</div> </div>
) : this.state.isLoadingTerms ? <div class="spinner-container"><Spinner /></div> : ) : this.state.isLoadingTerms ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no terms found.', 'tainacan') }</p> <p>{ __('Sorry, no terms found.', 'tainacan') }</p>
</div> </div>
@ -448,7 +448,7 @@ export default class TermModal extends React.Component {
</div> </div>
) : ) :
this.state.isLoadingTaxonomies ? ( this.state.isLoadingTaxonomies ? (
<div class="spinner-container"><Spinner /></div> <div className="spinner-container"><Spinner /></div>
) : ) :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no taxonomy found.', 'tainacan') }</p> <p>{ __('Sorry, no taxonomy found.', 'tainacan') }</p>
@ -485,7 +485,7 @@ export default class TermModal extends React.Component {
} }
</div> </div>
</div> </div>
) : this.state.isLoadingTaxonomies ? <div class="spinner-container"><Spinner /></div> : ) : this.state.isLoadingTaxonomies ? <div className="spinner-container"><Spinner /></div> :
<div className="modal-loadmore-section"> <div className="modal-loadmore-section">
<p>{ __('Sorry, no taxonomy found.', 'tainacan') }</p> <p>{ __('Sorry, no taxonomy found.', 'tainacan') }</p>
</div> </div>

View File

@ -517,11 +517,11 @@ export default {
itemsLocations: { itemsLocations: {
handler() { handler() {
setTimeout(() => { setTimeout(() => {
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].leafletObject ) {
if (this.itemsLocations.length == 1) if (this.itemsLocations.length == 1)
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
else else
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
} }
}, 500) }, 500)
}, },
@ -555,8 +555,8 @@ export default {
this.$userPrefs.set(prefsGeocoordinateMetadatum, id); this.$userPrefs.set(prefsGeocoordinateMetadatum, id);
}, },
onMapReady() { onMapReady() {
if ( LeafletActiveArea && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) if ( LeafletActiveArea && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].leafletObject )
this.$refs['tainacan-view-mode-map'].mapObject.setActiveArea('leaflet-active-area'); this.$refs['tainacan-view-mode-map'].leafletObject.setActiveArea('leaflet-active-area');
}, },
getItemImageHeight(imageWidth, imageHeight) { getItemImageHeight(imageWidth, imageHeight) {
let itemWidth = 120; let itemWidth = 120;
@ -571,19 +571,19 @@ export default {
clearSelectedMarkers() { clearSelectedMarkers() {
this.mapSelectedItemId = false; this.mapSelectedItemId = false;
this.selectedMarkerIndexes = []; this.selectedMarkerIndexes = [];
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].leafletObject ) {
if (this.itemsLocations.length == 1) if (this.itemsLocations.length == 1)
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.panInsideBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
else else
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.flyToBounds(this.itemsLocations.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
} }
}, },
showItemByLocation(index) { showItemByLocation(index) {
this.mapSelectedItemId = this.itemsLocations[index].item.id; this.mapSelectedItemId = this.itemsLocations[index].item.id;
this.selectedMarkerIndexes = []; this.selectedMarkerIndexes = [];
this.selectedMarkerIndexes.push(index); this.selectedMarkerIndexes.push(index);
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].leafletObject )
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.panInsideBounds( [ this.itemsLocations[index].location ], { animate: true, maxZoom: 16 });
}, },
showLocationsByItem(item) { showLocationsByItem(item) {
this.mapSelectedItemId = item.id; this.mapSelectedItemId = item.id;
@ -596,11 +596,11 @@ export default {
}) })
if ( selectedLocationsByItem.length) { if ( selectedLocationsByItem.length) {
if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].mapObject ) { if ( this.itemsLocations.length && this.$refs['tainacan-view-mode-map'] && this.$refs['tainacan-view-mode-map'].leafletObject ) {
if (selectedLocationsByItem.length > 1) if (selectedLocationsByItem.length > 1)
this.$refs['tainacan-view-mode-map'].mapObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.flyToBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
else else
this.$refs['tainacan-view-mode-map'].mapObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 }); this.$refs['tainacan-view-mode-map'].leafletObject.panInsideBounds( selectedLocationsByItem.map((anItemLocation) => anItemLocation.location), { animate: true, maxZoom: 16 });
} }
} else { } else {
this.$buefy.snackbar.open({ this.$buefy.snackbar.open({

View File

@ -402,18 +402,18 @@ export default {
} }
}, },
computed: { computed: {
item() { ...mapGetters('item', {
return this.getItem(); 'item': 'getItem'
}, }),
page() { ...mapGetters('search', {
this.setMaxAndMinPages(); 'totalPages': 'getTotalPages',
return this.getPage(); 'page': 'getPage',
}, })
totalPages() {
return this.getTotalPages();
}
}, },
watch: { watch: {
page() {
this.setMaxAndMinPages();
},
isLoading: { isLoading: {
handler(val, oldValue) { handler(val, oldValue) {
if (val === false && oldValue === true && this.swiper && this.items && this.items.length) { if (val === false && oldValue === true && this.swiper && this.items && this.items.length) {
@ -540,14 +540,6 @@ export default {
'fetchItem', 'fetchItem',
'replaceItem' 'replaceItem'
]), ]),
...mapGetters('item', [
'getItem'
]),
...mapGetters('search', [
'getTotalPages',
'getPage',
'getItemsPerPage'
]),
setMaxAndMinPages () { setMaxAndMinPages () {
this.minPage = JSON.parse(JSON.stringify(this.getPage() < this.minPage ? this.getPage() : this.minPage)); this.minPage = JSON.parse(JSON.stringify(this.getPage() < this.minPage ? this.getPage() : this.minPage));
this.maxPage = JSON.parse(JSON.stringify(this.getPage() > this.maxPage ? this.getPage() : this.maxPage)); this.maxPage = JSON.parse(JSON.stringify(this.getPage() > this.maxPage ? this.getPage() : this.maxPage));

View File

@ -770,6 +770,24 @@
} }
}, },
computed: { computed: {
...mapGetters('collection', {
'items': 'getItems',
'itemsListTemplate': 'getItemsListTemplate'
}),
...mapGetters('metadata', {
'metadata': 'getMetadata'
}),
...mapGetters('search', {
'searchQuery': 'getSearchQuery',
'orderBy': 'getOrderBy',
'order': 'getOrder',
'viewMode': 'getViewMode',
'totalItems': 'getTotalItems',
'sentenceMode': 'getSentenceMode',
'metaKey': 'getMetaKey',
'page': 'getPage',
'itemsPerPage': 'getItemsPerPage'
}),
wrapperClasses() { wrapperClasses() {
return { return {
'is-filters-menu-open': !this.hideFilters && this.isFiltersModalActive && !this.openAdvancedSearch, 'is-filters-menu-open': !this.hideFilters && this.isFiltersModalActive && !this.openAdvancedSearch,
@ -782,39 +800,9 @@
isSortingByCustomMetadata() { isSortingByCustomMetadata() {
return (this.orderBy != undefined && this.orderBy != '' && this.orderBy != 'title' && this.orderBy != 'creation_date' && this.orderBy != 'date' && this.orderBy != 'modified'); return (this.orderBy != undefined && this.orderBy != '' && this.orderBy != 'title' && this.orderBy != 'creation_date' && this.orderBy != 'date' && this.orderBy != 'modified');
}, },
items() {
return this.getItems();
},
itemsListTemplate() {
return this.getItemsListTemplate();
},
totalItems() {
return this.getTotalItems();
},
metadata() {
return this.getMetadata();
},
searchQuery() {
return this.getSearchQuery();
},
sentenceMode() {
return this.getSentenceMode();
},
viewMode() {
return this.getViewMode();
},
orderBy() {
return this.getOrderBy();
},
order() {
return this.getOrder();
},
showLoading() { showLoading() {
return this.isLoadingItems || this.isLoadingMetadata; return this.isLoadingItems || this.isLoadingMetadata;
}, },
metaKey() {
return this.getMetaKey();
},
orderByName() { orderByName() {
const metadatumName = this.$orderByHelper.getOrderByMetadatumName({ const metadatumName = this.$orderByHelper.getOrderByMetadatumName({
orderby: this.$route.query.orderby, orderby: this.$route.query.orderby,
@ -1128,8 +1116,8 @@
let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(viewMode => viewMode == this.$userPrefs.get(prefsViewMode)); let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(viewMode => viewMode == this.$userPrefs.get(prefsViewMode));
if (existingViewModeIndex >= 0) { if (existingViewModeIndex >= 0) {
if (!this.registeredViewModes[Object.keys(this.registeredViewModes)[existingViewModeIndex]].show_pagination) { if (!this.registeredViewModes[Object.keys(this.registeredViewModes)[existingViewModeIndex]].show_pagination) {
this.latestPerPageAfterViewModeWithoutPagination = this.getItemsPerPage(); this.latestPerPageAfterViewModeWithoutPagination = this.itemsPerPage;
this.latestPageAfterViewModeWithoutPagination = this.getPage(); this.latestPageAfterViewModeWithoutPagination = this.page;
this.$eventBusSearch.setItemsPerPage(24, true); this.$eventBusSearch.setItemsPerPage(24, true);
} }
@ -1191,28 +1179,9 @@
}, },
methods: { methods: {
...mapGetters('collection', [
'getCollection',
'getItems',
'getItemsListTemplate'
]),
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadata' 'fetchMetadata'
]), ]),
...mapGetters('metadata', [
'getMetadata'
]),
...mapGetters('search', [
'getSearchQuery',
'getOrderBy',
'getOrder',
'getViewMode',
'getTotalItems',
'getSentenceMode',
'getMetaKey',
'getPage',
'getItemsPerPage'
]),
parseHooks() { parseHooks() {
if (wp !== undefined && wp.hooks !== undefined) { if (wp !== undefined && wp.hooks !== undefined) {
@ -1324,8 +1293,8 @@
let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(aViewMode => aViewMode == viewMode); let existingViewModeIndex = Object.keys(this.registeredViewModes).findIndex(aViewMode => aViewMode == viewMode);
if (existingViewModeIndex >= 0) { if (existingViewModeIndex >= 0) {
if (!this.registeredViewModes[Object.keys(this.registeredViewModes)[existingViewModeIndex]].show_pagination) { if (!this.registeredViewModes[Object.keys(this.registeredViewModes)[existingViewModeIndex]].show_pagination) {
this.latestPerPageAfterViewModeWithoutPagination = this.getItemsPerPage(); this.latestPerPageAfterViewModeWithoutPagination = this.itemsPerPage;
this.latestPageAfterViewModeWithoutPagination = this.getPage(); this.latestPageAfterViewModeWithoutPagination = this.page;
this.$eventBusSearch.setItemsPerPage(24, true); this.$eventBusSearch.setItemsPerPage(24, true);
} }

View File

@ -147,7 +147,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
<span>{ facet.label ? facet.label : '' }</span> <span>{ facet.label ? facet.label : '' }</span>
{ {
facet.total_items ? facet.total_items ?
<span class="facet-item-count" style={{ display: !showItemsCount ? 'none' : '' }}> <span className="facet-item-count" style={{ display: !showItemsCount ? 'none' : '' }}>
{ itemsCountStyle === 'below' ? { itemsCountStyle === 'below' ?
( facet.total_items != 1 ? (facet.total_items + ' ' + __('items', 'tainacan' )) : (facet.total_items + ' ' + __('item', 'tainacan' )) ) ( facet.total_items != 1 ? (facet.total_items + ' ' + __('items', 'tainacan' )) : (facet.total_items + ' ' + __('item', 'tainacan' )) )
: :
@ -182,19 +182,19 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
</a> </a>
{ appendChildTerms && facet.total_children > 0 ? { appendChildTerms && facet.total_children > 0 ?
isLoadingChildTerms == facetId ? isLoadingChildTerms == facetId ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> </div>
: :
( childFacetsObject[facetId] && childFacetsObject[facetId].visible ? ( childFacetsObject[facetId] && childFacetsObject[facetId].visible ?
<ul class="child-term-facets"> <ul className="child-term-facets">
{ {
childFacetsObject[facetId].facets.length ? childFacetsObject[facetId].facets.length ?
childFacetsObject[facetId].facets.map((aChildTermFacet) => { childFacetsObject[facetId].facets.map((aChildTermFacet) => {
return prepareFacet(aChildTermFacet); return prepareFacet(aChildTermFacet);
}) })
: :
<p class="no-child-facet-found">{ __( 'The child terms of this facet do not contain items.', 'tainacan' )}</p> <p className="no-child-facet-found">{ __( 'The child terms of this facet do not contain items.', 'tainacan' )}</p>
} }
</ul> </ul>
: null ) : null )
@ -790,14 +790,14 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
{ {
showSearchBar ? showSearchBar ?
<div class="facets-search-bar"> <div className="facets-search-bar">
<Button <Button
onClick={ () => { setContent(); }} onClick={ () => { setContent(); }}
label={__('Search', 'tainacan')}> label={__('Search', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg width="24" height="24" viewBox="-2 -4 20 20"> <svg width="24" height="24" viewBox="-2 -4 20 20">
<path class="st0" d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5 <path className="st0" d="M0,5.8C0,5,0.2,4.2,0.5,3.5s0.7-1.3,1.2-1.8s1.1-0.9,1.8-1.2C4.2,0.1,5,0,5.8,0S7.3,0.1,8,0.5
c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6 c0.7,0.3,1.3,0.7,1.8,1.2s0.9,1.1,1.2,1.8c0.5,1.2,0.5,2.5,0.2,3.7c0,0.2-0.1,0.4-0.2,0.6c0,0.1-0.2,0.6-0.2,0.6
c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2 c0.6,0.6,1.3,1.3,1.9,1.9c0.7,0.7,1.3,1.3,2,2c0,0,0.3,0.2,0.3,0.3c0,0.3-0.1,0.7-0.3,1c-0.2,0.6-0.8,1-1.4,1.2
c-0.1,0-0.6,0.2-0.6,0.1c0,0-4.2-4.2-4.2-4.2c0,0-0.8,0.3-0.8,0.4c-1.3,0.4-2.8,0.5-4.1-0.1c-0.7-0.3-1.3-0.7-1.8-1.2 c-0.1,0-0.6,0.2-0.6,0.1c0,0-4.2-4.2-4.2-4.2c0,0-0.8,0.3-0.8,0.4c-1.3,0.4-2.8,0.5-4.1-0.1c-0.7-0.3-1.3-0.7-1.8-1.2
@ -866,7 +866,7 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div> <div>
@ -901,10 +901,10 @@ export default function({ attributes, setAttributes, isSelected, clientId }) {
{ showLoadMore && facets.length > 0 && !isLoading ? { showLoadMore && facets.length > 0 && !isLoading ?
<button <button
class="show-more-button" className="show-more-button"
disabled disabled
label={__('Show more', 'tainacan')}> label={__('Show more', 'tainacan')}>
<span class="icon"> <span className="icon">
<i> <i>
<svg <svg
width="24" width="24"

View File

@ -364,7 +364,7 @@ export default class MetadataModal extends React.Component {
<div> <div>
<div className="modal-radio-list"> <div className="modal-radio-list">
<p class="modal-radio-area-label">{__('Repository', 'tainacan')}</p> <p className="modal-radio-area-label">{__('Repository', 'tainacan')}</p>
<RadioControl <RadioControl
className={'repository-radio-option'} className={'repository-radio-option'}
selected={ this.state.temporaryCollectionId } selected={ this.state.temporaryCollectionId }
@ -373,7 +373,7 @@ export default class MetadataModal extends React.Component {
this.setState({ temporaryCollectionId: aCollectionId }); this.setState({ temporaryCollectionId: aCollectionId });
} } /> } } />
<hr/> <hr/>
<p class="modal-radio-area-label">{__('Collections', 'tainacan')}</p> <p className="modal-radio-area-label">{__('Collections', 'tainacan')}</p>
<RadioControl <RadioControl
selected={ this.state.temporaryCollectionId } selected={ this.state.temporaryCollectionId }
options={ options={

View File

@ -215,7 +215,7 @@ export default class ParentTermModal extends React.Component {
<div> <div>
<div className="modal-radio-list"> <div className="modal-radio-list">
<p class="modal-radio-area-label">{__('Non specific term', 'tainacan')}</p> <p className="modal-radio-area-label">{__('Non specific term', 'tainacan')}</p>
<RadioControl <RadioControl
className={'repository-radio-option'} className={'repository-radio-option'}
selected={ this.state.temporaryFacetId != null ? this.state.temporaryFacetId : ''} selected={ this.state.temporaryFacetId != null ? this.state.temporaryFacetId : ''}
@ -227,7 +227,7 @@ export default class ParentTermModal extends React.Component {
this.setState({ temporaryFacetId: aFacetId}); this.setState({ temporaryFacetId: aFacetId});
} } /> } } />
<hr/> <hr/>
<p class="modal-radio-area-label">{__('Terms', 'tainacan')}</p> <p className="modal-radio-area-label">{__('Terms', 'tainacan')}</p>
<RadioControl <RadioControl
selected={ this.state.temporaryFacetId } selected={ this.state.temporaryFacetId }
options={ options={

View File

@ -383,7 +383,7 @@ export default function ({ attributes, setAttributes, isSelected, clientId }) {
{ itemId || templateMode ? ( { itemId || templateMode ? (
<div className={ 'item-gallery-edit-container' }> <div className={ 'item-gallery-edit-container' }>
<div class="preview-warning">{__('Warning: this is just a demonstration. To see the gallery in action, either preview or publish your post.', 'tainacan') }</div> <div className="preview-warning">{__('Warning: this is just a demonstration. To see the gallery in action, either preview or publish your post.', 'tainacan') }</div>
<ServerSideRender <ServerSideRender
block="tainacan/item-gallery" block="tainacan/item-gallery"
attributes={ attributes } attributes={ attributes }

View File

@ -282,13 +282,13 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
(item.title.description && !self.options.hide_media_description) (item.title.description && !self.options.hide_media_description)
) )
) { ) {
innerHTML += '<div class="pswp__caption-inner">'; innerHTML += '<div className="pswp__caption-inner">';
if (item.title.caption && !self.options.hide_media_caption) if (item.title.caption && !self.options.hide_media_caption)
innerHTML += '<span class="pswp__figure_caption">' + item.title.caption.innerHTML + '</span>'; innerHTML += '<span className="pswp__figure_caption">' + item.title.caption.innerHTML + '</span>';
if (item.title.description && !self.options.hide_media_description) if (item.title.description && !self.options.hide_media_description)
innerHTML += '<span class="pswp__description">' + item.title.description.innerHTML + '</span>'; innerHTML += '<span className="pswp__description">' + item.title.description.innerHTML + '</span>';
innerHTML += '</div>'; innerHTML += '</div>';
} }

View File

@ -263,7 +263,7 @@ export default function ({ attributes, setAttributes, isSelected }) {
} }
{ isLoading ? { isLoading ?
<div class="spinner-container"> <div className="spinner-container">
<Spinner /> <Spinner />
</div> : </div> :
<div className={ 'item-metadata-sections-edit-container' }> <div className={ 'item-metadata-sections-edit-container' }>

View File

@ -6,9 +6,9 @@
viewBox="0 0 6 6" viewBox="0 0 6 6"
height="24px" height="24px"
width="24px"> width="24px">
<Path d="m1.2849 0.84891c-0.085556 0-0.15764 0.029712-0.21631 0.088379-0.058667 0.058667-0.087891 0.13075-0.087891 0.21631v0.76611c0 0.083111 0.030686 0.1552 0.091797 0.21631l1.0669 1.0669c0.026889 0.026889 0.058548 0.049295 0.095215 0.066406 0.039111 0.017111 0.079538 0.025391 0.12109 0.025391 0.041556 0 0.080521-0.00828 0.11719-0.025391 0.039111-0.017111 0.072232-0.039518 0.099121-0.066406l0.7627-0.7627c0.058667-0.058667 0.087891-0.13075 0.087891-0.21631 0-0.085556-0.029224-0.15764-0.087891-0.21631l-1.0708-1.0703c-0.058667-0.058667-0.12929-0.088379-0.2124-0.088379zm0.21924 0.30469c0.00391-1.815e-4 0.00775 0 0.011719 0 0.063556 0 0.11762 0.022891 0.16162 0.069336 0.044 0.044 0.065918 0.098066 0.065918 0.16162 0 0.063556-0.021918 0.11713-0.065918 0.16113s-0.098066 0.065918-0.16162 0.065918c-0.063555 0-0.11859-0.021918-0.16504-0.065918-0.044-0.044-0.065918-0.097577-0.065918-0.16113 0-0.063556 0.021918-0.11762 0.065918-0.16162 0.043542-0.043542 0.09474-0.066615 0.15332-0.069336z" stroke-width=".25"/> <Path d="m1.2849 0.84891c-0.085556 0-0.15764 0.029712-0.21631 0.088379-0.058667 0.058667-0.087891 0.13075-0.087891 0.21631v0.76611c0 0.083111 0.030686 0.1552 0.091797 0.21631l1.0669 1.0669c0.026889 0.026889 0.058548 0.049295 0.095215 0.066406 0.039111 0.017111 0.079538 0.025391 0.12109 0.025391 0.041556 0 0.080521-0.00828 0.11719-0.025391 0.039111-0.017111 0.072232-0.039518 0.099121-0.066406l0.7627-0.7627c0.058667-0.058667 0.087891-0.13075 0.087891-0.21631 0-0.085556-0.029224-0.15764-0.087891-0.21631l-1.0708-1.0703c-0.058667-0.058667-0.12929-0.088379-0.2124-0.088379zm0.21924 0.30469c0.00391-1.815e-4 0.00775 0 0.011719 0 0.063556 0 0.11762 0.022891 0.16162 0.069336 0.044 0.044 0.065918 0.098066 0.065918 0.16162 0 0.063556-0.021918 0.11713-0.065918 0.16113s-0.098066 0.065918-0.16162 0.065918c-0.063555 0-0.11859-0.021918-0.16504-0.065918-0.044-0.044-0.065918-0.097577-0.065918-0.16113 0-0.063556 0.021918-0.11762 0.065918-0.16162 0.043542-0.043542 0.09474-0.066615 0.15332-0.069336z" strokeWidth=".25"/>
<Path d="m0.98355 3.7638v0.37834h4.0357v-0.37834z" stroke-width=".25223"/> <Path d="m0.98355 3.7638v0.37834h4.0357v-0.37834z" strokeWidth=".25223"/>
<Path d="m0.98355 5.1511h2.2701v-0.37836h-2.2701z" stroke-width=".25223"/> <Path d="m0.98355 5.1511h2.2701v-0.37836h-2.2701z" strokeWidth=".25223"/>
</SVG> </SVG>
); );

Some files were not shown because too many files have changed in this diff Show More