diff --git a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-deprecated.js b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-deprecated.js
index 41e3061ec..c0aa7a739 100644
--- a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-deprecated.js
+++ b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-deprecated.js
@@ -1,5 +1,5 @@
export default [
- /* Deprecated on Tainacan 0.17.2, due to the introduction of support: fontSize */
+ /* Deprecated on Tainacan 0.17.2, due to the introduction of support: fontSize, columns count and append child term options */
{
attributes: {
content: {
@@ -100,6 +100,10 @@ export default [
default: false
}
},
+ supports: {
+ align: ['full', 'wide'],
+ html: false,
+ },
save({ attributes, className }){
const {
content,
@@ -141,145 +145,6 @@ export default [
}
},
- {
- attributes: {
- content: {
- type: 'array',
- source: 'children',
- selector: 'div'
- },
- collectionId: {
- type: String,
- default: undefined
- },
- collectionSlug: {
- type: String,
- default: undefined
- },
- facets: {
- type: Array,
- default: []
- },
- facetsObject: {
- type: Array,
- default: []
- },
- showImage: {
- type: Boolean,
- default: true
- },
- showItemsCount: {
- type: Boolean,
- default: true
- },
- showLoadMore: {
- type: Boolean,
- default: false
- },
- showSearchBar: {
- type: Boolean,
- value: false
- },
- layout: {
- type: String,
- default: 'grid'
- },
- cloudRate: {
- type: Number,
- default: 1
- },
- isModalOpen: {
- type: Boolean,
- default: false
- },
- gridMargin: {
- type: Number,
- default: 0
- },
- metadatumId: {
- type: String,
- default: undefined
- },
- metadatumType: {
- type: String,
- default: undefined
- },
- facetsRequestSource: {
- type: String,
- default: undefined
- },
- maxFacetsNumber: {
- type: Number,
- value: undefined
- },
- isLoading: {
- type: Boolean,
- value: false
- },
- isLoadingCollection: {
- type: Boolean,
- value: false
- },
- collection: {
- type: Object,
- value: undefined
- },
- searchString: {
- type: String,
- default: undefined
- },
- blockId: {
- type: String,
- default: undefined
- },
- parentTerm: {
- type: Number,
- default: null
- },
- isParentTermModalOpen: {
- type: Boolean,
- default: false
- }
- },
- save({ attributes, className }){
- const {
- content,
- blockId,
- collectionId,
- collectionSlug,
- parentTerm,
- showImage,
- showItemsCount,
- showLoadMore,
- layout,
- cloudRate,
- gridMargin,
- metadatumId,
- metadatumType,
- maxFacetsNumber,
- showSearchBar,
- } = attributes;
- return
- { content }
-
- }
- },
{
attributes: {
content: {
@@ -412,5 +277,4 @@ export default [
}
}
-
]
\ No newline at end of file
diff --git a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.js b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.js
index faa6144b8..67a85a708 100644
--- a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.js
+++ b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.js
@@ -75,7 +75,7 @@ document.addEventListener("DOMContentLoaded", () => {
this.metadatumType = this.$el.attributes['metadatum-type'] != undefined ? this.$el.attributes['metadatum-type'].value : undefined;
this.collectionId = this.$el.attributes['collection-id'] != undefined ? this.$el.attributes['collection-id'].value : undefined;
this.collectionSlug = this.$el.attributes['collection-slug'] != undefined ? this.$el.attributes['collection-slug'].value : undefined;
- this.appendChildTerms = this.$el.attributes['append-child-terms'] != undefined ? this.$el.attributes['append-child-terms'].value == 'true' : true;
+ this.appendChildTerms = this.$el.attributes['append-child-terms'] != undefined ? this.$el.attributes['append-child-terms'].value == 'true' : false;
this.parentTermId = this.$el.attributes['parent-term-id'] != undefined ? this.$el.attributes['parent-term-id'].value : undefined;
this.showImage = this.$el.attributes['show-image'] != undefined ? this.$el.attributes['show-image'].value == 'true' : true;
this.nameInsideImage = this.$el.attributes['name-inside-image'] != undefined ? this.$el.attributes['name-inside-image'].value == 'true' : false;
diff --git a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue
index 6daaf07d1..b4c84df9d 100644
--- a/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue
+++ b/src/views/gutenberg-blocks/tainacan-facets/facets-list/facets-list-theme.vue
@@ -210,10 +210,10 @@ export default {
},
computed: {
isMetadatumTypeRelationship() {
- return (this.metadatumType == 'Tainacan\\Metadata_Types\\Relationship') || (this.metadatumType == this.$root.__('Relationship', 'tainacan') );
+ return (this.metadatumType == 'Tainacan\\Metadata_Types\\Relationship') || (this.metadatumType == this.$root.__('Relationship', 'tainacan')) || (this.metadatumType == 'Relationship');
},
isMetadatumTypeTaxonomy() {
- return (this.metadatumType == 'Tainacan\\Metadata_Types\\Taxonomy') || (this.metadatumType == this.$root.__('Taxonomy', 'tainacan') );
+ return (this.metadatumType == 'Tainacan\\Metadata_Types\\Taxonomy') || (this.metadatumType == this.$root.__('Taxonomy', 'tainacan')) || (this.metadatumType == 'Taxonomy');
}
},
created() {
diff --git a/src/views/gutenberg-blocks/tainacan-facets/facets-list/index.js b/src/views/gutenberg-blocks/tainacan-facets/facets-list/index.js
index 949b547f5..ca3186034 100644
--- a/src/views/gutenberg-blocks/tainacan-facets/facets-list/index.js
+++ b/src/views/gutenberg-blocks/tainacan-facets/facets-list/index.js
@@ -1023,7 +1023,7 @@ registerBlockType('tainacan/facets-list', {
metadatum-type={ metadatumType }
collection-id={ collectionId }
collection-slug={ collectionSlug }
- parent-term-id={ parentTerm ? parentTerm.id : null }
+ parent-term-id={ parentTerm ? parentTerm.id : undefined }
show-image={ '' + showImage }
name-inside-image={ '' + nameInsideImage }
show-items-count={ '' + showItemsCount }