pds-dev-kit-web-test 2.7.229 → 2.7.234
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/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +11 -8
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +5 -5
- package/dist/src/sub/DynamicLayout/mocks.d.ts +3596 -1
- package/dist/src/sub/DynamicLayout/mocks.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +11 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +6 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +5 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +20 -21
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +8 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.js +679 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +6 -3
- 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
|
-
|
|
6
|
-
require("./mock_slideBanner");
|
|
5
|
+
require("./mock_contentsList");
|
|
6
|
+
var mock_slideBanner_1 = 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
|
-
|
|
16
|
-
|
|
15
|
+
mock_slideBanner_1.SAMPLE_SLIDEBANNER_CB
|
|
16
|
+
// SAMPLE_LIST_CB
|
|
17
17
|
// ...MOCK_COMPONENT_BLOCKS
|
|
18
18
|
],
|
|
19
19
|
display: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { INSET_POSTIION, OUTSET_POSTIION } from './types';
|
|
2
|
+
import type { CB_STYLE_PROP_CONTENTSCAROUSELBUTTON_SPEC_PREVBTNSTYLE_TYPE, INSET_POSTIION, OUTSET_POSTIION } from './types';
|
|
3
3
|
import type { CB_CONTENTSCAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
|
|
4
4
|
import type { CB_CONTENTSCAROUSEL_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
5
5
|
type Props = CB_CONTENTSCAROUSEL_PROPERTIES_TYPE & IndexForIntersection & {
|
|
@@ -9,6 +9,7 @@ type ComponentType = 'PREV' | 'NEXT' | 'PROGRESSBAR';
|
|
|
9
9
|
export type ContentsCarouselElementsProps = {
|
|
10
10
|
type: ComponentType;
|
|
11
11
|
position: OUTSET_POSTIION | INSET_POSTIION;
|
|
12
|
+
designType: CB_STYLE_PROP_CONTENTSCAROUSELBUTTON_SPEC_PREVBTNSTYLE_TYPE;
|
|
12
13
|
};
|
|
13
14
|
declare function ContentsCarousel(props: Props): JSX.Element;
|
|
14
15
|
export default ContentsCarousel;
|
|
@@ -45,7 +45,8 @@ var ContentsCarouselCore_1 = __importDefault(require("./ContentsCarouselCore"));
|
|
|
45
45
|
var contentsCarouselUtils_1 = require("./contentsCarouselUtils");
|
|
46
46
|
var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
|
|
47
47
|
var useSwiper_1 = require("./hooks/useSwiper");
|
|
48
|
-
var createComponent = function (type, getDesignType, getLocation) {
|
|
48
|
+
var createComponent = function (type, getDesignType, getLocation, designType) {
|
|
49
|
+
if (designType === void 0) { designType = 'NONE'; }
|
|
49
50
|
return function (normalStyle, hoverStyle, isHovered) {
|
|
50
51
|
var normalDesign = getDesignType(normalStyle);
|
|
51
52
|
var hoverDesign = getDesignType(hoverStyle);
|
|
@@ -55,7 +56,8 @@ var createComponent = function (type, getDesignType, getLocation) {
|
|
|
55
56
|
return undefined;
|
|
56
57
|
return {
|
|
57
58
|
type: type,
|
|
58
|
-
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle)
|
|
59
|
+
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
|
|
60
|
+
designType: designType
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
63
|
};
|
|
@@ -96,12 +98,16 @@ function ContentsCarousel(props) {
|
|
|
96
98
|
: CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
|
|
97
99
|
var hasEffect = !isNoneEffectType;
|
|
98
100
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
99
|
-
var createPrevButton = createComponent('PREV', function (style) { return style.prevBtnType || 'NONE'; }, function (style) { return style.prevBtnLocation || 'OUTSET1'; });
|
|
100
|
-
var createNextButton = createComponent('NEXT', function (style) { return style.nextBtnType || 'NONE'; }, function (style) { return style.nextBtnLocation || 'OUTSET1'; });
|
|
101
|
+
var createPrevButton = createComponent('PREV', function (style) { return style.prevBtnType || 'NONE'; }, function (style) { return style.prevBtnLocation || 'OUTSET1'; }, customNavigationNormalStyle.prevBtnType || 'NONE');
|
|
102
|
+
var createNextButton = createComponent('NEXT', function (style) { return style.nextBtnType || 'NONE'; }, function (style) { return style.nextBtnLocation || 'OUTSET1'; }, customNavigationNormalStyle.nextBtnType || 'NONE');
|
|
101
103
|
var components = [
|
|
102
104
|
createPrevButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
|
|
103
105
|
createNextButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
|
|
104
|
-
{
|
|
106
|
+
{
|
|
107
|
+
type: 'PROGRESSBAR',
|
|
108
|
+
position: 'INSET5',
|
|
109
|
+
designType: customProgressbarNormalStyle.type || 'NONE'
|
|
110
|
+
}
|
|
105
111
|
].filter(function (component) { return component !== undefined; });
|
|
106
112
|
var _k = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _k.layoutRef, positionRefs = _k.positionRefs,
|
|
107
113
|
// ccbInset,
|
|
@@ -50,13 +50,13 @@ var CustomNavigationNextBtn = function (_a) {
|
|
|
50
50
|
: navigationConfigs_1.nextButtonMappedIcons[styles.nextBtnType || 'DESIGN1'];
|
|
51
51
|
var buttonSize = 'large';
|
|
52
52
|
var iconSize = 24;
|
|
53
|
-
if (styles.
|
|
54
|
-
buttonSize =
|
|
55
|
-
iconSize =
|
|
53
|
+
if (styles.prevBtnSize === 'SMALL') {
|
|
54
|
+
buttonSize = 40;
|
|
55
|
+
iconSize = 20;
|
|
56
56
|
}
|
|
57
|
-
if (styles.
|
|
58
|
-
buttonSize =
|
|
59
|
-
iconSize =
|
|
57
|
+
if (styles.prevBtnSize === 'LARGE') {
|
|
58
|
+
buttonSize = 72;
|
|
59
|
+
iconSize = 40;
|
|
60
60
|
}
|
|
61
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 }) }))) }));
|
|
62
62
|
};
|
|
@@ -51,12 +51,12 @@ var CustomNavigationPrevBtn = function (_a) {
|
|
|
51
51
|
var buttonSize = 'large';
|
|
52
52
|
var iconSize = 24;
|
|
53
53
|
if (styles.prevBtnSize === 'SMALL') {
|
|
54
|
-
buttonSize =
|
|
55
|
-
iconSize =
|
|
54
|
+
buttonSize = 40;
|
|
55
|
+
iconSize = 20;
|
|
56
56
|
}
|
|
57
57
|
if (styles.prevBtnSize === 'LARGE') {
|
|
58
|
-
buttonSize =
|
|
59
|
-
iconSize =
|
|
58
|
+
buttonSize = 72;
|
|
59
|
+
iconSize = 40;
|
|
60
60
|
}
|
|
61
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 }) }))) }));
|
|
62
62
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { OUTSET_POSTIION, INSET_POSTIION } from './types';
|
|
2
|
+
import type { OUTSET_POSTIION, INSET_POSTIION, CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE } from './types';
|
|
3
3
|
import type { CB_LIST } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
|
|
4
4
|
import type { CB_LIST_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
5
5
|
type Props = CB_LIST_PROPERTIES_TYPE & IndexForIntersection & {
|
|
@@ -9,6 +9,7 @@ type ComponentType = 'PAGINATION';
|
|
|
9
9
|
export type ContentsListElementsProps = {
|
|
10
10
|
type: ComponentType;
|
|
11
11
|
position: OUTSET_POSTIION | INSET_POSTIION;
|
|
12
|
+
designType: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
|
|
12
13
|
};
|
|
13
14
|
declare function ContentsList(props: Props): JSX.Element;
|
|
14
15
|
export default ContentsList;
|
|
@@ -42,7 +42,7 @@ 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) {
|
|
45
|
+
var createComponent = function (type, getDesignType, getLocation, designType) {
|
|
46
46
|
return function (normalStyle, hoverStyle, isHovered) {
|
|
47
47
|
var normalDesign = getDesignType(normalStyle);
|
|
48
48
|
var hoverDesign = getDesignType(hoverStyle);
|
|
@@ -52,7 +52,8 @@ var createComponent = function (type, getDesignType, getLocation) {
|
|
|
52
52
|
return undefined;
|
|
53
53
|
return {
|
|
54
54
|
type: type,
|
|
55
|
-
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle)
|
|
55
|
+
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
|
|
56
|
+
designType: designType
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
59
|
};
|
|
@@ -130,7 +131,7 @@ function ContentsList(props) {
|
|
|
130
131
|
var listMinHeight = oneCompositionMinHeight * numberOfRows +
|
|
131
132
|
(numberOfRows - 1) * rowGap +
|
|
132
133
|
paddingTB;
|
|
133
|
-
var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; });
|
|
134
|
+
var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, paginationNormalStyle.type || 'NONE');
|
|
134
135
|
var components = [
|
|
135
136
|
createPagination(paginationNormalStyle, paginationHoverStyle, isHovered)
|
|
136
137
|
].filter(function (component) { return component !== undefined; });
|
|
@@ -169,7 +170,7 @@ function ContentsList(props) {
|
|
|
169
170
|
else {
|
|
170
171
|
delete positionRefs.current[position];
|
|
171
172
|
}
|
|
172
|
-
}, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), { 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));
|
|
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));
|
|
173
174
|
}), (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: {
|
|
174
175
|
display: layout.display,
|
|
175
176
|
flexDirection: layout.flexDirection,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ContentsListElementsProps } from '../ContentsList';
|
|
3
|
+
import type { CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE } from '../types';
|
|
3
4
|
import type { CSSProperties } from 'styled-components';
|
|
4
5
|
export declare const useFlexGridLayout: ({ components }: {
|
|
5
6
|
components: ContentsListElementsProps[];
|
|
@@ -13,6 +14,6 @@ export declare const useFlexGridLayout: ({ components }: {
|
|
|
13
14
|
left: string;
|
|
14
15
|
};
|
|
15
16
|
componentGroups: Record<string, ContentsListElementsProps[]>;
|
|
16
|
-
getPositionStyle: (position: string, ccbInset: Record<string, string
|
|
17
|
+
getPositionStyle: (position: string, ccbInset: Record<string, string>, designType: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE) => CSSProperties;
|
|
17
18
|
getComponentGroupLayout: (components: ContentsListElementsProps[], position: string) => CSSProperties;
|
|
18
19
|
};
|
|
@@ -19,6 +19,7 @@ var useFlexGridLayout = function (_a) {
|
|
|
19
19
|
var _c = (0, react_1.useState)({ width: 0, height: 0 }), layoutSize = _c[0], setLayoutSize = _c[1];
|
|
20
20
|
var layoutRef = (0, react_1.useRef)(null);
|
|
21
21
|
var positionRefs = (0, react_1.useRef)({});
|
|
22
|
+
console.log('useFlexGridLayout components:', components);
|
|
22
23
|
// 위치별로 컴포넌트 그룹화
|
|
23
24
|
var getComponentsByPosition = function () {
|
|
24
25
|
var groups = {};
|
|
@@ -60,7 +61,7 @@ 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) {
|
|
64
65
|
var base = {
|
|
65
66
|
position: 'absolute',
|
|
66
67
|
display: 'flex',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { INSET_POSTIION, OUTSET_POSTIION } from './types';
|
|
2
|
+
import type { CB_STYLE_PROP_SLIDEBANNER_SPEC_PREVBTNSTYLE_TYPE, INSET_POSTIION, OUTSET_POSTIION } from './types';
|
|
3
3
|
import type { CB_SLIDEBANNER } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
|
|
4
4
|
import type { CB_SLIDEBANNER_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
5
5
|
type Props = CB_SLIDEBANNER_PROPERTIES_TYPE & IndexForIntersection & {
|
|
@@ -9,6 +9,8 @@ type ComponentType = 'PREV' | 'NEXT' | 'PAGINATION' | 'PROGRESSBAR';
|
|
|
9
9
|
export type SlideBannerElementsProps = {
|
|
10
10
|
type: ComponentType;
|
|
11
11
|
position: OUTSET_POSTIION | INSET_POSTIION;
|
|
12
|
+
designType: CB_STYLE_PROP_SLIDEBANNER_SPEC_PREVBTNSTYLE_TYPE;
|
|
13
|
+
size: 'LARGE' | 'MEDIUM' | 'SMALL';
|
|
12
14
|
};
|
|
13
15
|
declare function SlideBanner(props: Props): JSX.Element;
|
|
14
16
|
export default SlideBanner;
|
|
@@ -42,12 +42,15 @@ var CustomNavigationNextBtn_1 = require("./components/CustomNavigationNextBtn");
|
|
|
42
42
|
var CustomNavigationPrevBtn_1 = require("./components/CustomNavigationPrevBtn");
|
|
43
43
|
var CustomPagination_1 = require("./components/CustomPagination");
|
|
44
44
|
var CustomProgressbar_1 = require("./components/CustomProgressbar");
|
|
45
|
+
var elementPositions_1 = require("./hooks/elementPositions");
|
|
45
46
|
var useFlexGridLayout_1 = require("./hooks/useFlexGridLayout");
|
|
46
47
|
var useSwiper_1 = require("./hooks/useSwiper");
|
|
47
48
|
var SlideBannerCore_1 = __importDefault(require("./SlideBannerCore"));
|
|
48
49
|
var slideBannerUtils_1 = require("./slideBannerUtils");
|
|
49
|
-
var createComponent = function (type, getDesignType, getLocation) {
|
|
50
|
-
|
|
50
|
+
var createComponent = function (type, getDesignType, getLocation, designType, size) {
|
|
51
|
+
if (size === void 0) { size = 'MEDIUM'; }
|
|
52
|
+
return function (normalStyle, hoverStyle, isHovered, size) {
|
|
53
|
+
if (size === void 0) { size = 'MEDIUM'; }
|
|
51
54
|
var normalDesign = getDesignType(normalStyle);
|
|
52
55
|
var hoverDesign = getDesignType(hoverStyle);
|
|
53
56
|
if (isHovered && hoverDesign === 'NONE')
|
|
@@ -56,7 +59,9 @@ var createComponent = function (type, getDesignType, getLocation) {
|
|
|
56
59
|
return undefined;
|
|
57
60
|
return {
|
|
58
61
|
type: type,
|
|
59
|
-
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle)
|
|
62
|
+
position: isHovered ? getLocation(hoverStyle) : getLocation(normalStyle),
|
|
63
|
+
designType: designType,
|
|
64
|
+
size: size
|
|
60
65
|
};
|
|
61
66
|
};
|
|
62
67
|
};
|
|
@@ -99,33 +104,25 @@ function SlideBanner(props) {
|
|
|
99
104
|
: CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
|
|
100
105
|
var hasEffect = !isNoneEffectType;
|
|
101
106
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
102
|
-
var createPrevButton = createComponent('PREV', function (style) { return style.prevBtnType || 'NONE'; }, function (style) { return style.prevBtnLocation || 'OUTSET1'; });
|
|
103
|
-
var createNextButton = createComponent('NEXT', function (style) { return style.nextBtnType || 'NONE'; }, function (style) { return style.nextBtnLocation || 'OUTSET1'; });
|
|
104
|
-
var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; });
|
|
107
|
+
var createPrevButton = createComponent('PREV', function (style) { return style.prevBtnType || 'NONE'; }, function (style) { return style.prevBtnLocation || 'OUTSET1'; }, customNavigationNormalStyle.prevBtnType || 'NONE', customNavigationNormalStyle.prevBtnSize || 'MEDIUM');
|
|
108
|
+
var createNextButton = createComponent('NEXT', function (style) { return style.nextBtnType || 'NONE'; }, function (style) { return style.nextBtnLocation || 'OUTSET1'; }, customNavigationNormalStyle.nextBtnType || 'NONE', customNavigationNormalStyle.nextBtnSize || 'MEDIUM');
|
|
109
|
+
var createPagination = createComponent('PAGINATION', function (style) { return style.type || 'NONE'; }, function (style) { return style.location || 'OUTSET1'; }, customPaginationNormalStyle.type || 'NONE', customPaginationNormalStyle.size || 'MEDIUM');
|
|
105
110
|
var components = [
|
|
106
111
|
createPrevButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
|
|
107
112
|
createNextButton(customNavigationNormalStyle, customNavigationHoverStyle, isHovered),
|
|
108
113
|
createPagination(customPaginationNormalStyle, customPaginationHoverStyle, isHovered),
|
|
109
114
|
{ type: 'PROGRESSBAR', position: 'INSET5' }
|
|
110
115
|
].filter(function (component) { return component !== undefined; });
|
|
111
|
-
var _k = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _k.layoutRef, positionRefs = _k.positionRefs,
|
|
112
|
-
|
|
113
|
-
componentGroups = _k.componentGroups, getPositionStyle = _k.getPositionStyle, getComponentGroupLayout = _k.getComponentGroupLayout;
|
|
114
|
-
var ccbInset = {
|
|
115
|
-
top: '0px',
|
|
116
|
-
right: '0px',
|
|
117
|
-
bottom: '0px',
|
|
118
|
-
left: '0px'
|
|
119
|
-
};
|
|
120
|
-
var renderElements = function (component) {
|
|
116
|
+
var _k = (0, useFlexGridLayout_1.useFlexGridLayout)({ components: components }), layoutRef = _k.layoutRef, positionRefs = _k.positionRefs, ccbInset = _k.ccbInset, componentGroups = _k.componentGroups, getPositionStyle = _k.getPositionStyle, getComponentGroupLayout = _k.getComponentGroupLayout;
|
|
117
|
+
var renderElements = function (component, positionStyle) {
|
|
121
118
|
var _a;
|
|
122
119
|
switch (component.type) {
|
|
123
120
|
case 'PREV':
|
|
124
|
-
return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn }));
|
|
121
|
+
return ((0, jsx_runtime_1.jsx)(CustomNavigationPrevBtn_1.CustomNavigationPrevBtn, { isDisabled: loop ? false : isBeginning, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickPrevBtn, style: positionStyle }));
|
|
125
122
|
case 'NEXT':
|
|
126
|
-
return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn }));
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(CustomNavigationNextBtn_1.CustomNavigationNextBtn, { isDisabled: loop ? false : isEnd, styles: customNavigationNormalStyle, hoverStyles: customNavigationHoverStyle, onClick: onClickNextBtn, style: positionStyle }));
|
|
127
124
|
case 'PAGINATION':
|
|
128
|
-
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn }));
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { styles: isHovered ? customPaginationHoverStyle : customPaginationNormalStyle, current: currentSlide, isPrevBtnDisabled: loop ? false : isBeginning, isNextBtnDisabled: loop ? false : isEnd, total: ((_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length) || 0, onBulletClick: onClickBullet, onPrevBtnClick: onClickPrevBtn, onNextBtnClick: onClickNextBtn, style: positionStyle }));
|
|
129
126
|
case 'PROGRESSBAR':
|
|
130
127
|
return ((0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, styles: isHovered ? customProgressbarHoverStyle : customProgressbarNormalStyle }));
|
|
131
128
|
default:
|
|
@@ -150,8 +147,10 @@ function SlideBanner(props) {
|
|
|
150
147
|
else {
|
|
151
148
|
delete positionRefs.current[position];
|
|
152
149
|
}
|
|
153
|
-
}, style: __assign(__assign({}, getPositionStyle(position, ccbInset)), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-slidebanner-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
|
|
154
|
-
|
|
150
|
+
}, style: __assign(__assign({}, getPositionStyle(position, ccbInset, 'GROUP', 'GROUP')), { zIndex: 3 }) }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "cb-slidebanner-button-layout-box", style: getComponentGroupLayout(groupComponents, position) }, { children: groupComponents.map(function (component) {
|
|
151
|
+
return renderElements(component, (0, elementPositions_1.getPosition)(position, component.designType, component.size));
|
|
152
|
+
}) })) }), position));
|
|
153
|
+
}), (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 () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); } }, { 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-slidebanner-layout-box", ref: layoutRef }, { children: (0, jsx_runtime_1.jsx)(S_SwiperWrapper, __assign({ className: "cb-slidebanner-wrapper", ccbInset: ccbInset, customStyle: isHovered ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle : slideBannerNormalStyle === null || slideBannerNormalStyle === void 0 ? void 0 : slideBannerNormalStyle.customStyle }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, className: "cb-slidebanner", onSwiper: onSwiper, onSlideChangeTransitionEnd: onSlideChangeTransitionEnd, onAutoplayTimeLeft: onAutoplayTimeLeft, slidesPerView: 1, styles: isHovered ? slideBannerHoverStyle : slideBannerNormalStyle, effect: CB_EFFECT_PROP_SLIDEBANNER_SPEC_TRANSITIONTYPE.toLowerCase() }, { children: (0, createCompositions_1.createCompositions)({
|
|
155
154
|
valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
|
|
156
155
|
queryPath: CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
|
|
157
156
|
limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
|
|
@@ -4,9 +4,10 @@ export interface CustomNavigationNextBtnProps {
|
|
|
4
4
|
isDisabled: boolean;
|
|
5
5
|
styles: CustomNavigationProps;
|
|
6
6
|
hoverStyles?: CustomNavigationProps;
|
|
7
|
+
style?: React.CSSProperties;
|
|
7
8
|
onClick?: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const CustomNavigationNextBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
|
|
10
|
+
export declare const CustomNavigationNextBtn: ({ isDisabled, styles, hoverStyles, style, onClick }: CustomNavigationNextBtnProps) => JSX.Element;
|
|
10
11
|
export interface FlexBoxProps {
|
|
11
12
|
direction?: 'row' | 'column';
|
|
12
13
|
justifyContent?: string;
|
|
@@ -44,24 +44,24 @@ 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, style = _a.style, onClick = _a.onClick;
|
|
48
48
|
var nextButton = styles.nextBtnType === 'NONE'
|
|
49
49
|
? undefined
|
|
50
50
|
: navigationConfigs_1.nextButtonMappedIcons[styles.nextBtnType || 'DESIGN1'];
|
|
51
|
-
var buttonSize =
|
|
52
|
-
var iconSize =
|
|
51
|
+
var buttonSize = 48;
|
|
52
|
+
var iconSize = 20;
|
|
53
53
|
if (styles.nextBtnSize === 'SMALL') {
|
|
54
|
-
buttonSize =
|
|
55
|
-
iconSize =
|
|
54
|
+
buttonSize = 40;
|
|
55
|
+
iconSize = 24;
|
|
56
56
|
}
|
|
57
57
|
if (styles.nextBtnSize === 'LARGE') {
|
|
58
|
-
buttonSize =
|
|
58
|
+
buttonSize = 80;
|
|
59
59
|
iconSize = 48;
|
|
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-slidebanner-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 === null || hoverStyles === void 0 ? void 0 : hoverStyles.nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.nextBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : 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-slidebanner-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 === null || hoverStyles === void 0 ? void 0 : hoverStyles.nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.nextBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.nextBtnSecondaryColor, shadow: nextButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
|
|
62
62
|
};
|
|
63
63
|
exports.CustomNavigationNextBtn = CustomNavigationNextBtn;
|
|
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) {
|
|
64
|
+
var S_NextButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n position: relative;\n\n ", ";\n"], ["\n cursor: pointer;\n position: relative;\n\n ", ";\n"])), function (_a) {
|
|
65
65
|
var disabled = _a.disabled;
|
|
66
66
|
return disabled && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "], ["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "])));
|
|
67
67
|
});
|
|
@@ -4,9 +4,10 @@ export interface CustomNavigationPrevBtnProps {
|
|
|
4
4
|
isDisabled: boolean;
|
|
5
5
|
styles: CustomNavigationProps;
|
|
6
6
|
hoverStyles?: CustomNavigationProps;
|
|
7
|
+
style?: React.CSSProperties;
|
|
7
8
|
onClick?: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, hoverStyles, onClick }: CustomNavigationPrevBtnProps) => JSX.Element;
|
|
10
|
+
export declare const CustomNavigationPrevBtn: ({ isDisabled, styles, hoverStyles, style, onClick }: 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, style = _a.style, onClick = _a.onClick;
|
|
48
48
|
var prevButton = styles.prevBtnType === 'NONE'
|
|
49
49
|
? undefined
|
|
50
50
|
: navigationConfigs_1.prevButtonMappedIcons[styles.prevBtnType || 'DESIGN1'];
|
|
@@ -58,10 +58,10 @@ var CustomNavigationPrevBtn = function (_a) {
|
|
|
58
58
|
buttonSize = 'xxlarge';
|
|
59
59
|
iconSize = 48;
|
|
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-slidebanner-prev-button", disabled: isDisabled }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: styles.prevBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.prevBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnSecondaryColor, shadow: prevButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: prevButton && ((0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "cb-slidebanner-prev-button", disabled: isDisabled, style: style }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: buttonSize, iconSize: iconSize, shapeType: prevButton.shapeType, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: styles.prevBtnPrimaryColor, overrideBaseColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: styles.prevBtnSecondaryColor, overrideIconColorHexHover: hoverStyles === null || hoverStyles === void 0 ? void 0 : hoverStyles.prevBtnSecondaryColor, shadow: prevButton.shadow, useDefaultActiveStyle: false, useDefaultHoverStyle: false, onClick: onClick }) }))) }));
|
|
62
62
|
};
|
|
63
63
|
exports.CustomNavigationPrevBtn = CustomNavigationPrevBtn;
|
|
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) {
|
|
64
|
+
var S_PrevButton = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n position: relative;\n\n ", ";\n"], ["\n cursor: pointer;\n position: relative;\n\n ", ";\n"])), function (_a) {
|
|
65
65
|
var disabled = _a.disabled;
|
|
66
66
|
return disabled && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "], ["\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n "])));
|
|
67
67
|
});
|
|
@@ -6,11 +6,12 @@ interface Props {
|
|
|
6
6
|
isPrevBtnDisabled: boolean;
|
|
7
7
|
isNextBtnDisabled: boolean;
|
|
8
8
|
styles: CustomPaginationProps;
|
|
9
|
+
style: React.CSSProperties;
|
|
9
10
|
onBulletClick: (index: number) => void;
|
|
10
11
|
onPrevBtnClick: () => void;
|
|
11
12
|
onNextBtnClick: () => void;
|
|
12
13
|
}
|
|
13
|
-
export declare const CustomPagination: ({ current, total, isNextBtnDisabled, isPrevBtnDisabled, styles, onBulletClick, onNextBtnClick, onPrevBtnClick }: Props) => JSX.Element;
|
|
14
|
+
export declare const CustomPagination: ({ current, total, isNextBtnDisabled, isPrevBtnDisabled, styles, style, onBulletClick, onNextBtnClick, onPrevBtnClick }: Props) => JSX.Element;
|
|
14
15
|
export interface FlexBoxProps {
|
|
15
16
|
direction?: 'row' | 'column';
|
|
16
17
|
justifyContent?: string;
|
|
@@ -43,9 +43,9 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
43
43
|
var components_1 = require("../../../../../../../../DynamicLayout/components");
|
|
44
44
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
45
45
|
var CustomPagination = function (_a) {
|
|
46
|
-
var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, isNextBtnDisabled = _a.isNextBtnDisabled, isPrevBtnDisabled = _a.isPrevBtnDisabled, styles = _a.styles, onBulletClick = _a.onBulletClick, onNextBtnClick = _a.onNextBtnClick, onPrevBtnClick = _a.onPrevBtnClick;
|
|
46
|
+
var _b = _a.current, current = _b === void 0 ? 1 : _b, _c = _a.total, total = _c === void 0 ? 1 : _c, isNextBtnDisabled = _a.isNextBtnDisabled, isPrevBtnDisabled = _a.isPrevBtnDisabled, styles = _a.styles, style = _a.style, onBulletClick = _a.onBulletClick, onNextBtnClick = _a.onNextBtnClick, onPrevBtnClick = _a.onPrevBtnClick;
|
|
47
47
|
var bullets = Array.from({ length: total }, function (_, i) { return i; });
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(S_Pagination, __assign({ className: "custom-pagination_".concat(current) }, { children: (function () {
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(S_Pagination, __assign({ className: "custom-pagination_".concat(current), style: style }, { children: (function () {
|
|
49
49
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
50
50
|
switch (styles.type) {
|
|
51
51
|
case 'NONE':
|
|
@@ -284,7 +284,7 @@ var FlexBox = styled_components_1.default.div(templateObject_1 || (templateObjec
|
|
|
284
284
|
var _b = _a.justifyContent, justifyContent = _b === void 0 ? 'center' : _b;
|
|
285
285
|
return justifyContent;
|
|
286
286
|
});
|
|
287
|
-
var S_Pagination = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* max-width: 120px; */\n padding: 5px;\n"], ["\n /* max-width: 120px; */\n padding: 5px;\n"])));
|
|
287
|
+
var S_Pagination = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* max-width: 120px; */\n padding: 5px;\n position: relative;\n"], ["\n /* max-width: 120px; */\n padding: 5px;\n position: relative;\n"])));
|
|
288
288
|
// const sysTextWhite = css`
|
|
289
289
|
// color: ${({ theme }) => theme.ui_cpnt_textlabel_sys_white};
|
|
290
290
|
// `;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CSSProperties } from 'styled-components';
|
|
2
|
+
export declare function getPosition(position: string, designType: string, size: string): CSSProperties;
|
|
3
|
+
export declare const POS_OUTSET: Record<string, Record<string, Record<string, CSSProperties>>>;
|
|
4
|
+
export declare const POS_INSET: Record<string, Record<string, CSSProperties>>;
|