Updates PhotoSwiper to latest version.

This commit is contained in:
mateuswetah 2022-03-31 15:12:07 -03:00
parent 2fbfaad2a1
commit aecd1599fc
3 changed files with 45 additions and 31 deletions

63
package-lock.json generated
View File

@ -1655,9 +1655,9 @@
} }
}, },
"apexcharts": { "apexcharts": {
"version": "3.33.1", "version": "3.34.0",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.33.1.tgz", "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.34.0.tgz",
"integrity": "sha512-5aVzrgJefd8EH4w7oRmuOhA3+cxJxQg27cYg3ANVGvPCOB4AY3mVVNtFHRFaIq7bv8ws4GRaA9MWfzoWQw3MPQ==", "integrity": "sha512-0HMwkTRm4lwuM4TZ+BjFynXuIRQnCG8E36k2r0JoxEfh61rY6OmRa6iFHlTQiyILpemPyTHxuPvK4wkR8RKc9A==",
"requires": { "requires": {
"svg.draggable.js": "^2.2.2", "svg.draggable.js": "^2.2.2",
"svg.easing.js": "^2.0.0", "svg.easing.js": "^2.0.0",
@ -2615,7 +2615,6 @@
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1", "function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2" "get-intrinsic": "^1.0.2"
@ -3080,9 +3079,9 @@
} }
}, },
"countup.js": { "countup.js": {
"version": "2.0.8", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.0.8.tgz", "resolved": "https://registry.npmjs.org/countup.js/-/countup.js-2.1.0.tgz",
"integrity": "sha512-pW3xwwD+hB+xmtI16xFcuLS0D5hSQqPQWkZOdgpKQyzxCquDNo2VCFPkRw12vmvdpnicXVTcjmYiakG6biwINg==" "integrity": "sha512-VanMzLEjkt3Hp/ty5BXikM8s4wE3OH4m1AnFro7THR86nYGRvGfGCoV+zrRJcqTbZi7X1egkLSIeUKDz7+4XLA=="
}, },
"create-ecdh": { "create-ecdh": {
"version": "4.0.4", "version": "4.0.4",
@ -4528,9 +4527,9 @@
"dev": true "dev": true
}, },
"floating-vue": { "floating-vue": {
"version": "1.0.0-beta.8", "version": "1.0.0-beta.15",
"resolved": "https://registry.npmjs.org/floating-vue/-/floating-vue-1.0.0-beta.8.tgz", "resolved": "https://registry.npmjs.org/floating-vue/-/floating-vue-1.0.0-beta.15.tgz",
"integrity": "sha512-z/UWtu6gOEWfMNHfPP3RCH3+C0mIq3p7ZISg2R/LCjXzYzeyZwQLz5m7iWRGso9/cpZUiOuU576fgCopA0nkvA==", "integrity": "sha512-mP6nIWqZkgZ4fQO5ji1heCUyolFdP8Ss/wq7CiCzjY1Z9JIX7ctzNQTAS5YbE7xN0L+m1bDRGxKXk70z7wm7UA==",
"requires": { "requires": {
"@floating-ui/dom": "^0.1.10", "@floating-ui/dom": "^0.1.10",
"vue-resize": "^1.0.0" "vue-resize": "^1.0.0"
@ -5293,8 +5292,7 @@
"function-bind": { "function-bind": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"dev": true
}, },
"functional-red-black-tree": { "functional-red-black-tree": {
"version": "1.0.1", "version": "1.0.1",
@ -5345,7 +5343,6 @@
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1", "function-bind": "^1.1.1",
"has": "^1.0.3", "has": "^1.0.3",
@ -5355,8 +5352,7 @@
"has-symbols": { "has-symbols": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
"dev": true
} }
} }
}, },
@ -5542,7 +5538,6 @@
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1" "function-bind": "^1.1.1"
} }
@ -7353,6 +7348,11 @@
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==",
"dev": true "dev": true
}, },
"object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
},
"object-is": { "object-is": {
"version": "1.1.5", "version": "1.1.5",
"resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
@ -7663,9 +7663,9 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
}, },
"photoswipe": { "photoswipe": {
"version": "5.2.0-beta.3", "version": "5.2.2",
"resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.2.0-beta.3.tgz", "resolved": "https://registry.npmjs.org/photoswipe/-/photoswipe-5.2.2.tgz",
"integrity": "sha512-+Wt7NoZfRtoZyS59mCfSADzWIBREzKrYzacmMY1/PwDnGRkEq0r+JtDgKslCfdUAyMvMK3ixekuSMYW/WyaNAQ==" "integrity": "sha512-es0AEX4zgzzcrr8ztdPWRODSARCLqCm/5H/aSwFtZwovokGtzBf/y/HXJxHMnNx6h4650DkKVIVFYILXJhmMhw=="
}, },
"picomatch": { "picomatch": {
"version": "2.3.0", "version": "2.3.0",
@ -8332,9 +8332,12 @@
"dev": true "dev": true
}, },
"qs": { "qs": {
"version": "6.9.4", "version": "6.10.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
"integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
"requires": {
"side-channel": "^1.0.4"
}
}, },
"querystring": { "querystring": {
"version": "0.2.0", "version": "0.2.0",
@ -9118,6 +9121,16 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true "dev": true
}, },
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
}
},
"signal-exit": { "signal-exit": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@ -10551,9 +10564,9 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": { "@babel/runtime": {
"version": "7.17.2", "version": "7.17.8",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz",
"integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==",
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }

View File

@ -8,19 +8,19 @@
"build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details --progress --hide-modules" "build-prod": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"apexcharts": "^3.33.1", "apexcharts": "^3.34.0",
"axios": "^0.21.4", "axios": "^0.21.4",
"blurhash": "^1.1.5", "blurhash": "^1.1.5",
"buefy": "^0.9.19", "buefy": "^0.9.19",
"bulma": "^0.9.3", "bulma": "^0.9.3",
"conditioner-core": "^2.3.3", "conditioner-core": "^2.3.3",
"countup.js": "^2.0.8", "countup.js": "^2.1.0",
"css-vars-ponyfill": "^2.4.7", "css-vars-ponyfill": "^2.4.7",
"floating-vue": "^1.0.0-beta.8", "floating-vue": "^1.0.0-beta.15",
"moment": "^2.29.1", "moment": "^2.29.1",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"photoswipe": "^5.2.0-beta.3", "photoswipe": "^5.2.2",
"qs": "^6.9.4", "qs": "^6.10.3",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"swiper": "^8.0.7", "swiper": "^8.0.7",

View File

@ -129,6 +129,8 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
zoomTitle: __( 'Zoom', 'tainacan'), zoomTitle: __( 'Zoom', 'tainacan'),
arrowPrevTitle: __( 'Previous slide', 'tainacan'), arrowPrevTitle: __( 'Previous slide', 'tainacan'),
arrowNextTitle: __( 'Next slide', 'tainacan'), arrowNextTitle: __( 'Next slide', 'tainacan'),
errorMsg: __('The image cannot be loaded', 'tainacan'),
wheelToZoom: true,
getClickedIndexFn: (clickedElement) => { getClickedIndexFn: (clickedElement) => {
return items.findIndex(anItem => anItem.el.contains(clickedElement.target)); return items.findIndex(anItem => anItem.el.contains(clickedElement.target));
}, },
@ -155,7 +157,6 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery {
/* Updates Swiper instance from Photoswipe */ /* Updates Swiper instance from Photoswipe */
const swiperInstance = this.mainSwiper ? this.mainSwiper : this.thumbsSwiper; const swiperInstance = this.mainSwiper ? this.mainSwiper : this.thumbsSwiper;
// Parse URL and open gallery from it if contains #&pid=3&gid=1 // Parse URL and open gallery from it if contains #&pid=3&gid=1
const hashData = this.photoswipeParseHash(); const hashData = this.photoswipeParseHash();
if (hashData.pid && hashData.gid && this.options.media_id == hashData.gid) { if (hashData.pid && hashData.gid && this.options.media_id == hashData.gid) {