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

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) {
@@ -132,19 +132,9 @@ function Button(props) {
132
132
  }
133
133
  return props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT;
134
134
  };
135
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle, style: {
136
- paddingLeft: paddingLeft,
137
- paddingRight: paddingRight,
138
- paddingBottom: paddingBottom,
139
- paddingTop: paddingTop,
140
- height: '100%',
141
- display: 'flex',
142
- alignItems: "".concat(btnTextStyle.alignItems),
143
- overflowY: btnTextStyle.overflowY,
144
- scrollbarWidth: btnTextStyle.scrollbarWidth
145
- } }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ onMouseLeave: function (e) {
146
- e.currentTarget.classList.remove('hovered');
147
- }, className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), effectCssProperties), btnColorStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, overflowY: 'unset', scrollbarWidth: 'unset' }), hoverStyle: __assign(__assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: [textPrefix, textValue(), textSuffix] })) }))] }));
135
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: __assign({ height: '100%', display: 'flex', paddingLeft: paddingLeft, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingTop: paddingTop, alignItems: "".concat(btnTextStyle.alignItems), overflowY: btnTextStyle.overflowY, scrollbarWidth: btnTextStyle.scrollbarWidth }, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ onMouseLeave: function (e) {
136
+ e.currentTarget.classList.remove('hovered');
137
+ }, className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), btnColorStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, overflowY: 'unset', scrollbarWidth: 'unset' }), hoverStyle: __assign(__assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: [textPrefix, textValue(), textSuffix] })) })) }))] }));
148
138
  }
149
139
  function getBTNStyles(props, device) {
150
140
  var availableSpecCodes = [
@@ -145,13 +145,7 @@ function Text(props) {
145
145
  return text;
146
146
  };
147
147
  var t = (0, react_i18next_1.useTranslation)('translation').t;
148
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), isEditModeAndHeightFitContent && (0, jsx_runtime_1.jsx)(S_HeightFitContentCover_1.S_HeightFitContentCover, { bottomText: t('str_10106') }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ className: "animation-box", style: {
149
- // height: '100%',
150
- // display: 'flex',
151
- // alignItems: `${textStyle.alignItems}`,
152
- // overflowY: textStyle.overflowY,
153
- // scrollbarWidth: textStyle.scrollbarWidth
154
- }, ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: __assign({ height: '100%', display: 'flex', alignItems: "".concat(textStyle.alignItems), overflowY: textStyle.overflowY, scrollbarWidth: textStyle.scrollbarWidth }, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_Box_1.S_CB_Box, __assign({ onMouseEnter: function (e) {
148
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), isEditModeAndHeightFitContent && (0, jsx_runtime_1.jsx)(S_HeightFitContentCover_1.S_HeightFitContentCover, { bottomText: t('str_10106') }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ className: "animation-box", ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: __assign({ height: '100%', display: 'flex', alignItems: "".concat(textStyle.alignItems), overflowY: textStyle.overflowY, scrollbarWidth: textStyle.scrollbarWidth }, effectCssProperties) }, { children: (0, jsx_runtime_1.jsxs)(S_CB_Box_1.S_CB_Box, __assign({ onMouseEnter: function (e) {
155
149
  e.currentTarget.classList.add('hovered');
156
150
  }, onMouseLeave: function (e) {
157
151
  e.currentTarget.classList.remove('hovered');
@@ -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.430",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",