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

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,17 @@ 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 = typeof CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS === 'number' &&
41
+ !isNaN(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS) &&
42
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS > 0
43
+ ? CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS
44
+ : 1;
39
45
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
40
46
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
41
47
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
42
48
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
43
- : compositions.length - 1) / CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
49
+ : compositions.length - 1) / displayCounts);
44
50
  var _h = (0, util_1.parseProperties)(props, device), style = _h.style, hoverStyle = _h.hoverStyle, layout = _h.layout, effect = _h.effect;
45
51
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
46
52
  props: CB_CONTENT_PROP_CONTENTSLIST
@@ -71,9 +77,8 @@ function ContentsList(props) {
71
77
  var handlePageClick = function (page) {
72
78
  setCurrentPage(page);
73
79
  };
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);
80
+ var startIndex = typeof currentPage === 'number' && !isNaN(currentPage) ? (currentPage - 1) * displayCounts : 0;
81
+ var endIndex = startIndex + displayCounts;
77
82
  // list의 minheight / minwidth를 계산
78
83
  var numberOfItems = CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
79
84
  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.433",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",