pds-dev-kit-web-test 2.5.322 → 2.5.323

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 (63) hide show
  1. package/dist/src/common/hooks/useTooltip.js +1 -1
  2. package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
  3. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  4. package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +1 -1
  5. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +1 -3
  6. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +31 -26
  7. package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/SectionBox.js +4 -1
  8. package/dist/src/sub/DynamicLayout/mocks.d.ts +1 -5
  9. package/dist/src/sub/DynamicLayout/mocks.js +10 -34
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +2 -3
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.js +2 -8
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +3 -8
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +21 -1
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +4 -4
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +2 -144
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +0 -27
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +7 -16
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +1 -2
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +1 -33
  21. package/dist/src/sub/DynamicLayout/types.d.ts +2 -2
  22. package/package.json +3 -3
  23. package/release-note.md +3 -3
  24. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +0 -20
  25. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +0 -1115
  26. package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +0 -139
  27. package/dist/src/sub/DynamicLayout/compositionActionTypes.js +0 -2
  28. package/dist/src/sub/DynamicLayout/mock_composition.d.ts +0 -3
  29. package/dist/src/sub/DynamicLayout/mock_composition.js +0 -755
  30. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +0 -2
  31. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +0 -326
  32. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +0 -2
  33. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +0 -318
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +0 -17
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +0 -39
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +0 -31
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +0 -167
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +0 -26
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +0 -184
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +0 -19
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +0 -72
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +0 -50
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +0 -919
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +0 -1
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +0 -8
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +0 -90
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.js +0 -2
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +0 -8
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +0 -143
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +0 -15
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +0 -39
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +0 -31
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +0 -167
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +0 -26
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +0 -184
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +0 -19
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +0 -72
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +0 -1
  59. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.js +0 -8
  60. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +0 -48
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +0 -855
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +0 -80
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +0 -2
@@ -66,7 +66,7 @@ function UseTooltip(_a) {
66
66
  systemUIPosition: tooltipPosition,
67
67
  distance: distance
68
68
  });
69
- return tooltipText ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss }, { children: tooltipText })), document.getElementById('root')) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
69
+ return tooltipText ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss }, { children: tooltipText })), document.body) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
70
70
  }
71
71
  var S_TooltipWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n\n ", ";\n"], ["\n ", "\n\n ", ";\n"])), systemUI_1.TooltipWrapperStyle, function (_a) {
72
72
  var tooltipPositionCss = _a.tooltipPositionCss;
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  function hoverTypeSystemUICssGenerator(_a) {
11
11
  var baseSize = _a.baseSize, sizeOffset = _a.sizeOffset, positionOffset = _a.positionOffset, systemUIPosition = _a.systemUIPosition, _b = _a.distance, distance = _b === void 0 ? 8 : _b;
12
12
  if (!sizeOffset || !positionOffset) {
13
- return 'visibility: hidden;';
13
+ return '';
14
14
  }
15
15
  var end = positionOffset.left, bottom = positionOffset.bottom, top = positionOffset.top;
16
16
  var width = sizeOffset.width, height = sizeOffset.height;
@@ -105,7 +105,7 @@ function BasicButtonGroup(_a) {
105
105
  var isHoveredButton = index === hoveredButtonIndex;
106
106
  return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled', backgroundColorTheme: backgroundColorTheme }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }), tooltipText &&
107
107
  isHoveredButton &&
108
- (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.getElementById('tooltip-root'))] }), iconName + index));
108
+ (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.body)] }), iconName + index));
109
109
  }) })));
110
110
  }
111
111
  var S_BasicButtonGroup = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"], ["\n align-items: center;\n display: flex;\n width: max-content;\n\n & > button:not(:last-child) {\n margin-right: ", ";\n }\n"])), function (_a) {
@@ -46,7 +46,7 @@ function ComponentBlockMatcher(_a) {
46
46
  return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue, { index: index }));
47
47
  case types_1.CB_ALL_CODES.CB_EMBED:
48
48
  return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
49
- case types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL: {
49
+ case types_1.CB_ALL_CODES.CB_CONTENTS_CAROUSEL: {
50
50
  return (0, jsx_runtime_1.jsx)("div", { children: "NOT SUPPORTED NESTED CAROUSEL" });
51
51
  }
52
52
  default:
@@ -5,7 +5,5 @@ export type LayoutsType = {
5
5
  sm: Layout;
6
6
  lg: Layout;
7
7
  };
8
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ISection & {
9
- device?: "DESKTOP" | "MOBILE" | undefined;
10
- } & React.RefAttributes<unknown>>>;
8
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ISection & React.RefAttributes<unknown>>>;
11
9
  export default _default;
@@ -53,27 +53,30 @@ var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizab
53
53
  var util_1 = require("../sections/CustomSection/util");
54
54
  var parseSectionPadding_1 = __importDefault(require("../sections/CustomSection/util/layoutPropParsers/parseSectionPadding"));
55
55
  var FlexGridItem_1 = __importDefault(require("./FlexGridItem"));
56
+ var GRID_CELL_MIN = 24;
57
+ var DESKTOP_GRID_COLS = 24;
58
+ var MOBILE_GRID_COLS = 8;
59
+ var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
60
+ var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
56
61
  var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
57
- var _a, _b, _c, _d, _e, _f, _g;
58
- var _h = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext),
59
- // NOTE: 이것을 사용해야함
60
- contextDevice = _h.device, editingSectionId = _h.editingSectionId, mode = _h.mode, shortcutKeyMode = _h.shortcutKeyMode, sectionActionHandler = _h.sectionActionHandler;
62
+ var _a;
63
+ var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, editingSectionId = _b.editingSectionId, mode = _b.mode, shortcutKeyMode = _b.shortcutKeyMode, sectionActionHandler = _b.sectionActionHandler;
61
64
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
62
- // NOTE: 임시. 테스트용.
63
- var device = (_b = (_a = props.device) !== null && _a !== void 0 ? _a : contextDevice) !== null && _b !== void 0 ? _b : 'DESKTOP';
64
- var isMobile = device === 'MOBILE';
65
- var isEditMode = mode === 'EDIT';
66
- var _j = jsonProperties, _k = _j.data, CB_PLACEMENT_PROP_SECTION = _k.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _k.CB_LAYOUT_PROP_PADDING, zOrders = _j.zOrders;
67
- var colsDesktop = (_c = CB_PLACEMENT_PROP_SECTION.CB_PLACEMENT_PROP_SECTION_SPEC_COLS) !== null && _c !== void 0 ? _c : 24;
68
- var colsMobile = (_d = CB_PLACEMENT_PROP_SECTION['CB_PLACEMENT_PROP_SECTION_SPEC_COLS:MOBILE']) !== null && _d !== void 0 ? _d : 8;
69
- var rowsDesktop = (_e = CB_PLACEMENT_PROP_SECTION.CB_PLACEMENT_PROP_SECTION_SPEC_ROWS) !== null && _e !== void 0 ? _e : 26;
70
- var rowsMobile = (_f = CB_PLACEMENT_PROP_SECTION['CB_PLACEMENT_PROP_SECTION_SPEC_ROWS:MOBILE']) !== null && _f !== void 0 ? _f : 26;
71
- var rows = isMobile ? rowsMobile : rowsDesktop;
72
- var cols = isMobile ? colsMobile : colsDesktop;
65
+ var _c = jsonProperties, _d = _c.data, CB_PLACEMENT_PROP_SECTION = _d.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _d.CB_LAYOUT_PROP_PADDING, zOrders = _c.zOrders;
73
66
  var containerRef = (0, react_1.useRef)(null);
74
67
  var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
75
- var _l = (0, react_1.useState)(null), selectedCB = _l[0], setSelectedCB = _l[1];
68
+ var _e = (0, react_1.useState)(null), selectedCB = _e[0], setSelectedCB = _e[1];
76
69
  var gleRef = (0, react_1.useRef)(null);
70
+ var isMobile = device === 'MOBILE';
71
+ var isEditMode = mode === 'EDIT';
72
+ // const layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
73
+ // const [layouts] = useState<LayoutsType>(() => {
74
+ // const { lg, sm } = parsePlacement(componentBlocks ?? []);
75
+ // return {
76
+ // lg,
77
+ // sm
78
+ // };
79
+ // });
77
80
  (0, react_1.useEffect)(function () {
78
81
  if (editingSectionId !== props.id) {
79
82
  setSelectedCB(null);
@@ -121,15 +124,14 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
121
124
  setSelectedCB('BULK');
122
125
  }
123
126
  }, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
124
- var _m = (0, util_1.parseCustomSectionPlacement)({
127
+ var _f = (0, util_1.parseCustomSectionPlacement)({
125
128
  isMobile: isMobile,
126
129
  customSectionProps: CB_PLACEMENT_PROP_SECTION
127
- }), minHeight = _m.minHeight, isFullWidth = _m.isFullWidth;
128
- var canvasWidth = 50 * cols;
130
+ }), width = _f.width, minHeight = _f.minHeight, isFullWidth = _f.isFullWidth;
129
131
  var customSectionStyles = {
130
132
  minHeight: "".concat(minHeight, "vh"),
131
- width: "100%",
132
- maxWidth: isFullWidth ? undefined : "".concat(canvasWidth, "px")
133
+ width: '100%',
134
+ maxWidth: isFullWidth ? '' : "".concat(width, "px")
133
135
  };
134
136
  var onClickSection = function () {
135
137
  if (!isEditMode) {
@@ -145,15 +147,18 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
145
147
  });
146
148
  };
147
149
  var padding = (0, parseSectionPadding_1.default)(CB_LAYOUT_PROP_PADDING, device);
150
+ var sectionRow = CB_PLACEMENT_PROP_SECTION[device === 'DESKTOP'
151
+ ? 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS'
152
+ : 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS:MOBILE'];
148
153
  var rowHeight = (function () {
149
154
  if (!size.width) {
150
155
  return 50;
151
156
  }
152
157
  if (device === 'MOBILE') {
153
- var cellWidth_1 = size.width / cols;
158
+ var cellWidth_1 = size.width / MOBILE_GRID_COLS;
154
159
  return cellWidth_1 * 0.56;
155
160
  }
156
- var cellWidth = size.width / cols;
161
+ var cellWidth = size.width / DESKTOP_GRID_COLS;
157
162
  return cellWidth * 0.56;
158
163
  })();
159
164
  var baseFontSize = (function () {
@@ -190,12 +195,12 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
190
195
  paddingLeft: padding.left,
191
196
  width: '100%',
192
197
  height: '100%'
193
- } }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ ref: containerRef, cols: cols, rowHeight: rowHeight, sectionRow: rows, style: {
198
+ } }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ ref: containerRef, cols: isMobile ? 8 : 24, rowHeight: rowHeight, sectionRow: sectionRow !== null && sectionRow !== void 0 ? sectionRow : 0, style: {
194
199
  width: customSectionStyles.width,
195
200
  maxWidth: customSectionStyles.maxWidth,
196
- // minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
201
+ minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
197
202
  fontSize: "".concat(baseFontSize, "px")
198
- } }, { children: (_g = props.componentBlocks) === null || _g === void 0 ? void 0 : _g.map(function (cb, index) {
203
+ } }, { children: (_a = props.componentBlocks) === null || _a === void 0 ? void 0 : _a.map(function (cb, index) {
199
204
  var _a;
200
205
  return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0 }) }, cb.id));
201
206
  }) })) })) })) })) }));
@@ -81,9 +81,12 @@ var TopRightAbsoluteBox = styled_components_1.default.div(templateObject_1 || (t
81
81
  var theme = _a.theme;
82
82
  return theme.ui_editor_preview_editing;
83
83
  });
84
- var S_SectionBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", ";\n position: relative;\n"], ["\n height: ", ";\n position: relative;\n"])), function (_a) {
84
+ var S_SectionBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", ";\n position: relative;\n z-index: ", ";\n"], ["\n height: ", ";\n position: relative;\n z-index: ", ";\n"])), function (_a) {
85
85
  var isIframeSection = _a.isIframeSection;
86
86
  return (isIframeSection ? '100%' : 'auto');
87
+ }, function (_a) {
88
+ var isEditing = _a.isEditing;
89
+ return (isEditing ? 3 : 1);
87
90
  });
88
91
  var DimmedEditOverlay = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n animation: ", ";\n background-color: ", ";\n bottom: 0;\n cursor: pointer;\n display: flex;\n justify-content: center;\n left: 0;\n\n opacity: ", ";\n\n position: absolute;\n right: 0;\n top: 0;\n transition: opacity 0.2s ease-out;\n z-index: 10;\n\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.6;\n }\n\n 100% {\n opacity: 0;\n }\n }\n"], ["\n align-items: center;\n animation: ", ";\n background-color: ", ";\n bottom: 0;\n cursor: pointer;\n display: flex;\n justify-content: center;\n left: 0;\n\n opacity: ", ";\n\n position: absolute;\n right: 0;\n top: 0;\n transition: opacity 0.2s ease-out;\n z-index: 10;\n\n @keyframes fadeOut {\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.6;\n }\n\n 100% {\n opacity: 0;\n }\n }\n"])), function (_a) {
89
92
  var fadeOut = _a.fadeOut;
@@ -1,7 +1,7 @@
1
1
  export declare const MOCK_SECTIONS: {
2
2
  administrativeTitle: string;
3
3
  appearanceTemplate: string;
4
- componentBlocks: (import("./sections/CustomSection/types").CB_CONTENTSCAROUSEL | import("./sections/CustomSection/types").CB_SLIDEBANNER | {
4
+ componentBlocks: ({
5
5
  availablePlugins: never[];
6
6
  blockId: string;
7
7
  componentBlockCode: string;
@@ -997,8 +997,6 @@ export declare const MOCK_SECTIONS: {
997
997
  '188285': number;
998
998
  '188286': number;
999
999
  '188287': number;
1000
- '188290': number;
1001
- '188291': number;
1002
1000
  };
1003
1001
  mobile: {
1004
1002
  '188262': number;
@@ -1027,8 +1025,6 @@ export declare const MOCK_SECTIONS: {
1027
1025
  '188285': number;
1028
1026
  '188286': number;
1029
1027
  '188287': number;
1030
- '188290': number;
1031
- '188291': number;
1032
1028
  };
1033
1029
  };
1034
1030
  };
@@ -1,15 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MOCK_SECTIONS = void 0;
4
- var mock_contentsCarousel_1 = require("./mock_contentsCarousel");
5
- var mock_slideBanner_1 = require("./mock_slideBanner");
6
4
  exports.MOCK_SECTIONS = [
7
5
  {
8
6
  administrativeTitle: 'Daily Pages',
9
7
  appearanceTemplate: 'GENERAL_A',
10
8
  componentBlocks: [
11
- mock_slideBanner_1.SAMPLE_SLIDEBANNER_CB,
12
- mock_contentsCarousel_1.SAMPLE_CONTENTSCAROUSEL_CB,
13
9
  {
14
10
  availablePlugins: [],
15
11
  blockId: 'CB_188265',
@@ -3850,14 +3846,14 @@ exports.MOCK_SECTIONS = [
3850
3846
  'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null
3851
3847
  },
3852
3848
  CB_PLACEMENT_PROP_PLACEMENT: {
3853
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 24,
3854
- 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
3855
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 2,
3856
- 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 2,
3857
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 0,
3858
- 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': 0,
3859
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 0,
3860
- 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': 0,
3849
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 28,
3850
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 12,
3851
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 10,
3852
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 10,
3853
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: -1,
3854
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': -1,
3855
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: -1,
3856
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': -1,
3861
3857
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: 1,
3862
3858
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': 1
3863
3859
  },
@@ -4628,22 +4624,6 @@ exports.MOCK_SECTIONS = [
4628
4624
  type: 'COMPONENT_BLOCK',
4629
4625
  zOrderDesktopInternal: 26,
4630
4626
  zOrderMobileInternal: 25
4631
- },
4632
- {
4633
- blockId: 'CB_188290',
4634
- children: [],
4635
- componentBlockId: 188290,
4636
- type: 'COMPONENT_BLOCK',
4637
- zOrderDesktopInternal: 27,
4638
- zOrderMobileInternal: 27
4639
- },
4640
- {
4641
- blockId: 'CB_188291',
4642
- children: [],
4643
- componentBlockId: 188291,
4644
- type: 'COMPONENT_BLOCK',
4645
- zOrderDesktopInternal: 28,
4646
- zOrderMobileInternal: 28
4647
4627
  }
4648
4628
  ],
4649
4629
  componentBlockId: null,
@@ -4679,9 +4659,7 @@ exports.MOCK_SECTIONS = [
4679
4659
  '188284': 13,
4680
4660
  '188285': 14,
4681
4661
  '188286': 26,
4682
- '188287': 19,
4683
- '188290': 27,
4684
- '188291': 28
4662
+ '188287': 19
4685
4663
  },
4686
4664
  mobile: {
4687
4665
  '188262': 10,
@@ -4709,9 +4687,7 @@ exports.MOCK_SECTIONS = [
4709
4687
  '188284': 18,
4710
4688
  '188285': 17,
4711
4689
  '188286': 25,
4712
- '188287': 19,
4713
- '188290': 27,
4714
- '188291': 28
4690
+ '188287': 19
4715
4691
  }
4716
4692
  }
4717
4693
  },
@@ -703,10 +703,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
703
703
  setSelectedBlockId(null);
704
704
  sectionActionHandler &&
705
705
  sectionActionHandler({
706
- type: '@CUSTOMSECTION/SECTION_RIGHT_CLICKED',
706
+ type: '@CUSTOMSECTION/SECTION_CLICKED',
707
707
  payload: {
708
- sectionId: props.id,
709
- e: e
708
+ sectionId: props.id
710
709
  }
711
710
  });
712
711
  };
@@ -27,12 +27,6 @@ function FlexGridItem(_a) {
27
27
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
28
  var defaultHeight = getMaxHeight(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device, rowHeight);
29
29
  var gridArea = getGridAreaFromCB(cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, device);
30
- // const zIndex =
31
- // device === 'DESKTOP'
32
- // ? cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX
33
- // : cb.jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT[
34
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'
35
- // ];
36
30
  return ((0, jsx_runtime_1.jsx)(GridItem, __assign({ "data-cb-id": cb.id, style: {
37
31
  zIndex: zIndex,
38
32
  gridArea: gridArea
@@ -57,7 +51,7 @@ function getGridAreaFromCB(props, device) {
57
51
  var colStart_1 = CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX + 1;
58
52
  var rowStart_1 = CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY + 1;
59
53
  var rowEnd_1 = rows + rowStart_1;
60
- var colEnd_1 = cols + colStart_1;
54
+ var colEnd_1 = Math.min(cols + colStart_1, 25);
61
55
  // <grid-row-start> / <grid-column-start> / <grid-row-end> / <grid-column-end>;
62
56
  return "".concat(rowStart_1, " / ").concat(colStart_1, " / ").concat(rowEnd_1, " / ").concat(colEnd_1);
63
57
  }
@@ -68,7 +62,7 @@ function getGridAreaFromCB(props, device) {
68
62
  var colStart = startXMobile + 1;
69
63
  var rowStart = startYMobile + 1;
70
64
  var rowEnd = rowsMobile + rowStart;
71
- var colEnd = colsMobile + colStart;
65
+ var colEnd = Math.min(colsMobile + colStart, 9);
72
66
  return "".concat(rowStart, " / ").concat(colStart, " / ").concat(rowEnd, " / ").concat(colEnd);
73
67
  }
74
68
  exports.default = FlexGridItem;
@@ -19,12 +19,11 @@ require("react");
19
19
  var newUtils_1 = require("../../newUtils");
20
20
  var types_1 = require("../../types");
21
21
  var Button_1 = __importDefault(require("./componentBlocks/Button/Button"));
22
- var ContentsCarousel_1 = require("./componentBlocks/ContentsCarousel");
22
+ var ContentsCarousel_1 = __importDefault(require("./componentBlocks/ContentsCarousel/ContentsCarousel"));
23
23
  var Divider_1 = __importDefault(require("./componentBlocks/Divider/Divider"));
24
24
  var Embed_1 = __importDefault(require("./componentBlocks/Embed/Embed"));
25
25
  var Image_1 = __importDefault(require("./componentBlocks/Image/Image"));
26
26
  var RichText_1 = require("./componentBlocks/RichText");
27
- var SlideBanner_1 = require("./componentBlocks/SlideBanner");
28
27
  var Text_1 = __importDefault(require("./componentBlocks/Text/Text"));
29
28
  var Twitter_1 = __importDefault(require("./componentBlocks/Twitter/Twitter"));
30
29
  var Youtube_1 = require("./componentBlocks/Youtube");
@@ -49,13 +48,9 @@ function ComponentBlockMatcher(_a) {
49
48
  return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue, { index: index }));
50
49
  case types_1.CB_ALL_CODES.CB_EMBED:
51
50
  return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
52
- case types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL: {
51
+ case types_1.CB_ALL_CODES.CB_CONTENTS_CAROUSEL: {
53
52
  var compositions = cbProps.compositions;
54
- return ((0, jsx_runtime_1.jsx)(ContentsCarousel_1.ContentsCarousel, __assign({}, propsWithValue, { compositions: compositions, index: index })));
55
- }
56
- case types_1.CB_ALL_CODES.CB_SLIDEBANNER: {
57
- var compositions = cbProps.compositions;
58
- return ((0, jsx_runtime_1.jsx)(SlideBanner_1.SlideBanner, __assign({}, propsWithValue, { compositions: compositions, index: index })));
53
+ return ((0, jsx_runtime_1.jsx)(ContentsCarousel_1.default, __assign({}, propsWithValue, { compositions: compositions, index: index })));
59
54
  }
60
55
  default:
61
56
  return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" });
@@ -67,6 +67,26 @@ function Button(props) {
67
67
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
68
68
  var hasEffect = !isNoneEffectType;
69
69
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
70
+ var textValue = function () {
71
+ if (device === 'MOBILE' &&
72
+ mode !== 'EDIT' &&
73
+ props.CB_CONTENT_PROP_VISIBILITY.CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB === false) {
74
+ return '';
75
+ }
76
+ if (device === 'DESKTOP' &&
77
+ mode !== 'EDIT' &&
78
+ props.CB_CONTENT_PROP_VISIBILITY.CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP === false) {
79
+ return '';
80
+ }
81
+ if (device === 'MOBILE') {
82
+ var value = props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXTMOBILEALTERNATIVE;
83
+ if (value === null || value === undefined) {
84
+ return props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT;
85
+ }
86
+ return value;
87
+ }
88
+ return props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT;
89
+ };
70
90
  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: {
71
91
  paddingLeft: paddingLeft,
72
92
  paddingRight: paddingRight,
@@ -74,7 +94,7 @@ function Button(props) {
74
94
  paddingTop: paddingTop
75
95
  } }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ onMouseLeave: function (e) {
76
96
  e.currentTarget.classList.remove('hovered');
77
- }, 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 })) }))] }));
97
+ }, 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: textValue() })) }))] }));
78
98
  }
79
99
  function getBTNStyles(props, device) {
80
100
  var availableSpecCodes = [
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { CB_CONTENTSCAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
3
- import type { CB_CONTENTSCAROUSEL_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
4
- type Props = CB_CONTENTSCAROUSEL_PROPERTIES_TYPE & IndexForIntersection & {
5
- compositions: CB_CONTENTSCAROUSEL['compositions'];
2
+ import type { CB_CONTENTS_CAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
3
+ import type { CB_BTN_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
4
+ type Props = CB_BTN_PROPERTIES_TYPE & IndexForIntersection & {
5
+ compositions: CB_CONTENTS_CAROUSEL['compositions'];
6
6
  };
7
7
  declare function ContentsCarousel(props: Props): JSX.Element;
8
8
  export default ContentsCarousel;
@@ -1,154 +1,12 @@
1
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 __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
4
  };
20
5
  Object.defineProperty(exports, "__esModule", { value: true });
21
6
  var jsx_runtime_1 = require("react/jsx-runtime");
22
- var react_1 = require("react");
23
- var Composition_1 = __importDefault(require("../../../../../../../DynamicLayout/CompositionRenderer/Composition"));
24
- var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
25
- var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
26
- var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
27
- var styled_components_1 = __importDefault(require("styled-components"));
28
- var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
29
- var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
30
- var CustomNavigation_1 = require("./components/CustomNavigation");
31
- var CustomPagination_1 = require("./components/CustomPagination");
32
- var CustomProgressbar_1 = require("./components/CustomProgressbar");
33
- var ContentsCarouselCore_1 = __importDefault(require("./ContentsCarouselCore"));
34
- var contentsCarouselUtils_1 = require("./contentsCarouselUtils");
7
+ var CompositionRenderer_1 = __importDefault(require("../../../../../../../DynamicLayout/CompositionRenderer/CompositionRenderer"));
35
8
  function ContentsCarousel(props) {
36
- var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
37
- var index = props.index, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = props.CB_CONTENT_PROP_CONTENTSCAROUSEL.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS,
38
- // STYLE: 캐로셀
39
- CB_STYLE_PROP_CONTENTSCAROUSEL = props.CB_STYLE_PROP_CONTENTSCAROUSEL,
40
- // STYLE: 그림자
41
- CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
42
- // EFFECT: 진입
43
- CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
44
9
  var compositions = props.compositions;
45
- var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1];
46
- var _c = (0, react_1.useState)(1), currentSlide = _c[0], setCurrentSlide = _c[1];
47
- var _d = (0, react_1.useState)(0), totalPages = _d[0], setTotalPages = _d[1];
48
- var _e = (0, react_1.useState)(true), isBeginning = _e[0], setIsBeginning = _e[1];
49
- var _f = (0, react_1.useState)(false), isEnd = _f[0], setIsEnd = _f[1];
50
- var _g = (0, react_1.useState)(0), progress = _g[0], setProgress = _g[1];
51
- var _h = (0, react_1.useState)(0), leftTime = _h[0], setLeftTime = _h[1];
52
- var swiperRef = (0, react_1.useRef)(null);
53
- var _j = (0, contentsCarouselUtils_1.parseCarouselStyleToCarouselCoreProp)({
54
- props: CB_STYLE_PROP_CONTENTSCAROUSEL,
55
- contentsPropsPartials: { CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS },
56
- device: device
57
- }), contentsCarouselNormalStyle = _j.normalStyle, contentsCarouselHoverStyle = _j.hoverStyle;
58
- var _k = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomPaginationProp)({
59
- props: CB_STYLE_PROP_CONTENTSCAROUSEL,
60
- device: device
61
- }), customPaginationNormalStyle = _k.normalStyle, customPaginationHoverStyle = _k.hoverStyle;
62
- var _l = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomNavigationProp)({
63
- props: CB_STYLE_PROP_CONTENTSCAROUSEL,
64
- device: device
65
- }), customNavigationNormalStyle = _l.normalStyle, customNavigationHoverStyle = _l.hoverStyle;
66
- var _m = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomProgressbarProp)({
67
- props: CB_STYLE_PROP_CONTENTSCAROUSEL,
68
- device: device
69
- }), customProgressbarNormalStyle = _m.normalStyle, customProgressbarHoverStyle = _m.hoverStyle;
70
- var _o = (0, util_1.parseProperties)(props, device), style = _o.style, hoverStyle = _o.hoverStyle, layout = _o.layout, effect = _o.effect;
71
- // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
72
- var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
73
- // NOTE: EFFECT와 관련된 함수들입니다.
74
- var cbRef = (0, react_1.useRef)(null);
75
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
76
- index
77
- ]);
78
- var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
79
- var effectCssProperties = isVisible ? effect : {};
80
- var isNoneEffectType = device === 'DESKTOP'
81
- ? CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE === 'NONE'
82
- : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
83
- var hasEffect = !isNoneEffectType;
84
- var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
85
- (0, react_1.useEffect)(function () {
86
- var _a, _b, _c;
87
- (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.update();
88
- (_c = swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper.update();
89
- }, [isHovered]);
90
- var handleSwiper = function (swiper) {
91
- var totalSlides = swiper.slides.length;
92
- var slidesPerView = typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
93
- var slidesPerGroup = typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
94
- var totalPages = Math.ceil((totalSlides - slidesPerView) / slidesPerGroup) + 1;
95
- setTotalPages(totalPages);
96
- setIsBeginning(swiper.isBeginning);
97
- setIsEnd(swiper.isEnd);
98
- setCurrentSlide(swiper.activeIndex + 1);
99
- };
100
- var handleSlideChange = function (swiper) {
101
- setIsBeginning(swiper.isBeginning);
102
- setIsEnd(swiper.isEnd);
103
- setCurrentSlide(swiper.activeIndex + 1);
104
- };
105
- var handleAutoplayTimeLeft = function (swiper, time, progress) {
106
- setProgress(progress);
107
- setLeftTime(time);
108
- };
109
- var handleBulletClick = function (index) {
110
- if (swiperRef.current) {
111
- var targetIndex = (swiperRef.current.swiper.params.slidesPerGroup || 1) * index;
112
- swiperRef.current.swiper.slideTo(targetIndex);
113
- }
114
- };
115
- var handlePrevBtnClick = function () {
116
- if (swiperRef.current) {
117
- swiperRef.current.swiper.slidePrev();
118
- }
119
- };
120
- var handleNextBtnClick = function () {
121
- if (swiperRef.current) {
122
- swiperRef.current.swiper.slideNext();
123
- }
124
- };
125
- return ((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)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { position: 'relative', overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { position: 'relative', overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { children: (0, jsx_runtime_1.jsxs)(S_SwiperWrapper, __assign({ customStyle: isHovered
126
- ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
127
- : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle }, { children: [(0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "contents-carousel-core", onSwiper: handleSwiper, onSlideChange: handleSlideChange, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, scrollbar: isHovered
128
- ? contentsCarouselHoverStyle.scrollbar
129
- : contentsCarouselNormalStyle.scrollbar, slidesPerGroup: isHovered
130
- ? contentsCarouselHoverStyle.slidesPerGroup
131
- : contentsCarouselNormalStyle.slidesPerGroup, spaceBetween: isHovered
132
- ? contentsCarouselHoverStyle.spaceBetween
133
- : contentsCarouselNormalStyle.spaceBetween, freeMode: isHovered ? contentsCarouselHoverStyle.freeMode : contentsCarouselNormalStyle.freeMode, autoplay: isHovered ? contentsCarouselHoverStyle.autoplay : contentsCarouselNormalStyle.autoplay, useAutoplay: isHovered
134
- ? contentsCarouselHoverStyle.useAutoplay
135
- : contentsCarouselNormalStyle.useAutoplay, loop: isHovered ? contentsCarouselHoverStyle.loop : contentsCarouselNormalStyle.loop }, { children: compositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id)); }) })), (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { type: isHovered ? customPaginationHoverStyle.type : customPaginationNormalStyle.type, offset: isHovered ? customPaginationHoverStyle.offset : customPaginationNormalStyle.offset, current: currentSlide, total: totalPages, size: isHovered ? customPaginationHoverStyle.size : customPaginationNormalStyle.size, onBulletClick: handleBulletClick }), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: isBeginning, prevBtnType: isHovered
136
- ? customNavigationHoverStyle.prevBtnType
137
- : customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
138
- ? customNavigationHoverStyle.prevBtnOffset
139
- : customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
140
- ? customNavigationHoverStyle.prevBtnSize
141
- : customNavigationNormalStyle.prevBtnSize, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: isEnd, nextBtnType: isHovered
142
- ? customNavigationHoverStyle.nextBtnType
143
- : customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
144
- ? customNavigationHoverStyle.nextBtnOffset
145
- : customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
146
- ? customNavigationHoverStyle.nextBtnSize
147
- : customNavigationNormalStyle.nextBtnSize, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progress: progress, leftTime: leftTime, type: isHovered ? customProgressbarHoverStyle.type : customProgressbarNormalStyle.type, size: isHovered ? customProgressbarHoverStyle.size : customProgressbarNormalStyle.size, offset: isHovered ? customProgressbarHoverStyle.offset : customProgressbarNormalStyle.offset })] })) })) })));
10
+ return (0, jsx_runtime_1.jsx)(CompositionRenderer_1.default, { compositions: compositions });
148
11
  }
149
- var S_SwiperWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n ", "\n"], ["\n height: 100%;\n width: 100%;\n ", "\n"])), function (_a) {
150
- var customStyle = _a.customStyle;
151
- return customStyle;
152
- });
153
12
  exports.default = ContentsCarousel;
154
- var templateObject_1;
@@ -23,33 +23,6 @@ export type CB_CONTENT_PROP_TWITTER = {
23
23
  export type CB_CONTENT_PROP_CODEBLOCK = {
24
24
  CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: STRING_PLAIN;
25
25
  };
26
- export type CB_CONTENT_PROP_CONTENTSCAROUSEL = {
27
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUE_TYPE: 'A' | 'B';
28
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECT_DATA: STRING_PLAIN;
29
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DATASORTING: STRING_PLAIN;
30
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_OFFSET: ENUM_STRING | null | undefined;
31
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MENUALITEM: MockComposition[];
32
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS: NUMBER_INTEGER;
33
- CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS: NUMBER_INTEGER;
34
- };
35
- export type CB_CONTENT_PROP_SLIDEBANNER = {
36
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUE_TYPE: 'A' | 'B';
37
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECT_DATA: STRING_PLAIN;
38
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_DATASORTING: STRING_PLAIN;
39
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_OFFSET: ENUM_STRING | null | undefined;
40
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_MENUALITEM: MockComposition[];
41
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS: NUMBER_INTEGER;
42
- CB_CONTENT_PROP_SLIDEBANNER_SPEC_DISPLAYCOUNTS: NUMBER_INTEGER;
43
- };
44
- export type MockComposition = {
45
- title: string;
46
- width: number;
47
- minWidth: number;
48
- maxWidth: number;
49
- height: number;
50
- minHeight: number;
51
- maxHeight: number;
52
- };
53
26
  export type CBTextPropsKeys = keyof CB_STYLE_PROP_TEXT_SPECS;
54
27
  export type CB_STYLE_PROP_TEXT_SPECS_BASE = {
55
28
  CB_STYLE_PROP_TEXT_SPEC_TYPEFACE: ENUM_STRING;