pds-dev-kit-web 2.1.14 → 2.1.15

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 (199) hide show
  1. package/dist/src/common/styles/colorSet/index.d.ts +2 -2
  2. package/dist/src/common/styles/colorSet/index.js +2 -2
  3. package/dist/src/sub/DynamicLayout/DynamicLayout.js +1 -0
  4. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.d.ts +8 -0
  5. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.js +46 -0
  6. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.d.ts +2 -0
  7. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.js +8 -0
  8. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.d.ts +6 -0
  9. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.js +24 -0
  10. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.d.ts +2 -0
  11. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.js +8 -0
  12. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.d.ts +13 -0
  13. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.js +63 -0
  14. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.d.ts +2 -0
  15. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.js +8 -0
  16. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.d.ts +70 -0
  17. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.js +52 -0
  18. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.d.ts +14 -0
  19. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.js +41 -0
  20. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/index.d.ts +2 -0
  21. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/index.js +8 -0
  22. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.d.ts +35 -0
  23. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.js +141 -0
  24. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.d.ts +2 -0
  25. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.js +33 -0
  26. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.d.ts +1 -0
  27. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.js +8 -0
  28. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.d.ts +4 -0
  29. package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.js +9 -0
  30. package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +3 -0
  31. package/dist/src/sub/DynamicLayout/components/Section/CustomSection.d.ts +11 -0
  32. package/dist/src/sub/DynamicLayout/components/Section/CustomSection.js +46 -0
  33. package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.d.ts +15 -0
  34. package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.js +62 -0
  35. package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/index.d.ts +1 -0
  36. package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/index.js +8 -0
  37. package/dist/src/sub/DynamicLayout/components/Section/Section.d.ts +6 -3
  38. package/dist/src/sub/DynamicLayout/components/Section/Section.js +4 -2
  39. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.d.ts +5 -0
  40. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +72 -0
  41. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +14 -0
  42. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +119 -0
  43. package/dist/src/sub/DynamicLayout/components/Section/index.d.ts +1 -0
  44. package/dist/src/sub/DynamicLayout/components/Section/index.js +3 -1
  45. package/dist/src/sub/DynamicLayout/components/Section/util/index.d.ts +1 -0
  46. package/dist/src/sub/DynamicLayout/components/Section/util/index.js +8 -0
  47. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.d.ts +6 -0
  48. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +38 -0
  49. package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +4 -1
  50. package/dist/src/sub/DynamicLayout/components/YouTubeIframe/YouTubeIframe.d.ts +6 -1
  51. package/dist/src/sub/DynamicLayout/components/YouTubeIframe/YouTubeIframe.js +35 -7
  52. package/dist/src/sub/DynamicLayout/components/index.d.ts +1 -1
  53. package/dist/src/sub/DynamicLayout/components/index.js +2 -1
  54. package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +2 -0
  55. package/dist/src/sub/DynamicLayout/mock_customSection.js +837 -0
  56. package/dist/src/sub/DynamicLayout/mock_samplePage.js +2082 -9
  57. package/dist/src/sub/DynamicLayout/nakedMocks.json +847 -0
  58. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +379 -0
  59. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +386 -0
  60. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +29 -0
  61. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +5 -0
  62. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +193 -0
  63. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +7 -0
  64. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +55 -0
  65. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +9 -0
  66. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +50 -0
  67. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +5 -0
  68. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +80 -0
  69. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +76 -0
  70. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +2 -0
  71. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.d.ts +5 -0
  72. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +71 -0
  73. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.d.ts +5 -0
  74. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +107 -0
  75. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.d.ts +12 -0
  76. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.js +2 -0
  77. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +5 -0
  78. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +66 -0
  79. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.d.ts +1 -0
  80. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.js +8 -0
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.d.ts +44 -0
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.js +2 -0
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +5 -0
  84. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +65 -0
  85. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +38 -0
  86. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +2 -0
  87. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.d.ts +5 -0
  88. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +50 -0
  89. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.d.ts +6 -0
  90. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.js +2 -0
  91. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +5 -0
  92. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +73 -0
  93. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.d.ts +1 -0
  94. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.js +8 -0
  95. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.d.ts +7 -0
  96. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.js +33 -0
  97. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.d.ts +48 -0
  98. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.js +2 -0
  99. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_AnimationObserverBox.d.ts +6 -0
  100. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_AnimationObserverBox.js +27 -0
  101. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.d.ts +2 -0
  102. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +46 -0
  103. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.d.ts +11 -0
  104. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +102 -0
  105. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.d.ts +1 -0
  106. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.js +13 -0
  107. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.d.ts +12 -0
  108. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +35 -0
  109. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +21 -0
  110. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.js +2 -0
  111. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.d.ts +0 -0
  112. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.js +18 -0
  113. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts +1 -0
  114. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.js +8 -0
  115. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.d.ts +1 -0
  116. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.js +5 -0
  117. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.d.ts +1 -0
  118. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.js +5 -0
  119. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +6 -0
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +26 -0
  121. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useRefDimensions.d.ts +5 -0
  122. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useRefDimensions.js +19 -0
  123. package/dist/src/sub/DynamicLayout/sections/CustomSection/index.d.ts +1 -0
  124. package/dist/src/sub/DynamicLayout/sections/CustomSection/index.js +8 -0
  125. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +31 -0
  126. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +71 -0
  127. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.d.ts +2 -0
  128. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.js +10 -0
  129. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.d.ts +2 -0
  130. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +40 -0
  131. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +18 -0
  132. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +200 -0
  133. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +50 -0
  134. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +13 -0
  135. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.d.ts +3 -0
  136. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.js +16 -0
  137. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.d.ts +12 -0
  138. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.js +18 -0
  139. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.d.ts +5 -0
  140. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.js +7 -0
  141. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.d.ts +4 -0
  142. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.js +46 -0
  143. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.d.ts +3 -0
  144. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.js +16 -0
  145. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +19 -0
  146. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.js +51 -0
  147. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.d.ts +5 -0
  148. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.js +7 -0
  149. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.d.ts +8 -0
  150. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.js +22 -0
  151. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/isNullOrUndefined.d.ts +2 -0
  152. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/isNullOrUndefined.js +9 -0
  153. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.d.ts +3 -0
  154. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.js +19 -0
  155. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.d.ts +24 -0
  156. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.js +80 -0
  157. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +23 -0
  158. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.js +32 -0
  159. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.d.ts +23 -0
  160. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.js +26 -0
  161. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.d.ts +7 -0
  162. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.js +8 -0
  163. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCustomSectionPlacement.d.ts +20 -0
  164. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCustomSectionPlacement.js +24 -0
  165. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +3 -0
  166. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +67 -0
  167. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +20 -0
  168. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +46 -0
  169. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +5 -0
  170. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.js +54 -0
  171. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.d.ts +3 -0
  172. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.js +41 -0
  173. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.d.ts +43 -0
  174. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.js +92 -0
  175. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +23 -0
  176. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +94 -0
  177. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.d.ts +43 -0
  178. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.js +95 -0
  179. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +39 -0
  180. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +85 -0
  181. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +27 -0
  182. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +77 -0
  183. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.d.ts +19 -0
  184. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +94 -0
  185. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.d.ts +15 -0
  186. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.js +47 -0
  187. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.d.ts +39 -0
  188. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +58 -0
  189. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +8 -0
  190. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +91 -0
  191. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +22 -0
  192. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +16 -0
  193. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +134 -0
  194. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.js +2 -0
  195. package/dist/src/sub/DynamicLayout/sections/index.d.ts +1 -0
  196. package/dist/src/sub/DynamicLayout/sections/index.js +3 -1
  197. package/dist/src/sub/DynamicLayout/types.d.ts +77 -5
  198. package/package.json +2 -1
  199. package/release-note.md +3 -19
@@ -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_STARTX:MOBILE'],
36
+ y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
37
+ w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
38
+ h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: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, OverlayStyle, StyleAndHoverStyle } from '../types';
3
+ export declare function parseStyleProperties(normalizedProperty: NamedStylePropType, device: Device): StyleAndHoverStyle & Partial<OverlayStyle>;
@@ -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: {} };
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 | null | undefined;
20
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | null | undefined;
21
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
22
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
23
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
24
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
25
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
26
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
27
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
28
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:HOVER': NUMBER_INTEGER | null | undefined;
29
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | null | undefined;
30
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
31
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:HOVER': ENUM_STRING | null | undefined;
32
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE': ENUM_STRING | null | undefined;
33
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE:HOVER': ENUM_STRING | null | undefined;
34
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
35
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
36
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
37
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:HOVER': NUMBER_INTEGER | null | undefined;
38
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | null | undefined;
39
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
40
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:HOVER': ENUM_STRING | null | undefined;
41
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE': ENUM_STRING | null | undefined;
42
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE:HOVER': ENUM_STRING | null | undefined;
43
+ };
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var isNullOrUndefined_1 = __importDefault(require("../isNullOrUndefined"));
18
+ var AVAILABLE_SPECS = [
19
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE',
20
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR',
21
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR',
22
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC',
23
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT',
24
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR',
25
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC',
26
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE'
27
+ ];
28
+ function parseStylePropBgColor(namedProps, device) {
29
+ var specs = namedProps.specs;
30
+ var bgColorCssProperties = AVAILABLE_SPECS.reduce(function (acc, cur) {
31
+ var _a;
32
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
33
+ var value = specs[baseKey];
34
+ return {
35
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[baseKey] = (0, isNullOrUndefined_1.default)(value) ? specs[cur] : value, _a)),
36
+ hoverStyle: __assign({}, acc.hoverStyle)
37
+ };
38
+ }, {
39
+ style: {},
40
+ hoverStyle: {}
41
+ });
42
+ return {
43
+ style: { background: valueGenerator(bgColorCssProperties.style, device) },
44
+ hoverStyle: { background: valueGenerator(bgColorCssProperties.hoverStyle, device) }
45
+ };
46
+ }
47
+ exports.default = parseStylePropBgColor;
48
+ function valueGenerator(valueSet, device) {
49
+ if (device === 'DESKTOP') {
50
+ switch (valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_TYPE) {
51
+ case 'GRADIENT': {
52
+ var isLinear = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT === 'LINEAR';
53
+ var gradientType = isLinear ? 'linear-gradient' : 'radial-gradient';
54
+ var gradientDegree = isLinear ? valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE + "deg," : '';
55
+ var gradientStartColor = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR;
56
+ var gradientStartPosition = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC;
57
+ var gradientEndColor = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR;
58
+ var gradientEndPosition = valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC;
59
+ return gradientType + "(" + gradientDegree + " " + gradientStartColor + " " + gradientStartPosition + "%, " + gradientEndColor + " " + gradientEndPosition + "%)";
60
+ }
61
+ case 'SOLID':
62
+ return "" + valueSet.CB_STYLE_PROP_BGCOLOR_SPEC_COLOR;
63
+ case 'NONE':
64
+ return 'transparent';
65
+ default:
66
+ return '';
67
+ }
68
+ }
69
+ if (device === 'MOBILE') {
70
+ switch (valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE']) {
71
+ case 'GRADIENT': {
72
+ var isLinear = valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE'] === 'LINEAR';
73
+ var gradientType = isLinear ? 'linear-gradient' : 'radial-gradient';
74
+ var gradientDegree = isLinear
75
+ ? valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE'] + "deg,"
76
+ : '';
77
+ var gradientStartColor = valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE'];
78
+ var gradientStartPosition = valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE'];
79
+ var gradientEndColor = valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE'];
80
+ var gradientEndPosition = valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE'];
81
+ return gradientType + "(" + gradientDegree + " " + gradientStartColor + " " + gradientStartPosition + "%, " + gradientEndColor + " " + gradientEndPosition + "%)";
82
+ }
83
+ case 'SOLID':
84
+ return "" + valueSet['CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE'];
85
+ case 'NONE':
86
+ return 'transparent';
87
+ default:
88
+ return '';
89
+ }
90
+ }
91
+ return '';
92
+ }
@@ -0,0 +1,23 @@
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
+ CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL: boolean;
12
+ };
13
+ export declare type CB_STYLE_PROP_BGIMAGE_SPECS = CB_STYLE_PROP_BGIMAGE_SPECS_BASE & {
14
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:HOVER': STRING_PLAIN | null | undefined;
15
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE': STRING_PLAIN | null | undefined;
16
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE:HOVER': STRING_PLAIN | null | undefined;
17
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:HOVER': ENUM_STRING | null | undefined;
18
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE': ENUM_STRING | null | undefined;
19
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER': ENUM_STRING | null | undefined;
20
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:HOVER': boolean | null | undefined;
21
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE': boolean | null | undefined;
22
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE:HOVER': boolean | null | undefined;
23
+ };
@@ -0,0 +1,94 @@
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
+ 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL'
18
+ ];
19
+ function parseStylePropBGImage(namedProps, device) {
20
+ var specs = namedProps.specs;
21
+ return AVAILABLE_SPECS.reduce(function (acc, cur) {
22
+ var _a, _b, _c;
23
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
24
+ var cssPropertyKey = getParsedKey(baseKey);
25
+ var value = specs[baseKey] || specs[cur];
26
+ var isPosition = cssPropertyKey === 'backgroundPosition';
27
+ var isAttachment = cssPropertyKey === 'backgroundAttachment';
28
+ if (isPosition) {
29
+ var positionCss = getCssProperties(value);
30
+ return {
31
+ style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = positionCss, _a)),
32
+ hoverStyle: __assign({}, acc.hoverStyle)
33
+ };
34
+ }
35
+ if (isAttachment) {
36
+ var positionCss = value ? 'fixed' : 'unset';
37
+ return {
38
+ style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = positionCss, _b)),
39
+ hoverStyle: __assign({}, acc.hoverStyle)
40
+ };
41
+ }
42
+ return {
43
+ style: __assign(__assign({}, acc.style), (_c = {}, _c[cssPropertyKey] = value, _c)),
44
+ hoverStyle: __assign({}, acc.hoverStyle)
45
+ };
46
+ }, {
47
+ style: {},
48
+ hoverStyle: {}
49
+ });
50
+ }
51
+ exports.default = parseStylePropBGImage;
52
+ function getParsedKey(key) {
53
+ switch (key) {
54
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT':
55
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:HOVER':
56
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE':
57
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT:MOBILE:HOVER':
58
+ return 'backgroundSize';
59
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION':
60
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:HOVER':
61
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE':
62
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION:MOBILE:HOVER':
63
+ return 'backgroundPosition';
64
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL':
65
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:HOVER':
66
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE':
67
+ case 'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL:MOBILE:HOVER':
68
+ return 'backgroundAttachment';
69
+ }
70
+ }
71
+ function getCssProperties(value) {
72
+ switch (value) {
73
+ case 'LT':
74
+ return 'left top';
75
+ case 'CT':
76
+ return 'center top';
77
+ case 'RT':
78
+ return 'right top';
79
+ case 'LC':
80
+ return 'left center';
81
+ case 'CC':
82
+ return 'center center';
83
+ case 'RC':
84
+ return 'right center';
85
+ case 'LB':
86
+ return 'left bottom';
87
+ case 'CB':
88
+ return 'center bottom';
89
+ case 'RB':
90
+ return 'right bottom';
91
+ default:
92
+ return '';
93
+ }
94
+ }
@@ -0,0 +1,43 @@
1
+ import type { Device, ENUM_STRING, NUMBER_INTEGER, OverlayStyle, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
2
+ import type { CB_STYLE_PROP_KEYS } from './types';
3
+ export declare type NAMED_CB_STYLE_BGOVERLAY_PROPS = {
4
+ name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BGOVERLAY;
5
+ specs: CB_STYLE_PROP_BGOVERLAY_SPECS;
6
+ };
7
+ export default function parseStylePropBgOverlay(namedProps: NAMED_CB_STYLE_BGOVERLAY_PROPS, device: Device): StyleAndHoverStyle & Partial<OverlayStyle>;
8
+ export declare type CB_STYLE_PROP_BGOVERLAY_SPECS_BASE = {
9
+ CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE: NUMBER_INTEGER;
10
+ CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR: STRING_8DIGIT_HEX;
11
+ CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR: STRING_8DIGIT_HEX;
12
+ CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC: NUMBER_INTEGER;
13
+ CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT: ENUM_STRING;
14
+ CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR: STRING_8DIGIT_HEX;
15
+ CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC: NUMBER_INTEGER;
16
+ CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE: ENUM_STRING;
17
+ };
18
+ export declare type CB_STYLE_PROP_BGOVERLAY_SPECS = CB_STYLE_PROP_BGOVERLAY_SPECS_BASE & {
19
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:HOVER': NUMBER_INTEGER | null | undefined;
20
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | null | undefined;
21
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
22
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
23
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
24
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
25
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
26
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
27
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
28
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:HOVER': NUMBER_INTEGER | null | undefined;
29
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | null | undefined;
30
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
31
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:HOVER': ENUM_STRING | null | undefined;
32
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:MOBILE': ENUM_STRING | null | undefined;
33
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:MOBILE:HOVER': ENUM_STRING | null | undefined;
34
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
35
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
36
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
37
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:HOVER': NUMBER_INTEGER | null | undefined;
38
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | null | undefined;
39
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
40
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:HOVER': ENUM_STRING | null | undefined;
41
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE': ENUM_STRING | null | undefined;
42
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE:HOVER': ENUM_STRING | null | undefined;
43
+ };
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var isNullOrUndefined_1 = __importDefault(require("../isNullOrUndefined"));
18
+ var AVAILABLE_SPECS = [
19
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE',
20
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR',
21
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR',
22
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC',
23
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT',
24
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR',
25
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC',
26
+ 'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE'
27
+ ];
28
+ function parseStylePropBgOverlay(namedProps, device) {
29
+ var specs = namedProps.specs;
30
+ var bgColorCssProperties = AVAILABLE_SPECS.reduce(function (acc, cur) {
31
+ var _a;
32
+ var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
33
+ var value = specs[baseKey];
34
+ return {
35
+ style: __assign({}, acc.style),
36
+ hoverStyle: __assign({}, acc.hoverStyle),
37
+ overlayStyle: __assign(__assign({}, acc.overlayStyle), (_a = {}, _a[baseKey] = (0, isNullOrUndefined_1.default)(value) ? specs[cur] : value, _a))
38
+ };
39
+ }, {
40
+ style: {},
41
+ hoverStyle: {},
42
+ overlayStyle: {}
43
+ });
44
+ return {
45
+ style: {},
46
+ hoverStyle: {},
47
+ overlayStyle: { background: valueGenerator(bgColorCssProperties.overlayStyle, device) }
48
+ };
49
+ }
50
+ exports.default = parseStylePropBgOverlay;
51
+ function valueGenerator(valueSet, device) {
52
+ if (device === 'DESKTOP') {
53
+ switch (valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE) {
54
+ case 'GRADIENT': {
55
+ var isLinear = valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT === 'LINEAR';
56
+ var gradientType = isLinear ? 'linear-gradient' : 'radial-gradient';
57
+ var gradientDegree = isLinear ? valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE + "deg," : '';
58
+ var gradientStartColor = valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR;
59
+ var gradientStartPosition = valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC;
60
+ var gradientEndColor = valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR;
61
+ var gradientEndPosition = valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC;
62
+ return gradientType + "(" + gradientDegree + " " + gradientStartColor + " " + gradientStartPosition + "%, " + gradientEndColor + " " + gradientEndPosition + "%)";
63
+ }
64
+ case 'SOLID':
65
+ return "" + valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR;
66
+ case 'NONE':
67
+ return 'transparent';
68
+ default:
69
+ return '';
70
+ }
71
+ }
72
+ if (device === 'MOBILE') {
73
+ switch (valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE']) {
74
+ case 'GRADIENT': {
75
+ var isLinear = valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:MOBILE'] === 'LINEAR';
76
+ var gradientType = isLinear ? 'linear-gradient' : 'radial-gradient';
77
+ var gradientDegree = isLinear
78
+ ? valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:MOBILE'] + "deg,"
79
+ : '';
80
+ var gradientStartColor = valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:MOBILE'];
81
+ var gradientStartPosition = valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:MOBILE'];
82
+ var gradientEndColor = valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:MOBILE'];
83
+ var gradientEndPosition = valueSet['CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:MOBILE'];
84
+ return gradientType + "(" + gradientDegree + " " + gradientStartColor + " " + gradientStartPosition + "%, " + gradientEndColor + " " + gradientEndPosition + "%)";
85
+ }
86
+ case 'SOLID':
87
+ return "" + valueSet.CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR;
88
+ case 'NONE':
89
+ return 'transparent';
90
+ default:
91
+ return '';
92
+ }
93
+ }
94
+ return '';
95
+ }
@@ -0,0 +1,39 @@
1
+ import type { Device, NUMBER_INTEGER, STRING_8DIGIT_HEX, StyleAndHoverStyle } from '../types';
2
+ import type { CB_STYLE_PROP_KEYS } from './types';
3
+ export declare type NAMED_CB_STYLE_BORDER_PROPS = {
4
+ name: CB_STYLE_PROP_KEYS.CB_STYLE_PROP_BORDER;
5
+ specs: CB_STYLE_PROP_BORDER_SPECS;
6
+ };
7
+ export default function parseStylePropBorder(namedProps: NAMED_CB_STYLE_BORDER_PROPS, device: Device): StyleAndHoverStyle;
8
+ declare type CB_STYLE_PROP_BORDER_SPEC_RADIUS_OBJ = {
9
+ tl: number;
10
+ tr: number;
11
+ bl: number;
12
+ br: number;
13
+ };
14
+ declare type CB_STYLE_PROP_BORDER_SPEC_STYLE = 'NONE' | 'SOLID' | 'DOTTED' | 'DASHED';
15
+ export declare type CB_STYLE_PROP_BORDER_SPECS_BASE = {
16
+ CB_STYLE_PROP_BORDER_SPEC_STYLE: CB_STYLE_PROP_BORDER_SPEC_STYLE;
17
+ CB_STYLE_PROP_BORDER_SPEC_WIDTH: NUMBER_INTEGER;
18
+ CB_STYLE_PROP_BORDER_SPEC_COLOR: STRING_8DIGIT_HEX;
19
+ CB_STYLE_PROP_BORDER_SPEC_RADIUS: CB_STYLE_PROP_BORDER_SPEC_RADIUS_OBJ;
20
+ CB_STYLE_PROP_BORDER_SPEC_RADIUSFIX: boolean;
21
+ };
22
+ export declare type CB_STYLE_PROP_BORDER_SPECS = CB_STYLE_PROP_BORDER_SPECS_BASE & {
23
+ 'CB_STYLE_PROP_BORDER_SPEC_STYLE:HOVER': CB_STYLE_PROP_BORDER_SPEC_STYLE | null | undefined;
24
+ 'CB_STYLE_PROP_BORDER_SPEC_STYLE:MOBILE': CB_STYLE_PROP_BORDER_SPEC_STYLE | null | undefined;
25
+ 'CB_STYLE_PROP_BORDER_SPEC_STYLE:MOBILE:HOVER': CB_STYLE_PROP_BORDER_SPEC_STYLE | null | undefined;
26
+ 'CB_STYLE_PROP_BORDER_SPEC_WIDTH:HOVER': NUMBER_INTEGER | null | undefined;
27
+ 'CB_STYLE_PROP_BORDER_SPEC_WIDTH:MOBILE': NUMBER_INTEGER | null | undefined;
28
+ 'CB_STYLE_PROP_BORDER_SPEC_WIDTH:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
29
+ 'CB_STYLE_PROP_BORDER_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
30
+ 'CB_STYLE_PROP_BORDER_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
31
+ 'CB_STYLE_PROP_BORDER_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
32
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUS:HOVER': CB_STYLE_PROP_BORDER_SPEC_RADIUS_OBJ | null | undefined;
33
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUS:MOBILE': CB_STYLE_PROP_BORDER_SPEC_RADIUS_OBJ | null | undefined;
34
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUS:MOBILE:HOVER': CB_STYLE_PROP_BORDER_SPEC_RADIUS_OBJ | null | undefined;
35
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUSFIX:HOVER': boolean | null | undefined;
36
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUSFIX:MOBILE': boolean | null | undefined;
37
+ 'CB_STYLE_PROP_BORDER_SPEC_RADIUSFIX:MOBILE:HOVER': boolean | null | undefined;
38
+ };
39
+ export {};