pds-dev-kit-web-test 0.2.2 → 0.2.4

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 (317) hide show
  1. package/README.md +12 -1
  2. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +1 -1
  3. package/dist/src/desktop/components/BasicListItem/Contents.d.ts +1 -1
  4. package/dist/src/desktop/components/BasicListItem/Contents.js +1 -1
  5. package/dist/src/desktop/components/BasicListItem/LeftBox/Badge.js +1 -1
  6. package/dist/src/desktop/components/BasicListItem/LeftBox/Checkbox.js +1 -1
  7. package/dist/src/desktop/components/BasicListItem/LeftBox/Icon.js +1 -1
  8. package/dist/src/desktop/components/BasicListItem/LeftBox/Image.js +1 -1
  9. package/dist/src/desktop/components/BasicListItem/LeftBox/Radio.js +1 -1
  10. package/dist/src/desktop/components/BasicListItem/RightBox/Description.d.ts +1 -1
  11. package/dist/src/desktop/components/BasicListItem/RightBox/Description.js +1 -1
  12. package/dist/src/desktop/components/BasicListItem/RightBox/MainButton.js +1 -1
  13. package/dist/src/desktop/components/BasicListItem/RightBox/Switch.js +1 -1
  14. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +1 -1
  15. package/dist/src/mobile/components/BasicListItem/Contents.d.ts +1 -1
  16. package/dist/src/mobile/components/BasicListItem/Contents.js +1 -1
  17. package/dist/src/mobile/components/BasicListItem/LeftBox/Badge.js +1 -1
  18. package/dist/src/mobile/components/BasicListItem/LeftBox/Checkbox.js +1 -1
  19. package/dist/src/mobile/components/BasicListItem/LeftBox/Icon.js +1 -1
  20. package/dist/src/mobile/components/BasicListItem/LeftBox/Image.js +1 -1
  21. package/dist/src/mobile/components/BasicListItem/LeftBox/Radio.js +1 -1
  22. package/dist/src/mobile/components/BasicListItem/RightBox/Description.d.ts +1 -1
  23. package/dist/src/mobile/components/BasicListItem/RightBox/Description.js +1 -1
  24. package/dist/src/mobile/components/BasicListItem/RightBox/MainButton.js +1 -1
  25. package/dist/src/mobile/components/BasicListItem/RightBox/Switch.js +1 -1
  26. package/dist/src/sub/AdminList/AdminList/AdminList.d.ts +1 -1
  27. package/dist/src/sub/AdminList/AdminList/AdminList.js +2 -2
  28. package/dist/src/sub/AdminList/AdminList/HeaderRow.d.ts +1 -1
  29. package/dist/src/sub/AdminList/AdminList/HeaderRow.js +2 -2
  30. package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.d.ts +1 -1
  31. package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.js +2 -2
  32. package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.d.ts +1 -1
  33. package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.js +2 -2
  34. package/dist/src/sub/AdminList/AdminListItem/AdminListItem.d.ts +1 -1
  35. package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +3 -3
  36. package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.d.ts +1 -1
  37. package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.js +2 -2
  38. package/dist/src/sub/AdminList/ToolBar/ChipList.d.ts +1 -1
  39. package/dist/src/sub/AdminList/ToolBar/ChipList.js +1 -1
  40. package/dist/src/sub/AdminList/ToolBar/SearchField.js +4 -4
  41. package/dist/src/sub/AdminList/ToolBar/ToolBar.d.ts +1 -1
  42. package/dist/src/sub/AdminList/ToolBar/ToolBar.js +3 -3
  43. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.d.ts +8 -0
  44. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.js +46 -0
  45. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.d.ts +2 -0
  46. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.js +8 -0
  47. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.d.ts +2 -3
  48. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.js +3 -3
  49. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.d.ts +2 -2
  50. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.d.ts +13 -0
  51. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.js +63 -0
  52. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.d.ts +2 -0
  53. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.js +8 -0
  54. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.d.ts +3 -11
  55. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.js +18 -18
  56. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.d.ts +14 -0
  57. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.js +41 -0
  58. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.d.ts +35 -0
  59. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.js +141 -0
  60. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.d.ts +2 -0
  61. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.js +33 -0
  62. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.d.ts +1 -0
  63. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.js +8 -0
  64. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.d.ts +3 -2
  65. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.js +3 -1
  66. package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +4 -4
  67. package/dist/src/sub/DynamicLayout/components/Section/Section.d.ts +6 -3
  68. package/dist/src/sub/DynamicLayout/components/Section/Section.js +40 -8
  69. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +9 -0
  70. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +68 -0
  71. package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +4 -4
  72. package/dist/src/sub/DynamicLayout/components/desktop/common/Carousel.d.ts +1 -2
  73. package/dist/src/sub/DynamicLayout/components/desktop/common/Carousel.js +6 -6
  74. package/dist/src/sub/DynamicLayout/components/index.d.ts +0 -1
  75. package/dist/src/sub/DynamicLayout/components/index.js +1 -6
  76. package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +2 -0
  77. package/dist/src/sub/DynamicLayout/mock_customSection.js +818 -0
  78. package/dist/src/sub/DynamicLayout/mock_samplePage.js +5 -210
  79. package/dist/src/sub/DynamicLayout/nakedMocks.json +839 -0
  80. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +17 -4
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +2 -9
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +86 -52
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +7 -0
  84. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +55 -0
  85. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +3 -0
  86. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +52 -0
  87. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +5 -0
  88. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +79 -0
  89. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +68 -0
  90. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +2 -0
  91. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.d.ts +5 -0
  92. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +66 -0
  93. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.d.ts +5 -0
  94. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +117 -0
  95. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.d.ts +12 -0
  96. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.js +2 -0
  97. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +5 -0
  98. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +62 -0
  99. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.d.ts +1 -0
  100. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.js +8 -0
  101. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.d.ts +44 -0
  102. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.js +2 -0
  103. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +5 -0
  104. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +58 -0
  105. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +28 -0
  106. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +2 -0
  107. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.d.ts +5 -0
  108. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +43 -0
  109. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.d.ts +6 -0
  110. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.js +2 -0
  111. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +5 -0
  112. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +69 -0
  113. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.d.ts +1 -0
  114. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.js +8 -0
  115. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.d.ts +7 -0
  116. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.js +33 -0
  117. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.d.ts +48 -0
  118. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.js +2 -0
  119. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.d.ts +2 -0
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/{BlockMatcher/blocks/Button.js → components/ComponentBlock/componentBlocks/components/S_CB_Box.js} +6 -11
  121. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.d.ts +1 -0
  122. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.js +13 -0
  123. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.d.ts +8 -0
  124. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +24 -0
  125. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +20 -0
  126. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.js +2 -0
  127. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.d.ts +0 -0
  128. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.js +18 -0
  129. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts +1 -0
  130. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.js +8 -0
  131. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.d.ts +1 -0
  132. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.js +5 -0
  133. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.d.ts +1 -0
  134. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.js +5 -0
  135. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +6 -0
  136. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +26 -0
  137. package/dist/src/sub/DynamicLayout/sections/CustomSection/index.d.ts +0 -1
  138. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +31 -0
  139. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +66 -0
  140. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.d.ts +2 -0
  141. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.js +10 -0
  142. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.d.ts +2 -0
  143. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +42 -0
  144. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +18 -0
  145. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +79 -0
  146. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +50 -99
  147. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +11 -14
  148. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.d.ts +3 -0
  149. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.js +16 -0
  150. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.d.ts +12 -0
  151. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.js +18 -0
  152. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.d.ts +5 -0
  153. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.js +7 -0
  154. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.d.ts +4 -0
  155. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.js +46 -0
  156. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.d.ts +3 -0
  157. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.js +16 -0
  158. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +19 -0
  159. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.js +51 -0
  160. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.d.ts +5 -0
  161. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.js +7 -0
  162. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.d.ts +6 -0
  163. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.js +18 -0
  164. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.d.ts +3 -0
  165. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.js +19 -0
  166. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.d.ts +24 -0
  167. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.js +80 -0
  168. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +23 -0
  169. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.js +32 -0
  170. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.d.ts +7 -0
  171. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.js +8 -0
  172. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +3 -0
  173. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +61 -0
  174. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +20 -0
  175. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +46 -0
  176. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +5 -0
  177. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.js +54 -0
  178. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.d.ts +3 -0
  179. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.js +41 -0
  180. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.d.ts +43 -0
  181. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.js +58 -0
  182. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +19 -0
  183. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +118 -0
  184. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.d.ts +43 -0
  185. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.js +64 -0
  186. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +39 -0
  187. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +73 -0
  188. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +27 -0
  189. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +65 -0
  190. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.d.ts +19 -0
  191. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +118 -0
  192. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.d.ts +15 -0
  193. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.js +41 -0
  194. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.d.ts +39 -0
  195. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +46 -0
  196. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +39 -0
  197. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +80 -0
  198. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +22 -0
  199. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +16 -0
  200. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +134 -0
  201. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.js +2 -0
  202. package/dist/src/sub/DynamicLayout/sections/FullscreenIframeSection/templates/TemplateA/desktop/D_TemplateA.js +1 -1
  203. package/dist/src/sub/DynamicLayout/sections/FullscreenIframeSection/templates/TemplateA/mobile/M_TemplateA.js +1 -1
  204. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/MembershipSection.d.ts +1 -1
  205. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/MembershipSection.js +1 -1
  206. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/TemplateA.js +2 -2
  207. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/D_TemplateA.d.ts +1 -1
  208. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipSheet.js +4 -4
  209. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipBenefitInfo.d.ts +1 -1
  210. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipBenefitInfo.js +2 -2
  211. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.d.ts +1 -1
  212. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.js +5 -5
  213. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipSheet.d.ts +1 -1
  214. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipSheet.js +4 -4
  215. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/NarrowMembershipListView.d.ts +1 -1
  216. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/NarrowMembershipListView.js +3 -3
  217. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/SectionContents.js +2 -2
  218. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/UnavailableMembershipPlanSheet.d.ts +1 -1
  219. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/UnavailableMembershipPlanSheet.js +4 -4
  220. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/WideMembershipListView.d.ts +1 -1
  221. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/WideMembershipListView.js +3 -3
  222. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/M_TemplateA.d.ts +1 -1
  223. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/EmptyMembershipSheet.js +4 -4
  224. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipBenefitInfo.d.ts +1 -1
  225. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipBenefitInfo.js +3 -3
  226. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipContents.d.ts +1 -1
  227. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipSectionSheet.d.ts +1 -1
  228. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipSectionSheet.js +5 -5
  229. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/SectionContents.js +2 -2
  230. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/TemplateB.js +2 -2
  231. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/D_TemplateB.d.ts +1 -1
  232. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipSheet.js +4 -4
  233. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.d.ts +1 -1
  234. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.js +2 -2
  235. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipCard.d.ts +1 -1
  236. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipCard.js +2 -2
  237. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.d.ts +1 -1
  238. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.js +5 -5
  239. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipSheet.d.ts +1 -1
  240. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipSheet.js +6 -6
  241. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/SectionContents.js +2 -2
  242. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/UnavailableMembershipPlanSheet.d.ts +1 -1
  243. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/UnavailableMembershipPlanSheet.js +4 -4
  244. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/M_TemplateB.d.ts +1 -1
  245. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/EmptyMembershipSheet.js +4 -4
  246. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipBenefitInfo.d.ts +1 -1
  247. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipBenefitInfo.js +3 -3
  248. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipContents.d.ts +1 -1
  249. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipSectionSheet.d.ts +1 -1
  250. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipSectionSheet.js +5 -5
  251. package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/SectionContents.js +2 -2
  252. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/MembershipSection.d.ts +1 -1
  253. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/MembershipSection.js +1 -1
  254. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/TemplateA.js +1 -1
  255. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/desktop/D_TemplateA.js +1 -1
  256. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/desktop/components/SectionContents.js +2 -2
  257. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/M_TemplateA.js +1 -1
  258. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/components/SectionContents.js +2 -2
  259. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/TemplateB.js +1 -1
  260. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/desktop/D_TemplateB.js +1 -1
  261. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/desktop/components/SectionContents.js +2 -2
  262. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/M_TemplateB.js +1 -1
  263. package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/components/SectionContents.js +2 -2
  264. package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.d.ts +3 -3
  265. package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.js +2 -2
  266. package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.d.ts +3 -3
  267. package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.js +2 -2
  268. package/dist/src/sub/DynamicLayout/sections/MembershipSection/constants.d.ts +1 -1
  269. package/dist/src/sub/DynamicLayout/sections/index.d.ts +1 -0
  270. package/dist/src/sub/DynamicLayout/sections/index.js +3 -1
  271. package/dist/src/sub/DynamicLayout/types.d.ts +70 -4
  272. package/package.json +2 -4
  273. package/release-note.md +15 -7
  274. package/dist/src/sub/DynamicLayout/components/Box.d.ts +0 -13
  275. package/dist/src/sub/DynamicLayout/components/Box.js +0 -73
  276. package/dist/src/sub/DynamicLayout/custonSectionSampleData.d.ts +0 -334
  277. package/dist/src/sub/DynamicLayout/custonSectionSampleData.js +0 -328
  278. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.d.ts +0 -11
  279. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.js +0 -86
  280. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.d.ts +0 -12
  281. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.js +0 -46
  282. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.d.ts +0 -8
  283. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.js +0 -74
  284. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.d.ts +0 -13
  285. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.js +0 -25
  286. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.d.ts +0 -7
  287. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.js +0 -49
  288. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.d.ts +0 -7
  289. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.js +0 -19
  290. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.d.ts +0 -4
  291. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.js +0 -14
  292. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Button.d.ts +0 -8
  293. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/CardItem.d.ts +0 -9
  294. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/CardItem.js +0 -34
  295. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/ContentsCarousel.d.ts +0 -28
  296. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/ContentsCarousel.js +0 -53
  297. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.d.ts +0 -7
  298. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.js +0 -29
  299. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.d.ts +0 -7
  300. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.js +0 -18
  301. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ImageCarousel/ImageCarousel.d.ts +0 -16
  302. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ImageCarousel/ImageCarousel.js +0 -41
  303. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.d.ts +0 -7
  304. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.js +0 -19
  305. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.d.ts +0 -7
  306. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.js +0 -9
  307. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.d.ts +0 -7
  308. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.js +0 -29
  309. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.d.ts +0 -7
  310. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.js +0 -30
  311. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.d.ts +0 -9
  312. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.js +0 -38
  313. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.d.ts +0 -9
  314. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.js +0 -24
  315. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.d.ts +0 -1
  316. package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.js +0 -8
  317. package/webhook/node_modules/esrecurse/.babelrc +0 -3
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS = exports.CB_LAYOUT_PROP_ARRANGE_BASE_KEYS = void 0;
15
+ var CB_LAYOUT_PROP_ARRANGE_BASE_KEYS;
16
+ (function (CB_LAYOUT_PROP_ARRANGE_BASE_KEYS) {
17
+ CB_LAYOUT_PROP_ARRANGE_BASE_KEYS["CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL"] = "CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL";
18
+ CB_LAYOUT_PROP_ARRANGE_BASE_KEYS["CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL"] = "CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL";
19
+ })(CB_LAYOUT_PROP_ARRANGE_BASE_KEYS = exports.CB_LAYOUT_PROP_ARRANGE_BASE_KEYS || (exports.CB_LAYOUT_PROP_ARRANGE_BASE_KEYS = {}));
20
+ var CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS;
21
+ (function (CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS) {
22
+ CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS["CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL_MOBILE"] = "CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE";
23
+ CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS["CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL_MOBILE"] = "CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE";
24
+ })(CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS = exports.CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS || (exports.CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS = {}));
25
+ function parseLayoutPropArrange(namedProps, device) {
26
+ var specs = namedProps.specs;
27
+ var AVAILABLE_SPECS = Object.values(CB_LAYOUT_PROP_ARRANGE_BASE_KEYS);
28
+ return AVAILABLE_SPECS.reduce(function (acc, cur) {
29
+ var _a;
30
+ var currentKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
31
+ var value = (_a = specs[currentKey]) !== null && _a !== void 0 ? _a : specs[cur];
32
+ var CSSProperties = getCssProperties(value);
33
+ return {
34
+ style: __assign(__assign({}, acc.style), CSSProperties)
35
+ };
36
+ }, {
37
+ style: {}
38
+ });
39
+ }
40
+ exports.default = parseLayoutPropArrange;
41
+ function getCssProperties(value) {
42
+ switch (value) {
43
+ case 'TOP':
44
+ return {
45
+ display: 'flex',
46
+ flexDirection: 'column',
47
+ justifyContent: 'flex-start'
48
+ };
49
+ case 'MIDDLE':
50
+ return {
51
+ display: 'flex',
52
+ flexDirection: 'column',
53
+ justifyContent: 'center'
54
+ };
55
+ case 'BOTTOM':
56
+ return {
57
+ display: 'flex',
58
+ flexDirection: 'column',
59
+ justifyContent: 'flex-end'
60
+ };
61
+ case 'LEFT':
62
+ return {
63
+ display: 'flex',
64
+ flexDirection: 'column',
65
+ alignItems: 'flex-start'
66
+ };
67
+ case 'CENTER':
68
+ return {
69
+ display: 'flex',
70
+ flexDirection: 'column',
71
+ alignItems: 'center'
72
+ };
73
+ case 'RIGHT':
74
+ return {
75
+ display: 'flex',
76
+ flexDirection: 'column',
77
+ alignItems: 'flex-end'
78
+ };
79
+ }
80
+ }
@@ -0,0 +1,23 @@
1
+ import type { Device, StyleType } from '../types';
2
+ import type { CB_LAYOUT_PROP_KEYS } from './types';
3
+ export declare type NAMED_CB_LAYOUT_PADDING_PROPS = {
4
+ name: CB_LAYOUT_PROP_KEYS.CB_LAYOUT_PROP_PADDING;
5
+ specs: CB_LAYOUT_PROP_PADDING_SPECS;
6
+ };
7
+ export default function parseLayoutPropPadding(namedProps: NAMED_CB_LAYOUT_PADDING_PROPS, device: Device): StyleType;
8
+ declare type CB_LAYOUT_PROP_PADDING_SPEC_PADDING_OBJ = {
9
+ top: number;
10
+ left: number;
11
+ right: number;
12
+ bottom: number;
13
+ };
14
+ export declare type CB_STYLE_PROP_PADDING_BASE = {
15
+ CB_LAYOUT_PROP_PADDING_SPEC_PADDING: CB_LAYOUT_PROP_PADDING_SPEC_PADDING_OBJ;
16
+ };
17
+ export declare type CB_LAYOUT_PROP_PADDING_SPECS = CB_STYLE_PROP_PADDING_BASE & {
18
+ CB_LAYOUT_PROP_PADDING_SPEC_PADDING: CB_LAYOUT_PROP_PADDING_SPEC_PADDING_OBJ;
19
+ 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': CB_LAYOUT_PROP_PADDING_SPEC_PADDING_OBJ | undefined;
20
+ CB_LAYOUT_PROP_PADDING_SPEC_FIX: boolean;
21
+ 'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': boolean | undefined;
22
+ };
23
+ export {};
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ function parseLayoutPropPadding(namedProps, device) {
15
+ var specs = namedProps.specs;
16
+ return AVAILABLE_SPECS.reduce(function (acc, cur) {
17
+ var _a;
18
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
19
+ var value = (_a = specs[baseKey]) !== null && _a !== void 0 ? _a : specs[cur];
20
+ var top = value.top, left = value.left, right = value.right, bottom = value.bottom;
21
+ return {
22
+ style: __assign(__assign({}, acc.style), { paddingTop: top + "px", paddingLeft: left + "px", paddingRight: right + "px", paddingBottom: bottom + "px" })
23
+ };
24
+ }, {
25
+ style: {}
26
+ });
27
+ }
28
+ exports.default = parseLayoutPropPadding;
29
+ var AVAILABLE_SPECS = [
30
+ 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING'
31
+ // 'CB_LAYOUT_PROP_PADDING_SPEC_FIX'
32
+ ];
@@ -0,0 +1,7 @@
1
+ import type { NAMED_CB_LAYOUT_ARRANGE_PROPS } from './parseLayoutPropArrange';
2
+ import type { NAMED_CB_LAYOUT_PADDING_PROPS } from './parseLayoutPropPadding';
3
+ export declare enum CB_LAYOUT_PROP_KEYS {
4
+ CB_LAYOUT_PROP_PADDING = "CB_LAYOUT_PROP_PADDING",
5
+ CB_LAYOUT_PROP_ARRANGE = "CB_LAYOUT_PROP_ARRANGE"
6
+ }
7
+ export declare type NamedLayoutPropType = NAMED_CB_LAYOUT_ARRANGE_PROPS | NAMED_CB_LAYOUT_PADDING_PROPS;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CB_LAYOUT_PROP_KEYS = void 0;
4
+ var CB_LAYOUT_PROP_KEYS;
5
+ (function (CB_LAYOUT_PROP_KEYS) {
6
+ CB_LAYOUT_PROP_KEYS["CB_LAYOUT_PROP_PADDING"] = "CB_LAYOUT_PROP_PADDING";
7
+ CB_LAYOUT_PROP_KEYS["CB_LAYOUT_PROP_ARRANGE"] = "CB_LAYOUT_PROP_ARRANGE";
8
+ })(CB_LAYOUT_PROP_KEYS = exports.CB_LAYOUT_PROP_KEYS || (exports.CB_LAYOUT_PROP_KEYS = {}));
@@ -0,0 +1,3 @@
1
+ import type { Device, OverlayStyleAndOverlayHoverStyle, ParserResult } from './types';
2
+ import type { ISectionJsonProperties } from '@sub/DynamicLayout/types';
3
+ export default function parseJsonProperties(properties: ISectionJsonProperties, device: Device): ParserResult & Partial<OverlayStyleAndOverlayHoverStyle>;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var contentPropParsers_1 = require("./contentPropParsers");
15
+ var types_1 = require("./contentPropParsers/types");
16
+ var effectPropParsers_1 = require("./effectPropParsers");
17
+ var types_2 = require("./effectPropParsers/types");
18
+ var layoutPropParsers_1 = require("./layoutPropParsers");
19
+ var types_3 = require("./layoutPropParsers/types");
20
+ var stylePropParsers_1 = require("./stylePropParsers");
21
+ var types_4 = require("./stylePropParsers/types");
22
+ // export type specTypes = CB_LAYOUT_PROP_KEYS | CB_STYLE_PROP_KEYS;
23
+ function parseJsonProperties(properties, device) {
24
+ return Object.entries(properties).reduce(function (acc, cur) {
25
+ var specKey = cur[0], specs = cur[1];
26
+ var normalizedProperty = {
27
+ name: specKey,
28
+ specs: specs
29
+ };
30
+ if (normalizedProperty.name in types_4.CB_STYLE_PROP_KEYS) {
31
+ var _a = (0, stylePropParsers_1.parseStyleProperties)(normalizedProperty, device), style = _a.style, hoverStyle = _a.hoverStyle, overlayStyle = _a.overlayStyle, overlayHoverStyle = _a.overlayHoverStyle;
32
+ // console.log(normalizedProperty.name, ' >>>', overlayStyle, overlayHoverStyle);
33
+ return __assign(__assign({}, acc), { style: __assign(__assign({}, acc.style), style), hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverStyle), overlayStyle: __assign(__assign({}, acc.overlayStyle), overlayStyle), overlayHoverStyle: __assign(__assign({}, acc.overlayHoverStyle), overlayHoverStyle) });
34
+ }
35
+ if (normalizedProperty.name in types_3.CB_LAYOUT_PROP_KEYS) {
36
+ var style = (0, layoutPropParsers_1.parseLayoutProperties)(normalizedProperty, device).style;
37
+ // console.log(normalizedProperty.name, ' >>>', style);
38
+ return __assign(__assign({}, acc), { layout: __assign(__assign({}, acc.layout), style) });
39
+ }
40
+ if (normalizedProperty.name in types_1.CB_CONTENT_PROP_KEYS) {
41
+ var style = (0, contentPropParsers_1.parseContentProperties)(normalizedProperty, device).style;
42
+ // console.log(normalizedProperty.name, ' >>>', style);
43
+ return __assign(__assign({}, acc), { style: __assign(__assign({}, acc.style), style) });
44
+ }
45
+ if (normalizedProperty.name in types_2.CB_EFFECT_PROP_KEYS) {
46
+ var style = (0, effectPropParsers_1.parseEffectProperties)(normalizedProperty, device).style;
47
+ // console.log(normalizedProperty.name, ' >>>', style);
48
+ return __assign(__assign({}, acc), { effect: __assign(__assign({}, acc.effect), style) });
49
+ }
50
+ return acc;
51
+ }, {
52
+ style: {},
53
+ overlayStyle: {},
54
+ overlayHoverStyle: {},
55
+ hoverStyle: {},
56
+ layout: {},
57
+ effect: {},
58
+ content: {}
59
+ });
60
+ }
61
+ exports.default = parseJsonProperties;
@@ -0,0 +1,20 @@
1
+ import type { ComponentBlock } from '../types';
2
+ export declare function parsePlacement(components: ComponentBlock[]): {
3
+ sm: {
4
+ i: string;
5
+ x: number;
6
+ y: number;
7
+ w: number;
8
+ h: number;
9
+ z: number;
10
+ }[];
11
+ lg: {
12
+ i: string;
13
+ x: number;
14
+ y: number;
15
+ w: number;
16
+ h: number;
17
+ z: number;
18
+ }[];
19
+ };
20
+ export default parsePlacement;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.parsePlacement = void 0;
13
+ function parsePlacement(components) {
14
+ return components.reduce(function (acc, cur) {
15
+ var id = cur.id, properties = cur.properties;
16
+ var _a = parsePropPlacement(properties.CB_PLACEMENT_PROP_PLACEMENT, id), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
17
+ return {
18
+ sm: __spreadArray(__spreadArray([], acc.sm, true), [mobileLayout], false),
19
+ lg: __spreadArray(__spreadArray([], acc.lg, true), [desktopLayout], false)
20
+ };
21
+ }, { sm: [], lg: [] });
22
+ }
23
+ exports.parsePlacement = parsePlacement;
24
+ function parsePropPlacement(props, id) {
25
+ var desktopLayout = {
26
+ i: id.toString(),
27
+ x: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX,
28
+ y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
29
+ w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
30
+ h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
31
+ z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX
32
+ };
33
+ var mobileLayout = {
34
+ i: id.toString(),
35
+ x: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
36
+ y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'],
37
+ w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE'],
38
+ h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
39
+ z: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE']
40
+ };
41
+ return {
42
+ mobileLayout: mobileLayout,
43
+ desktopLayout: desktopLayout
44
+ };
45
+ }
46
+ exports.default = parsePlacement;
@@ -0,0 +1,5 @@
1
+ import { CB_LAYOUT_PROP_KEYS } from './layoutPropParsers/types';
2
+ import { CB_STYLE_PROP_KEYS } from './stylePropParsers/types';
3
+ import type { Device, ParserResult, CB_TEXT_PROPERTIES_TYPE, CB_BTN_PROPERTIES_TYPE, CB_IMG_PROPERTIES_TYPE, CB_TWITTER_PROPERTIES_TYPE, CB_DIVIDER_PROPERTIES_TYPE, CB_YOUTUBE_PROPERTIES_TYPE, CB_RICHTEXT_PROPERTIES_TYPE } from './types';
4
+ export declare type specTypes = CB_LAYOUT_PROP_KEYS | CB_STYLE_PROP_KEYS;
5
+ export default function parseProperties(properties: CB_TEXT_PROPERTIES_TYPE | CB_BTN_PROPERTIES_TYPE | CB_IMG_PROPERTIES_TYPE | CB_TWITTER_PROPERTIES_TYPE | CB_DIVIDER_PROPERTIES_TYPE | CB_YOUTUBE_PROPERTIES_TYPE | CB_RICHTEXT_PROPERTIES_TYPE, device: Device): ParserResult;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var contentPropParsers_1 = require("./contentPropParsers");
15
+ var types_1 = require("./contentPropParsers/types");
16
+ var effectPropParsers_1 = require("./effectPropParsers");
17
+ var types_2 = require("./effectPropParsers/types");
18
+ var layoutPropParsers_1 = require("./layoutPropParsers");
19
+ var types_3 = require("./layoutPropParsers/types");
20
+ var stylePropParsers_1 = require("./stylePropParsers");
21
+ var types_4 = require("./stylePropParsers/types");
22
+ function parseProperties(properties, device) {
23
+ return Object.entries(properties).reduce(function (acc, cur) {
24
+ var specKey = cur[0], specs = cur[1];
25
+ var normalizedProperty = {
26
+ name: specKey,
27
+ specs: specs
28
+ };
29
+ if (normalizedProperty.name in types_4.CB_STYLE_PROP_KEYS) {
30
+ var _a = (0, stylePropParsers_1.parseStyleProperties)(normalizedProperty, device), style = _a.style, hoverStyle = _a.hoverStyle;
31
+ return __assign(__assign({}, acc), { style: __assign(__assign({}, acc.style), style), hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverStyle) });
32
+ }
33
+ if (normalizedProperty.name in types_3.CB_LAYOUT_PROP_KEYS) {
34
+ var style = (0, layoutPropParsers_1.parseLayoutProperties)(normalizedProperty, device).style;
35
+ return __assign(__assign({}, acc), { layout: __assign(__assign({}, acc.layout), style) });
36
+ }
37
+ if (normalizedProperty.name in types_1.CB_CONTENT_PROP_KEYS) {
38
+ var style = (0, contentPropParsers_1.parseContentProperties)(normalizedProperty, device).style;
39
+ return __assign(__assign({}, acc), { style: __assign(__assign({}, acc.style), style) });
40
+ }
41
+ if (normalizedProperty.name in types_2.CB_EFFECT_PROP_KEYS) {
42
+ var style = (0, effectPropParsers_1.parseEffectProperties)(normalizedProperty, device).style;
43
+ return __assign(__assign({}, acc), { effect: __assign(__assign({}, acc.effect), style) });
44
+ }
45
+ return acc;
46
+ }, {
47
+ style: {},
48
+ hoverStyle: {},
49
+ layout: {},
50
+ effect: {},
51
+ content: {}
52
+ });
53
+ }
54
+ exports.default = parseProperties;
@@ -0,0 +1,3 @@
1
+ import { NamedStylePropType } from './types';
2
+ import type { Device, OverlayStyleAndOverlayHoverStyle, StyleAndHoverStyle } from '../types';
3
+ export declare function parseStyleProperties(normalizedProperty: NamedStylePropType, device: Device): StyleAndHoverStyle & Partial<OverlayStyleAndOverlayHoverStyle>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseStyleProperties = void 0;
7
+ var parseStylePropBgColor_1 = __importDefault(require("./parseStylePropBgColor"));
8
+ var parseStylePropBgImage_1 = __importDefault(require("./parseStylePropBgImage"));
9
+ var parseStylePropBgOverlay_1 = __importDefault(require("./parseStylePropBgOverlay"));
10
+ var parseStylePropBorder_1 = __importDefault(require("./parseStylePropBorder"));
11
+ var parseStylePropDivider_1 = __importDefault(require("./parseStylePropDivider"));
12
+ var parseStylePropImage_1 = __importDefault(require("./parseStylePropImage"));
13
+ var parseStylePropOpacity_1 = __importDefault(require("./parseStylePropOpacity"));
14
+ var parseStylePropShadow_1 = __importDefault(require("./parseStylePropShadow"));
15
+ var types_1 = require("./types");
16
+ function parseStyleProperties(normalizedProperty, device) {
17
+ var name = normalizedProperty.name;
18
+ switch (name) {
19
+ // case CB_STYLE_PROP_KEYS.CB_STYLE_PROP_TEXT:
20
+ // return parseStylePropTextSpec(normalizedProperty, device);
21
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_OPACITY:
22
+ return (0, parseStylePropOpacity_1.default)(normalizedProperty, device);
23
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_SHADOW:
24
+ return (0, parseStylePropShadow_1.default)(normalizedProperty, device);
25
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BORDER:
26
+ return (0, parseStylePropBorder_1.default)(normalizedProperty, device);
27
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_IMAGE:
28
+ return (0, parseStylePropImage_1.default)(normalizedProperty, device);
29
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_DIVIDER:
30
+ return (0, parseStylePropDivider_1.default)(normalizedProperty, device);
31
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGCOLOR:
32
+ return (0, parseStylePropBgColor_1.default)(normalizedProperty, device);
33
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGMEDIA:
34
+ return (0, parseStylePropBgImage_1.default)(normalizedProperty, device);
35
+ case types_1.CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGOVERLAY:
36
+ return (0, parseStylePropBgOverlay_1.default)(normalizedProperty, device);
37
+ default:
38
+ return { style: {}, hoverStyle: {}, overlayStyle: {}, overlayHoverStyle: {} };
39
+ }
40
+ }
41
+ exports.parseStyleProperties = parseStyleProperties;
@@ -0,0 +1,43 @@
1
+ import type { Device, ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
2
+ import type { CB_STYLE_PROP_KEYS } from './types';
3
+ export declare type NAMED_CB_STYLE_BGCOLOR_PROPS = {
4
+ name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGCOLOR;
5
+ specs: CB_STYLE_PROP_BGCOLOR_SPECS;
6
+ };
7
+ export default function parseStylePropBgColor(namedProps: NAMED_CB_STYLE_BGCOLOR_PROPS, device: Device): StyleAndHoverStyle;
8
+ export declare type CB_STYLE_PROP_BGCOLOR_SPECS_BASE = {
9
+ CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE: NUMBER_INTEGER;
10
+ CB_STYLE_PROP_BGCOLOR_SPEC_COLOR: STRING_8DIGIT_HEX;
11
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR: STRING_8DIGIT_HEX;
12
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC: NUMBER_INTEGER;
13
+ CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT: ENUM_STRING;
14
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR: STRING_8DIGIT_HEX;
15
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC: NUMBER_INTEGER;
16
+ CB_STYLE_PROP_BGCOLOR_SPEC_TYPE: ENUM_STRING;
17
+ };
18
+ export declare type CB_STYLE_PROP_BGCOLOR_SPECS = CB_STYLE_PROP_BGCOLOR_SPECS_BASE & {
19
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:HOVER': NUMBER_INTEGER;
20
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | undefined;
21
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | undefined;
22
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX;
23
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | undefined;
24
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | undefined;
25
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:HOVER': STRING_8DIGIT_HEX;
26
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE': STRING_8DIGIT_HEX | undefined;
27
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | undefined;
28
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:HOVER': NUMBER_INTEGER;
29
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | undefined;
30
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | undefined;
31
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:HOVER': ENUM_STRING;
32
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE': ENUM_STRING | undefined;
33
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE:HOVER': ENUM_STRING | undefined;
34
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:HOVER': STRING_8DIGIT_HEX;
35
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE': STRING_8DIGIT_HEX | undefined;
36
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | undefined;
37
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:HOVER': NUMBER_INTEGER;
38
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | undefined;
39
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | undefined;
40
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:HOVER': ENUM_STRING;
41
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE': ENUM_STRING | undefined;
42
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE:HOVER': ENUM_STRING | undefined;
43
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var AVAILABLE_SPECS = [
15
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE',
16
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR',
17
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR',
18
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC',
19
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT',
20
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR',
21
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC',
22
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE'
23
+ ];
24
+ function parseStylePropBgColor(namedProps, device) {
25
+ var specs = namedProps.specs;
26
+ var bgColorCssProperties = AVAILABLE_SPECS.reduce(function (acc, cur) {
27
+ var _a, _b;
28
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
29
+ var value = specs[baseKey];
30
+ var hoverValue = specs[baseKey + ":HOVER"];
31
+ return {
32
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[baseKey] = value, _a)),
33
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_b = {}, _b[baseKey] = hoverValue, _b))
34
+ };
35
+ }, {
36
+ style: {},
37
+ hoverStyle: {}
38
+ });
39
+ return {
40
+ style: { background: valueGenerator(bgColorCssProperties.style) },
41
+ hoverStyle: { background: valueGenerator(bgColorCssProperties.hoverStyle) }
42
+ };
43
+ }
44
+ exports.default = parseStylePropBgColor;
45
+ function valueGenerator(valueSet) {
46
+ var CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE, CB_STYLE_PROP_BGCOLOR_SPEC_COLOR = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_COLOR, CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR, CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC, CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT, CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR, CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC, CB_STYLE_PROP_BGCOLOR_SPEC_TYPE = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_TYPE;
47
+ if (CB_STYLE_PROP_BGCOLOR_SPEC_TYPE === 'GRADIENT') {
48
+ var isLinear = CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT === 'LINEAR';
49
+ var gradientType = isLinear ? 'linear-gradient' : 'radial-gradient';
50
+ var gradientDegree = isLinear ? CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE + "deg," : '';
51
+ var gradientStartColor = CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR;
52
+ var gradientStartPosition = CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC;
53
+ var gradientEndColor = CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR;
54
+ var gradientEndPosition = CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC;
55
+ return gradientType + "(" + gradientDegree + " " + gradientStartColor + " " + gradientStartPosition + "%, " + gradientEndColor + " " + gradientEndPosition + "%)";
56
+ }
57
+ return "" + CB_STYLE_PROP_BGCOLOR_SPEC_COLOR;
58
+ }
@@ -0,0 +1,19 @@
1
+ import type { Device, ENUM_STRING, STRING_PLAIN, StyleAndHoverStyle } from '../types';
2
+ import type { CB_STYLE_PROP_KEYS } from './types';
3
+ export declare type NAMED_CB_STYLE_BGIMAGE_PROPS = {
4
+ name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGMEDIA;
5
+ specs: CB_STYLE_PROP_BGIMAGE_SPECS;
6
+ };
7
+ export default function parseStylePropBGImage(namedProps: NAMED_CB_STYLE_BGIMAGE_PROPS, device: Device): StyleAndHoverStyle;
8
+ export declare type CB_STYLE_PROP_BGIMAGE_SPECS_BASE = {
9
+ CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT: STRING_PLAIN;
10
+ CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION: ENUM_STRING;
11
+ };
12
+ export declare type CB_STYLE_PROP_BGIMAGE_SPECS = CB_STYLE_PROP_BGIMAGE_SPECS_BASE & {
13
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:HOVER': STRING_PLAIN;
14
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE': STRING_PLAIN | undefined;
15
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE:HOVER': STRING_PLAIN | undefined;
16
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:HOVER': ENUM_STRING;
17
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE': ENUM_STRING | undefined;
18
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER': ENUM_STRING | undefined;
19
+ };
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var AVAILABLE_SPECS = [
15
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT',
16
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION'
17
+ ];
18
+ function parseStylePropBGImage(namedProps, device) {
19
+ var specs = namedProps.specs;
20
+ return AVAILABLE_SPECS.reduce(function (acc, cur) {
21
+ var _a, _b;
22
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
23
+ var cssPropertyKey = getParsedKey(baseKey);
24
+ var value = specs[baseKey];
25
+ var hoverValue = specs[baseKey + ":HOVER"];
26
+ var isPosition = cssPropertyKey === 'position';
27
+ if (isPosition) {
28
+ var positionCss = getCssProperties(value);
29
+ var hoverPositionCss = getCssProperties(hoverValue);
30
+ return {
31
+ style: __assign(__assign({}, acc.style), positionCss),
32
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverPositionCss)
33
+ };
34
+ }
35
+ 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))
38
+ };
39
+ }, {
40
+ style: {},
41
+ hoverStyle: {}
42
+ });
43
+ }
44
+ exports.default = parseStylePropBGImage;
45
+ function getParsedKey(key) {
46
+ switch (key) {
47
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT':
48
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:HOVER':
49
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE':
50
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE:HOVER':
51
+ return 'objectFit';
52
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION':
53
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:HOVER':
54
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE':
55
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER':
56
+ return 'position';
57
+ }
58
+ }
59
+ function getCssProperties(value) {
60
+ switch (value) {
61
+ case 'LT':
62
+ return {
63
+ display: 'flex',
64
+ alignItems: 'flex-start',
65
+ justifyContent: 'flex-start'
66
+ };
67
+ case 'CT':
68
+ return {
69
+ display: 'flex',
70
+ alignItems: 'flex-start',
71
+ justifyContent: 'center'
72
+ };
73
+ case 'RT':
74
+ return {
75
+ display: 'flex',
76
+ alignItems: 'flex-start',
77
+ justifyContent: 'flex-end'
78
+ };
79
+ case 'LC':
80
+ return {
81
+ display: 'flex',
82
+ alignItems: 'center',
83
+ justifyContent: 'flex-start'
84
+ };
85
+ case 'CC':
86
+ return {
87
+ display: 'flex',
88
+ alignItems: 'center',
89
+ justifyContent: 'center'
90
+ };
91
+ case 'RC':
92
+ return {
93
+ display: 'flex',
94
+ alignItems: 'center',
95
+ justifyContent: 'flex-end'
96
+ };
97
+ case 'LB':
98
+ return {
99
+ display: 'flex',
100
+ alignItems: 'flex-end',
101
+ justifyContent: 'flex-start'
102
+ };
103
+ case 'CB':
104
+ return {
105
+ display: 'flex',
106
+ alignItems: 'center',
107
+ justifyContent: 'flex-end'
108
+ };
109
+ case 'RB':
110
+ return {
111
+ display: 'flex',
112
+ alignItems: 'flex-end',
113
+ justifyContent: 'flex-end'
114
+ };
115
+ default:
116
+ return {};
117
+ }
118
+ }