well-waterfall 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/waterfall.js +56 -6
- package/package.json +1 -1
- package/src/modules/breakpoints.ts +36 -0
- package/src/modules/effect.ts +45 -0
- package/src/modules/layout.ts +8 -0
- package/src/modules/pagination.ts +119 -0
- package/src/modules/playback.ts +32 -0
- package/src/modules/scrollbar.ts +36 -0
- package/src/waterfall.ts +42 -232
- package/src/modules/autoplay.ts +0 -16
package/dist/waterfall.js
CHANGED
|
@@ -130,13 +130,33 @@ eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElem
|
|
|
130
130
|
|
|
131
131
|
/***/ }),
|
|
132
132
|
|
|
133
|
-
/***/ "./src/modules/
|
|
134
|
-
|
|
135
|
-
!*** ./src/modules/
|
|
136
|
-
|
|
133
|
+
/***/ "./src/modules/breakpoints.ts":
|
|
134
|
+
/*!************************************!*\
|
|
135
|
+
!*** ./src/modules/breakpoints.ts ***!
|
|
136
|
+
\************************************/
|
|
137
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
138
|
+
|
|
139
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ breakpointsConfig: () => (/* binding */ breakpointsConfig)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction breakpointsConfig($this) {\n return {\n 478: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'lmobile-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'lmobile-slides-per-view', null),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'lmobile-slides-per-group', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'lmobile-space-between', null),\n },\n 767: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'tablet-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'tablet-slides-per-view', null),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'tablet-slides-per-group', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'tablet-space-between', null),\n },\n 991: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'desktop-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'desktop-slides-per-view', null),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'desktop-slides-per-group', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'desktop-space-between', null),\n },\n 1280: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'large-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'large-slides-per-view', null),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'large-slides-per-group', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'large-space-between', null),\n },\n 1440: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'xlarge-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'xlarge-slides-per-view', null),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'xlarge-slides-per-group', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'xlarge-space-between', null),\n },\n };\n}\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/breakpoints.ts?");
|
|
140
|
+
|
|
141
|
+
/***/ }),
|
|
142
|
+
|
|
143
|
+
/***/ "./src/modules/effect.ts":
|
|
144
|
+
/*!*******************************!*\
|
|
145
|
+
!*** ./src/modules/effect.ts ***!
|
|
146
|
+
\*******************************/
|
|
147
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
148
|
+
|
|
149
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ cardsEffect: () => (/* binding */ cardsEffect),\n/* harmony export */ coverflowEffect: () => (/* binding */ coverflowEffect),\n/* harmony export */ cubeEffect: () => (/* binding */ cubeEffect),\n/* harmony export */ fadeConfig: () => (/* binding */ fadeConfig),\n/* harmony export */ flipEffect: () => (/* binding */ flipEffect)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction fadeConfig($this) {\n return {\n crossFade: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'fade-cross-fade', false),\n };\n}\nfunction coverflowEffect($this) {\n return {\n depth: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-depth', 100),\n modifier: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-modifier', 1),\n rotate: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-rotate', 50),\n scale: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-scale', 1),\n slideShadows: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-slide-shadows', true),\n stretch: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'coverflow-stretch', 0),\n };\n}\nfunction flipEffect($this) {\n return {\n limitRotation: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'flip-limit-rotation', true),\n slideShadows: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'flip-slide-shadows', true),\n };\n}\nfunction cubeEffect($this) {\n return {\n shadow: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cube-shadow', true),\n shadowOffset: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cube-shadow-offset', 20),\n shadowScale: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cube-shadow-scale', 0.94),\n slideShadows: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cube-slide-shadows', true),\n };\n}\nfunction cardsEffect($this) {\n return {\n perSlideOffset: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cards-per-slide-offset', 8),\n perSlideRotate: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cards-per-slide-rotate', 2),\n rotate: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cards-rotate', true),\n slideShadows: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'cards-slide-shadows', true),\n };\n}\n//NOTE - Creative Effect Not implemented\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/effect.ts?");
|
|
150
|
+
|
|
151
|
+
/***/ }),
|
|
152
|
+
|
|
153
|
+
/***/ "./src/modules/layout.ts":
|
|
154
|
+
/*!*******************************!*\
|
|
155
|
+
!*** ./src/modules/layout.ts ***!
|
|
156
|
+
\*******************************/
|
|
137
157
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
138
158
|
|
|
139
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */
|
|
159
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ gridConfig: () => (/* binding */ gridConfig)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction gridConfig($this) {\n return {\n fill: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'grid-fill', 'column'),\n rows: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'grid-rows', 1),\n };\n}\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/layout.ts?");
|
|
140
160
|
|
|
141
161
|
/***/ }),
|
|
142
162
|
|
|
@@ -150,6 +170,36 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
150
170
|
|
|
151
171
|
/***/ }),
|
|
152
172
|
|
|
173
|
+
/***/ "./src/modules/pagination.ts":
|
|
174
|
+
/*!***********************************!*\
|
|
175
|
+
!*** ./src/modules/pagination.ts ***!
|
|
176
|
+
\***********************************/
|
|
177
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
178
|
+
|
|
179
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ paginationConfig: () => (/* binding */ paginationConfig)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction paginationConfig($this) {\n var _a;\n let paginationType = (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-type', '');\n let $paginationBullet = $this.find(\"[waterfall-el='pagination-bullet']\");\n let paginationBulletActive = $this.find(\"[waterfall-el='pagination-bullet-active']\");\n return {\n bulletActiveClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.getUniqueClasses)(paginationBulletActive, $paginationBullet),\n bulletClass: $paginationBullet.attr('class'),\n bulletElement: ((_a = $paginationBullet.prop('tagName')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'span', //ISSUE HERE\n clickable: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-clickable', false),\n clickableClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-clickable-class', 'swiper-pagination-clickable'),\n currentClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-current-class', 'swiper-pagination-current'),\n dynamicBullets: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'dynamic-bullets', 'swiper-pagination-current'),\n dynamicMainBullets: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'dynamic-main-bullets', 1),\n el: $this.find(\"[waterfall-el='pagination']\")[0],\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-enabled', null),\n //formatFractionCurrent: null,\n //formatFractionTotal: null,\n hiddenClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-hidden-class', 'swiper-pagination-hidden'),\n hideOnClick: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-hide-on-click', true),\n horizontalClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-horizontal-class', 'swiper-pagination-horizontal'),\n lockClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-lock-class', 'swiper-pagination-lock'),\n modifierClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-modifier-class', 'swiper-pagination-'),\n paginationDisabledClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-disabled-class', 'swiper-pagination-disabled'),\n progressbarFillClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-progressbar-fill-class', 'swiper-pagination-progressbar-fill'),\n progressbarOpposite: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-progressbar-opposite', 'swiper-pagination-progressbar-opposite'),\n renderBullet: customRenderBullet(),\n //renderCustom: null,\n //renderFraction: null,\n //renderProgressBar: null,\n totalClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-total-class', 'swiper-pagination-total'),\n type: getPaginationType(),\n verticalClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pagination-vertical-class', 'swiper-pagination-vertical'),\n };\n // Custom pagination type rendering functions\n function customRenderBullet() {\n let renderBullet = null;\n if (paginationType === 'numberBullets') {\n renderBullet = function (index, className) {\n return `<span class=\"${className}\">${index + 1}</span>`;\n };\n }\n if (paginationType === 'bullets') {\n renderBullet = function (index, className) {\n return `<span class=\"${className}\"></span>`;\n };\n }\n return renderBullet;\n }\n // Custom function to get extended pagination types\n function getPaginationType() {\n if (paginationType === 'numberBullets' || paginationType === 'bullets')\n return 'bullets';\n if (paginationType === 'fraction')\n return 'fraction';\n if (paginationType === 'progressbar')\n return 'progressbar';\n if (paginationType === 'custom')\n return 'custom';\n else\n return 'bullets'; // default\n }\n}\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/pagination.ts?");
|
|
180
|
+
|
|
181
|
+
/***/ }),
|
|
182
|
+
|
|
183
|
+
/***/ "./src/modules/playback.ts":
|
|
184
|
+
/*!*********************************!*\
|
|
185
|
+
!*** ./src/modules/playback.ts ***!
|
|
186
|
+
\*********************************/
|
|
187
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
188
|
+
|
|
189
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ autoplayConfig: () => (/* binding */ autoplayConfig),\n/* harmony export */ freeModeConfig: () => (/* binding */ freeModeConfig)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction autoplayConfig($this) {\n // Add CSS for Smooth Autoplay\n $(\"[smooth-autoplay='true']\")\n .find('.swiper-wrapper')\n .css('transition-timing-function', 'linear');\n return {\n delay: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'delay', 3000),\n disableOnInteraction: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'disable-on-interaction', false), // documentation says default is true, doesn't appear to be correct\n reverseDirection: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'reverse-direction', false),\n pauseOnMouseEnter: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'pause-on-mouse-enter', false),\n stopOnLastSlide: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'stop-on-last-slide', false),\n };\n}\nfunction freeModeConfig($this) {\n return {\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-enabled', false),\n minimumVelocity: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-minimum-velocity', 0.02),\n momentum: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-momentum', true),\n momentumBounce: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-momentum-bounce', true),\n momentumBounceRatio: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-momentum-bounce-ratio', 1),\n momentumRatio: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-momentum-ratio', 1),\n momentumVelocityRatio: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-momentum-velocity-ratio', 1),\n sticky: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'free-mode-sticky', false),\n };\n}\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/playback.ts?");
|
|
190
|
+
|
|
191
|
+
/***/ }),
|
|
192
|
+
|
|
193
|
+
/***/ "./src/modules/scrollbar.ts":
|
|
194
|
+
/*!**********************************!*\
|
|
195
|
+
!*** ./src/modules/scrollbar.ts ***!
|
|
196
|
+
\**********************************/
|
|
197
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
198
|
+
|
|
199
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ scrollbarConfig: () => (/* binding */ scrollbarConfig)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ \"./src/util.ts\");\n\nfunction scrollbarConfig($this) {\n const $scrollbar = $this.find(\"[waterfall-el='scrollbar']\");\n const $scrollbarDrag = $($scrollbar).find(\"[waterfall-el='scrollbar-drag']\");\n return {\n dragClass: $scrollbarDrag.attr('class'),\n dragSize: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-drag-size', 'auto'),\n draggable: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-draggable', false),\n el: $scrollbar[0],\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-enabled', null),\n hide: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-hide', true),\n horizontalClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-horizontal-class', 'swiper-scrollbar-horizontal'),\n lockClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-lock-class', 'swiper-scrollbar-lock'),\n scrollbarDisabledClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-disabled-class', 'swiper-scrollbar-disabled'),\n snapOnRelease: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'snap-on-release', true), // documentation says default is false, but is lying lmao\n verticalClass: (0,_util__WEBPACK_IMPORTED_MODULE_0__.parseAttr)($this, 'scrollbar-vertical-class', 'swiper-scrollbar-vertical'),\n };\n}\n\n\n//# sourceURL=webpack://Waterfall/./src/modules/scrollbar.ts?");
|
|
200
|
+
|
|
201
|
+
/***/ }),
|
|
202
|
+
|
|
153
203
|
/***/ "./src/util.ts":
|
|
154
204
|
/*!*********************!*\
|
|
155
205
|
!*** ./src/util.ts ***!
|
|
@@ -166,7 +216,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
166
216
|
\**************************/
|
|
167
217
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
168
218
|
|
|
169
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ \"./node_modules/swiper/swiper-bundle.mjs\");\n/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ \"./node_modules/swiper/swiper-bundle.css\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ \"./src/util.ts\");\n/* harmony import */ var _modules_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/navigation */ \"./src/modules/navigation.ts\");\n/* harmony import */ var _modules_autoplay__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/autoplay */ \"./src/modules/autoplay.ts\");\n\n\n\n\n\nconsole.log(`🚿 Hello from Wellflow Waterfall v${\"0.1.40\"}`);\nconst sliders = [];\n$('[waterfall]').each(function (index) {\n var _a;\n const $this = $(this);\n const name = (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseString)($this, 'waterfall', `Swiper ${index}`);\n if (!name)\n return;\n const debug = Boolean((0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'debug-mode', false) || false);\n console.log(`Initializing Waterfall: ${name} ${debug ? '[DEBUG MODE]' : ''}`);\n const swiperConfig = {\n a11y: {\n prevSlideMessage: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'a11y-prev-message', 'Previous Slide'),\n nextSlideMessage: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'a11y-next-message', 'Next Slide'),\n },\n allowSlideNext: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-slide-next', true),\n allowSlidePrev: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-slide-prev', true),\n allowTouchMove: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-touch-move', true),\n autoHeight: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'auto-height', false),\n breakpointsBase: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'breakpoints-base', 'window'),\n centerInsufficientSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'center-insufficient-slides', false),\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'centered-slides', false),\n containerModifierClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'container-modifier-class', 'swiper-'),\n createElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'create-elements', false),\n cssMode: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'css-mode', false),\n direction: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'direction', 'horizontal'),\n edgeSwipeDetection: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'edge-swipe-detection', false),\n edgeSwipeThreshold: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'edge-swipe-threshold', 20),\n effect: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'effect', 'slide'),\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'enabled', true),\n eventsPrefix: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'events-prefix', 'swiper'),\n focusableElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'focusable-elements', 'input, select, option, textarea, button, video, label'),\n followFinger: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'follow-finger', true),\n freeMode: {\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-enabled', false),\n sticky: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-sticky', false),\n },\n grabCursor: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'grab-cursor', false),\n //grid: null,\n //hashNavigation: null,\n height: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'height', null),\n //history: null,\n init: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'init', true),\n initialSlide: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'initial-slide', 0),\n //injectStyles: null, // not needed\n //injectStylesUrls: null, // not needed\n lazyPreloadPrevNext: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lazy-preload-prev-next', 0),\n lazyPreloaderClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lazy-preloader-class', 'swiper-lazy-preloader'),\n longSwipes: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes', true), // no effect\n longSwipesMs: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes-ms', 300), // no effect\n longSwipesRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes-ratio', 0.5), // no effect\n loop: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-mode', false),\n loopAddBlankSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-add-blank-slides', true),\n loopAdditionalSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-additional-slides', 0),\n loopPreventsSliding: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-prevents-sliding', true),\n maxBackfaceHiddenSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'max-backface-hidden-slides', 10),\n //modules: null, // take a look at this\n //mouseWheel: null,\n //navigation: null,\n nested: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'nested', false),\n noSwiping: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping', true),\n noSwipingClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping-class', 'swiper-no-swiping'),\n noSwipingSelector: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping-selector', null),\n normalizeSlideIndex: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'normalize-slide-index', true),\n observeParents: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'observe-parents', false),\n observeSlideChildren: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'observe-slide-children', false),\n //observer: null,\n //on: null,\n //onAny: null,\n oneWayMovement: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'data-one-way-movement', false),\n //pagination: null,\n //parallax: null,\n passiveListeners: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'passive-listeners', true),\n preventClicks: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-clicks', true),\n preventClicksPropagation: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-clicks-propagation', true),\n preventInteractionOnTransition: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-interaction-on-transition', false),\n resistance: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resistance', true),\n resistanceRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resistance-ratio', 0.85),\n resizeObserver: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resize-observer', true),\n rewind: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'rewind', false),\n roundLengths: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'round-lengths', false),\n runCallbacksOnInit: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'run-callbacks-on-init', true),\n // scrollbar: null,\n // setWrapperSize: getAttr($this, 'set-wrapper-size', false),\n shortSwipes: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'short-swipes', true),\n simulateTouch: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'simulate-touch', true),\n slideActiveClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-active-class', 'swiper-slide-active'),\n slideBlankClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-blank-class', 'swiper-slide-blank'),\n slideClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-class', 'swiper-slide'),\n slideFullyVisibleClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-fully-visible-class', 'swiper-slide-fully-visible'),\n slideNextClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-next-class', 'swiper-slide-next'),\n slidePrevClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-prev-class', 'swiper-slide-prev'),\n slideToClickedSlide: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-to-clicked-slide', false),\n slideVisibleClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-visible-class', 'swiper-slide-visible'),\n slidesOffsetAfter: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-offset-after', 0),\n slidesOffsetBefore: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-offset-before', 0),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group', 1),\n slidesPerGroupAuto: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group-auto', false),\n slidesPerGroupSkip: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group-skip', 0),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-view', '1'),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'space-between', 0),\n speed: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'speed', 300),\n // swipeHandler: getAttr($this, \"swipe-handler\", null),\n swiperElementNodeName: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'swiper-element-node-name', 'SWIPER-CONTAINER'),\n threshold: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'threshold', 5),\n // thumbs: null,\n touchAngle: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-angle', 45),\n touchEventsTarget: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-events-target', 'wrapper'),\n touchMoveStopPropagation: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-move-stop-propagation', false),\n touchRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-ratio', 1),\n touchReleaseOnEdges: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-release-on-edges', false),\n touchStartForcePreventDefault: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-start-force-prevent-default', false),\n touchStartPreventDefault: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-start-prevent-default', true),\n uniqueNavElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'unique-nav-elements', true),\n updateOnWindowResize: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'update-on-window-resize', true),\n //url: getAttr($this, \"url\", \"null\"),\n //userAgent: getAttr($this, \"user-agent\", \"null\"),\n //virtual: null,\n virtualTranslate: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'virtual-translate', false),\n watchOverflow: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'watch-overflow', true),\n watchSlidesProgress: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'watch-slides-progress', false),\n width: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'width', null),\n wrapperClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'wrapper-class', 'swiper-wrapper'),\n //zoom: null,\n };\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n // --- BREAKPOINTS ----------------------------\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n swiperConfig.breakpoints = {\n 478: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lmobile-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lmobile-slides-per-view', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lmobile-space-between', null),\n },\n 767: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'tablet-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'tablet-slides-per-view', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'tablet-space-between', null),\n },\n 991: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'desktop-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'desktop-slides-per-view', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'desktop-space-between', null),\n },\n 1280: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'large-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'large-slides-per-view', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'large-space-between', null),\n },\n 1440: {\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'xlarge-centered-slides', null),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'xlarge-slides-per-view', null),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'xlarge-space-between', null),\n },\n };\n const autoplayMode = (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'autoplay-mode', false);\n if (autoplayMode)\n swiperConfig.autoplay = (0,_modules_autoplay__WEBPACK_IMPORTED_MODULE_4__.autoplayConfig)($this);\n swiperConfig.navigation = (0,_modules_navigation__WEBPACK_IMPORTED_MODULE_3__.navigationConfig)($this, name);\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n // --- PAGINATION -----------------------------\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n let paginationType = (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-type', '');\n let $paginationBullet = $this.find(\"[waterfall-el='pagination-bullet']\");\n let paginationBulletActive = $this.find(\"[waterfall-el='pagination-bullet-active']\");\n let pagination = $paginationBullet.length ? true : false;\n // Custom pagination type rendering functions\n function customRenderBullet() {\n let renderBullet = null;\n if (paginationType === 'numberBullets') {\n renderBullet = function (index, className) {\n return `<span class=\"${className}\">${index + 1}</span>`;\n };\n }\n if (paginationType === 'bullets') {\n renderBullet = function (index, className) {\n return `<span class=\"${className}\"></span>`;\n };\n }\n return renderBullet;\n }\n // Custom function to get extended pagination types\n function getPaginationType() {\n if (paginationType === 'numberBullets' || paginationType === 'bullets')\n return 'bullets';\n if (paginationType === 'fraction')\n return 'fraction';\n if (paginationType === 'progressbar')\n return 'progressbar';\n if (paginationType === 'custom')\n return 'custom';\n else\n return 'bullets'; // default\n }\n if (pagination) {\n swiperConfig.pagination = {\n bulletActiveClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.getUniqueClasses)(paginationBulletActive, $paginationBullet),\n bulletClass: $paginationBullet.attr('class'),\n bulletElement: ((_a = $paginationBullet.prop('tagName')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'span', //ISSUE HERE\n clickable: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-clickable', false),\n clickableClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-clickable-class', 'swiper-pagination-clickable'),\n currentClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-current-class', 'swiper-pagination-current'),\n dynamicBullets: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'dynamic-bullets', 'swiper-pagination-current'),\n dynamicMainBullets: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'dynamic-main-bullets', 1),\n el: $this.find(\"[waterfall-el='pagination']\")[0],\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-enabled', null),\n //formatFractionCurrent: null,\n //formatFractionTotal: null,\n hiddenClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-hidden-class', 'swiper-pagination-hidden'),\n hideOnClick: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-hide-on-click', true),\n horizontalClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-horizontal-class', 'swiper-pagination-horizontal'),\n lockClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-lock-class', 'swiper-pagination-lock'),\n modifierClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-modifier-class', 'swiper-pagination-'),\n paginationDisabledClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-disabled-class', 'swiper-pagination-disabled'),\n progressbarFillClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-progressbar-fill-class', 'swiper-pagination-progressbar-fill'),\n progressbarOpposite: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-progressbar-opposite', 'swiper-pagination-progressbar-opposite'),\n renderBullet: customRenderBullet(),\n //renderCustom: null,\n //renderFraction: null,\n //renderProgressBar: null,\n totalClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-total-class', 'swiper-pagination-total'),\n type: getPaginationType(),\n verticalClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'pagination-vertical-class', 'swiper-pagination-vertical'),\n };\n }\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n // --- SCROLLBAR ------------------------------\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n const $scrollbar = $this.find(\"[waterfall-el='scrollbar']\");\n const $scrollbarDrag = $($scrollbar).find(\"[waterfall-el='scrollbar-drag']\");\n if ($scrollbar) {\n swiperConfig.scrollbar = {\n dragClass: $scrollbarDrag.attr('class'),\n dragSize: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-drag-size', 'auto'),\n draggable: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-draggable', false),\n el: $scrollbar[0],\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-enabled', null),\n hide: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-hide', true),\n horizontalClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-horizontal-class', 'swiper-scrollbar-horizontal'),\n lockClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-lock-class', 'swiper-scrollbar-lock'),\n scrollbarDisabledClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-disabled-class', 'swiper-scrollbar-disabled'),\n snapOnRelease: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'snap-on-release', true), // documentation says default is false, but is lying lmao\n verticalClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'scrollbar-vertical-class', 'swiper-scrollbar-vertical'),\n };\n }\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n // --- FREE MODE ------------------------------\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n swiperConfig.freeMode = {\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-enabled', false),\n minimumVelocity: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-minimum-velocity', 0.02),\n momentum: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-momentum', true),\n momentumBounce: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-momentum-bounce', true),\n momentumBounceRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-momentum-bounce-ratio', 1),\n momentumRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-momentum-ratio', 1),\n momentumVelocityRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-momentum-velocity-ratio', 1),\n sticky: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-sticky', false),\n };\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n // --- GRID -----------------------------------\n // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n swiperConfig.grid = {\n fill: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'grid-fill', 'column'),\n rows: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'grid-rows', 1),\n };\n // --- CLEANUP AND EXPORT ---\n const config = (0,_util__WEBPACK_IMPORTED_MODULE_2__.removeNullKeys)(swiperConfig);\n (0,_util__WEBPACK_IMPORTED_MODULE_2__.printDebug)(debug, 'CONFIG', config);\n // Initialize swiper\n const swiper = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__[\"default\"]($this.find('.swiper')[0], config);\n sliders.push({ name, slider: swiper });\n});\n// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n// --- SLIDE COUNT ----------------------------\n// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\ndocument.querySelectorAll('.swiper-wrapper').forEach((swiperWrapper) => {\n swiperWrapper.querySelectorAll('.swiper-slide').forEach((slide, index) => {\n const countEl = slide.querySelector('[waterfall-el=\"slide-count\"]');\n if (countEl) {\n countEl.textContent = (index + 1).toString();\n }\n });\n});\n\n\n//# sourceURL=webpack://Waterfall/./src/waterfall.ts?");
|
|
219
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ \"./node_modules/swiper/swiper-bundle.mjs\");\n/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ \"./node_modules/swiper/swiper-bundle.css\");\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ \"./src/util.ts\");\n/* harmony import */ var _modules_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/navigation */ \"./src/modules/navigation.ts\");\n/* harmony import */ var _modules_breakpoints__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/breakpoints */ \"./src/modules/breakpoints.ts\");\n/* harmony import */ var _modules_pagination__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pagination */ \"./src/modules/pagination.ts\");\n/* harmony import */ var _modules_scrollbar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/scrollbar */ \"./src/modules/scrollbar.ts\");\n/* harmony import */ var _modules_playback__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/playback */ \"./src/modules/playback.ts\");\n/* harmony import */ var _modules_effect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/effect */ \"./src/modules/effect.ts\");\n/* harmony import */ var _modules_layout__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/layout */ \"./src/modules/layout.ts\");\n\n\n\n\n\n\n\n\n\n\nconsole.log(`🚿 Hello from Wellflow Waterfall v${\"0.1.42\"}`);\nconst sliders = [];\n$('[waterfall]').each(function (index) {\n const $this = $(this);\n const name = (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseString)($this, 'waterfall', `Swiper ${index}`);\n if (!name)\n return;\n const debug = Boolean((0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'debug-mode', false) || false);\n console.log(`Initializing Waterfall: ${name} ${debug ? '[DEBUG MODE]' : ''}`);\n const swiperConfig = {\n a11y: {\n prevSlideMessage: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'a11y-prev-message', 'Previous Slide'),\n nextSlideMessage: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'a11y-next-message', 'Next Slide'),\n },\n allowSlideNext: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-slide-next', true),\n allowSlidePrev: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-slide-prev', true),\n allowTouchMove: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'allow-touch-move', true),\n autoHeight: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'auto-height', false),\n breakpointsBase: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'breakpoints-base', 'window'),\n centerInsufficientSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'center-insufficient-slides', false),\n centeredSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'centered-slides', false),\n containerModifierClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'container-modifier-class', 'swiper-'),\n createElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'create-elements', false),\n cssMode: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'css-mode', false),\n direction: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'direction', 'horizontal'),\n edgeSwipeDetection: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'edge-swipe-detection', false),\n edgeSwipeThreshold: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'edge-swipe-threshold', 20),\n effect: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'effect', 'slide'),\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'enabled', true),\n eventsPrefix: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'events-prefix', 'swiper'),\n focusableElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'focusable-elements', 'input, select, option, textarea, button, video, label'),\n followFinger: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'follow-finger', true),\n freeMode: {\n enabled: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-enabled', false),\n sticky: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'free-mode-sticky', false),\n },\n grabCursor: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'grab-cursor', false),\n //hashNavigation: null,\n height: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'height', null),\n //history: null,\n init: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'init', true),\n initialSlide: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'initial-slide', 0),\n //injectStyles: null, // not needed\n //injectStylesUrls: null, // not needed\n lazyPreloadPrevNext: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lazy-preload-prev-next', 0),\n lazyPreloaderClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'lazy-preloader-class', 'swiper-lazy-preloader'),\n longSwipes: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes', true), // no effect\n longSwipesMs: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes-ms', 300), // no effect\n longSwipesRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'long-swipes-ratio', 0.5), // no effect\n loop: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-mode', false),\n loopAddBlankSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-add-blank-slides', true),\n loopAdditionalSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-additional-slides', 0),\n loopPreventsSliding: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'loop-prevents-sliding', true),\n maxBackfaceHiddenSlides: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'max-backface-hidden-slides', 10),\n //modules: null, // take a look at this\n //mouseWheel: null,\n //navigation: null,\n nested: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'nested', false),\n noSwiping: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping', true),\n noSwipingClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping-class', 'swiper-no-swiping'),\n noSwipingSelector: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'no-swiping-selector', null),\n normalizeSlideIndex: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'normalize-slide-index', true),\n observeParents: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'observe-parents', false),\n observeSlideChildren: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'observe-slide-children', false),\n //observer: null,\n //on: null,\n //onAny: null,\n oneWayMovement: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'data-one-way-movement', false),\n //parallax: null,\n passiveListeners: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'passive-listeners', true),\n preventClicks: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-clicks', true),\n preventClicksPropagation: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-clicks-propagation', true),\n preventInteractionOnTransition: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'prevent-interaction-on-transition', false),\n resistance: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resistance', true),\n resistanceRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resistance-ratio', 0.85),\n resizeObserver: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'resize-observer', true),\n rewind: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'rewind', false),\n roundLengths: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'round-lengths', false),\n runCallbacksOnInit: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'run-callbacks-on-init', true),\n // setWrapperSize: getAttr($this, 'set-wrapper-size', false),\n shortSwipes: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'short-swipes', true),\n simulateTouch: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'simulate-touch', true),\n slideActiveClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-active-class', 'swiper-slide-active'),\n slideBlankClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-blank-class', 'swiper-slide-blank'),\n slideClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-class', 'swiper-slide'),\n slideFullyVisibleClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-fully-visible-class', 'swiper-slide-fully-visible'),\n slideNextClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-next-class', 'swiper-slide-next'),\n slidePrevClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-prev-class', 'swiper-slide-prev'),\n slideToClickedSlide: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-to-clicked-slide', false),\n slideVisibleClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slide-visible-class', 'swiper-slide-visible'),\n slidesOffsetAfter: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-offset-after', 0),\n slidesOffsetBefore: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-offset-before', 0),\n slidesPerGroup: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group', 1),\n slidesPerGroupAuto: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group-auto', false),\n slidesPerGroupSkip: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-group-skip', 0),\n slidesPerView: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'slides-per-view', '1'),\n spaceBetween: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'space-between', 0),\n speed: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'speed', 300),\n // swipeHandler: getAttr($this, \"swipe-handler\", null),\n swiperElementNodeName: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'swiper-element-node-name', 'SWIPER-CONTAINER'),\n threshold: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'threshold', 5),\n touchAngle: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-angle', 45),\n touchEventsTarget: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-events-target', 'wrapper'),\n touchMoveStopPropagation: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-move-stop-propagation', false),\n touchRatio: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-ratio', 1),\n touchReleaseOnEdges: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-release-on-edges', false),\n touchStartForcePreventDefault: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-start-force-prevent-default', false),\n touchStartPreventDefault: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'touch-start-prevent-default', true),\n uniqueNavElements: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'unique-nav-elements', true),\n updateOnWindowResize: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'update-on-window-resize', true),\n //url: getAttr($this, \"url\", \"null\"),\n //userAgent: getAttr($this, \"user-agent\", \"null\"),\n //virtual: null,\n virtualTranslate: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'virtual-translate', false),\n watchOverflow: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'watch-overflow', true),\n watchSlidesProgress: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'watch-slides-progress', false),\n width: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'width', null),\n wrapperClass: (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'wrapper-class', 'swiper-wrapper'),\n //zoom: null,\n };\n // BREAKPOINTS\n swiperConfig.breakpoints = (0,_modules_breakpoints__WEBPACK_IMPORTED_MODULE_4__.breakpointsConfig)($this);\n // PLAYBACK\n const playbackMode = (0,_util__WEBPACK_IMPORTED_MODULE_2__.parseAttr)($this, 'playback-mode', 'none');\n if (playbackMode === 'loop')\n swiperConfig.loop = true;\n if (playbackMode === 'rewind')\n swiperConfig.rewind = true;\n if (playbackMode === 'none') {\n swiperConfig.loop = false;\n swiperConfig.rewind = false;\n }\n swiperConfig.autoplay = (0,_modules_playback__WEBPACK_IMPORTED_MODULE_7__.autoplayConfig)($this);\n // NAVIGATION\n swiperConfig.navigation = (0,_modules_navigation__WEBPACK_IMPORTED_MODULE_3__.navigationConfig)($this, name);\n // PAGINATION\n let pagination = $this.find(\"[waterfall-el='pagination-bullet']\").length;\n if (pagination)\n swiperConfig.pagination = (0,_modules_pagination__WEBPACK_IMPORTED_MODULE_5__.paginationConfig)($this);\n // SCROLLBAR\n const $scrollbar = $this.find(\"[waterfall-el='scrollbar']\");\n if ($scrollbar)\n swiperConfig.scrollbar = (0,_modules_scrollbar__WEBPACK_IMPORTED_MODULE_6__.scrollbarConfig)($this);\n // EFFECT\n swiperConfig.fadeEffect = (0,_modules_effect__WEBPACK_IMPORTED_MODULE_8__.fadeConfig)($this);\n swiperConfig.coverflowEffect = (0,_modules_effect__WEBPACK_IMPORTED_MODULE_8__.coverflowEffect)($this);\n swiperConfig.flipEffect = (0,_modules_effect__WEBPACK_IMPORTED_MODULE_8__.flipEffect)($this);\n swiperConfig.cardsEffect = (0,_modules_effect__WEBPACK_IMPORTED_MODULE_8__.cardsEffect)($this);\n swiperConfig.cubeEffect = (0,_modules_effect__WEBPACK_IMPORTED_MODULE_8__.cubeEffect)($this);\n // FREE MODE\n swiperConfig.freeMode = (0,_modules_playback__WEBPACK_IMPORTED_MODULE_7__.freeModeConfig)($this);\n // GRID\n swiperConfig.grid = (0,_modules_layout__WEBPACK_IMPORTED_MODULE_9__.gridConfig)($this);\n // Clean up the config and debug\n const config = (0,_util__WEBPACK_IMPORTED_MODULE_2__.removeNullKeys)(swiperConfig);\n (0,_util__WEBPACK_IMPORTED_MODULE_2__.printDebug)(debug, 'CONFIG', config);\n // Initialize swiper\n const swiper = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__[\"default\"]($this.find('.swiper')[0], config);\n // Add to sliders array\n sliders.push({ name, slider: swiper });\n});\n// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\n// --- SLIDE COUNT ----------------------------\n// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-\ndocument.querySelectorAll('.swiper-wrapper').forEach((swiperWrapper) => {\n swiperWrapper.querySelectorAll('.swiper-slide').forEach((slide, index) => {\n const countEl = slide.querySelector('[waterfall-el=\"slide-count\"]');\n if (countEl) {\n countEl.textContent = (index + 1).toString();\n }\n });\n});\n\n\n//# sourceURL=webpack://Waterfall/./src/waterfall.ts?");
|
|
170
220
|
|
|
171
221
|
/***/ }),
|
|
172
222
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { parseAttr } from '../util';
|
|
2
|
+
|
|
3
|
+
export function breakpointsConfig($this: JQuery<HTMLElement>) {
|
|
4
|
+
return {
|
|
5
|
+
478: {
|
|
6
|
+
centeredSlides: parseAttr($this, 'lmobile-centered-slides', null),
|
|
7
|
+
slidesPerView: parseAttr($this, 'lmobile-slides-per-view', null),
|
|
8
|
+
slidesPerGroup: parseAttr($this, 'lmobile-slides-per-group', null),
|
|
9
|
+
spaceBetween: parseAttr($this, 'lmobile-space-between', null),
|
|
10
|
+
},
|
|
11
|
+
767: {
|
|
12
|
+
centeredSlides: parseAttr($this, 'tablet-centered-slides', null),
|
|
13
|
+
slidesPerView: parseAttr($this, 'tablet-slides-per-view', null),
|
|
14
|
+
slidesPerGroup: parseAttr($this, 'tablet-slides-per-group', null),
|
|
15
|
+
spaceBetween: parseAttr($this, 'tablet-space-between', null),
|
|
16
|
+
},
|
|
17
|
+
991: {
|
|
18
|
+
centeredSlides: parseAttr($this, 'desktop-centered-slides', null),
|
|
19
|
+
slidesPerView: parseAttr($this, 'desktop-slides-per-view', null),
|
|
20
|
+
slidesPerGroup: parseAttr($this, 'desktop-slides-per-group', null),
|
|
21
|
+
spaceBetween: parseAttr($this, 'desktop-space-between', null),
|
|
22
|
+
},
|
|
23
|
+
1280: {
|
|
24
|
+
centeredSlides: parseAttr($this, 'large-centered-slides', null),
|
|
25
|
+
slidesPerView: parseAttr($this, 'large-slides-per-view', null),
|
|
26
|
+
slidesPerGroup: parseAttr($this, 'large-slides-per-group', null),
|
|
27
|
+
spaceBetween: parseAttr($this, 'large-space-between', null),
|
|
28
|
+
},
|
|
29
|
+
1440: {
|
|
30
|
+
centeredSlides: parseAttr($this, 'xlarge-centered-slides', null),
|
|
31
|
+
slidesPerView: parseAttr($this, 'xlarge-slides-per-view', null),
|
|
32
|
+
slidesPerGroup: parseAttr($this, 'xlarge-slides-per-group', null),
|
|
33
|
+
spaceBetween: parseAttr($this, 'xlarge-space-between', null),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { parseAttr } from '../util';
|
|
2
|
+
|
|
3
|
+
export function fadeConfig($this: JQuery<HTMLElement>) {
|
|
4
|
+
return {
|
|
5
|
+
crossFade: parseAttr($this, 'fade-cross-fade', false),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function coverflowEffect($this: JQuery<HTMLElement>) {
|
|
10
|
+
return {
|
|
11
|
+
depth: parseAttr($this, 'coverflow-depth', 100),
|
|
12
|
+
modifier: parseAttr($this, 'coverflow-modifier', 1),
|
|
13
|
+
rotate: parseAttr($this, 'coverflow-rotate', 50),
|
|
14
|
+
scale: parseAttr($this, 'coverflow-scale', 1),
|
|
15
|
+
slideShadows: parseAttr($this, 'coverflow-slide-shadows', true),
|
|
16
|
+
stretch: parseAttr($this, 'coverflow-stretch', 0),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function flipEffect($this: JQuery<HTMLElement>) {
|
|
21
|
+
return {
|
|
22
|
+
limitRotation: parseAttr($this, 'flip-limit-rotation', true),
|
|
23
|
+
slideShadows: parseAttr($this, 'flip-slide-shadows', true),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function cubeEffect($this: JQuery<HTMLElement>) {
|
|
28
|
+
return {
|
|
29
|
+
shadow: parseAttr($this, 'cube-shadow', true),
|
|
30
|
+
shadowOffset: parseAttr($this, 'cube-shadow-offset', 20),
|
|
31
|
+
shadowScale: parseAttr($this, 'cube-shadow-scale', 0.94),
|
|
32
|
+
slideShadows: parseAttr($this, 'cube-slide-shadows', true),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function cardsEffect($this: JQuery<HTMLElement>) {
|
|
37
|
+
return {
|
|
38
|
+
perSlideOffset: parseAttr($this, 'cards-per-slide-offset', 8),
|
|
39
|
+
perSlideRotate: parseAttr($this, 'cards-per-slide-rotate', 2),
|
|
40
|
+
rotate: parseAttr($this, 'cards-rotate', true),
|
|
41
|
+
slideShadows: parseAttr($this, 'cards-slide-shadows', true),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//NOTE - Creative Effect Not implemented
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { getUniqueClasses, parseAttr } from '../util';
|
|
2
|
+
|
|
3
|
+
export function paginationConfig($this: JQuery<HTMLElement>) {
|
|
4
|
+
let paginationType = parseAttr($this, 'pagination-type', '');
|
|
5
|
+
|
|
6
|
+
let $paginationBullet = $this.find("[waterfall-el='pagination-bullet']");
|
|
7
|
+
let paginationBulletActive = $this.find(
|
|
8
|
+
"[waterfall-el='pagination-bullet-active']",
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
bulletActiveClass: getUniqueClasses(
|
|
13
|
+
paginationBulletActive,
|
|
14
|
+
$paginationBullet,
|
|
15
|
+
),
|
|
16
|
+
bulletClass: $paginationBullet.attr('class'),
|
|
17
|
+
bulletElement: $paginationBullet.prop('tagName')?.toLowerCase() || 'span', //ISSUE HERE
|
|
18
|
+
clickable: parseAttr($this, 'pagination-clickable', false),
|
|
19
|
+
clickableClass: parseAttr(
|
|
20
|
+
$this,
|
|
21
|
+
'pagination-clickable-class',
|
|
22
|
+
'swiper-pagination-clickable',
|
|
23
|
+
),
|
|
24
|
+
currentClass: parseAttr(
|
|
25
|
+
$this,
|
|
26
|
+
'pagination-current-class',
|
|
27
|
+
'swiper-pagination-current',
|
|
28
|
+
),
|
|
29
|
+
dynamicBullets: parseAttr(
|
|
30
|
+
$this,
|
|
31
|
+
'dynamic-bullets',
|
|
32
|
+
'swiper-pagination-current',
|
|
33
|
+
),
|
|
34
|
+
dynamicMainBullets: parseAttr($this, 'dynamic-main-bullets', 1),
|
|
35
|
+
el: $this.find("[waterfall-el='pagination']")[0],
|
|
36
|
+
enabled: parseAttr($this, 'pagination-enabled', null),
|
|
37
|
+
//formatFractionCurrent: null,
|
|
38
|
+
//formatFractionTotal: null,
|
|
39
|
+
hiddenClass: parseAttr(
|
|
40
|
+
$this,
|
|
41
|
+
'pagination-hidden-class',
|
|
42
|
+
'swiper-pagination-hidden',
|
|
43
|
+
),
|
|
44
|
+
hideOnClick: parseAttr($this, 'pagination-hide-on-click', true),
|
|
45
|
+
horizontalClass: parseAttr(
|
|
46
|
+
$this,
|
|
47
|
+
'pagination-horizontal-class',
|
|
48
|
+
'swiper-pagination-horizontal',
|
|
49
|
+
),
|
|
50
|
+
lockClass: parseAttr(
|
|
51
|
+
$this,
|
|
52
|
+
'pagination-lock-class',
|
|
53
|
+
'swiper-pagination-lock',
|
|
54
|
+
),
|
|
55
|
+
modifierClass: parseAttr(
|
|
56
|
+
$this,
|
|
57
|
+
'pagination-modifier-class',
|
|
58
|
+
'swiper-pagination-',
|
|
59
|
+
),
|
|
60
|
+
paginationDisabledClass: parseAttr(
|
|
61
|
+
$this,
|
|
62
|
+
'pagination-disabled-class',
|
|
63
|
+
'swiper-pagination-disabled',
|
|
64
|
+
),
|
|
65
|
+
progressbarFillClass: parseAttr(
|
|
66
|
+
$this,
|
|
67
|
+
'pagination-progressbar-fill-class',
|
|
68
|
+
'swiper-pagination-progressbar-fill',
|
|
69
|
+
),
|
|
70
|
+
progressbarOpposite: parseAttr(
|
|
71
|
+
$this,
|
|
72
|
+
'pagination-progressbar-opposite',
|
|
73
|
+
'swiper-pagination-progressbar-opposite',
|
|
74
|
+
),
|
|
75
|
+
renderBullet: customRenderBullet(),
|
|
76
|
+
//renderCustom: null,
|
|
77
|
+
//renderFraction: null,
|
|
78
|
+
//renderProgressBar: null,
|
|
79
|
+
totalClass: parseAttr(
|
|
80
|
+
$this,
|
|
81
|
+
'pagination-total-class',
|
|
82
|
+
'swiper-pagination-total',
|
|
83
|
+
),
|
|
84
|
+
type: getPaginationType(),
|
|
85
|
+
verticalClass: parseAttr(
|
|
86
|
+
$this,
|
|
87
|
+
'pagination-vertical-class',
|
|
88
|
+
'swiper-pagination-vertical',
|
|
89
|
+
),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// Custom pagination type rendering functions
|
|
93
|
+
function customRenderBullet() {
|
|
94
|
+
let renderBullet: RenderBulletFunction | null = null;
|
|
95
|
+
if (paginationType === 'numberBullets') {
|
|
96
|
+
renderBullet = function (index, className) {
|
|
97
|
+
return `<span class="${className}">${index + 1}</span>`;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (paginationType === 'bullets') {
|
|
101
|
+
renderBullet = function (index, className) {
|
|
102
|
+
return `<span class="${className}"></span>`;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return renderBullet;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Custom function to get extended pagination types
|
|
109
|
+
function getPaginationType() {
|
|
110
|
+
if (paginationType === 'numberBullets' || paginationType === 'bullets')
|
|
111
|
+
return 'bullets';
|
|
112
|
+
if (paginationType === 'fraction') return 'fraction';
|
|
113
|
+
if (paginationType === 'progressbar') return 'progressbar';
|
|
114
|
+
if (paginationType === 'custom') return 'custom';
|
|
115
|
+
else return 'bullets'; // default
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type RenderBulletFunction = (index: number, className: string) => string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { parseAttr } from '../util';
|
|
2
|
+
|
|
3
|
+
export function autoplayConfig($this: JQuery<HTMLElement>) {
|
|
4
|
+
// Add CSS for Smooth Autoplay
|
|
5
|
+
$("[smooth-autoplay='true']")
|
|
6
|
+
.find('.swiper-wrapper')
|
|
7
|
+
.css('transition-timing-function', 'linear');
|
|
8
|
+
return {
|
|
9
|
+
delay: parseAttr($this, 'delay', 3000),
|
|
10
|
+
disableOnInteraction: parseAttr($this, 'disable-on-interaction', false), // documentation says default is true, doesn't appear to be correct
|
|
11
|
+
reverseDirection: parseAttr($this, 'reverse-direction', false),
|
|
12
|
+
pauseOnMouseEnter: parseAttr($this, 'pause-on-mouse-enter', false),
|
|
13
|
+
stopOnLastSlide: parseAttr($this, 'stop-on-last-slide', false),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function freeModeConfig($this: JQuery<HTMLElement>) {
|
|
18
|
+
return {
|
|
19
|
+
enabled: parseAttr($this, 'free-mode-enabled', false),
|
|
20
|
+
minimumVelocity: parseAttr($this, 'free-mode-minimum-velocity', 0.02),
|
|
21
|
+
momentum: parseAttr($this, 'free-mode-momentum', true),
|
|
22
|
+
momentumBounce: parseAttr($this, 'free-mode-momentum-bounce', true),
|
|
23
|
+
momentumBounceRatio: parseAttr($this, 'free-mode-momentum-bounce-ratio', 1),
|
|
24
|
+
momentumRatio: parseAttr($this, 'free-mode-momentum-ratio', 1),
|
|
25
|
+
momentumVelocityRatio: parseAttr(
|
|
26
|
+
$this,
|
|
27
|
+
'free-mode-momentum-velocity-ratio',
|
|
28
|
+
1,
|
|
29
|
+
),
|
|
30
|
+
sticky: parseAttr($this, 'free-mode-sticky', false),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { parseAttr } from '../util';
|
|
2
|
+
|
|
3
|
+
export function scrollbarConfig($this: JQuery<HTMLElement>) {
|
|
4
|
+
const $scrollbar = $this.find("[waterfall-el='scrollbar']");
|
|
5
|
+
const $scrollbarDrag = $($scrollbar).find("[waterfall-el='scrollbar-drag']");
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
dragClass: $scrollbarDrag.attr('class'),
|
|
9
|
+
dragSize: parseAttr($this, 'scrollbar-drag-size', 'auto'),
|
|
10
|
+
draggable: parseAttr($this, 'scrollbar-draggable', false),
|
|
11
|
+
el: $scrollbar[0],
|
|
12
|
+
enabled: parseAttr($this, 'scrollbar-enabled', null),
|
|
13
|
+
hide: parseAttr($this, 'scrollbar-hide', true),
|
|
14
|
+
horizontalClass: parseAttr(
|
|
15
|
+
$this,
|
|
16
|
+
'scrollbar-horizontal-class',
|
|
17
|
+
'swiper-scrollbar-horizontal',
|
|
18
|
+
),
|
|
19
|
+
lockClass: parseAttr(
|
|
20
|
+
$this,
|
|
21
|
+
'scrollbar-lock-class',
|
|
22
|
+
'swiper-scrollbar-lock',
|
|
23
|
+
),
|
|
24
|
+
scrollbarDisabledClass: parseAttr(
|
|
25
|
+
$this,
|
|
26
|
+
'scrollbar-disabled-class',
|
|
27
|
+
'swiper-scrollbar-disabled',
|
|
28
|
+
),
|
|
29
|
+
snapOnRelease: parseAttr($this, 'snap-on-release', true), // documentation says default is false, but is lying lmao
|
|
30
|
+
verticalClass: parseAttr(
|
|
31
|
+
$this,
|
|
32
|
+
'scrollbar-vertical-class',
|
|
33
|
+
'swiper-scrollbar-vertical',
|
|
34
|
+
),
|
|
35
|
+
};
|
|
36
|
+
}
|
package/src/waterfall.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import Swiper from 'swiper/bundle';
|
|
2
2
|
import 'swiper/css/bundle';
|
|
3
|
-
import {
|
|
4
|
-
getUniqueClasses,
|
|
5
|
-
parseAttr,
|
|
6
|
-
removeNullKeys,
|
|
7
|
-
printDebug,
|
|
8
|
-
parseString,
|
|
9
|
-
} from './util';
|
|
3
|
+
import { parseAttr, removeNullKeys, printDebug, parseString } from './util';
|
|
10
4
|
import { navigationConfig } from './modules/navigation';
|
|
11
|
-
import {
|
|
5
|
+
import { breakpointsConfig } from './modules/breakpoints';
|
|
6
|
+
import { paginationConfig } from './modules/pagination';
|
|
7
|
+
import { scrollbarConfig } from './modules/scrollbar';
|
|
8
|
+
import { autoplayConfig, freeModeConfig } from './modules/playback';
|
|
9
|
+
import {
|
|
10
|
+
coverflowEffect,
|
|
11
|
+
fadeConfig,
|
|
12
|
+
flipEffect,
|
|
13
|
+
cardsEffect,
|
|
14
|
+
cubeEffect,
|
|
15
|
+
} from './modules/effect';
|
|
16
|
+
import { gridConfig } from './modules/layout';
|
|
12
17
|
|
|
13
18
|
console.log(`🚿 Hello from Wellflow Waterfall v${APP_VERSION}`);
|
|
14
19
|
|
|
@@ -64,7 +69,6 @@ $('[waterfall]').each(function (index) {
|
|
|
64
69
|
sticky: parseAttr($this, 'free-mode-sticky', false),
|
|
65
70
|
},
|
|
66
71
|
grabCursor: parseAttr($this, 'grab-cursor', false),
|
|
67
|
-
//grid: null,
|
|
68
72
|
//hashNavigation: null,
|
|
69
73
|
height: parseAttr($this, 'height', null),
|
|
70
74
|
//history: null,
|
|
@@ -100,7 +104,6 @@ $('[waterfall]').each(function (index) {
|
|
|
100
104
|
//on: null,
|
|
101
105
|
//onAny: null,
|
|
102
106
|
oneWayMovement: parseAttr($this, 'data-one-way-movement', false),
|
|
103
|
-
//pagination: null,
|
|
104
107
|
//parallax: null,
|
|
105
108
|
passiveListeners: parseAttr($this, 'passive-listeners', true),
|
|
106
109
|
preventClicks: parseAttr($this, 'prevent-clicks', true),
|
|
@@ -120,7 +123,6 @@ $('[waterfall]').each(function (index) {
|
|
|
120
123
|
rewind: parseAttr($this, 'rewind', false),
|
|
121
124
|
roundLengths: parseAttr($this, 'round-lengths', false),
|
|
122
125
|
runCallbacksOnInit: parseAttr($this, 'run-callbacks-on-init', true),
|
|
123
|
-
// scrollbar: null,
|
|
124
126
|
// setWrapperSize: getAttr($this, 'set-wrapper-size', false),
|
|
125
127
|
shortSwipes: parseAttr($this, 'short-swipes', true),
|
|
126
128
|
simulateTouch: parseAttr($this, 'simulate-touch', true),
|
|
@@ -163,7 +165,6 @@ $('[waterfall]').each(function (index) {
|
|
|
163
165
|
'SWIPER-CONTAINER',
|
|
164
166
|
),
|
|
165
167
|
threshold: parseAttr($this, 'threshold', 5),
|
|
166
|
-
// thumbs: null,
|
|
167
168
|
touchAngle: parseAttr($this, 'touch-angle', 45),
|
|
168
169
|
touchEventsTarget: parseAttr($this, 'touch-events-target', 'wrapper'),
|
|
169
170
|
touchMoveStopPropagation: parseAttr(
|
|
@@ -196,240 +197,49 @@ $('[waterfall]').each(function (index) {
|
|
|
196
197
|
//zoom: null,
|
|
197
198
|
};
|
|
198
199
|
|
|
199
|
-
//
|
|
200
|
-
|
|
201
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
202
|
-
|
|
203
|
-
swiperConfig.breakpoints = {
|
|
204
|
-
478: {
|
|
205
|
-
centeredSlides: parseAttr($this, 'lmobile-centered-slides', null),
|
|
206
|
-
slidesPerView: parseAttr($this, 'lmobile-slides-per-view', null),
|
|
207
|
-
spaceBetween: parseAttr($this, 'lmobile-space-between', null),
|
|
208
|
-
},
|
|
209
|
-
767: {
|
|
210
|
-
centeredSlides: parseAttr($this, 'tablet-centered-slides', null),
|
|
211
|
-
slidesPerView: parseAttr($this, 'tablet-slides-per-view', null),
|
|
212
|
-
spaceBetween: parseAttr($this, 'tablet-space-between', null),
|
|
213
|
-
},
|
|
214
|
-
991: {
|
|
215
|
-
centeredSlides: parseAttr($this, 'desktop-centered-slides', null),
|
|
216
|
-
slidesPerView: parseAttr($this, 'desktop-slides-per-view', null),
|
|
217
|
-
spaceBetween: parseAttr($this, 'desktop-space-between', null),
|
|
218
|
-
},
|
|
219
|
-
1280: {
|
|
220
|
-
centeredSlides: parseAttr($this, 'large-centered-slides', null),
|
|
221
|
-
slidesPerView: parseAttr($this, 'large-slides-per-view', null),
|
|
222
|
-
spaceBetween: parseAttr($this, 'large-space-between', null),
|
|
223
|
-
},
|
|
224
|
-
1440: {
|
|
225
|
-
centeredSlides: parseAttr($this, 'xlarge-centered-slides', null),
|
|
226
|
-
slidesPerView: parseAttr($this, 'xlarge-slides-per-view', null),
|
|
227
|
-
spaceBetween: parseAttr($this, 'xlarge-space-between', null),
|
|
228
|
-
},
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
const autoplayMode = parseAttr($this, 'autoplay-mode', false);
|
|
232
|
-
if (autoplayMode) swiperConfig.autoplay = autoplayConfig($this);
|
|
233
|
-
|
|
234
|
-
swiperConfig.navigation = navigationConfig($this, name);
|
|
235
|
-
|
|
236
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
237
|
-
// --- PAGINATION -----------------------------
|
|
238
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
239
|
-
|
|
240
|
-
let paginationType = parseAttr($this, 'pagination-type', '');
|
|
241
|
-
let $paginationBullet = $this.find("[waterfall-el='pagination-bullet']");
|
|
242
|
-
let paginationBulletActive = $this.find(
|
|
243
|
-
"[waterfall-el='pagination-bullet-active']",
|
|
244
|
-
);
|
|
245
|
-
let pagination = $paginationBullet.length ? true : false;
|
|
200
|
+
// BREAKPOINTS
|
|
201
|
+
swiperConfig.breakpoints = breakpointsConfig($this);
|
|
246
202
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
return `<span class="${className}">${index + 1}</span>`;
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
if (paginationType === 'bullets') {
|
|
258
|
-
renderBullet = function (index, className) {
|
|
259
|
-
return `<span class="${className}"></span>`;
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
return renderBullet;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Custom function to get extended pagination types
|
|
266
|
-
function getPaginationType() {
|
|
267
|
-
if (paginationType === 'numberBullets' || paginationType === 'bullets')
|
|
268
|
-
return 'bullets';
|
|
269
|
-
if (paginationType === 'fraction') return 'fraction';
|
|
270
|
-
if (paginationType === 'progressbar') return 'progressbar';
|
|
271
|
-
if (paginationType === 'custom') return 'custom';
|
|
272
|
-
else return 'bullets'; // default
|
|
203
|
+
// PLAYBACK
|
|
204
|
+
const playbackMode = parseAttr($this, 'playback-mode', 'none');
|
|
205
|
+
if (playbackMode === 'loop') swiperConfig.loop = true;
|
|
206
|
+
if (playbackMode === 'rewind') swiperConfig.rewind = true;
|
|
207
|
+
if (playbackMode === 'none') {
|
|
208
|
+
swiperConfig.loop = false;
|
|
209
|
+
swiperConfig.rewind = false;
|
|
273
210
|
}
|
|
211
|
+
swiperConfig.autoplay = autoplayConfig($this);
|
|
274
212
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
bulletActiveClass: getUniqueClasses(
|
|
278
|
-
paginationBulletActive,
|
|
279
|
-
$paginationBullet,
|
|
280
|
-
),
|
|
281
|
-
bulletClass: $paginationBullet.attr('class'),
|
|
282
|
-
bulletElement: $paginationBullet.prop('tagName')?.toLowerCase() || 'span', //ISSUE HERE
|
|
283
|
-
clickable: parseAttr($this, 'pagination-clickable', false),
|
|
284
|
-
clickableClass: parseAttr(
|
|
285
|
-
$this,
|
|
286
|
-
'pagination-clickable-class',
|
|
287
|
-
'swiper-pagination-clickable',
|
|
288
|
-
),
|
|
289
|
-
currentClass: parseAttr(
|
|
290
|
-
$this,
|
|
291
|
-
'pagination-current-class',
|
|
292
|
-
'swiper-pagination-current',
|
|
293
|
-
),
|
|
294
|
-
dynamicBullets: parseAttr(
|
|
295
|
-
$this,
|
|
296
|
-
'dynamic-bullets',
|
|
297
|
-
'swiper-pagination-current',
|
|
298
|
-
),
|
|
299
|
-
dynamicMainBullets: parseAttr($this, 'dynamic-main-bullets', 1),
|
|
300
|
-
el: $this.find("[waterfall-el='pagination']")[0],
|
|
301
|
-
enabled: parseAttr($this, 'pagination-enabled', null),
|
|
302
|
-
//formatFractionCurrent: null,
|
|
303
|
-
//formatFractionTotal: null,
|
|
304
|
-
hiddenClass: parseAttr(
|
|
305
|
-
$this,
|
|
306
|
-
'pagination-hidden-class',
|
|
307
|
-
'swiper-pagination-hidden',
|
|
308
|
-
),
|
|
309
|
-
hideOnClick: parseAttr($this, 'pagination-hide-on-click', true),
|
|
310
|
-
horizontalClass: parseAttr(
|
|
311
|
-
$this,
|
|
312
|
-
'pagination-horizontal-class',
|
|
313
|
-
'swiper-pagination-horizontal',
|
|
314
|
-
),
|
|
315
|
-
lockClass: parseAttr(
|
|
316
|
-
$this,
|
|
317
|
-
'pagination-lock-class',
|
|
318
|
-
'swiper-pagination-lock',
|
|
319
|
-
),
|
|
320
|
-
modifierClass: parseAttr(
|
|
321
|
-
$this,
|
|
322
|
-
'pagination-modifier-class',
|
|
323
|
-
'swiper-pagination-',
|
|
324
|
-
),
|
|
325
|
-
paginationDisabledClass: parseAttr(
|
|
326
|
-
$this,
|
|
327
|
-
'pagination-disabled-class',
|
|
328
|
-
'swiper-pagination-disabled',
|
|
329
|
-
),
|
|
330
|
-
progressbarFillClass: parseAttr(
|
|
331
|
-
$this,
|
|
332
|
-
'pagination-progressbar-fill-class',
|
|
333
|
-
'swiper-pagination-progressbar-fill',
|
|
334
|
-
),
|
|
335
|
-
progressbarOpposite: parseAttr(
|
|
336
|
-
$this,
|
|
337
|
-
'pagination-progressbar-opposite',
|
|
338
|
-
'swiper-pagination-progressbar-opposite',
|
|
339
|
-
),
|
|
340
|
-
renderBullet: customRenderBullet(),
|
|
341
|
-
//renderCustom: null,
|
|
342
|
-
//renderFraction: null,
|
|
343
|
-
//renderProgressBar: null,
|
|
344
|
-
totalClass: parseAttr(
|
|
345
|
-
$this,
|
|
346
|
-
'pagination-total-class',
|
|
347
|
-
'swiper-pagination-total',
|
|
348
|
-
),
|
|
349
|
-
type: getPaginationType(),
|
|
350
|
-
verticalClass: parseAttr(
|
|
351
|
-
$this,
|
|
352
|
-
'pagination-vertical-class',
|
|
353
|
-
'swiper-pagination-vertical',
|
|
354
|
-
),
|
|
355
|
-
};
|
|
356
|
-
}
|
|
213
|
+
// NAVIGATION
|
|
214
|
+
swiperConfig.navigation = navigationConfig($this, name);
|
|
357
215
|
|
|
358
|
-
//
|
|
359
|
-
|
|
360
|
-
|
|
216
|
+
// PAGINATION
|
|
217
|
+
let pagination = $this.find("[waterfall-el='pagination-bullet']").length;
|
|
218
|
+
if (pagination) swiperConfig.pagination = paginationConfig($this);
|
|
361
219
|
|
|
220
|
+
// SCROLLBAR
|
|
362
221
|
const $scrollbar = $this.find("[waterfall-el='scrollbar']");
|
|
363
|
-
|
|
222
|
+
if ($scrollbar) swiperConfig.scrollbar = scrollbarConfig($this);
|
|
364
223
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
enabled: parseAttr($this, 'scrollbar-enabled', null),
|
|
372
|
-
hide: parseAttr($this, 'scrollbar-hide', true),
|
|
373
|
-
horizontalClass: parseAttr(
|
|
374
|
-
$this,
|
|
375
|
-
'scrollbar-horizontal-class',
|
|
376
|
-
'swiper-scrollbar-horizontal',
|
|
377
|
-
),
|
|
378
|
-
lockClass: parseAttr(
|
|
379
|
-
$this,
|
|
380
|
-
'scrollbar-lock-class',
|
|
381
|
-
'swiper-scrollbar-lock',
|
|
382
|
-
),
|
|
383
|
-
scrollbarDisabledClass: parseAttr(
|
|
384
|
-
$this,
|
|
385
|
-
'scrollbar-disabled-class',
|
|
386
|
-
'swiper-scrollbar-disabled',
|
|
387
|
-
),
|
|
388
|
-
snapOnRelease: parseAttr($this, 'snap-on-release', true), // documentation says default is false, but is lying lmao
|
|
389
|
-
verticalClass: parseAttr(
|
|
390
|
-
$this,
|
|
391
|
-
'scrollbar-vertical-class',
|
|
392
|
-
'swiper-scrollbar-vertical',
|
|
393
|
-
),
|
|
394
|
-
};
|
|
395
|
-
}
|
|
224
|
+
// EFFECT
|
|
225
|
+
swiperConfig.fadeEffect = fadeConfig($this);
|
|
226
|
+
swiperConfig.coverflowEffect = coverflowEffect($this);
|
|
227
|
+
swiperConfig.flipEffect = flipEffect($this);
|
|
228
|
+
swiperConfig.cardsEffect = cardsEffect($this);
|
|
229
|
+
swiperConfig.cubeEffect = cubeEffect($this);
|
|
396
230
|
|
|
397
|
-
//
|
|
398
|
-
|
|
399
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
231
|
+
// FREE MODE
|
|
232
|
+
swiperConfig.freeMode = freeModeConfig($this);
|
|
400
233
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
minimumVelocity: parseAttr($this, 'free-mode-minimum-velocity', 0.02),
|
|
404
|
-
momentum: parseAttr($this, 'free-mode-momentum', true),
|
|
405
|
-
momentumBounce: parseAttr($this, 'free-mode-momentum-bounce', true),
|
|
406
|
-
momentumBounceRatio: parseAttr($this, 'free-mode-momentum-bounce-ratio', 1),
|
|
407
|
-
momentumRatio: parseAttr($this, 'free-mode-momentum-ratio', 1),
|
|
408
|
-
momentumVelocityRatio: parseAttr(
|
|
409
|
-
$this,
|
|
410
|
-
'free-mode-momentum-velocity-ratio',
|
|
411
|
-
1,
|
|
412
|
-
),
|
|
413
|
-
sticky: parseAttr($this, 'free-mode-sticky', false),
|
|
414
|
-
};
|
|
415
|
-
|
|
416
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
417
|
-
// --- GRID -----------------------------------
|
|
418
|
-
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
|
|
419
|
-
|
|
420
|
-
swiperConfig.grid = {
|
|
421
|
-
fill: parseAttr($this, 'grid-fill', 'column'),
|
|
422
|
-
rows: parseAttr($this, 'grid-rows', 1),
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
// --- CLEANUP AND EXPORT ---
|
|
234
|
+
// GRID
|
|
235
|
+
swiperConfig.grid = gridConfig($this);
|
|
426
236
|
|
|
237
|
+
// Clean up the config and debug
|
|
427
238
|
const config = removeNullKeys(swiperConfig);
|
|
428
239
|
printDebug(debug, 'CONFIG', config);
|
|
429
|
-
|
|
430
240
|
// Initialize swiper
|
|
431
241
|
const swiper = new Swiper($this.find('.swiper')[0], config);
|
|
432
|
-
|
|
242
|
+
// Add to sliders array
|
|
433
243
|
sliders.push({ name, slider: swiper });
|
|
434
244
|
});
|
|
435
245
|
|
package/src/modules/autoplay.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { parseAttr } from '../util';
|
|
2
|
-
|
|
3
|
-
export function autoplayConfig($this: JQuery<HTMLElement>) {
|
|
4
|
-
// Add CSS for Smooth Autoplay
|
|
5
|
-
$("[smooth-autoplay='true']")
|
|
6
|
-
.find('.swiper-wrapper')
|
|
7
|
-
.css('transition-timing-function', 'linear');
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
delay: parseAttr($this, 'delay', 3000),
|
|
11
|
-
disableOnInteraction: parseAttr($this, 'disable-on-interaction', false), // documentation says default is true, doesn't appear to be correct
|
|
12
|
-
reverseDirection: parseAttr($this, 'reverse-direction', false),
|
|
13
|
-
pauseOnMouseEnter: parseAttr($this, 'pause-on-mouse-enter', false),
|
|
14
|
-
stopOnLastSlide: parseAttr($this, 'stop-on-last-slide', false),
|
|
15
|
-
};
|
|
16
|
-
}
|