pds-dev-kit-web-test 2.7.501 → 2.7.503

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.
Files changed (43) hide show
  1. package/dist/src/common/assets/icons/fill/index.d.ts +0 -1
  2. package/dist/src/common/assets/icons/fill/index.js +0 -2
  3. package/dist/src/common/assets/icons/line/index.d.ts +0 -1
  4. package/dist/src/common/assets/icons/line/index.js +0 -2
  5. package/dist/src/common/services/i18n/resources/en.json +4 -1
  6. package/dist/src/common/services/i18n/resources/es.json +4 -1
  7. package/dist/src/common/services/i18n/resources/fil.json +4 -1
  8. package/dist/src/common/services/i18n/resources/index.d.ts +21 -0
  9. package/dist/src/common/services/i18n/resources/ja.json +4 -1
  10. package/dist/src/common/services/i18n/resources/ko.json +4 -1
  11. package/dist/src/common/services/i18n/resources/zh-cn.json +4 -1
  12. package/dist/src/common/services/i18n/resources/zh-tw.json +4 -1
  13. package/dist/src/common/styles/colorSet/UIColor.json +1 -3
  14. package/dist/src/common/styles/colorSet/index.d.ts +387 -389
  15. package/dist/src/common/styles/colorSet/index.js +3 -3
  16. package/dist/src/common/styles/colorSet/ui-type.d.ts +0 -2
  17. package/dist/src/desktop/components/BoxItem/BoxItem.d.ts +1 -1
  18. package/dist/src/desktop/components/BoxItem/BoxItem.js +11 -23
  19. package/dist/src/desktop/components/ReactionButton/ReactionButton.js +1 -1
  20. package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.d.ts +1 -1
  21. package/dist/src/desktop/components/UserDesktopTabBar/UserDesktopTabBar.js +3 -13
  22. package/dist/src/mobile/components/BoxItem/BoxItem.d.ts +1 -1
  23. package/dist/src/mobile/components/BoxItem/BoxItem.js +11 -23
  24. package/dist/src/mobile/components/ReactionButton/ReactionButton.js +1 -1
  25. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +9 -9
  26. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +5 -52
  27. package/dist/src/sub/DynamicLayout/mock_section.json +5 -5
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +71 -42
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -0
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +10 -1
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +73 -56
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +67 -38
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -0
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +11 -1
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +3 -3
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +4 -0
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +5 -12
  38. package/package.json +1 -1
  39. package/release-note.md +2 -2
  40. package/dist/src/common/assets/icons/fill/Plugin.d.ts +0 -4
  41. package/dist/src/common/assets/icons/fill/Plugin.js +0 -30
  42. package/dist/src/common/assets/icons/line/Plugin.d.ts +0 -4
  43. package/dist/src/common/assets/icons/line/Plugin.js +0 -30
@@ -69,7 +69,7 @@ var createComponent = function (type, getDesignType, getLocation, designType) {
69
69
  function ContentsCarousel(props) {
70
70
  var _a, _b;
71
71
  var _c = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _c.device, mode = _c.mode, queryData = _c.queryData;
72
- var compositions = props.compositions, index = props.index, _d = props.CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS, CB_STYLE_PROP_CONTENTSCAROUSELDESIGN = props.CB_STYLE_PROP_CONTENTSCAROUSELDESIGN, CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD = props.CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD, CB_STYLE_PROP_CONTENTSCAROUSELBUTTON = props.CB_STYLE_PROP_CONTENTSCAROUSELBUTTON, CB_STYLE_PROP_CONTENTSCAROUSELPROGRESSBAR = props.CB_STYLE_PROP_CONTENTSCAROUSELPROGRESSBAR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, CB_STYLE_PROP_BGMEDIA = props.CB_STYLE_PROP_BGMEDIA, CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE = props.CB_EFFECT_PROP_CONTENTSCAROUSEL.CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE;
72
+ var compositions = props.compositions, index = props.index, _d = props.CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATASORTING = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATASORTING, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATAOFFSET = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATAOFFSET, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS = _d.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS, CB_STYLE_PROP_CONTENTSCAROUSELDESIGN = props.CB_STYLE_PROP_CONTENTSCAROUSELDESIGN, CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD = props.CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD, CB_STYLE_PROP_CONTENTSCAROUSELBUTTON = props.CB_STYLE_PROP_CONTENTSCAROUSELBUTTON, CB_STYLE_PROP_CONTENTSCAROUSELPROGRESSBAR = props.CB_STYLE_PROP_CONTENTSCAROUSELPROGRESSBAR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, CB_STYLE_PROP_BGMEDIA = props.CB_STYLE_PROP_BGMEDIA, CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE = props.CB_EFFECT_PROP_CONTENTSCAROUSEL.CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE;
73
73
  var CB_STYLE_PROP_CONTENTSCAROUSEL = __assign(__assign(__assign(__assign({}, CB_STYLE_PROP_CONTENTSCAROUSELDESIGN), CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD), CB_STYLE_PROP_CONTENTSCAROUSELBUTTON), CB_STYLE_PROP_CONTENTSCAROUSELPROGRESSBAR);
74
74
  var autoPlayEnabled = device === 'DESKTOP'
75
75
  ? CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD.CB_STYLE_PROP_CONTENTSCAROUSELPLAYBACKMETHOD_SPEC_AUTOPLAYUSE
@@ -91,13 +91,19 @@ function ContentsCarousel(props) {
91
91
  props: CB_STYLE_PROP_CONTENTSCAROUSEL,
92
92
  device: device
93
93
  }), customProgressbarNormalStyle = _h.normalStyle, customProgressbarHoverStyle = _h.hoverStyle;
94
- var _j = (0, useSwiper_1.useSwiper)(), swiperRef = _j.swiperRef, progressRef = _j.progressRef, leftTimeMsRef = _j.leftTimeMsRef, isBeginning = _j.isBeginning, isEnd = _j.isEnd, onSwiper = _j.onSwiper, onSlideChangeTransitionEnd = _j.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _j.onAutoplayTimeLeft, onClickPrevBtn = _j.onClickPrevBtn, onClickNextBtn = _j.onClickNextBtn;
94
+ var _j = (0, useSwiper_1.useSwiper)(), swiperRef = _j.swiperRef, progressRef = _j.progressRef, leftTimeMsRef = _j.leftTimeMsRef, isBeginning = _j.isBeginning, isEnd = _j.isEnd, onSwiper = _j.onSwiper, onSlideChangeTransitionEnd = _j.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _j.onAutoplayTimeLeft, onClickPrevBtn = _j.onClickPrevBtn, onClickNextBtn = _j.onClickNextBtn, resetSwiper = _j.resetSwiper;
95
95
  var _k = (0, react_1.useState)(false), isHovered = _k[0], setIsHovered = _k[1];
96
- var orderedCompositions = __spreadArray([], CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
97
- .sort(function (a, b) { return a.order - b.order; })
98
- .map(function (item) {
99
- return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
100
- });
96
+ var queryPath = "".concat(CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA, "/").concat(CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATASORTING, "/").concat(CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATAOFFSET);
97
+ (0, react_1.useEffect)(function () {
98
+ resetSwiper();
99
+ }, [queryPath]);
100
+ var orderedCompositions = CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE === 'VALUE'
101
+ ? __spreadArray([], CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
102
+ .sort(function (a, b) { return a.order - b.order; })
103
+ .map(function (item) {
104
+ return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
105
+ })
106
+ : compositions.filter(function (comp) { return !comp.ccbManualItemUuid; });
101
107
  var loop = contentsCarouselNormalStyle.loop && orderedCompositions.length >= displayCounts;
102
108
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
103
109
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
@@ -135,18 +141,6 @@ function ContentsCarousel(props) {
135
141
  bottom: '0px',
136
142
  left: '0px'
137
143
  };
138
- var renderElements = function (component, style) {
139
- switch (component.type) {
140
- case 'PREV':
141
- return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn, styles: customNavigationNormalStyle, style: __assign({}, style) }));
142
- case 'NEXT':
143
- return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn, style: __assign({}, style) }));
144
- case 'PROGRESSBAR':
145
- return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { slidesLength: orderedCompositions.length, progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
146
- default:
147
- return null;
148
- }
149
- };
150
144
  // NOTE: edit환경에서 hover가 작동하지 않아서 제외함 필요시 추가..
151
145
  var columnGapEnum = device === 'DESKTOP'
152
146
  ? CB_STYLE_PROP_CONTENTSCAROUSELDESIGN.CB_STYLE_PROP_CONTENTSCAROUSELDESIGN_SPEC_ITEMSPACING
@@ -161,6 +155,55 @@ function ContentsCarousel(props) {
161
155
  if (mode === 'EDIT') {
162
156
  style.visibility = 'visible';
163
157
  }
158
+ var renderElements = function (component, style, slidesLength) {
159
+ switch (component.type) {
160
+ case 'PREV':
161
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn, styles: customNavigationNormalStyle, style: __assign({}, style) }));
162
+ case 'NEXT':
163
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn, style: __assign({}, style) }));
164
+ case 'PROGRESSBAR':
165
+ return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { slidesLength: slidesLength, progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
166
+ default:
167
+ return null;
168
+ }
169
+ };
170
+ var renderSwiper = function (compositions) {
171
+ return ((0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ className: "cb-contentscarousel-layout-box", ref: layoutRef, style: __assign({}, pointerEventsObj) }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-contentscarousel-wrapper", ccbInset: ccbInset, customStyle: isHovered
172
+ ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
173
+ : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle, style: {
174
+ display: layout.display,
175
+ flexDirection: layout.flexDirection,
176
+ justifyContent: layout.justifyContent
177
+ } }, { 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: displayCounts, 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(), loop: loop, displayCounts: displayCounts }, { children: (0, createCompositions_1.createCompositions)({
178
+ valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
179
+ queryPath: queryPath,
180
+ limit: displayCounts,
181
+ queryData: queryData,
182
+ compositions: compositions,
183
+ componentBlockCode: types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL
184
+ }) }), CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE +
185
+ autoPlayEnabled +
186
+ compositions.length +
187
+ queryPath) })) })));
188
+ };
189
+ var renderCompositions = function (compositions) {
190
+ // 직접 연결
191
+ if (CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE === 'VALUE') {
192
+ if (!compositions.length)
193
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_9806" });
194
+ return renderSwiper(compositions);
195
+ }
196
+ // 데이터 연결
197
+ if (queryPath === 'NONE' || !queryPath || !queryData) {
198
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10477" }, "no-query");
199
+ }
200
+ var queryDataValue = queryData[queryPath];
201
+ // 쿼리 데이터와 키가 있으나, 쿼리 데이터에 결과가 빈 경우
202
+ if (!(queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length)) {
203
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10478" }, "empty-item");
204
+ }
205
+ return renderSwiper(compositions);
206
+ };
164
207
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), Object.entries(componentGroups).map(function (_a) {
165
208
  var position = _a[0], groupComponents = _a[1];
166
209
  return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-group ccb-elements ".concat(position), ref: function (el) {
@@ -171,43 +214,29 @@ function ContentsCarousel(props) {
171
214
  delete positionRefs.current[position];
172
215
  }
173
216
  }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
174
- return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
217
+ return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type), orderedCompositions.length);
175
218
  }) })) }), position));
176
219
  }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () {
177
220
  setIsHovered(true);
178
- }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-columns": displayCounts, "data-number-of-items": displayCounts, "data-column-gap": columnGap, "data-cols": displayCounts, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), orderedCompositions.length > 0 ? ((0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ className: "cb-contentscarousel-layout-box", ref: layoutRef, style: __assign({}, pointerEventsObj) }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-contentscarousel-wrapper", ccbInset: ccbInset, customStyle: isHovered
179
- ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
180
- : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle, style: {
181
- display: layout.display,
182
- flexDirection: layout.flexDirection,
183
- justifyContent: layout.justifyContent
184
- } }, { 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: displayCounts, 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(), loop: loop, displayCounts: displayCounts }, { children: (0, createCompositions_1.createCompositions)({
185
- valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
186
- queryPath: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
187
- limit: displayCounts,
188
- queryData: queryData,
189
- compositions: orderedCompositions,
190
- componentBlockCode: types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL
191
- }) }), CB_EFFECT_PROP_CONTENTSCAROUSEL_SPEC_TRANSITIONTYPE +
192
- autoPlayEnabled +
193
- orderedCompositions.length) })) }))) : ((0, jsx_runtime_1.jsx)(EmptyString, {}))] })) }))] }));
221
+ }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-columns": displayCounts, "data-number-of-items": displayCounts, "data-column-gap": columnGap, "data-cols": displayCounts, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), renderCompositions(orderedCompositions)] })) }))] }));
194
222
  }
195
- function EmptyString() {
223
+ function EmptyString(_a) {
224
+ var stringKey = _a.stringKey;
196
225
  var t = (0, react_i18next_1.useTranslation)('translation').t;
197
- return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
226
+ return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t(stringKey) });
198
227
  }
199
- var S_EmptyLayer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"])), function (_a) {
228
+ var S_EmptyLayer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"])), function (_a) {
200
229
  var theme = _a.theme;
201
- return theme.desktopFontSize.body2;
230
+ return theme.desktopFontSize.caption1;
202
231
  }, function (_a) {
203
232
  var theme = _a.theme;
204
233
  return theme.fontWeight.bold;
205
234
  }, function (_a) {
206
235
  var theme = _a.theme;
207
- return theme.desktopLineHeight.body2;
236
+ return theme.desktopLineHeight.caption1;
208
237
  }, function (_a) {
209
238
  var theme = _a.theme;
210
- return theme.spacing.spacingE;
239
+ return theme.spacing.spacingD;
211
240
  });
212
241
  var S_Overlay = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __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"])));
213
242
  function getIsBgMedia(isMobile, specs) {
@@ -11,4 +11,5 @@ export declare function useSwiper(): {
11
11
  onAutoplayTimeLeft: (swiper: SwiperClass, time: number, progress: number) => void;
12
12
  onClickPrevBtn: () => void;
13
13
  onClickNextBtn: () => void;
14
+ resetSwiper: () => void;
14
15
  };
@@ -30,6 +30,14 @@ function useSwiper() {
30
30
  swiperRef.current.swiper.slideNext();
31
31
  }
32
32
  };
33
+ var resetSwiper = function () {
34
+ var _a;
35
+ setIsBeginning(true);
36
+ setIsEnd(false);
37
+ progressRef.current = 0;
38
+ leftTimeMsRef.current = 0;
39
+ (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo(0, 0);
40
+ };
33
41
  return {
34
42
  swiperRef: swiperRef,
35
43
  progressRef: progressRef,
@@ -40,7 +48,8 @@ function useSwiper() {
40
48
  onSlideChangeTransitionEnd: onSlideChangeTransitionEnd,
41
49
  onAutoplayTimeLeft: onAutoplayTimeLeft,
42
50
  onClickPrevBtn: onClickPrevBtn,
43
- onClickNextBtn: onClickNextBtn
51
+ onClickNextBtn: onClickNextBtn,
52
+ resetSwiper: resetSwiper
44
53
  };
45
54
  }
46
55
  exports.useSwiper = useSwiper;
@@ -65,16 +65,16 @@ var createComponent = function (type, getDesignType, getLocation, designType, si
65
65
  };
66
66
  };
67
67
  function ContentsList(props) {
68
- var _a, _b, _c, _d, _e, _f;
69
- var _g = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _g.device, mode = _g.mode, queryData = _g.queryData;
68
+ var _a, _b, _c, _d;
69
+ var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, mode = _e.mode, queryData = _e.queryData;
70
70
  var index = props.index, compositions = props.compositions, CB_CONTENT_PROP_CONTENTSLIST = props.CB_CONTENT_PROP_CONTENTSLIST, CB_STYLE_PROP_CONTENTSLISTDESIGN = props.CB_STYLE_PROP_CONTENTSLISTDESIGN, CB_STYLE_PROP_CONTENTSLISTPAGINATION = props.CB_STYLE_PROP_CONTENTSLISTPAGINATION, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, CB_LAYOUT_PROP_PADDING = props.CB_LAYOUT_PROP_PADDING, CB_STYLE_PROP_BGMEDIA = props.CB_STYLE_PROP_BGMEDIA, CB_LAYOUT_PROP_HEIGHTADJUSTMENT = props.CB_LAYOUT_PROP_HEIGHTADJUSTMENT;
71
71
  var
72
72
  // CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS,
73
- CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
74
- var _h = (0, react_1.useState)(false), isHovered = _h[0], setIsHovered = _h[1];
75
- var _j = (0, react_1.useState)(1), currentPage = _j[0], setCurrentPage = _j[1];
76
- var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
77
- var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
73
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATASORTING = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATASORTING, CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAOFFSET = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAOFFSET, CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
74
+ var _f = (0, react_1.useState)(false), isHovered = _f[0], setIsHovered = _f[1];
75
+ var _g = (0, react_1.useState)(1), currentPage = _g[0], setCurrentPage = _g[1];
76
+ var queryPath = "".concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, "/").concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATASORTING, "/").concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAOFFSET);
77
+ var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath];
78
78
  // list의 minheight / minwidth를 계산
79
79
  var numberOfColumns = device === 'DESKTOP'
80
80
  ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
@@ -86,19 +86,19 @@ function ContentsList(props) {
86
86
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
87
87
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) / displayCounts);
88
88
  var CB_STYLE_PROP_CONTENTSLIST = __assign(__assign({}, CB_STYLE_PROP_CONTENTSLISTDESIGN), CB_STYLE_PROP_CONTENTSLISTPAGINATION);
89
- var _k = (0, util_1.parseProperties)(props, device), style = _k.style, hoverStyle = _k.hoverStyle, layout = _k.layout, effect = _k.effect, overlayStyle = _k.overlayStyle;
89
+ var _h = (0, util_1.parseProperties)(props, device), style = _h.style, hoverStyle = _h.hoverStyle, layout = _h.layout, effect = _h.effect, overlayStyle = _h.overlayStyle;
90
90
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
91
91
  props: CB_CONTENT_PROP_CONTENTSLIST,
92
92
  device: device
93
93
  }).contentPropCss;
94
- var _l = (0, contentsListUtils_1.parseGridStyleProp)({
94
+ var _j = (0, contentsListUtils_1.parseGridStyleProp)({
95
95
  props: CB_STYLE_PROP_CONTENTSLIST,
96
96
  device: device
97
- }), stylePropCss = _l.stylePropCss, hoverStylePropCss = _l.hoverStylePropCss;
98
- var _m = (0, contentsListUtils_1.parsePaginationStyleProp)({
97
+ }), stylePropCss = _j.stylePropCss, hoverStylePropCss = _j.hoverStylePropCss;
98
+ var _k = (0, contentsListUtils_1.parsePaginationStyleProp)({
99
99
  props: CB_STYLE_PROP_CONTENTSLIST,
100
100
  device: device
101
- }), paginationNormalStyle = _m.normalStyle, paginationHoverStyle = _m.hoverStyle;
101
+ }), paginationNormalStyle = _k.normalStyle, paginationHoverStyle = _k.hoverStyle;
102
102
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
103
103
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
104
104
  var cbRef = (0, react_1.useRef)(null);
@@ -135,9 +135,6 @@ function ContentsList(props) {
135
135
  CB_LAYOUT_PROP_PADDING.CB_LAYOUT_PROP_PADDING_SPEC_PADDING.right;
136
136
  var paddingTB = CB_LAYOUT_PROP_PADDING.CB_LAYOUT_PROP_PADDING_SPEC_PADDING.top +
137
137
  CB_LAYOUT_PROP_PADDING.CB_LAYOUT_PROP_PADDING_SPEC_PADDING.bottom;
138
- var queryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
139
- var queryLength = (_f = (_e = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath]) === null || _e === void 0 ? void 0 : _e.length) !== null && _f !== void 0 ? _f : 0;
140
- // const displayedItemLength = Math.max(0, Math.min(endIndex, queryLength) - startIndex);
141
138
  var numberOfRows = Math.ceil(displayCounts / numberOfColumns);
142
139
  var listMinWidth = oneCompositionMinWidth * numberOfColumns + (numberOfColumns - 1) * columnGap + paddingLR;
143
140
  var listMinHeight = oneCompositionMinHeight * numberOfRows +
@@ -147,9 +144,9 @@ function ContentsList(props) {
147
144
  var components = [
148
145
  createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
149
146
  ].filter(function (component) { return component !== undefined; });
150
- var _o = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _o.layoutRef, positionRefs = _o.positionRefs,
147
+ var _l = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _l.layoutRef, positionRefs = _l.positionRefs,
151
148
  // ccbInset,
152
- componentGroups = _o.componentGroups, getPositionStyle = _o.getPositionStyle, getComponentGroupLayout = _o.getComponentGroupLayout;
149
+ componentGroups = _l.componentGroups, getPositionStyle = _l.getPositionStyle, getComponentGroupLayout = _l.getComponentGroupLayout;
153
150
  var ccbInset = {
154
151
  top: '0px',
155
152
  right: '0px',
@@ -157,23 +154,17 @@ function ContentsList(props) {
157
154
  left: '0px'
158
155
  };
159
156
  var t = (0, react_i18next_1.useTranslation)('translation').t;
160
- var renderElements = function (component, positionStyle) {
161
- switch (component.type) {
162
- case 'PAGINATION':
163
- return ((0, jsx_runtime_1.jsx)("div", __assign({ style: positionStyle }, { children: (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick, style: positionStyle }) })));
164
- default:
165
- return null;
166
- }
167
- };
168
157
  var backgroundRef = (0, react_1.useRef)(null);
169
158
  var isMobile = device === 'MOBILE';
170
159
  var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
171
160
  var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
172
- var orderedCompositions = __spreadArray([], CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
173
- .sort(function (a, b) { return a.order - b.order; })
174
- .map(function (item) {
175
- return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
176
- });
161
+ var orderedCompositions = CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'VALUE'
162
+ ? __spreadArray([], CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
163
+ .sort(function (a, b) { return a.order - b.order; })
164
+ .map(function (item) {
165
+ return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
166
+ })
167
+ : compositions.filter(function (comp) { return !comp.ccbManualItemUuid; });
177
168
  var heightFitContentByDevice = device === 'DESKTOP'
178
169
  ? CB_LAYOUT_PROP_HEIGHTADJUSTMENT === null || CB_LAYOUT_PROP_HEIGHTADJUSTMENT === void 0 ? void 0 : CB_LAYOUT_PROP_HEIGHTADJUSTMENT.CB_LAYOUT_PROP_HEIGHTADJUSTMENT_SPEC_HEIGHTFITCONTENT
179
170
  : CB_LAYOUT_PROP_HEIGHTADJUSTMENT === null || CB_LAYOUT_PROP_HEIGHTADJUSTMENT === void 0 ? void 0 : CB_LAYOUT_PROP_HEIGHTADJUSTMENT['CB_LAYOUT_PROP_HEIGHTADJUSTMENT_SPEC_HEIGHTFITCONTENT:MOBILE'];
@@ -182,6 +173,48 @@ function ContentsList(props) {
182
173
  if (mode === 'EDIT') {
183
174
  style.visibility = 'visible';
184
175
  }
176
+ var renderElements = function (component, positionStyle) {
177
+ switch (component.type) {
178
+ case 'PAGINATION':
179
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ style: positionStyle }, { children: (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick, style: positionStyle }) })));
180
+ default:
181
+ return null;
182
+ }
183
+ };
184
+ var renderList = function (compositions) {
185
+ return ((0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
186
+ display: layout.display,
187
+ flexDirection: layout.flexDirection,
188
+ justifyContent: layout.justifyContent
189
+ } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss,
190
+ // NOTE: 위 CSS 프롭과 정리
191
+ style: { gridTemplateRows: "repeat(".concat(numberOfRows, ", 1fr)") } }, { children: (0, createCompositions_1.createCompositions)({
192
+ valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
193
+ queryPath: queryPath,
194
+ limit: displayCounts,
195
+ queryData: queryData,
196
+ compositions: compositions,
197
+ componentBlockCode: types_1.CB_ALL_CODES.CB_LIST
198
+ }).slice(startIndex, endIndex + 1) })) })));
199
+ };
200
+ var renderCompositions = function (compositions) {
201
+ // 직접 연결
202
+ if (CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'VALUE') {
203
+ if (!compositions.length)
204
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_9806" });
205
+ return renderList(compositions);
206
+ }
207
+ // 데이터 연결
208
+ if (queryPath === 'NONE' || !queryPath || !queryData) {
209
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10477" }, "no-query");
210
+ }
211
+ var queryDataValue = queryData[queryPath];
212
+ // 쿼리 데이터와 키가 있으나, 쿼리 데이터에 결과가 빈 경우
213
+ if (!(queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length)) {
214
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10478" }, "empty-item");
215
+ }
216
+ return renderList(compositions);
217
+ };
185
218
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), isEditModeAndHeightFitContent && ((0, jsx_runtime_1.jsx)(S_HeightFitContentCover_1.S_HeightFitContentCover, { className: "height-fit-content-cover", bottomText: t('str_10106') })), Object.entries(componentGroups).map(function (_a) {
186
219
  var position = _a[0], groupComponents = _a[1];
187
220
  return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-group ccb-elements", ref: function (el) {
@@ -194,20 +227,7 @@ function ContentsList(props) {
194
227
  }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
195
228
  return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
196
229
  }) })) }), position));
197
- }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-items": CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length, "data-number-of-columns": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-min-width": listMinWidth, "data-min-height": listMinHeight, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), orderedCompositions.length > 0 ? ((0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
198
- display: layout.display,
199
- flexDirection: layout.flexDirection,
200
- justifyContent: layout.justifyContent
201
- } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss,
202
- // NOTE: 위 CSS 프롭과 정리
203
- style: { gridTemplateRows: "repeat(".concat(numberOfRows, ", 1fr)") } }, { children: (0, createCompositions_1.createCompositions)({
204
- valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
205
- queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
206
- limit: displayCounts,
207
- queryData: queryData,
208
- compositions: orderedCompositions,
209
- componentBlockCode: types_1.CB_ALL_CODES.CB_LIST
210
- }).slice(startIndex, endIndex + 1) })) }))) : ((0, jsx_runtime_1.jsx)(EmptyString, {}))] })) }))] }));
230
+ }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-items": CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length, "data-number-of-columns": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(numberOfColumns, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-min-width": listMinWidth, "data-min-height": listMinHeight, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), renderList(orderedCompositions)] })) }))] }));
211
231
  }
212
232
  function getIsBgMedia(isMobile, specs) {
213
233
  if (!specs) {
@@ -251,16 +271,12 @@ var S_ContentsListWrapper = styled_components_1.default.div(templateObject_4 ||
251
271
  var ccbInset = _a.ccbInset;
252
272
  return ccbInset.top;
253
273
  });
254
- function removeFirstSegment(path) {
255
- var segments = path.split('/');
256
- return segments.slice(1).join('/');
257
- }
258
274
  function getStandardComposition(compositions, valueType) {
259
275
  if (valueType === 'DATA') {
260
- return compositions.find(function (composition) { return composition.isDefault; });
276
+ return compositions.find(function (composition) { return !composition.ccbManualItemUuid; });
261
277
  }
262
278
  // NOTE: 일단 디폴트가 아닌 첫번째를 반환하지만 경우에따라 가장 cols/width가 큰 것을 반환하도록 변경할 수 있음
263
- return compositions.find(function (composition) { return !composition.isDefault; });
279
+ return compositions.find(function (composition) { return !!composition.ccbManualItemUuid; });
264
280
  }
265
281
  function getCompositionMinValue(composition, device) {
266
282
  var minCellWidth = 10;
@@ -297,22 +313,23 @@ function getCompositionMinValue(composition, device) {
297
313
  };
298
314
  }
299
315
  }
300
- function EmptyString() {
316
+ function EmptyString(_a) {
317
+ var stringKey = _a.stringKey;
301
318
  var t = (0, react_i18next_1.useTranslation)('translation').t;
302
- return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
319
+ return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t(stringKey) });
303
320
  }
304
- var S_EmptyLayer = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.6);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"])), function (_a) {
321
+ var S_EmptyLayer = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"], ["\n background-color: rgba(0, 0, 0, 0.5);\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n line-height: ", ";\n margin: auto;\n padding: ", ";\n text-align: center;\n width: 100%;\n word-break: keep-all;\n"])), function (_a) {
305
322
  var theme = _a.theme;
306
- return theme.desktopFontSize.body2;
323
+ return theme.desktopFontSize.caption1;
307
324
  }, function (_a) {
308
325
  var theme = _a.theme;
309
326
  return theme.fontWeight.bold;
310
327
  }, function (_a) {
311
328
  var theme = _a.theme;
312
- return theme.desktopLineHeight.body2;
329
+ return theme.desktopLineHeight.caption1;
313
330
  }, function (_a) {
314
331
  var theme = _a.theme;
315
- return theme.spacing.spacingE;
332
+ return theme.spacing.spacingD;
316
333
  });
317
334
  exports.default = ContentsList;
318
335
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;