From 111b5d1f153bcd56e5ab6c5b37c5540abb66df11 Mon Sep 17 00:00:00 2001 From: Alex Trofimov Date: Sun, 5 Jan 2025 13:57:32 +0300 Subject: [PATCH] #4852 Update outdated JS packages: flatpickr, flickity --- package-lock.json | 59 +++++++++++++++++- package.json | 6 +- plugins_public/flickity/flickity.css | 63 ++++++++++++++------ plugins_public/flickity/flickity.pkgd.min.js | 25 ++++++-- 4 files changed, 129 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dce83e93e..d95d08fd5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,9 @@ "filepond-plugin-image-preview": "^4.6.12", "filepond-plugin-image-resize": "^2.0.10", "filepond-plugin-image-transform": "^3.8.7", - "flag-icons": "^7.2.3" + "flag-icons": "^7.2.3", + "flatpickr": "^4.6.13", + "flickity": "^3.0.0" }, "devDependencies": { "bower": "^1.8.14", @@ -484,6 +486,12 @@ "node": ">=0.8.0" } }, + "node_modules/ev-emitter": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-2.1.2.tgz", + "integrity": "sha512-jQ5Ql18hdCQ4qS+RCrbLfz1n+Pags27q5TwMKvZyhp5hh2UULUYZUy1keqj6k6SYsdqIYjnmz7xyyEY0V67B8Q==", + "license": "MIT" + }, "node_modules/fancybox": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fancybox/-/fancybox-3.0.1.tgz", @@ -550,12 +558,37 @@ "filepond": ">=3.6.0 <5.x" } }, + "node_modules/fizzy-ui-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/fizzy-ui-utils/-/fizzy-ui-utils-3.0.0.tgz", + "integrity": "sha512-uJj38QFQiJ/KCio5tiZhwAjIbTXSIgzBCKdKVbaYfLS053F6z23Nb0o1ZoO9gnxOQWN7BCc35jsvrCtAq3gY9g==", + "license": "MIT" + }, "node_modules/flag-icons": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/flag-icons/-/flag-icons-7.2.3.tgz", "integrity": "sha512-X2gUdteNuqdNqob2KKTJTS+ZCvyWeLCtDz9Ty8uJP17Y4o82Y+U/Vd4JNrdwTAjagYsRznOn9DZ+E/Q52qbmqg==", "license": "MIT" }, + "node_modules/flatpickr": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.13.tgz", + "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==", + "license": "MIT" + }, + "node_modules/flickity": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/flickity/-/flickity-3.0.0.tgz", + "integrity": "sha512-Xw4znhglA2LVSmka0yKmzb4+fLwXm13TuKmdG1HbUoZZL95J1ZMr4hAA3w69s+Z6q/c6CyBDM25JVwMqgF3rOg==", + "license": "GPL-3.0", + "dependencies": { + "ev-emitter": "^2.1.2", + "fizzy-ui-utils": "^3.0.0", + "get-size": "^3.0.0", + "imagesloaded": "^5.0.0", + "unidragger": "^3.0.0" + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -646,6 +679,12 @@ "node": ">= 0.4" } }, + "node_modules/get-size": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-size/-/get-size-3.0.0.tgz", + "integrity": "sha512-Y8aiXLq4leR7807UY0yuKEwif5s3kbVp1nTv+i4jBeoUzByTLKkLWu/HorS6/pB+7gsB0o7OTogC8AoOOeT0Hw==", + "license": "MIT" + }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -795,6 +834,15 @@ "node": ">= 0.4" } }, + "node_modules/imagesloaded": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/imagesloaded/-/imagesloaded-5.0.0.tgz", + "integrity": "sha512-/0JGSubc1MTCoDKVmonLHgbifBWHdyLkun+R/151E1c5n79hiSxcd7cB7mPXFgojYu8xnRZv7GYxzKoxW8BetQ==", + "license": "MIT", + "dependencies": { + "ev-emitter": "^2.1.2" + } + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -2083,6 +2131,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unidragger": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/unidragger/-/unidragger-3.0.1.tgz", + "integrity": "sha512-RngbGSwBFmqGBWjkaH+yB677uzR95blSQyxq6hYbrQCejH3Mx1nm8DVOuh3M9k2fQyTstWUG5qlgCnNqV/9jVw==", + "license": "MIT", + "dependencies": { + "ev-emitter": "^2.0.0" + } + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", diff --git a/package.json b/package.json index ab7b92895e..bf633503db 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "filepond-plugin-image-preview": "^4.6.12", "filepond-plugin-image-resize": "^2.0.10", "filepond-plugin-image-transform": "^3.8.7", - "flag-icons": "^7.2.3" + "flag-icons": "^7.2.3", + "flatpickr": "^4.6.13", + "flickity": "^3.0.0" }, "scripts": { "install-bower-components": "bower install", @@ -24,6 +26,8 @@ "build:fancybox": "mkdir -p plugins_public/fancybox; cd node_modules/fancybox/dist; cp -r css/* ../../../plugins_public/fancybox; cp -r helpers ../../../plugins_public/fancybox; cp -r img/* ../../../plugins_public/fancybox; cp -r js/* ../../../plugins_public/fancybox", "build:filepond": "mkdir -p plugins_public/filepond; cd node_modules/filepond; cp -r dist/filepond.min.* ../../plugins_public/filepond; cp -r locale ../../plugins_public/filepond; cd ../../plugins_public/filepond; cp ../../node_modules/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.min.js .; cp ../../node_modules/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.min.js .; cp ../../node_modules/filepond-plugin-image-crop/dist/filepond-plugin-image-crop.min.js .; cp ../../node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.* .; cp ../../node_modules/filepond-plugin-image-resize/dist/filepond-plugin-image-resize.min.js .; cp ../../node_modules/filepond-plugin-image-transform/dist/filepond-plugin-image-transform.min.js .", "build:flag-icons": "mkdir -p plugins_public/flag-icons; cd node_modules/flag-icons; cp -r css ../../plugins_public/flag-icons; cp -r flags ../../plugins_public/flag-icons", + "build:flatpickr": "mkdir -p plugins_public/flatpickr; cd node_modules/flatpickr; cp -r dist ../../plugins_public/flatpickr", + "build:flickity": "mkdir -p plugins_public/flickity; cd node_modules/flickity; cp -r dist/flickity.css ../../plugins_public/flickity; cp -r dist/flickity.pkgd.min.js ../../plugins_public/flickity", "build": "npm run install-bower-components; npm-run-all --parallel build:*" }, "devDependencies": { diff --git a/plugins_public/flickity/flickity.css b/plugins_public/flickity/flickity.css index 7a947f8370..505c112eb7 100644 --- a/plugins_public/flickity/flickity.css +++ b/plugins_public/flickity/flickity.css @@ -1,4 +1,4 @@ -/*! Flickity v2.2.1 +/*! Flickity v3.0.0 https://flickity.metafizzy.co ---------------------------------------------- */ @@ -12,40 +12,54 @@ https://flickity.metafizzy.co overflow: hidden; position: relative; height: 100%; + touch-action: pan-y; } .flickity-slider { position: absolute; width: 100%; height: 100%; + left: 0; +} + +.flickity-rtl .flickity-slider { + left: unset; + right: 0; } /* draggable */ .flickity-enabled.is-draggable { -webkit-tap-highlight-color: transparent; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + user-select: none; } .flickity-enabled.is-draggable .flickity-viewport { cursor: move; - cursor: -webkit-grab; cursor: grab; } .flickity-enabled.is-draggable .flickity-viewport.is-pointer-down { - cursor: -webkit-grabbing; cursor: grabbing; } +/* ---- flickity-cell ---- */ + +.flickity-cell { + position: absolute; + left: 0; +} + +.flickity-rtl .flickity-cell { + left: unset; + right: 0; +} + /* ---- flickity-button ---- */ .flickity-button { position: absolute; - background: hsla(0, 0%, 100%, 0.75); + background: hsl(0 0% 100% / 75%); border: none; color: #333; } @@ -93,6 +107,7 @@ https://flickity.metafizzy.co left: auto; right: 10px; } + .flickity-rtl .flickity-prev-next-button.next { right: auto; left: 10px; @@ -112,26 +127,38 @@ https://flickity.metafizzy.co position: absolute; width: 100%; bottom: -25px; - padding: 0; - margin: 0; - list-style: none; text-align: center; - line-height: 1; + display: flex; + justify-content: center; + flex-wrap: wrap; } .flickity-rtl .flickity-page-dots { direction: rtl; } -.flickity-page-dots .dot { - display: inline-block; +.flickity-page-dot { + display: block; width: 10px; height: 10px; + padding: 0; margin: 0 8px; - background: #333; + background: hsl(0 0% 20% / 25%); border-radius: 50%; - opacity: 0.25; cursor: pointer; + appearance: none; + border: none; + text-indent: -9999px; + overflow: hidden; +} + +.flickity-rtl .flickity-page-dot { + text-indent: 9999px; +} + +.flickity-page-dot:focus { + outline: none; + box-shadow: 0 0 0 5px #19F; } -.flickity-page-dots .dot.is-selected { - opacity: 1; +.flickity-page-dot.is-selected { + background: hsl(0 0% 20% / 100%); } diff --git a/plugins_public/flickity/flickity.pkgd.min.js b/plugins_public/flickity/flickity.pkgd.min.js index 4a42c10f07..4b01ac82f9 100644 --- a/plugins_public/flickity/flickity.pkgd.min.js +++ b/plugins_public/flickity/flickity.pkgd.min.js @@ -1,12 +1,29 @@ /*! - * Flickity PACKAGED v2.2.1 + * Flickity PACKAGED v3.0.0 * Touch, responsive, flickable carousels * * Licensed GPLv3 for open source use * or Flickity Commercial License for commercial use * * https://flickity.metafizzy.co - * Copyright 2015-2019 Metafizzy + * Copyright 2015-2022 Metafizzy */ - -!function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(h,s,c){(c=c||e||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[h]=function(t){return"string"==typeof t?function(t,o,r){var a,l="$()."+h+'("'+o+'")';return t.each(function(t,e){var i=c.data(e,h);if(i){var n=i[o];if(n&&"_"!=o.charAt(0)){var s=n.apply(i,r);a=void 0===a?s:a}else d(l+" is not a valid method")}else d(h+" not initialized. Cannot call methods, i.e. "+l)}),void 0!==a?a:t}(this,t,i.call(arguments,1)):(function(t,n){t.each(function(t,e){var i=c.data(e,h);i?(i.option(n),i._init()):(i=new s(e,n),c.data(e,h,i))})}(this,t),this)},o(c))}function o(t){!t||t&&t.bridget||(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s