pds-dev-kit-web-test 2.7.228 → 2.7.230
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/CompositionEditor/CompositionEditor.js +6 -5
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +17 -14
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.d.ts +5 -2
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItemForCCB.js +10 -11
- package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.d.ts +9 -0
- package/dist/src/sub/DynamicLayout/GridAutoRowEditor/GridAutoRowEditorForComposition.js +250 -0
- package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.js → GridAutoRowEditorForDL.js} +2 -6
- 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.json +5 -3
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +16 -134
- package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +91 -3
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +6389 -6376
- package/dist/src/sub/DynamicLayout/mock_contentsList.js +8 -6
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +6 -6
- package/dist/src/sub/DynamicLayout/mocks.d.ts +1 -3596
- package/dist/src/sub/DynamicLayout/mocks.js +15 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +32 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +71 -38
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +2 -1
- 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.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +6 -6
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +15 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/elementPositions.js +243 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +26 -43
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +45 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +18 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/elementPositions.js +108 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +26 -44
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +1 -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 +66 -41
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +13 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/elementPositions.js +243 -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 +26 -43
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +21 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +8 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -1
- package/package.json +3 -2
- /package/dist/src/sub/DynamicLayout/GridAutoRowEditor/{GridAutoRowEditor.d.ts → GridAutoRowEditorForDL.d.ts} +0 -0
|
@@ -43,16 +43,16 @@ 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':
|
|
52
52
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
53
53
|
case 'DESIGN1': {
|
|
54
54
|
var _j = SLIDE_BANNER_PAGINATION_SIZES.DESIGN1[(_a = styles.size) !== null && _a !== void 0 ? _a : 'MEDIUM'], SELECTED_TEXT_STYLE_THEME = _j.SELECTED_TEXT_STYLE_THEME, UNSELECTED_TEXT_STYLE_THEME = _j.UNSELECTED_TEXT_STYLE_THEME;
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)(FlexBox, __assign({ gap: "4px", style: { color: styles.secondaryColor || 'inherit' } }, { children: [(0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ styleTheme: SELECTED_TEXT_STYLE_THEME, style: { color: styles.primaryColor || 'inherit' } }, { children: current })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children: "/
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)(FlexBox, __assign({ gap: "4px", style: { color: styles.secondaryColor || 'inherit' } }, { children: [(0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ styleTheme: SELECTED_TEXT_STYLE_THEME, style: { color: styles.primaryColor || 'inherit' } }, { children: current })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children: "/" })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children: total }))] })));
|
|
56
56
|
}
|
|
57
57
|
// case 'DESIGN2': {
|
|
58
58
|
// return (
|
|
@@ -96,7 +96,7 @@ var CustomPagination = function (_a) {
|
|
|
96
96
|
marginLeft: '8px',
|
|
97
97
|
marginRight: '4px',
|
|
98
98
|
color: styles.primaryColor || 'inherit'
|
|
99
|
-
}, styleTheme: SELECTED_TEXT_STYLE_THEME }, { children: current })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { marginRight: '8px', marginLeft: '4px', opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children:
|
|
99
|
+
}, styleTheme: SELECTED_TEXT_STYLE_THEME }, { children: current })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { marginLeft: '4px', opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children: "/" })), (0, jsx_runtime_1.jsx)(S_TextLabel, __assign({ style: { marginRight: '8px', marginLeft: '4px', opacity: 0.6 }, styleTheme: UNSELECTED_TEXT_STYLE_THEME }, { children: total })), (0, jsx_runtime_1.jsx)(S_Pointer, __assign({ onClick: onNextBtnClick, disabled: isNextBtnDisabled }, { children: (0, jsx_runtime_1.jsx)(components_1.Icon, { overrideColorHex: styles.primaryColor, iconName: "ic_arrow_right", size: ICON_SIZE, colorKey: "ui_cpnt_icon_sys_dark" }) }))] })));
|
|
100
100
|
}
|
|
101
101
|
// case 'DESIGN6':
|
|
102
102
|
// return (
|
|
@@ -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
|
// `;
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
styles: CustomProgressbarProps;
|
|
5
5
|
progressRef: React.RefObject<number>;
|
|
6
6
|
leftTimeMsRef: React.RefObject<number>;
|
|
7
|
+
slidesLength: number;
|
|
7
8
|
};
|
|
8
|
-
export declare const CustomProgressbar: ({ styles, progressRef, leftTimeMsRef }: Props) => JSX.Element;
|
|
9
|
+
export declare const CustomProgressbar: ({ styles, progressRef, leftTimeMsRef, slidesLength }: Props) => JSX.Element;
|
|
9
10
|
export default CustomProgressbar;
|
|
@@ -24,7 +24,7 @@ var react_1 = require("react");
|
|
|
24
24
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
25
|
var progressConfigs_1 = require("./progressConfigs");
|
|
26
26
|
var CustomProgressbar = function (_a) {
|
|
27
|
-
var styles = _a.styles, progressRef = _a.progressRef, leftTimeMsRef = _a.leftTimeMsRef;
|
|
27
|
+
var styles = _a.styles, progressRef = _a.progressRef, leftTimeMsRef = _a.leftTimeMsRef, slidesLength = _a.slidesLength;
|
|
28
28
|
var _b = (0, react_1.useState)(0), leftTimeSec = _b[0], setLeftTimeSec = _b[1];
|
|
29
29
|
var _c = (0, react_1.useState)(0), progress = _c[0], setProgress = _c[1];
|
|
30
30
|
(0, react_1.useEffect)(function () {
|
|
@@ -55,19 +55,21 @@ var CustomProgressbar = function (_a) {
|
|
|
55
55
|
animationId = requestAnimationFrame(updateProgress);
|
|
56
56
|
return function () { return cancelAnimationFrame(animationId); };
|
|
57
57
|
}, []);
|
|
58
|
+
var progressRender = slidesLength > 1 ? progress : 0;
|
|
59
|
+
var timeLeftRender = slidesLength > 1 ? leftTimeSec : 0;
|
|
58
60
|
var renderProgressByType = function () {
|
|
59
61
|
var _a, _b, _c, _d, _e;
|
|
60
62
|
switch (styles.type) {
|
|
61
63
|
case 'NONE':
|
|
62
64
|
return null;
|
|
63
65
|
case 'DESIGN1':
|
|
64
|
-
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign1, { size: (_a = styles.size) !== null && _a !== void 0 ? _a : 'MEDIUM', progress:
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign1, { size: (_a = styles.size) !== null && _a !== void 0 ? _a : 'MEDIUM', progress: progressRender, leftTimeSec: timeLeftRender, progressColor: styles.primaryColor, bufferColor: styles.secondaryColor }));
|
|
65
67
|
// case 'DESIGN2':
|
|
66
68
|
// return (
|
|
67
69
|
// <ProgressDesign2
|
|
68
70
|
// size={styles.size ?? 'MEDIUM'}
|
|
69
|
-
// progress={
|
|
70
|
-
// leftTimeSec={
|
|
71
|
+
// progress={progressRender}
|
|
72
|
+
// leftTimeSec={timeLeftRender}
|
|
71
73
|
// progressColor={styles.primaryColor}
|
|
72
74
|
// bufferColor={styles.secondaryColor}
|
|
73
75
|
// />
|
|
@@ -76,37 +78,37 @@ var CustomProgressbar = function (_a) {
|
|
|
76
78
|
// return (
|
|
77
79
|
// <ProgressDesign3
|
|
78
80
|
// size={styles.size ?? 'MEDIUM'}
|
|
79
|
-
// progress={
|
|
81
|
+
// progress={progressRender}
|
|
80
82
|
// progressColor={styles.primaryColor}
|
|
81
83
|
// bufferColor={styles.secondaryColor}
|
|
82
84
|
// />
|
|
83
85
|
// );
|
|
84
86
|
case 'DESIGN2':
|
|
85
|
-
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign4, { size: (_b = styles.size) !== null && _b !== void 0 ? _b : 'MEDIUM', progress:
|
|
87
|
+
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign4, { size: (_b = styles.size) !== null && _b !== void 0 ? _b : 'MEDIUM', progress: progressRender, progressColor: styles.primaryColor, bufferColor: styles.secondaryColor }));
|
|
86
88
|
// case 'DESIGN5':
|
|
87
89
|
// return (
|
|
88
90
|
// <ProgressDesign5
|
|
89
91
|
// size={styles.size ?? 'MEDIUM'}
|
|
90
|
-
// progress={
|
|
92
|
+
// progress={progressRender}
|
|
91
93
|
// progressColor={styles.primaryColor}
|
|
92
94
|
// bufferColor={styles.secondaryColor}
|
|
93
95
|
// />
|
|
94
96
|
// );
|
|
95
97
|
case 'DESIGN3':
|
|
96
|
-
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign6, { size: (_c = styles.size) !== null && _c !== void 0 ? _c : 'MEDIUM', progress:
|
|
98
|
+
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign6, { size: (_c = styles.size) !== null && _c !== void 0 ? _c : 'MEDIUM', progress: progressRender, progressColor: styles.primaryColor, bufferColor: styles.secondaryColor }));
|
|
97
99
|
case 'DESIGN4':
|
|
98
|
-
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign7, { size: (_d = styles.size) !== null && _d !== void 0 ? _d : 'MEDIUM', progress:
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign7, { size: (_d = styles.size) !== null && _d !== void 0 ? _d : 'MEDIUM', progress: progressRender, progressColor: styles.primaryColor, bufferColor: styles.secondaryColor }));
|
|
99
101
|
// case 'DESIGN8':
|
|
100
102
|
// return (
|
|
101
103
|
// <ProgressDesign8
|
|
102
104
|
// size={styles.size ?? 'MEDIUM'}
|
|
103
|
-
// progress={
|
|
105
|
+
// progress={progressRender}
|
|
104
106
|
// progressColor={styles.primaryColor}
|
|
105
107
|
// bufferColor={styles.secondaryColor}
|
|
106
108
|
// />
|
|
107
109
|
// );
|
|
108
110
|
default:
|
|
109
|
-
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign1, { progress:
|
|
111
|
+
return ((0, jsx_runtime_1.jsx)(progressConfigs_1.ProgressDesign1, { progress: progressRender, leftTimeSec: timeLeftRender, progressColor: styles.primaryColor, bufferColor: styles.secondaryColor, size: (_e = styles.size) !== null && _e !== void 0 ? _e : 'MEDIUM' }));
|
|
110
112
|
}
|
|
111
113
|
};
|
|
112
114
|
return ((0, jsx_runtime_1.jsx)(S_ProgressWrapper, __assign({ className: "cb-contentscarousel-progressbar-wrapper", "$size": styles.size }, { children: renderProgressByType() })));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SlideBannerElementsProps } from '../SlideBanner';
|
|
2
|
+
import type { CSSProperties } from 'styled-components';
|
|
3
|
+
export declare function getPosition(position: string, designType: string, size: string, elementType: SlideBannerElementsProps['type'] | 'GROUP'): CSSProperties;
|
|
4
|
+
export declare const POS_INSET: Record<string, CSSProperties>;
|
|
5
|
+
export declare const POS_OUTSET_NAVIGATION: Record<string, CSSProperties>;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POS_OUTSET_NAVIGATION = exports.POS_INSET = exports.getPosition = void 0;
|
|
4
|
+
var GAP = 8;
|
|
5
|
+
function getPosition(position, designType, size, elementType) {
|
|
6
|
+
if (position.startsWith('OUTSET')) {
|
|
7
|
+
if (elementType === 'GROUP') {
|
|
8
|
+
return POS_OUTSET_GROUP[position];
|
|
9
|
+
}
|
|
10
|
+
if (elementType === 'PROGRESSBAR') {
|
|
11
|
+
return exports.POS_INSET[position];
|
|
12
|
+
}
|
|
13
|
+
if (elementType === 'NEXT' || elementType === 'PREV') {
|
|
14
|
+
return exports.POS_OUTSET_NAVIGATION[position];
|
|
15
|
+
}
|
|
16
|
+
var val = POS_OUTSET_PAGINATION[position][designType];
|
|
17
|
+
return val;
|
|
18
|
+
// return POS_OUTSET_PAGINATION[position][designType][size];
|
|
19
|
+
}
|
|
20
|
+
if (elementType === 'GROUP') {
|
|
21
|
+
return exports.POS_INSET[position];
|
|
22
|
+
}
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
exports.getPosition = getPosition;
|
|
26
|
+
var POS_OUTSET_PAGINATION = {
|
|
27
|
+
OUTSET1: {
|
|
28
|
+
DESIGN1: { bottom: 15 },
|
|
29
|
+
DESIGN3: { bottom: 15 },
|
|
30
|
+
DESIGN5: { bottom: 15 },
|
|
31
|
+
DESIGN7: { bottom: 15 },
|
|
32
|
+
DESIGN9: { bottom: 15 },
|
|
33
|
+
DESIGN11: { bottom: 15 },
|
|
34
|
+
DESIGN13: { bottom: 15 },
|
|
35
|
+
DESIGN15: { bottom: 20 }
|
|
36
|
+
},
|
|
37
|
+
OUTSET2: {
|
|
38
|
+
DESIGN1: { bottom: 15 },
|
|
39
|
+
DESIGN3: { bottom: 15 },
|
|
40
|
+
DESIGN5: { bottom: 15 },
|
|
41
|
+
DESIGN7: { bottom: 15 },
|
|
42
|
+
DESIGN9: { bottom: 15 },
|
|
43
|
+
DESIGN11: { bottom: 15 },
|
|
44
|
+
DESIGN13: { bottom: 15 },
|
|
45
|
+
DESIGN15: { bottom: 20 }
|
|
46
|
+
},
|
|
47
|
+
OUTSET3: {
|
|
48
|
+
DESIGN1: { bottom: 15 },
|
|
49
|
+
DESIGN3: { bottom: 15 },
|
|
50
|
+
DESIGN5: { bottom: 15 },
|
|
51
|
+
DESIGN7: { bottom: 15 },
|
|
52
|
+
DESIGN9: { bottom: 15 },
|
|
53
|
+
DESIGN11: { bottom: 15 },
|
|
54
|
+
DESIGN13: { bottom: 15 },
|
|
55
|
+
DESIGN15: { bottom: 20 }
|
|
56
|
+
},
|
|
57
|
+
OUTSET4: {
|
|
58
|
+
DESIGN1: { left: 15 },
|
|
59
|
+
DESIGN3: { left: 15 },
|
|
60
|
+
DESIGN5: { left: 15 },
|
|
61
|
+
DESIGN7: { left: 15 },
|
|
62
|
+
DESIGN9: { left: 15 },
|
|
63
|
+
DESIGN11: { left: 15 },
|
|
64
|
+
DESIGN13: { left: 15 },
|
|
65
|
+
DESIGN15: { left: 15 }
|
|
66
|
+
},
|
|
67
|
+
OUTSET5: {
|
|
68
|
+
DESIGN1: { left: 15 },
|
|
69
|
+
DESIGN3: { left: 15 },
|
|
70
|
+
DESIGN5: { left: 15 },
|
|
71
|
+
DESIGN7: { left: 15 },
|
|
72
|
+
DESIGN9: { left: 15 },
|
|
73
|
+
DESIGN11: { left: 15 },
|
|
74
|
+
DESIGN13: { left: 15 },
|
|
75
|
+
DESIGN15: { left: 15 }
|
|
76
|
+
},
|
|
77
|
+
OUTSET6: {
|
|
78
|
+
DESIGN1: { left: 15 },
|
|
79
|
+
DESIGN3: { left: 15 },
|
|
80
|
+
DESIGN5: { left: 15 },
|
|
81
|
+
DESIGN7: { left: 15 },
|
|
82
|
+
DESIGN9: { left: 15 },
|
|
83
|
+
DESIGN11: { left: 15 },
|
|
84
|
+
DESIGN13: { left: 15 },
|
|
85
|
+
DESIGN15: { left: 15 }
|
|
86
|
+
},
|
|
87
|
+
OUTSET7: {
|
|
88
|
+
DESIGN1: { top: 15 },
|
|
89
|
+
DESIGN3: { top: 15 },
|
|
90
|
+
DESIGN5: { top: 15 },
|
|
91
|
+
DESIGN7: { top: 15 },
|
|
92
|
+
DESIGN9: { top: 15 },
|
|
93
|
+
DESIGN11: { top: 15 },
|
|
94
|
+
DESIGN13: { top: 15 },
|
|
95
|
+
DESIGN15: { top: 20 }
|
|
96
|
+
},
|
|
97
|
+
OUTSET8: {
|
|
98
|
+
DESIGN1: { top: 15 },
|
|
99
|
+
DESIGN3: { top: 15 },
|
|
100
|
+
DESIGN5: { top: 15 },
|
|
101
|
+
DESIGN7: { top: 15 },
|
|
102
|
+
DESIGN9: { top: 15 },
|
|
103
|
+
DESIGN11: { top: 15 },
|
|
104
|
+
DESIGN13: { top: 15 },
|
|
105
|
+
DESIGN15: { top: 20 }
|
|
106
|
+
},
|
|
107
|
+
OUTSET9: {
|
|
108
|
+
DESIGN1: { top: 15 },
|
|
109
|
+
DESIGN3: { top: 15 },
|
|
110
|
+
DESIGN5: { top: 15 },
|
|
111
|
+
DESIGN7: { top: 15 },
|
|
112
|
+
DESIGN9: { top: 15 },
|
|
113
|
+
DESIGN11: { top: 15 },
|
|
114
|
+
DESIGN13: { top: 15 },
|
|
115
|
+
DESIGN15: { top: 20 }
|
|
116
|
+
},
|
|
117
|
+
OUTSET10: {
|
|
118
|
+
DESIGN1: { right: 15 },
|
|
119
|
+
DESIGN3: { right: 15 },
|
|
120
|
+
DESIGN5: { right: 15 },
|
|
121
|
+
DESIGN7: { right: 15 },
|
|
122
|
+
DESIGN9: { right: 15 },
|
|
123
|
+
DESIGN11: { right: 15 },
|
|
124
|
+
DESIGN13: { right: 15 },
|
|
125
|
+
DESIGN15: { right: 15 }
|
|
126
|
+
},
|
|
127
|
+
OUTSET11: {
|
|
128
|
+
DESIGN1: { right: 15 },
|
|
129
|
+
DESIGN3: { right: 15 },
|
|
130
|
+
DESIGN5: { right: 15 },
|
|
131
|
+
DESIGN7: { right: 15 },
|
|
132
|
+
DESIGN9: { right: 15 },
|
|
133
|
+
DESIGN11: { right: 15 },
|
|
134
|
+
DESIGN13: { right: 15 },
|
|
135
|
+
DESIGN15: { right: 15 }
|
|
136
|
+
},
|
|
137
|
+
OUTSET12: {
|
|
138
|
+
DESIGN1: { right: 15 },
|
|
139
|
+
DESIGN3: { right: 15 },
|
|
140
|
+
DESIGN5: { right: 15 },
|
|
141
|
+
DESIGN7: { right: 15 },
|
|
142
|
+
DESIGN9: { right: 15 },
|
|
143
|
+
DESIGN11: { right: 15 },
|
|
144
|
+
DESIGN13: { right: 15 },
|
|
145
|
+
DESIGN15: { right: 15 }
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
exports.POS_INSET = {
|
|
149
|
+
INSET1: { top: GAP, left: GAP },
|
|
150
|
+
INSET2: { top: GAP, left: '50%', transform: 'translateX(-50%)' },
|
|
151
|
+
INSET3: { top: GAP, right: GAP },
|
|
152
|
+
INSET4: { top: '50%', right: GAP, transform: 'translateY(-50%)' },
|
|
153
|
+
INSET5: { bottom: GAP, right: GAP },
|
|
154
|
+
INSET6: { bottom: GAP, left: '50%', transform: 'translateX(-50%)' },
|
|
155
|
+
INSET7: { left: GAP, bottom: GAP },
|
|
156
|
+
INSET8: { top: '50%', left: GAP, transform: 'translateY(-50%)' }
|
|
157
|
+
};
|
|
158
|
+
exports.POS_OUTSET_NAVIGATION = {
|
|
159
|
+
OUTSET1: { bottom: 20 },
|
|
160
|
+
OUTSET2: { bottom: 20 },
|
|
161
|
+
OUTSET3: { bottom: 20 },
|
|
162
|
+
OUTSET4: { left: 20 },
|
|
163
|
+
OUTSET5: { left: 20 },
|
|
164
|
+
OUTSET6: { left: 20 },
|
|
165
|
+
OUTSET7: { top: 20 },
|
|
166
|
+
OUTSET8: { top: 20 },
|
|
167
|
+
OUTSET9: { top: 20 },
|
|
168
|
+
OUTSET10: { right: 20 },
|
|
169
|
+
OUTSET11: { right: 20 },
|
|
170
|
+
OUTSET12: { right: 20 }
|
|
171
|
+
};
|
|
172
|
+
var POS_OUTSET_GROUP = {
|
|
173
|
+
OUTSET1: {
|
|
174
|
+
top: 0,
|
|
175
|
+
height: 0
|
|
176
|
+
},
|
|
177
|
+
OUTSET2: {
|
|
178
|
+
bottom: '100%',
|
|
179
|
+
height: 0,
|
|
180
|
+
left: '50%',
|
|
181
|
+
transform: 'translateX(-50%)'
|
|
182
|
+
},
|
|
183
|
+
OUTSET3: {
|
|
184
|
+
bottom: '100%',
|
|
185
|
+
height: 0,
|
|
186
|
+
right: 0,
|
|
187
|
+
justifyContent: 'flex-start'
|
|
188
|
+
},
|
|
189
|
+
OUTSET4: {
|
|
190
|
+
top: 0,
|
|
191
|
+
width: 0,
|
|
192
|
+
right: 0
|
|
193
|
+
},
|
|
194
|
+
OUTSET5: {
|
|
195
|
+
top: '50%',
|
|
196
|
+
width: 0,
|
|
197
|
+
right: 0,
|
|
198
|
+
transform: 'translateY(-50%)'
|
|
199
|
+
},
|
|
200
|
+
OUTSET6: {
|
|
201
|
+
bottom: 0,
|
|
202
|
+
width: 0,
|
|
203
|
+
right: 0
|
|
204
|
+
},
|
|
205
|
+
OUTSET7: {
|
|
206
|
+
bottom: 0,
|
|
207
|
+
height: 0,
|
|
208
|
+
right: 0
|
|
209
|
+
},
|
|
210
|
+
OUTSET8: {
|
|
211
|
+
bottom: 0,
|
|
212
|
+
height: 0,
|
|
213
|
+
left: '50%',
|
|
214
|
+
transform: 'translateX(-50%)'
|
|
215
|
+
},
|
|
216
|
+
OUTSET9: {
|
|
217
|
+
bottom: 0,
|
|
218
|
+
height: 0,
|
|
219
|
+
left: 0
|
|
220
|
+
},
|
|
221
|
+
OUTSET10: {
|
|
222
|
+
bottom: 0,
|
|
223
|
+
width: 0,
|
|
224
|
+
left: 0
|
|
225
|
+
},
|
|
226
|
+
OUTSET11: {
|
|
227
|
+
top: '50%',
|
|
228
|
+
width: 0,
|
|
229
|
+
left: 0,
|
|
230
|
+
transform: 'translateY(-50%)'
|
|
231
|
+
},
|
|
232
|
+
OUTSET12: {
|
|
233
|
+
top: 0,
|
|
234
|
+
width: 0,
|
|
235
|
+
left: 0
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
// export const POS_OUTSET = {
|
|
239
|
+
// PAGINATION: POS_OUTSET_PAGINATION,
|
|
240
|
+
// PREV: POS_OUTSET_NAVIGATION,
|
|
241
|
+
// NEXT: POS_OUTSET_NAVIGATION,
|
|
242
|
+
// GROUP: POS_OUTSET_GROUP
|
|
243
|
+
// };
|
|
@@ -13,6 +13,6 @@ export declare const useFlexGridLayout: ({ components }: {
|
|
|
13
13
|
left: string;
|
|
14
14
|
};
|
|
15
15
|
componentGroups: Record<string, SlideBannerElementsProps[]>;
|
|
16
|
-
getPositionStyle: (position: string, ccbInset: Record<string, string
|
|
16
|
+
getPositionStyle: (position: string, ccbInset: Record<string, string>, designType: string, size: 'LARGE' | 'MEDIUM' | 'SMALL' | 'GROUP', elementType: string) => CSSProperties;
|
|
17
17
|
getComponentGroupLayout: (components: SlideBannerElementsProps[], position: string) => CSSProperties;
|
|
18
18
|
};
|
|
@@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.useFlexGridLayout = void 0;
|
|
15
15
|
var react_1 = require("react");
|
|
16
|
+
var elementPositions_1 = require("./elementPositions");
|
|
16
17
|
var useFlexGridLayout = function (_a) {
|
|
17
18
|
var components = _a.components;
|
|
18
19
|
var _b = (0, react_1.useState)({ top: 0, right: 0, bottom: 0, left: 0 }), groupSizes = _b[0], setGroupSizes = _b[1];
|
|
@@ -60,50 +61,33 @@ var useFlexGridLayout = function (_a) {
|
|
|
60
61
|
return directions[position];
|
|
61
62
|
};
|
|
62
63
|
// 위치에 따른 스타일 결정 (CCB 크기를 고려)
|
|
63
|
-
var getPositionStyle = function (position, ccbInset) {
|
|
64
|
+
var getPositionStyle = function (position, ccbInset, designType, size, elementType) {
|
|
65
|
+
var EAST = ['OUTSET4', 'OUTSET5', 'OUTSET6'];
|
|
66
|
+
var WEST = ['OUTSET10', 'OUTSET11', 'OUTSET12'];
|
|
67
|
+
var SOUTH = ['OUTSET7', 'OUTSET8', 'OUTSET9'];
|
|
68
|
+
var NORTH = ['OUTSET1', 'OUTSET2', 'OUTSET3'];
|
|
69
|
+
var isEAST = EAST.includes(position);
|
|
70
|
+
var isWEST = WEST.includes(position);
|
|
71
|
+
var isSOUTH = SOUTH.includes(position);
|
|
72
|
+
var isNORTH = NORTH.includes(position);
|
|
64
73
|
var base = {
|
|
65
|
-
position: '
|
|
74
|
+
position: 'relative',
|
|
66
75
|
display: 'flex',
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
justifyContent: 'center'
|
|
76
|
+
alignItems: isSOUTH ? 'flex-start' : isNORTH ? 'flex-end' : 'center',
|
|
77
|
+
justifyContent: isEAST ? 'flex-start' : isWEST ? 'flex-end' : 'center'
|
|
69
78
|
};
|
|
70
|
-
// CCB의 중앙 위치 계산
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// CCB의 실제 크기와 중앙 위치 계산
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
OUTSET2: { top: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
83
|
-
OUTSET3: { top: -50, right: ccbRight },
|
|
84
|
-
OUTSET4: { top: ccbTop, right: 50 },
|
|
85
|
-
OUTSET5: { top: "".concat(ccbCenterY, "px"), right: 50, transform: 'translateY(-50%)' },
|
|
86
|
-
OUTSET6: { bottom: ccbBottom, right: 50 },
|
|
87
|
-
OUTSET7: { bottom: -50, right: ccbRight },
|
|
88
|
-
OUTSET8: { bottom: -50, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
89
|
-
OUTSET9: { bottom: -50, left: ccbLeft },
|
|
90
|
-
OUTSET10: { bottom: ccbBottom, left: -50 },
|
|
91
|
-
OUTSET11: { top: "".concat(ccbCenterY, "px"), left: -50, transform: 'translateY(-50%)' },
|
|
92
|
-
OUTSET12: { top: ccbTop, left: -50 },
|
|
93
|
-
INSET1: { top: ccbTop + GAP, left: ccbLeft + GAP },
|
|
94
|
-
INSET2: { top: ccbTop + GAP, left: "".concat(ccbCenterX, "px"), transform: 'translateX(-50%)' },
|
|
95
|
-
INSET3: { top: ccbTop + GAP, right: ccbRight + GAP },
|
|
96
|
-
INSET4: { top: "".concat(ccbCenterY, "px"), right: ccbRight + GAP, transform: 'translateY(-50%)' },
|
|
97
|
-
INSET5: { bottom: ccbBottom + GAP, right: ccbRight + GAP },
|
|
98
|
-
INSET6: {
|
|
99
|
-
bottom: ccbBottom + GAP,
|
|
100
|
-
left: "".concat(ccbCenterX, "px"),
|
|
101
|
-
transform: 'translateX(-50%)'
|
|
102
|
-
},
|
|
103
|
-
INSET7: { bottom: ccbBottom + GAP, left: ccbLeft + GAP },
|
|
104
|
-
INSET8: { top: "".concat(ccbCenterY, "px"), left: ccbLeft + GAP, transform: 'translateY(-50%)' }
|
|
105
|
-
};
|
|
106
|
-
return __assign(__assign({}, base), positions[position]);
|
|
79
|
+
// // CCB의 중앙 위치 계산
|
|
80
|
+
// const ccbTop = parseFloat(ccbInset.top) || 0;
|
|
81
|
+
// const ccbRight = parseFloat(ccbInset.right) || 0;
|
|
82
|
+
// const ccbBottom = parseFloat(ccbInset.bottom) || 0;
|
|
83
|
+
// const ccbLeft = parseFloat(ccbInset.left) || 0;
|
|
84
|
+
// // CCB의 실제 크기와 중앙 위치 계산
|
|
85
|
+
// const ccbWidth = layoutSize.width - ccbLeft - ccbRight;
|
|
86
|
+
// const ccbHeight = layoutSize.height - ccbTop - ccbBottom;
|
|
87
|
+
// const ccbCenterX = ccbLeft + ccbWidth / 2;
|
|
88
|
+
// const ccbCenterY = ccbTop + ccbHeight / 2;
|
|
89
|
+
var pos = (0, elementPositions_1.getPosition)(position, designType, size, elementType);
|
|
90
|
+
return __assign(__assign({}, base), pos);
|
|
107
91
|
};
|
|
108
92
|
// 컴포넌트 그룹 레이아웃
|
|
109
93
|
var getComponentGroupLayout = function (components, position) {
|
|
@@ -129,8 +113,7 @@ var useFlexGridLayout = function (_a) {
|
|
|
129
113
|
return {
|
|
130
114
|
display: 'flex',
|
|
131
115
|
flexDirection: isHorizontal ? 'row' : 'column',
|
|
132
|
-
gap: '8px'
|
|
133
|
-
alignItems: 'center'
|
|
116
|
+
gap: '8px'
|
|
134
117
|
};
|
|
135
118
|
};
|
|
136
119
|
// ccbInset 계산
|
|
@@ -9,7 +9,7 @@ export declare function useSwiper(): {
|
|
|
9
9
|
isEnd: boolean;
|
|
10
10
|
onSwiper: (swiper: SwiperClass) => void;
|
|
11
11
|
onSlideChangeTransitionEnd: (swiper: SwiperClass) => void;
|
|
12
|
-
onAutoplayTimeLeft: (
|
|
12
|
+
onAutoplayTimeLeft: (swiper: SwiperClass, time: number, progress: number) => void;
|
|
13
13
|
onClickBullet: (index: number) => void;
|
|
14
14
|
onClickPrevBtn: () => void;
|
|
15
15
|
onClickNextBtn: () => void;
|
|
@@ -26,7 +26,7 @@ function useSwiper() {
|
|
|
26
26
|
setCurrentSlide(swiper.activeIndex + 1);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
var onAutoplayTimeLeft = (0, react_1.useCallback)(function (
|
|
29
|
+
var onAutoplayTimeLeft = (0, react_1.useCallback)(function (swiper, time, progress) {
|
|
30
30
|
leftTimeMsRef.current = time;
|
|
31
31
|
progressRef.current = progress;
|
|
32
32
|
}, []);
|
|
@@ -30,9 +30,22 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
|
30
30
|
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
31
31
|
var textSpecFormatOptions_1 = require("./textSpecFormatOptions");
|
|
32
32
|
function Text(props) {
|
|
33
|
-
var _a
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
var _d = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _d.device, mode = _d.mode;
|
|
34
35
|
var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
|
|
35
|
-
var index = props.index,
|
|
36
|
+
var index = props.index, _e = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _e.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _e.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _e.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _e.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE = _e.CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE, CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA = _e.CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, _f = props.CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE = _f.CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE, CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA = _f.CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA, CB_CONTENT_PROP_TEXTOPTION = props.CB_CONTENT_PROP_TEXTOPTION;
|
|
37
|
+
// const {
|
|
38
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_SUFFIX,
|
|
39
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_PREFIX,
|
|
40
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_FORMAT
|
|
41
|
+
// } = CB_CONTENT_PROP_TEXTOPTION ?? {
|
|
42
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_SUFFIX: '',
|
|
43
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_PREFIX: '',
|
|
44
|
+
// CB_CONTENT_PROP_TEXTOPTION_SPEC_FORMAT: 'NONE'
|
|
45
|
+
// };
|
|
46
|
+
var textSuffix = (_a = CB_CONTENT_PROP_TEXTOPTION === null || CB_CONTENT_PROP_TEXTOPTION === void 0 ? void 0 : CB_CONTENT_PROP_TEXTOPTION.CB_CONTENT_PROP_TEXTOPTION_SPEC_SUFFIX) !== null && _a !== void 0 ? _a : '';
|
|
47
|
+
var textPrefix = (_b = CB_CONTENT_PROP_TEXTOPTION === null || CB_CONTENT_PROP_TEXTOPTION === void 0 ? void 0 : CB_CONTENT_PROP_TEXTOPTION.CB_CONTENT_PROP_TEXTOPTION_SPEC_PREFIX) !== null && _b !== void 0 ? _b : '';
|
|
48
|
+
var textFormat = (_c = CB_CONTENT_PROP_TEXTOPTION === null || CB_CONTENT_PROP_TEXTOPTION === void 0 ? void 0 : CB_CONTENT_PROP_TEXTOPTION.CB_CONTENT_PROP_TEXTOPTION_SPEC_FORMAT) !== null && _c !== void 0 ? _c : 'NONE';
|
|
36
49
|
var cLinkValue = function () {
|
|
37
50
|
if (CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DATA' ||
|
|
38
51
|
CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DELEGATEDDATA') {
|
|
@@ -47,14 +60,14 @@ function Text(props) {
|
|
|
47
60
|
}
|
|
48
61
|
return CB_CONTENT_PROP_CLINK_SPEC_SRC;
|
|
49
62
|
};
|
|
50
|
-
var
|
|
63
|
+
var _g = (0, useCLINK_1.default)({
|
|
51
64
|
src: cLinkValue(),
|
|
52
65
|
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
53
66
|
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
|
|
54
67
|
internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
|
|
55
|
-
}), CLINKCursor =
|
|
56
|
-
var
|
|
57
|
-
var
|
|
68
|
+
}), CLINKCursor = _g.CLINKCursor, onClickCLINK = _g.onClickCLINK;
|
|
69
|
+
var _h = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _h.style, textHoverStyle = _h.hoverStyle;
|
|
70
|
+
var _j = (0, util_1.parseProperties)(props, device), propsStyle = _j.style, propsHoverStyle = _j.hoverStyle, layoutStyle = _j.layout, effect = _j.effect;
|
|
58
71
|
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
59
72
|
var googleFonts = (0, getGoogleFonts_1.getGoogleFontsFromTextSpecCode)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
|
|
60
73
|
(0, useGoogleFonts_1.default)({ fonts: googleFonts });
|
|
@@ -73,7 +86,7 @@ function Text(props) {
|
|
|
73
86
|
var hasEffect = !isNoneEffectType;
|
|
74
87
|
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
75
88
|
var textValue = function () {
|
|
76
|
-
var FORMATOPTION =
|
|
89
|
+
var FORMATOPTION = textFormat;
|
|
77
90
|
var formatOption = textSpecFormatOptions_1.TEXT_SPEC_FORMAT_OPRIONS[FORMATOPTION];
|
|
78
91
|
var isDataConnected = CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE === 'DATA' ||
|
|
79
92
|
CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE === 'DELEGATEDDATA';
|
|
@@ -133,7 +146,7 @@ function Text(props) {
|
|
|
133
146
|
e.currentTarget.classList.add('hovered');
|
|
134
147
|
}, onMouseLeave: function (e) {
|
|
135
148
|
e.currentTarget.classList.remove('hovered');
|
|
136
|
-
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: [
|
|
149
|
+
}, className: "cb-layout-box cb-text", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: [textPrefix, textValue() === 'ERROR' ? 'EDITOR:FALLBACK_TEXT' : getTruncatedText(textValue()), textSuffix] })) }))] }));
|
|
137
150
|
}
|
|
138
151
|
exports.default = Text;
|
|
139
152
|
function getTextStyles(props, device) {
|
|
@@ -9,9 +9,11 @@ export type CB_CONTENT_PROP_TEXT = {
|
|
|
9
9
|
CB_CONTENT_PROP_TEXT_SPEC_TEXTMOBILEALTERNATIVE: STRING_PLAIN;
|
|
10
10
|
CB_CONTENT_PROP_TEXT_SPEC_VALUETYPE: CCB_VALUE_TYPE | CB_VALUE_TYPE;
|
|
11
11
|
CB_CONTENT_PROP_TEXT_SPEC_CONNECTDATA: STRING_PLAIN;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
};
|
|
13
|
+
export type CB_CONTENT_PROP_TEXTOPTION = {
|
|
14
|
+
CB_CONTENT_PROP_TEXTOPTION_SPEC_PREFIX: STRING_PLAIN;
|
|
15
|
+
CB_CONTENT_PROP_TEXTOPTION_SPEC_SUFFIX: STRING_PLAIN;
|
|
16
|
+
CB_CONTENT_PROP_TEXTOPTION_SPEC_FORMAT: ENUM_STRING;
|
|
15
17
|
};
|
|
16
18
|
export type CB_CONTENT_PROP_CLINK = {
|
|
17
19
|
CB_CONTENT_PROP_CLINK_SPEC_TYPE: 'INTERNAL' | 'EXTERNAL' | 'DISABLED';
|
|
@@ -40,6 +42,7 @@ export type CB_CONTENT_PROP_CONTENTSCAROUSEL = {
|
|
|
40
42
|
CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MANUALITEMS: ManualItem[];
|
|
41
43
|
CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_ITEMCOUNTS: NUMBER_INTEGER;
|
|
42
44
|
CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS: NUMBER_INTEGER;
|
|
45
|
+
CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_MDISPLAYCOUNTS: NUMBER_INTEGER;
|
|
43
46
|
};
|
|
44
47
|
export type CB_CONTENT_PROP_SLIDEBANNER = {
|
|
45
48
|
CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE: CCB_VALUE_TYPE;
|
|
@@ -58,7 +61,9 @@ export type CB_CONTENT_PROP_CONTENTSLIST = {
|
|
|
58
61
|
CB_CONTENT_PROP_CONTENTSLIST_SPEC_MANUALITEMS: ManualItem[];
|
|
59
62
|
CB_CONTENT_PROP_CONTENTSLIST_SPEC_ITEMCOUNTS: NUMBER_INTEGER;
|
|
60
63
|
CB_CONTENT_PROP_CONTENTSLIST_SPEC_DISPLAYCOUNTS: NUMBER_INTEGER;
|
|
64
|
+
CB_CONTENT_PROP_CONTENTSLIST_SPEC_MDISPLAYCOUNTS: NUMBER_INTEGER;
|
|
61
65
|
CB_CONTENT_PROP_CONTENTSLIST_SPEC_COLUMNS: NUMBER_INTEGER;
|
|
66
|
+
CB_CONTENT_PROP_CONTENTSLIST_SPEC_MCOLUMNS: NUMBER_INTEGER;
|
|
62
67
|
CB_CONTENT_PROP_CONTENTSLIST_SPEC_EDITCOMMONITEM: null | STRING_PLAIN;
|
|
63
68
|
};
|
|
64
69
|
export type ManualItem = {
|
|
@@ -2,7 +2,7 @@ import type { CB_STYLE_PROP_CONTENTSCAROUSELBUTTON_SPECS, CB_STYLE_PROP_CONTENTS
|
|
|
2
2
|
import type { CB_STYLE_PROP_CONTENTSLISTDESIGN_SPECS, CB_STYLE_PROP_CONTENTSLISTPAGINATION_SPECS } from '../components/ComponentBlock/componentBlocks/ContentsList/types';
|
|
3
3
|
import type { CB_STYLE_PROP_SLIDEBANNERBUTTON_SPECS, CB_STYLE_PROP_SLIDEBANNERDESIGN_SPECS, CB_STYLE_PROP_SLIDEBANNERPAGINATION_SPECS, CB_STYLE_PROP_SLIDEBANNERPLAYBACKMETHOD_SPECS, CB_STYLE_PROP_SLIDEBANNERPROGRESSBAR_SPECS } from '../components/ComponentBlock/componentBlocks/SlideBanner/types';
|
|
4
4
|
import type { CB_TWITTER_STYLE_PROPS } from '../components/ComponentBlock/componentBlocks/Twitter/types';
|
|
5
|
-
import type { CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER, CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_TEXT_SPECS, CB_CONTENT_PROP_CONTENTSLIST, CB_CONTENT_PROP_VIDEO } from '../components/ComponentBlock/componentBlocks/types';
|
|
5
|
+
import type { CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER, CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_TEXT_SPECS, CB_CONTENT_PROP_CONTENTSLIST, CB_CONTENT_PROP_VIDEO, CB_CONTENT_PROP_TEXTOPTION } from '../components/ComponentBlock/componentBlocks/types';
|
|
6
6
|
import type { CB_CONTENT_PROP_YOUTUBE_TYPE, CB_STYLE_PROP_BGCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Youtube/types';
|
|
7
7
|
import type { CB_CONTENT_PROP_VISIBILITY_SPECS } from './contentPropParsers/parseContentVisibility';
|
|
8
8
|
import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './effectPropParsers/parseEffectPropEntAnim';
|
|
@@ -46,6 +46,7 @@ export type CB_PLACEMENT_PROP_SPECS = {
|
|
|
46
46
|
};
|
|
47
47
|
export type CB_TEXT_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
|
|
48
48
|
CB_CONTENT_PROP_TEXT: CB_CONTENT_PROP_TEXT;
|
|
49
|
+
CB_CONTENT_PROP_TEXTOPTION: CB_CONTENT_PROP_TEXTOPTION;
|
|
49
50
|
CB_CONTENT_PROP_CLINK: CB_CONTENT_PROP_CLINK;
|
|
50
51
|
CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
|
|
51
52
|
CB_STYLE_PROP_TEXT: CB_STYLE_PROP_TEXT_SPECS;
|
|
@@ -56,6 +57,7 @@ export type CB_TEXT_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
|
|
|
56
57
|
};
|
|
57
58
|
export type CB_BTN_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
|
|
58
59
|
CB_CONTENT_PROP_TEXT: CB_CONTENT_PROP_TEXT;
|
|
60
|
+
CB_CONTENT_PROP_TEXTOPTION: CB_CONTENT_PROP_TEXTOPTION;
|
|
59
61
|
CB_CONTENT_PROP_CLINK: CB_CONTENT_PROP_CLINK;
|
|
60
62
|
CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
|
|
61
63
|
CB_STYLE_PROP_TEXT: CB_STYLE_PROP_TEXT_SPECS;
|