pds-dev-kit-web-test 2.5.395 → 2.5.401
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/common/hooks/useTooltip.js +1 -1
- package/dist/src/common/styles/colorSet/index.d.ts +2 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +1132 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +4 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +4 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +53 -53
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.d.ts +11 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.js +45 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +9 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +79 -0
- package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
- package/dist/src/sub/DynamicLayout/components/Section/components/VideoBGMedia.js +16 -1
- package/dist/src/sub/DynamicLayout/components/Section/sectionContext.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +40 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +36 -177
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.js +47 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +152 -4
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +150 -2
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +45 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +262 -9
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +593 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +253 -0
- package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +139 -0
- package/dist/src/sub/DynamicLayout/compositionActionTypes.js +2 -0
- package/dist/src/sub/DynamicLayout/compositionQueryContext.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/compositionQueryContext.js +14 -0
- package/dist/src/sub/DynamicLayout/mock_composition.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/mock_composition.js +801 -0
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +1099 -0
- package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/mock_contentsList.js +1082 -0
- package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +810 -0
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +822 -0
- package/dist/src/sub/DynamicLayout/mock_video.d.ts +368 -0
- package/dist/src/sub/DynamicLayout/mock_video.js +371 -0
- package/dist/src/sub/DynamicLayout/mocks.d.ts +8 -960
- package/dist/src/sub/DynamicLayout/mocks.js +4286 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +13 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +18 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +230 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +17 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +59 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +191 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +21 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +117 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +889 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +27 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +96 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +50 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +905 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +90 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +112 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.d.ts +17 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.js +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +27 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +115 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +23 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +176 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +30 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +351 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +51 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +225 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +191 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +21 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +117 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +889 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +27 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +96 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +48 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +852 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +50 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +45 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +27 -10
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.d.ts +14 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.js +26 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +52 -3
- package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -0
- package/dist/src/sub/DynamicLayout/types.d.ts +48 -15
- package/package.json +2 -2
- package/release-note.md +2 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +0 -6
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +0 -27
@@ -44,6 +44,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
44
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
45
45
|
var react_1 = require("react");
|
46
46
|
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
47
|
+
var compositionQueryContext_1 = require("../../../../../../../DynamicLayout/compositionQueryContext");
|
47
48
|
var styled_components_1 = __importStar(require("styled-components"));
|
48
49
|
var hooks_1 = require("../../../../hooks");
|
49
50
|
var util_1 = require("../../../../util");
|
@@ -53,9 +54,24 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
53
54
|
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
54
55
|
function Image(props) {
|
55
56
|
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
56
|
-
var
|
57
|
+
var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
|
58
|
+
var index = props.index, CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE, CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
59
|
+
var cLinkValue = function () {
|
60
|
+
if (CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DATA' ||
|
61
|
+
CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DELEGATEDDATA') {
|
62
|
+
if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
|
63
|
+
return "ERROR: QueryData NOT FOUND";
|
64
|
+
}
|
65
|
+
var link = queryContext.queryData[CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA];
|
66
|
+
if (!link) {
|
67
|
+
return "ERROR: ".concat(CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, " NOT found from queryData");
|
68
|
+
}
|
69
|
+
return link;
|
70
|
+
}
|
71
|
+
return CB_CONTENT_PROP_CLINK_SPEC_SRC;
|
72
|
+
};
|
57
73
|
var _c = (0, useCLINK_1.default)({
|
58
|
-
src:
|
74
|
+
src: cLinkValue(),
|
59
75
|
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
60
76
|
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
|
61
77
|
internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
|
@@ -74,7 +90,25 @@ function Image(props) {
|
|
74
90
|
: CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
|
75
91
|
var hasEffect = !isNoneEffectType;
|
76
92
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
77
|
-
|
93
|
+
var imgSrc = function () {
|
94
|
+
var isDataConnected = CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE === 'DATA' ||
|
95
|
+
CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_VALUETYPE === 'DELEGATEDDATA';
|
96
|
+
if (!isDataConnected) {
|
97
|
+
return CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR;
|
98
|
+
}
|
99
|
+
if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
|
100
|
+
// eslint-disable-next-line
|
101
|
+
console.warn('ERROR: No query data found');
|
102
|
+
return 'ERROR';
|
103
|
+
}
|
104
|
+
if (!queryContext.queryData[CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA]) {
|
105
|
+
// eslint-disable-next-line
|
106
|
+
console.warn("ERROR: ".concat(CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA, " NOT found in query data"));
|
107
|
+
return 'ERROR';
|
108
|
+
}
|
109
|
+
return queryContext.queryData[CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_CONNECTDATA];
|
110
|
+
};
|
111
|
+
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 }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ style: __assign({}, effectCssProperties) }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), { overflow: 'hidden' }), boxStyle.normal), { cursor: CLINKCursor }), hoverStyle: __assign({}, boxStyle.hover), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: (0, jsx_runtime_1.jsx)(S_Image, __assign({ src: imgSrc(), normalStyle: __assign({}, imgStyle.normal), hoverStyle: __assign({}, imgStyle.hover) }, { children: imgSrc() === 'ERROR' && (0, jsx_runtime_1.jsx)(S_EmptyLayer, { children: "FALLBACK IMAGE" }) })) })) })) }))] }));
|
78
112
|
}
|
79
113
|
function parseImageCBStyle(style, hoverStyle, mode) {
|
80
114
|
var boxStyle = {
|
@@ -136,5 +170,18 @@ var S_Image = styled_components_1.default.div(templateObject_6 || (templateObjec
|
|
136
170
|
: normalStyle.backgroundSize === 'contain';
|
137
171
|
return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
|
138
172
|
});
|
173
|
+
var S_EmptyLayer = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n background-color: rgba(0, 0, 0, 0.6);\n bottom: 0;\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n left: 0;\n line-height: ", ";\n padding: ", ";\n position: absolute;\n right: 0;\n text-align: center;\n top: 0;\n word-break: keep-all;\n"], ["\n align-items: center;\n background-color: rgba(0, 0, 0, 0.6);\n bottom: 0;\n color: white;\n display: flex;\n font-size: ", ";\n font-weight: ", ";\n justify-content: center;\n left: 0;\n line-height: ", ";\n padding: ", ";\n position: absolute;\n right: 0;\n text-align: center;\n top: 0;\n word-break: keep-all;\n"])), function (_a) {
|
174
|
+
var theme = _a.theme;
|
175
|
+
return theme.desktopFontSize.body2;
|
176
|
+
}, function (_a) {
|
177
|
+
var theme = _a.theme;
|
178
|
+
return theme.fontWeight.bold;
|
179
|
+
}, function (_a) {
|
180
|
+
var theme = _a.theme;
|
181
|
+
return theme.desktopLineHeight.body2;
|
182
|
+
}, function (_a) {
|
183
|
+
var theme = _a.theme;
|
184
|
+
return theme.spacing.spacingE;
|
185
|
+
});
|
139
186
|
exports.default = Image;
|
140
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
187
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { CB_SLIDEBANNER } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
|
3
|
+
import type { CB_SLIDEBANNER_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
4
|
+
type Props = CB_SLIDEBANNER_PROPERTIES_TYPE & IndexForIntersection & {
|
5
|
+
compositions: CB_SLIDEBANNER['compositions'];
|
6
|
+
};
|
7
|
+
declare function SlideBanner(props: Props): JSX.Element;
|
8
|
+
export default SlideBanner;
|
@@ -0,0 +1,225 @@
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
+
}
|
23
|
+
Object.defineProperty(o, k2, desc);
|
24
|
+
}) : (function(o, m, k, k2) {
|
25
|
+
if (k2 === undefined) k2 = k;
|
26
|
+
o[k2] = m[k];
|
27
|
+
}));
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
+
}) : function(o, v) {
|
31
|
+
o["default"] = v;
|
32
|
+
});
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
+
if (mod && mod.__esModule) return mod;
|
35
|
+
var result = {};
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
+
__setModuleDefault(result, mod);
|
38
|
+
return result;
|
39
|
+
};
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
42
|
+
};
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
44
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
45
|
+
var react_1 = require("react");
|
46
|
+
var createCompositions_1 = require("../../../../../../../DynamicLayout/CompositionRenderer/createCompositions");
|
47
|
+
var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
|
48
|
+
var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
|
49
|
+
var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
|
50
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
51
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
52
|
+
var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
|
53
|
+
var CustomNavigation_1 = require("./components/CustomNavigation");
|
54
|
+
var CustomPagination_1 = require("./components/CustomPagination");
|
55
|
+
var CustomProgressbar_1 = require("./components/CustomProgressbar");
|
56
|
+
var SlideBannerCore_1 = __importDefault(require("./SlideBannerCore"));
|
57
|
+
var slideBannerUtils_1 = require("./slideBannerUtils");
|
58
|
+
function SlideBanner(props) {
|
59
|
+
var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode, queryData = _a.queryData;
|
60
|
+
var index = props.index,
|
61
|
+
// CONTENT : 슬라이드배너
|
62
|
+
_b = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_DISPLAYCOUNTS = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
|
63
|
+
// STYLE: 슬라이드배너
|
64
|
+
CB_STYLE_PROP_SLIDEBANNER = props.CB_STYLE_PROP_SLIDEBANNER,
|
65
|
+
// STYLE: 그림자
|
66
|
+
CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
|
67
|
+
// EFFECT: 진입
|
68
|
+
CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
69
|
+
var compositions = props.compositions;
|
70
|
+
var _c = (0, react_1.useState)(false), isHovered = _c[0], setIsHovered = _c[1];
|
71
|
+
var _d = (0, react_1.useState)(1), currentSlide = _d[0], setCurrentSlide = _d[1];
|
72
|
+
var _e = (0, react_1.useState)(0), totalPages = _e[0], setTotalPages = _e[1];
|
73
|
+
var _f = (0, react_1.useState)(true), isBeginning = _f[0], setIsBeginning = _f[1];
|
74
|
+
var _g = (0, react_1.useState)(false), isEnd = _g[0], setIsEnd = _g[1];
|
75
|
+
var progressRef = (0, react_1.useRef)(0);
|
76
|
+
var leftTimeMsRef = (0, react_1.useRef)(0);
|
77
|
+
var swiperRef = (0, react_1.useRef)(null);
|
78
|
+
var _h = (0, slideBannerUtils_1.parseSlideBannerStyleToSlideBannerCoreProp)({
|
79
|
+
props: CB_STYLE_PROP_SLIDEBANNER,
|
80
|
+
device: device
|
81
|
+
}), slideBannerNormalStyle = _h.normalStyle, slideBannerHoverStyle = _h.hoverStyle;
|
82
|
+
var _j = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomPaginationProp)({
|
83
|
+
props: CB_STYLE_PROP_SLIDEBANNER,
|
84
|
+
device: device
|
85
|
+
}), customPaginationNormalStyle = _j.normalStyle, customPaginationHoverStyle = _j.hoverStyle;
|
86
|
+
var _k = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomNavigationProp)({
|
87
|
+
props: CB_STYLE_PROP_SLIDEBANNER,
|
88
|
+
device: device
|
89
|
+
}), customNavigationNormalStyle = _k.normalStyle, customNavigationHoverStyle = _k.hoverStyle;
|
90
|
+
var _l = (0, slideBannerUtils_1.parseSlideBannerStyleToCustomProgressbarProp)({
|
91
|
+
props: CB_STYLE_PROP_SLIDEBANNER,
|
92
|
+
device: device
|
93
|
+
}), customProgressbarNormalStyle = _l.normalStyle, customProgressbarHoverStyle = _l.hoverStyle;
|
94
|
+
var _m = (0, util_1.parseProperties)(props, device), style = _m.style, hoverStyle = _m.hoverStyle, layout = _m.layout, effect = _m.effect;
|
95
|
+
var loop = isHovered ? slideBannerNormalStyle.loop : slideBannerHoverStyle.loop;
|
96
|
+
// NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
|
97
|
+
var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
|
98
|
+
// NOTE: EFFECT와 관련된 함수들입니다.
|
99
|
+
var cbRef = (0, react_1.useRef)(null);
|
100
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
|
101
|
+
index
|
102
|
+
]);
|
103
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
104
|
+
var effectCssProperties = isVisible ? effect : {};
|
105
|
+
var isNoneEffectType = device === 'DESKTOP'
|
106
|
+
? CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE === 'NONE'
|
107
|
+
: CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
|
108
|
+
var hasEffect = !isNoneEffectType;
|
109
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
110
|
+
(0, react_1.useEffect)(function () {
|
111
|
+
var _a, _b, _c;
|
112
|
+
(_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.update();
|
113
|
+
(_c = swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper.update();
|
114
|
+
}, [isHovered]);
|
115
|
+
var handleSwiper = function (swiper) {
|
116
|
+
var originalSlides = Array.from(swiper.slides).filter(function (slide) { return !slide.classList.contains('swiper-slide-duplicate'); });
|
117
|
+
var totalSlides = originalSlides.length;
|
118
|
+
var slidesPerView = typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
|
119
|
+
var slidesPerGroup = typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
|
120
|
+
var isLoop = swiper.params.loop || false;
|
121
|
+
var totalPages;
|
122
|
+
if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
|
123
|
+
// 페이지 단위로 넘어가는 경우 (loop 여부 상관없이 동일)
|
124
|
+
totalPages = Math.ceil(totalSlides / slidesPerGroup);
|
125
|
+
}
|
126
|
+
else if (isLoop) {
|
127
|
+
totalPages = totalSlides;
|
128
|
+
}
|
129
|
+
else {
|
130
|
+
// loop가 꺼져있으면 마지막 슬라이드가 첫 번째 위치에 올 수 있는 경우까지만
|
131
|
+
totalPages = Math.max(1, totalSlides - slidesPerView + 1);
|
132
|
+
}
|
133
|
+
setTotalPages(totalPages);
|
134
|
+
setIsBeginning(swiper.isBeginning);
|
135
|
+
setIsEnd(swiper.isEnd);
|
136
|
+
};
|
137
|
+
var handleSlideChangeTransitionEnd = function (swiper) {
|
138
|
+
var slidesPerGroup = typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
|
139
|
+
var slidesPerView = typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
|
140
|
+
var isLoop = swiper.params.loop || false;
|
141
|
+
setIsBeginning(swiper.isBeginning);
|
142
|
+
setIsEnd(swiper.isEnd);
|
143
|
+
// 현재 페이지 계산
|
144
|
+
if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
|
145
|
+
// 페이지 단위로 이동하는 경우
|
146
|
+
var currentPage = Math.floor(swiper.realIndex / slidesPerGroup) + 1;
|
147
|
+
setCurrentSlide(currentPage);
|
148
|
+
}
|
149
|
+
else if (isLoop) {
|
150
|
+
// loop 모드에서는 realIndex가 실제 슬라이드 인덱스
|
151
|
+
setCurrentSlide(swiper.realIndex + 1);
|
152
|
+
}
|
153
|
+
else {
|
154
|
+
// loop가 꺼져있을 때는 activeIndex 사용
|
155
|
+
setCurrentSlide(swiper.activeIndex + 1);
|
156
|
+
}
|
157
|
+
};
|
158
|
+
var handleAutoplayTimeLeft = (0, react_1.useCallback)(function (swiper, time, progress) {
|
159
|
+
leftTimeMsRef.current = time;
|
160
|
+
progressRef.current = progress;
|
161
|
+
}, []);
|
162
|
+
var handleBulletClick = function (index) {
|
163
|
+
if (swiperRef.current) {
|
164
|
+
var targetIndex = (swiperRef.current.swiper.params.slidesPerGroup || 1) * index;
|
165
|
+
swiperRef.current.swiper.slideTo(targetIndex);
|
166
|
+
}
|
167
|
+
};
|
168
|
+
var handlePrevBtnClick = function () {
|
169
|
+
if (swiperRef.current) {
|
170
|
+
swiperRef.current.swiper.slidePrev();
|
171
|
+
}
|
172
|
+
};
|
173
|
+
var handleNextBtnClick = function () {
|
174
|
+
if (swiperRef.current) {
|
175
|
+
swiperRef.current.swiper.slideNext();
|
176
|
+
}
|
177
|
+
};
|
178
|
+
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), { borderBottomLeftRadius: style.borderBottomLeftRadius, borderBottomRightRadius: style.borderBottomRightRadius, borderTopLeftRadius: style.borderTopLeftRadius, borderTopRightRadius: style.borderTopRightRadius, borderWidth: undefined, borderColor: undefined, borderStyle: undefined }), hoverStyle: __assign(__assign({}, hoverStyle), { borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius, borderBottomRightRadius: hoverStyle.borderBottomRightRadius, borderTopLeftRadius: hoverStyle.borderTopLeftRadius, borderTopRightRadius: hoverStyle.borderTopRightRadius, borderWidth: undefined, borderColor: undefined, borderStyle: undefined }), 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 ? slideBannerHoverStyle === null || slideBannerHoverStyle === void 0 ? void 0 : slideBannerHoverStyle.customStyle : slideBannerNormalStyle === null || slideBannerNormalStyle === void 0 ? void 0 : slideBannerNormalStyle.customStyle }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ borderStyle: {
|
179
|
+
borderBottomLeftRadius: style.borderBottomLeftRadius,
|
180
|
+
borderBottomRightRadius: style.borderBottomRightRadius,
|
181
|
+
borderTopLeftRadius: style.borderTopLeftRadius,
|
182
|
+
borderTopRightRadius: style.borderTopRightRadius,
|
183
|
+
borderWidth: style.borderWidth,
|
184
|
+
borderColor: style.borderColor,
|
185
|
+
borderStyle: style.borderStyle
|
186
|
+
}, hoverBorderStyle: {
|
187
|
+
borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
|
188
|
+
borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
|
189
|
+
borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
|
190
|
+
borderTopRightRadius: hoverStyle.borderTopRightRadius,
|
191
|
+
borderWidth: hoverStyle.borderWidth,
|
192
|
+
borderColor: hoverStyle.borderColor,
|
193
|
+
borderStyle: hoverStyle.borderStyle
|
194
|
+
} }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, onSwiper: handleSwiper, onSlideChangeTransitionEnd: handleSlideChangeTransitionEnd, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: CB_CONTENT_PROP_SLIDEBANNER_SPEC_DISPLAYCOUNTS, scrollbar: isHovered ? slideBannerHoverStyle.scrollbar : slideBannerNormalStyle.scrollbar, freeMode: isHovered ? slideBannerHoverStyle.freeMode : slideBannerNormalStyle.freeMode, autoplay: isHovered ? slideBannerHoverStyle.autoplay : slideBannerNormalStyle.autoplay, useAutoplay: isHovered ? slideBannerHoverStyle.useAutoplay : slideBannerNormalStyle.useAutoplay, loop: isHovered ? slideBannerHoverStyle.loop : slideBannerNormalStyle.loop }, { children: (0, createCompositions_1.createCompositions)({
|
195
|
+
valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
|
196
|
+
queryPath: CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
|
197
|
+
queryData: queryData,
|
198
|
+
compositions: compositions
|
199
|
+
}) })) })), (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { type: isHovered ? customPaginationHoverStyle.type : customPaginationNormalStyle.type, offset: isHovered ? customPaginationHoverStyle.offset : customPaginationNormalStyle.offset, current: currentSlide, prevBtnDisabled: loop ? false : isBeginning, nextBtnDisabled: loop ? false : isEnd, total: totalPages, size: isHovered ? customPaginationHoverStyle.size : customPaginationNormalStyle.size, onBulletClick: handleBulletClick, onPrevBtnClick: handlePrevBtnClick, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: isBeginning, prevBtnType: isHovered
|
200
|
+
? customNavigationHoverStyle.prevBtnType
|
201
|
+
: customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
|
202
|
+
? customNavigationHoverStyle.prevBtnOffset
|
203
|
+
: customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
|
204
|
+
? customNavigationHoverStyle.prevBtnSize
|
205
|
+
: customNavigationNormalStyle.prevBtnSize, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: isEnd, nextBtnType: isHovered
|
206
|
+
? customNavigationHoverStyle.nextBtnType
|
207
|
+
: customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
|
208
|
+
? customNavigationHoverStyle.nextBtnOffset
|
209
|
+
: customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
|
210
|
+
? customNavigationHoverStyle.nextBtnSize
|
211
|
+
: customNavigationNormalStyle.nextBtnSize, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, type: isHovered ? customProgressbarHoverStyle.type : customProgressbarNormalStyle.type, size: isHovered ? customProgressbarHoverStyle.size : customProgressbarNormalStyle.size, offset: isHovered ? customProgressbarHoverStyle.offset : customProgressbarNormalStyle.offset })] })) })) })));
|
212
|
+
}
|
213
|
+
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) {
|
214
|
+
var customStyle = _a.customStyle;
|
215
|
+
return customStyle;
|
216
|
+
});
|
217
|
+
var S_SwiperLayout = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n ", ";\n"], ["\n height: 100%;\n overflow: hidden;\n width: 100%;\n\n ", ";\n ", ";\n"])), function (_a) {
|
218
|
+
var hoverBorderStyle = _a.hoverBorderStyle;
|
219
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverBorderStyle), { boxShadow: '' }));
|
220
|
+
}, function (_a) {
|
221
|
+
var borderStyle = _a.borderStyle;
|
222
|
+
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, borderStyle), { boxShadow: '' }));
|
223
|
+
});
|
224
|
+
exports.default = SlideBanner;
|
225
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import 'swiper/modules/navigation/navigation.min.css';
|
3
|
+
import 'swiper/swiper-bundle.css';
|
4
|
+
import type { SwiperProps, SwiperRef } from 'swiper/react/swiper-react.js';
|
5
|
+
export interface SlideBannerCoreProps extends SwiperProps {
|
6
|
+
scrollbar?: SwiperProps['scrollbar'];
|
7
|
+
slidesPerView?: SwiperProps['slidesPerView'];
|
8
|
+
freeMode?: SwiperProps['freeMode'];
|
9
|
+
autoplay?: SwiperProps['autoplay'];
|
10
|
+
useAutoplay?: boolean;
|
11
|
+
loop?: SwiperProps['loop'];
|
12
|
+
children?: React.ReactNode[] | JSX.Element;
|
13
|
+
}
|
14
|
+
declare const SlideBannerCore: import("react").ForwardRefExoticComponent<SlideBannerCoreProps & import("react").RefAttributes<SwiperRef>>;
|
15
|
+
export default SlideBannerCore;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
14
|
+
var t = {};
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
16
|
+
t[p] = s[p];
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
20
|
+
t[p[i]] = s[p[i]];
|
21
|
+
}
|
22
|
+
return t;
|
23
|
+
};
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
26
|
+
var react_1 = require("react");
|
27
|
+
var swiper_1 = require("swiper");
|
28
|
+
require("swiper/modules/navigation/navigation.min.css");
|
29
|
+
var react_2 = require("swiper/react");
|
30
|
+
require("swiper/swiper-bundle.css");
|
31
|
+
var SlideBannerCore = (0, react_1.forwardRef)(function (_a, ref) {
|
32
|
+
var scrollbar = _a.scrollbar, slidesPerView = _a.slidesPerView, freeMode = _a.freeMode, autoplay = _a.autoplay, useAutoplay = _a.useAutoplay, loop = _a.loop, children = _a.children, props = __rest(_a, ["scrollbar", "slidesPerView", "freeMode", "autoplay", "useAutoplay", "loop", "children"]);
|
33
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Swiper, __assign({ ref: ref, style: {
|
34
|
+
width: '100%',
|
35
|
+
height: '100%'
|
36
|
+
}, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: scrollbar, freeMode: freeMode, autoplay: useAutoplay ? autoplay : false, loop: loop }, props, { children: Array.isArray(children) ? (children.map(function (slide, index) { return (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide }, index); })) : ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: children })) })));
|
37
|
+
});
|
38
|
+
SlideBannerCore.displayName = 'SlideBannerCore';
|
39
|
+
exports.default = SlideBannerCore;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { CB_STYLE_PROP_SLIDEBANNER_SPEC_PREVBTNSTYLE_TYPE, CB_STYLE_PROP_SLIDEBANNER_SPEC_NEXTBTNSTYLE_TYPE } from '../types';
|
3
|
+
export type NavigationOffset = {
|
4
|
+
top?: string;
|
5
|
+
bottom?: string;
|
6
|
+
left?: string;
|
7
|
+
right?: string;
|
8
|
+
translateX?: number;
|
9
|
+
translateY?: number;
|
10
|
+
transformOrigin?: string;
|
11
|
+
};
|
12
|
+
export interface CustomNavigationProps {
|
13
|
+
prevBtnDisabled?: boolean;
|
14
|
+
prevBtnType?: CB_STYLE_PROP_SLIDEBANNER_SPEC_PREVBTNSTYLE_TYPE;
|
15
|
+
prevBtnOffset?: NavigationOffset;
|
16
|
+
prevBtnSize?: number;
|
17
|
+
nextBtnDisabled?: boolean;
|
18
|
+
nextBtnType?: CB_STYLE_PROP_SLIDEBANNER_SPEC_NEXTBTNSTYLE_TYPE;
|
19
|
+
nextBtnOffset?: NavigationOffset;
|
20
|
+
nextBtnSize?: number;
|
21
|
+
onPrevBtnClick?: () => void;
|
22
|
+
onNextBtnClick?: () => void;
|
23
|
+
}
|
24
|
+
export declare const CustomNavigation: ({ prevBtnDisabled, prevBtnType, prevBtnOffset, prevBtnSize, nextBtnDisabled, nextBtnType, nextBtnOffset, nextBtnSize, onPrevBtnClick, onNextBtnClick }: CustomNavigationProps) => JSX.Element;
|
25
|
+
export interface FlexBoxProps {
|
26
|
+
direction?: 'row' | 'column';
|
27
|
+
justifyContent?: string;
|
28
|
+
alignItems?: string;
|
29
|
+
gap?: string;
|
30
|
+
}
|
31
|
+
export default CustomNavigation;
|
@@ -0,0 +1,118 @@
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
+
if (k2 === undefined) k2 = k;
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
+
}
|
23
|
+
Object.defineProperty(o, k2, desc);
|
24
|
+
}) : (function(o, m, k, k2) {
|
25
|
+
if (k2 === undefined) k2 = k;
|
26
|
+
o[k2] = m[k];
|
27
|
+
}));
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
+
}) : function(o, v) {
|
31
|
+
o["default"] = v;
|
32
|
+
});
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
+
if (mod && mod.__esModule) return mod;
|
35
|
+
var result = {};
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
+
__setModuleDefault(result, mod);
|
38
|
+
return result;
|
39
|
+
};
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
41
|
+
exports.CustomNavigation = void 0;
|
42
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
43
|
+
var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
|
44
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
45
|
+
var navigationConfigs_1 = require("./navigationConfigs");
|
46
|
+
var CustomNavigation = function (_a) {
|
47
|
+
var _b = _a.prevBtnDisabled, prevBtnDisabled = _b === void 0 ? false : _b, _c = _a.prevBtnType, prevBtnType = _c === void 0 ? 'NONE' : _c, _d = _a.prevBtnOffset, prevBtnOffset = _d === void 0 ? { top: '0' } : _d, _e = _a.prevBtnSize, prevBtnSize = _e === void 0 ? 1 : _e, _f = _a.nextBtnDisabled, nextBtnDisabled = _f === void 0 ? false : _f, _g = _a.nextBtnType, nextBtnType = _g === void 0 ? 'NONE' : _g, _h = _a.nextBtnOffset, nextBtnOffset = _h === void 0 ? { top: '0' } : _h, _j = _a.nextBtnSize, nextBtnSize = _j === void 0 ? 1 : _j, onPrevBtnClick = _a.onPrevBtnClick, onNextBtnClick = _a.onNextBtnClick;
|
48
|
+
var getIsSameOffset = function (prevBtnOffset, nextBtnOffset) {
|
49
|
+
return (prevBtnOffset.top === nextBtnOffset.top &&
|
50
|
+
prevBtnOffset.bottom === nextBtnOffset.bottom &&
|
51
|
+
prevBtnOffset.left === nextBtnOffset.left &&
|
52
|
+
prevBtnOffset.right === nextBtnOffset.right &&
|
53
|
+
prevBtnOffset.translateX === nextBtnOffset.translateX &&
|
54
|
+
prevBtnOffset.translateY === nextBtnOffset.translateY &&
|
55
|
+
prevBtnOffset.transformOrigin === nextBtnOffset.transformOrigin);
|
56
|
+
};
|
57
|
+
var isSameOffset = getIsSameOffset(prevBtnOffset, nextBtnOffset);
|
58
|
+
var prevButton = navigationConfigs_1.prevButtonMappedIcons[prevBtnType];
|
59
|
+
var nextButton = navigationConfigs_1.nextButtonMappedIcons[nextBtnType];
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(S_Navigation, __assign({ "$offset": isSameOffset ? prevBtnOffset : undefined, "$size": isSameOffset ? prevBtnSize : 1 }, { children: [(0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "".concat(prevBtnDisabled ? 'disabled' : ''), "$offset": isSameOffset ? undefined : prevBtnOffset, "$size": isSameOffset ? undefined : prevBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: "large", shapeType: prevButton.shapeType, baseColorKey: prevButton.baseColorKey || 'ui_cpnt_button_fill_base_transparent', borderColorKey: prevButton.borderColorKey, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', shadow: prevButton.shadow, onClick: onPrevBtnClick }) })), (0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "".concat(nextBtnDisabled ? 'disabled' : ''), "$offset": isSameOffset ? undefined : nextBtnOffset, "$size": isSameOffset ? undefined : nextBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: "large", shapeType: nextButton.shapeType, baseColorKey: nextButton.baseColorKey || 'ui_cpnt_button_fill_base_transparent', borderColorKey: nextButton.baseColorKey, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', shadow: nextButton.shadow, onClick: onNextBtnClick }) }))] })));
|
61
|
+
};
|
62
|
+
exports.CustomNavigation = CustomNavigation;
|
63
|
+
var S_Navigation = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n"], ["\n display: ", ";\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n"])), function (_a) {
|
64
|
+
var $offset = _a.$offset;
|
65
|
+
return ($offset ? 'flex' : 'contents');
|
66
|
+
}, function (_a) {
|
67
|
+
var $offset = _a.$offset;
|
68
|
+
return ($offset ? '5px' : 0);
|
69
|
+
}, function (_a) {
|
70
|
+
var $offset = _a.$offset;
|
71
|
+
return ($offset ? 'absolute' : 'static');
|
72
|
+
}, function (_a) {
|
73
|
+
var _b, _c;
|
74
|
+
var $size = _a.$size, $offset = _a.$offset;
|
75
|
+
return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
|
76
|
+
}, function (_a) {
|
77
|
+
var $offset = _a.$offset;
|
78
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset.right, ";") : '');
|
79
|
+
}, function (_a) {
|
80
|
+
var $offset = _a.$offset;
|
81
|
+
return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
|
82
|
+
});
|
83
|
+
var S_PrevButton = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"], ["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"])), function (_a) {
|
84
|
+
var $offset = _a.$offset;
|
85
|
+
return ($offset ? '5px' : 0);
|
86
|
+
}, function (_a) {
|
87
|
+
var $offset = _a.$offset;
|
88
|
+
return ($offset ? 'absolute' : 'static');
|
89
|
+
}, function (_a) {
|
90
|
+
var _b, _c;
|
91
|
+
var $size = _a.$size, $offset = _a.$offset;
|
92
|
+
return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
|
93
|
+
}, function (_a) {
|
94
|
+
var $offset = _a.$offset;
|
95
|
+
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.right, ";") : '');
|
96
|
+
}, function (_a) {
|
97
|
+
var $offset = _a.$offset;
|
98
|
+
return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
|
99
|
+
});
|
100
|
+
var S_NextButton = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"], ["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"])), function (_a) {
|
101
|
+
var $offset = _a.$offset;
|
102
|
+
return ($offset ? '5px' : 0);
|
103
|
+
}, function (_a) {
|
104
|
+
var $offset = _a.$offset;
|
105
|
+
return ($offset ? 'absolute' : 'static');
|
106
|
+
}, function (_a) {
|
107
|
+
var _b, _c;
|
108
|
+
var $size = _a.$size, $offset = _a.$offset;
|
109
|
+
return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
|
110
|
+
}, function (_a) {
|
111
|
+
var $offset = _a.$offset;
|
112
|
+
return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.right, ";") : '');
|
113
|
+
}, function (_a) {
|
114
|
+
var $offset = _a.$offset;
|
115
|
+
return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
|
116
|
+
});
|
117
|
+
exports.default = exports.CustomNavigation;
|
118
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { CB_STYLE_PROP_SLIDEBANNER_SPEC_PAGINATIONSTYLE_TYPE } from '../types';
|
3
|
+
export interface CustomPaginationProps {
|
4
|
+
current?: number;
|
5
|
+
total?: number;
|
6
|
+
type?: CB_STYLE_PROP_SLIDEBANNER_SPEC_PAGINATIONSTYLE_TYPE;
|
7
|
+
offset?: {
|
8
|
+
top?: string;
|
9
|
+
bottom?: string;
|
10
|
+
left?: string;
|
11
|
+
right?: string;
|
12
|
+
translateX?: number;
|
13
|
+
translateY?: number;
|
14
|
+
transformOrigin?: string;
|
15
|
+
};
|
16
|
+
size?: number;
|
17
|
+
}
|
18
|
+
export declare const CustomPagination: ({ current, total, type, offset, size, prevBtnDisabled, nextBtnDisabled, onBulletClick, onPrevBtnClick, onNextBtnClick }: CustomPaginationProps & {
|
19
|
+
prevBtnDisabled: boolean;
|
20
|
+
nextBtnDisabled: boolean;
|
21
|
+
onBulletClick: (index: number) => void;
|
22
|
+
onPrevBtnClick: () => void;
|
23
|
+
onNextBtnClick: () => void;
|
24
|
+
}) => JSX.Element;
|
25
|
+
export interface FlexBoxProps {
|
26
|
+
direction?: 'row' | 'column';
|
27
|
+
justifyContent?: string;
|
28
|
+
alignItems?: string;
|
29
|
+
gap?: string;
|
30
|
+
}
|
31
|
+
export default CustomPagination;
|