pds-dev-kit-web 2.2.295 → 2.2.297

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 (46) hide show
  1. package/dist/src/common/assets/icons/fill/Plugin.js +1 -1
  2. package/dist/src/common/assets/icons/line/Plugin.js +1 -1
  3. package/dist/src/common/services/i18n/resources/en.json +6 -1
  4. package/dist/src/common/services/i18n/resources/es.json +6 -1
  5. package/dist/src/common/services/i18n/resources/fil.json +6 -1
  6. package/dist/src/common/services/i18n/resources/index.d.ts +35 -0
  7. package/dist/src/common/services/i18n/resources/ja.json +6 -1
  8. package/dist/src/common/services/i18n/resources/ko.json +6 -1
  9. package/dist/src/common/services/i18n/resources/zh-cn.json +6 -1
  10. package/dist/src/common/services/i18n/resources/zh-tw.json +6 -1
  11. package/dist/src/desktop/components/Select/Select.d.ts +1 -0
  12. package/dist/src/desktop/components/Select/Select.js +1 -1
  13. package/dist/src/mobile/components/Select/Select.d.ts +1 -0
  14. package/dist/src/mobile/components/Select/Select.js +1 -1
  15. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +0 -2
  16. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +9 -10
  17. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +2 -1
  18. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +15 -55
  19. package/dist/src/sub/DynamicLayout/gleStyles.js +1 -1
  20. package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +216 -74
  21. package/dist/src/sub/DynamicLayout/mock_queryData.js +1018 -2510
  22. package/dist/src/sub/DynamicLayout/mock_section.json +10777 -23774
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +32 -8
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +95 -56
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +48 -22
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -0
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +10 -1
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +75 -59
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +29 -7
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +67 -38
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -0
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +11 -1
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +5 -0
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +103 -9
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.d.ts +1 -2
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.js +4 -4
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.js +25 -1
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +4 -3
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/fallbacks/DataNotFound.d.ts +4 -0
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/fallbacks/DataNotFound.js +33 -0
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +0 -1
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseQueryData.d.ts +18 -0
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseQueryData.js +92 -0
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +19 -5
  45. package/package.json +1 -1
  46. package/release-note.md +2 -2
@@ -65,16 +65,14 @@ 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
- var
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];
71
+ var CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS, 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;
72
+ var _f = (0, react_1.useState)(false), isHovered = _f[0], setIsHovered = _f[1];
73
+ var _g = (0, react_1.useState)(1), currentPage = _g[0], setCurrentPage = _g[1];
74
+ var queryPath = "".concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA, "/").concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATASORTING, "/").concat(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAOFFSET);
75
+ var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[queryPath];
78
76
  // list의 minheight / minwidth를 계산
79
77
  var numberOfColumns = device === 'DESKTOP'
80
78
  ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
@@ -83,22 +81,22 @@ function ContentsList(props) {
83
81
  ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS
84
82
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS;
85
83
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
86
- ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
84
+ ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS
87
85
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) / displayCounts);
88
86
  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;
87
+ var _h = (0, util_1.parseProperties)(props, device), style = _h.style, hoverStyle = _h.hoverStyle, layout = _h.layout, effect = _h.effect, overlayStyle = _h.overlayStyle;
90
88
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
91
89
  props: CB_CONTENT_PROP_CONTENTSLIST,
92
90
  device: device
93
91
  }).contentPropCss;
94
- var _l = (0, contentsListUtils_1.parseGridStyleProp)({
92
+ var _j = (0, contentsListUtils_1.parseGridStyleProp)({
95
93
  props: CB_STYLE_PROP_CONTENTSLIST,
96
94
  device: device
97
- }), stylePropCss = _l.stylePropCss, hoverStylePropCss = _l.hoverStylePropCss;
98
- var _m = (0, contentsListUtils_1.parsePaginationStyleProp)({
95
+ }), stylePropCss = _j.stylePropCss, hoverStylePropCss = _j.hoverStylePropCss;
96
+ var _k = (0, contentsListUtils_1.parsePaginationStyleProp)({
99
97
  props: CB_STYLE_PROP_CONTENTSLIST,
100
98
  device: device
101
- }), paginationNormalStyle = _m.normalStyle, paginationHoverStyle = _m.hoverStyle;
99
+ }), paginationNormalStyle = _k.normalStyle, paginationHoverStyle = _k.hoverStyle;
102
100
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
103
101
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
104
102
  var cbRef = (0, react_1.useRef)(null);
@@ -135,9 +133,6 @@ function ContentsList(props) {
135
133
  CB_LAYOUT_PROP_PADDING.CB_LAYOUT_PROP_PADDING_SPEC_PADDING.right;
136
134
  var paddingTB = CB_LAYOUT_PROP_PADDING.CB_LAYOUT_PROP_PADDING_SPEC_PADDING.top +
137
135
  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
136
  var numberOfRows = Math.ceil(displayCounts / numberOfColumns);
142
137
  var listMinWidth = oneCompositionMinWidth * numberOfColumns + (numberOfColumns - 1) * columnGap + paddingLR;
143
138
  var listMinHeight = oneCompositionMinHeight * numberOfRows +
@@ -147,9 +142,9 @@ function ContentsList(props) {
147
142
  var components = [
148
143
  createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
149
144
  ].filter(function (component) { return component !== undefined; });
150
- var _o = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _o.layoutRef, positionRefs = _o.positionRefs,
145
+ var _l = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _l.layoutRef, positionRefs = _l.positionRefs,
151
146
  // ccbInset,
152
- componentGroups = _o.componentGroups, getPositionStyle = _o.getPositionStyle, getComponentGroupLayout = _o.getComponentGroupLayout;
147
+ componentGroups = _l.componentGroups, getPositionStyle = _l.getPositionStyle, getComponentGroupLayout = _l.getComponentGroupLayout;
153
148
  var ccbInset = {
154
149
  top: '0px',
155
150
  right: '0px',
@@ -157,23 +152,17 @@ function ContentsList(props) {
157
152
  left: '0px'
158
153
  };
159
154
  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
155
  var backgroundRef = (0, react_1.useRef)(null);
169
156
  var isMobile = device === 'MOBILE';
170
157
  var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
171
158
  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
- });
159
+ var orderedCompositions = CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'VALUE'
160
+ ? __spreadArray([], CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
161
+ .sort(function (a, b) { return a.order - b.order; })
162
+ .map(function (item) {
163
+ return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
164
+ })
165
+ : compositions.filter(function (comp) { return !comp.ccbManualItemUuid; });
177
166
  var heightFitContentByDevice = device === 'DESKTOP'
178
167
  ? CB_LAYOUT_PROP_HEIGHTADJUSTMENT === null || CB_LAYOUT_PROP_HEIGHTADJUSTMENT === void 0 ? void 0 : CB_LAYOUT_PROP_HEIGHTADJUSTMENT.CB_LAYOUT_PROP_HEIGHTADJUSTMENT_SPEC_HEIGHTFITCONTENT
179
168
  : 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 +171,49 @@ function ContentsList(props) {
182
171
  if (mode === 'EDIT') {
183
172
  style.visibility = 'visible';
184
173
  }
174
+ var renderElements = function (component, positionStyle) {
175
+ switch (component.type) {
176
+ case 'PAGINATION':
177
+ 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 }) })));
178
+ default:
179
+ return null;
180
+ }
181
+ };
182
+ var renderList = function (compositions) {
183
+ return ((0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
184
+ display: layout.display,
185
+ flexDirection: layout.flexDirection,
186
+ justifyContent: layout.justifyContent
187
+ } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss,
188
+ // NOTE: 위 CSS 프롭과 정리
189
+ style: { gridTemplateRows: "repeat(".concat(numberOfRows, ", 1fr)") } }, { children: (0, createCompositions_1.createCompositions)({
190
+ valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
191
+ queryPath: queryPath,
192
+ limit: CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS,
193
+ queryData: queryData,
194
+ compositions: compositions,
195
+ componentBlockCode: types_1.CB_ALL_CODES.CB_LIST,
196
+ device: device
197
+ }).slice(startIndex, endIndex + 1) })) })));
198
+ };
199
+ var renderCompositions = function (compositions) {
200
+ // 직접 연결
201
+ if (CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'VALUE') {
202
+ if (!compositions.length)
203
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_9806" });
204
+ return renderList(compositions);
205
+ }
206
+ // 데이터 연결
207
+ if (queryPath === 'NONE' || !queryPath || !queryData) {
208
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10477" }, "no-query");
209
+ }
210
+ var queryDataValue = queryData[queryPath];
211
+ // 쿼리 데이터와 키가 있으나, 쿼리 데이터에 결과가 빈 경우
212
+ if (!(queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length)) {
213
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10478" }, "empty-item");
214
+ }
215
+ return renderList(compositions);
216
+ };
185
217
  var isHidden = style.visibility === 'hidden';
186
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) {
187
219
  var position = _a[0], groupComponents = _a[1];
@@ -196,20 +228,7 @@ function ContentsList(props) {
196
228
  { visibility: isHidden ? 'hidden' : 'visible' }) }, { children: groupComponents.map(function (component) {
197
229
  return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
198
230
  }) })) }), position));
199
- }), (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 ".concat(isHidden ? 'hidden' : ''), 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: {
200
- display: layout.display,
201
- flexDirection: layout.flexDirection,
202
- justifyContent: layout.justifyContent
203
- } }, { children: (0, jsx_runtime_1.jsx)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss,
204
- // NOTE: 위 CSS 프롭과 정리
205
- style: { gridTemplateRows: "repeat(".concat(numberOfRows, ", min-content)") } }, { children: (0, createCompositions_1.createCompositions)({
206
- valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
207
- queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
208
- limit: displayCounts,
209
- queryData: queryData,
210
- compositions: orderedCompositions,
211
- componentBlockCode: types_1.CB_ALL_CODES.CB_LIST
212
- }).slice(startIndex, endIndex + 1) })) }))) : ((0, jsx_runtime_1.jsx)(EmptyString, {}))] })) }))] }));
231
+ }), (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 ".concat(isHidden ? 'hidden' : ''), 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 }), renderCompositions(orderedCompositions)] })) }))] }));
213
232
  }
214
233
  function getIsBgMedia(isMobile, specs) {
215
234
  if (!specs) {
@@ -253,16 +272,12 @@ var S_ContentsListWrapper = styled_components_1.default.div(templateObject_4 ||
253
272
  var ccbInset = _a.ccbInset;
254
273
  return ccbInset.top;
255
274
  });
256
- function removeFirstSegment(path) {
257
- var segments = path.split('/');
258
- return segments.slice(1).join('/');
259
- }
260
275
  function getStandardComposition(compositions, valueType) {
261
276
  if (valueType === 'DATA') {
262
- return compositions.find(function (composition) { return composition.isDefault; });
277
+ return compositions.find(function (composition) { return !composition.ccbManualItemUuid; });
263
278
  }
264
279
  // NOTE: 일단 디폴트가 아닌 첫번째를 반환하지만 경우에따라 가장 cols/width가 큰 것을 반환하도록 변경할 수 있음
265
- return compositions.find(function (composition) { return !composition.isDefault; });
280
+ return compositions.find(function (composition) { return !!composition.ccbManualItemUuid; });
266
281
  }
267
282
  function getCompositionMinValue(composition, device) {
268
283
  var minCellWidth = 10;
@@ -299,22 +314,23 @@ function getCompositionMinValue(composition, device) {
299
314
  };
300
315
  }
301
316
  }
302
- function EmptyString() {
317
+ function EmptyString(_a) {
318
+ var stringKey = _a.stringKey;
303
319
  var t = (0, react_i18next_1.useTranslation)('translation').t;
304
- return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
320
+ return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t(stringKey) });
305
321
  }
306
- 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) {
322
+ 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) {
307
323
  var theme = _a.theme;
308
- return theme.desktopFontSize.body2;
324
+ return theme.desktopFontSize.caption1;
309
325
  }, function (_a) {
310
326
  var theme = _a.theme;
311
327
  return theme.fontWeight.bold;
312
328
  }, function (_a) {
313
329
  var theme = _a.theme;
314
- return theme.desktopLineHeight.body2;
330
+ return theme.desktopLineHeight.caption1;
315
331
  }, function (_a) {
316
332
  var theme = _a.theme;
317
- return theme.spacing.spacingE;
333
+ return theme.spacing.spacingD;
318
334
  });
319
335
  exports.default = ContentsList;
320
336
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -48,6 +48,7 @@ var compositionQueryContext_1 = require("../../../../../../../DynamicLayout/comp
48
48
  var styled_components_1 = __importStar(require("styled-components"));
49
49
  var hooks_1 = require("../../../../hooks");
50
50
  var util_1 = require("../../../../util");
51
+ var DataNotFound_1 = __importDefault(require("../../../fallbacks/DataNotFound"));
51
52
  var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
52
53
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
53
54
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
@@ -56,7 +57,7 @@ function Image(props) {
56
57
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
57
58
  var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
58
59
  var index = props.index, CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE, CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
59
- var cLinkValue = function () {
60
+ var cLinkValue = function (defaultValue) {
60
61
  if (CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DATA' ||
61
62
  CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DELEGATEDDATA') {
62
63
  if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
@@ -68,13 +69,13 @@ function Image(props) {
68
69
  }
69
70
  return link;
70
71
  }
71
- return CB_CONTENT_PROP_CLINK_SPEC_SRC;
72
+ return defaultValue;
72
73
  };
73
74
  var _c = (0, useCLINK_1.default)({
74
- src: cLinkValue(),
75
+ src: cLinkValue(CB_CONTENT_PROP_CLINK_SPEC_SRC),
75
76
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
76
77
  openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
77
- internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
78
+ internalSrc: cLinkValue(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
78
79
  }), onClickCLINK = _c.onClickCLINK, CLINKCursor = _c.CLINKCursor;
79
80
  var _d = (0, util_1.parseProperties)(props, device), style = _d.style, hoverStyle = _d.hoverStyle, layout = _d.layout, effect = _d.effect;
80
81
  var _e = parseImageCBStyle(style, hoverStyle, mode), boxStyle = _e.boxStyle, imgStyle = _e.imgStyle;
@@ -108,9 +109,30 @@ function Image(props) {
108
109
  }
109
110
  return queryContext.queryData[CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA];
110
111
  };
111
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ style: __assign({}, effectCssProperties) }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), { overflow: 'hidden' }), boxStyle.normal), { cursor: CLINKCursor }), hoverStyle: __assign({}, boxStyle.hover), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: (0, jsx_runtime_1.jsx)(S_Image, { src: imgSrc() === 'ERROR'
112
- ? 'https://static.publ.site/pages-sample/img_cb_style_prop_bgmedia_spec_imageselector_01.png'
113
- : imgSrc(), normalStyle: __assign({}, imgStyle.normal), hoverStyle: __assign({}, imgStyle.hover) }) })) })) }))] }));
112
+ var showDataNotFound = function () {
113
+ if (mode !== 'EDIT') {
114
+ return false;
115
+ }
116
+ if (CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE === 'DATA' ||
117
+ CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE === 'DELEGATEDDATA') {
118
+ if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
119
+ return true;
120
+ }
121
+ if (!Object.prototype.hasOwnProperty.call(queryContext.queryData, CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA)) {
122
+ if (mode === 'EDIT') {
123
+ return true;
124
+ }
125
+ return false;
126
+ }
127
+ if (!queryContext.queryData[CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA]) {
128
+ return true;
129
+ }
130
+ }
131
+ return false;
132
+ };
133
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ style: __assign({}, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), { overflow: 'hidden' }), boxStyle.normal), { cursor: CLINKCursor }), hoverStyle: __assign({}, boxStyle.hover), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: [(0, jsx_runtime_1.jsx)(S_Image, { src: imgSrc() === 'ERROR'
134
+ ? 'https://static.publ.site/pages-sample/img_cb_style_prop_bgmedia_spec_imageselector_01.png'
135
+ : imgSrc(), normalStyle: __assign({}, imgStyle.normal), hoverStyle: __assign({}, imgStyle.hover) }), showDataNotFound() && (0, jsx_runtime_1.jsx)(DataNotFound_1.default, { stringKey: "str_10478" })] })) })) }))] }));
114
136
  }
115
137
  function parseImageCBStyle(style, hoverStyle, mode) {
116
138
  var boxStyle = {
@@ -72,7 +72,7 @@ size) {
72
72
  function SlideBanner(props) {
73
73
  var _a;
74
74
  var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, mode = _b.mode, queryData = _b.queryData;
75
- var index = props.index, _c = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA, CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS, CB_STYLE_PROP_SLIDEBANNERDESIGN = props.CB_STYLE_PROP_SLIDEBANNERDESIGN, CB_STYLE_PROP_SLIDEBANNERPAGINATION = props.CB_STYLE_PROP_SLIDEBANNERPAGINATION, CB_STYLE_PROP_SLIDEBANNERBUTTON = props.CB_STYLE_PROP_SLIDEBANNERBUTTON, CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD = props.CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD, CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR = props.CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR, 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_SLIDEBANNER_SPEC_TRANSITIONTYPE = props.CB_EFFECT_PROP_SLIDEBANNER.CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE;
75
+ var index = props.index, _c = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA, CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATASORTING = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATASORTING, CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATAOFFSET = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATAOFFSET, CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS, CB_STYLE_PROP_SLIDEBANNERDESIGN = props.CB_STYLE_PROP_SLIDEBANNERDESIGN, CB_STYLE_PROP_SLIDEBANNERPAGINATION = props.CB_STYLE_PROP_SLIDEBANNERPAGINATION, CB_STYLE_PROP_SLIDEBANNERBUTTON = props.CB_STYLE_PROP_SLIDEBANNERBUTTON, CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD = props.CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD, CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR = props.CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR, 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_SLIDEBANNER_SPEC_TRANSITIONTYPE = props.CB_EFFECT_PROP_SLIDEBANNER.CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE;
76
76
  var compositions = props.compositions;
77
77
  var CB_STYLE_PROP_SLIDEBANNER = __assign(__assign(__assign(__assign(__assign({}, CB_STYLE_PROP_SLIDEBANNERDESIGN), CB_STYLE_PROP_SLIDEBANNERPAGINATION), CB_STYLE_PROP_SLIDEBANNERBUTTON), CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD), CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR);
78
78
  var autoPlayEnabled = device === 'DESKTOP'
@@ -95,7 +95,7 @@ function SlideBanner(props) {
95
95
  props: CB_STYLE_PROP_SLIDEBANNER,
96
96
  device: device
97
97
  }), customProgressbarNormalStyle = _h.normalStyle, customProgressbarHoverStyle = _h.hoverStyle;
98
- var _j = (0, useSwiper_1.useSwiper)(), swiperRef = _j.swiperRef, progressRef = _j.progressRef, leftTimeMsRef = _j.leftTimeMsRef, currentSlide = _j.currentSlide, isBeginning = _j.isBeginning, isEnd = _j.isEnd, onSwiper = _j.onSwiper, onSlideChangeTransitionEnd = _j.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _j.onAutoplayTimeLeft, onClickBullet = _j.onClickBullet, onClickPrevBtn = _j.onClickPrevBtn, onClickNextBtn = _j.onClickNextBtn;
98
+ var _j = (0, useSwiper_1.useSwiper)(), swiperRef = _j.swiperRef, progressRef = _j.progressRef, leftTimeMsRef = _j.leftTimeMsRef, currentSlide = _j.currentSlide, isBeginning = _j.isBeginning, isEnd = _j.isEnd, onSwiper = _j.onSwiper, onSlideChangeTransitionEnd = _j.onSlideChangeTransitionEnd, onAutoplayTimeLeft = _j.onAutoplayTimeLeft, onClickBullet = _j.onClickBullet, onClickPrevBtn = _j.onClickPrevBtn, onClickNextBtn = _j.onClickNextBtn, resetSwiper = _j.resetSwiper;
99
99
  var _k = (0, react_1.useState)(false), isHovered = _k[0], setIsHovered = _k[1];
100
100
  var loop = isHovered ? slideBannerNormalStyle.loop : slideBannerHoverStyle.loop;
101
101
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
@@ -127,34 +127,73 @@ function SlideBanner(props) {
127
127
  }
128
128
  ].filter(function (component) { return component !== undefined; });
129
129
  var _l = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _l.layoutRef, positionRefs = _l.positionRefs, ccbInset = _l.ccbInset, componentGroups = _l.componentGroups, getPositionStyle = _l.getPositionStyle, getComponentGroupLayout = _l.getComponentGroupLayout;
130
- var renderElements = function (component, positionStyle) {
131
- var _a;
130
+ var backgroundRef = (0, react_1.useRef)(null);
131
+ var isMobile = device === 'MOBILE';
132
+ var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
133
+ var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
134
+ var queryPath = "".concat(CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA, "/").concat(CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATASORTING, "/").concat(CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATAOFFSET);
135
+ (0, react_1.useEffect)(function () {
136
+ resetSwiper();
137
+ }, [queryPath]);
138
+ var orderedCompositions = CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE === 'VALUE'
139
+ ? __spreadArray([], CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
140
+ .sort(function (a, b) { return a.order - b.order; })
141
+ .map(function (item) {
142
+ return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
143
+ })
144
+ : compositions.filter(function (comp) { return !comp.ccbManualItemUuid; });
145
+ var isEditModeAndHidden = style.visibility === 'hidden' && mode === 'EDIT';
146
+ if (mode === 'EDIT') {
147
+ style.visibility = 'visible';
148
+ }
149
+ var renderElements = function (component, positionStyle, slidesLength) {
150
+ var _a, _b, _c;
132
151
  switch (component.type) {
133
152
  case 'PREV':
134
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' }) }));
135
154
  case 'NEXT':
136
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' }) }));
137
156
  case 'PAGINATION':
138
- 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 }));
139
158
  case 'PROGRESSBAR':
140
- return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { slidesLength: orderedCompositions.length, progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
159
+ return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { slidesLength: slidesLength, progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
141
160
  default:
142
161
  return null;
143
162
  }
144
163
  };
145
- var backgroundRef = (0, react_1.useRef)(null);
146
- var isMobile = device === 'MOBILE';
147
- var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
148
- var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
149
- var orderedCompositions = __spreadArray([], CB_CONTENT_PROP_SLIDEBANNER_SPEC_MANUALITEMS, true).filter(function (item) { return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; }); })
150
- .sort(function (a, b) { return a.order - b.order; })
151
- .map(function (item) {
152
- return compositions.find(function (comp) { return comp.ccbManualItemUuid === item.uuid; });
153
- });
154
- var isEditModeAndHidden = style.visibility === 'hidden' && mode === 'EDIT';
155
- if (mode === 'EDIT') {
156
- style.visibility = 'visible';
157
- }
164
+ var renderSwiper = function (compositions) {
165
+ 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
+ valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
167
+ queryPath: queryPath,
168
+ limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
169
+ queryData: queryData,
170
+ compositions: compositions,
171
+ componentBlockCode: types_1.CB_ALL_CODES.CB_SLIDEBANNER,
172
+ device: device
173
+ }) }), CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE +
174
+ CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE +
175
+ autoPlayEnabled +
176
+ compositions.length +
177
+ queryPath) })) })));
178
+ };
179
+ var renderCompositions = function (compositions) {
180
+ // 직접 연결
181
+ if (CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE === 'VALUE') {
182
+ if (!compositions.length)
183
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_9806" });
184
+ return renderSwiper(compositions);
185
+ }
186
+ // 데이터 연결
187
+ if (queryPath === 'NONE' || !queryPath || !queryData) {
188
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10477" }, "no-query");
189
+ }
190
+ var queryDataValue = queryData[queryPath];
191
+ // 쿼리 데이터와 키가 있으나, 쿼리 데이터에 결과가 빈 경우
192
+ if (!(queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length)) {
193
+ return (0, jsx_runtime_1.jsx)(EmptyString, { stringKey: "str_10478" }, "empty-item");
194
+ }
195
+ return renderSwiper(compositions);
196
+ };
158
197
  var isHidden = style.visibility === 'hidden';
159
198
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsxs)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: [Object.entries(componentGroups).map(function (_a) {
160
199
  var position = _a[0], groupComponents = _a[1];
@@ -166,37 +205,27 @@ function SlideBanner(props) {
166
205
  delete positionRefs.current[position];
167
206
  }
168
207
  }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-slidebanner-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
169
- return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
208
+ return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type), orderedCompositions.length);
170
209
  }) })) }), position));
171
- }), (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box ccb-layout-box ".concat(isHidden ? 'hidden' : ''), 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 }, { 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-slidebanner-layout-box", ref: layoutRef }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-slidebanner-wrapper", ccbInset: ccbInset, customStyle: isHovered
172
- ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle
173
- : 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)({
174
- valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
175
- queryPath: CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
176
- limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
177
- queryData: queryData,
178
- compositions: orderedCompositions,
179
- componentBlockCode: types_1.CB_ALL_CODES.CB_SLIDEBANNER
180
- }) }), CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE +
181
- autoPlayEnabled +
182
- orderedCompositions.length) })) }))) : ((0, jsx_runtime_1.jsx)(EmptyString, {}))] }))] }))] }));
210
+ }), (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box ccb-layout-box ".concat(isHidden ? 'hidden' : ''), 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 }, { 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)] }))] }))] }));
183
211
  }
184
- function EmptyString() {
212
+ function EmptyString(_a) {
213
+ var stringKey = _a.stringKey;
185
214
  var t = (0, react_i18next_1.useTranslation)('translation').t;
186
- return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t('str_9806') });
215
+ return (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: t(stringKey) });
187
216
  }
188
- 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) {
217
+ 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) {
189
218
  var theme = _a.theme;
190
- return theme.desktopFontSize.body2;
219
+ return theme.desktopFontSize.caption1;
191
220
  }, function (_a) {
192
221
  var theme = _a.theme;
193
222
  return theme.fontWeight.bold;
194
223
  }, function (_a) {
195
224
  var theme = _a.theme;
196
- return theme.desktopLineHeight.body2;
225
+ return theme.desktopLineHeight.caption1;
197
226
  }, function (_a) {
198
227
  var theme = _a.theme;
199
- return theme.spacing.spacingE;
228
+ return theme.spacing.spacingD;
200
229
  });
201
230
  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"])));
202
231
  var S_CustomBackgroundWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n border-radius: inherit;\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -2;\n"], ["\n align-items: center;\n border-radius: inherit;\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -2;\n"])));
@@ -13,4 +13,5 @@ export declare function useSwiper(): {
13
13
  onClickBullet: (index: number) => void;
14
14
  onClickPrevBtn: () => void;
15
15
  onClickNextBtn: () => void;
16
+ resetSwiper: () => void;
16
17
  };
@@ -45,6 +45,15 @@ function useSwiper() {
45
45
  swiperRef.current.swiper.slideNext();
46
46
  }
47
47
  };
48
+ var resetSwiper = function () {
49
+ var _a, _b, _c;
50
+ setCurrentSlide(1);
51
+ setIsBeginning(true);
52
+ setIsEnd(false);
53
+ progressRef.current = 0;
54
+ leftTimeMsRef.current = 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
+ };
48
57
  return {
49
58
  swiperRef: swiperRef,
50
59
  progressRef: progressRef,
@@ -57,7 +66,8 @@ function useSwiper() {
57
66
  onAutoplayTimeLeft: onAutoplayTimeLeft,
58
67
  onClickBullet: onClickBullet,
59
68
  onClickPrevBtn: onClickPrevBtn,
60
- onClickNextBtn: onClickNextBtn
69
+ onClickNextBtn: onClickNextBtn,
70
+ resetSwiper: resetSwiper
61
71
  };
62
72
  }
63
73
  exports.useSwiper = useSwiper;
@@ -15,4 +15,9 @@ export declare function getTextOptionStyles(props: CB_STYLE_PROP_TEXTOPTION, dev
15
15
  overflowY: string;
16
16
  };
17
17
  };
18
+ /**
19
+ * 문자열이 유효한 날짜 형태인지 판별합니다.
20
+ * (YYYY-MM-DD, ISO 8601, UTC 형태 등을 지원)
21
+ */
22
+ export declare const isValidDate: (value: string) => boolean;
18
23
  export {};