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

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.
@@ -225,7 +225,7 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
225
225
  // fontSize: `${baseFontSize}px`
226
226
  } }, { children: (_e = props.componentBlocks) === null || _e === void 0 ? void 0 : _e.map(function (cb, index) {
227
227
  var _a;
228
- return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItemForCCB_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0 }) }, cb.id));
228
+ return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItemForCCB_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0, maxCols: cols }) }, cb.id));
229
229
  }) })) })) })) })) })) }));
230
230
  });
231
231
  var MOCK_BORDER = {
@@ -285,7 +285,7 @@ var MOCK_SHADOW = {
285
285
  'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null,
286
286
  'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null
287
287
  };
288
- var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n /* grid-auto-rows: minmax(", ", auto); */\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n /* grid-auto-rows: minmax(", ", auto); */\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
288
+ var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(\n ", ",\n minmax(", ", auto)\n );\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(props.rowHeight, "px"); });
289
289
  var S_COMPOSITIONWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
290
290
  exports.default = react_1.default.memo(Composition);
291
291
  function getDefensiveFontSize(device, width) {
@@ -7,8 +7,8 @@ type Props = {
7
7
  device: Device;
8
8
  rowHeight: number;
9
9
  zIndex: number;
10
- showPinned?: boolean;
10
+ maxCols: number;
11
11
  style?: React.CSSProperties;
12
12
  };
13
- declare function FlexGridItem({ cb, index, device, rowHeight, zIndex, showPinned, style }: Props): JSX.Element;
13
+ declare function FlexGridItem({ cb, index, device, rowHeight, zIndex, style, maxCols }: Props): JSX.Element;
14
14
  export default FlexGridItem;
@@ -19,20 +19,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  var jsx_runtime_1 = require("react/jsx-runtime");
22
- var react_1 = require("react");
22
+ require("react");
23
23
  var styled_components_1 = __importDefault(require("styled-components"));
24
24
  var ComponentBlockMatcher_1 = __importDefault(require("./ComponentBlockMatcher"));
25
25
  var gap = 10;
26
26
  function FlexGridItem(_a) {
27
- var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight, zIndex = _a.zIndex, showPinned = _a.showPinned, style = _a.style;
27
+ var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight, zIndex = _a.zIndex, style = _a.style, maxCols = _a.maxCols;
28
28
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
29
  var defaultHeight = getMaxHeight(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, rowHeight);
30
- var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device);
31
- var _b = (0, react_1.useState)(false), isPinned = _b[0], setIsPinned = _b[1];
32
- return ((0, jsx_runtime_1.jsxs)(GridItem, __assign({ style: __assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative', maxHeight: isPinned ? defaultHeight : 'none' }, style) }, { children: [showPinned && ((0, jsx_runtime_1.jsx)(S_Pinned, { children: isPinned ? ((0, jsx_runtime_1.jsx)("button", __assign({ type: "button", onClick: function () { return setIsPinned(false); } }, { children: "H\uACE0\uC815\uB428 \uD83D\uDCCC" }))) : ((0, jsx_runtime_1.jsx)("button", __assign({ type: "button", onClick: function () { return setIsPinned(true); } }, { children: "H\uB298\uC5B4\uB0A8 \uD83E\uDEB1" }))) })), (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index })] })));
30
+ var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, maxCols);
31
+ return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: __assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative', maxHeight: 'none' }, style) }, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcher_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index }) })));
33
32
  }
34
- var S_Pinned = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 9999999;\n"], ["\n pointer-events: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 9999999;\n"])));
35
- var GridItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: auto;\n word-break: break-word;\n"], ["\n height: auto;\n word-break: break-word;\n"])));
33
+ var GridItem = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n word-break: break-word;\n"], ["\n height: auto;\n word-break: break-word;\n"])));
36
34
  function getMaxHeight(props, device, rowHeight) {
37
35
  if (device === 'DESKTOP') {
38
36
  var CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
@@ -44,7 +42,7 @@ function getMaxHeight(props, device, rowHeight) {
44
42
  var height = rowsMobile * rowHeight + (rowsMobile - 1) * gap;
45
43
  return height;
46
44
  }
47
- function getGridAreaFromCB(props, device) {
45
+ function getGridAreaFromCB(props, device, maxCols) {
48
46
  var CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX, CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY, cols = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS, rows = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
49
47
  if (device === 'DESKTOP') {
50
48
  var colStart_1 = CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX + 1;
@@ -52,7 +50,7 @@ function getGridAreaFromCB(props, device) {
52
50
  var rowEnd_1 = rows + rowStart_1;
53
51
  var colEnd_1 = cols + colStart_1;
54
52
  // <grid-row-start> / <grid-column-start> / <grid-row-end> / <grid-column-end>;
55
- return "".concat(rowStart_1, " / ").concat(colStart_1, " / ").concat(rowEnd_1, " / ").concat(colEnd_1);
53
+ return "".concat(rowStart_1, " / ").concat(colStart_1, " / ").concat(rowEnd_1, " / ").concat(Math.min(colEnd_1, maxCols));
56
54
  }
57
55
  var startXMobile = props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE'];
58
56
  var startYMobile = props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'];
@@ -62,7 +60,7 @@ function getGridAreaFromCB(props, device) {
62
60
  var rowStart = startYMobile + 1;
63
61
  var rowEnd = rowsMobile + rowStart;
64
62
  var colEnd = colsMobile + colStart;
65
- return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(colEnd);
63
+ return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(Math.min(colEnd, maxCols));
66
64
  }
67
65
  exports.default = FlexGridItem;
68
- var templateObject_1, templateObject_2;
66
+ var templateObject_1;
@@ -3261,7 +3261,7 @@ exports.SAMPLE_LIST_CB = {
3261
3261
  },
3262
3262
  CB_PLACEMENT_PROP_PLACEMENT: {
3263
3263
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 2,
3264
- 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
3264
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 12,
3265
3265
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 2,
3266
3266
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 5,
3267
3267
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 0,
@@ -79,9 +79,6 @@ function ContentsList(props) {
79
79
  var totalPage = Math.ceil((CB_CONTENT_PROP_CONTENTSLIST_SPEC_VALUETYPE === 'DATA' && queryDataValue
80
80
  ? queryDataValue === null || queryDataValue === void 0 ? void 0 : queryDataValue.length
81
81
  : CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length) / displayCounts);
82
- console.log('columns', numberOfColumns);
83
- console.log('displayCounts', displayCounts);
84
- console.log('totalPage', totalPage);
85
82
  var CB_STYLE_PROP_CONTENTSLIST = __assign(__assign({}, CB_STYLE_PROP_CONTENTSLISTDESIGN), CB_STYLE_PROP_CONTENTSLISTPAGINATION);
86
83
  var _k = (0, util_1.parseProperties)(props, device), style = _k.style, hoverStyle = _k.hoverStyle, layout = _k.layout, effect = _k.effect, overlayStyle = _k.overlayStyle;
87
84
  var contentPropCss = (0, contentsListUtils_1.parseGridContentProp)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.253",
3
+ "version": "2.7.254",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",