pds-dev-kit-web-test 2.7.263 → 2.7.265
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/ContentsCarousel.js +4 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +4 -3
- package/package.json +1 -1
|
@@ -71,6 +71,7 @@ function ContentsCarousel(props) {
|
|
|
71
71
|
var autoPlayEnabled = device === 'DESKTOP'
|
|
72
72
|
? CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD.CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD_SPEC_AUTOPLAYUSE
|
|
73
73
|
: (_a = CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD['CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD_SPEC_AUTOPLAYUSE:MOBILE']) !== null && _a !== void 0 ? _a : CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD.CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD_SPEC_AUTOPLAYUSE;
|
|
74
|
+
// const useAutoplay = autoPlayEnabled && > 1;
|
|
74
75
|
var displayCounts = device === 'DESKTOP'
|
|
75
76
|
? CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS
|
|
76
77
|
: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS !== null && CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS !== void 0 ? CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS : CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS.length;
|
|
@@ -178,7 +179,9 @@ function ContentsCarousel(props) {
|
|
|
178
179
|
limit: displayCounts,
|
|
179
180
|
queryData: queryData,
|
|
180
181
|
compositions: orderedCompositions
|
|
181
|
-
}) }), CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE +
|
|
182
|
+
}) }), CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE +
|
|
183
|
+
autoPlayEnabled +
|
|
184
|
+
compositions.length) })) }))] })) }))] }));
|
|
182
185
|
}
|
|
183
186
|
var S_Overlay = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: inherit;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n"], ["\n border-radius: inherit;\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n"])));
|
|
184
187
|
function getIsBgMedia(isMobile, specs) {
|
|
@@ -56,6 +56,7 @@ var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
56
56
|
return childrenArray;
|
|
57
57
|
}, [children, slidesPerView, styles.slidesPerGroup]);
|
|
58
58
|
var finalSlidesPerView = props.effect === 'cards' ? 1 : slidesPerView;
|
|
59
|
+
var useAutoplay = styles.useAutoplay && Array.isArray(children) && children.length > 1;
|
|
59
60
|
return ((0, jsx_runtime_1.jsx)(StyledSwiper_1.default, __assign({ id: "styled-swiper-wrapper" }, { children: (0, jsx_runtime_1.jsx)(react_2.Swiper, __assign({ ref: ref, style: {
|
|
60
61
|
width: '100%',
|
|
61
62
|
height: '100%'
|
|
@@ -70,7 +71,7 @@ var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
70
71
|
swiper_1.EffectCards,
|
|
71
72
|
swiper_1.EffectCoverflow,
|
|
72
73
|
swiper_1.EffectFlip
|
|
73
|
-
], slidesPerView: finalSlidesPerView, scrollbar: styles.scrollbar, slidesPerGroup: styles.slidesPerGroup, spaceBetween: styles.spaceBetween, freeMode: styles.freeMode, autoplay:
|
|
74
|
+
], slidesPerView: finalSlidesPerView, scrollbar: styles.scrollbar, slidesPerGroup: styles.slidesPerGroup, spaceBetween: styles.spaceBetween, freeMode: styles.freeMode, autoplay: useAutoplay ? styles.autoplay : false, loop: styles.loop }, props, { children: slidesWithEmpty.map(function (slide, index) { return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide || (0, jsx_runtime_1.jsx)("div", { className: "swiper-slide-empty" }) }, index)); }) })) })));
|
|
74
75
|
});
|
|
75
76
|
ContentsCarouselCore.displayName = 'ContentsCarouselCore';
|
|
76
77
|
exports.default = ContentsCarouselCore;
|
|
@@ -27,12 +27,13 @@ var CustomProgressbar = function (_a) {
|
|
|
27
27
|
var styles = _a.styles, progressRef = _a.progressRef, leftTimeMsRef = _a.leftTimeMsRef;
|
|
28
28
|
var _b = (0, react_1.useState)(0), leftTimeSec = _b[0], setLeftTimeSec = _b[1];
|
|
29
29
|
var _c = (0, react_1.useState)(0), progress = _c[0], setProgress = _c[1];
|
|
30
|
-
console.log('progressRef & progress', progressRef.current, progress);
|
|
31
|
-
console.log('leftTimeMsRef & leftTimeSec', leftTimeMsRef.current, leftTimeSec);
|
|
32
30
|
(0, react_1.useEffect)(function () {
|
|
33
31
|
var updateTimer = function () {
|
|
34
32
|
var _a;
|
|
35
|
-
var
|
|
33
|
+
var remainingMs = (_a = leftTimeMsRef.current) !== null && _a !== void 0 ? _a : 0; // 기본값을 10000 대신 0으로 변경
|
|
34
|
+
// 1. Math.max를 사용해 0 미만으로 내려가지 않도록 함
|
|
35
|
+
// 2. Math.ceil을 사용해 0.1초가 남아도 1초로 표시하도록 올림 처리
|
|
36
|
+
var sec = Math.max(0, Math.ceil(remainingMs / 1000));
|
|
36
37
|
setLeftTimeSec(sec);
|
|
37
38
|
};
|
|
38
39
|
updateTimer();
|