pds-dev-kit-web-test 2.5.223 → 2.5.225

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 (48) hide show
  1. package/dist/src/common/assets/icons/fill/Duplicate.d.ts +4 -0
  2. package/dist/src/common/assets/icons/fill/Duplicate.js +30 -0
  3. package/dist/src/common/assets/icons/fill/index.d.ts +1 -0
  4. package/dist/src/common/assets/icons/fill/index.js +3 -1
  5. package/dist/src/common/assets/icons/line/Duplicate.d.ts +4 -0
  6. package/dist/src/common/assets/icons/line/Duplicate.js +30 -0
  7. package/dist/src/common/assets/icons/line/index.d.ts +1 -0
  8. package/dist/src/common/assets/icons/line/index.js +3 -1
  9. package/dist/src/common/services/i18n/resources/en.json +2 -1
  10. package/dist/src/common/services/i18n/resources/es.json +2 -1
  11. package/dist/src/common/services/i18n/resources/fil.json +2 -1
  12. package/dist/src/common/services/i18n/resources/index.d.ts +7 -0
  13. package/dist/src/common/services/i18n/resources/ja.json +2 -1
  14. package/dist/src/common/services/i18n/resources/ko.json +2 -1
  15. package/dist/src/common/services/i18n/resources/zh-cn.json +2 -1
  16. package/dist/src/common/services/i18n/resources/zh-tw.json +2 -1
  17. package/dist/src/desktop/components/MainButton/MainButton.js +16 -10
  18. package/dist/src/sub/DynamicLayout/mock_samplePage.js +133 -133
  19. package/dist/src/sub/DynamicLayout/mock_storybook.js +2 -2
  20. package/dist/src/sub/DynamicLayout/mocks.d.ts +1111 -0
  21. package/dist/src/sub/DynamicLayout/mocks.js +4775 -0
  22. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +22 -22
  23. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +2 -2
  24. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +78 -1
  25. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.d.ts +2 -4
  26. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.js +3 -14
  27. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.d.ts +1 -1
  28. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.js +2 -3
  29. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +4 -4
  30. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.d.ts +1 -0
  31. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.js +333 -0
  32. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +8 -1
  33. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +1 -6
  34. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +1 -0
  35. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +1 -1
  36. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +1 -1
  37. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +1 -1
  38. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +3 -5
  39. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.js +1 -1
  40. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.js +1 -1
  41. package/package.json +2 -2
  42. package/release-note.md +3 -2
  43. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +0 -14118
  44. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +0 -35988
  45. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +0 -76
  46. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +0 -2
  47. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +0 -38
  48. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +0 -2
@@ -40,18 +40,18 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
40
40
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
41
41
  function Button(props) {
42
42
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
43
- var index = props.index, CB_STYLE_PROP_BTNCOLOR = props.CB_STYLE_PROP_BTNCOLOR, _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;
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
44
  var _c = (0, useCLINK_1.default)({
45
45
  src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
46
46
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
47
47
  openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
48
48
  internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
49
49
  }), onClickCLINK = _c.onClickCLINK, CLINKCursor = _c.CLINKCursor;
50
- var _d = getBTNStyles(props.CB_STYLE_PROP_BTNTEXT, device), btnTextStyle = _d.style, btnTextHoverStyle = _d.hoverStyle;
51
- var _e = getBTNColorStyles(CB_STYLE_PROP_BTNCOLOR, device), btnColorStyle = _e.style, btnColorHoverStyle = _e.hoverStyle;
50
+ var _d = getBTNStyles(props.CB_STYLE_PROP_TEXT, device), btnTextStyle = _d.style, btnTextHoverStyle = _d.hoverStyle;
51
+ var _e = getBTNColorStyles(CB_STYLE_PROP_COLOR, device), btnColorStyle = _e.style, btnColorHoverStyle = _e.hoverStyle;
52
52
  var _f = (0, util_1.parseProperties)(props, device), propsStyle = _f.style, propsHoverStyle = _f.hoverStyle, _g = _f.layout, paddingLeft = _g.paddingLeft, paddingRight = _g.paddingRight, paddingTop = _g.paddingTop, paddingBottom = _g.paddingBottom, layoutStyle = __rest(_g, ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"]), effect = _f.effect;
53
53
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
54
- var googleFonts = (0, useGoogleFonts_1.getGoogleFontsFromBtnCB)(props.CB_STYLE_PROP_BTNTEXT, device === 'MOBILE');
54
+ var googleFonts = (0, useGoogleFonts_1.getGoogleFontsFromTextSpecCode)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
55
55
  (0, useGoogleFonts_1.useGoogleFonts)({ fonts: googleFonts });
56
56
  if (mode === 'EDIT') {
57
57
  propsStyle.visibility = 'visible';
@@ -78,28 +78,28 @@ function Button(props) {
78
78
  }
79
79
  function getBTNStyles(props, device) {
80
80
  var availableSpecCodes = [
81
- 'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE',
82
- 'CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT',
83
- 'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE',
84
- 'CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT',
85
- 'CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING',
86
- 'CB_STYLE_PROP_BTNTEXT_SPEC_COLOR',
87
- 'CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL',
88
- 'CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL'
81
+ 'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE',
82
+ 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT',
83
+ 'CB_STYLE_PROP_TEXT_SPEC_SIZE',
84
+ 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT',
85
+ 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING',
86
+ 'CB_STYLE_PROP_TEXT_SPEC_COLOR',
87
+ 'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL',
88
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL'
89
89
  ];
90
- return (0, newUtils_1.parseStyleTextToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, device: device, propKey: 'BTNTEXT' });
90
+ return (0, newUtils_1.parseStyleTextToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, device: device, propKey: 'TEXT' });
91
91
  }
92
92
  function getBTNColorStyles(props, device) {
93
93
  var availableSpecCodes = [
94
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE',
95
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR',
96
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR',
97
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC',
98
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT',
99
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR',
100
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC',
101
- 'CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE'
94
+ 'CB_STYLE_PROP_COLOR_SPEC_ANGLE',
95
+ 'CB_STYLE_PROP_COLOR_SPEC_COLOR',
96
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDCOLOR',
97
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDLOC',
98
+ 'CB_STYLE_PROP_COLOR_SPEC_GRADIENT',
99
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTCOLOR',
100
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTLOC',
101
+ 'CB_STYLE_PROP_COLOR_SPEC_TYPE'
102
102
  ];
103
- return (0, colorUtil_1.parseStyleColorToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, propKey: 'BTNCOLOR', device: device });
103
+ return (0, colorUtil_1.parseStyleColorToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, propKey: 'COLOR', device: device });
104
104
  }
105
105
  exports.default = Button;
@@ -39,7 +39,7 @@ function Text(props) {
39
39
  var _d = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _d.style, textHoverStyle = _d.hoverStyle;
40
40
  var _e = (0, util_1.parseProperties)(props, device), propsStyle = _e.style, propsHoverStyle = _e.hoverStyle, layoutStyle = _e.layout, effect = _e.effect;
41
41
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
42
- var googleFonts = (0, getGoogleFonts_1.getGoogleFontsFromTextCB)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
42
+ var googleFonts = (0, getGoogleFonts_1.getGoogleFontsFromTextSpecCode)(props.CB_STYLE_PROP_TEXT, device === 'MOBILE');
43
43
  (0, useGoogleFonts_1.default)({ fonts: googleFonts });
44
44
  if (mode === 'EDIT') {
45
45
  propsStyle.visibility = 'visible';
@@ -61,7 +61,7 @@ function Text(props) {
61
61
  alignItems: textStyle.alignItems
62
62
  }, ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ onMouseLeave: function (e) {
63
63
  e.currentTarget.classList.remove('hovered');
64
- }, className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), textStyle), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT })) }))] }));
64
+ }, className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content', minWidth: "calc(2ch + ".concat(layoutStyle.paddingLeft, " + ").concat(layoutStyle.paddingRight, ")") }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT })) }))] }));
65
65
  }
66
66
  function getTextStyles(props, device) {
67
67
  var availableSpecCodes = [
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { STRING_PLAIN } from '../../../util/types';
2
+ import type { ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX, STRING_PLAIN } from '../../../util/types';
3
3
  export type StylesProps = {
4
4
  normalStyle: React.CSSProperties;
5
5
  hoverStyle: React.CSSProperties;
@@ -22,3 +22,80 @@ export type CB_CONTENT_PROP_TWITTER = {
22
22
  export type CB_CONTENT_PROP_CODEBLOCK = {
23
23
  CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: STRING_PLAIN;
24
24
  };
25
+ export type CBTextPropsKeys = keyof CB_STYLE_PROP_TEXT_SPECS;
26
+ export type CB_STYLE_PROP_TEXT_SPECS_BASE = {
27
+ CB_STYLE_PROP_TEXT_SPEC_TYPEFACE: ENUM_STRING;
28
+ CB_STYLE_PROP_TEXT_SPEC_WEIGHT: NUMBER_INTEGER;
29
+ CB_STYLE_PROP_TEXT_SPEC_SIZE: NUMBER_INTEGER;
30
+ CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT: NUMBER_INTEGER;
31
+ CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING: NUMBER_INTEGER;
32
+ CB_STYLE_PROP_TEXT_SPEC_COLOR: STRING_8DIGIT_HEX;
33
+ CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL: ENUM_STRING;
34
+ CB_STYLE_PROP_TEXT_SPEC_VERTICAL: ENUM_STRING;
35
+ };
36
+ export type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
37
+ 'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER': ENUM_STRING | null | undefined;
38
+ 'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE': ENUM_STRING | null | undefined;
39
+ 'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE:HOVER': ENUM_STRING | null | undefined;
40
+ 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:HOVER': NUMBER_INTEGER | null | undefined;
41
+ 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE': NUMBER_INTEGER | null | undefined;
42
+ 'CB_STYLE_PROP_TEXT_SPEC_WEIGHT:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
43
+ 'CB_STYLE_PROP_TEXT_SPEC_SIZE:HOVER': NUMBER_INTEGER | null | undefined;
44
+ 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE': NUMBER_INTEGER | null | undefined;
45
+ 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
46
+ 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:HOVER': NUMBER_INTEGER | null | undefined;
47
+ 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE': NUMBER_INTEGER | null | undefined;
48
+ 'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
49
+ 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:HOVER': NUMBER_INTEGER | null | undefined;
50
+ 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE': NUMBER_INTEGER | null | undefined;
51
+ 'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
52
+ 'CB_STYLE_PROP_TEXT_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
53
+ 'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
54
+ 'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
55
+ 'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:HOVER': ENUM_STRING | null | undefined;
56
+ 'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE': ENUM_STRING | null | undefined;
57
+ 'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL:MOBILE:HOVER': ENUM_STRING | null | undefined;
58
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:HOVER': ENUM_STRING | null | undefined;
59
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE': ENUM_STRING | null | undefined;
60
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL:MOBILE:HOVER': ENUM_STRING | null | undefined;
61
+ };
62
+ export type CBColorPropsKeys = keyof CB_STYLE_PROP_COLOR_SPECS;
63
+ export type CBColorValueSetType = Partial<Record<keyof CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_COLOR_ENUM_GRADIENT | NUMBER_INTEGER | ENUM_STRING | undefined>>;
64
+ export type CB_STYLE_PROP_COLOR_ENUM_GRADIENT = 'LINEAR' | 'RADIAL';
65
+ export type CB_STYLE_PROP_COLOR_ENUM_TYPE = 'NONE' | 'SOLID' | 'GRADIENT';
66
+ export type CB_STYLE_PROP_COLOR_SPECS_BASE = {
67
+ CB_STYLE_PROP_COLOR_SPEC_ANGLE: NUMBER_INTEGER;
68
+ CB_STYLE_PROP_COLOR_SPEC_COLOR: ENUM_STRING;
69
+ CB_STYLE_PROP_COLOR_SPEC_ENDCOLOR: ENUM_STRING;
70
+ CB_STYLE_PROP_COLOR_SPEC_ENDLOC: NUMBER_INTEGER;
71
+ CB_STYLE_PROP_COLOR_SPEC_GRADIENT: CB_STYLE_PROP_COLOR_ENUM_GRADIENT;
72
+ CB_STYLE_PROP_COLOR_SPEC_STARTCOLOR: ENUM_STRING;
73
+ CB_STYLE_PROP_COLOR_SPEC_STARTLOC: NUMBER_INTEGER;
74
+ CB_STYLE_PROP_COLOR_SPEC_TYPE: CB_STYLE_PROP_COLOR_ENUM_TYPE;
75
+ };
76
+ export type CB_STYLE_PROP_COLOR_SPECS = CB_STYLE_PROP_COLOR_SPECS_BASE & {
77
+ 'CB_STYLE_PROP_COLOR_SPEC_ANGLE:HOVER': NUMBER_INTEGER | null | undefined;
78
+ 'CB_STYLE_PROP_COLOR_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | null | undefined;
79
+ 'CB_STYLE_PROP_COLOR_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
80
+ 'CB_STYLE_PROP_COLOR_SPEC_COLOR:HOVER': ENUM_STRING | null | undefined;
81
+ 'CB_STYLE_PROP_COLOR_SPEC_COLOR:MOBILE': ENUM_STRING | null | undefined;
82
+ 'CB_STYLE_PROP_COLOR_SPEC_COLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
83
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDCOLOR:HOVER': ENUM_STRING | null | undefined;
84
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDCOLOR:MOBILE': ENUM_STRING | null | undefined;
85
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
86
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDLOC:HOVER': NUMBER_INTEGER | null | undefined;
87
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | null | undefined;
88
+ 'CB_STYLE_PROP_COLOR_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
89
+ 'CB_STYLE_PROP_COLOR_SPEC_GRADIENT:HOVER': CB_STYLE_PROP_COLOR_ENUM_GRADIENT | null | undefined;
90
+ 'CB_STYLE_PROP_COLOR_SPEC_GRADIENT:MOBILE': CB_STYLE_PROP_COLOR_ENUM_GRADIENT | null | undefined;
91
+ 'CB_STYLE_PROP_COLOR_SPEC_GRADIENT:MOBILE:HOVER': CB_STYLE_PROP_COLOR_ENUM_GRADIENT | null | undefined;
92
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTCOLOR:HOVER': ENUM_STRING | null | undefined;
93
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTCOLOR:MOBILE': ENUM_STRING | null | undefined;
94
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
95
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTLOC:HOVER': NUMBER_INTEGER | null | undefined;
96
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | null | undefined;
97
+ 'CB_STYLE_PROP_COLOR_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
98
+ 'CB_STYLE_PROP_COLOR_SPEC_TYPE:HOVER': CB_STYLE_PROP_COLOR_ENUM_TYPE | null | undefined;
99
+ 'CB_STYLE_PROP_COLOR_SPEC_TYPE:MOBILE': CB_STYLE_PROP_COLOR_ENUM_TYPE | null | undefined;
100
+ 'CB_STYLE_PROP_COLOR_SPEC_TYPE:MOBILE:HOVER': CB_STYLE_PROP_COLOR_ENUM_TYPE | null | undefined;
101
+ };
@@ -1,4 +1,2 @@
1
- import type { CB_BTNTEXT_STYLE_PROPS } from '../../components/ComponentBlock/componentBlocks/Button/btnTypes';
2
- import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/Text/types';
3
- export declare function getGoogleFontsFromTextCB(props: CB_STYLE_PROP_TEXT_SPECS, isMobile: boolean): string[];
4
- export declare function getGoogleFontsFromBtnCB(props: CB_BTNTEXT_STYLE_PROPS, isMobile: boolean): string[];
1
+ import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/types';
2
+ export declare function getGoogleFontsFromTextSpecCode(props: CB_STYLE_PROP_TEXT_SPECS, isMobile: boolean): string[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGoogleFontsFromBtnCB = exports.getGoogleFontsFromTextCB = void 0;
4
- function getGoogleFontsFromTextCB(props, isMobile) {
3
+ exports.getGoogleFontsFromTextSpecCode = void 0;
4
+ function getGoogleFontsFromTextSpecCode(props, isMobile) {
5
5
  var typeface = props.CB_STYLE_PROP_TEXT_SPEC_TYPEFACE;
6
6
  var typefaceHover = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER'];
7
7
  var typefaceMobile = props['CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:MOBILE'];
@@ -11,15 +11,4 @@ function getGoogleFontsFromTextCB(props, isMobile) {
11
11
  }
12
12
  return [typeface, typefaceHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
13
13
  }
14
- exports.getGoogleFontsFromTextCB = getGoogleFontsFromTextCB;
15
- function getGoogleFontsFromBtnCB(props, isMobile) {
16
- var typeface = props.CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE;
17
- var typefaceHover = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:HOVER'];
18
- var typefaceMobile = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE'];
19
- var typefaceMobileHover = props['CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE:HOVER'];
20
- if (isMobile) {
21
- return [typefaceMobile, typefaceMobileHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
22
- }
23
- return [typeface, typefaceHover].filter(function (each) { return each && each.startsWith('GOOGLE:'); });
24
- }
25
- exports.getGoogleFontsFromBtnCB = getGoogleFontsFromBtnCB;
14
+ exports.getGoogleFontsFromTextSpecCode = getGoogleFontsFromTextSpecCode;
@@ -1,2 +1,2 @@
1
- export { getGoogleFontsFromBtnCB, getGoogleFontsFromTextCB } from './getGoogleFonts';
1
+ export { getGoogleFontsFromTextSpecCode } from './getGoogleFonts';
2
2
  export { default as useGoogleFonts } from './useGoogleFonts';
@@ -3,9 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useGoogleFonts = exports.getGoogleFontsFromTextCB = exports.getGoogleFontsFromBtnCB = void 0;
6
+ exports.useGoogleFonts = exports.getGoogleFontsFromTextSpecCode = void 0;
7
7
  var getGoogleFonts_1 = require("./getGoogleFonts");
8
- Object.defineProperty(exports, "getGoogleFontsFromBtnCB", { enumerable: true, get: function () { return getGoogleFonts_1.getGoogleFontsFromBtnCB; } });
9
- Object.defineProperty(exports, "getGoogleFontsFromTextCB", { enumerable: true, get: function () { return getGoogleFonts_1.getGoogleFontsFromTextCB; } });
8
+ Object.defineProperty(exports, "getGoogleFontsFromTextSpecCode", { enumerable: true, get: function () { return getGoogleFonts_1.getGoogleFontsFromTextSpecCode; } });
10
9
  var useGoogleFonts_1 = require("./useGoogleFonts");
11
10
  Object.defineProperty(exports, "useGoogleFonts", { enumerable: true, get: function () { return __importDefault(useGoogleFonts_1).default; } });
@@ -1,15 +1,15 @@
1
- import type { BTNColorValueSetType } from '../components/ComponentBlock/componentBlocks/Button/btnTypes';
2
1
  import type { BGOverlayValueSetType } from '../components/ComponentBlock/componentBlocks/RichText/types';
2
+ import type { CBColorValueSetType } from '../components/ComponentBlock/componentBlocks/types';
3
3
  import type { BGColorValueSetType } from '../components/ComponentBlock/componentBlocks/Youtube/types';
4
4
  import type { Device } from '../util/types';
5
5
  import type { CSSProperties } from 'react';
6
- type CBName = 'BTNCOLOR' | 'BGCOLOR' | 'BGOVERLAY';
6
+ type CBName = 'COLOR' | 'BGCOLOR' | 'BGOVERLAY';
7
7
  type ExtractPropKey<T extends CBName> = Extract<T, CBName>;
8
- type ValueSetType = BTNColorValueSetType & BGColorValueSetType & BGOverlayValueSetType;
8
+ type ValueSetType = CBColorValueSetType & BGColorValueSetType & BGOverlayValueSetType;
9
9
  export type ParseStyleColorProps<T> = {
10
10
  availableSpecCodes: Array<keyof T>;
11
11
  props: T;
12
- propKey: ExtractPropKey<'BTNCOLOR'>;
12
+ propKey: ExtractPropKey<'COLOR'>;
13
13
  device: Device;
14
14
  } | {
15
15
  availableSpecCodes: Array<keyof T>;
@@ -0,0 +1 @@
1
+ export declare function getMobileFontSize(desktopSize: number): number;
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMobileFontSize = void 0;
4
+ // desktop 폰트 사이즈를 key로, mobile 폰트 사이즈를 value로 하는 매핑 객체
5
+ var fontSizeMapping = {
6
+ 6: 7,
7
+ 7: 7,
8
+ 8: 8,
9
+ 9: 9,
10
+ 10: 10,
11
+ 11: 11,
12
+ 12: 12,
13
+ 13: 13,
14
+ 14: 14,
15
+ 15: 16,
16
+ 16: 16,
17
+ 17: 16,
18
+ 18: 18,
19
+ 19: 19,
20
+ 20: 20,
21
+ 21: 21,
22
+ 22: 22,
23
+ 23: 23,
24
+ 24: 22,
25
+ 25: 22,
26
+ 26: 23,
27
+ 27: 23,
28
+ 28: 23,
29
+ 29: 24,
30
+ 30: 24,
31
+ 31: 25,
32
+ 32: 26,
33
+ 33: 27,
34
+ 34: 28,
35
+ 35: 28,
36
+ 36: 29,
37
+ 37: 29,
38
+ 38: 30,
39
+ 39: 30,
40
+ 40: 30,
41
+ 41: 30,
42
+ 42: 31,
43
+ 43: 31,
44
+ 44: 31,
45
+ 45: 31,
46
+ 46: 34,
47
+ 47: 34,
48
+ 48: 34,
49
+ 49: 34,
50
+ 50: 35,
51
+ 51: 40,
52
+ 52: 40,
53
+ 53: 40,
54
+ 54: 40,
55
+ 55: 41,
56
+ 56: 41,
57
+ 57: 42,
58
+ 58: 42,
59
+ 59: 42,
60
+ 60: 42,
61
+ 61: 43,
62
+ 62: 48,
63
+ 63: 49,
64
+ 64: 50,
65
+ 65: 50,
66
+ 66: 50,
67
+ 67: 51,
68
+ 68: 51,
69
+ 69: 51,
70
+ 70: 51,
71
+ 71: 52,
72
+ 72: 52,
73
+ 73: 52,
74
+ 74: 52,
75
+ 75: 56,
76
+ 76: 57,
77
+ 77: 58,
78
+ 78: 64,
79
+ 79: 64,
80
+ 80: 64,
81
+ 81: 64,
82
+ 82: 65,
83
+ 83: 65,
84
+ 84: 65,
85
+ 85: 65,
86
+ 86: 67,
87
+ 87: 67,
88
+ 88: 69,
89
+ 89: 68,
90
+ 90: 70,
91
+ 91: 70,
92
+ 92: 70,
93
+ 93: 70,
94
+ 94: 71,
95
+ 95: 72,
96
+ 96: 76,
97
+ 97: 82,
98
+ 98: 84,
99
+ 99: 85,
100
+ 100: 86,
101
+ 101: 86,
102
+ 102: 87,
103
+ 103: 88,
104
+ 104: 89,
105
+ 105: 90,
106
+ 106: 91,
107
+ 107: 92,
108
+ 108: 93,
109
+ 109: 94,
110
+ 110: 95,
111
+ 111: 96,
112
+ 112: 97,
113
+ 113: 98,
114
+ 114: 99,
115
+ 115: 100,
116
+ 116: 101,
117
+ 117: 102,
118
+ 118: 103,
119
+ 119: 104,
120
+ 120: 105,
121
+ 121: 106,
122
+ 122: 107,
123
+ 123: 108,
124
+ 124: 109,
125
+ 125: 110,
126
+ 126: 111,
127
+ 127: 112,
128
+ 128: 113,
129
+ 129: 114,
130
+ 130: 115,
131
+ 131: 116,
132
+ 132: 117,
133
+ 133: 118,
134
+ 134: 119,
135
+ 135: 120,
136
+ 136: 121,
137
+ 137: 122,
138
+ 138: 123,
139
+ 139: 124,
140
+ 140: 125,
141
+ 141: 126,
142
+ 142: 127,
143
+ 143: 128,
144
+ 144: 129,
145
+ 145: 130,
146
+ 146: 131,
147
+ 147: 132,
148
+ 148: 133,
149
+ 149: 134,
150
+ 150: 135,
151
+ 151: 136,
152
+ 152: 137,
153
+ 153: 138,
154
+ 154: 139,
155
+ 155: 140,
156
+ 156: 141,
157
+ 157: 142,
158
+ 158: 143,
159
+ 159: 144,
160
+ 160: 145,
161
+ 161: 146,
162
+ 162: 147,
163
+ 163: 148,
164
+ 164: 149,
165
+ 165: 150,
166
+ 166: 151,
167
+ 167: 152,
168
+ 168: 153,
169
+ 169: 154,
170
+ 170: 155,
171
+ 171: 156,
172
+ 172: 157,
173
+ 173: 158,
174
+ 174: 159,
175
+ 175: 160,
176
+ 176: 161,
177
+ 177: 162,
178
+ 178: 163,
179
+ 179: 164,
180
+ 180: 165,
181
+ 181: 166,
182
+ 182: 167,
183
+ 183: 168,
184
+ 184: 169,
185
+ 185: 170,
186
+ 186: 171,
187
+ 187: 172,
188
+ 188: 173,
189
+ 189: 174,
190
+ 190: 175,
191
+ 191: 176,
192
+ 192: 177,
193
+ 193: 178,
194
+ 194: 179,
195
+ 195: 180,
196
+ 196: 181,
197
+ 197: 182,
198
+ 198: 183,
199
+ 199: 184,
200
+ 200: 185,
201
+ 201: 186,
202
+ 202: 187,
203
+ 203: 188,
204
+ 204: 189,
205
+ 205: 190,
206
+ 206: 191,
207
+ 207: 192,
208
+ 208: 193,
209
+ 209: 194,
210
+ 210: 195,
211
+ 211: 196,
212
+ 212: 197,
213
+ 213: 198,
214
+ 214: 199,
215
+ 215: 200,
216
+ 216: 201,
217
+ 217: 202,
218
+ 218: 203,
219
+ 219: 204,
220
+ 220: 205,
221
+ 221: 206,
222
+ 222: 207,
223
+ 223: 208,
224
+ 224: 209,
225
+ 225: 210,
226
+ 226: 211,
227
+ 227: 212,
228
+ 228: 213,
229
+ 229: 214,
230
+ 230: 215,
231
+ 231: 216,
232
+ 232: 217,
233
+ 233: 218,
234
+ 234: 219,
235
+ 235: 220,
236
+ 236: 221,
237
+ 237: 222,
238
+ 238: 223,
239
+ 239: 224,
240
+ 240: 225,
241
+ 241: 226,
242
+ 242: 227,
243
+ 243: 228,
244
+ 244: 229,
245
+ 245: 230,
246
+ 246: 231,
247
+ 247: 232,
248
+ 248: 233,
249
+ 249: 234,
250
+ 250: 235,
251
+ 251: 236,
252
+ 252: 237,
253
+ 253: 238,
254
+ 254: 239,
255
+ 255: 240,
256
+ 256: 241,
257
+ 257: 242,
258
+ 258: 243,
259
+ 259: 244,
260
+ 260: 245,
261
+ 261: 246,
262
+ 262: 247,
263
+ 263: 248,
264
+ 264: 249,
265
+ 265: 250,
266
+ 266: 251,
267
+ 267: 252,
268
+ 268: 253,
269
+ 269: 254,
270
+ 270: 255,
271
+ 271: 256,
272
+ 272: 257,
273
+ 273: 258,
274
+ 274: 259,
275
+ 275: 260,
276
+ 276: 261,
277
+ 277: 262,
278
+ 278: 263,
279
+ 279: 264,
280
+ 280: 265,
281
+ 281: 266,
282
+ 282: 267,
283
+ 283: 268,
284
+ 284: 269,
285
+ 285: 270,
286
+ 286: 271,
287
+ 287: 272,
288
+ 288: 273,
289
+ 289: 274,
290
+ 290: 275,
291
+ 291: 276,
292
+ 292: 277,
293
+ 293: 278,
294
+ 294: 279,
295
+ 295: 280,
296
+ 296: 281,
297
+ 297: 282,
298
+ 298: 283,
299
+ 299: 284,
300
+ 300: 285,
301
+ 301: 286,
302
+ 302: 287,
303
+ 303: 288,
304
+ 304: 289,
305
+ 305: 290,
306
+ 306: 291,
307
+ 307: 292,
308
+ 308: 293,
309
+ 309: 294,
310
+ 310: 295,
311
+ 311: 296,
312
+ 312: 297,
313
+ 313: 298,
314
+ 314: 299,
315
+ 315: 300,
316
+ 316: 301,
317
+ 317: 302,
318
+ 318: 303,
319
+ 319: 304,
320
+ 320: 305
321
+ };
322
+ function getMobileFontSize(desktopSize) {
323
+ if (fontSizeMapping[desktopSize]) {
324
+ return fontSizeMapping[desktopSize];
325
+ }
326
+ return desktopSize;
327
+ }
328
+ exports.getMobileFontSize = getMobileFontSize;
329
+ // 사용 예시:
330
+ // const desktopFontSize = 15;
331
+ // const mobileFontSizeFromServer: number | null = null;
332
+ // const finalMobileFontSize = getMobileFontSize(desktopFontSize, mobileFontSizeFromServer);
333
+ // console.log(finalMobileFontSize); // 출력: 16
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
+ var fontSizeAdjustment_1 = require("./fontSizeAdjustment");
14
15
  function replaceUndefinedValues(jsonData) {
15
16
  return Object.entries(jsonData).reduce(function (acc, cur) {
16
17
  var _a;
@@ -24,7 +25,13 @@ function replaceUndefinedValues(jsonData) {
24
25
  if (isTargetNeedOverride) {
25
26
  var undefinedMobileKey = curSpec.replace(':MOBILE', '');
26
27
  if (undefinedMobileKey in currentProps) {
27
- accSpecs[curSpec] = currentProps[undefinedMobileKey];
28
+ var desktopValue = currentProps[undefinedMobileKey];
29
+ if (curSpec === 'CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE') {
30
+ accSpecs[curSpec] = (0, fontSizeAdjustment_1.getMobileFontSize)(desktopValue);
31
+ }
32
+ else {
33
+ accSpecs[curSpec] = desktopValue;
34
+ }
28
35
  }
29
36
  else {
30
37
  accSpecs[curSpec] = currentProps[curSpec];
@@ -9,11 +9,6 @@ type ParseStyleTextProps<T> = {
9
9
  props: T;
10
10
  propKey: 'TEXT';
11
11
  device: Device;
12
- } | {
13
- availableSpecCodes: Array<keyof T>;
14
- props: T;
15
- propKey: 'BTNTEXT';
16
- device: Device;
17
12
  };
18
- export declare function getTextCSSPropKey(key: string, cbName: 'TEXT' | 'BTNTEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems";
13
+ export declare function getTextCSSPropKey(key: string, cbName: 'TEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems";
19
14
  export {};
@@ -20,6 +20,7 @@ function parseStyleTextToCSSProp(_a) {
20
20
  var keyWithDevice = device === 'DESKTOP' ? currentKey : "".concat(stringifiedKey, ":MOBILE") || currentKey;
21
21
  var keyWithHover = "".concat(keyWithDevice.toString(), ":HOVER");
22
22
  var cssPropertyKey = getTextCSSPropKey(stringifiedKey, propKey);
23
+ console.log(props['CB_STYLE_PROP_TEXT_SPEC_SIZE:MOBILE']);
23
24
  var value = props[keyWithDevice];
24
25
  var hoverValue = props[keyWithHover];
25
26
  if (cssPropertyKey === 'lineHeight') {
@@ -1,4 +1,4 @@
1
- import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/Text/types';
1
+ import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/types';
2
2
  import type { Device, StyleAndHoverStyle } from '../types';
3
3
  import type { CB_STYLE_PROP_KEYS } from './types';
4
4
  export type NAMED_CB_STYLE_TEXT_PROPS = {
@@ -14,7 +14,7 @@ export declare enum CB_STYLE_PROP_KEYS {
14
14
  CB_STYLE_PROP_SHADOW = "CB_STYLE_PROP_SHADOW",
15
15
  CB_STYLE_PROP_BORDER = "CB_STYLE_PROP_BORDER",
16
16
  CB_STYLE_PROP_IMAGE = "CB_STYLE_PROP_IMAGE",
17
- CB_STYLE_PROP_BTNCOLOR = "CB_STYLE_PROP_BTNCOLOR",
17
+ CB_STYLE_PROP_COLOR = "CB_STYLE_PROP_COLOR",
18
18
  CB_STYLE_PROP_BGCOLOR = "CB_STYLE_PROP_BGCOLOR",
19
19
  CB_STYLE_PROP_BGMEDIA = "CB_STYLE_PROP_BGMEDIA",
20
20
  CB_STYLE_PROP_BGOVERLAY = "CB_STYLE_PROP_BGOVERLAY"
@@ -9,7 +9,7 @@ var CB_STYLE_PROP_KEYS;
9
9
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_SHADOW"] = "CB_STYLE_PROP_SHADOW";
10
10
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BORDER"] = "CB_STYLE_PROP_BORDER";
11
11
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_IMAGE"] = "CB_STYLE_PROP_IMAGE";
12
- CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BTNCOLOR"] = "CB_STYLE_PROP_BTNCOLOR";
12
+ CB_STYLE_PROP_KEYS["CB_STYLE_PROP_COLOR"] = "CB_STYLE_PROP_COLOR";
13
13
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGCOLOR"] = "CB_STYLE_PROP_BGCOLOR";
14
14
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGMEDIA"] = "CB_STYLE_PROP_BGMEDIA";
15
15
  CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGOVERLAY"] = "CB_STYLE_PROP_BGOVERLAY";