pds-dev-kit-web-test 2.7.428 → 2.7.429

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.
@@ -31,12 +31,22 @@ function FlexGridItem(_a) {
31
31
  var isCBHeightVariable = device === 'DESKTOP' ? block.isHeightVariableDesktop : block.isHeightVariableMobile;
32
32
  var isHeightVariable = isParentGroupHeightVariable || isCBHeightVariable;
33
33
  var getHeightFitContent = function () {
34
- var _a, _b, _c, _d;
34
+ var _a, _b, _c, _d, _e, _f, _g;
35
35
  if ('CB_STYLE_PROP_TEXT' in cb.jsonProperties.data) {
36
- return (_b = (_a = cb.jsonProperties.data.CB_STYLE_PROP_TEXT) === null || _a === void 0 ? void 0 : _a.CB_STYLE_PROP_TEXT_SPEC_FITCONTENT) !== null && _b !== void 0 ? _b : false;
36
+ var desktopValue = (_b = (_a = cb.jsonProperties.data.CB_STYLE_PROP_TEXT) === null || _a === void 0 ? void 0 : _a.CB_STYLE_PROP_TEXT_SPEC_FITCONTENT) !== null && _b !== void 0 ? _b : true;
37
+ if (device === 'DESKTOP') {
38
+ return desktopValue;
39
+ }
40
+ if (device === 'MOBILE') {
41
+ return ((_d = (_c = cb.jsonProperties.data.CB_STYLE_PROP_TEXT) === null || _c === void 0 ? void 0 : _c['CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE']) !== null && _d !== void 0 ? _d : desktopValue);
42
+ }
37
43
  }
38
44
  if ('CB_STYLE_PROP_CONTENTSLISTDESIGN' in cb.jsonProperties.data) {
39
- return ((_d = (_c = cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN) === null || _c === void 0 ? void 0 : _c.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT) !== null && _d !== void 0 ? _d : false);
45
+ var desktopValue = (_f = (_e = cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN) === null || _e === void 0 ? void 0 : _e.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT) !== null && _f !== void 0 ? _f : true;
46
+ if (device === 'DESKTOP') {
47
+ return desktopValue;
48
+ }
49
+ return ((_g = cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN['CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT:MOBILE']) !== null && _g !== void 0 ? _g : desktopValue);
40
50
  }
41
51
  return false;
42
52
  };
@@ -64,7 +74,7 @@ function FlexGridItem(_a) {
64
74
  maxHeight: defaultHeight
65
75
  };
66
76
  };
67
- return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: __assign(__assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative' }, style), getHeightStyles()), className: "flex-grid-item", "data-show-pinned": showPinned, "data-height-fit-content": "true" }, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcherWithCCB_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index }) })));
77
+ return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ style: __assign(__assign({ zIndex: zIndex, gridArea: gridArea, position: 'relative' }, style), getHeightStyles()), className: "flex-grid-item", "data-show-pinned": showPinned }, { children: (0, jsx_runtime_1.jsx)(ComponentBlockMatcherWithCCB_1.default, { rowHeight: rowHeight, cbProps: cb, device: device, index: index }) })));
68
78
  }
69
79
  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"])));
70
80
  function getMaxHeight(props, device, rowHeight) {
@@ -12,17 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.parsePlacement = exports.getHeightFitContent = void 0;
13
13
  var types_1 = require("../types");
14
14
  function getHeightFitContent(cb) {
15
+ var _a, _b, _c, _d;
15
16
  if (cb.componentBlockCode === types_1.CB_ALL_CODES.CB_TEXT) {
16
- var desktop = cb.jsonProperties.data.CB_STYLE_PROP_TEXT.CB_STYLE_PROP_TEXT_SPEC_FITCONTENT;
17
- var mobile = !!(cb.jsonProperties.data.CB_STYLE_PROP_TEXT['CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE']);
17
+ var desktop = (_a = cb.jsonProperties.data.CB_STYLE_PROP_TEXT.CB_STYLE_PROP_TEXT_SPEC_FITCONTENT) !== null && _a !== void 0 ? _a : true;
18
+ var mobile = (_b = cb.jsonProperties.data.CB_STYLE_PROP_TEXT['CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE']) !== null && _b !== void 0 ? _b : desktop;
18
19
  return {
19
20
  desktop: desktop,
20
21
  mobile: mobile
21
22
  };
22
23
  }
23
24
  if (cb.componentBlockCode === types_1.CB_ALL_CODES.CB_LIST) {
24
- var desktop = !!(cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT);
25
- var mobile = !!(cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN['CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT:MOBILE']);
25
+ var desktop = (_c = cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN.CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT) !== null && _c !== void 0 ? _c : true;
26
+ var mobile = (_d = cb.jsonProperties.data.CB_STYLE_PROP_CONTENTSLISTDESIGN['CB_STYLE_PROP_CONTENTSLISTDESIGN_SPEC_ITEMHEIGHTFITCONTENT:MOBILE']) !== null && _d !== void 0 ? _d : desktop;
26
27
  return {
27
28
  desktop: desktop,
28
29
  mobile: mobile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.428",
3
+ "version": "2.7.429",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",