From a53ed64fd7be8539de0651ee498f155de0f3799e Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Tue, 12 Dec 2023 16:17:23 -0300 Subject: [PATCH] Moves Items and Collections carousel to new data- attributes logic. --- ...enberg-block-carousel-collections-list.css | 9 +- ...rg-block-carousel-collections-list.css.map | 2 +- .../carousel-collections-list/deprecated.js | 143 ++++++++++++++ .../blocks/carousel-collections-list/save.js | 31 ++- .../carousel-collections-list/style.scss | 5 +- .../blocks/carousel-collections-list/theme.js | 32 ++-- .../carousel-collections-list/theme.vue | 30 +-- .../blocks/carousel-items-list/deprecated.js | 176 ++++++++++++++++++ .../blocks/carousel-items-list/save.js | 43 +++-- .../blocks/carousel-items-list/theme.js | 59 +++--- .../blocks/carousel-items-list/theme.vue | 12 +- .../tainacan-blocks-compat-data-attributes.js | 9 + 12 files changed, 440 insertions(+), 111 deletions(-) create mode 100644 src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-data-attributes.js diff --git a/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css b/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css index 46aca92b2..d2097bfa4 100644 --- a/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css +++ b/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css @@ -448,17 +448,16 @@ -ms-grid-row: 1; -ms-grid-row-span: 2; grid-column: 1/3; - grid-row: 1/3; - padding-bottom: 100% !important; } + grid-row: 1/3; } .wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid > * { flex-basis: 50%; width: 100%; height: auto; - margin-bottom: 0px; - padding-bottom: 100% !important; } + margin-bottom: 0px; } .wp-block-tainacan-carousel-collections-list .tainacan-carousel .swiper .swiper-slide.collection-list-item-grid .collection-items-grid img { object-fit: cover; - object-position: center; } + object-position: center; + width: 100%; } .wp-block-tainacan-carousel-collections-list .preview-warning { width: 100%; font-size: 0.875rem; diff --git a/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css.map b/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css.map index 4827caa03..276d24d1c 100644 --- a/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css.map +++ b/src/assets/css/tainacan-gutenberg-block-carousel-collections-list.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA;;;;;;;;;;GAUG;AAID,UAMC;EALC,WAAW,EAAE,cAAc;EAC3B,GAAG,EAAE,usEACW;EAChB,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,MAAM;AAIpB,KAAM;EACJ,oBAAoB,CAAC,QAAe;EACpC;;;IAGE;AAGN,KAAM;EACJ,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAClB,OAAO,EAAE,CAAC;;AAEZ,OAAQ;EACN,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;EAClB,QAAQ,EAAE,QAAQ;EAClB,QAAQ,EAAE,MAAM;EAChB,UAAU,EAAE,IAAI;EAChB,OAAO,EAAE,CAAC;EACV,8BAA8B;EAC9B,OAAO,EAAE,CAAC;EACV,OAAO,EAAE,KAAK;;AAEhB,kCAAmC;EACjC,cAAc,EAAE,MAAM;;AAExB,eAAgB;EACd,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,CAAC;EACV,OAAO,EAAE,IAAI;EACb,mBAAmB,EAAE,SAAS;EAC9B,0BAA0B,EAAE,yDAAyD;EACrF,UAAU,EAAE,WAAW;;AAEzB;;eAEgB;EACd,SAAS,EAAE,sBAAsB;;AAEnC,kBAAmB;EACjB,YAAY,EAAE,KAAK;;AAErB,gBAAiB;EACf,YAAY,EAAE,KAAK;;AAErB,aAAc;EACZ,WAAW,EAAE,CAAC;EACd,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB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ss","../../views/gutenberg-blocks/blocks/carousel-collections-list/style.scss","../../views/gutenberg-blocks/scss/gutenberg-blocks-variables.scss"], "names": [], "file": "tainacan-gutenberg-block-carousel-collections-list.css" diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/deprecated.js b/src/views/gutenberg-blocks/blocks/carousel-collections-list/deprecated.js index 7678bfb12..5038f4c5a 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/deprecated.js +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/deprecated.js @@ -1,6 +1,149 @@ const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); export default [ + /* Deprecated during Vue 3 migration to prepend attributes with data- */ + { + "attributes" :{ + "content": { + "type": "array", + "source": "children", + "selector": "div" + }, + "collections": { + "type": "array", + "default": [] + }, + "isModalOpen": { + "type": "boolean", + "default": false + }, + "selectedCollections": { + "type": "array", + "default": [] + }, + "itemsRequestSource": { + "type": "string", + "default": false + }, + "maxCollectionsNumber": { + "type": "number", + "default": false + }, + "maxCollectionsPerScreen": { + "type": "number", + "default": 6 + }, + "spaceBetweenCollections": { + "type": "number", + "default": 32 + }, + "spaceAroundCarousel": { + "type": "number", + "default": 50 + }, + "isLoading": { + "type": "boolean", + "default": false + }, + "isLoadingCollection": { + "type": "boolean", + "default": false + }, + "arrowsPosition": { + "type": "string", + "default": "around" + }, + "largeArrows": { + "type": "boolean", + "default": false + }, + "arrowsStyle": { + "type": "string", + "default": "type-1" + }, + "autoPlay": { + "type": "boolean", + "default": false + }, + "autoPlaySpeed": { + "type": "number", + "default": 3 + }, + "loopSlides": { + "type": "boolean", + "default": false + }, + "hideName": { + "type": "boolean", + "default": true + }, + "showCollectionThumbnail": { + "type": "boolean", + "default": false + }, + "imageSize": { + "type": "string", + "default": "tainacan-medium" + }, + "blockId": { + "type": "string", + "default": "" + }, + "collectionBackgroundColor": { + "type": "string", + "default": "#373839" + }, + "collectionTextColor": { + "type": "string", + "default": "#ffffff" + } + }, + save: function ({ attributes }) { + const { + content, + blockId, + selectedCollections, + arrowsPosition, + largeArrows, + arrowsStyle, + imageSize, + maxCollectionsPerScreen, + maxCollectionsNumber, + spaceBetweenCollections, + spaceAroundCarousel, + autoPlay, + autoPlaySpeed, + loopSlides, + hideName, + showCollectionThumbnail + } = attributes; + + // Gets attributes such as style, that are automatically added by the editor hook + const blockProps = useBlockProps.save(); + return
{ return collection.id })) } + arrows-position={ arrowsPosition } + auto-play={ '' + autoPlay } + auto-play-speed={ autoPlaySpeed } + loop-slides={ '' + loopSlides } + hide-name={ '' + hideName } + large-arrows={ '' + largeArrows } + arrows-style={ arrowsStyle } + image-size={ imageSize } + max-collections-number={ maxCollectionsNumber } + max-collections-per-screen={ maxCollectionsPerScreen } + space-between-collections={ spaceBetweenCollections } + space-around-carousel={ spaceAroundCarousel } + tainacan-api-root={ tainacan_blocks.root } + tainacan-base-url={ tainacan_blocks.base_url } + show-collection-thumbnail={ '' + showCollectionThumbnail } + id={ 'wp-block-tainacan-carousel-collections-list_' + blockId }> + { content } +
+ } + }, /* Deprecated on 0.20.4 to replace collectionBackgroundColor */ { attributes: { diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/save.js b/src/views/gutenberg-blocks/blocks/carousel-collections-list/save.js index 9c8e457ea..6a2b72d21 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/save.js +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/save.js @@ -25,22 +25,21 @@ export default function ({ attributes }) { return
{ return collection.id })) } - arrows-position={ arrowsPosition } - auto-play={ '' + autoPlay } - auto-play-speed={ autoPlaySpeed } - loop-slides={ '' + loopSlides } - hide-name={ '' + hideName } - large-arrows={ '' + largeArrows } - arrows-style={ arrowsStyle } - image-size={ imageSize } - max-collections-number={ maxCollectionsNumber } - max-collections-per-screen={ maxCollectionsPerScreen } - space-between-collections={ spaceBetweenCollections } - space-around-carousel={ spaceAroundCarousel } - tainacan-api-root={ tainacan_blocks.root } - tainacan-base-url={ tainacan_blocks.base_url } - show-collection-thumbnail={ '' + showCollectionThumbnail } + data-selected-collections={ JSON.stringify(selectedCollections.map((collection) => { return collection.id })) } + data-arrows-position={ arrowsPosition } + data-auto-play={ '' + autoPlay } + data-auto-play-speed={ autoPlaySpeed } + data-loop-slides={ '' + loopSlides } + data-hide-name={ '' + hideName } + data-large-arrows={ '' + largeArrows } + data-arrows-style={ arrowsStyle } + data-image-size={ imageSize } + data-max-collections-number={ maxCollectionsNumber } + data-max-collections-per-screen={ maxCollectionsPerScreen } + data-space-between-collections={ spaceBetweenCollections } + data-space-around-carousel={ spaceAroundCarousel } + data-tainacan-api-root={ tainacan_blocks.root } + data-show-collection-thumbnail={ '' + showCollectionThumbnail } id={ 'wp-block-tainacan-carousel-collections-list_' + blockId }> { content }
diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/style.scss b/src/views/gutenberg-blocks/blocks/carousel-collections-list/style.scss index 273f79d61..e361f028c 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/style.scss +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/style.scss @@ -191,7 +191,7 @@ &>*:first-of-type { flex-basis: 100%; @include grid-child(1, 3, 1, 3); - padding-bottom: 100% !important; + // padding-bottom: 100% !important; } &>* { @@ -199,12 +199,13 @@ width: 100%; height: auto; margin-bottom: 0px; - padding-bottom: 100% !important; + // padding-bottom: 100% !important; } img { object-fit: cover; object-position: center; + width: 100%; } } } diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.js b/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.js index 589962c71..ce0b3b7fe 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.js +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.js @@ -2,6 +2,7 @@ import { createApp, h } from 'vue'; import CarouselCollectionsListTheme from './theme.vue'; import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js'; import VueBlurHash from 'another-vue3-blurhash'; +import getDataAttribute from '../../js/compatibility/tainacan-blocks-compat-data-attributes.js'; export default (element) => { @@ -23,22 +24,21 @@ export default (element) => { render() { return h(CarouselCollectionsListTheme, { blockId: block.id, - selectedCollections: block.attributes['selected-collections'] != undefined ? JSON.parse(block.attributes['selected-collections'].value) : undefined, - maxItemsNumber: block.attributes['max-collections-number'] != undefined ? Number(block.attributes['max-collections-number'].value) : 12, - maxCollectionsPerScreen: block.attributes['max-collections-per-screen'] != undefined ? Number(block.attributes['max-collections-per-screen'].value) : 6, - spaceBetweenCollections: block.attributes['space-between-collections'] != undefined ? Number(block.attributes['space-between-collections'].value) : 32, - spaceAroundCarousel: block.attributes['space-around-carousel'] != undefined ? Number(block.attributes['space-around-carousel'].value) : 50, - arrowsPosition: block.attributes['arrows-position'] != undefined ? block.attributes['arrows-position'].value : undefined, - autoPlay: block.attributes['auto-play'] != undefined ? block.attributes['auto-play'].value == 'true' : false, - largeArrows: block.attributes['large-arrows'] != undefined ? block.attributes['large-arrows'].value == 'true' : false, - arrowsStyle: block.attributes['arrows-style'] != undefined ? block.attributes['arrows-style'].value : 'type-1', - autoPlaySpeed: block.attributes['auto-play-speed'] != undefined ? Number(block.attributes['auto-play-speed'].value) : 3, - loopSlides: block.attributes['loop-slides'] != undefined ? block.attributes['loop-slides'].value == 'true' : false, - imageSize: block.attributes['image-size'] != undefined ? block.attributes['image-size'].value : 'tainacan-medium', - hideName: block.attributes['hide-name'] != undefined ? block.attributes['hide-name'].value == 'true' : false, - showCollectionThumbnail: block.attributes['show-collection-thumbnail'] != undefined ? block.attributes['show-collection-thumbnail'].value == 'true' : false, - tainacanApiRoot: block.attributes['tainacan-api-root'] != undefined ? block.attributes['tainacan-api-root'].value : undefined, - tainacanBaseUrl: block.attributes['tainacan-base-url'] != undefined ? block.attributes['tainacan-base-url'].value : undefined, + selectedCollections: JSON.parse(getDataAttribute(block, 'selected-collections', '[]')), + maxItemsNumber: Number(getDataAttribute(block, 'max-collections-number', 12)), + maxCollectionsPerScreen: Number(getDataAttribute(block, 'max-collections-per-screen', 9)), + spaceBetweenCollections: Number(getDataAttribute(block, 'space-between-collections', 32)), + spaceAroundCarousel: Number(getDataAttribute(block, 'space-around-carousel', 50)), + arrowsPosition: getDataAttribute(block, 'arrows-position', 'around'), + autoPlay: getDataAttribute(block, 'auto-play', 'false') == 'true', + largeArrows: getDataAttribute(block, 'large-arrows', 'false') == 'true', + arrowsStyle: getDataAttribute(block, 'arrows-style', 'type-1'), + autoPlaySpeed: Number(getDataAttribute(block, 'auto-play-speed', 3)), + loopSlides: getDataAttribute(block, 'loop-slides', 'false') == 'true', + imageSize: getDataAttribute(block, 'image-size', 'tainacan-medium'), + hideName: getDataAttribute(block, 'hide-name', 'false') == 'true', + showCollectionThumbnail: getDataAttribute(block, 'show-collection-thumbnail', 'false') == 'true', + tainacanApiRoot: getDataAttribute(block, 'tainacan-api-root'), }); }, mounted() { diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.vue b/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.vue index ba3cdce72..5507b426f 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.vue +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/theme.vue @@ -44,7 +44,7 @@ ? collection.thumbnail['thumbnail'][0] : - `${tainacanBaseUrl}/assets/images/placeholder_square.png`) + $thumbHelper.getEmptyThumbnailPlaceholder('empty', imageSize)) " :data-src=" collection.thumbnail && collection.thumbnail[imageSize] && collection.thumbnail[imageSize][0] @@ -55,9 +55,9 @@ ? collection.thumbnail['thumbnail'][0] : - `${tainacanBaseUrl}/assets/images/placeholder_square.png`) + $thumbHelper.getEmptyThumbnailPlaceholder('empty', imageSize)) " - :alt="collection.name ? collection.name : wp.i18n.__('Thumbnail', 'tainacan')"> + :alt="collection.name ? collection.name : wpI18n('Thumbnail', 'tainacan')"> {{ collection.name ? collection.name : '' }} {{ collection.name ? collection.name : '' }} @@ -137,7 +137,7 @@
- {{ wp.i18n.__('No collections found.', 'tainacan') }} + {{ wpI18n('No collections found.', 'tainacan') }}
@@ -191,7 +191,6 @@ export default { } }, created() { - this.apiRoot = (tainacan_blocks && tainacan_blocks.root && !this.tainacanApiRoot) ? tainacan_blocks.root : this.tainacanApiRoot; this.tainacanAxios = axios.create({ baseURL: this.apiRoot }); @@ -205,6 +204,9 @@ export default { this.swiper.destroy(); }, methods: { + wpI18n(string, context) { + return wp && wp.i18n ? wp.i18n.__(string, context) : string; + }, fetchCollections() { this.isLoading = true; this.errorMessage = 'No collections found.'; diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/deprecated.js b/src/views/gutenberg-blocks/blocks/carousel-items-list/deprecated.js index 46a4550a0..2e461b2a6 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/deprecated.js +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/deprecated.js @@ -1,6 +1,182 @@ const { useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); export default [ + /* Deprecated during Vue 3 migration to prepend attributes with data- */ + { + "attributes": { + "content": { + "type": "array", + "source": "children", + "selector": "div" + }, + "collectionId": { + "type": "string", + "default": "" + }, + "items": { + "type": "array", + "default": [] + }, + "isModalOpen": { + "type": "boolean", + "default": false + }, + "searchURL": { + "type": "string", + "default": "" + }, + "selectedItems": { + "type": "array", + "default": [] + }, + "itemsRequestSource": { + "type": "string", + "default": "" + }, + "maxItemsNumber": { + "type": "number", + "default": 12 + }, + "maxItemsPerScreen": { + "type": "number", + "default": 7 + }, + "spaceBetweenItems": { + "type": "number", + "default": 32 + }, + "spaceAroundCarousel": { + "type": "number", + "default": 50 + }, + "isLoading": { + "type": "boolean", + "default": false + }, + "isLoadingCollection": { + "type": "boolean", + "default": false + }, + "loadStrategy": { + "type": "string", + "default": "search" + }, + "arrowsPosition": { + "type": "string", + "default": "around" + }, + "largeArrows": { + "type": "boolean", + "default": false + }, + "arrowsStyle": { + "type": "string", + "default": "type-1" + }, + "autoPlay": { + "type": "boolean", + "default": false + }, + "autoPlaySpeed": { + "type": "number", + "default": 3 + }, + "loopSlides": { + "type": "boolean", + "default": false + }, + "hideTitle": { + "type": "boolean", + "default": true + }, + "showCollectionHeader": { + "type": "boolean", + "default": false + }, + "showCollectionLabel": { + "type": "boolean", + "default": false + }, + "imageSize": { + "type": "string", + "default": "tainacan-medium" + }, + "collection": { + "type": "object", + "default": {} + }, + "blockId": { + "type": "string", + "default": "" + }, + "collectionBackgroundColor": { + "type": "string", + "default": "#373839" + }, + "collectionTextColor": { + "type": "string", + "default": "#ffffff" + } + }, + save: function ({ attributes }) { + const { + content, + blockId, + collectionId, + searchURL, + selectedItems, + arrowsPosition, + largeArrows, + arrowsStyle, + loadStrategy, + maxItemsNumber, + maxItemsPerScreen, + spaceBetweenItems, + spaceAroundCarousel, + autoPlay, + autoPlaySpeed, + loopSlides, + hideTitle, + imageSize, + showCollectionHeader, + showCollectionLabel, + collectionBackgroundColor, + collectionTextColor + } = attributes; + + // Gets attributes such as style, that are automatically added by the editor hook + const blockProps = useBlockProps.save(); + + return
+ { content } +
+ } + }, /* Deprecated on 0.20.4 to replace collectionBackgroundColor */ { attributes: { diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/save.js b/src/views/gutenberg-blocks/blocks/carousel-items-list/save.js index ce45ebf7a..f384b544a 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/save.js +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/save.js @@ -32,28 +32,27 @@ export default function ({ attributes }) { return
{ content }
diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.js b/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.js index 1c08ebc1f..0f69b9bfc 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.js +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.js @@ -1,51 +1,50 @@ import { createApp, h } from 'vue'; - import CarouselItemsListTheme from './theme.vue'; import { ThumbnailHelperPlugin } from '../../../admin/js/utilities.js'; import VueBlurHash from 'another-vue3-blurhash'; +import getDataAttribute from '../../js/compatibility/tainacan-blocks-compat-data-attributes.js'; export default (element) => { function renderTainacanItemCarouselBlocks() { // Gets all divs with content created by our block; - let blocksElements = element ? [ element ] : document.getElementsByClassName('wp-block-tainacan-carousel-items-list'); - + let blocksElements = element ? [element] : document.getElementsByClassName('wp-block-tainacan-carousel-items-list'); + if (blocksElements) { let blocks = Object.values(blocksElements); // Checks if this carousel isn't already mounted blocks = blocks.filter((block) => block.classList && !block.classList.contains('has-mounted')); - + // Creates a new Vue Instance to manage each block isolatelly blocks.forEach((block) => { - - const VueCarouselItemsList = createApp( { - render() { - return h(CarouselItemsListTheme, { + + const VueCarouselItemsList = createApp({ + render() { + return h(CarouselItemsListTheme, { blockId: block.id, - searchURL: block.attributes['search-url'] != undefined ? block.attributes['search-url'].value : undefined, - selectedItems: block.attributes['selected-items'] != undefined ? JSON.parse(block.attributes['selected-items'].value) : [], - loadStrategy: block.attributes['load-strategy'] != undefined ? block.attributes['load-strategy'].value : 'search', - collectionId: block.attributes['collection-id'] != undefined ? block.attributes['collection-id'].value : undefined, - maxItemsNumber: block.attributes['max-items-number'] != undefined ? Number(block.attributes['max-items-number'].value) : 12, - maxItemsPerScreen: block.attributes['max-items-per-screen'] != undefined ? Number(block.attributes['max-items-per-screen'].value) : 7, - spaceBetweenItems: block.attributes['space-between-items'] != undefined ? Number(block.attributes['space-between-items'].value) : 32, - spaceAroundCarousel: block.attributes['space-around-carousel'] != undefined ? Number(block.attributes['space-around-carousel'].value) : 50, - arrowsPosition: block.attributes['arrows-position'] != undefined ? block.attributes['arrows-position'].value : 'around', - largeArrows: block.attributes['large-arrows'] != undefined ? block.attributes['large-arrows'].value == 'true' : false, - arrowsStyle: block.attributes['arrows-style'] != undefined ? block.attributes['arrows-style'].value : 'type-1', - autoPlay: block.attributes['auto-play'] != undefined ? block.attributes['auto-play'].value == 'true' : false, - autoPlaySpeed: block.attributes['auto-play-speed'] != undefined ? Number(block.attributes['auto-play-speed'].value) : 3, - loopSlides: block.attributes['loop-slides'] != undefined ? block.attributes['loop-slides'].value == 'true' : false, - hideTitle: block.attributes['hide-title'] != undefined ? block.attributes['hide-title'].value == 'true' : false, - imageSize: block.attributes['image-size'] != undefined ? block.attributes['image-size'].value : 'tainacan-medium', - showCollectionHeader: block.attributes['show-collection-header'] != undefined ? block.attributes['show-collection-header'].value == 'true' : false, - showCollectionLabel: block.attributes['show-collection-label'] != undefined ? block.attributes['show-collection-label'].value == 'true' : false, - collectionBackgroundColor: block.attributes['collection-background-color'] != undefined ? block.attributes['collection-background-color'].value : '#373839', - collectionTextColor: block.attributes['collection-text-color'] != undefined ? block.attributes['collection-text-color'].value : '#ffffff', - tainacanApiRoot: block.attributes['tainacan-api-root'] != undefined ? block.attributes['tainacan-api-root'].value : undefined, - tainacanBaseUrl: block.attributes['tainacan-base-url'] != undefined ? block.attributes['tainacan-base-url'].value : undefined + searchURL: getDataAttribute(block, 'search-url'), + selectedItems: JSON.parse(getDataAttribute(block, 'selected-items', '[]')), + loadStrategy: getDataAttribute(block, 'load-strategy', 'search'), + collectionId: getDataAttribute(block, 'collection-id', undefined), + maxItemsNumber: Number(getDataAttribute(block, 'max-items-number', 12)), + maxItemsPerScreen: Number(getDataAttribute(block, 'max-items-per-screen', 7)), + spaceBetweenItems: Number(getDataAttribute(block, 'space-between-items', 32)), + spaceAroundCarousel: Number(getDataAttribute(block, 'space-around-carousel', 50)), + arrowsPosition: getDataAttribute(block, 'arrows-position', 'around'), + largeArrows: getDataAttribute(block, 'large-arrows', false) == 'true', + arrowsStyle: getDataAttribute(block, 'arrows-style', 'type-1'), + autoPlay: getDataAttribute(block, 'auto-play', false) == 'true', + autoPlaySpeed: Number(getDataAttribute(block, 'auto-play-speed', 3)), + loopSlides: getDataAttribute(block, 'loop-slides', false) == 'true', + hideTitle: getDataAttribute(block, 'hide-title', false) == 'true', + imageSize: getDataAttribute(block, 'image-size', 'tainacan-medium'), + showCollectionHeader: getDataAttribute(block, 'show-collection-header', false) == 'true', + showCollectionLabel: getDataAttribute(block, 'show-collection-label', false) == 'true', + collectionBackgroundColor: getDataAttribute(block, 'collection-background-color', '#373839'), + collectionTextColor: getDataAttribute(block, 'collection-text-color', '#ffffff'), + tainacanApiRoot: getDataAttribute(block, 'tainacan-api-root') }); }, mounted() { diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.vue b/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.vue index 0cb008453..de0538d0f 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.vue +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/theme.vue @@ -23,7 +23,7 @@ - {{ wp.i18n.__('Collection', 'tainacan') }} + {{ wpI18n('Collection', 'tainacan') }}
{{ collection && collection.name ? collection.name : '' }} @@ -91,7 +91,7 @@ :src="$thumbHelper.getSrc(item['thumbnail'], imageSize, item['document_mimetype'])" :srcset="$thumbHelper.getSrcSet(item['thumbnail'], imageSize, item['document_mimetype'])" :hash="$thumbHelper.getBlurhashString(item['thumbnail'], imageSize)" - :alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.title ? item.title : wp.i18n.__( 'Thumbnail', 'tainacan' ))" + :alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.title ? item.title : wpI18n( 'Thumbnail', 'tainacan' ))" :transition-duration="500" /> {{ item.title ? item.title : '' }}
@@ -140,7 +140,7 @@
- {{ wp.i18n.__('No items found.', 'tainacan') }} + {{ wpI18n('No items found.', 'tainacan') }}
@@ -179,8 +179,7 @@ export default { showCollectionLabel: Boolean, collectionBackgroundColor: String, collectionTextColor: String, - tainacanApiRoot: String, - tainacanBaseUrl: String + tainacanApiRoot: String }, data() { return { @@ -217,6 +216,9 @@ export default { this.swiper.destroy(); }, methods: { + wpI18n(string, context) { + return wp && wp.i18n ? wp.i18n.__(string, context) : string; + }, fetchItems() { this.isLoading = true; diff --git a/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-data-attributes.js b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-data-attributes.js new file mode 100644 index 000000000..1cf85918a --- /dev/null +++ b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-data-attributes.js @@ -0,0 +1,9 @@ +// Checks if we have legacy data attributes and returns the correct ones +export default function getDataAttribute(block, key, defaultValue) { + if (block.getAttribute('data-' + key) != undefined) + return block.getAttribute('data-' + key); + else if ( block.attributes[key] != undefined ) + return block.attributes[key].value; + else + return defaultValue; +}; \ No newline at end of file