pds-dev-kit-web-test 2.5.673 → 2.5.675

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.
@@ -47,29 +47,29 @@ var createComponent = function (type, getDesignType, getLocation) {
47
47
  };
48
48
  };
49
49
  function ContentsList(props) {
50
- var _a, _b, _c, _d;
51
- var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, mode = _e.mode, queryData = _e.queryData;
50
+ var _a, _b, _c, _d, _e;
51
+ var _f = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _f.device, mode = _f.mode, queryData = _f.queryData;
52
52
  var index = props.index, compositions = props.compositions, CB_CONTENT_PROP_CONTENTSLIST = props.CB_CONTENT_PROP_CONTENTSLIST, CB_STYLE_PROP_CONTENTSLIST = props.CB_STYLE_PROP_CONTENTSLIST, 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;
53
53
  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_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;
54
- var _f = (0, react_1.useState)(false), isHovered = _f[0], setIsHovered = _f[1];
55
- var _g = (0, react_1.useState)(1), currentPage = _g[0], setCurrentPage = _g[1];
54
+ var _g = (0, react_1.useState)(false), isHovered = _g[0], setIsHovered = _g[1];
55
+ var _h = (0, react_1.useState)(1), currentPage = _h[0], setCurrentPage = _h[1];
56
56
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
57
57
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
58
58
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
59
59
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
60
60
  : compositions.length - 1) / CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
61
- var _h = (0, util_1.parseProperties)(props, device), style = _h.style, hoverStyle = _h.hoverStyle, layout = _h.layout, effect = _h.effect, overlayStyle = _h.overlayStyle;
61
+ var _j = (0, util_1.parseProperties)(props, device), style = _j.style, hoverStyle = _j.hoverStyle, layout = _j.layout, effect = _j.effect, overlayStyle = _j.overlayStyle;
62
62
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
63
63
  props: CB_CONTENT_PROP_CONTENTSLIST
64
64
  }).contentPropCss;
65
- var _j = (0, contentsListUtils_1.parseGridStyleProp)({
65
+ var _k = (0, contentsListUtils_1.parseGridStyleProp)({
66
66
  props: CB_STYLE_PROP_CONTENTSLIST,
67
67
  device: device
68
- }), stylePropCss = _j.stylePropCss, hoverStylePropCss = _j.hoverStylePropCss;
69
- var _k = (0, contentsListUtils_1.parsePaginationStyleProp)({
68
+ }), stylePropCss = _k.stylePropCss, hoverStylePropCss = _k.hoverStylePropCss;
69
+ var _l = (0, contentsListUtils_1.parsePaginationStyleProp)({
70
70
  props: CB_STYLE_PROP_CONTENTSLIST,
71
71
  device: device
72
- }), paginationNormalStyle = _k.normalStyle, paginationHoverStyle = _k.hoverStyle;
72
+ }), paginationNormalStyle = _l.normalStyle, paginationHoverStyle = _l.hoverStyle;
73
73
  // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
74
74
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
75
75
  var cbRef = (0, react_1.useRef)(null);
@@ -119,9 +119,9 @@ function ContentsList(props) {
119
119
  var components = [
120
120
  createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
121
121
  ].filter(function (component) { return component !== undefined; });
122
- var _l = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _l.layoutRef, positionRefs = _l.positionRefs,
122
+ var _m = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _m.layoutRef, positionRefs = _m.positionRefs,
123
123
  // ccbInset,
124
- componentGroups = _l.componentGroups, getPositionStyle = _l.getPositionStyle, getComponentGroupLayout = _l.getComponentGroupLayout;
124
+ componentGroups = _m.componentGroups, getPositionStyle = _m.getPositionStyle, getComponentGroupLayout = _m.getComponentGroupLayout;
125
125
  var ccbInset = {
126
126
  top: '0px',
127
127
  right: '0px',
@@ -140,8 +140,8 @@ function ContentsList(props) {
140
140
  var isMobile = device === 'MOBILE';
141
141
  var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
142
142
  var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
143
- console.log('startIndex:', startIndex);
144
- console.log('endIndex:', endIndex);
143
+ var queryLength = (_e = queryData === null || queryData === void 0 ? void 0 : queryData[CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA].length) !== null && _e !== void 0 ? _e : 0;
144
+ var displayedItemLength = Math.max(0, Math.min(endIndex, queryLength) - startIndex);
145
145
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Object.entries(componentGroups).map(function (_a) {
146
146
  var position = _a[0], groupComponents = _a[1];
147
147
  return ((0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-group", ref: function (el) {
@@ -155,7 +155,7 @@ function ContentsList(props) {
155
155
  }), (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_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_ITEMCOUNTS, "data-number-of-columns": CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS, "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.jsxs)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef }, { 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.jsxs)(S_ContentsListWrapper, __assign({ className: "cb-contentslist-wrapper", ccbInset: ccbInset, contentPropCss: contentPropCss, stylePropCss: isHovered ? hoverStylePropCss : stylePropCss }, { children: [(0, createCompositions_1.createCompositions)({
156
156
  valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
157
157
  queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
158
- limit: CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS,
158
+ limit: displayedItemLength,
159
159
  queryData: queryData,
160
160
  compositions: compositions
161
161
  }).slice(startIndex, endIndex), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle })] }))] })) })) }))] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.673",
3
+ "version": "2.5.675",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",