pds-dev-kit-web-test 2.3.3 → 2.3.4

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.
@@ -26,9 +26,8 @@ var types_1 = require("../CustomSection/types");
26
26
  var gap = 10;
27
27
  function FlexGridItem(_a) {
28
28
  var cb = _a.cb, index = _a.index, device = _a.device, rowHeight = _a.rowHeight;
29
- var CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS = cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
29
+ var defaultHeight = getMaxHeight(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, rowHeight);
30
30
  var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device);
31
- var defaultHeight = (CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS * rowHeight) + ((CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS - 1) * gap);
32
31
  return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: {
33
32
  gridArea: gridArea,
34
33
  maxHeight: cb.componentBlockCode !== types_1.CB_ALL_CODES.CB_TEXT ? defaultHeight : undefined
@@ -36,6 +35,16 @@ function FlexGridItem(_a) {
36
35
  }
37
36
  var S_CB = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid red;\n /* max-height: fit-content; */\n min-height: ", ";\n"], ["\n border: 1px solid red;\n /* max-height: fit-content; */\n min-height: ", ";\n"])), function (props) { return "".concat(props.defaultHeight, "px"); });
38
37
  var GridItem = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: auto;\n max-height: fit-content;\n word-break: break-word;\n"], ["\n height: auto;\n max-height: fit-content;\n word-break: break-word;\n"])));
38
+ function getMaxHeight(props, device, rowHeight) {
39
+ if (device === 'DESKTOP') {
40
+ var CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS = props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS;
41
+ var height_1 = (CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS * rowHeight) + ((CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS - 1) * gap);
42
+ return height_1;
43
+ }
44
+ var rowsMobile = props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'];
45
+ var height = (rowsMobile * rowHeight) + ((rowsMobile - 1) * gap);
46
+ return height;
47
+ }
39
48
  function getGridAreaFromCB(props, device) {
40
49
  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;
41
50
  if (device === 'DESKTOP') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.3.03",
3
+ "version": "2.3.04",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",