@total_onion/onion-library 2.0.19 → 2.0.20
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
|
|
3
3
|
export default function betterreviewsdisplay3Js(options = {}) {
|
|
4
4
|
try {
|
|
5
5
|
const {block} = options;
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
} catch (error) {
|
|
8
8
|
console.error(error);
|
|
9
9
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import {getSwiperAssetsV2} from '@total_onion/onion-utils/onion-utils.mjs';
|
|
2
|
+
import { Navigation, Pagination } from 'swiper/modules';
|
|
3
|
+
// import Swiper and modules styles
|
|
4
|
+
import 'swiper/css';
|
|
5
|
+
import 'swiper/css/navigation';
|
|
6
|
+
import 'swiper/css/pagination';
|
|
2
7
|
|
|
3
8
|
export default function carouselmultilayoutv3Js(options = {}) {
|
|
4
9
|
try {
|
|
@@ -6,16 +11,7 @@ export default function carouselmultilayoutv3Js(options = {}) {
|
|
|
6
11
|
const totalSlides = block.querySelectorAll('.swiper-slide').length || 1;
|
|
7
12
|
Promise.all([getSwiperAssetsV2()]).then((values) => {
|
|
8
13
|
const {
|
|
9
|
-
Swiper
|
|
10
|
-
Navigation,
|
|
11
|
-
Pagination,
|
|
12
|
-
Lazy,
|
|
13
|
-
Autoplay,
|
|
14
|
-
EffectFade,
|
|
15
|
-
EffectCoverflow,
|
|
16
|
-
EffectCreative,
|
|
17
|
-
FreeMode,
|
|
18
|
-
Mousewheel
|
|
14
|
+
Swiper
|
|
19
15
|
} = values[0][0];
|
|
20
16
|
|
|
21
17
|
const dataAttributes = block.dataset;
|
|
@@ -119,13 +115,13 @@ export default function carouselmultilayoutv3Js(options = {}) {
|
|
|
119
115
|
modules: [
|
|
120
116
|
Navigation,
|
|
121
117
|
Pagination,
|
|
122
|
-
Lazy,
|
|
123
|
-
Autoplay,
|
|
124
|
-
EffectFade,
|
|
125
|
-
EffectCoverflow,
|
|
126
|
-
EffectCreative,
|
|
127
|
-
FreeMode,
|
|
128
|
-
Mousewheel
|
|
118
|
+
// Lazy,
|
|
119
|
+
// Autoplay,
|
|
120
|
+
// EffectFade,
|
|
121
|
+
// EffectCoverflow,
|
|
122
|
+
// EffectCreative,
|
|
123
|
+
// FreeMode,
|
|
124
|
+
// Mousewheel
|
|
129
125
|
],
|
|
130
126
|
slidesPerView: slidesMobile,
|
|
131
127
|
spaceBetween: spaceBetweenSlidesMobile,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
{# Do not edit this file outside of the component library as your changes will be lost with future updates. #}
|
|
2
1
|
{% set blockClassName = "carousel-multi-layout-v3" %}
|
|
3
2
|
{% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields, block }, with_context = false) %}
|
|
4
3
|
{% set htmlEntryPoint = include('entry-points/entry-point-html-v3.twig', { fields, block, blockClassName, options, environment, is_preview, nav_menus }, with_context = false) %}
|
|
@@ -6,8 +5,7 @@
|
|
|
6
5
|
{% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
|
|
7
6
|
{% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
{% set blockOverflow = '--block-overflow:' ~ fields.block_overflow|ru ~ ';' %}
|
|
8
|
+
{# {% set blockOverflow = '--block-overflow:' ~ fields.block_overflow|ru ~ ';' %} #}
|
|
11
9
|
|
|
12
10
|
{% set arrowColour = '--swiper-arrow-colour:' ~ fields.carousel_nav_arrow_colour|ru ~ ';' %}
|
|
13
11
|
{% set paginationColour = '--swiper-pagination-colour:' ~ fields.carousel_pagination_colour|ru ~ ';' %}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@total_onion/onion-library",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "Component library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"postcss": "^8.5.6",
|
|
36
36
|
"postcss-preset-env": "^10.3.1",
|
|
37
37
|
"prettier": "^2.6.2",
|
|
38
|
-
"swiper": "^
|
|
38
|
+
"swiper": "^12.0.2",
|
|
39
39
|
"yargs": "^17.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|