From 509d69ff89e776b23ea54a66de55052441f23bbe Mon Sep 17 00:00:00 2001 From: Antoine M Date: Fri, 20 Jun 2025 09:29:22 +0200 Subject: [PATCH] FEATURE Passing grabcursor when interacting with component --- .../build/dernieres-dynamiques/view.asset.php | 2 +- .../dernieres-dynamiques/build/dernieres-dynamiques/view.js | 1 + .../dernieres-dynamiques/build/dernieres-dynamiques/view.js.map | 2 +- .../dernieres-dynamiques/src/dernieres-dynamiques/view.js | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php index 3bd6331..5615064 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.asset.php @@ -1 +1 @@ - array(), 'version' => '868f7899d9aaee305c25'); + array(), 'version' => 'e2a42947538603e62de3'); diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js index aaefb78..7676503 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js @@ -13,6 +13,7 @@ document.addEventListener("DOMContentLoaded", function () { slidesPerView: 2, spaceBetween: 30, loop: true, + grabCursor: true, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev" diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map index 8299006..ffed2ab 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/build/dernieres-dynamiques/view.js.map @@ -1 +1 @@ -{"version":3,"file":"dernieres-dynamiques/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,MAAMC,YAAY,GAAGF,QAAQ,CAACG,aAAa,CAAC,6BAA6B,CAAC;EAC1E,IAAI,CAACD,YAAY,EAAE;EAEnB,MAAME,cAAc,GAAGF,YAAY,CAACC,aAAa,CAChD,6BACD,CAAC;EACD,MAAME,MAAM,GAAGH,YAAY,CAACI,gBAAgB,CAAC,eAAe,CAAC;EAC7D,MAAMC,UAAU,GAAGF,MAAM,CAACG,MAAM;EAChCJ,cAAc,CAACK,WAAW,GAAG,mBAAmBF,UAAU,EAAE;EAE5D,IAAIG,MAAM,CAAC,8BAA8B,EAAE;IAC1CC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE;MACXC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE;IACT,CAAC;IACDC,UAAU,EAAE;MACXC,EAAE,EAAE,oBAAoB;MACxBC,SAAS,EAAE,IAAI;MACfC,YAAY,EAAE,SAAAA,CAAUC,KAAK,EAAEC,SAAS,EAAE;QACzC,OAAO,kBAAkBA,SAAS,aAAa;MAChD;IACD,CAAC;IACDC,EAAE,EAAE;MACHC,WAAW,EAAGC,MAAM,IAAK;QACxB,MAAMC,WAAW,GAAGD,MAAM,EAAEpB,MAAM,EAAEG,MAAM;QAC1CJ,cAAc,CAACK,WAAW,GAAG,aAC5BgB,MAAM,CAACE,SAAS,GAAG,CAAC,QACbD,WAAW,EAAE;MACtB;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACD,CAAC,CAAC;AACH,CAAC,CAAC,C","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\n\tconst currentBlock = document.querySelector(\".block-dernieres-dynamiques\");\n\tif (!currentBlock) return;\n\n\tconst swiperFraction = currentBlock.querySelector(\n\t\t\".swiper-pagination-fraction\"\n\t);\n\tconst slides = currentBlock.querySelectorAll(\".swiper-slide\");\n\tconst slideCount = slides.length;\n\tswiperFraction.textContent = `Article n°1 sur ${slideCount}`;\n\n\tnew Swiper(\".dernieres-dynamiques-swiper\", {\n\t\tslidesPerView: 2,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t\trenderBullet: function (index, className) {\n\t\t\t\treturn ``;\n\t\t\t},\n\t\t},\n\t\ton: {\n\t\t\tslideChange: (swiper) => {\n\t\t\t\tconst slidesCount = swiper?.slides?.length;\n\t\t\t\tswiperFraction.textContent = `Article n°${\n\t\t\t\t\tswiper.realIndex + 1\n\t\t\t\t} sur ${slidesCount}`;\n\t\t\t},\n\t\t},\n\n\t\t// pagination: [\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination\",\n\t\t// \t\ttype: \"bullets\",\n\t\t// \t\tclickable: true,\n\t\t// \t},\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination-fraction\",\n\t\t// \t\ttype: \"fraction\",\n\t\t// \t\trenderFraction: function (currentClass, totalClass) {\n\t\t// \t\t\treturn (\n\t\t// \t\t\t\t'

' +\n\t\t// \t\t\t\t\"Article n°\" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\" sur \" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\"

\"\n\t\t// \t\t\t);\n\t\t// \t\t},\n\t\t// \t},\n\t\t// ],\n\t});\n});\n"],"names":["document","addEventListener","currentBlock","querySelector","swiperFraction","slides","querySelectorAll","slideCount","length","textContent","Swiper","slidesPerView","spaceBetween","loop","navigation","nextEl","prevEl","pagination","el","clickable","renderBullet","index","className","on","slideChange","swiper","slidesCount","realIndex"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dernieres-dynamiques/view.js","mappings":";;;;AAAAA,QAAQ,CAACC,gBAAgB,CAAC,kBAAkB,EAAE,YAAY;EACzD,MAAMC,YAAY,GAAGF,QAAQ,CAACG,aAAa,CAAC,6BAA6B,CAAC;EAC1E,IAAI,CAACD,YAAY,EAAE;EAEnB,MAAME,cAAc,GAAGF,YAAY,CAACC,aAAa,CAChD,6BACD,CAAC;EACD,MAAME,MAAM,GAAGH,YAAY,CAACI,gBAAgB,CAAC,eAAe,CAAC;EAC7D,MAAMC,UAAU,GAAGF,MAAM,CAACG,MAAM;EAChCJ,cAAc,CAACK,WAAW,GAAG,mBAAmBF,UAAU,EAAE;EAE5D,IAAIG,MAAM,CAAC,8BAA8B,EAAE;IAC1CC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE,IAAI;IACVC,UAAU,EAAE,IAAI;IAChBC,UAAU,EAAE;MACXC,MAAM,EAAE,qBAAqB;MAC7BC,MAAM,EAAE;IACT,CAAC;IACDC,UAAU,EAAE;MACXC,EAAE,EAAE,oBAAoB;MACxBC,SAAS,EAAE,IAAI;MACfC,YAAY,EAAE,SAAAA,CAAUC,KAAK,EAAEC,SAAS,EAAE;QACzC,OAAO,kBAAkBA,SAAS,aAAa;MAChD;IACD,CAAC;IACDC,EAAE,EAAE;MACHC,WAAW,EAAGC,MAAM,IAAK;QACxB,MAAMC,WAAW,GAAGD,MAAM,EAAErB,MAAM,EAAEG,MAAM;QAC1CJ,cAAc,CAACK,WAAW,GAAG,aAC5BiB,MAAM,CAACE,SAAS,GAAG,CAAC,QACbD,WAAW,EAAE;MACtB;IACD;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACD,CAAC,CAAC;AACH,CAAC,CAAC,C","sources":["webpack://dernieres-dynamiques/./src/dernieres-dynamiques/view.js"],"sourcesContent":["document.addEventListener(\"DOMContentLoaded\", function () {\n\tconst currentBlock = document.querySelector(\".block-dernieres-dynamiques\");\n\tif (!currentBlock) return;\n\n\tconst swiperFraction = currentBlock.querySelector(\n\t\t\".swiper-pagination-fraction\"\n\t);\n\tconst slides = currentBlock.querySelectorAll(\".swiper-slide\");\n\tconst slideCount = slides.length;\n\tswiperFraction.textContent = `Article n°1 sur ${slideCount}`;\n\n\tnew Swiper(\".dernieres-dynamiques-swiper\", {\n\t\tslidesPerView: 2,\n\t\tspaceBetween: 30,\n\t\tloop: true,\n\t\tgrabCursor: true,\n\t\tnavigation: {\n\t\t\tnextEl: \".swiper-button-next\",\n\t\t\tprevEl: \".swiper-button-prev\",\n\t\t},\n\t\tpagination: {\n\t\t\tel: \".swiper-pagination\",\n\t\t\tclickable: true,\n\t\t\trenderBullet: function (index, className) {\n\t\t\t\treturn ``;\n\t\t\t},\n\t\t},\n\t\ton: {\n\t\t\tslideChange: (swiper) => {\n\t\t\t\tconst slidesCount = swiper?.slides?.length;\n\t\t\t\tswiperFraction.textContent = `Article n°${\n\t\t\t\t\tswiper.realIndex + 1\n\t\t\t\t} sur ${slidesCount}`;\n\t\t\t},\n\t\t},\n\n\t\t// pagination: [\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination\",\n\t\t// \t\ttype: \"bullets\",\n\t\t// \t\tclickable: true,\n\t\t// \t},\n\t\t// \t{\n\t\t// \t\tel: \".swiper-pagination-fraction\",\n\t\t// \t\ttype: \"fraction\",\n\t\t// \t\trenderFraction: function (currentClass, totalClass) {\n\t\t// \t\t\treturn (\n\t\t// \t\t\t\t'

' +\n\t\t// \t\t\t\t\"Article n°\" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\" sur \" +\n\t\t// \t\t\t\t'' +\n\t\t// \t\t\t\t\"

\"\n\t\t// \t\t\t);\n\t\t// \t\t},\n\t\t// \t},\n\t\t// ],\n\t});\n});\n"],"names":["document","addEventListener","currentBlock","querySelector","swiperFraction","slides","querySelectorAll","slideCount","length","textContent","Swiper","slidesPerView","spaceBetween","loop","grabCursor","navigation","nextEl","prevEl","pagination","el","clickable","renderBullet","index","className","on","slideChange","swiper","slidesCount","realIndex"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js index 58a9805..f1865f0 100644 --- a/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js +++ b/plugins/dynamiques-blocks/blocks/dernieres-dynamiques/src/dernieres-dynamiques/view.js @@ -13,6 +13,7 @@ document.addEventListener("DOMContentLoaded", function () { slidesPerView: 2, spaceBetween: 30, loop: true, + grabCursor: true, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev",