diff --git a/package.json b/package.json index 45f5509..2143f3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aplyca/ibexa-pagebuilder-block-refresher", - "version": "1.0.7", + "version": "1.0.8", "description": "This module help you refresing the blocks preview in Ibexa admin. You can specific a function to render Vue Components, React Components or anything that you need rendering after edit blocks fields. This module supports Ibexa Platform, Ibexa DXP 3.* and Ibexa DXP 4.*", "main": "src/index.js", "keywords": [], diff --git a/src/index.js b/src/index.js index c774b25..be90d82 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ export const IbexaPageBuilderBlockRefresher = (ibexaVersion = "3.*", fn) => { - const supportedVersions = ["ezplatform", "3.*", "4.*"]; + const supportedVersions = ["ezplatform", "3.*", "4.*", "4.6.*"]; if(supportedVersions.includes(ibexaVersion)){ let eventName = ""; let dataIdReference = ""; @@ -21,6 +21,11 @@ export const IbexaPageBuilderBlockRefresher = (ibexaVersion = "3.*", fn) => { dataIdReference = "data-ez-block-id"; classPreviewReference = "c-pb-block-preview"; break; + case "4.6.*": + eventName = "ibexa-post-update-blocks-preview"; + dataIdReference = "data-ez-block-id"; + classPreviewReference = "c-pb-block-preview__inner"; + break; } if(window.self !== window.top){ @@ -45,4 +50,4 @@ export const IbexaPageBuilderBlockRefresher = (ibexaVersion = "3.*", fn) => { } else { console.warn("You must pass a supported version as a the second parameter to the IbexaPageBuilderBlockRefresher function"); } -} +} \ No newline at end of file