pds-dev-kit-web-test 2.5.470 → 2.5.480

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 (73) hide show
  1. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +2 -1
  2. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +49 -49
  3. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  4. package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
  5. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +24 -2
  6. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +3 -1
  7. package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +776 -0
  8. package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +4236 -0
  9. package/dist/src/sub/DynamicLayout/mock_composition.js +6 -5
  10. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +5 -17
  11. package/dist/src/sub/DynamicLayout/mock_contentsList.js +2 -2
  12. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +63 -63
  13. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +65 -65
  14. package/dist/src/sub/DynamicLayout/mocks.js +13 -8477
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +3 -3
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +6 -0
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +76 -192
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +2 -7
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +8 -6
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +4 -18
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +19 -49
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +16 -16
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +19 -20
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +131 -696
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +18 -0
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +229 -0
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +36 -2
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +6 -0
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +54 -20
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +6 -25
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +21 -51
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +8 -9
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +42 -294
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +18 -0
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +229 -0
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +12 -1
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +6 -0
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +82 -146
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +2 -5
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +2 -2
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
  50. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
  51. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +9 -22
  52. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +25 -35
  53. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +4 -18
  54. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +19 -49
  55. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +8 -8
  56. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +18 -0
  57. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +229 -0
  58. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
  59. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
  60. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +22 -24
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +155 -925
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +46 -3
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +6 -1
  64. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +10 -5
  65. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +1 -0
  66. package/dist/src/sub/DynamicLayout/types.d.ts +17 -3
  67. package/package.json +2 -2
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.d.ts +0 -35
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigation.js +0 -118
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.d.ts +0 -32
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomPagination.js +0 -183
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.d.ts +0 -35
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigation.js +0 -118
@@ -1,134 +1,6 @@
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.getCustomProgressbarPropKey = exports.parseCarouselStyleToCustomProgressbarProp = exports.getCustomNavigationPropKey = exports.parseCarouselStyleToCustomNavigationProp = exports.getCarouselCorePropKey = exports.parseCarouselStyleToCarouselCoreProp = void 0;
19
- var styled_components_1 = require("styled-components");
20
- function parseCarouselStyleToCarouselCoreProp(_a) {
21
- var props = _a.props, contentsPropsPartials = _a.contentsPropsPartials, device = _a.device;
22
- var availableSpecCodes = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
23
- return availableSpecCodes.reduce(function (acc, currentKey) {
24
- var _a, _b, _c, _d, _e, _f;
25
- var keyWithDevice = device === 'DESKTOP' ? currentKey : "".concat(currentKey, ":MOBILE");
26
- var keyWithHover = "".concat(keyWithDevice.toString(), ":HOVER");
27
- var carouselCorePropertyKey = getCarouselCorePropKey(currentKey);
28
- if (carouselCorePropertyKey === 'customStyle') {
29
- var value = props[keyWithDevice];
30
- var hoverValue = props[keyWithHover];
31
- return {
32
- normalStyle: __assign(__assign({}, acc.normalStyle), (_a = {}, _a[carouselCorePropertyKey] = getStyle(value), _a)),
33
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[carouselCorePropertyKey] = getStyle(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value), _b))
34
- };
35
- }
36
- if (carouselCorePropertyKey === 'spaceBetween') {
37
- var value = props[keyWithDevice];
38
- var hoverValue = props[keyWithHover];
39
- return {
40
- normalStyle: __assign(__assign({}, acc.normalStyle), (_c = {}, _c[carouselCorePropertyKey] = getItemSpacing(value), _c)),
41
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_d = {}, _d[carouselCorePropertyKey] = getItemSpacing(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value), _d))
42
- };
43
- }
44
- if (carouselCorePropertyKey === 'slidesPerGroup') {
45
- var value = props[keyWithDevice];
46
- var hoverValue = props[keyWithHover];
47
- var displayCounts = contentsPropsPartials.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS;
48
- return {
49
- normalStyle: __assign(__assign({}, acc.normalStyle), getSlidesPerGroupConfig(value, displayCounts)),
50
- hoverStyle: __assign(__assign({}, acc.hoverStyle), getSlidesPerGroupConfig(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value, displayCounts))
51
- };
52
- }
53
- if (carouselCorePropertyKey === 'useAutoplay') {
54
- var value = props[keyWithDevice];
55
- var hoverValue = props[keyWithHover];
56
- return {
57
- normalStyle: __assign(__assign({}, acc.normalStyle), { useAutoplay: value === true }),
58
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { useAutoplay: (hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) === true })
59
- };
60
- }
61
- if (carouselCorePropertyKey === 'autoplayDelay') {
62
- var value = props[keyWithDevice];
63
- var hoverValue = props[keyWithHover];
64
- return {
65
- normalStyle: __assign(__assign({}, acc.normalStyle), { autoplay: {
66
- delay: value * 1000,
67
- disableOnInteraction: false,
68
- pauseOnMouseEnter: true
69
- } }),
70
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { autoplay: {
71
- delay: (hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) * 1000,
72
- disableOnInteraction: false,
73
- pauseOnMouseEnter: true
74
- } })
75
- };
76
- }
77
- if (carouselCorePropertyKey === 'loop') {
78
- var value = props[keyWithDevice];
79
- var hoverValue = props[keyWithHover];
80
- return {
81
- normalStyle: __assign(__assign({}, acc.normalStyle), (_e = {}, _e[carouselCorePropertyKey] = value, _e)),
82
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_f = {}, _f[carouselCorePropertyKey] = hoverValue !== null && hoverValue !== void 0 ? hoverValue : value, _f))
83
- };
84
- }
85
- return {
86
- normalStyle: __assign({}, acc.normalStyle),
87
- hoverStyle: __assign({}, acc.hoverStyle)
88
- };
89
- }, {
90
- normalStyle: {},
91
- hoverStyle: {}
92
- });
93
- }
94
- exports.parseCarouselStyleToCarouselCoreProp = parseCarouselStyleToCarouselCoreProp;
95
- function getCarouselCorePropKey(key) {
96
- switch (key) {
97
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE":
98
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE:HOVER":
99
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE:MOBILE":
100
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE:MOBILE:HOVER":
101
- return 'customStyle';
102
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING":
103
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING:HOVER":
104
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING:MOBILE":
105
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING:MOBILE:HOVER":
106
- return 'spaceBetween';
107
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR":
108
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR:HOVER":
109
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR:MOBILE":
110
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR:MOBILE:HOVER":
111
- return 'slidesPerGroup';
112
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYUSE":
113
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYUSE:HOVER":
114
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYUSE:MOBILE":
115
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYUSE:MOBILE:HOVER":
116
- return 'useAutoplay';
117
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYTIME":
118
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYTIME:HOVER":
119
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYTIME:MOBILE":
120
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYTIME:MOBILE:HOVER":
121
- return 'autoplayDelay';
122
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL":
123
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL:HOVER":
124
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL:MOBILE":
125
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL:MOBILE:HOVER":
126
- return 'loop';
127
- default:
128
- return '';
129
- }
130
- }
131
- exports.getCarouselCorePropKey = getCarouselCorePropKey;
3
+ exports.parseCarouselStyleToCustomProgressbarProp = exports.parseCarouselStyleToCustomNavigationProp = exports.parseCarouselStyleToCarouselCoreProp = exports.getCustomProgressbarPropKey = exports.getCustomNavigationPropKey = exports.getCarouselCorePropKey = void 0;
132
4
  function getSlidesPerGroupConfig(cursorType, displayCounts) {
133
5
  if (cursorType === 'ALL') {
134
6
  return { slidesPerGroup: displayCounts };
@@ -145,12 +17,12 @@ function getSlidesPerGroupConfig(cursorType, displayCounts) {
145
17
  function getStyle(value) {
146
18
  switch (value) {
147
19
  case 'DESIGN1':
148
- return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n "], ["\n height: 100%;\n width: 100%;\n "])));
20
+ return undefined;
149
21
  case 'DESIGN2': {
150
- return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n "], ["\n height: 100%;\n width: 100%;\n "])));
22
+ return undefined;
151
23
  }
152
24
  default: {
153
- return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n "], ["\n height: 100%;\n width: 100%;\n "])));
25
+ return undefined;
154
26
  }
155
27
  }
156
28
  }
@@ -167,581 +39,144 @@ function getItemSpacing(value) {
167
39
  return NORMAL;
168
40
  }
169
41
  }
170
- function parseCarouselStyleToCustomNavigationProp(_a) {
171
- var props = _a.props, device = _a.device;
172
- var availableSpecCodes = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
173
- return availableSpecCodes.reduce(function (acc, currentKey) {
174
- var keyWithDevice = device === 'DESKTOP' ? currentKey : "".concat(currentKey, ":MOBILE");
175
- var keyWithHover = "".concat(keyWithDevice.toString(), ":HOVER");
176
- var customNavigationPropertyKey = getCustomNavigationPropKey(currentKey);
177
- if (customNavigationPropertyKey === 'prevBtnType') {
178
- var value = props[keyWithDevice];
179
- var hoverValue = props[keyWithHover];
180
- return {
181
- normalStyle: __assign(__assign({}, acc.normalStyle), { prevBtnType: value }),
182
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { prevBtnType: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
183
- };
184
- }
185
- if (customNavigationPropertyKey === 'prevBtnOffset') {
186
- var value = props[keyWithDevice];
187
- var hoverValue = props[keyWithHover];
188
- return {
189
- normalStyle: __assign(__assign({}, acc.normalStyle), { prevBtnOffset: getCustomNavigationOffset(value) }),
190
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { prevBtnOffset: getCustomNavigationOffset(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) })
191
- };
192
- }
193
- if (customNavigationPropertyKey === 'prevBtnSize') {
194
- var value = props[keyWithDevice];
195
- var hoverValue = props[keyWithHover];
196
- return {
197
- normalStyle: __assign(__assign({}, acc.normalStyle), { prevBtnSize: getCustomNavigationSize(value) }),
198
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { prevBtnSize: getCustomNavigationSize(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) })
199
- };
200
- }
201
- if (customNavigationPropertyKey === 'prevBtnPrimaryColor') {
202
- var value = props[keyWithDevice];
203
- var hoverValue = props[keyWithHover];
204
- return {
205
- normalStyle: __assign(__assign({}, acc.normalStyle), { prevBtnPrimaryColor: value }),
206
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { prevBtnPrimaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
207
- };
208
- }
209
- if (customNavigationPropertyKey === 'prevBtnSecondaryColor') {
210
- var value = props[keyWithDevice];
211
- var hoverValue = props[keyWithHover];
212
- return {
213
- normalStyle: __assign(__assign({}, acc.normalStyle), { prevBtnSecondaryColor: value }),
214
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { prevBtnSecondaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
215
- };
216
- }
217
- if (customNavigationPropertyKey === 'nextBtnType') {
218
- var value = props[keyWithDevice];
219
- var hoverValue = props[keyWithHover];
220
- return {
221
- normalStyle: __assign(__assign({}, acc.normalStyle), { nextBtnType: value }),
222
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { nextBtnType: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
223
- };
224
- }
225
- if (customNavigationPropertyKey === 'nextBtnOffset') {
226
- var value = props[keyWithDevice];
227
- var hoverValue = props[keyWithHover];
228
- return {
229
- normalStyle: __assign(__assign({}, acc.normalStyle), { nextBtnOffset: getCustomNavigationOffset(value) }),
230
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { nextBtnOffset: getCustomNavigationOffset(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) })
231
- };
232
- }
233
- if (customNavigationPropertyKey === 'nextBtnSize') {
234
- var value = props[keyWithDevice];
235
- var hoverValue = props[keyWithHover];
236
- return {
237
- normalStyle: __assign(__assign({}, acc.normalStyle), { nextBtnSize: getCustomNavigationSize(value) }),
238
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { nextBtnSize: getCustomNavigationSize(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value) })
239
- };
240
- }
241
- if (customNavigationPropertyKey === 'nextBtnPrimaryColor') {
242
- var value = props[keyWithDevice];
243
- var hoverValue = props[keyWithHover];
244
- return {
245
- normalStyle: __assign(__assign({}, acc.normalStyle), { nextBtnPrimaryColor: value }),
246
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { nextBtnPrimaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
247
- };
248
- }
249
- if (customNavigationPropertyKey === 'nextBtnSecondaryColor') {
250
- var value = props[keyWithDevice];
251
- var hoverValue = props[keyWithHover];
252
- return {
253
- normalStyle: __assign(__assign({}, acc.normalStyle), { nextBtnSecondaryColor: value }),
254
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { nextBtnSecondaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
255
- };
256
- }
257
- return {
258
- normalStyle: __assign({}, acc.normalStyle),
259
- hoverStyle: __assign({}, acc.hoverStyle)
260
- };
261
- }, {
262
- normalStyle: {},
263
- hoverStyle: {}
264
- });
265
- }
266
- exports.parseCarouselStyleToCustomNavigationProp = parseCarouselStyleToCustomNavigationProp;
267
- function getCustomNavigationPropKey(key) {
42
+ var transformValue = function (key, value, context) {
43
+ var _a, _b, _c, _d, _e;
268
44
  switch (key) {
269
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE":
270
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE:HOVER":
271
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE:MOBILE":
272
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE:MOBILE:HOVER":
273
- return 'prevBtnType';
274
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION":
275
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION:HOVER":
276
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION:MOBILE":
277
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION:MOBILE:HOVER":
278
- return 'prevBtnOffset';
279
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE":
280
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE:HOVER":
281
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE:MOBILE":
282
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE:MOBILE:HOVER":
283
- return 'prevBtnSize';
284
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR":
285
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR:HOVER":
286
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR:MOBILE":
287
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR:MOBILE:HOVER":
288
- return 'prevBtnPrimaryColor';
289
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR":
290
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR:HOVER":
291
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR:MOBILE":
292
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR:MOBILE:HOVER":
293
- return 'prevBtnSecondaryColor';
294
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE":
295
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE:HOVER":
296
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE:MOBILE":
297
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE:MOBILE:HOVER":
298
- return 'nextBtnType';
299
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION":
300
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION:HOVER":
301
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION:MOBILE":
302
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION:MOBILE:HOVER":
303
- return 'nextBtnOffset';
304
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE":
305
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE:HOVER":
306
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE:MOBILE":
307
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE:MOBILE:HOVER":
308
- return 'nextBtnSize';
309
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR":
310
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR:HOVER":
311
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR:MOBILE":
312
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR:MOBILE:HOVER":
313
- return 'nextBtnPrimaryColor';
314
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR":
315
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR:HOVER":
316
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR:MOBILE":
317
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR:MOBILE:HOVER":
318
- return 'nextBtnSecondaryColor';
45
+ case 'customStyle':
46
+ return _a = {}, _a[key] = getStyle(value), _a;
47
+ case 'spaceBetween':
48
+ return _b = {}, _b[key] = getItemSpacing(value), _b;
49
+ case 'slidesPerGroup':
50
+ return getSlidesPerGroupConfig(value, context);
51
+ case 'useAutoplay':
52
+ return _c = {}, _c[key] = value === true, _c;
53
+ case 'autoplay':
54
+ return {
55
+ autoplay: {
56
+ delay: value * 1000,
57
+ disableOnInteraction: false,
58
+ pauseOnMouseEnter: true
59
+ }
60
+ };
61
+ case 'loop':
62
+ return _d = {}, _d[key] = value, _d;
319
63
  default:
320
- return '';
64
+ return _e = {}, _e[key] = value, _e;
321
65
  }
66
+ };
67
+ function getCarouselCorePropKey(key) {
68
+ var baseKey = key.split(':')[0];
69
+ var keyMapping = {
70
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_STYLE: 'customStyle',
71
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMSPACING: 'spaceBetween',
72
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_ITEMCURSOR: 'slidesPerGroup',
73
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYUSE: 'useAutoplay',
74
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_AUTOPLAYTIME: 'autoplay',
75
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_INFINITESCROLL: 'loop'
76
+ };
77
+ return keyMapping[baseKey] || null;
78
+ }
79
+ exports.getCarouselCorePropKey = getCarouselCorePropKey;
80
+ function getCustomNavigationPropKey(key) {
81
+ var baseKey = key.split(':')[0];
82
+ var keyMapping = {
83
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSTYLE: 'prevBtnType',
84
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNLOCATION: 'prevBtnLocation',
85
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSIZE: 'prevBtnSize',
86
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNPRIMARYCOLOR: 'prevBtnPrimaryColor',
87
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PREVBTNSECONDARYCOLOR: 'prevBtnSecondaryColor',
88
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSTYLE: 'nextBtnType',
89
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNLOCATION: 'nextBtnLocation',
90
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSIZE: 'nextBtnSize',
91
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNPRIMARYCOLOR: 'nextBtnPrimaryColor',
92
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_NEXTBTNSECONDARYCOLOR: 'nextBtnSecondaryColor'
93
+ };
94
+ return keyMapping[baseKey] || null;
322
95
  }
323
96
  exports.getCustomNavigationPropKey = getCustomNavigationPropKey;
324
- function getCustomNavigationOffset(value) {
325
- var OUTSET1 = {
326
- top: '0px',
327
- left: '0px',
328
- translateX: 0,
329
- translateY: -100,
330
- transformOrigin: 'top left'
97
+ function getCustomProgressbarPropKey(key) {
98
+ var baseKey = key.split(':')[0];
99
+ var keyMapping = {
100
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR: 'type',
101
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSIZE: 'size',
102
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARPRIMARYCOLOR: 'primaryColor',
103
+ CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSECONDARYCOLOR: 'secondaryColor'
331
104
  };
332
- switch (value) {
333
- case 'OUTSET1':
334
- return OUTSET1;
335
- case 'OUTSET2':
336
- return {
337
- top: '0px',
338
- left: '50%',
339
- translateX: -50,
340
- translateY: -100,
341
- transformOrigin: 'top left'
342
- };
343
- case 'OUTSET3':
344
- return {
345
- top: '0px',
346
- left: '100%',
347
- translateX: -100,
348
- translateY: -100,
349
- transformOrigin: 'top left'
350
- };
351
- case 'OUTSET4':
352
- return {
353
- top: '0px',
354
- left: '100%',
355
- translateX: 0,
356
- translateY: 0,
357
- transformOrigin: 'left top'
358
- };
359
- case 'OUTSET5':
360
- return {
361
- top: '50%',
362
- left: '100%',
363
- translateX: 0,
364
- translateY: -50,
365
- transformOrigin: 'left top'
366
- };
367
- case 'OUTSET6':
368
- return {
369
- top: '100%',
370
- left: '100%',
371
- translateX: 0,
372
- translateY: -100,
373
- transformOrigin: 'left top'
374
- };
375
- case 'OUTSET7':
376
- return {
377
- top: '100%',
378
- left: '100%',
379
- translateX: -100,
380
- translateY: 0,
381
- transformOrigin: 'top left'
382
- };
383
- case 'OUTSET8':
384
- return {
385
- top: '100%',
386
- left: '50%',
387
- translateX: -50,
388
- translateY: 0,
389
- transformOrigin: 'top left'
390
- };
391
- case 'OUTSET9':
392
- return {
393
- top: '100%',
394
- left: '0px',
395
- translateX: 0,
396
- translateY: 0,
397
- transformOrigin: 'top left'
398
- };
399
- case 'OUTSET10':
400
- return {
401
- top: '100%',
402
- left: '0px',
403
- translateX: -100,
404
- translateY: -100,
405
- transformOrigin: 'right top'
406
- };
407
- case 'OUTSET11':
408
- return {
409
- top: '50%',
410
- left: '0px',
411
- translateX: -100,
412
- translateY: -50,
413
- transformOrigin: 'right top'
414
- };
415
- case 'OUTSET12':
416
- return {
417
- top: '0px',
418
- left: '0px',
419
- translateX: -100,
420
- translateY: 0,
421
- transformOrigin: 'right top'
422
- };
423
- case 'INSET1':
424
- return { top: '0px', left: '0px', translateX: 0, translateY: 0, transformOrigin: 'left top' };
425
- case 'INSET2':
426
- return {
427
- top: '0px',
428
- left: '50%',
429
- translateX: -50,
430
- translateY: 0,
431
- transformOrigin: 'left top'
432
- };
433
- case 'INSET3':
434
- return {
435
- top: '0px',
436
- left: '100%',
437
- translateX: -100,
438
- translateY: 0,
439
- transformOrigin: 'left top'
440
- };
441
- case 'INSET4':
442
- return {
443
- top: '50%',
444
- left: '100%',
445
- translateX: -100,
446
- translateY: -50,
447
- transformOrigin: 'left top'
448
- };
449
- case 'INSET5':
450
- return {
451
- top: '100%',
452
- left: '100%',
453
- translateX: -100,
454
- translateY: -100,
455
- transformOrigin: 'left top'
456
- };
457
- case 'INSET6':
458
- return {
459
- top: '100%',
460
- left: '50%',
461
- translateX: -50,
462
- translateY: -100,
463
- transformOrigin: 'left top'
464
- };
465
- case 'INSET7':
466
- return {
467
- top: '100%',
468
- left: '0px',
469
- translateX: 0,
470
- translateY: -100,
471
- transformOrigin: 'top left'
472
- };
473
- case 'INSET8':
474
- return {
475
- top: '50%',
476
- left: '0px',
477
- translateX: 0,
478
- translateY: -50,
479
- transformOrigin: 'top left'
480
- };
481
- default:
482
- return OUTSET1;
483
- }
105
+ return keyMapping[baseKey] || null;
484
106
  }
485
- function getCustomNavigationSize(value) {
486
- switch (value) {
487
- case 'SMALL':
488
- return 1;
489
- case 'MEDIUM':
490
- return 1.5;
491
- case 'LARGE':
492
- return 2;
493
- default:
494
- return 1;
495
- }
107
+ exports.getCustomProgressbarPropKey = getCustomProgressbarPropKey;
108
+ function parseCarouselStyleToCarouselCoreProp(_a) {
109
+ var props = _a.props, device = _a.device, contentsPropsPartials = _a.contentsPropsPartials;
110
+ var normalStyle = {};
111
+ var hoverStyle = {};
112
+ var baseKeys = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
113
+ baseKeys.forEach(function (baseKey) {
114
+ var customNavKey = getCarouselCorePropKey(baseKey);
115
+ if (customNavKey) {
116
+ var deviceKey = device === 'DESKTOP' ? baseKey : "".concat(baseKey, ":MOBILE");
117
+ var hoverKey = "".concat(deviceKey, ":HOVER");
118
+ var normalValue = props[deviceKey];
119
+ var hoverValue = props[hoverKey];
120
+ var context = contentsPropsPartials === null || contentsPropsPartials === void 0 ? void 0 : contentsPropsPartials.CB_CONTENT_PROP_CONTENTSCAROUSEL_SPEC_DISPLAYCOUNTS;
121
+ if (normalValue !== undefined) {
122
+ Object.assign(normalStyle, transformValue(customNavKey, normalValue, context));
123
+ }
124
+ Object.assign(hoverStyle, transformValue(customNavKey, hoverValue !== null && hoverValue !== void 0 ? hoverValue : normalValue, context));
125
+ }
126
+ });
127
+ return {
128
+ normalStyle: normalStyle,
129
+ hoverStyle: hoverStyle
130
+ };
496
131
  }
497
- function parseCarouselStyleToCustomProgressbarProp(_a) {
132
+ exports.parseCarouselStyleToCarouselCoreProp = parseCarouselStyleToCarouselCoreProp;
133
+ function parseCarouselStyleToCustomNavigationProp(_a) {
498
134
  var props = _a.props, device = _a.device;
499
- var availableSpecCodes = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
500
- return availableSpecCodes.reduce(function (acc, currentKey) {
501
- var keyWithDevice = device === 'DESKTOP' ? currentKey : "".concat(currentKey, ":MOBILE");
502
- var keyWithHover = "".concat(keyWithDevice.toString(), ":HOVER");
503
- var customProgressbarPropertyKey = getCustomProgressbarPropKey(currentKey);
504
- if (customProgressbarPropertyKey === 'type') {
505
- var value = props[keyWithDevice];
506
- var hoverValue = props[keyWithHover];
507
- return {
508
- normalStyle: __assign(__assign({}, acc.normalStyle), { type: value }),
509
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { type: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
510
- };
511
- }
512
- if (customProgressbarPropertyKey === 'size') {
513
- var value = props[keyWithDevice];
514
- var hoverValue = props[keyWithHover];
515
- var offset = getCustomProgressbarOffset('INSET5');
516
- return {
517
- normalStyle: __assign(__assign({}, acc.normalStyle), { size: getCustomProgressbarSize(value), offset: offset }),
518
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { size: getCustomProgressbarSize(hoverValue !== null && hoverValue !== void 0 ? hoverValue : value), offset: offset })
519
- };
520
- }
521
- if (customProgressbarPropertyKey === 'primaryColor') {
522
- var value = props[keyWithDevice];
523
- var hoverValue = props[keyWithHover];
524
- return {
525
- normalStyle: __assign(__assign({}, acc.normalStyle), { primaryColor: value }),
526
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { primaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
527
- };
135
+ var normalStyle = {};
136
+ var hoverStyle = {};
137
+ var baseKeys = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
138
+ baseKeys.forEach(function (baseKey) {
139
+ var _a, _b;
140
+ var customNavKey = getCustomNavigationPropKey(baseKey);
141
+ if (customNavKey) {
142
+ var deviceKey = device === 'DESKTOP' ? baseKey : "".concat(baseKey, ":MOBILE");
143
+ var hoverKey = "".concat(deviceKey, ":HOVER");
144
+ var normalValue = props[deviceKey];
145
+ var hoverValue = props[hoverKey];
146
+ if (normalValue !== undefined) {
147
+ Object.assign(normalStyle, (_a = {}, _a[customNavKey] = normalValue, _a));
148
+ }
149
+ Object.assign(hoverStyle, (_b = {}, _b[customNavKey] = hoverValue !== null && hoverValue !== void 0 ? hoverValue : normalValue, _b));
528
150
  }
529
- if (customProgressbarPropertyKey === 'secondaryColor') {
530
- var value = props[keyWithDevice];
531
- var hoverValue = props[keyWithHover];
532
- return {
533
- normalStyle: __assign(__assign({}, acc.normalStyle), { secondaryColor: value }),
534
- hoverStyle: __assign(__assign({}, acc.hoverStyle), { secondaryColor: hoverValue !== null && hoverValue !== void 0 ? hoverValue : value })
535
- };
536
- }
537
- return {
538
- normalStyle: __assign({}, acc.normalStyle),
539
- hoverStyle: __assign({}, acc.hoverStyle)
540
- };
541
- }, {
542
- normalStyle: {},
543
- hoverStyle: {}
544
151
  });
545
- }
546
- exports.parseCarouselStyleToCustomProgressbarProp = parseCarouselStyleToCustomProgressbarProp;
547
- function getCustomProgressbarPropKey(key) {
548
- switch (key) {
549
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR":
550
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR:HOVER":
551
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR:MOBILE":
552
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBAR:MOBILE:HOVER":
553
- return 'type';
554
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSIZE":
555
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSIZE:HOVER":
556
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSIZE:MOBILE":
557
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSIZE:MOBILE:HOVER":
558
- return 'size';
559
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARPRIMARYCOLOR":
560
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARPRIMARYCOLOR:HOVER":
561
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARPRIMARYCOLOR:MOBILE":
562
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARPRIMARYCOLOR:MOBILE:HOVER":
563
- return 'primaryColor';
564
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSECONDARYCOLOR":
565
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSECONDARYCOLOR:HOVER":
566
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSECONDARYCOLOR:MOBILE":
567
- case "CB_STYLE_PROP_CONTENTSCAROUSEL_SPEC_PROGRESSBARSECONDARYCOLOR:MOBILE:HOVER":
568
- return 'secondaryColor';
569
- default:
570
- return '';
571
- }
572
- }
573
- exports.getCustomProgressbarPropKey = getCustomProgressbarPropKey;
574
- function getCustomProgressbarOffset(value) {
575
- var OUTSET1 = {
576
- top: '0px',
577
- left: '0px',
578
- translateX: 0,
579
- translateY: -100,
580
- transformOrigin: 'top left'
152
+ return {
153
+ normalStyle: normalStyle,
154
+ hoverStyle: hoverStyle
581
155
  };
582
- switch (value) {
583
- case 'OUTSET1':
584
- return OUTSET1;
585
- case 'OUTSET2':
586
- return {
587
- top: '0px',
588
- left: '50%',
589
- translateX: -50,
590
- translateY: -100,
591
- transformOrigin: 'top left'
592
- };
593
- case 'OUTSET3':
594
- return {
595
- top: '0px',
596
- right: '0px',
597
- translateX: 0,
598
- translateY: -100,
599
- transformOrigin: 'top right'
600
- };
601
- case 'OUTSET4':
602
- return {
603
- top: '0px',
604
- left: '100%',
605
- translateX: 0,
606
- translateY: 0,
607
- transformOrigin: 'left top'
608
- };
609
- case 'OUTSET5':
610
- return {
611
- top: '50%',
612
- left: '100%',
613
- translateX: 0,
614
- translateY: -50,
615
- transformOrigin: 'left top'
616
- };
617
- case 'OUTSET6':
618
- return {
619
- top: '100%',
620
- left: '100%',
621
- translateX: 0,
622
- translateY: -100,
623
- transformOrigin: 'left top'
624
- };
625
- case 'OUTSET7':
626
- return {
627
- top: '100%',
628
- left: '100%',
629
- translateX: -100,
630
- translateY: 0,
631
- transformOrigin: 'top left'
632
- };
633
- case 'OUTSET8':
634
- return {
635
- top: '100%',
636
- left: '50%',
637
- translateX: -50,
638
- translateY: 0,
639
- transformOrigin: 'top left'
640
- };
641
- case 'OUTSET9':
642
- return {
643
- top: '100%',
644
- left: '0px',
645
- translateX: 0,
646
- translateY: 0,
647
- transformOrigin: 'top left'
648
- };
649
- case 'OUTSET10':
650
- return {
651
- top: '100%',
652
- left: '0px',
653
- translateX: -100,
654
- translateY: -100,
655
- transformOrigin: 'right top'
656
- };
657
- case 'OUTSET11':
658
- return {
659
- top: '50%',
660
- left: '0px',
661
- translateX: -100,
662
- translateY: -50,
663
- transformOrigin: 'right top'
664
- };
665
- case 'OUTSET12':
666
- return {
667
- top: '0px',
668
- left: '0px',
669
- translateX: -100,
670
- translateY: 0,
671
- transformOrigin: 'right top'
672
- };
673
- case 'INSET1':
674
- return { top: '0px', left: '0px', translateX: 0, translateY: 0, transformOrigin: 'left top' };
675
- case 'INSET2':
676
- return {
677
- top: '0px',
678
- left: '50%',
679
- translateX: -50,
680
- translateY: 0,
681
- transformOrigin: 'left top'
682
- };
683
- case 'INSET3':
684
- return {
685
- top: '0px',
686
- left: '100%',
687
- translateX: -100,
688
- translateY: 0,
689
- transformOrigin: 'left top'
690
- };
691
- case 'INSET4':
692
- return {
693
- top: '50%',
694
- left: '100%',
695
- translateX: -100,
696
- translateY: -50,
697
- transformOrigin: 'left top'
698
- };
699
- case 'INSET5':
700
- return {
701
- top: '100%',
702
- left: '100%',
703
- translateX: -100,
704
- translateY: -100,
705
- transformOrigin: 'left top'
706
- };
707
- case 'INSET6':
708
- return {
709
- top: '100%',
710
- left: '50%',
711
- translateX: -50,
712
- translateY: -100,
713
- transformOrigin: 'left top'
714
- };
715
- case 'INSET7':
716
- return {
717
- top: '100%',
718
- left: '0px',
719
- translateX: 0,
720
- translateY: -100,
721
- transformOrigin: 'top left'
722
- };
723
- case 'INSET8':
724
- return {
725
- top: '50%',
726
- left: '0px',
727
- translateX: 0,
728
- translateY: -50,
729
- transformOrigin: 'top left'
730
- };
731
- default:
732
- return OUTSET1;
733
- }
734
156
  }
735
- function getCustomProgressbarSize(value) {
736
- switch (value) {
737
- case 'SMALL':
738
- return 1;
739
- case 'MEDIUM':
740
- return 1.5;
741
- case 'LARGE':
742
- return 2;
743
- default:
744
- return 1;
745
- }
157
+ exports.parseCarouselStyleToCustomNavigationProp = parseCarouselStyleToCustomNavigationProp;
158
+ function parseCarouselStyleToCustomProgressbarProp(_a) {
159
+ var props = _a.props, device = _a.device;
160
+ var normalStyle = {};
161
+ var hoverStyle = {};
162
+ var baseKeys = Object.keys(props).filter(function (key) { return !key.includes(':HOVER') && !key.includes(':MOBILE'); });
163
+ baseKeys.forEach(function (baseKey) {
164
+ var _a, _b;
165
+ var customNavKey = getCustomProgressbarPropKey(baseKey);
166
+ if (customNavKey) {
167
+ var deviceKey = device === 'DESKTOP' ? baseKey : "".concat(baseKey, ":MOBILE");
168
+ var hoverKey = "".concat(deviceKey, ":HOVER");
169
+ var normalValue = props[deviceKey];
170
+ var hoverValue = props[hoverKey];
171
+ if (normalValue !== undefined) {
172
+ Object.assign(normalStyle, (_a = {}, _a[customNavKey] = normalValue, _a));
173
+ }
174
+ Object.assign(hoverStyle, (_b = {}, _b[customNavKey] = hoverValue !== null && hoverValue !== void 0 ? hoverValue : normalValue, _b));
175
+ }
176
+ });
177
+ return {
178
+ normalStyle: normalStyle,
179
+ hoverStyle: hoverStyle
180
+ };
746
181
  }
747
- var templateObject_1, templateObject_2, templateObject_3;
182
+ exports.parseCarouselStyleToCustomProgressbarProp = parseCarouselStyleToCustomProgressbarProp;