pds-dev-kit-web-test 2.5.467 → 2.5.469
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/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.d.ts +2 -17
- package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.js +5 -35
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +21 -0
- package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +1133 -0
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +4 -1
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +5 -3
- 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 +10 -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/sectionContext.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.js +47 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.js +76 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.js +76 -0
- 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/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/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +5 -3
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.js +9 -2
- 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 +1606 -0
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +1123 -0
- package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/mock_contentsList.js +1091 -0
- package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +96 -0
- package/dist/src/sub/DynamicLayout/mock_queryData.js +2639 -0
- package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +842 -0
- package/dist/src/sub/DynamicLayout/mock_slideBanner.js +854 -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/mock_video_cb.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/mock_video_cb.js +4 -5
- package/dist/src/sub/DynamicLayout/mocks.d.ts +8 -961
- package/dist/src/sub/DynamicLayout/mocks.js +4286 -6
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +4 -4
- 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 +249 -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 +35 -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 +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +183 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +23 -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 +849 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +162 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +40 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +747 -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 +105 -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 +172 -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 +29 -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 +25 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +183 -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 +380 -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 +56 -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 +39 -3
- 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 +215 -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 +35 -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 +33 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +183 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +23 -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 +849 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +162 -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 +956 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +120 -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 +31 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.js +3 -28
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.js +4 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +45 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/group.d.ts +1 -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/parsePlacement.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +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.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -0
- package/dist/src/sub/DynamicLayout/types.d.ts +49 -16
- package/package.json +3 -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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { NUMBER_INTEGER } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
2
|
+
export type ContentsListPropsKeys = keyof CB_STYLE_PROP_CONTENTSLIST_SPECS;
|
|
3
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE = 'DESIGN1' | 'DESIGN2' | null;
|
|
4
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE = 'WIDE' | 'NORMAL' | 'NARROW' | null;
|
|
5
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE = NUMBER_INTEGER | null;
|
|
6
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE = boolean | null;
|
|
7
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE = boolean | null;
|
|
8
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE = 'NONE' | 'DESIGN1' | 'DESIGN2' | 'DESIGN3' | 'DESIGN4' | 'DESIGN5' | 'DESIGN6' | 'DESIGN7' | 'DESIGN8' | 'DESIGN9' | 'DESIGN10' | 'DESIGN11' | 'DESIGN12' | 'DESIGN13' | 'DESIGN14' | 'DESIGN15' | 'DESIGN16' | 'DESIGN17' | null;
|
|
9
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE = 'OUTSET1' | 'OUTSET2' | 'OUTSET3' | 'OUTSET4' | 'OUTSET5' | 'OUTSET6' | 'OUTSET7' | 'OUTSET8' | 'OUTSET9' | 'OUTSET10' | 'OUTSET11' | 'OUTSET12' | 'INSET1' | 'INSET2' | 'INSET3' | 'INSET4' | 'INSET5' | 'INSET6' | 'INSET7' | 'INSET8' | null;
|
|
10
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE = 'SMALL' | 'MEDIUM' | 'LARGE' | null;
|
|
11
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR = string;
|
|
12
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR = string;
|
|
13
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPECS_BASE = {
|
|
14
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE: CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE;
|
|
15
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING: CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE;
|
|
16
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT: CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE;
|
|
17
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT: CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE;
|
|
18
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL: CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE;
|
|
19
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
|
|
20
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE;
|
|
21
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE;
|
|
22
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR;
|
|
23
|
+
CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR: CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
|
|
24
|
+
};
|
|
25
|
+
export type CB_STYLE_PROP_CONTENTSLIST_SPECS = CB_STYLE_PROP_CONTENTSLIST_SPECS_BASE & {
|
|
26
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE;
|
|
27
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE;
|
|
28
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_STYLE_TYPE;
|
|
29
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE;
|
|
30
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE;
|
|
31
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMSPACING_TYPE;
|
|
32
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE;
|
|
33
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE;
|
|
34
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMLINEHEIGHT_TYPE;
|
|
35
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE;
|
|
36
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE;
|
|
37
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_ITEMHEIGHTFITCONTENT_TYPE;
|
|
38
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE;
|
|
39
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE;
|
|
40
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_INFINITESCROLL_TYPE;
|
|
41
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
|
|
42
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
|
|
43
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSTYLE_TYPE;
|
|
44
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE;
|
|
45
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE;
|
|
46
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONLOCATION_TYPE;
|
|
47
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE;
|
|
48
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE;
|
|
49
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSIZE_TYPE;
|
|
50
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR;
|
|
51
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR;
|
|
52
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONPRIMARYCOLOR;
|
|
53
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
|
|
54
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR:MOBILE': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
|
|
55
|
+
'CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR:MOBILE:HOVER': CB_STYLE_PROP_CONTENTSLIST_SPEC_PAGINATIONSECONDARYCOLOR;
|
|
56
|
+
};
|
|
@@ -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,27 @@ 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, { src: imgSrc() === 'ERROR'
|
|
112
|
+
? 'https://static.publ.site/pages-sample/img_cb_style_prop_bgmedia_spec_imageselector_01.png'
|
|
113
|
+
: imgSrc(), normalStyle: __assign({}, imgStyle.normal), hoverStyle: __assign({}, imgStyle.hover) }) })) })) }))] }));
|
|
78
114
|
}
|
|
79
115
|
function parseImageCBStyle(style, hoverStyle, mode) {
|
|
80
116
|
var boxStyle = {
|
|
@@ -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,215 @@
|
|
|
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;
|
|
60
|
+
var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, mode = _b.mode, queryData = _b.queryData;
|
|
61
|
+
var index = props.index,
|
|
62
|
+
// CONTENT : 슬라이드배너
|
|
63
|
+
_c = props.CB_CONTENT_PROP_SLIDEBANNER, CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS, CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE, CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA = _c.CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
|
|
64
|
+
// STYLE: 슬라이드배너
|
|
65
|
+
CB_STYLE_PROP_SLIDEBANNER = props.CB_STYLE_PROP_SLIDEBANNER,
|
|
66
|
+
// STYLE: 그림자
|
|
67
|
+
CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
|
|
68
|
+
// EFFECT: 진입
|
|
69
|
+
CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
|
70
|
+
var compositions = props.compositions;
|
|
71
|
+
var _d = (0, react_1.useState)(false), isHovered = _d[0], setIsHovered = _d[1];
|
|
72
|
+
var _e = (0, react_1.useState)(1), currentSlide = _e[0], setCurrentSlide = _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
|
+
setIsBeginning(swiper.isBeginning);
|
|
117
|
+
setIsEnd(swiper.isEnd);
|
|
118
|
+
};
|
|
119
|
+
var handleSlideChangeTransitionEnd = function (swiper) {
|
|
120
|
+
var isLoop = swiper.params.loop || false;
|
|
121
|
+
setIsBeginning(swiper.isBeginning);
|
|
122
|
+
setIsEnd(swiper.isEnd);
|
|
123
|
+
if (isLoop) {
|
|
124
|
+
// loop 모드에서는 realIndex가 실제 슬라이드 인덱스
|
|
125
|
+
setCurrentSlide(swiper.realIndex + 1);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
// loop가 꺼져있을 때는 activeIndex 사용
|
|
129
|
+
setCurrentSlide(swiper.activeIndex + 1);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
var handleAutoplayTimeLeft = (0, react_1.useCallback)(function (_, time, progress) {
|
|
133
|
+
leftTimeMsRef.current = time;
|
|
134
|
+
progressRef.current = progress;
|
|
135
|
+
}, []);
|
|
136
|
+
var handleBulletClick = function (index) {
|
|
137
|
+
if (swiperRef.current) {
|
|
138
|
+
swiperRef.current.swiper.slideTo(index);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var handlePrevBtnClick = function () {
|
|
142
|
+
if (swiperRef.current) {
|
|
143
|
+
swiperRef.current.swiper.slidePrev();
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var handleNextBtnClick = function () {
|
|
147
|
+
if (swiperRef.current) {
|
|
148
|
+
swiperRef.current.swiper.slideNext();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
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: {
|
|
152
|
+
borderBottomLeftRadius: style.borderBottomLeftRadius,
|
|
153
|
+
borderBottomRightRadius: style.borderBottomRightRadius,
|
|
154
|
+
borderTopLeftRadius: style.borderTopLeftRadius,
|
|
155
|
+
borderTopRightRadius: style.borderTopRightRadius,
|
|
156
|
+
borderWidth: style.borderWidth,
|
|
157
|
+
borderColor: style.borderColor,
|
|
158
|
+
borderStyle: style.borderStyle
|
|
159
|
+
}, hoverBorderStyle: {
|
|
160
|
+
borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
|
|
161
|
+
borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
|
|
162
|
+
borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
|
|
163
|
+
borderTopRightRadius: hoverStyle.borderTopRightRadius,
|
|
164
|
+
borderWidth: hoverStyle.borderWidth,
|
|
165
|
+
borderColor: hoverStyle.borderColor,
|
|
166
|
+
borderStyle: hoverStyle.borderStyle
|
|
167
|
+
} }, { children: (0, jsx_runtime_1.jsx)(SlideBannerCore_1.default, __assign({ ref: swiperRef, onSwiper: handleSwiper, onSlideChangeTransitionEnd: handleSlideChangeTransitionEnd, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: 1, 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)({
|
|
168
|
+
valueType: CB_CONTENT_PROP_SLIDEBANNER_SPEC_VALUETYPE,
|
|
169
|
+
queryPath: CB_CONTENT_PROP_SLIDEBANNER_SPEC_CONNECTDATA,
|
|
170
|
+
limit: CB_CONTENT_PROP_SLIDEBANNER_SPEC_ITEMCOUNTS,
|
|
171
|
+
queryData: queryData,
|
|
172
|
+
compositions: compositions
|
|
173
|
+
}) })) })), (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { type: isHovered ? customPaginationHoverStyle.type : customPaginationNormalStyle.type, offset: isHovered ? customPaginationHoverStyle.offset : customPaginationNormalStyle.offset, primaryColor: isHovered
|
|
174
|
+
? customPaginationHoverStyle.primaryColor
|
|
175
|
+
: customPaginationNormalStyle.primaryColor, secondaryColor: isHovered
|
|
176
|
+
? customPaginationHoverStyle.secondaryColor
|
|
177
|
+
: customPaginationNormalStyle.secondaryColor, current: currentSlide, prevBtnDisabled: loop ? false : isBeginning, nextBtnDisabled: loop ? false : isEnd, total: (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper.slides.length, size: isHovered ? customPaginationHoverStyle.size : customPaginationNormalStyle.size, onBulletClick: handleBulletClick, onPrevBtnClick: handlePrevBtnClick, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: isBeginning, prevBtnType: isHovered
|
|
178
|
+
? customNavigationHoverStyle.prevBtnType
|
|
179
|
+
: customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
|
|
180
|
+
? customNavigationHoverStyle.prevBtnOffset
|
|
181
|
+
: customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
|
|
182
|
+
? customNavigationHoverStyle.prevBtnSize
|
|
183
|
+
: customNavigationNormalStyle.prevBtnSize, prevBtnPrimaryColor: isHovered
|
|
184
|
+
? customNavigationHoverStyle.prevBtnPrimaryColor
|
|
185
|
+
: customNavigationNormalStyle.prevBtnPrimaryColor, prevBtnSecondaryColor: isHovered
|
|
186
|
+
? customNavigationHoverStyle.prevBtnSecondaryColor
|
|
187
|
+
: customNavigationNormalStyle.prevBtnSecondaryColor, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: isEnd, nextBtnType: isHovered
|
|
188
|
+
? customNavigationHoverStyle.nextBtnType
|
|
189
|
+
: customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
|
|
190
|
+
? customNavigationHoverStyle.nextBtnOffset
|
|
191
|
+
: customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
|
|
192
|
+
? customNavigationHoverStyle.nextBtnSize
|
|
193
|
+
: customNavigationNormalStyle.nextBtnSize, nextBtnPrimaryColor: isHovered
|
|
194
|
+
? customNavigationHoverStyle.nextBtnPrimaryColor
|
|
195
|
+
: customNavigationNormalStyle.nextBtnPrimaryColor, nextBtnSecondaryColor: isHovered
|
|
196
|
+
? customNavigationHoverStyle.nextBtnSecondaryColor
|
|
197
|
+
: customNavigationNormalStyle.nextBtnSecondaryColor, 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, primaryColor: isHovered
|
|
198
|
+
? customProgressbarHoverStyle.primaryColor
|
|
199
|
+
: customProgressbarNormalStyle.primaryColor, secondaryColor: isHovered
|
|
200
|
+
? customProgressbarHoverStyle.secondaryColor
|
|
201
|
+
: customProgressbarNormalStyle.secondaryColor })] })) })) })));
|
|
202
|
+
}
|
|
203
|
+
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) {
|
|
204
|
+
var customStyle = _a.customStyle;
|
|
205
|
+
return customStyle;
|
|
206
|
+
});
|
|
207
|
+
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) {
|
|
208
|
+
var hoverBorderStyle = _a.hoverBorderStyle;
|
|
209
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverBorderStyle), { boxShadow: '' }));
|
|
210
|
+
}, function (_a) {
|
|
211
|
+
var borderStyle = _a.borderStyle;
|
|
212
|
+
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, borderStyle), { boxShadow: '' }));
|
|
213
|
+
});
|
|
214
|
+
exports.default = SlideBanner;
|
|
215
|
+
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,35 @@
|
|
|
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
|
+
prevBtnPrimaryColor?: string;
|
|
18
|
+
prevBtnSecondaryColor?: string;
|
|
19
|
+
nextBtnDisabled?: boolean;
|
|
20
|
+
nextBtnType?: CB_STYLE_PROP_SLIDEBANNER_SPEC_NEXTBTNSTYLE_TYPE;
|
|
21
|
+
nextBtnOffset?: NavigationOffset;
|
|
22
|
+
nextBtnSize?: number;
|
|
23
|
+
nextBtnPrimaryColor?: string;
|
|
24
|
+
nextBtnSecondaryColor?: string;
|
|
25
|
+
onPrevBtnClick?: () => void;
|
|
26
|
+
onNextBtnClick?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const CustomNavigation: ({ prevBtnDisabled, prevBtnType, prevBtnOffset, prevBtnSize, prevBtnPrimaryColor, prevBtnSecondaryColor, nextBtnDisabled, nextBtnType, nextBtnOffset, nextBtnSize, nextBtnPrimaryColor, nextBtnSecondaryColor, onPrevBtnClick, onNextBtnClick }: CustomNavigationProps) => JSX.Element;
|
|
29
|
+
export interface FlexBoxProps {
|
|
30
|
+
direction?: 'row' | 'column';
|
|
31
|
+
justifyContent?: string;
|
|
32
|
+
alignItems?: string;
|
|
33
|
+
gap?: string;
|
|
34
|
+
}
|
|
35
|
+
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, prevBtnPrimaryColor = _a.prevBtnPrimaryColor, prevBtnSecondaryColor = _a.prevBtnSecondaryColor, _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, nextBtnPrimaryColor = _a.nextBtnPrimaryColor, nextBtnSecondaryColor = _a.nextBtnSecondaryColor, 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 = prevBtnType === 'NONE' ? undefined : navigationConfigs_1.prevButtonMappedIcons[prevBtnType];
|
|
59
|
+
var nextButton = nextBtnType === 'NONE' ? undefined : navigationConfigs_1.nextButtonMappedIcons[nextBtnType];
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(S_Navigation, __assign({ "$offset": isSameOffset ? prevBtnOffset : undefined, "$size": isSameOffset ? prevBtnSize : 1 }, { children: [prevButton && ((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, borderColorKey: prevButton.borderColorKey, overrideBaseColorHex: prevBtnPrimaryColor, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: prevBtnSecondaryColor, shadow: prevButton.shadow, onClick: onPrevBtnClick }) }))), nextButton && ((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, borderColorKey: nextButton.baseColorKey, overrideBaseColorHex: nextBtnPrimaryColor, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', overrideIconColorHex: nextBtnSecondaryColor, 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,33 @@
|
|
|
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
|
+
primaryColor?: string;
|
|
18
|
+
secondaryColor?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const CustomPagination: ({ current, total, type, offset, size, primaryColor, secondaryColor, prevBtnDisabled, nextBtnDisabled, onBulletClick, onPrevBtnClick, onNextBtnClick }: CustomPaginationProps & {
|
|
21
|
+
prevBtnDisabled: boolean;
|
|
22
|
+
nextBtnDisabled: boolean;
|
|
23
|
+
onBulletClick: (index: number) => void;
|
|
24
|
+
onPrevBtnClick: () => void;
|
|
25
|
+
onNextBtnClick: () => void;
|
|
26
|
+
}) => JSX.Element;
|
|
27
|
+
export interface FlexBoxProps {
|
|
28
|
+
direction?: 'row' | 'column';
|
|
29
|
+
justifyContent?: string;
|
|
30
|
+
alignItems?: string;
|
|
31
|
+
gap?: string;
|
|
32
|
+
}
|
|
33
|
+
export default CustomPagination;
|