pds-dev-kit-web-test 2.5.432 → 2.5.434

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.
@@ -36,11 +36,13 @@ function ContentsList(props) {
36
36
  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;
37
37
  var _f = (0, react_1.useState)(false), isHovered = _f[0], setIsHovered = _f[1];
38
38
  var _g = (0, react_1.useState)(1), currentPage = _g[0], setCurrentPage = _g[1];
39
+ // Ensure displayCounts is a valid positive integer
40
+ var displayCounts = CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS !== null && CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS !== void 0 ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS : CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
39
41
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
40
42
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
41
43
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
42
44
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
43
- : compositions.length - 1) / CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
45
+ : compositions.length - 1) / displayCounts);
44
46
  var _h = (0, util_1.parseProperties)(props, device), style = _h.style, hoverStyle = _h.hoverStyle, layout = _h.layout, effect = _h.effect;
45
47
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
46
48
  props: CB_CONTENT_PROP_CONTENTSLIST
@@ -71,9 +73,8 @@ function ContentsList(props) {
71
73
  var handlePageClick = function (page) {
72
74
  setCurrentPage(page);
73
75
  };
74
- var startIndex = (currentPage - 1) * CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS;
75
- var endIndex = startIndex + CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS;
76
- console.log(startIndex, endIndex);
76
+ var startIndex = typeof currentPage === 'number' && !isNaN(currentPage) ? (currentPage - 1) * displayCounts : 0;
77
+ var endIndex = startIndex + displayCounts;
77
78
  // list의 minheight / minwidth를 계산
78
79
  var numberOfItems = CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
79
80
  var numberOfColumns = CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.432",
3
+ "version": "2.5.434",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",