pds-dev-kit-web-test 0.2.2 → 0.2.3
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.
- package/README.md +12 -1
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.js +46 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.d.ts +2 -3
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.js +3 -3
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.d.ts +13 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.js +63 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.d.ts +3 -11
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.js +18 -18
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.d.ts +14 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.js +41 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.d.ts +35 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.js +141 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.js +33 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.d.ts +3 -2
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.js +3 -1
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +3 -3
- package/dist/src/sub/DynamicLayout/components/Section/Section.d.ts +6 -3
- package/dist/src/sub/DynamicLayout/components/Section/Section.js +40 -8
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +9 -0
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +68 -0
- package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +4 -4
- package/dist/src/sub/DynamicLayout/components/desktop/common/Carousel.d.ts +1 -2
- package/dist/src/sub/DynamicLayout/components/desktop/common/Carousel.js +6 -6
- package/dist/src/sub/DynamicLayout/components/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/components/index.js +1 -6
- package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/mock_customSection.js +838 -0
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +5 -210
- package/dist/src/sub/DynamicLayout/nakedMocks.json +783 -0
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +17 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +2 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +85 -51
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +55 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +70 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +73 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +68 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider.js +66 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image.d.ts +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image.js +102 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +62 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.d.ts +44 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text.d.ts +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text.js +58 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter.d.ts +10 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.js +33 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.d.ts +48 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{BlockMatcher/blocks/Button.js → components/ComponentBlock/componentBlocks/components/S_CB_Box.js} +6 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.js +13 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +24 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.d.ts +0 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.js +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.js +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +26 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +66 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.js +10 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +79 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +50 -99
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +11 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.js +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.js +51 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.js +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.js +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.d.ts +24 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.js +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +21 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.js +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +61 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.js +54 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.js +58 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.js +64 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +38 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +73 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +26 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +65 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.d.ts +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +22 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +134 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/index.js +3 -1
- package/dist/src/sub/DynamicLayout/types.d.ts +70 -4
- package/package.json +2 -4
- package/release-note.md +2 -3
- package/dist/src/sub/DynamicLayout/components/Box.d.ts +0 -13
- package/dist/src/sub/DynamicLayout/components/Box.js +0 -73
- package/dist/src/sub/DynamicLayout/custonSectionSampleData.d.ts +0 -334
- package/dist/src/sub/DynamicLayout/custonSectionSampleData.js +0 -328
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.d.ts +0 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.js +0 -86
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.js +0 -46
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.js +0 -74
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.d.ts +0 -13
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.js +0 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.js +0 -49
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.js +0 -19
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.js +0 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Button.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/CardItem.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/CardItem.js +0 -34
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/ContentsCarousel.d.ts +0 -28
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ContentsCarousel/ContentsCarousel.js +0 -53
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.js +0 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.js +0 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ImageCarousel/ImageCarousel.d.ts +0 -16
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/ImageCarousel/ImageCarousel.js +0 -41
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.js +0 -19
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.js +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.js +0 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.js +0 -30
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.js +0 -38
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.js +0 -24
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.js +0 -8
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Device, StyleType } from '../types';
|
|
2
|
+
import type { CB_LAYOUT_PROP_KEYS } from './types';
|
|
3
|
+
export declare enum CB_LAYOUT_PROP_ARRANGE_BASE_KEYS {
|
|
4
|
+
CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL = "CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL",
|
|
5
|
+
CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL = "CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL"
|
|
6
|
+
}
|
|
7
|
+
export declare enum CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS {
|
|
8
|
+
CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL_MOBILE = "CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE",
|
|
9
|
+
CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL_MOBILE = "CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE"
|
|
10
|
+
}
|
|
11
|
+
export declare type NAMED_CB_LAYOUT_ARRANGE_PROPS = {
|
|
12
|
+
name: CB_LAYOUT_PROP_KEYS.CB_LAYOUT_PROP_ARRANGE;
|
|
13
|
+
specs: CB_LAYOUT_PROP_ARRANGE_SPECS;
|
|
14
|
+
};
|
|
15
|
+
export default function parseLayoutPropArrange(namedProps: NAMED_CB_LAYOUT_ARRANGE_PROPS, device: Device): StyleType;
|
|
16
|
+
declare type CB_LAYOUT_PROP_ARRANGE_ENUM_VERTICAL = 'TOP' | 'MIDDLE' | 'BOTTOM';
|
|
17
|
+
declare type CB_LAYOUT_PROP_ARRANGE_ENUM_HORIZONTAL = 'LEFT' | 'CENTER' | 'RIGHT';
|
|
18
|
+
export declare type CB_LAYOUT_PROP_ARRANGE_SPECS = {
|
|
19
|
+
[CB_LAYOUT_PROP_ARRANGE_BASE_KEYS.CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL]: CB_LAYOUT_PROP_ARRANGE_ENUM_VERTICAL;
|
|
20
|
+
[CB_LAYOUT_PROP_ARRANGE_BASE_KEYS.CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL]: CB_LAYOUT_PROP_ARRANGE_ENUM_HORIZONTAL;
|
|
21
|
+
[CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS.CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL_MOBILE]?: CB_LAYOUT_PROP_ARRANGE_ENUM_VERTICAL;
|
|
22
|
+
[CB_LAYOUT_PROP_ARRANGE_EXTRA_KEYS.CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL_MOBILE]?: CB_LAYOUT_PROP_ARRANGE_ENUM_HORIZONTAL;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -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,21 @@
|
|
|
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
|
+
};
|
|
21
|
+
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 '../../../../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
|
+
};
|