pds-dev-kit-web-test 2.5.395 → 2.5.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/src/common/hooks/useTooltip.js +1 -1
  2. package/dist/src/common/styles/colorSet/index.d.ts +2 -2
  3. package/dist/src/common/styles/colorSet/index.js +2 -2
  4. package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
  5. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  6. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +20 -0
  7. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +1132 -0
  8. package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +4 -1
  9. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +4 -2
  10. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +53 -53
  11. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.d.ts +11 -0
  12. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.js +45 -0
  13. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +9 -0
  14. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +79 -0
  15. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  16. package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
  17. package/dist/src/sub/DynamicLayout/components/Section/components/VideoBGMedia.js +16 -1
  18. package/dist/src/sub/DynamicLayout/components/Section/sectionContext.d.ts +2 -2
  19. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +40 -0
  20. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +36 -177
  21. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.d.ts +12 -0
  22. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/downIcons.js +76 -0
  23. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.d.ts +4 -0
  24. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/index.js +47 -0
  25. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.d.ts +12 -0
  26. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/leftIcons.js +76 -0
  27. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.d.ts +12 -0
  28. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/rightIcons.js +76 -0
  29. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.d.ts +12 -0
  30. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/paginationIcons/upIcons.js +76 -0
  31. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +152 -4
  32. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +150 -2
  33. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +45 -1
  34. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +262 -9
  35. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +593 -0
  36. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +253 -0
  37. package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +139 -0
  38. package/dist/src/sub/DynamicLayout/compositionActionTypes.js +2 -0
  39. package/dist/src/sub/DynamicLayout/compositionQueryContext.d.ts +8 -0
  40. package/dist/src/sub/DynamicLayout/compositionQueryContext.js +14 -0
  41. package/dist/src/sub/DynamicLayout/mock_composition.d.ts +3 -0
  42. package/dist/src/sub/DynamicLayout/mock_composition.js +801 -0
  43. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +1 -0
  44. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +1099 -0
  45. package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +1 -0
  46. package/dist/src/sub/DynamicLayout/mock_contentsList.js +1082 -0
  47. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +810 -0
  48. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +822 -0
  49. package/dist/src/sub/DynamicLayout/mock_video.d.ts +368 -0
  50. package/dist/src/sub/DynamicLayout/mock_video.js +371 -0
  51. package/dist/src/sub/DynamicLayout/mocks.d.ts +8 -960
  52. package/dist/src/sub/DynamicLayout/mocks.js +4286 -6
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +13 -3
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +18 -2
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +4 -4
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +230 -2
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +17 -0
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +59 -0
  59. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +31 -0
  60. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +118 -0
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +31 -0
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +191 -0
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +21 -0
  64. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +117 -0
  65. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +4 -0
  66. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +889 -0
  67. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +27 -0
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +96 -0
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +50 -0
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +905 -0
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +1 -0
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +8 -0
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +90 -0
  74. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.js +2 -0
  75. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +8 -0
  76. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +112 -0
  77. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.d.ts +17 -0
  78. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.js +39 -0
  79. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +27 -0
  80. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +115 -0
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +23 -0
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +176 -0
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +30 -0
  84. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +351 -0
  85. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.d.ts +1 -0
  86. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.js +8 -0
  87. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +46 -0
  88. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.js +2 -0
  89. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +51 -4
  90. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +8 -0
  91. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +225 -0
  92. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +15 -0
  93. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +39 -0
  94. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +31 -0
  95. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +118 -0
  96. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +31 -0
  97. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +191 -0
  98. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +21 -0
  99. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +117 -0
  100. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +4 -0
  101. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +889 -0
  102. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +27 -0
  103. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +96 -0
  104. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +1 -0
  105. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.js +8 -0
  106. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +48 -0
  107. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +852 -0
  108. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +80 -0
  109. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +2 -0
  110. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +50 -7
  111. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +45 -1
  112. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -1
  113. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +27 -10
  114. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +3 -1
  115. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +4 -4
  116. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +2 -2
  117. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.d.ts +14 -0
  118. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.js +26 -0
  119. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  121. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +52 -3
  122. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -0
  123. package/dist/src/sub/DynamicLayout/types.d.ts +48 -15
  124. package/package.json +2 -2
  125. package/release-note.md +2 -2
  126. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +0 -6
  127. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +0 -27
@@ -19,11 +19,13 @@ require("react");
19
19
  var newUtils_1 = require("../../newUtils");
20
20
  var types_1 = require("../../types");
21
21
  var Button_1 = __importDefault(require("./componentBlocks/Button/Button"));
22
- var ContentsCarousel_1 = __importDefault(require("./componentBlocks/ContentsCarousel/ContentsCarousel"));
22
+ var ContentsCarousel_1 = require("./componentBlocks/ContentsCarousel");
23
+ var ContentsList_1 = require("./componentBlocks/ContentsList");
23
24
  var Divider_1 = __importDefault(require("./componentBlocks/Divider/Divider"));
24
25
  var Embed_1 = __importDefault(require("./componentBlocks/Embed/Embed"));
25
26
  var Image_1 = __importDefault(require("./componentBlocks/Image/Image"));
26
27
  var RichText_1 = require("./componentBlocks/RichText");
28
+ var SlideBanner_1 = require("./componentBlocks/SlideBanner");
27
29
  var Text_1 = __importDefault(require("./componentBlocks/Text/Text"));
28
30
  var Twitter_1 = __importDefault(require("./componentBlocks/Twitter/Twitter"));
29
31
  var VideoPlayer_1 = require("./componentBlocks/VideoPlayer");
@@ -51,9 +53,17 @@ function ComponentBlockMatcher(_a) {
51
53
  return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
52
54
  case types_1.CB_ALL_CODES.CB_VIDEOPLAYER:
53
55
  return (0, jsx_runtime_1.jsx)(VideoPlayer_1.VideoPlayer, __assign({}, propsWithValue, { index: index }));
54
- case types_1.CB_ALL_CODES.CB_CONTENTS_CAROUSEL: {
56
+ case types_1.CB_ALL_CODES.CB_CONTENTSCAROUSEL: {
55
57
  var compositions = cbProps.compositions;
56
- return ((0, jsx_runtime_1.jsx)(ContentsCarousel_1.default, __assign({}, propsWithValue, { compositions: compositions, index: index })));
58
+ return ((0, jsx_runtime_1.jsx)(ContentsCarousel_1.ContentsCarousel, __assign({}, propsWithValue, { compositions: compositions, index: index })));
59
+ }
60
+ case types_1.CB_ALL_CODES.CB_SLIDEBANNER: {
61
+ var compositions = cbProps.compositions;
62
+ return ((0, jsx_runtime_1.jsx)(SlideBanner_1.SlideBanner, __assign({}, propsWithValue, { compositions: compositions, index: index })));
63
+ }
64
+ case types_1.CB_ALL_CODES.CB_LIST: {
65
+ var compositions = cbProps.compositions;
66
+ return ((0, jsx_runtime_1.jsx)(ContentsList_1.ContentsList, __assign({}, propsWithValue, { compositions: compositions, index: index })));
57
67
  }
58
68
  default:
59
69
  return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" });
@@ -29,6 +29,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
29
29
  /* eslint-disable react/destructuring-assignment */
30
30
  var react_1 = require("react");
31
31
  var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
32
+ var compositionQueryContext_1 = require("../../../../../../../DynamicLayout/compositionQueryContext");
32
33
  var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
33
34
  var useGoogleFonts_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks/useGoogleFonts");
34
35
  var newUtils_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils");
@@ -40,9 +41,24 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
40
41
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
41
42
  function Button(props) {
42
43
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
43
- var index = props.index, CB_STYLE_PROP_COLOR = props.CB_STYLE_PROP_COLOR, _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_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
44
+ var queryContext = (0, compositionQueryContext_1.useCCBQueryPath)();
45
+ var index = props.index, CB_STYLE_PROP_COLOR = props.CB_STYLE_PROP_COLOR, _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;
46
+ var cLinkValue = function () {
47
+ if (CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DATA' ||
48
+ CB_CONTENT_PROP_CLINK_SPEC_VALUETYPE === 'DELEGATEDDATA') {
49
+ if (!(queryContext === null || queryContext === void 0 ? void 0 : queryContext.queryData)) {
50
+ return '';
51
+ }
52
+ var link = queryContext.queryData[CB_CONTENT_PROP_CLINK_SPEC_CONNECTDATA];
53
+ if (!link) {
54
+ return '';
55
+ }
56
+ return link;
57
+ }
58
+ return CB_CONTENT_PROP_CLINK_SPEC_SRC;
59
+ };
44
60
  var _c = (0, useCLINK_1.default)({
45
- src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
61
+ src: cLinkValue(),
46
62
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
47
63
  openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
48
64
  internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { CB_CONTENTS_CAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
3
- import type { CB_BTN_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
4
- type Props = CB_BTN_PROPERTIES_TYPE & IndexForIntersection & {
5
- compositions: CB_CONTENTS_CAROUSEL['compositions'];
2
+ import type { CB_CONTENTSCAROUSEL } from '../../../../../../../DynamicLayout/sections/CustomSection/types';
3
+ import type { CB_CONTENTSCAROUSEL_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
4
+ type Props = CB_CONTENTSCAROUSEL_PROPERTIES_TYPE & IndexForIntersection & {
5
+ compositions: CB_CONTENTSCAROUSEL['compositions'];
6
6
  };
7
7
  declare function ContentsCarousel(props: Props): JSX.Element;
8
8
  export default ContentsCarousel;
@@ -1,12 +1,240 @@
1
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
+ };
2
40
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
41
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
42
  };
5
43
  Object.defineProperty(exports, "__esModule", { value: true });
6
44
  var jsx_runtime_1 = require("react/jsx-runtime");
7
- var CompositionRenderer_1 = __importDefault(require("../../../../../../../DynamicLayout/CompositionRenderer/CompositionRenderer"));
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 ContentsCarouselCore_1 = __importDefault(require("./ContentsCarouselCore"));
57
+ var contentsCarouselUtils_1 = require("./contentsCarouselUtils");
8
58
  function ContentsCarousel(props) {
59
+ var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, mode = _a.mode, queryData = _a.queryData;
60
+ var index = props.index,
61
+ // // CONTENT : 캐로셀
62
+ _b = props.CB_CONTENT_PROP_CONTENTSCAROUSEL, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE, CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA = _b.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
63
+ // STYLE: 캐로셀
64
+ CB_STYLE_PROP_CONTENTSCAROUSEL = props.CB_STYLE_PROP_CONTENTSCAROUSEL,
65
+ // STYLE: 그림자
66
+ CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW,
67
+ // EFFECT: 진입
68
+ CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
9
69
  var compositions = props.compositions;
10
- return (0, jsx_runtime_1.jsx)(CompositionRenderer_1.default, { compositions: compositions });
70
+ var _c = (0, react_1.useState)(false), isHovered = _c[0], setIsHovered = _c[1];
71
+ var _d = (0, react_1.useState)(1), currentSlide = _d[0], setCurrentSlide = _d[1];
72
+ var _e = (0, react_1.useState)(0), totalPages = _e[0], setTotalPages = _e[1];
73
+ var _f = (0, react_1.useState)(true), isBeginning = _f[0], setIsBeginning = _f[1];
74
+ var _g = (0, react_1.useState)(false), isEnd = _g[0], setIsEnd = _g[1];
75
+ var progressRef = (0, react_1.useRef)(0);
76
+ var leftTimeMsRef = (0, react_1.useRef)(0);
77
+ var swiperRef = (0, react_1.useRef)(null);
78
+ var _h = (0, contentsCarouselUtils_1.parseCarouselStyleToCarouselCoreProp)({
79
+ props: CB_STYLE_PROP_CONTENTSCAROUSEL,
80
+ contentsPropsPartials: { CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS },
81
+ device: device
82
+ }), contentsCarouselNormalStyle = _h.normalStyle, contentsCarouselHoverStyle = _h.hoverStyle;
83
+ var _j = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomPaginationProp)({
84
+ props: CB_STYLE_PROP_CONTENTSCAROUSEL,
85
+ device: device
86
+ }), customPaginationNormalStyle = _j.normalStyle, customPaginationHoverStyle = _j.hoverStyle;
87
+ var _k = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomNavigationProp)({
88
+ props: CB_STYLE_PROP_CONTENTSCAROUSEL,
89
+ device: device
90
+ }), customNavigationNormalStyle = _k.normalStyle, customNavigationHoverStyle = _k.hoverStyle;
91
+ var _l = (0, contentsCarouselUtils_1.parseCarouselStyleToCustomProgressbarProp)({
92
+ props: CB_STYLE_PROP_CONTENTSCAROUSEL,
93
+ device: device
94
+ }), customProgressbarNormalStyle = _l.normalStyle, customProgressbarHoverStyle = _l.hoverStyle;
95
+ var _m = (0, util_1.parseProperties)(props, device), style = _m.style, hoverStyle = _m.hoverStyle, layout = _m.layout, effect = _m.effect;
96
+ var loop = isHovered ? contentsCarouselHoverStyle.loop : contentsCarouselNormalStyle.loop;
97
+ // NOTE: edit모드에서는 그리드의 이벤트만 작동하도록 CB의 포인터 이벤트는 막습니다.
98
+ var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
99
+ // NOTE: EFFECT와 관련된 함수들입니다.
100
+ var cbRef = (0, react_1.useRef)(null);
101
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
102
+ index
103
+ ]);
104
+ var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
105
+ var effectCssProperties = isVisible ? effect : {};
106
+ var isNoneEffectType = device === 'DESKTOP'
107
+ ? CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE === 'NONE'
108
+ : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
109
+ var hasEffect = !isNoneEffectType;
110
+ var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
111
+ (0, react_1.useEffect)(function () {
112
+ var _a, _b, _c;
113
+ (_b = (_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.update();
114
+ (_c = swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper.update();
115
+ }, [isHovered]);
116
+ var handleSwiper = function (swiper) {
117
+ var originalSlides = Array.from(swiper.slides).filter(function (slide) { return !slide.classList.contains('swiper-slide-duplicate'); });
118
+ var totalSlides = originalSlides.length;
119
+ var slidesPerView = typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
120
+ var slidesPerGroup = typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
121
+ var isLoop = swiper.params.loop || false;
122
+ var totalPages;
123
+ if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
124
+ // 페이지 단위로 넘어가는 경우 (loop 여부 상관없이 동일)
125
+ totalPages = Math.ceil(totalSlides / slidesPerGroup);
126
+ }
127
+ else if (isLoop) {
128
+ totalPages = totalSlides;
129
+ }
130
+ else {
131
+ // loop가 꺼져있으면 마지막 슬라이드가 첫 번째 위치에 올 수 있는 경우까지만
132
+ totalPages = Math.max(1, totalSlides - slidesPerView + 1);
133
+ }
134
+ setTotalPages(totalPages);
135
+ setIsBeginning(swiper.isBeginning);
136
+ setIsEnd(swiper.isEnd);
137
+ };
138
+ var handleSlideChangeTransitionEnd = function (swiper) {
139
+ var slidesPerGroup = typeof swiper.params.slidesPerGroup === 'number' ? swiper.params.slidesPerGroup : 1;
140
+ var slidesPerView = typeof swiper.params.slidesPerView === 'number' ? swiper.params.slidesPerView : 1;
141
+ var isLoop = swiper.params.loop || false;
142
+ setIsBeginning(swiper.isBeginning);
143
+ setIsEnd(swiper.isEnd);
144
+ // 현재 페이지 계산
145
+ if (slidesPerView === slidesPerGroup && slidesPerGroup > 1) {
146
+ // 페이지 단위로 이동하는 경우
147
+ var currentPage = Math.floor(swiper.realIndex / slidesPerGroup) + 1;
148
+ setCurrentSlide(currentPage);
149
+ }
150
+ else if (isLoop) {
151
+ // loop 모드에서는 realIndex가 실제 슬라이드 인덱스
152
+ setCurrentSlide(swiper.realIndex + 1);
153
+ }
154
+ else {
155
+ // loop가 꺼져있을 때는 activeIndex 사용
156
+ setCurrentSlide(swiper.activeIndex + 1);
157
+ }
158
+ };
159
+ var handleAutoplayTimeLeft = (0, react_1.useCallback)(function (swiper, time, progress) {
160
+ leftTimeMsRef.current = time;
161
+ progressRef.current = progress;
162
+ }, []);
163
+ var handleBulletClick = function (index) {
164
+ if (swiperRef.current) {
165
+ var targetIndex = (swiperRef.current.swiper.params.slidesPerGroup || 1) * index;
166
+ swiperRef.current.swiper.slideTo(targetIndex);
167
+ }
168
+ };
169
+ var handlePrevBtnClick = function () {
170
+ if (swiperRef.current) {
171
+ swiperRef.current.swiper.slidePrev();
172
+ }
173
+ };
174
+ var handleNextBtnClick = function () {
175
+ if (swiperRef.current) {
176
+ swiperRef.current.swiper.slideNext();
177
+ }
178
+ };
179
+ 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
180
+ ? contentsCarouselHoverStyle === null || contentsCarouselHoverStyle === void 0 ? void 0 : contentsCarouselHoverStyle.customStyle
181
+ : contentsCarouselNormalStyle === null || contentsCarouselNormalStyle === void 0 ? void 0 : contentsCarouselNormalStyle.customStyle }, { children: [(0, jsx_runtime_1.jsx)(S_SwiperLayout, __assign({ borderStyle: {
182
+ borderBottomLeftRadius: style.borderBottomLeftRadius,
183
+ borderBottomRightRadius: style.borderBottomRightRadius,
184
+ borderTopLeftRadius: style.borderTopLeftRadius,
185
+ borderTopRightRadius: style.borderTopRightRadius,
186
+ borderWidth: style.borderWidth,
187
+ borderColor: style.borderColor,
188
+ borderStyle: style.borderStyle
189
+ }, hoverBorderStyle: {
190
+ borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
191
+ borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
192
+ borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
193
+ borderTopRightRadius: hoverStyle.borderTopRightRadius,
194
+ borderWidth: hoverStyle.borderWidth,
195
+ borderColor: hoverStyle.borderColor,
196
+ borderStyle: hoverStyle.borderStyle
197
+ } }, { children: (0, jsx_runtime_1.jsx)(ContentsCarouselCore_1.default, __assign({ ref: swiperRef, className: "contents-carousel-core", onSwiper: handleSwiper, onSlideChangeTransitionEnd: handleSlideChangeTransitionEnd, onAutoplayTimeLeft: handleAutoplayTimeLeft, slidesPerView: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS, scrollbar: isHovered
198
+ ? contentsCarouselHoverStyle.scrollbar
199
+ : contentsCarouselNormalStyle.scrollbar, slidesPerGroup: isHovered
200
+ ? contentsCarouselHoverStyle.slidesPerGroup
201
+ : contentsCarouselNormalStyle.slidesPerGroup, spaceBetween: isHovered
202
+ ? contentsCarouselHoverStyle.spaceBetween
203
+ : contentsCarouselNormalStyle.spaceBetween, freeMode: isHovered
204
+ ? contentsCarouselHoverStyle.freeMode
205
+ : contentsCarouselNormalStyle.freeMode, autoplay: isHovered
206
+ ? contentsCarouselHoverStyle.autoplay
207
+ : contentsCarouselNormalStyle.autoplay, useAutoplay: isHovered
208
+ ? contentsCarouselHoverStyle.useAutoplay
209
+ : contentsCarouselNormalStyle.useAutoplay, loop: isHovered ? contentsCarouselHoverStyle.loop : contentsCarouselNormalStyle.loop }, { children: (0, createCompositions_1.createCompositions)({
210
+ valueType: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_VALUETYPE,
211
+ queryPath: CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_CONNECTDATA,
212
+ queryData: queryData,
213
+ compositions: compositions
214
+ }) })) })), (0, jsx_runtime_1.jsx)(CustomPagination_1.CustomPagination, { type: isHovered ? customPaginationHoverStyle.type : customPaginationNormalStyle.type, offset: isHovered ? customPaginationHoverStyle.offset : customPaginationNormalStyle.offset, current: currentSlide, total: totalPages, prevBtnDisabled: loop ? false : isBeginning, nextBtnDisabled: loop ? false : isEnd, size: isHovered ? customPaginationHoverStyle.size : customPaginationNormalStyle.size, onBulletClick: handleBulletClick, onPrevBtnClick: handlePrevBtnClick, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomNavigation_1.CustomNavigation, { prevBtnDisabled: loop ? false : isBeginning, prevBtnType: isHovered
215
+ ? customNavigationHoverStyle.prevBtnType
216
+ : customNavigationNormalStyle.prevBtnType, prevBtnOffset: isHovered
217
+ ? customNavigationHoverStyle.prevBtnOffset
218
+ : customNavigationNormalStyle.prevBtnOffset, prevBtnSize: isHovered
219
+ ? customNavigationHoverStyle.prevBtnSize
220
+ : customNavigationNormalStyle.prevBtnSize, onPrevBtnClick: handlePrevBtnClick, nextBtnDisabled: loop ? false : isEnd, nextBtnType: isHovered
221
+ ? customNavigationHoverStyle.nextBtnType
222
+ : customNavigationNormalStyle.nextBtnType, nextBtnOffset: isHovered
223
+ ? customNavigationHoverStyle.nextBtnOffset
224
+ : customNavigationNormalStyle.nextBtnOffset, nextBtnSize: isHovered
225
+ ? customNavigationHoverStyle.nextBtnSize
226
+ : customNavigationNormalStyle.nextBtnSize, onNextBtnClick: handleNextBtnClick }), (0, jsx_runtime_1.jsx)(CustomProgressbar_1.CustomProgressbar, { progressRef: progressRef, leftTimeMsRef: leftTimeMsRef, type: isHovered ? customProgressbarHoverStyle.type : customProgressbarNormalStyle.type, size: isHovered ? customProgressbarHoverStyle.size : customProgressbarNormalStyle.size, offset: isHovered ? customProgressbarHoverStyle.offset : customProgressbarNormalStyle.offset })] })) })) })));
11
227
  }
228
+ 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) {
229
+ var customStyle = _a.customStyle;
230
+ return customStyle;
231
+ });
232
+ 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) {
233
+ var hoverBorderStyle = _a.hoverBorderStyle;
234
+ return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverBorderStyle), { boxShadow: '' }));
235
+ }, function (_a) {
236
+ var borderStyle = _a.borderStyle;
237
+ return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, borderStyle), { boxShadow: '' }));
238
+ });
12
239
  exports.default = ContentsCarousel;
240
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,17 @@
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 ContentsCarouselCoreProps extends SwiperProps {
6
+ scrollbar?: SwiperProps['scrollbar'];
7
+ slidesPerView?: SwiperProps['slidesPerView'];
8
+ slidesPerGroup?: SwiperProps['slidesPerGroup'];
9
+ spaceBetween?: SwiperProps['spaceBetween'];
10
+ freeMode?: SwiperProps['freeMode'];
11
+ autoplay?: SwiperProps['autoplay'];
12
+ useAutoplay?: boolean;
13
+ loop?: SwiperProps['loop'];
14
+ children?: React.ReactNode[] | JSX.Element;
15
+ }
16
+ declare const ContentsCarouselCore: import("react").ForwardRefExoticComponent<ContentsCarouselCoreProps & import("react").RefAttributes<SwiperRef>>;
17
+ export default ContentsCarouselCore;
@@ -0,0 +1,59 @@
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
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
25
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
26
+ if (ar || !(i in from)) {
27
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
28
+ ar[i] = from[i];
29
+ }
30
+ }
31
+ return to.concat(ar || Array.prototype.slice.call(from));
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ var jsx_runtime_1 = require("react/jsx-runtime");
35
+ var react_1 = require("react");
36
+ var swiper_1 = require("swiper");
37
+ require("swiper/modules/navigation/navigation.min.css");
38
+ var react_2 = require("swiper/react");
39
+ require("swiper/swiper-bundle.css");
40
+ var ContentsCarouselCore = (0, react_1.forwardRef)(function (_a, ref) {
41
+ var scrollbar = _a.scrollbar, slidesPerView = _a.slidesPerView, slidesPerGroup = _a.slidesPerGroup, spaceBetween = _a.spaceBetween, freeMode = _a.freeMode, autoplay = _a.autoplay, useAutoplay = _a.useAutoplay, loop = _a.loop, children = _a.children, props = __rest(_a, ["scrollbar", "slidesPerView", "slidesPerGroup", "spaceBetween", "freeMode", "autoplay", "useAutoplay", "loop", "children"]);
42
+ var slidesWithEmpty = (0, react_1.useMemo)(function () {
43
+ var childrenArray = Array.isArray(children) ? children : [children];
44
+ if (slidesPerView === slidesPerGroup && slidesPerGroup && slidesPerGroup > 1) {
45
+ var remainder = childrenArray.length % slidesPerGroup;
46
+ if (remainder !== 0) {
47
+ var emptyCount = slidesPerGroup - remainder;
48
+ return __spreadArray(__spreadArray([], childrenArray, true), Array(emptyCount).fill(null), true);
49
+ }
50
+ }
51
+ return childrenArray;
52
+ }, [children, slidesPerView, slidesPerGroup]);
53
+ return ((0, jsx_runtime_1.jsx)(react_2.Swiper, __assign({ ref: ref, style: {
54
+ width: '100%',
55
+ height: '100%'
56
+ }, modules: [swiper_1.Pagination, swiper_1.Navigation, swiper_1.Scrollbar, swiper_1.FreeMode, swiper_1.Autoplay], slidesPerView: slidesPerView, scrollbar: scrollbar, slidesPerGroup: slidesPerGroup, spaceBetween: spaceBetween, freeMode: freeMode, autoplay: useAutoplay ? autoplay : false, loop: loop }, props, { children: slidesWithEmpty.map(function (slide, index) { return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: slide || (0, jsx_runtime_1.jsx)("div", { className: "swiper-slide-empty" }) }, index)); }) })));
57
+ });
58
+ ContentsCarouselCore.displayName = 'ContentsCarouselCore';
59
+ exports.default = ContentsCarouselCore;
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ import type { CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE_TYPE, CB_STYLE_PROP_CONTENTSCAROUSEL_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_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE_TYPE;
15
+ prevBtnOffset?: NavigationOffset;
16
+ prevBtnSize?: number;
17
+ nextBtnDisabled?: boolean;
18
+ nextBtnType?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE_TYPE;
19
+ nextBtnOffset?: NavigationOffset;
20
+ nextBtnSize?: number;
21
+ onPrevBtnClick?: () => void;
22
+ onNextBtnClick?: () => void;
23
+ }
24
+ export declare const CustomNavigation: ({ prevBtnDisabled, prevBtnType, prevBtnOffset, prevBtnSize, nextBtnDisabled, nextBtnType, nextBtnOffset, nextBtnSize, onPrevBtnClick, onNextBtnClick }: CustomNavigationProps) => JSX.Element;
25
+ export interface FlexBoxProps {
26
+ direction?: 'row' | 'column';
27
+ justifyContent?: string;
28
+ alignItems?: string;
29
+ gap?: string;
30
+ }
31
+ export default CustomNavigation;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.CustomNavigation = void 0;
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var IconButton_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal/desktop/IconButton");
44
+ var styled_components_1 = __importStar(require("styled-components"));
45
+ var navigationConfigs_1 = require("./navigationConfigs");
46
+ var CustomNavigation = function (_a) {
47
+ var _b = _a.prevBtnDisabled, prevBtnDisabled = _b === void 0 ? false : _b, _c = _a.prevBtnType, prevBtnType = _c === void 0 ? 'NONE' : _c, _d = _a.prevBtnOffset, prevBtnOffset = _d === void 0 ? { top: '0' } : _d, _e = _a.prevBtnSize, prevBtnSize = _e === void 0 ? 1 : _e, _f = _a.nextBtnDisabled, nextBtnDisabled = _f === void 0 ? false : _f, _g = _a.nextBtnType, nextBtnType = _g === void 0 ? 'NONE' : _g, _h = _a.nextBtnOffset, nextBtnOffset = _h === void 0 ? { top: '0' } : _h, _j = _a.nextBtnSize, nextBtnSize = _j === void 0 ? 1 : _j, onPrevBtnClick = _a.onPrevBtnClick, onNextBtnClick = _a.onNextBtnClick;
48
+ var getIsSameOffset = function (prevBtnOffset, nextBtnOffset) {
49
+ return (prevBtnOffset.top === nextBtnOffset.top &&
50
+ prevBtnOffset.bottom === nextBtnOffset.bottom &&
51
+ prevBtnOffset.left === nextBtnOffset.left &&
52
+ prevBtnOffset.right === nextBtnOffset.right &&
53
+ prevBtnOffset.translateX === nextBtnOffset.translateX &&
54
+ prevBtnOffset.translateY === nextBtnOffset.translateY &&
55
+ prevBtnOffset.transformOrigin === nextBtnOffset.transformOrigin);
56
+ };
57
+ var isSameOffset = getIsSameOffset(prevBtnOffset, nextBtnOffset);
58
+ var prevButton = navigationConfigs_1.prevButtonMappedIcons[prevBtnType];
59
+ var nextButton = navigationConfigs_1.nextButtonMappedIcons[nextBtnType];
60
+ return ((0, jsx_runtime_1.jsxs)(S_Navigation, __assign({ "$offset": isSameOffset ? prevBtnOffset : undefined, "$size": isSameOffset ? prevBtnSize : 1 }, { children: [(0, jsx_runtime_1.jsx)(S_PrevButton, __assign({ className: "".concat(prevBtnDisabled ? 'disabled' : ''), "$offset": isSameOffset ? undefined : prevBtnOffset, "$size": isSameOffset ? undefined : prevBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: "large", shapeType: prevButton.shapeType, baseColorKey: prevButton.baseColorKey || 'ui_cpnt_button_fill_base_transparent', borderColorKey: prevButton.borderColorKey, iconName: prevButton.iconName, iconFillType: "line", iconColorKey: prevButton.iconColorKey || 'ui_cpnt_icon_sys_black', shadow: prevButton.shadow, onClick: onPrevBtnClick }) })), (0, jsx_runtime_1.jsx)(S_NextButton, __assign({ className: "".concat(nextBtnDisabled ? 'disabled' : ''), "$offset": isSameOffset ? undefined : nextBtnOffset, "$size": isSameOffset ? undefined : nextBtnSize }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { fillType: "fill", baseSize: "large", shapeType: nextButton.shapeType, baseColorKey: nextButton.baseColorKey || 'ui_cpnt_button_fill_base_transparent', borderColorKey: nextButton.baseColorKey, iconName: nextButton.iconName, iconFillType: "line", iconColorKey: nextButton.iconColorKey || 'ui_cpnt_icon_sys_black', shadow: nextButton.shadow, onClick: onNextBtnClick }) }))] })));
61
+ };
62
+ exports.CustomNavigation = CustomNavigation;
63
+ var S_Navigation = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n"], ["\n display: ", ";\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n"])), function (_a) {
64
+ var $offset = _a.$offset;
65
+ return ($offset ? 'flex' : 'contents');
66
+ }, function (_a) {
67
+ var $offset = _a.$offset;
68
+ return ($offset ? '5px' : 0);
69
+ }, function (_a) {
70
+ var $offset = _a.$offset;
71
+ return ($offset ? 'absolute' : 'static');
72
+ }, function (_a) {
73
+ var _b, _c;
74
+ var $size = _a.$size, $offset = _a.$offset;
75
+ return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
76
+ }, function (_a) {
77
+ var $offset = _a.$offset;
78
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset.right, ";") : '');
79
+ }, function (_a) {
80
+ var $offset = _a.$offset;
81
+ return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
82
+ });
83
+ var S_PrevButton = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"], ["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"])), function (_a) {
84
+ var $offset = _a.$offset;
85
+ return ($offset ? '5px' : 0);
86
+ }, function (_a) {
87
+ var $offset = _a.$offset;
88
+ return ($offset ? 'absolute' : 'static');
89
+ }, function (_a) {
90
+ var _b, _c;
91
+ var $size = _a.$size, $offset = _a.$offset;
92
+ return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
93
+ }, function (_a) {
94
+ var $offset = _a.$offset;
95
+ return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.right, ";") : '');
96
+ }, function (_a) {
97
+ var $offset = _a.$offset;
98
+ return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
99
+ });
100
+ var S_NextButton = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"], ["\n cursor: pointer;\n padding: ", ";\n position: ", ";\n transform: ", ";\n ", ";\n transform-origin: ", ";\n z-index: 3;\n\n &.disabled {\n cursor: auto;\n opacity: 0.35;\n pointer-events: none;\n }\n"])), function (_a) {
101
+ var $offset = _a.$offset;
102
+ return ($offset ? '5px' : 0);
103
+ }, function (_a) {
104
+ var $offset = _a.$offset;
105
+ return ($offset ? 'absolute' : 'static');
106
+ }, function (_a) {
107
+ var _b, _c;
108
+ var $size = _a.$size, $offset = _a.$offset;
109
+ return "scale(".concat($size, ") translate(").concat((_b = $offset === null || $offset === void 0 ? void 0 : $offset.translateX) !== null && _b !== void 0 ? _b : 0, "%, ").concat((_c = $offset === null || $offset === void 0 ? void 0 : $offset.translateY) !== null && _c !== void 0 ? _c : 0, "%)");
110
+ }, function (_a) {
111
+ var $offset = _a.$offset;
112
+ return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n "], ["\n ", "\n ", "\n ", "\n ", "\n "])), ($offset === null || $offset === void 0 ? void 0 : $offset.top) !== undefined ? "top: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.top, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.bottom) !== undefined ? "bottom: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.bottom, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.left) !== undefined ? "left: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.left, ";") : '', ($offset === null || $offset === void 0 ? void 0 : $offset.right) !== undefined ? "right: ".concat($offset === null || $offset === void 0 ? void 0 : $offset.right, ";") : '');
113
+ }, function (_a) {
114
+ var $offset = _a.$offset;
115
+ return ($offset === null || $offset === void 0 ? void 0 : $offset.transformOrigin) || 'center center';
116
+ });
117
+ exports.default = exports.CustomNavigation;
118
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ import type { CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PAGINATIONSTYLE_TYPE } from '../types';
3
+ export interface CustomPaginationProps {
4
+ current?: number;
5
+ total?: number;
6
+ type?: CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PAGINATIONSTYLE_TYPE;
7
+ offset?: {
8
+ top?: string;
9
+ bottom?: string;
10
+ left?: string;
11
+ right?: string;
12
+ translateX?: number;
13
+ translateY?: number;
14
+ transformOrigin?: string;
15
+ };
16
+ size?: number;
17
+ }
18
+ export declare const CustomPagination: ({ current, total, type, offset, size, prevBtnDisabled, nextBtnDisabled, onBulletClick, onPrevBtnClick, onNextBtnClick }: CustomPaginationProps & {
19
+ prevBtnDisabled: boolean;
20
+ nextBtnDisabled: boolean;
21
+ onBulletClick: (index: number) => void;
22
+ onPrevBtnClick: () => void;
23
+ onNextBtnClick: () => void;
24
+ }) => JSX.Element;
25
+ export interface FlexBoxProps {
26
+ direction?: 'row' | 'column';
27
+ justifyContent?: string;
28
+ alignItems?: string;
29
+ gap?: string;
30
+ }
31
+ export default CustomPagination;