pds-dev-kit-web-test 2.7.251 → 2.7.253

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.
@@ -5325,12 +5325,14 @@ exports.SAMPLE_LIST_CB = {
5325
5325
  currentVersion: '2025-01-10',
5326
5326
  data: {
5327
5327
  CB_CONTENT_PROP_CONTENTSLIST: {
5328
- CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS: 1,
5328
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS: 2,
5329
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS: 1,
5329
5330
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA: 'NONE',
5330
5331
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAFILTER: 'NONE',
5331
5332
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATAOFFSET: 0,
5332
5333
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_DATASORTING: 'PAPPQUERY_SORTING_ITEM_TITLE_ASC',
5333
5334
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS: 1,
5335
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS: 1,
5334
5336
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_EDITCOMMONITEM: null,
5335
5337
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS: 1,
5336
5338
  CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS: [
@@ -69,16 +69,24 @@ function ContentsList(props) {
69
69
  var _j = (0, react_1.useState)(1), currentPage = _j[0], setCurrentPage = _j[1];
70
70
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
71
71
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
72
+ // list의 minheight / minwidth를 계산
73
+ var numberOfColumns = device === 'DESKTOP'
74
+ ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
75
+ : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
72
76
  var displayCounts = device === 'DESKTOP'
73
77
  ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS
74
78
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS !== null && CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS !== void 0 ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length;
75
79
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
76
80
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
77
81
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) / displayCounts);
82
+ console.log('columns', numberOfColumns);
83
+ console.log('displayCounts', displayCounts);
84
+ console.log('totalPage', totalPage);
78
85
  var CB_STYLE_PROP_CONTENTSLIST = __assign(__assign({}, CB_STYLE_PROP_CONTENTSLISTDESIGN), CB_STYLE_PROP_CONTENTSLISTPAGINATION);
79
86
  var _k = (0, util_1.parseProperties)(props, device), style = _k.style, hoverStyle = _k.hoverStyle, layout = _k.layout, effect = _k.effect, overlayStyle = _k.overlayStyle;
80
87
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
81
- props: CB_CONTENT_PROP_CONTENTSLIST
88
+ props: CB_CONTENT_PROP_CONTENTSLIST,
89
+ device: device
82
90
  }).contentPropCss;
83
91
  var _l = (0, contentsListUtils_1.parseGridStyleProp)({
84
92
  props: CB_STYLE_PROP_CONTENTSLIST,
@@ -106,13 +114,8 @@ function ContentsList(props) {
106
114
  var handlePageClick = function (page) {
107
115
  setCurrentPage(page);
108
116
  };
109
- // CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS ?? CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
110
117
  var startIndex = (currentPage - 1) * displayCounts;
111
118
  var endIndex = startIndex + (displayCounts - 1);
112
- // list의 minheight / minwidth를 계산
113
- var numberOfColumns = device === 'DESKTOP'
114
- ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
115
- : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
116
119
  // NOTE: edit환경에서 hover가 작동하지 않아서 제외함 필요시 추가..
117
120
  var columnGapEnum = device === 'DESKTOP'
118
121
  ? CB_STYLE_PROP_CONTENTSLIST.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMSPACING
@@ -179,7 +182,7 @@ function ContentsList(props) {
179
182
  }, 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) {
180
183
  return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
181
184
  }) })) }), position));
182
- }), (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(displayCounts, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(displayCounts, 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 }), (0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
185
+ }), (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 }), (0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
183
186
  display: layout.display,
184
187
  flexDirection: layout.flexDirection,
185
188
  justifyContent: layout.justifyContent
@@ -8,6 +8,7 @@ type ParseContentsListStyleToCarouselCoreProps = {
8
8
  };
9
9
  type ParseContentsListContentToCarouselCoreProps = {
10
10
  props: CB_CONTENT_PROP_CONTENTSLIST;
11
+ device: Device;
11
12
  };
12
13
  type ParseContentsListStyleToCustomPaginationProps = {
13
14
  props: CB_STYLE_PROP_CONTENTSLIST_SPECS;
@@ -18,7 +19,7 @@ export declare function parseGridStyleProp({ props, device }: ParseContentsListS
18
19
  stylePropCss: CssFragment;
19
20
  hoverStylePropCss: CssFragment;
20
21
  };
21
- export declare function parseGridContentProp({ props }: ParseContentsListContentToCarouselCoreProps): {
22
+ export declare function parseGridContentProp({ props, device }: ParseContentsListContentToCarouselCoreProps): {
22
23
  contentPropCss: CssFragment;
23
24
  };
24
25
  export declare function parsePaginationStyleProp({ props, device }: ParseContentsListStyleToCustomPaginationProps): {
@@ -42,10 +42,18 @@ function parseStylePropertyStyles(key, value) {
42
42
  function getColumnsPropStyleValues(value, rows) {
43
43
  return (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", 1fr);\n "], ["\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", 1fr);\n "])), value, rows);
44
44
  }
45
- function parseContentPropertyStyles(key, value, rows) {
46
- switch (key) {
47
- case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS':
48
- return getColumnsPropStyleValues(value, rows);
45
+ function parseContentPropertyStyles(key, value, rows, device) {
46
+ if (device === 'DESKTOP') {
47
+ switch (key) {
48
+ case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS':
49
+ return getColumnsPropStyleValues(value, rows);
50
+ }
51
+ }
52
+ if (device === 'MOBILE') {
53
+ switch (key) {
54
+ case 'CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS':
55
+ return getColumnsPropStyleValues(value, rows);
56
+ }
49
57
  }
50
58
  return undefined;
51
59
  }
@@ -70,16 +78,19 @@ function parseGridStyleProp(_a) {
70
78
  }
71
79
  exports.parseGridStyleProp = parseGridStyleProp;
72
80
  function parseGridContentProp(_a) {
73
- var props = _a.props;
81
+ var props = _a.props, device = _a.device;
74
82
  var availableSpecCodes = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
75
83
  var displayCounts = props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS ||
76
84
  props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS ||
77
85
  1;
78
- var columns = Math.min(props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, displayCounts);
86
+ var columnsByDevice = device === 'DESKTOP'
87
+ ? props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS
88
+ : props.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS;
89
+ var columns = Math.min(columnsByDevice, displayCounts);
79
90
  var rows = Math.ceil(displayCounts / columns);
80
91
  return availableSpecCodes.reduce(function (acc, currentKey) {
81
92
  var value = props[currentKey];
82
- var styles = parseContentPropertyStyles(currentKey, value, rows);
93
+ var styles = parseContentPropertyStyles(currentKey, value, rows, device);
83
94
  return {
84
95
  contentPropCss: (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n ", "\n "], ["\n ", "\n ", "\n "])), acc.contentPropCss, styles)
85
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.251",
3
+ "version": "2.7.253",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",