pds-dev-kit-web-test 2.7.163 → 2.7.165

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.
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MOCK_SECTIONS = void 0;
4
- var mock_contentsCarousel_1 = require("./mock_contentsCarousel");
5
- require("./mock_contentsList");
6
- var mock_slideBanner_1 = require("./mock_slideBanner");
4
+ require("./mock_contentsCarousel");
5
+ var mock_contentsList_1 = require("./mock_contentsList");
6
+ require("./mock_slideBanner");
7
7
  exports.MOCK_SECTIONS = [
8
8
  {
9
9
  administrativeTitle: 'Daily Pages',
@@ -11,9 +11,9 @@ exports.MOCK_SECTIONS = [
11
11
  componentBlocks: [
12
12
  // MOCK_VIDEO_CB,
13
13
  // MOCK_VIDEO_CB_2,
14
- mock_contentsCarousel_1.SAMPLE_CONTENTSCAROUSEL_CB,
15
- mock_slideBanner_1.SAMPLE_SLIDEBANNER_CB
16
- // SAMPLE_LIST_CB
14
+ // SAMPLE_CONTENTSCAROUSEL_CB,
15
+ // SAMPLE_SLIDEBANNER_CB,
16
+ mock_contentsList_1.SAMPLE_LIST_CB
17
17
  // ...MOCK_COMPONENT_BLOCKS
18
18
  ],
19
19
  display: true,
@@ -63,12 +63,13 @@ function ContentsList(props) {
63
63
  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, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS = CB_CONTENT_PROP_CONTENTSLIST.CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS;
64
64
  var _h = (0, react_1.useState)(false), isHovered = _h[0], setIsHovered = _h[1];
65
65
  var _j = (0, react_1.useState)(1), currentPage = _j[0], setCurrentPage = _j[1];
66
- console.log('list display counts', CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
67
66
  var parsedQueryPath = removeFirstSegment(CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA);
68
67
  var queryDataValue = queryData === null || queryData === void 0 ? void 0 : queryData[parsedQueryPath];
68
+ 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_MANUALITEMS.length;
69
69
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
70
70
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
71
- : compositions.length - 1) / CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
71
+ : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) /
72
+ CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS);
72
73
  var _k = (0, util_1.parseProperties)(props, device), style = _k.style, hoverStyle = _k.hoverStyle, layout = _k.layout, effect = _k.effect, overlayStyle = _k.overlayStyle;
73
74
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
74
75
  props: CB_CONTENT_PROP_CONTENTSLIST
@@ -99,10 +100,9 @@ function ContentsList(props) {
99
100
  var handlePageClick = function (page) {
100
101
  setCurrentPage(page);
101
102
  };
102
- var displayCounts = CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length;
103
103
  // CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS ?? CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS;
104
104
  var startIndex = (currentPage - 1) * displayCounts;
105
- var endIndex = startIndex + displayCounts;
105
+ var endIndex = startIndex + (displayCounts - 1);
106
106
  // list의 minheight / minwidth를 계산
107
107
  var numberOfColumns = CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS;
108
108
  // NOTE: edit환경에서 hover가 작동하지 않아서 제외함 필요시 추가..
@@ -178,10 +178,10 @@ function ContentsList(props) {
178
178
  style: { gridTemplateRows: "repeat(".concat(numberOfRows, ", 1fr)") } }, { children: (0, createCompositions_1.createCompositions)({
179
179
  valueType: CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE,
180
180
  queryPath: CB_CONTENT_PROP_CONTENTSLIST_SPEC_CONNECTDATA,
181
- limit: displayedItemLength,
181
+ limit: displayCounts,
182
182
  queryData: queryData,
183
183
  compositions: orderedCompositions
184
- }).slice(startIndex, endIndex) })) }))] })) }))] }));
184
+ }).slice(startIndex, endIndex + 1) })) }))] })) }))] }));
185
185
  }
186
186
  function getIsBgMedia(isMobile, specs) {
187
187
  if (!specs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.163",
3
+ "version": "2.7.165",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",