pds-dev-kit-web-test 2.7.246 → 2.7.249

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 (26) hide show
  1. package/dist/src/sub/DynamicLayout/mock_contentsList.js +1 -1
  2. package/dist/src/sub/DynamicLayout/mocks.d.ts +1 -3596
  3. package/dist/src/sub/DynamicLayout/mocks.js +4 -4
  4. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +1 -0
  5. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +10 -8
  6. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +2 -1
  7. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +2 -2
  8. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +2 -1
  9. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +2 -2
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.d.ts +5 -0
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.js +243 -0
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +1 -1
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +26 -43
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +1 -0
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +12 -7
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +2 -1
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +1 -1
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.d.ts +4 -0
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.js +108 -0
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +1 -2
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +26 -45
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +1 -1
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.d.ts +1 -1
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.js +10 -43
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +10 -36
  26. package/package.json +1 -1
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MOCK_SECTIONS = void 0;
4
4
  require("./mock_contentsCarousel");
5
- require("./mock_contentsList");
6
- var mock_slideBanner_1 = require("./mock_slideBanner");
5
+ var mock_contentsList_1 = require("./mock_contentsList");
6
+ require("./mock_slideBanner");
7
7
  exports.MOCK_SECTIONS = [
8
8
  {
9
9
  administrativeTitle: 'Daily Pages',
@@ -12,8 +12,8 @@ exports.MOCK_SECTIONS = [
12
12
  // MOCK_VIDEO_CB,
13
13
  // MOCK_VIDEO_CB_2,
14
14
  // SAMPLE_CONTENTSCAROUSEL_CB,
15
- mock_slideBanner_1.SAMPLE_SLIDEBANNER_CB
16
- // SAMPLE_LIST_CB
15
+ // SAMPLE_SLIDEBANNER_CB
16
+ mock_contentsList_1.SAMPLE_LIST_CB
17
17
  // ...MOCK_COMPONENT_BLOCKS
18
18
  ],
19
19
  display: true,
@@ -10,6 +10,7 @@ export type ContentsCarouselElementsProps = {
10
10
  type: ComponentType;
11
11
  position: OUTSET_POSTIION | INSET_POSTIION;
12
12
  designType: CB_STYLE_PROP_CONTENTSCAROUSELBUTTON_SPEC_PREVBTNSTYLE_TYPE;
13
+ size: 'LARGE' | 'MEDIUM' | 'SMALL';
13
14
  };
14
15
  declare function ContentsCarousel(props: Props): JSX.Element;
15
16
  export default ContentsCarousel;
@@ -47,7 +47,8 @@ var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
47
47
  var useSwiper_1 = require("./hooks/useSwiper");
48
48
  var createComponent = function (type, getDesignType, getLocation, designType) {
49
49
  if (designType === void 0) { designType = 'NONE'; }
50
- return function (normalStyle, hoverStyle, isHovered) {
50
+ return function (normalStyle, hoverStyle, isHovered, size) {
51
+ if (size === void 0) { size = 'MEDIUM'; }
51
52
  var normalDesign = getDesignType(normalStyle);
52
53
  var hoverDesign = getDesignType(hoverStyle);
53
54
  if (isHovered && hoverDesign === 'NONE')
@@ -57,7 +58,8 @@ var createComponent = function (type, getDesignType, getLocation, designType) {
57
58
  return {
58
59
  type: type,
59
60
  position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
60
- designType: designType
61
+ designType: designType,
62
+ size: size
61
63
  };
62
64
  };
63
65
  };
@@ -118,12 +120,12 @@ function ContentsCarousel(props) {
118
120
  bottom: '0px',
119
121
  left: '0px'
120
122
  };
121
- var renderElements = function (component) {
123
+ var renderElements = function (component, style) {
122
124
  switch (component.type) {
123
125
  case 'PREV':
124
- return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn }));
126
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn, styles: customNavigationNormalStyle, style: style }));
125
127
  case 'NEXT':
126
- return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn }));
128
+ return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn, style: style }));
127
129
  case 'PROGRESSBAR':
128
130
  return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
129
131
  default:
@@ -154,9 +156,9 @@ function ContentsCarousel(props) {
154
156
  else {
155
157
  delete positionRefs.current[position];
156
158
  }
157
- }, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), {
158
- // pointerEvents: 'none',
159
- zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) { return renderElements(component); }) })) }), position));
159
+ }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentscarousel-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
160
+ return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
161
+ }) })) }), position));
160
162
  }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () {
161
163
  setIsHovered(true);
162
164
  }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-columns": CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, "data-number-of-items": CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, "data-column-gap": columnGap, "data-cols": CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ 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: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), (0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ className: "cb-contentscarousel-layout-box", ref: layoutRef, style: __assign({}, pointerEventsObj) }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-contentscarousel-wrapper", ccbInset: ccbInset, customStyle: isHovered
@@ -5,8 +5,9 @@ export interface CustomNavigationNextBtnProps {
5
5
  styles: CustomNavigationProps;
6
6
  hoverStyles: CustomNavigationProps;
7
7
  onClick?: () => void;
8
+ style?: React.CSSProperties;
8
9
  }
9
- export declare const CustomNavigationNextBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
10
+ export declare const CustomNavigationNextBtn: ({ isDisabled, styles, hoverStyles, onClick, style }: CustomNavigationNextBtnProps) => JSX.Element;
10
11
  export interface FlexBoxProps {
11
12
  direction?: 'row' | 'column';
12
13
  justifyContent?: string;
@@ -44,7 +44,7 @@ var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pds
44
44
  var styled_components_1 = __importStar(require("styled-components"));
45
45
  var navigationConfigs_1 = require("./navigationConfigs");
46
46
  var CustomNavigationNextBtn = function (_a) {
47
- var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick;
47
+ var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick, style = _a.style;
48
48
  var nextButton = styles.nextBtnType === 'NONE'
49
49
  ? undefined
50
50
  : navigationConfigs_1.nextButtonMappedIcons[styles.nextBtnType || 'DESIGN1'];
@@ -58,7 +58,7 @@ var CustomNavigationNextBtn = function (_a) {
58
58
  buttonSize = 72;
59
59
  iconSize = 40;
60
60
  }
61
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nextButton && ((0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "cb-contentscarousel-next-button", disabled: isDisabled, "$size": styles.nextBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: nextButton.shapeType, borderColorKey: nextButton.borderColorKey, overrideBaseColorHex: styles.nextBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles.nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.nextBtnSecondaryColor, overrideIconColorHexHover: hoverStyles.nextBtnSecondaryColor, shadow: nextButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
61
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nextButton && ((0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "cb-contentscarousel-next-button", disabled: isDisabled, "$size": styles.nextBtnSize, style: style }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: nextButton.shapeType, borderColorKey: nextButton.borderColorKey, overrideBaseColorHex: styles.nextBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles.nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.nextBtnSecondaryColor, overrideIconColorHexHover: hoverStyles.nextBtnSecondaryColor, shadow: nextButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
62
62
  };
63
63
  exports.CustomNavigationNextBtn = CustomNavigationNextBtn;
64
64
  var S_NextButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
@@ -5,8 +5,9 @@ export interface CustomNavigationPrevBtnProps {
5
5
  styles: CustomNavigationProps;
6
6
  hoverStyles?: CustomNavigationProps;
7
7
  onClick?: () => void;
8
+ style?: React.CSSProperties;
8
9
  }
9
- export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationPrevBtnProps) => JSX.Element;
10
+ export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, hoverStyles, onClick, style }: CustomNavigationPrevBtnProps) => JSX.Element;
10
11
  export interface FlexBoxProps {
11
12
  direction?: 'row' | 'column';
12
13
  justifyContent?: string;
@@ -44,7 +44,7 @@ var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pds
44
44
  var styled_components_1 = __importStar(require("styled-components"));
45
45
  var navigationConfigs_1 = require("./navigationConfigs");
46
46
  var CustomNavigationPrevBtn = function (_a) {
47
- var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick;
47
+ var isDisabled = _a.isDisabled, styles = _a.styles, hoverStyles = _a.hoverStyles, onClick = _a.onClick, style = _a.style;
48
48
  var prevButton = styles.prevBtnType === 'NONE'
49
49
  ? undefined
50
50
  : navigationConfigs_1.prevButtonMappedIcons[styles.prevBtnType || 'DESIGN1'];
@@ -58,7 +58,7 @@ var CustomNavigationPrevBtn = function (_a) {
58
58
  buttonSize = 72;
59
59
  iconSize = 40;
60
60
  }
61
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-contentscarousel-prev-button", disabled: isDisabled, "$size": styles.prevBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideBaseColorHex: styles.prevBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnPrimaryColor, overrideIconColorHex: styles.prevBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnSecondaryColor, shadow: prevButton.shadow, onClick: onClick, useDefaultActiveStyle: false, useDefaultHoverStyle: false }) }))) }));
61
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-contentscarousel-prev-button", disabled: isDisabled, "$size": styles.prevBtnSize, style: style }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideBaseColorHex: styles.prevBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnPrimaryColor, overrideIconColorHex: styles.prevBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnSecondaryColor, shadow: prevButton.shadow, onClick: onClick, useDefaultActiveStyle: false, useDefaultHoverStyle: false }) }))) }));
62
62
  };
63
63
  exports.CustomNavigationPrevBtn = CustomNavigationPrevBtn;
64
64
  var S_PrevButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n\n ", ";\n"], ["\n cursor: pointer;\n\n ", ";\n"])), function (_a) {
@@ -0,0 +1,5 @@
1
+ import type { ContentsCarouselElementsProps } from '../ContentsCarousel';
2
+ import type { CSSProperties } from 'styled-components';
3
+ export declare function getPosition(position: string, designType: string, size: string, elementType: ContentsCarouselElementsProps['type'] | 'GROUP'): CSSProperties;
4
+ export declare const POS_INSET: Record<string, CSSProperties>;
5
+ export declare const POS_OUTSET_NAVIGATION: Record<string, CSSProperties>;
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.POS_OUTSET_NAVIGATION = exports.POS_INSET = exports.getPosition = void 0;
4
+ var GAP = 8;
5
+ function getPosition(position, designType, size, elementType) {
6
+ if (position.startsWith('OUTSET')) {
7
+ if (elementType === 'GROUP') {
8
+ return POS_OUTSET_GROUP[position];
9
+ }
10
+ if (elementType === 'PROGRESSBAR') {
11
+ return exports.POS_INSET[position];
12
+ }
13
+ if (elementType === 'NEXT' || elementType === 'PREV') {
14
+ return exports.POS_OUTSET_NAVIGATION[position];
15
+ }
16
+ var val = POS_OUTSET_PAGINATION[position][designType];
17
+ return val;
18
+ // return POS_OUTSET_PAGINATION[position][designType][size];
19
+ }
20
+ if (elementType === 'GROUP') {
21
+ return exports.POS_INSET[position];
22
+ }
23
+ return {};
24
+ }
25
+ exports.getPosition = getPosition;
26
+ var POS_OUTSET_PAGINATION = {
27
+ OUTSET1: {
28
+ DESIGN1: { bottom: 15 },
29
+ DESIGN3: { bottom: 15 },
30
+ DESIGN5: { bottom: 15 },
31
+ DESIGN7: { bottom: 15 },
32
+ DESIGN9: { bottom: 15 },
33
+ DESIGN11: { bottom: 15 },
34
+ DESIGN13: { bottom: 15 },
35
+ DESIGN15: { bottom: 20 }
36
+ },
37
+ OUTSET2: {
38
+ DESIGN1: { bottom: 15 },
39
+ DESIGN3: { bottom: 15 },
40
+ DESIGN5: { bottom: 15 },
41
+ DESIGN7: { bottom: 15 },
42
+ DESIGN9: { bottom: 15 },
43
+ DESIGN11: { bottom: 15 },
44
+ DESIGN13: { bottom: 15 },
45
+ DESIGN15: { bottom: 20 }
46
+ },
47
+ OUTSET3: {
48
+ DESIGN1: { bottom: 15 },
49
+ DESIGN3: { bottom: 15 },
50
+ DESIGN5: { bottom: 15 },
51
+ DESIGN7: { bottom: 15 },
52
+ DESIGN9: { bottom: 15 },
53
+ DESIGN11: { bottom: 15 },
54
+ DESIGN13: { bottom: 15 },
55
+ DESIGN15: { bottom: 20 }
56
+ },
57
+ OUTSET4: {
58
+ DESIGN1: { left: 15 },
59
+ DESIGN3: { left: 15 },
60
+ DESIGN5: { left: 15 },
61
+ DESIGN7: { left: 15 },
62
+ DESIGN9: { left: 15 },
63
+ DESIGN11: { left: 15 },
64
+ DESIGN13: { left: 15 },
65
+ DESIGN15: { left: 15 }
66
+ },
67
+ OUTSET5: {
68
+ DESIGN1: { left: 15 },
69
+ DESIGN3: { left: 15 },
70
+ DESIGN5: { left: 15 },
71
+ DESIGN7: { left: 15 },
72
+ DESIGN9: { left: 15 },
73
+ DESIGN11: { left: 15 },
74
+ DESIGN13: { left: 15 },
75
+ DESIGN15: { left: 15 }
76
+ },
77
+ OUTSET6: {
78
+ DESIGN1: { left: 15 },
79
+ DESIGN3: { left: 15 },
80
+ DESIGN5: { left: 15 },
81
+ DESIGN7: { left: 15 },
82
+ DESIGN9: { left: 15 },
83
+ DESIGN11: { left: 15 },
84
+ DESIGN13: { left: 15 },
85
+ DESIGN15: { left: 15 }
86
+ },
87
+ OUTSET7: {
88
+ DESIGN1: { top: 15 },
89
+ DESIGN3: { top: 15 },
90
+ DESIGN5: { top: 15 },
91
+ DESIGN7: { top: 15 },
92
+ DESIGN9: { top: 15 },
93
+ DESIGN11: { top: 15 },
94
+ DESIGN13: { top: 15 },
95
+ DESIGN15: { top: 20 }
96
+ },
97
+ OUTSET8: {
98
+ DESIGN1: { top: 15 },
99
+ DESIGN3: { top: 15 },
100
+ DESIGN5: { top: 15 },
101
+ DESIGN7: { top: 15 },
102
+ DESIGN9: { top: 15 },
103
+ DESIGN11: { top: 15 },
104
+ DESIGN13: { top: 15 },
105
+ DESIGN15: { top: 20 }
106
+ },
107
+ OUTSET9: {
108
+ DESIGN1: { top: 15 },
109
+ DESIGN3: { top: 15 },
110
+ DESIGN5: { top: 15 },
111
+ DESIGN7: { top: 15 },
112
+ DESIGN9: { top: 15 },
113
+ DESIGN11: { top: 15 },
114
+ DESIGN13: { top: 15 },
115
+ DESIGN15: { top: 20 }
116
+ },
117
+ OUTSET10: {
118
+ DESIGN1: { right: 15 },
119
+ DESIGN3: { right: 15 },
120
+ DESIGN5: { right: 15 },
121
+ DESIGN7: { right: 15 },
122
+ DESIGN9: { right: 15 },
123
+ DESIGN11: { right: 15 },
124
+ DESIGN13: { right: 15 },
125
+ DESIGN15: { right: 15 }
126
+ },
127
+ OUTSET11: {
128
+ DESIGN1: { right: 15 },
129
+ DESIGN3: { right: 15 },
130
+ DESIGN5: { right: 15 },
131
+ DESIGN7: { right: 15 },
132
+ DESIGN9: { right: 15 },
133
+ DESIGN11: { right: 15 },
134
+ DESIGN13: { right: 15 },
135
+ DESIGN15: { right: 15 }
136
+ },
137
+ OUTSET12: {
138
+ DESIGN1: { right: 15 },
139
+ DESIGN3: { right: 15 },
140
+ DESIGN5: { right: 15 },
141
+ DESIGN7: { right: 15 },
142
+ DESIGN9: { right: 15 },
143
+ DESIGN11: { right: 15 },
144
+ DESIGN13: { right: 15 },
145
+ DESIGN15: { right: 15 }
146
+ }
147
+ };
148
+ exports.POS_INSET = {
149
+ INSET1: { top: GAP, left: GAP },
150
+ INSET2: { top: GAP, left: '50%', transform: 'translateX(-50%)' },
151
+ INSET3: { top: GAP, right: GAP },
152
+ INSET4: { top: '50%', right: GAP, transform: 'translateY(-50%)' },
153
+ INSET5: { bottom: GAP, right: GAP },
154
+ INSET6: { bottom: GAP, left: '50%', transform: 'translateX(-50%)' },
155
+ INSET7: { left: GAP, bottom: GAP },
156
+ INSET8: { top: '50%', left: GAP, transform: 'translateY(-50%)' }
157
+ };
158
+ exports.POS_OUTSET_NAVIGATION = {
159
+ OUTSET1: { bottom: 20 },
160
+ OUTSET2: { bottom: 20 },
161
+ OUTSET3: { bottom: 20 },
162
+ OUTSET4: { left: 20 },
163
+ OUTSET5: { left: 20 },
164
+ OUTSET6: { left: 20 },
165
+ OUTSET7: { top: 20 },
166
+ OUTSET8: { top: 20 },
167
+ OUTSET9: { top: 20 },
168
+ OUTSET10: { right: 20 },
169
+ OUTSET11: { right: 20 },
170
+ OUTSET12: { right: 20 }
171
+ };
172
+ var POS_OUTSET_GROUP = {
173
+ OUTSET1: {
174
+ top: 0,
175
+ height: 0
176
+ },
177
+ OUTSET2: {
178
+ bottom: '100%',
179
+ height: 0,
180
+ left: '50%',
181
+ transform: 'translateX(-50%)'
182
+ },
183
+ OUTSET3: {
184
+ bottom: '100%',
185
+ height: 0,
186
+ right: 0,
187
+ justifyContent: 'flex-start'
188
+ },
189
+ OUTSET4: {
190
+ top: 0,
191
+ width: 0,
192
+ right: 0
193
+ },
194
+ OUTSET5: {
195
+ top: '50%',
196
+ width: 0,
197
+ right: 0,
198
+ transform: 'translateY(-50%)'
199
+ },
200
+ OUTSET6: {
201
+ bottom: 0,
202
+ width: 0,
203
+ right: 0
204
+ },
205
+ OUTSET7: {
206
+ bottom: 0,
207
+ height: 0,
208
+ right: 0
209
+ },
210
+ OUTSET8: {
211
+ bottom: 0,
212
+ height: 0,
213
+ left: '50%',
214
+ transform: 'translateX(-50%)'
215
+ },
216
+ OUTSET9: {
217
+ bottom: 0,
218
+ height: 0,
219
+ left: 0
220
+ },
221
+ OUTSET10: {
222
+ bottom: 0,
223
+ width: 0,
224
+ left: 0
225
+ },
226
+ OUTSET11: {
227
+ top: '50%',
228
+ width: 0,
229
+ left: 0,
230
+ transform: 'translateY(-50%)'
231
+ },
232
+ OUTSET12: {
233
+ top: 0,
234
+ width: 0,
235
+ left: 0
236
+ }
237
+ };
238
+ // export const POS_OUTSET = {
239
+ // PAGINATION: POS_OUTSET_PAGINATION,
240
+ // PREV: POS_OUTSET_NAVIGATION,
241
+ // NEXT: POS_OUTSET_NAVIGATION,
242
+ // GROUP: POS_OUTSET_GROUP
243
+ // };
@@ -13,6 +13,6 @@ export declare const useFlexGridLayout: ({ components }: {
13
13
  left: string;
14
14
  };
15
15
  componentGroups: Record<string, ContentsCarouselElementsProps[]>;
16
- getPositionStyle: (position: string, ccbInset: Record<string, string>) => CSSProperties;
16
+ getPositionStyle: (position: string, ccbInset: Record<string, string>, designType: string, size: 'LARGE' | 'MEDIUM' | 'SMALL' | 'GROUP', elementType: string) => CSSProperties;
17
17
  getComponentGroupLayout: (components: ContentsCarouselElementsProps[], position: string) => CSSProperties;
18
18
  };
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.useFlexGridLayout = void 0;
15
15
  var react_1 = require("react");
16
+ var elementPositions_1 = require("../../SlideBanner/hooks/elementPositions");
16
17
  var useFlexGridLayout = function (_a) {
17
18
  var components = _a.components;
18
19
  var _b = (0, react_1.useState)({ top: 0, right: 0, bottom: 0, left: 0 }), groupSizes = _b[0], setGroupSizes = _b[1];
@@ -60,50 +61,33 @@ var useFlexGridLayout = function (_a) {
60
61
  return directions[position];
61
62
  };
62
63
  // 위치에 따른 스타일 결정 (CCB 크기를 고려)
63
- var getPositionStyle = function (position, ccbInset) {
64
+ var getPositionStyle = function (position, ccbInset, designType, size, elementType) {
65
+ var EAST = ['OUTSET4', 'OUTSET5', 'OUTSET6'];
66
+ var WEST = ['OUTSET10', 'OUTSET11', 'OUTSET12'];
67
+ var SOUTH = ['OUTSET7', 'OUTSET8', 'OUTSET9'];
68
+ var NORTH = ['OUTSET1', 'OUTSET2', 'OUTSET3'];
69
+ var isEAST = EAST.includes(position);
70
+ var isWEST = WEST.includes(position);
71
+ var isSOUTH = SOUTH.includes(position);
72
+ var isNORTH = NORTH.includes(position);
64
73
  var base = {
65
- position: 'absolute',
74
+ position: 'relative',
66
75
  display: 'flex',
67
- alignItems: 'center',
68
- justifyContent: 'center'
76
+ alignItems: isSOUTH ? 'flex-start' : isNORTH ? 'flex-end' : 'center',
77
+ justifyContent: isEAST ? 'flex-start' : isWEST ? 'flex-end' : 'center'
69
78
  };
70
- // CCB의 중앙 위치 계산
71
- var ccbTop = parseFloat(ccbInset.top) || 0;
72
- var ccbRight = parseFloat(ccbInset.right) || 0;
73
- var ccbBottom = parseFloat(ccbInset.bottom) || 0;
74
- var ccbLeft = parseFloat(ccbInset.left) || 0;
75
- // CCB의 실제 크기와 중앙 위치 계산
76
- var ccbWidth = layoutSize.width - ccbLeft - ccbRight;
77
- var ccbHeight = layoutSize.height - ccbTop - ccbBottom;
78
- var ccbCenterX = ccbLeft + ccbWidth / 2;
79
- var ccbCenterY = ccbTop + ccbHeight / 2;
80
- var positions = {
81
- OUTSET1: { top: -50, left: ccbLeft },
82
- OUTSET2: { top: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
83
- OUTSET3: { top: -50, right: ccbRight },
84
- OUTSET4: { top: ccbTop, right: -50 },
85
- OUTSET5: { top: "".concat(ccbCenterY, "px"), right: -50, transform: 'translateY(-50%)' },
86
- OUTSET6: { bottom: ccbBottom, right: -50 },
87
- OUTSET7: { bottom: -50, right: ccbRight },
88
- OUTSET8: { bottom: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
89
- OUTSET9: { bottom: -50, left: ccbLeft },
90
- OUTSET10: { bottom: ccbBottom, left: -50 },
91
- OUTSET11: { top: "".concat(ccbCenterY, "px"), left: -50, transform: 'translateY(-50%)' },
92
- OUTSET12: { top: ccbTop, left: -50 },
93
- INSET1: { top: ccbTop + GAP, left: ccbLeft + GAP },
94
- INSET2: { top: ccbTop + GAP, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
95
- INSET3: { top: ccbTop + GAP, right: ccbRight + GAP },
96
- INSET4: { top: "".concat(ccbCenterY, "px"), right: ccbRight + GAP, transform: 'translateY(-50%)' },
97
- INSET5: { bottom: ccbBottom + GAP, right: ccbRight + GAP },
98
- INSET6: {
99
- bottom: ccbBottom + GAP,
100
- left: "".concat(ccbCenterX, "px"),
101
- transform: 'translateX(-50%)'
102
- },
103
- INSET7: { bottom: ccbBottom + GAP, left: ccbLeft + GAP },
104
- INSET8: { top: "".concat(ccbCenterY, "px"), left: ccbLeft + GAP, transform: 'translateY(-50%)' }
105
- };
106
- return __assign(__assign({}, base), positions[position]);
79
+ // // CCB의 중앙 위치 계산
80
+ // const ccbTop = parseFloat(ccbInset.top) || 0;
81
+ // const ccbRight = parseFloat(ccbInset.right) || 0;
82
+ // const ccbBottom = parseFloat(ccbInset.bottom) || 0;
83
+ // const ccbLeft = parseFloat(ccbInset.left) || 0;
84
+ // // CCB의 실제 크기와 중앙 위치 계산
85
+ // const ccbWidth = layoutSize.width - ccbLeft - ccbRight;
86
+ // const ccbHeight = layoutSize.height - ccbTop - ccbBottom;
87
+ // const ccbCenterX = ccbLeft + ccbWidth / 2;
88
+ // const ccbCenterY = ccbTop + ccbHeight / 2;
89
+ var pos = (0, elementPositions_1.getPosition)(position, designType, size, elementType);
90
+ return __assign(__assign({}, base), pos);
107
91
  };
108
92
  // 컴포넌트 그룹 레이아웃
109
93
  var getComponentGroupLayout = function (components, position) {
@@ -129,8 +113,7 @@ var useFlexGridLayout = function (_a) {
129
113
  return {
130
114
  display: 'flex',
131
115
  flexDirection: isHorizontal ? 'row' : 'column',
132
- gap: '8px',
133
- alignItems: 'center'
116
+ gap: '8px'
134
117
  };
135
118
  };
136
119
  // ccbInset 계산
@@ -10,6 +10,7 @@ export type ContentsListElementsProps = {
10
10
  type: ComponentType;
11
11
  position: OUTSET_POSTIION | INSET_POSTIION;
12
12
  designType: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
13
+ size: 'LARGE' | 'MEDIUM' | 'SMALL';
13
14
  };
14
15
  declare function ContentsList(props: Props): JSX.Element;
15
16
  export default ContentsList;
@@ -42,8 +42,10 @@ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
42
42
  var CustomPagination_1 = require("./components/CustomPagination");
43
43
  var contentsListUtils_1 = require("./contentsListUtils");
44
44
  var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
45
- var createComponent = function (type, getDesignType, getLocation, designType) {
46
- return function (normalStyle, hoverStyle, isHovered) {
45
+ var createComponent = function (type, getDesignType, getLocation, designType, size) {
46
+ if (size === void 0) { size = 'MEDIUM'; }
47
+ return function (normalStyle, hoverStyle, isHovered, size) {
48
+ if (size === void 0) { size = 'MEDIUM'; }
47
49
  var normalDesign = getDesignType(normalStyle);
48
50
  var hoverDesign = getDesignType(hoverStyle);
49
51
  if (isHovered && hoverDesign === 'NONE')
@@ -53,7 +55,8 @@ var createComponent = function (type, getDesignType, getLocation, designType) {
53
55
  return {
54
56
  type: type,
55
57
  position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
56
- designType: designType
58
+ designType: designType,
59
+ size: size
57
60
  };
58
61
  };
59
62
  };
@@ -131,7 +134,7 @@ function ContentsList(props) {
131
134
  var listMinHeight = oneCompositionMinHeight * numberOfRows +
132
135
  (numberOfRows - 1) * rowGap +
133
136
  paddingTB;
134
- var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, paginationNormalStyle.type || 'NONE');
137
+ var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, paginationNormalStyle.type || 'NONE', paginationNormalStyle.size || 'MEDIUM');
135
138
  var components = [
136
139
  createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
137
140
  ].filter(function (component) { return component !== undefined; });
@@ -144,10 +147,10 @@ function ContentsList(props) {
144
147
  bottom: '0px',
145
148
  left: '0px'
146
149
  };
147
- var renderElements = function (component) {
150
+ var renderElements = function (component, positionStyle) {
148
151
  switch (component.type) {
149
152
  case 'PAGINATION':
150
- return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick }));
153
+ return ((0, jsx_runtime_1.jsx)("div", __assign({ style: positionStyle }, { children: (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? paginationHoverStyle : paginationNormalStyle, current: currentPage, total: totalPage, onPageClick: handlePageClick, style: positionStyle }) })));
151
154
  default:
152
155
  return null;
153
156
  }
@@ -170,7 +173,9 @@ function ContentsList(props) {
170
173
  else {
171
174
  delete positionRefs.current[position];
172
175
  }
173
- }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, groupComponents[0].designType)), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) { return renderElements(component); }) })) }), position));
176
+ }, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP', 'GROUP')), { zIndex: 3, position: 'absolute' }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-contentslist-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
177
+ return renderElements(component, getPositionStyle(position, ccbInset, component.designType, component.size, component.type));
178
+ }) })) }), position));
174
179
  }), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ id: "contentslist-box", className: "cb-layout-box ccb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), { overflow: 'hidden' }), hoverStyle: __assign(__assign({}, hoverStyle), { overflow: 'hidden' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, "data-number-of-items": CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length, "data-number-of-columns": Math.min(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-row-gap": rowGap, "data-column-gap": columnGap, "data-cols": Math.min(CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS.length), "data-min-width": listMinWidth, "data-min-height": listMinHeight, "data-inset-top": parseFloat(ccbInset.top), "data-inset-bottom": parseFloat(ccbInset.bottom) }, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ 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: index, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef })) })), (0, jsx_runtime_1.jsx)(S_Overlay, { style: overlayStyle }), (0, jsx_runtime_1.jsx)(S_ContentsListLayout, __assign({ className: "cb-contentslist-layout-box", ref: layoutRef, style: {
175
180
  display: layout.display,
176
181
  flexDirection: layout.flexDirection,
@@ -4,7 +4,8 @@ interface Props {
4
4
  current: number;
5
5
  total: number;
6
6
  styles: CustomPaginationProps;
7
+ style: React.CSSProperties;
7
8
  onPageClick: (page: number) => void;
8
9
  }
9
- export declare const CustomPagination: ({ current, total, styles, onPageClick }: Props) => JSX.Element;
10
+ export declare const CustomPagination: ({ current, total, styles, style, onPageClick }: Props) => JSX.Element;
10
11
  export default CustomPagination;
@@ -23,7 +23,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
23
23
  var styled_components_1 = __importDefault(require("styled-components"));
24
24
  var paginationConfigs_1 = require("./paginationConfigs");
25
25
  var CustomPagination = function (_a) {
26
- var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, styles = _a.styles, onPageClick = _a.onPageClick;
26
+ var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, styles = _a.styles, style = _a.style, onPageClick = _a.onPageClick;
27
27
  var getPageGroupStart = function (page) {
28
28
  return Math.floor((page - 1) / 5) * 5 + 1;
29
29
  };
@@ -0,0 +1,4 @@
1
+ import type { ContentsListElementsProps } from '../ContentsList';
2
+ import type { CSSProperties } from 'react';
3
+ export declare function getPosition(position: string, designType: string, size: string, elementType: ContentsListElementsProps['type'] | 'GROUP'): CSSProperties;
4
+ export declare const POS_INSET: Record<string, CSSProperties>;