pds-dev-kit-web-test 2.5.277 → 2.5.279
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.
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +2 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +9 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.js +2 -4
- package/package.json +1 -1
@@ -50,12 +50,12 @@ function Button(props) {
|
|
50
50
|
var _d = getBTNStyles(props.CB_STYLE_PROP_TEXT, device), btnTextStyle = _d.style, btnTextHoverStyle = _d.hoverStyle;
|
51
51
|
var _e = getBTNColorStyles(CB_STYLE_PROP_COLOR, device), btnColorStyle = _e.style, btnColorHoverStyle = _e.hoverStyle;
|
52
52
|
var _f = (0, util_1.parseProperties)(props, device), propsStyle = _f.style, propsHoverStyle = _f.hoverStyle, _g = _f.layout, paddingLeft = _g.paddingLeft, paddingRight = _g.paddingRight, paddingTop = _g.paddingTop, paddingBottom = _g.paddingBottom, layoutStyle = __rest(_g, ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"]), effect = _f.effect;
|
53
|
-
var isEditModeAndHidden = propsStyle.
|
54
|
-
if (mode === 'EDIT') {
|
55
|
-
propsStyle.display = 'block';
|
56
|
-
}
|
53
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
57
54
|
var googleFonts = (0, useGoogleFonts_1.getGoogleFontsFromTextSpecCode)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
|
58
55
|
(0, useGoogleFonts_1.useGoogleFonts)({ fonts: googleFonts });
|
56
|
+
if (mode === 'EDIT') {
|
57
|
+
propsStyle.visibility = 'visible';
|
58
|
+
}
|
59
59
|
var cbRef = (0, react_1.useRef)(null);
|
60
60
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
61
61
|
index
|
@@ -51,9 +51,9 @@ function Divider(props) {
|
|
51
51
|
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
52
52
|
var index = props.index, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
53
53
|
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
54
|
-
var isEditModeAndHidden = propsStyle.
|
54
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
55
55
|
if (mode === 'EDIT') {
|
56
|
-
propsStyle.
|
56
|
+
propsStyle.visibility = 'visible';
|
57
57
|
}
|
58
58
|
var cbRef = (0, react_1.useRef)(null);
|
59
59
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
@@ -62,10 +62,7 @@ function Image(props) {
|
|
62
62
|
}), onClickCLINK = _c.onClickCLINK, CLINKCursor = _c.CLINKCursor;
|
63
63
|
var _d = (0, util_1.parseProperties)(props, device), style = _d.style, hoverStyle = _d.hoverStyle, layout = _d.layout, effect = _d.effect;
|
64
64
|
var _e = parseImageCBStyle(style, hoverStyle, mode), boxStyle = _e.boxStyle, imgStyle = _e.imgStyle;
|
65
|
-
var isEditModeAndHidden = style.
|
66
|
-
if (mode === 'EDIT') {
|
67
|
-
style.display = 'block';
|
68
|
-
}
|
65
|
+
var isEditModeAndHidden = style.visibility === 'hidden' && mode === 'EDIT';
|
69
66
|
var cbRef = (0, react_1.useRef)(null);
|
70
67
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
71
68
|
index
|
@@ -118,7 +115,7 @@ function parseImageCBStyle(style, hoverStyle, mode) {
|
|
118
115
|
};
|
119
116
|
return { boxStyle: boxStyle, imgStyle: imgStyle };
|
120
117
|
}
|
121
|
-
var S_ImageWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n max-height: 100%;\n
|
118
|
+
var S_ImageWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n max-height: 100%;\n width: 100%;\n"], ["\n height: 100%;\n max-height: 100%;\n width: 100%;\n"])));
|
122
119
|
var S_Image = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __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) {
|
123
120
|
var src = _a.src;
|
124
121
|
return "url(".concat(src, ")");
|
@@ -35,9 +35,9 @@ function RichText(props) {
|
|
35
35
|
var index = props.index, CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
36
36
|
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
37
37
|
var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
|
38
|
-
var isEditModeAndHidden = propsStyle.
|
38
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
39
39
|
if (mode === 'EDIT') {
|
40
|
-
propsStyle.
|
40
|
+
propsStyle.visibility = 'visible';
|
41
41
|
}
|
42
42
|
var cbRef = (0, react_1.useRef)(null);
|
43
43
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
@@ -38,12 +38,12 @@ function Text(props) {
|
|
38
38
|
}), CLINKCursor = _c.CLINKCursor, onClickCLINK = _c.onClickCLINK;
|
39
39
|
var _d = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _d.style, textHoverStyle = _d.hoverStyle;
|
40
40
|
var _e = (0, util_1.parseProperties)(props, device), propsStyle = _e.style, propsHoverStyle = _e.hoverStyle, layoutStyle = _e.layout, effect = _e.effect;
|
41
|
-
var isEditModeAndHidden = propsStyle.
|
42
|
-
if (mode === 'EDIT') {
|
43
|
-
propsStyle.display = 'block';
|
44
|
-
}
|
41
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
45
42
|
var googleFonts = (0, getGoogleFonts_1.getGoogleFontsFromTextSpecCode)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
|
46
43
|
(0, useGoogleFonts_1.default)({ fonts: googleFonts });
|
44
|
+
if (mode === 'EDIT') {
|
45
|
+
propsStyle.visibility = 'visible';
|
46
|
+
}
|
47
47
|
var cbRef = (0, react_1.useRef)(null);
|
48
48
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
49
49
|
index
|
@@ -56,6 +56,11 @@ function Text(props) {
|
|
56
56
|
var hasEffect = !isNoneEffectType;
|
57
57
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
58
58
|
var textValue = function () {
|
59
|
+
if (device === 'MOBILE' &&
|
60
|
+
mode === 'EDIT' &&
|
61
|
+
props.CB_CONTENT_PROP_VISIBILITY.CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB === false) {
|
62
|
+
return '';
|
63
|
+
}
|
59
64
|
if (device === 'MOBILE') {
|
60
65
|
var value = props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXTMOBILEALTERNATIVE;
|
61
66
|
if (value === null || value === undefined) {
|
@@ -37,9 +37,9 @@ function Youtube(props) {
|
|
37
37
|
var isEditMode = mode === 'EDIT';
|
38
38
|
var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
|
39
39
|
var _d = (0, util_1.parseProperties)(props, device), propsStyle = _d.style, propsHoverStyle = _d.hoverStyle, layoutStyle = _d.layout, effect = _d.effect;
|
40
|
-
var isEditModeAndHidden = propsStyle.
|
40
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
41
41
|
if (mode === 'EDIT') {
|
42
|
-
propsStyle.
|
42
|
+
propsStyle.visibility = 'visible';
|
43
43
|
}
|
44
44
|
var cbRef = (0, react_1.useRef)(null);
|
45
45
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
@@ -5,15 +5,13 @@ function parseContentVisibility(namedProps, device) {
|
|
5
5
|
if (device === 'DESKTOP') {
|
6
6
|
return {
|
7
7
|
style: {
|
8
|
-
|
9
|
-
display: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP ? 'block' : 'none'
|
8
|
+
visibility: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP ? 'visible' : 'hidden'
|
10
9
|
}
|
11
10
|
};
|
12
11
|
}
|
13
12
|
return {
|
14
13
|
style: {
|
15
|
-
|
16
|
-
display: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP ? 'block' : 'none'
|
14
|
+
visibility: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB ? 'visible' : 'hidden'
|
17
15
|
}
|
18
16
|
};
|
19
17
|
}
|