pds-dev-kit-web-test 2.7.261 → 2.7.263
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/CompositionRenderer/Composition.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +3 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +6 -5
- package/package.json +1 -1
|
@@ -225,7 +225,7 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
|
225
225
|
// fontSize: `${baseFontSize}px`
|
|
226
226
|
} }, { children: (_e = props.componentBlocks) === null || _e === void 0 ? void 0 : _e.map(function (cb, index) {
|
|
227
227
|
var _a;
|
|
228
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItemForCCB_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0, maxCols: cols }) }, cb.id));
|
|
228
|
+
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItemForCCB_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0, maxCols: cols + 1 }) }, cb.id));
|
|
229
229
|
}) })) })) })) })) })) }));
|
|
230
230
|
});
|
|
231
231
|
var MOCK_BORDER = {
|
|
@@ -172,7 +172,7 @@ function ContentsCarousel(props) {
|
|
|
172
172
|
display: layout.display,
|
|
173
173
|
flexDirection: layout.flexDirection,
|
|
174
174
|
justifyContent: layout.justifyContent
|
|
175
|
-
} }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "cb-contentscarousel", allowTouchMove: mode !== 'EDIT' ? true : false,
|
|
175
|
+
} }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "cb-contentscarousel", allowTouchMove: mode !== 'EDIT' ? true : false, onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: Math.min(displayCounts, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS.length), styles: isHovered ? contentsCarouselHoverStyle : contentsCarouselNormalStyle, effect: CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === null || CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE === void 0 ? void 0 : CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE.toLowerCase() }, { children: (0, createCompositions_1.createCompositions)({
|
|
176
176
|
valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
|
|
177
177
|
queryPath: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
|
|
178
178
|
limit: displayCounts,
|
|
@@ -27,15 +27,12 @@ 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
|
|
31
|
-
console.log('leftTimeMsRef', leftTimeMsRef.current);
|
|
30
|
+
console.log('progressRef & progress', progressRef.current, progress);
|
|
31
|
+
console.log('leftTimeMsRef & leftTimeSec', leftTimeMsRef.current, leftTimeSec);
|
|
32
32
|
(0, react_1.useEffect)(function () {
|
|
33
33
|
var updateTimer = function () {
|
|
34
34
|
var _a;
|
|
35
|
-
var
|
|
36
|
-
// 1. Math.max를 사용해 0 미만으로 내려가지 않도록 함
|
|
37
|
-
// 2. Math.ceil을 사용해 0.1초가 남아도 1초로 표시하도록 올림 처리
|
|
38
|
-
var sec = Math.max(0, Math.ceil(remainingMs / 1000));
|
|
35
|
+
var sec = Math.abs(((_a = leftTimeMsRef.current) !== null && _a !== void 0 ? _a : 10000) / 1000);
|
|
39
36
|
setLeftTimeSec(sec);
|
|
40
37
|
};
|
|
41
38
|
updateTimer();
|
|
@@ -17,13 +17,14 @@ function useSwiper() {
|
|
|
17
17
|
setIsEnd(swiper.isEnd);
|
|
18
18
|
};
|
|
19
19
|
var onAutoplayTimeLeft = (0, react_1.useCallback)(function (swiper, time, progress) {
|
|
20
|
-
if (swiper.slides.length === 0) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
20
|
+
// if (swiper.slides.length === 0) {
|
|
21
|
+
// // 즉시 autoplay를 멈추고 함수 종료
|
|
22
|
+
// swiper.autoplay.stop();
|
|
23
|
+
// return;
|
|
24
|
+
// }
|
|
25
25
|
leftTimeMsRef.current = time;
|
|
26
26
|
progressRef.current = progress;
|
|
27
|
+
console.log('time', time, 'progress', progress);
|
|
27
28
|
}, []);
|
|
28
29
|
var onClickPrevBtn = function () {
|
|
29
30
|
if (swiperRef.current) {
|