pds-dev-kit-web-test 0.2.15 → 0.2.16

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 (51) hide show
  1. package/dist/src/sub/DynamicLayout/components/Section/CustomSection.d.ts +2 -1
  2. package/dist/src/sub/DynamicLayout/components/Section/CustomSection.js +2 -4
  3. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.d.ts +1 -2
  4. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +29 -50
  5. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +5 -3
  6. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +53 -28
  7. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.d.ts +1 -4
  8. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +3 -12
  9. package/dist/src/sub/DynamicLayout/mock_customSection.js +9 -1
  10. package/dist/src/sub/DynamicLayout/mock_samplePage.js +1334 -440
  11. package/dist/src/sub/DynamicLayout/nakedMocks.json +8 -0
  12. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +645 -0
  13. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +1661 -0
  14. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +3 -2
  15. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +50 -23
  16. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +7 -1
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +3 -5
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +2 -2
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +7 -2
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +12 -2
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +4 -12
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +3 -0
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +1 -1
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +6 -3
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +3 -5
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +1 -1
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +98 -13
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.d.ts +1 -1
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.js +2 -2
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.d.ts +23 -0
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.js +26 -0
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCustomSectionPlacement.d.ts +5 -5
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCustomSectionPlacement.js +15 -28
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +2 -7
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.d.ts +2 -2
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.js +1 -1
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.js +4 -5
  39. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +3 -5
  40. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.d.ts +2 -2
  41. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.js +6 -12
  42. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +16 -4
  43. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +17 -5
  44. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +12 -3
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.js +9 -3
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +7 -4
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +2 -33
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +27 -16
  49. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +4 -4
  50. package/dist/src/sub/DynamicLayout/types.d.ts +4 -4
  51. package/package.json +2 -2
@@ -28,13 +28,12 @@ var AVAILABLE_SPECS = [
28
28
  function parseStylePropBgColor(namedProps, device) {
29
29
  var specs = namedProps.specs;
30
30
  var bgColorCssProperties = AVAILABLE_SPECS.reduce(function (acc, cur) {
31
- var _a, _b;
31
+ var _a;
32
32
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
33
33
  var value = specs[baseKey];
34
- var hoverValue = specs[baseKey + ":HOVER"];
35
34
  return {
36
35
  style: __assign(__assign({}, acc.style), (_a = {}, _a[baseKey] = (0, isNullOrUndefined_1.default)(value) ? specs[cur] : value, _a)),
37
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[baseKey] = (0, isNullOrUndefined_1.default)(hoverValue) ? specs[cur + ":HOVER"] : hoverValue, _b))
36
+ hoverStyle: __assign({}, acc.hoverStyle)
38
37
  };
39
38
  }, {
40
39
  style: {},
@@ -62,7 +61,7 @@ function valueGenerator(valueSet, device) {
62
61
  case 'SOLID':
63
62
  return "" + valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_COLOR;
64
63
  case 'NONE':
65
- return 'NONE';
64
+ return 'transparent';
66
65
  default:
67
66
  return '';
68
67
  }
@@ -84,7 +83,7 @@ function valueGenerator(valueSet, device) {
84
83
  case 'SOLID':
85
84
  return "" + valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE'];
86
85
  case 'NONE':
87
- return 'NONE';
86
+ return 'transparent';
88
87
  default:
89
88
  return '';
90
89
  }
@@ -18,23 +18,21 @@ var AVAILABLE_SPECS = [
18
18
  function parseStylePropBGImage(namedProps, device) {
19
19
  var specs = namedProps.specs;
20
20
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
21
- var _a, _b;
21
+ var _a;
22
22
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
23
23
  var cssPropertyKey = getParsedKey(baseKey);
24
24
  var value = specs[baseKey];
25
- var hoverValue = specs[baseKey + ":HOVER"];
26
25
  var isPosition = cssPropertyKey === 'position';
27
26
  if (isPosition) {
28
27
  var positionCss = getCssProperties(value);
29
- var hoverPositionCss = getCssProperties(hoverValue);
30
28
  return {
31
29
  style: __assign(__assign({}, acc.style), positionCss),
32
- hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverPositionCss)
30
+ hoverStyle: __assign({}, acc.hoverStyle)
33
31
  };
34
32
  }
35
33
  return {
36
34
  style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value === null || value === void 0 ? void 0 : value.toLowerCase(), _a)),
37
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = hoverValue === null || hoverValue === void 0 ? void 0 : hoverValue.toLowerCase(), _b))
35
+ hoverStyle: __assign({}, acc.hoverStyle)
38
36
  };
39
37
  }, {
40
38
  style: {},
@@ -1,10 +1,10 @@
1
- import type { Device, ENUM_STRING, NUMBER_INTEGER, OverlayStyleAndOverlayHoverStyle, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
1
+ import type { Device, ENUM_STRING, NUMBER_INTEGER, OverlayStyle, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
2
2
  import type { CB_STYLE_PROP_KEYS } from './types';
3
3
  export declare type NAMED_CB_STYLE_BGOVERLAY_PROPS = {
4
4
  name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGOVERLAY;
5
5
  specs: CB_STYLE_PROP_BGOVERLAY_SPECS;
6
6
  };
7
- export default function parseStylePropBgOverlay(namedProps: NAMED_CB_STYLE_BGOVERLAY_PROPS, device: Device): StyleAndHoverStyle & Partial<OverlayStyleAndOverlayHoverStyle>;
7
+ export default function parseStylePropBgOverlay(namedProps: NAMED_CB_STYLE_BGOVERLAY_PROPS, device: Device): StyleAndHoverStyle & Partial<OverlayStyle>;
8
8
  export declare type CB_STYLE_PROP_BGOVERLAY_SPECS_BASE = {
9
9
  CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE: NUMBER_INTEGER;
10
10
  CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR: STRING_8DIGIT_HEX;
@@ -28,29 +28,23 @@ var AVAILABLE_SPECS = [
28
28
  function parseStylePropBgOverlay(namedProps, device) {
29
29
  var specs = namedProps.specs;
30
30
  var bgColorCssProperties = AVAILABLE_SPECS.reduce(function (acc, cur) {
31
- var _a, _b;
31
+ var _a;
32
32
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
33
33
  var value = specs[baseKey];
34
- var hoverValue = specs[baseKey + ":HOVER"];
35
34
  return {
36
35
  style: __assign({}, acc.style),
37
36
  hoverStyle: __assign({}, acc.hoverStyle),
38
- overlayStyle: __assign(__assign({}, acc.overlayStyle), (_a = {}, _a[baseKey] = (0, isNullOrUndefined_1.default)(value) ? specs[cur] : value, _a)),
39
- overlayHoverStyle: __assign(__assign({}, acc.overlayHoverStyle), (_b = {}, _b[baseKey] = (0, isNullOrUndefined_1.default)(hoverValue) ? specs[cur + ":HOVER"] : hoverValue, _b))
37
+ overlayStyle: __assign(__assign({}, acc.overlayStyle), (_a = {}, _a[baseKey] = (0, isNullOrUndefined_1.default)(value) ? specs[cur] : value, _a))
40
38
  };
41
39
  }, {
42
40
  style: {},
43
41
  hoverStyle: {},
44
- overlayStyle: {},
45
- overlayHoverStyle: {}
42
+ overlayStyle: {}
46
43
  });
47
44
  return {
48
45
  style: {},
49
46
  hoverStyle: {},
50
- overlayStyle: { background: valueGenerator(bgColorCssProperties.overlayStyle, device) },
51
- overlayHoverStyle: {
52
- background: valueGenerator(bgColorCssProperties.overlayHoverStyle, device)
53
- }
47
+ overlayStyle: { background: valueGenerator(bgColorCssProperties.overlayStyle, device) }
54
48
  };
55
49
  }
56
50
  exports.default = parseStylePropBgOverlay;
@@ -70,7 +64,7 @@ function valueGenerator(valueSet, device) {
70
64
  case 'SOLID':
71
65
  return "" + valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR;
72
66
  case 'NONE':
73
- return '';
67
+ return 'transparent';
74
68
  default:
75
69
  return '';
76
70
  }
@@ -92,7 +86,7 @@ function valueGenerator(valueSet, device) {
92
86
  case 'SOLID':
93
87
  return "" + valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR;
94
88
  case 'NONE':
95
- return '';
89
+ return 'transparent';
96
90
  default:
97
91
  return '';
98
92
  }
@@ -21,23 +21,35 @@ var AVAILABLE_SPECS = [
21
21
  function parseStylePropBorder(namedProps, device) {
22
22
  var specs = namedProps.specs;
23
23
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
24
- var _a, _b;
24
+ var _a, _b, _c;
25
25
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
26
26
  var cssPropertyKey = getParsedKey(baseKey);
27
27
  var value = specs[baseKey];
28
28
  var hoverValue = specs[baseKey + ":HOVER"];
29
29
  var isRadius = cssPropertyKey === 'borderRadius';
30
30
  if (isRadius) {
31
- var _c = value, tl = _c.tl, tr = _c.tr, bl = _c.bl, br = _c.br;
31
+ var _d = value, tl = _d.tl, tr = _d.tr, bl = _d.bl, br = _d.br;
32
32
  var hoverValueTypeExpanded = hoverValue;
33
+ if (hoverValueTypeExpanded === null || hoverValueTypeExpanded === undefined) {
34
+ return {
35
+ style: __assign(__assign({}, acc.style), { borderTopLeftRadius: tl, borderTopRightRadius: tr, borderBottomLeftRadius: bl, borderBottomRightRadius: br }),
36
+ hoverStyle: __assign({}, acc.hoverStyle)
37
+ };
38
+ }
33
39
  return {
34
40
  style: __assign(__assign({}, acc.style), { borderTopLeftRadius: tl, borderTopRightRadius: tr, borderBottomLeftRadius: bl, borderBottomRightRadius: br }),
35
41
  hoverStyle: __assign(__assign({}, acc.hoverStyle), { borderTopLeftRadius: hoverValueTypeExpanded ? hoverValueTypeExpanded.tl : 0, borderTopRightRadius: hoverValueTypeExpanded ? hoverValueTypeExpanded.tr : 0, borderBottomLeftRadius: hoverValueTypeExpanded ? hoverValueTypeExpanded.bl : 0, borderBottomRightRadius: hoverValueTypeExpanded ? hoverValueTypeExpanded.br : 0 })
36
42
  };
37
43
  }
44
+ if (hoverValue === null || hoverValue === undefined) {
45
+ return {
46
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value, _a)),
47
+ hoverStyle: __assign({}, acc.hoverStyle)
48
+ };
49
+ }
38
50
  return {
39
- style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value, _a)),
40
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = hoverValue, _b))
51
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = value, _b)),
52
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = hoverValue, _c))
41
53
  };
42
54
  }, {
43
55
  style: {},
@@ -19,7 +19,7 @@ var AVAILABLE_SPECS = [
19
19
  function parseStylePropDivider(namedProps, device) {
20
20
  var specs = namedProps.specs;
21
21
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
22
- var _a, _b, _c, _d;
22
+ var _a, _b, _c, _d, _e, _f;
23
23
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
24
24
  var cssPropertyKey = getDividerCSSPropKey(baseKey);
25
25
  var value = specs[baseKey];
@@ -27,14 +27,26 @@ function parseStylePropDivider(namedProps, device) {
27
27
  if (cssPropertyKey === 'border-bottom-style') {
28
28
  var widthValue = value === 'NONE' ? 'solid' : value;
29
29
  var widthHoverValue = hoverValue === 'NONE' ? 'solid' : hoverValue;
30
+ if (widthHoverValue === null || widthHoverValue === undefined) {
31
+ return {
32
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = widthValue, _a)),
33
+ hoverStyle: __assign({}, acc.hoverStyle)
34
+ };
35
+ }
30
36
  return {
31
- style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = widthValue, _a)),
32
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = widthHoverValue, _b))
37
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = widthValue, _b)),
38
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = widthHoverValue, _c))
39
+ };
40
+ }
41
+ if (hoverValue === null || hoverValue === undefined) {
42
+ return {
43
+ style: __assign(__assign({}, acc.style), (_d = {}, _d[cssPropertyKey] = value, _d)),
44
+ hoverStyle: __assign({}, acc.hoverStyle)
33
45
  };
34
46
  }
35
47
  return {
36
- style: __assign(__assign({}, acc.style), (_c = {}, _c[cssPropertyKey] = value, _c)),
37
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_d = {}, _d[cssPropertyKey] = hoverValue, _d))
48
+ style: __assign(__assign({}, acc.style), (_e = {}, _e[cssPropertyKey] = value, _e)),
49
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_f = {}, _f[cssPropertyKey] = hoverValue, _f))
38
50
  };
39
51
  }, {
40
52
  style: {},
@@ -18,7 +18,7 @@ var AVAILABLE_SPECS = [
18
18
  function parseStylePropImage(namedProps, device) {
19
19
  var specs = namedProps.specs;
20
20
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
21
- var _a, _b;
21
+ var _a, _b, _c;
22
22
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
23
23
  var cssPropertyKey = getParsedKey(baseKey);
24
24
  var value = specs[baseKey];
@@ -27,14 +27,23 @@ function parseStylePropImage(namedProps, device) {
27
27
  if (isPosition) {
28
28
  var positionCss = getCssProperties(value);
29
29
  var hoverPositionCss = getCssProperties(hoverValue);
30
+ if (hoverPositionCss === null || hoverPositionCss === undefined) {
31
+ return { style: __assign(__assign({}, acc.style), positionCss), hoverStyle: __assign({}, acc.hoverStyle) };
32
+ }
30
33
  return {
31
34
  style: __assign(__assign({}, acc.style), positionCss),
32
35
  hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverPositionCss)
33
36
  };
34
37
  }
38
+ if (hoverValue === null || hoverValue === undefined) {
39
+ return {
40
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value === null || value === void 0 ? void 0 : value.toLowerCase(), _a)),
41
+ hoverStyle: __assign({}, acc.hoverStyle)
42
+ };
43
+ }
35
44
  return {
36
- style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value === null || value === void 0 ? void 0 : value.toLowerCase(), _a)),
37
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = hoverValue === null || hoverValue === void 0 ? void 0 : hoverValue.toLowerCase(), _b))
45
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = value === null || value === void 0 ? void 0 : value.toLowerCase(), _b)),
46
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = hoverValue === null || hoverValue === void 0 ? void 0 : hoverValue.toLowerCase(), _c))
38
47
  };
39
48
  }, {
40
49
  style: {},
@@ -14,14 +14,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  function parseStylePropOpacity(namedProps, device) {
15
15
  var specs = namedProps.specs;
16
16
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
17
- var _a, _b;
17
+ var _a, _b, _c;
18
18
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
19
19
  var cssPropertyKey = getParsedKey(baseKey);
20
20
  var value = specs[baseKey];
21
21
  var hoverValue = specs[baseKey + ":HOVER"];
22
+ if (hoverValue === null || hoverValue === undefined) {
23
+ return {
24
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = (value || 0) / 100, _a)),
25
+ hoverStyle: __assign({}, acc.hoverStyle)
26
+ };
27
+ }
22
28
  return {
23
- style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = (value || 0) / 100, _a)),
24
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = (hoverValue || 0) / 100, _b))
29
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = (value || 0) / 100, _b)),
30
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = (hoverValue || 0) / 100, _c))
25
31
  };
26
32
  }, {
27
33
  style: {},
@@ -23,13 +23,16 @@ var AVAILABLE_SPECS = [
23
23
  function parseStylePropShadow(namedProps, device) {
24
24
  var specs = namedProps.specs;
25
25
  var valueSet = AVAILABLE_SPECS.reduce(function (acc, cur) {
26
- var _a, _b;
26
+ var _a, _b, _c;
27
27
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
28
28
  var value = specs[baseKey];
29
29
  var hoverValue = specs[baseKey + ":HOVER"];
30
+ if (hoverValue === null || hoverValue === undefined) {
31
+ return { normal: __assign(__assign({}, acc.normal), (_a = {}, _a[cur] = value, _a)), hover: __assign({}, acc.hover) };
32
+ }
30
33
  return {
31
- normal: __assign(__assign({}, acc.normal), (_a = {}, _a[cur] = value, _a)),
32
- hover: __assign(__assign({}, acc.hover), (_b = {}, _b[cur] = hoverValue, _b))
34
+ normal: __assign(__assign({}, acc.normal), (_b = {}, _b[cur] = value, _b)),
35
+ hover: __assign(__assign({}, acc.hover), (_c = {}, _c[cur] = hoverValue, _c))
33
36
  };
34
37
  }, {
35
38
  normal: {},
@@ -48,7 +51,7 @@ function valueGenerator(valueSet) {
48
51
  case 'OUTSET':
49
52
  return valueSet.CB_STYLE_PROP_SHADOW_SPEC_X + "px " + valueSet.CB_STYLE_PROP_SHADOW_SPEC_Y + "px " + valueSet.CB_STYLE_PROP_SHADOW_SPEC_BLUR + "px " + valueSet.CB_STYLE_PROP_SHADOW_SPEC_SPREAD + "px " + valueSet.CB_STYLE_PROP_SHADOW_SPEC_COLOR;
50
53
  case 'NONE':
51
- return '';
54
+ return 'none';
52
55
  default:
53
56
  return '';
54
57
  }
@@ -1,39 +1,8 @@
1
- import type { Device, ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
1
+ import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/Text/types';
2
+ import type { Device, StyleAndHoverStyle } from '../types';
2
3
  import type { CB_STYLE_PROP_KEYS } from './types';
3
4
  export declare type NAMED_CB_STYLE_TEXT_PROPS = {
4
5
  name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_TEXT;
5
6
  specs: CB_STYLE_PROP_TEXT_SPECS;
6
7
  };
7
8
  export default function parseStylePropTextSpec(namedProps: NAMED_CB_STYLE_TEXT_PROPS, device: Device): StyleAndHoverStyle;
8
- export declare type CB_STYLE_PROP_TEXT_SPECS_BASE = {
9
- CB_STYLE_PROP_TEXT_SPEC_FONT: ENUM_STRING;
10
- CB_STYLE_PROP_TEXT_SPEC_WEIGHT: NUMBER_INTEGER;
11
- CB_STYLE_PROP_TEXT_SPEC_SIZE: NUMBER_INTEGER;
12
- CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE: boolean;
13
- CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT: NUMBER_INTEGER;
14
- CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING: NUMBER_INTEGER;
15
- CB_STYLE_PROP_TEXT_SPEC_COLOR: STRING_8DIGIT_HEX;
16
- };
17
- export declare type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
18
- 'CB_STYLE_PROP_TEXT_SPEC_FONT:HOVER': ENUM_STRING;
19
- 'CB_STYLE_PROP_TEXT_SPEC_FONT:MOBILE': ENUM_STRING | undefined;
20
- 'CB_STYLE_PROP_TEXT_SPEC_FONT:MOBILE:HOVER': ENUM_STRING | undefined;
21
- 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:HOVER': NUMBER_INTEGER;
22
- 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE': NUMBER_INTEGER | undefined;
23
- 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE:HOVER': NUMBER_INTEGER | undefined;
24
- 'CB_STYLE_PROP_TEXT_SPEC_SIZE:HOVER': NUMBER_INTEGER;
25
- 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE': NUMBER_INTEGER | undefined;
26
- 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE:HOVER': NUMBER_INTEGER | undefined;
27
- 'CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:HOVER': boolean;
28
- 'CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:MOBILE': boolean | undefined;
29
- 'CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:MOBILE:HOVER': boolean | undefined;
30
- 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:HOVER': NUMBER_INTEGER;
31
- 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE': NUMBER_INTEGER | undefined;
32
- 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE:HOVER': NUMBER_INTEGER | undefined;
33
- 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:HOVER': NUMBER_INTEGER;
34
- 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE': NUMBER_INTEGER | undefined;
35
- 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE:HOVER': NUMBER_INTEGER | undefined;
36
- 'CB_STYLE_PROP_TEXT_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX;
37
- 'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | undefined;
38
- 'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | undefined;
39
- };
@@ -13,24 +13,31 @@ var __assign = (this && this.__assign) || function () {
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var AVAILABLE_SPECS = [
15
15
  'CB_STYLE_PROP_TEXT_SPEC_COLOR',
16
- 'CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE',
17
- 'CB_STYLE_PROP_TEXT_SPEC_FONT',
16
+ 'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE',
18
17
  'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING',
19
18
  'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT',
20
19
  'CB_STYLE_PROP_TEXT_SPEC_SIZE',
21
- 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT'
20
+ 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT',
21
+ 'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL',
22
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL'
22
23
  ];
23
24
  function parseStylePropTextSpec(namedProps, device) {
24
25
  var specs = namedProps.specs;
25
26
  return AVAILABLE_SPECS.reduce(function (acc, cur) {
26
- var _a, _b;
27
+ var _a, _b, _c;
27
28
  var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
28
29
  var cssPropertyKey = getParsedKey(baseKey);
29
30
  var value = specs[baseKey];
30
31
  var hoverValue = specs[baseKey + ":HOVER"];
32
+ if (hoverValue === null || hoverValue === undefined) {
33
+ return {
34
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value, _a)),
35
+ hoverStyle: __assign({}, acc.hoverStyle)
36
+ };
37
+ }
31
38
  return {
32
- style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = value, _a)),
33
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[cssPropertyKey] = hoverValue, _b))
39
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = value, _b)),
40
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = hoverValue, _c))
34
41
  };
35
42
  }, {
36
43
  style: {},
@@ -45,16 +52,10 @@ function getParsedKey(key) {
45
52
  case "CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE":
46
53
  case "CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE:HOVER":
47
54
  return 'color';
48
- case "CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE":
49
- case "CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:HOVER":
50
- case "CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:MOBILE":
51
- case "CB_STYLE_PROP_TEXT_SPEC_FITTOSIZE:MOBILE:HOVER":
52
- // NOTE: 뭐지?
53
- return 'unknown';
54
- case "CB_STYLE_PROP_TEXT_SPEC_FONT":
55
- case "CB_STYLE_PROP_TEXT_SPEC_FONT:HOVER":
56
- case "CB_STYLE_PROP_TEXT_SPEC_FONT:MOBILE":
57
- case "CB_STYLE_PROP_TEXT_SPEC_FONT:MOBILE:HOVER":
55
+ case "CB_STYLE_PROP_TEXT_SPEC_TYPEFACE":
56
+ case "CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER":
57
+ case "CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE":
58
+ case "CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE:HOVER":
58
59
  return 'fontFamily';
59
60
  case "CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING":
60
61
  case "CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:HOVER":
@@ -76,5 +77,15 @@ function getParsedKey(key) {
76
77
  case "CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE":
77
78
  case "CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE:HOVER":
78
79
  return 'fontWeight';
80
+ case "CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL":
81
+ case "CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:HOVER":
82
+ case "CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE":
83
+ case "CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE:HOVER":
84
+ return 'HORIZONTAL';
85
+ case "CB_STYLE_PROP_TEXT_SPEC_VERTICAL":
86
+ case "CB_STYLE_PROP_TEXT_SPEC_VERTICAL:HOVER":
87
+ case "CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE":
88
+ case "CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE:HOVER":
89
+ return 'VERTICAL';
79
90
  }
80
91
  }
@@ -1,5 +1,5 @@
1
1
  import type { CB_BTNTEXT_STYLE_PROPS, CB_STYLE_PROP_BTNCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Button/btnTypes';
2
- import type { CB_TEXT_STYLE_PROPS } from '../components/ComponentBlock/componentBlocks/Text/types';
2
+ import type { CB_STYLE_PROP_TEXT_SPECS } from '../components/ComponentBlock/componentBlocks/Text/types';
3
3
  import type { CB_TWITTER_STYLE_PROPS } from '../components/ComponentBlock/componentBlocks/Twitter/types';
4
4
  import type { CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER } from '../components/ComponentBlock/componentBlocks/types';
5
5
  import type { CB_CONTENT_PROP_YOUTUBE_TYPE, CB_STYLE_PROP_BGCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Youtube/types';
@@ -41,7 +41,7 @@ export declare type CB_TEXT_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
41
41
  CB_CONTENT_PROP_TEXT: CB_CONTENT_PROP_TEXT;
42
42
  CB_CONTENT_PROP_CLINK: CB_CONTENT_PROP_CLINK;
43
43
  CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
44
- CB_STYLE_PROP_TEXT: CB_TEXT_STYLE_PROPS;
44
+ CB_STYLE_PROP_TEXT: CB_STYLE_PROP_TEXT_SPECS;
45
45
  CB_STYLE_PROP_OPACITY: CB_STYLE_PROP_TEXT_OPACITY_SPECS;
46
46
  CB_LAYOUT_PROP_PADDING: CB_LAYOUT_PROP_PADDING_SPECS;
47
47
  CB_LAYOUT_PROP_ARRANGE: CB_LAYOUT_PROP_ARRANGE_SPECS;
@@ -118,9 +118,8 @@ export declare type StyleType = {
118
118
  export declare type StyleAndHoverStyle = StyleType & {
119
119
  hoverStyle: CSSProperties;
120
120
  };
121
- export declare type OverlayStyleAndOverlayHoverStyle = {
121
+ export declare type OverlayStyle = {
122
122
  overlayStyle: CSSProperties;
123
- overlayHoverStyle: CSSProperties;
124
123
  };
125
124
  export declare type Device = 'DESKTOP' | 'MOBILE';
126
125
  export declare type DefaultBrightTheme = 'LIGHT' | 'DARK';
@@ -131,4 +130,5 @@ export declare type ParserResult = {
131
130
  effect: CSSProperties;
132
131
  content: Record<string, unknown>;
133
132
  };
133
+ export declare type JsonPropertiesParserResult = Omit<ParserResult, 'hoverStyle'> & OverlayStyle;
134
134
  export declare type NamedPropAllTypes = NamedStylePropType | NamedLayoutPropType;
@@ -293,7 +293,7 @@ export declare type IMembershipDisplay = {
293
293
  export declare type ISectionJsonProperties = {
294
294
  CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
295
295
  CB_EFFECT_PROP_ENTANIM: CB_EFFECT_PROP_ENTANIM_SPECS;
296
- CB_LAYOUT_PROP_PADDING: CB_LAYOUT_PROP_PADDING_SPECS;
296
+ CB_LAYOUT_PROP_PADDING?: CB_LAYOUT_PROP_PADDING_SPECS;
297
297
  CB_PLACEMENT_PROP_SECTION: {
298
298
  CB_PLACEMENT_PROP_SECTION_SPEC_FULLWIDTH: boolean;
299
299
  'CB_PLACEMENT_PROP_SECTION_SPEC_FULLWIDTH:MOBILE': boolean | undefined;
@@ -304,9 +304,9 @@ export declare type ISectionJsonProperties = {
304
304
  CB_PLACEMENT_PROP_SECTION_SPEC_WIDTH: number;
305
305
  'CB_PLACEMENT_PROP_SECTION_SPEC_WIDTH:MOBILE': number | undefined;
306
306
  };
307
- CB_STYLE_PROP_BGCOLOR: CB_STYLE_PROP_BGCOLOR_SPECS;
308
- CB_STYLE_PROP_BGMEDIA: CB_STYLE_PROP_BGMEDIA_SPECS;
309
- CB_STYLE_PROP_BGOVERLAY: CB_STYLE_PROP_BGOVERLAY_SPECS;
307
+ CB_STYLE_PROP_BGCOLOR?: CB_STYLE_PROP_BGCOLOR_SPECS;
308
+ CB_STYLE_PROP_BGMEDIA?: CB_STYLE_PROP_BGMEDIA_SPECS;
309
+ CB_STYLE_PROP_BGOVERLAY?: CB_STYLE_PROP_BGOVERLAY_SPECS;
310
310
  };
311
311
  export declare type CB_STYLE_PROP_BGMEDIA_SPECS_BASE = {
312
312
  CB_STYLE_PROP_BGMEDIA_SPEC_YSRC: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "i18next-intervalplural-postprocessor": "^3.0.0",
23
23
  "lottie-react": "^2.3.1",
24
24
  "nuka-carousel": "^4.8.4",
25
- "publ-echo": "^0.0.21",
25
+ "publ-echo": "^0.0.24",
26
26
  "react-hook-form": "^7.28.1",
27
27
  "react-i18next": "^11.12.0",
28
28
  "react-router-dom": "^5.2.0",