pds-dev-kit-web-test 0.2.19 → 0.2.21

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.
Files changed (19) hide show
  1. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +1 -1
  2. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +2 -4
  3. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +1 -2
  4. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +3 -2
  5. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +3 -2
  6. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +3 -2
  7. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +3 -2
  8. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +3 -2
  9. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +3 -2
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +3 -2
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_AnimationObserverBox.d.ts +5 -0
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_AnimationObserverBox.js +16 -0
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +1 -1
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +14 -7
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +6 -4
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +4 -0
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +17 -3
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +1 -1
  19. package/package.json +1 -1
@@ -35,7 +35,7 @@ function CustomSectionBackground(_a) {
35
35
  var isOverlay = getIsOverlay(isMobile, CB_STYLE_PROP_BGOVERLAY);
36
36
  var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
37
37
  var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
38
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isOverlay && CB_STYLE_PROP_BGOVERLAY && ((0, jsx_runtime_1.jsx)(S_CustomBackgroundOverlay, { className: "Overlay", style: __assign({}, overlayStyle) }, void 0)), (0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ className: "CustomSection", ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background, overflow: mediaType === 'IMAGE' ? 'scroll' : 'hidden' }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: id, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef }, void 0)) }), void 0)] }, void 0));
38
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isOverlay && CB_STYLE_PROP_BGOVERLAY && ((0, jsx_runtime_1.jsx)(S_CustomBackgroundOverlay, { className: "Overlay", style: __assign({}, overlayStyle) }, void 0)), (0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ className: "CustomSection", ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: id, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef }, void 0)) }), void 0)] }, void 0));
39
39
  }
40
40
  function getIsOverlay(isMobile, specs) {
41
41
  if (!specs) {
@@ -42,7 +42,7 @@ var YouTubeIframe_1 = require("../../YouTubeIframe");
42
42
  var util_1 = require("../util");
43
43
  function CustomSectionBackgroundMedia(_a) {
44
44
  var specs = _a.specs, playerId = _a.playerId, mediaType = _a.mediaType, componentStyle = _a.componentStyle, device = _a.device, backgroundRef = _a.backgroundRef;
45
- var _b = (0, util_1.parseSectionBackgroundMediaData)(specs, device), CB_STYLE_PROP_BGMEDIA_SPEC_YSRC = _b.CB_STYLE_PROP_BGMEDIA_SPEC_YSRC, CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY = _b.CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY, CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME, CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME, CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL = _b.CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR = _b.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR;
45
+ var _b = (0, util_1.parseSectionBackgroundMediaData)(specs, device), CB_STYLE_PROP_BGMEDIA_SPEC_YSRC = _b.CB_STYLE_PROP_BGMEDIA_SPEC_YSRC, CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY = _b.CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY, CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME, CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR = _b.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR;
46
46
  var _c = (0, react_1.useState)({ width: 0, height: 0 }), youtubeSize = _c[0], setYoutubeSize = _c[1];
47
47
  var getResponsiveYoutubeSize = (0, react_1.useCallback)(function () {
48
48
  var backgroundWrapper = backgroundRef.current;
@@ -88,9 +88,7 @@ function CustomSectionBackgroundMedia(_a) {
88
88
  }
89
89
  switch (mediaType) {
90
90
  case 'IMAGE':
91
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR && ((0, jsx_runtime_1.jsx)(S_Image, __assign({ src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), style: {
92
- overflow: CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL ? 'auto' : 'hidden'
93
- }, normalStyle: componentStyle }, { children: (0, jsx_runtime_1.jsx)("img", { src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0)) }, void 0));
91
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR && ((0, jsx_runtime_1.jsx)(S_Image, __assign({ src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), normalStyle: componentStyle }, { children: (0, jsx_runtime_1.jsx)("img", { src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0)) }, void 0));
94
92
  case 'YOUTUBE':
95
93
  return ((0, jsx_runtime_1.jsx)(S_YoutubeContainer, __assign({}, youtubeSize, { children: (0, jsx_runtime_1.jsx)(YouTubeIframe_1.YouTubeIframe, { id: playerId, src: String(CB_STYLE_PROP_BGMEDIA_SPEC_YSRC), loopMode: CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY ? 'use' : 'none', startSeconds: Number(CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME), endSeconds: Number(CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME) }, void 0) }), void 0));
96
94
  case 'NONE':
@@ -181,8 +181,7 @@ function CustomSection(props) {
181
181
  minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX
182
182
  }, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: (componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.length) ? (componentBlocks.map(function (each) { return ((0, jsx_runtime_1.jsx)("div", __assign({ className: selectedCB === each.id ? 'react-grid-item-selected' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ style: {
183
183
  width: '100%',
184
- height: '100%',
185
- overflow: 'hidden'
184
+ height: '100%'
186
185
  }, onClick: function (e) {
187
186
  e.stopPropagation();
188
187
  onClickCB(each.id);
@@ -22,6 +22,7 @@ var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection
22
22
  var newUtils_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils");
23
23
  var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
24
24
  var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
25
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
25
26
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
26
27
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
27
28
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
@@ -41,10 +42,10 @@ function Button(props) {
41
42
  propsStyle.visibility = 'visible';
42
43
  }
43
44
  var cbRef = (0, react_1.useRef)(null);
44
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
45
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
45
46
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
46
47
  var effectCssProperties = isVisible ? effect : {};
47
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), effectCssProperties), btnColorStyle), { cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK, ref: cbRef }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0)] }, void 0));
48
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), effectCssProperties), btnColorStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0) }), void 0)] }, void 0));
48
49
  }
49
50
  function getBTNStyles(props, device) {
50
51
  var availableSpecCodes = [
@@ -40,6 +40,7 @@ var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
40
40
  var styled_components_1 = __importStar(require("styled-components"));
41
41
  var hooks_1 = require("../../../../hooks");
42
42
  var util_1 = require("../../../../util");
43
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
43
44
  var S_CB_Box_1 = require("../components/S_CB_Box");
44
45
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
45
46
  function Divider(props) {
@@ -50,10 +51,10 @@ function Divider(props) {
50
51
  propsStyle.visibility = 'visible';
51
52
  }
52
53
  var cbRef = (0, react_1.useRef)(null);
53
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
54
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
54
55
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
55
56
  var effectCssProperties = isVisible ? effect : {};
56
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: layoutStyle, hoverStyle: {}, ref: cbRef }, { children: (0, jsx_runtime_1.jsx)(S_DIVIDER, { className: "cb-divider", normalStyle: __assign(__assign({}, propsStyle), effectCssProperties), hoverStyle: __assign({}, propsHoverStyle) }, void 0) }), void 0)] }, void 0));
57
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: layoutStyle, hoverStyle: {} }, { children: (0, jsx_runtime_1.jsx)(S_DIVIDER, { className: "cb-divider", normalStyle: __assign(__assign({}, propsStyle), effectCssProperties), hoverStyle: __assign({}, propsHoverStyle) }, void 0) }), void 0) }), void 0)] }, void 0));
57
58
  }
58
59
  var S_DIVIDER = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"], ["\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"])), function (_a) {
59
60
  var normalStyle = _a.normalStyle;
@@ -43,6 +43,7 @@ var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
43
43
  var styled_components_1 = __importStar(require("styled-components"));
44
44
  var hooks_1 = require("../../../../hooks");
45
45
  var util_1 = require("../../../../util");
46
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
46
47
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
47
48
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
48
49
  function Image(props) {
@@ -55,10 +56,10 @@ function Image(props) {
55
56
  }), onClickCLINK = _b.onClickCLINK, CLINKCursor = _b.CLINKCursor;
56
57
  var _c = (0, util_1.parseProperties)(props, device), style = _c.style, hoverStyle = _c.hoverStyle, layout = _c.layout, effect = _c.effect;
57
58
  var cbRef = (0, react_1.useRef)(null);
58
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
59
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
59
60
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
60
61
  var effectCssProperties = isVisible ? effect : {};
61
- return ((0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign({}, layout), effectCssProperties), { cursor: CLINKCursor }), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, ref: cbRef, onClick: onClickCLINK }, { children: (0, jsx_runtime_1.jsx)(S_Image, __assign({ src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, normalStyle: style, hoverStyle: hoverStyle }, { children: (0, jsx_runtime_1.jsx)("img", { src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0) }), void 0));
62
+ return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), effectCssProperties), style), { cursor: CLINKCursor }), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: (0, jsx_runtime_1.jsx)(S_Image, __assign({ src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, normalStyle: style, hoverStyle: hoverStyle }, { children: (0, jsx_runtime_1.jsx)("img", { src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0) }), void 0) }), void 0));
62
63
  }
63
64
  var S_Image = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n\n & img {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"], ["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n\n & img {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"])), function (_a) {
64
65
  var src = _a.src;
@@ -27,6 +27,7 @@ var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection
27
27
  var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
28
28
  var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
29
29
  var styled_components_1 = __importDefault(require("styled-components"));
30
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
30
31
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
31
32
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
32
33
  function RichText(props) {
@@ -39,10 +40,10 @@ function RichText(props) {
39
40
  propsStyle.visibility = 'visible';
40
41
  }
41
42
  var cbRef = (0, react_1.useRef)(null);
42
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
43
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
43
44
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
44
45
  var effectCssProperties = isVisible ? effect : {};
45
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, ref: cbRef }, { children: (0, jsx_runtime_1.jsx)(S_RichTextWrapper, { children: (0, jsx_runtime_1.jsx)(RichText_1.RichText, { text: props.CB_CONTENT_PROP_TEXTEDIT.CB_CONTENT_PROP_TEXTEDIT_SPEC_EDITOR }, void 0) }, void 0) }), void 0)] }, void 0));
46
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: (0, jsx_runtime_1.jsx)(S_RichTextWrapper, { children: (0, jsx_runtime_1.jsx)(RichText_1.RichText, { text: props.CB_CONTENT_PROP_TEXTEDIT.CB_CONTENT_PROP_TEXTEDIT_SPEC_EDITOR }, void 0) }, void 0) }), void 0) }), void 0)] }, void 0));
46
47
  }
47
48
  function getBGColorStyles(props, device) {
48
49
  var availableSpecCodes = [
@@ -21,6 +21,7 @@ var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
21
21
  var hooks_1 = require("../../../../hooks");
22
22
  var textUtil_1 = require("../../../../newUtils/textUtil");
23
23
  var util_1 = require("../../../../util");
24
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
24
25
  var S_CB_Box_1 = require("../components/S_CB_Box");
25
26
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
26
27
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
@@ -39,10 +40,10 @@ function Text(props) {
39
40
  propsStyle.visibility = 'visible';
40
41
  }
41
42
  var cbRef = (0, react_1.useRef)(null);
42
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
43
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
43
44
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
44
45
  var effectCssProperties = isVisible ? effect : {};
45
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre', wordBreak: 'keep-all', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre', wordBreak: 'keep-all' }), onClick: onClickCLINK, ref: cbRef }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0)] }, void 0));
46
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0) }), void 0)] }, void 0));
46
47
  }
47
48
  function getTextStyles(props, device) {
48
49
  var availableSpecCodes = [
@@ -17,6 +17,7 @@ var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
17
17
  var ComponentBlocks_1 = require("../../../../../../../DynamicLayout/components/ComponentBlocks");
18
18
  var hooks_1 = require("../../../../hooks");
19
19
  var util_1 = require("../../../../util");
20
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
20
21
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
21
22
  function Twitter(props) {
22
23
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -35,10 +36,10 @@ function Twitter(props) {
35
36
  delete layout.justifyContent;
36
37
  }
37
38
  var cbRef = (0, react_1.useRef)(null);
38
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
39
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
39
40
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
40
41
  var effectCssProperties = isVisible ? effect : {};
41
42
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
42
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), { overflowY: 'auto' }), editModeStyle), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, ref: cbRef }, { children: (0, jsx_runtime_1.jsx)(ComponentBlocks_1.TwitterTimeline, { userId: userId, theme: theme }, void 0) }), void 0) }, void 0));
43
+ return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), { overflowY: 'auto' }), editModeStyle), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: (0, jsx_runtime_1.jsx)(ComponentBlocks_1.TwitterTimeline, { userId: userId, theme: theme }, void 0) }), void 0) }), void 0));
43
44
  }
44
45
  exports.default = Twitter;
@@ -25,6 +25,7 @@ var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection
25
25
  var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
26
26
  var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
27
27
  var styled_components_1 = __importDefault(require("styled-components"));
28
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
28
29
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
29
30
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
30
31
  var parseYoutubeContentProp_1 = __importDefault(require("./parseYoutubeContentProp"));
@@ -40,10 +41,10 @@ function Youtube(props) {
40
41
  propsStyle.visibility = 'visible';
41
42
  }
42
43
  var cbRef = (0, react_1.useRef)(null);
43
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
44
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
44
45
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
45
46
  var effectCssProperties = isVisible ? effect : {};
46
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, ref: cbRef }, { children: isEditMode ? ((0, jsx_runtime_1.jsxs)(S_ThumbnailBox, { children: [(0, jsx_runtime_1.jsx)(YoutubeButton, {}, void 0), (0, jsx_runtime_1.jsx)(S_Thumbnail, { src: thumbnailSrc }, void 0)] }, void 0)) : ((0, jsx_runtime_1.jsx)(S_Iframe, { title: id, src: youtubeSrc, allow: "accelerometer; encrypted-media; gyroscope; picture-in-picture" }, void 0)) }), void 0)] }, void 0));
47
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: cbRef, isVisible: isVisible }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: isEditMode ? ((0, jsx_runtime_1.jsxs)(S_ThumbnailBox, { children: [(0, jsx_runtime_1.jsx)(YoutubeButton, {}, void 0), (0, jsx_runtime_1.jsx)(S_Thumbnail, { src: thumbnailSrc }, void 0)] }, void 0)) : ((0, jsx_runtime_1.jsx)(S_Iframe, { title: id, src: youtubeSrc, allow: "accelerometer; encrypted-media; gyroscope; picture-in-picture" }, void 0)) }), void 0) }), void 0)] }, void 0));
47
48
  }
48
49
  function getBGColorStyles(props, device) {
49
50
  var availableSpecCodes = [
@@ -0,0 +1,5 @@
1
+ declare type Props = {
2
+ isVisible: boolean;
3
+ };
4
+ export declare const S_CB_AnimationObserverBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Props, never>;
5
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.S_CB_AnimationObserverBox = void 0;
11
+ var styled_components_1 = __importDefault(require("styled-components"));
12
+ exports.S_CB_AnimationObserverBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n opacity: ", ";\n width: 100%;\n"], ["\n height: 100%;\n opacity: ", ";\n width: 100%;\n"])), function (_a) {
13
+ var isVisible = _a.isVisible;
14
+ return (isVisible ? 1 : 0);
15
+ });
16
+ var templateObject_1;
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.S_CB_Box = void 0;
38
38
  var styled_components_1 = __importStar(require("styled-components"));
39
- exports.S_CB_Box = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"], ["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"])), function (_a) {
39
+ exports.S_CB_Box = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"], ["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"])), function (_a) {
40
40
  var normalStyle = _a.normalStyle;
41
41
  return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, normalStyle), { boxShadow: '' }));
42
42
  }, function (_a) {
@@ -33,10 +33,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  __setModuleDefault(result, mod);
34
34
  return result;
35
35
  };
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
36
39
  Object.defineProperty(exports, "__esModule", { value: true });
37
40
  exports.S_CB_BoxWithShadow = void 0;
41
+ var isNullOrUndefined_1 = __importDefault(require("../../../../../../../DynamicLayout/sections/CustomSection/util/isNullOrUndefined"));
38
42
  var styled_components_1 = __importStar(require("styled-components"));
39
- exports.S_CB_BoxWithShadow = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover {\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n }\n"], ["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover {\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n }\n"])), function (_a) {
43
+ exports.S_CB_BoxWithShadow = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover {\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n }\n"], ["\n /*\n Introduced in IE 10.\n See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/\n */\n\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:hover {\n ", ";\n\n &:before {\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n border-top-left-radius: ", "px;\n border-top-right-radius: ", "px;\n box-shadow: ", ";\n content: '';\n height: 100%;\n left: 0;\n opacity: ", ";\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 100%;\n }\n }\n"])), function (_a) {
40
44
  var normalStyle = _a.normalStyle;
41
45
  return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, normalStyle), { boxShadow: '' }));
42
46
  }, function (_a) {
@@ -60,7 +64,9 @@ exports.S_CB_BoxWithShadow = styled_components_1.default.div(templateObject_3 ||
60
64
  case 'DESKTOP':
61
65
  return Number(cbStylePropsShadowSpecs.CB_STYLE_PROP_SHADOW_SPEC_OPACITY) / 100;
62
66
  case 'MOBILE':
63
- return Number(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE']) / 100;
67
+ return (0, isNullOrUndefined_1.default)(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE'])
68
+ ? Number(cbStylePropsShadowSpecs.CB_STYLE_PROP_SHADOW_SPEC_OPACITY) / 100
69
+ : Number(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE']) / 100;
64
70
  }
65
71
  }, function (_a) {
66
72
  var hoverStyle = _a.hoverStyle;
@@ -84,12 +90,13 @@ exports.S_CB_BoxWithShadow = styled_components_1.default.div(templateObject_3 ||
84
90
  var cbStylePropsShadowSpecs = _a.cbStylePropsShadowSpecs, device = _a.device;
85
91
  switch (device) {
86
92
  case 'DESKTOP':
87
- return cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER']
88
- ? cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER'] / 100
89
- : cbStylePropsShadowSpecs.CB_STYLE_PROP_SHADOW_SPEC_OPACITY;
93
+ return (0, isNullOrUndefined_1.default)(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER'])
94
+ ? Number(cbStylePropsShadowSpecs.CB_STYLE_PROP_SHADOW_SPEC_OPACITY) / 100
95
+ : Number(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER']) / 100;
90
96
  case 'MOBILE':
91
- return (Number(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE:HOVER']) /
92
- 100);
97
+ return (0, isNullOrUndefined_1.default)(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE'])
98
+ ? Number(cbStylePropsShadowSpecs.CB_STYLE_PROP_SHADOW_SPEC_OPACITY) / 100
99
+ : Number(cbStylePropsShadowSpecs['CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE']) / 100;
93
100
  }
94
101
  });
95
102
  var templateObject_1, templateObject_2, templateObject_3;
@@ -49,8 +49,10 @@ function parseStyleTextToCSSProp(_a) {
49
49
  };
50
50
  }
51
51
  if (cssPropertyKey === 'letterSpacing') {
52
- var numValue = Math.abs(+value) * (+value > 0 ? 0.01 : -0.01) + "em";
53
- var numHoverValue = Math.abs(+hoverValue) * (+hoverValue > 0 ? 0.01 : -0.01) + "em";
52
+ var numValue = typeof value === 'number' ? Math.abs(+value) * (+value > 0 ? 0.01 : -0.01) + "em" : value;
53
+ var numHoverValue = typeof hoverValue === 'number'
54
+ ? Math.abs(+hoverValue) * (+hoverValue > 0 ? 0.01 : -0.01) + "em"
55
+ : hoverValue;
54
56
  if (numHoverValue === null || numHoverValue === undefined) {
55
57
  return {
56
58
  style: __assign(__assign({}, acc.style), (_g = {}, _g[cssPropertyKey] = numValue, _g)),
@@ -77,7 +79,7 @@ function parseStyleTextToCSSProp(_a) {
77
79
  if (cssPropertyKey === 'HORIZONTAL') {
78
80
  var horizontalObj = getHorizontalPositionValue(String(value));
79
81
  var hoverHorizontalObj = getHorizontalPositionValue(String(hoverValue));
80
- if (hoverHorizontalObj === null || hoverHorizontalObj === undefined) {
82
+ if (hoverValue === null || hoverValue === undefined) {
81
83
  return { style: __assign(__assign({}, acc.style), horizontalObj), hoverStyle: __assign({}, acc.hoverStyle) };
82
84
  }
83
85
  return {
@@ -167,7 +169,7 @@ function getFontName(value) {
167
169
  case 'SYSSERIF':
168
170
  return 'serif';
169
171
  case 'PRETENDARD':
170
- return 'Pretendard-Regular';
172
+ return 'Pretendard-Regular, sans-serif';
171
173
  default:
172
174
  return '';
173
175
  }
@@ -8,6 +8,7 @@ export default function parseStylePropBGImage(namedProps: NAMED_CB_STYLE_BGIMAGE
8
8
  export declare type CB_STYLE_PROP_BGIMAGE_SPECS_BASE = {
9
9
  CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT: STRING_PLAIN;
10
10
  CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION: ENUM_STRING;
11
+ CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL: boolean;
11
12
  };
12
13
  export declare type CB_STYLE_PROP_BGIMAGE_SPECS = CB_STYLE_PROP_BGIMAGE_SPECS_BASE & {
13
14
  'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:HOVER': STRING_PLAIN | null | undefined;
@@ -16,4 +17,7 @@ export declare type CB_STYLE_PROP_BGIMAGE_SPECS = CB_STYLE_PROP_BGIMAGE_SPECS_BA
16
17
  'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:HOVER': ENUM_STRING | null | undefined;
17
18
  'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE': ENUM_STRING | null | undefined;
18
19
  'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER': ENUM_STRING | null | undefined;
20
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:HOVER': boolean | null | undefined;
21
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE': boolean | null | undefined;
22
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE:HOVER': boolean | null | undefined;
19
23
  };
@@ -13,16 +13,18 @@ var __assign = (this && this.__assign) || function () {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var AVAILABLE_SPECS = [
15
15
  'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT',
16
- 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION'
16
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION',
17
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL'
17
18
  ];
18
19
  function parseStylePropBGImage(namedProps, device) {
19
20
  var specs = namedProps.specs;
20
21
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
21
- var _a, _b;
22
+ var _a, _b, _c;
22
23
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
23
24
  var cssPropertyKey = getParsedKey(baseKey);
24
25
  var value = specs[baseKey] || specs[cur];
25
26
  var isPosition = cssPropertyKey === 'backgroundPosition';
27
+ var isAttachment = cssPropertyKey === 'backgroundAttachment';
26
28
  if (isPosition) {
27
29
  var positionCss = getCssProperties(value);
28
30
  return {
@@ -30,8 +32,15 @@ function parseStylePropBGImage(namedProps, device) {
30
32
  hoverStyle: __assign({}, acc.hoverStyle)
31
33
  };
32
34
  }
35
+ if (isAttachment) {
36
+ var positionCss = value ? 'fixed' : 'unset';
37
+ return {
38
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = positionCss, _b)),
39
+ hoverStyle: __assign({}, acc.hoverStyle)
40
+ };
41
+ }
33
42
  return {
34
- style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = value === null || value === void 0 ? void 0 : value.toLowerCase(), _b)),
43
+ style: __assign(__assign({}, acc.style), (_c = {}, _c[cssPropertyKey] = value, _c)),
35
44
  hoverStyle: __assign({}, acc.hoverStyle)
36
45
  };
37
46
  }, {
@@ -52,6 +61,11 @@ function getParsedKey(key) {
52
61
  case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE':
53
62
  case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER':
54
63
  return 'backgroundPosition';
64
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL':
65
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:HOVER':
66
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE':
67
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE:HOVER':
68
+ return 'backgroundAttachment';
55
69
  }
56
70
  }
57
71
  function getCssProperties(value) {
@@ -27,7 +27,7 @@ function parseStylePropImage(namedProps, device) {
27
27
  if (isPosition) {
28
28
  var positionCss = getCssProperties(value);
29
29
  var hoverPositionCss = getCssProperties(hoverValue);
30
- if (hoverPositionCss === null || hoverPositionCss === undefined) {
30
+ if (hoverValue === null || hoverValue === undefined) {
31
31
  return {
32
32
  style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = positionCss, _a)),
33
33
  hoverStyle: __assign({}, acc.hoverStyle)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",