pds-dev-kit-web-test 2.7.502 → 2.7.504
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/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +5 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +2 -2
- package/package.json +1 -1
|
@@ -31,12 +31,12 @@ function useSwiper() {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
var resetSwiper = function () {
|
|
34
|
-
var _a;
|
|
34
|
+
var _a, _b, _c;
|
|
35
35
|
setIsBeginning(true);
|
|
36
36
|
setIsEnd(false);
|
|
37
37
|
progressRef.current = 0;
|
|
38
38
|
leftTimeMsRef.current = 0;
|
|
39
|
-
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(0, 0);
|
|
39
|
+
(_c = (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo) === null || _c === void 0 ? void 0 : _c.call(_b, 0, 0);
|
|
40
40
|
};
|
|
41
41
|
return {
|
|
42
42
|
swiperRef: swiperRef,
|
|
@@ -147,20 +147,21 @@ function SlideBanner(props) {
|
|
|
147
147
|
style.visibility = 'visible';
|
|
148
148
|
}
|
|
149
149
|
var renderElements = function (component, positionStyle, slidesLength) {
|
|
150
|
-
var _a;
|
|
150
|
+
var _a, _b, _c;
|
|
151
151
|
switch (component.type) {
|
|
152
152
|
case 'PREV':
|
|
153
153
|
return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn, style: __assign(__assign({}, positionStyle), { visibility: mode === 'EDIT' ? 'visible' : isHovered ? 'visible' : 'hidden' }) }));
|
|
154
154
|
case 'NEXT':
|
|
155
155
|
return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn, style: __assign(__assign({}, positionStyle), { visibility: mode === 'EDIT' ? 'visible' : isHovered ? 'visible' : 'hidden' }) }));
|
|
156
156
|
case 'PAGINATION':
|
|
157
|
-
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn, style: positionStyle }));
|
|
157
|
+
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_c = (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slides) === null || _c === void 0 ? void 0 : _c.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn, style: positionStyle }));
|
|
158
158
|
case 'PROGRESSBAR':
|
|
159
159
|
return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { slidesLength: slidesLength, progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
|
|
160
160
|
default:
|
|
161
161
|
return null;
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
+
console.log(queryData, swiperRef);
|
|
164
165
|
var renderSwiper = function (compositions) {
|
|
165
166
|
return ((0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ className: "cb-slidebanner-layout-box", ref: layoutRef }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-slidebanner-wrapper", ccbInset: ccbInset, customStyle: isHovered ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle : slideBannerNormalStyle === null || slideBannerNormalStyle === void 0 ? void 0 : slideBannerNormalStyle.customStyle }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, className: "cb-slidebanner", onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: 1, styles: isHovered ? slideBannerHoverStyle : slideBannerNormalStyle, effect: CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE.toLowerCase() }, { children: (0, createCompositions_1.createCompositions)({
|
|
166
167
|
valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
|
|
@@ -169,7 +170,8 @@ function SlideBanner(props) {
|
|
|
169
170
|
queryData: queryData,
|
|
170
171
|
compositions: compositions,
|
|
171
172
|
componentBlockCode: types_1.CB_ALL_CODES.CB_SLIDEBANNER
|
|
172
|
-
}) }),
|
|
173
|
+
}) }), CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE +
|
|
174
|
+
CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE +
|
|
173
175
|
autoPlayEnabled +
|
|
174
176
|
compositions.length +
|
|
175
177
|
queryPath) })) })));
|
|
@@ -46,13 +46,13 @@ function useSwiper() {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
var resetSwiper = function () {
|
|
49
|
-
var _a;
|
|
49
|
+
var _a, _b, _c;
|
|
50
50
|
setCurrentSlide(1);
|
|
51
51
|
setIsBeginning(true);
|
|
52
52
|
setIsEnd(false);
|
|
53
53
|
progressRef.current = 0;
|
|
54
54
|
leftTimeMsRef.current = 0;
|
|
55
|
-
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(0, 0);
|
|
55
|
+
(_c = (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideTo) === null || _c === void 0 ? void 0 : _c.call(_b, 0, 0);
|
|
56
56
|
};
|
|
57
57
|
return {
|
|
58
58
|
swiperRef: swiperRef,
|