pds-dev-kit-web 2.1.13 → 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.
- package/dist/src/common/assets/icons/line/SectionContent32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionContent40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionContentsCarousel32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionContentsCarousel40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionCustom32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionCustom40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionDivider32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionDivider40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionFooter32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionFooter40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionIframe32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionIframe40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionInfoBox32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionInfoBox40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionIntro32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionIntro40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionMap32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionMap40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionMembership32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionMembership40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionPriceBox32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionPriceBox40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionProductsCarousel32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionProductsCarousel40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionReview32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionReview40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionSlider32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionSlider40.js +1 -1
- package/dist/src/common/assets/icons/line/SectionTab32.js +1 -1
- package/dist/src/common/assets/icons/line/SectionTab40.js +1 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +1 -1
- package/dist/src/desktop/components/Slider/Slider.js +8 -1
- package/dist/src/mobile/components/Slider/Slider.js +8 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +1 -0
- 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 +6 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.js +24 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.js +8 -0
- 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 +70 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.js +52 -0
- 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/TwitterTimeline/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/index.js +8 -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 +4 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.js +9 -0
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +3 -0
- package/dist/src/sub/DynamicLayout/components/Section/CustomSection.d.ts +11 -0
- package/dist/src/sub/DynamicLayout/components/Section/CustomSection.js +46 -0
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.js +62 -0
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/Section/Section.d.ts +6 -3
- package/dist/src/sub/DynamicLayout/components/Section/Section.js +4 -2
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +72 -0
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +14 -0
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +119 -0
- package/dist/src/sub/DynamicLayout/components/Section/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/components/Section/index.js +3 -1
- package/dist/src/sub/DynamicLayout/components/Section/util/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/components/Section/util/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +38 -0
- package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +4 -1
- package/dist/src/sub/DynamicLayout/components/YouTubeIframe/YouTubeIframe.d.ts +6 -1
- package/dist/src/sub/DynamicLayout/components/YouTubeIframe/YouTubeIframe.js +35 -7
- package/dist/src/sub/DynamicLayout/components/index.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/components/index.js +2 -1
- package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/mock_customSection.js +837 -0
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +2082 -9
- package/dist/src/sub/DynamicLayout/nakedMocks.json +847 -0
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +379 -0
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +386 -0
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +29 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +193 -0
- 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 +9 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +50 -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 +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +76 -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/Divider.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +71 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +107 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/types.js +2 -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 +66 -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/Text.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +65 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +38 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +50 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/types.js +2 -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 +73 -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_AnimationObserverBox.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_AnimationObserverBox.js +27 -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/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.d.ts +11 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +102 -0
- 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 +12 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +35 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +21 -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/hooks/useRefDimensions.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useRefDimensions.js +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +71 -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 +40 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +200 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +50 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +13 -0
- 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 +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.js +22 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/isNullOrUndefined.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/isNullOrUndefined.js +9 -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 +23 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.js +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.d.ts +23 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseSectionPadding.js +26 -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/parseCustomSectionPlacement.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCustomSectionPlacement.js +24 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +67 -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 +92 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +23 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +94 -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 +95 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +85 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +27 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +77 -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 +94 -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 +47 -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 +58 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +91 -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 +77 -5
- package/package.json +2 -1
- package/release-note.md +3 -24
- package/webhook/node_modules/esrecurse/.babelrc +0 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import type { CB_CONTENT_PROP_CLINK } from '../types';
|
|
3
|
+
// import type { Link } from 'react-router-dom';
|
|
4
|
+
// function CLINKhandler({
|
|
5
|
+
// src,
|
|
6
|
+
// openNewTab,
|
|
7
|
+
// type
|
|
8
|
+
// }: {
|
|
9
|
+
// src: string;
|
|
10
|
+
// openNewTab: boolean;
|
|
11
|
+
// type: CB_CONTENT_PROP_CLINK['CB_CONTENT_PROP_CLINK_SPEC_TYPE'];
|
|
12
|
+
// }) {
|
|
13
|
+
// function onClickCLINK() {
|
|
14
|
+
// <Link />
|
|
15
|
+
// }
|
|
16
|
+
// return;
|
|
17
|
+
// }
|
|
18
|
+
// export default CLINKhandler;
|
package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ComponentBlock } from './ComponentBlock';
|
|
@@ -0,0 +1,8 @@
|
|
|
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.ComponentBlock = void 0;
|
|
7
|
+
var ComponentBlock_1 = require("./ComponentBlock");
|
|
8
|
+
Object.defineProperty(exports, "ComponentBlock", { enumerable: true, get: function () { return __importDefault(ComponentBlock_1).default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComponentBlock } from './ComponentBlock';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ComponentBlock = void 0;
|
|
4
|
+
var ComponentBlock_1 = require("./ComponentBlock");
|
|
5
|
+
Object.defineProperty(exports, "ComponentBlock", { enumerable: true, get: function () { return ComponentBlock_1.ComponentBlock; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIntersectionObserver } from './useIntersectionObserver';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIntersectionObserver = void 0;
|
|
4
|
+
var useIntersectionObserver_1 = require("./useIntersectionObserver");
|
|
5
|
+
Object.defineProperty(exports, "useIntersectionObserver", { enumerable: true, get: function () { return useIntersectionObserver_1.useIntersectionObserver; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
interface Args extends IntersectionObserverInit {
|
|
3
|
+
freezeOnceVisible?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useIntersectionObserver(elementRef: RefObject<Element>, { threshold, root, rootMargin, freezeOnceVisible }: Args): IntersectionObserverEntry | undefined;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIntersectionObserver = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
function useIntersectionObserver(elementRef, _a) {
|
|
6
|
+
var _b = _a.threshold, threshold = _b === void 0 ? 0 : _b, _c = _a.root, root = _c === void 0 ? null : _c, _d = _a.rootMargin, rootMargin = _d === void 0 ? '0%' : _d, _e = _a.freezeOnceVisible, freezeOnceVisible = _e === void 0 ? false : _e;
|
|
7
|
+
var _f = (0, react_1.useState)(), entry = _f[0], setEntry = _f[1];
|
|
8
|
+
var frozen = (entry === null || entry === void 0 ? void 0 : entry.isIntersecting) && freezeOnceVisible;
|
|
9
|
+
var updateEntry = function (_a) {
|
|
10
|
+
var entry = _a[0];
|
|
11
|
+
setEntry(entry);
|
|
12
|
+
};
|
|
13
|
+
(0, react_1.useEffect)(function () {
|
|
14
|
+
var node = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current; // DOM Ref
|
|
15
|
+
var hasIOSupport = !!window.IntersectionObserver;
|
|
16
|
+
if (!hasIOSupport || frozen || !node)
|
|
17
|
+
return;
|
|
18
|
+
var observerParams = { threshold: threshold, root: root, rootMargin: rootMargin };
|
|
19
|
+
var observer = new IntersectionObserver(updateEntry, observerParams);
|
|
20
|
+
observer.observe(node);
|
|
21
|
+
return function () { return observer.disconnect(); };
|
|
22
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
+
}, [elementRef === null || elementRef === void 0 ? void 0 : elementRef.current, JSON.stringify(threshold), root, rootMargin, frozen]);
|
|
24
|
+
return entry;
|
|
25
|
+
}
|
|
26
|
+
exports.useIntersectionObserver = useIntersectionObserver;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var useRefDimensions = function (ref) {
|
|
5
|
+
var _a = (0, react_1.useState)({ width: 0, height: 0 }), dimensions = _a[0], setDimensions = _a[1];
|
|
6
|
+
(0, react_1.useEffect)(function () {
|
|
7
|
+
if (!ref.current)
|
|
8
|
+
return;
|
|
9
|
+
var resizeObserver = new ResizeObserver(function (callback) {
|
|
10
|
+
var object = callback[0];
|
|
11
|
+
var _a = object.contentRect, width = _a.width, height = _a.height;
|
|
12
|
+
setDimensions({ width: width, height: height });
|
|
13
|
+
});
|
|
14
|
+
resizeObserver.observe(ref.current);
|
|
15
|
+
return function () { return resizeObserver.disconnect(); }; // clean u
|
|
16
|
+
}, [ref]);
|
|
17
|
+
return dimensions;
|
|
18
|
+
};
|
|
19
|
+
exports.default = useRefDimensions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CustomSection } from './CustomSection';
|
|
@@ -0,0 +1,8 @@
|
|
|
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.CustomSection = void 0;
|
|
7
|
+
var CustomSection_1 = require("./CustomSection");
|
|
8
|
+
Object.defineProperty(exports, "CustomSection", { enumerable: true, get: function () { return __importDefault(CustomSection_1).default; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BTNColorValueSetType } from '../components/ComponentBlock/componentBlocks/Button/btnTypes';
|
|
2
|
+
import type { BGOverlayValueSetType } from '../components/ComponentBlock/componentBlocks/RichText/types';
|
|
3
|
+
import type { BGColorValueSetType } from '../components/ComponentBlock/componentBlocks/Youtube/types';
|
|
4
|
+
import type { Device } from '../util/types';
|
|
5
|
+
import type { CSSProperties } from 'react';
|
|
6
|
+
declare type CBName = 'BTNCOLOR' | 'BGCOLOR' | 'BGOVERLAY';
|
|
7
|
+
declare type ExtractPropKey<T extends CBName> = Extract<T, CBName>;
|
|
8
|
+
declare type ValueSetType = BTNColorValueSetType & BGColorValueSetType & BGOverlayValueSetType;
|
|
9
|
+
export declare type ParseStyleColorProps<T> = {
|
|
10
|
+
availableSpecCodes: Array<keyof T>;
|
|
11
|
+
props: T;
|
|
12
|
+
propKey: ExtractPropKey<'BTNCOLOR'>;
|
|
13
|
+
device: Device;
|
|
14
|
+
} | {
|
|
15
|
+
availableSpecCodes: Array<keyof T>;
|
|
16
|
+
props: T;
|
|
17
|
+
propKey: ExtractPropKey<'BGCOLOR'>;
|
|
18
|
+
device: Device;
|
|
19
|
+
} | {
|
|
20
|
+
availableSpecCodes: Array<keyof T>;
|
|
21
|
+
props: T;
|
|
22
|
+
propKey: ExtractPropKey<'BGOVERLAY'>;
|
|
23
|
+
device: Device;
|
|
24
|
+
};
|
|
25
|
+
export declare function parseStyleColorToCSSProp<T>({ availableSpecCodes, props, propKey, device }: ParseStyleColorProps<T>): {
|
|
26
|
+
style: CSSProperties;
|
|
27
|
+
hoverStyle: CSSProperties;
|
|
28
|
+
};
|
|
29
|
+
export declare function getBtnColorStyles(value: ValueSetType, cbName: CBName): CSSProperties;
|
|
30
|
+
export declare function getLinearGradientStyles(value: ValueSetType, cbName: CBName): CSSProperties;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
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.getLinearGradientStyles = exports.getBtnColorStyles = exports.parseStyleColorToCSSProp = void 0;
|
|
15
|
+
function parseStyleColorToCSSProp(_a) {
|
|
16
|
+
var availableSpecCodes = _a.availableSpecCodes, props = _a.props, propKey = _a.propKey, device = _a.device;
|
|
17
|
+
var valueSet = availableSpecCodes.reduce(function (acc, currentKey) {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
var stringifiedKey = currentKey.toString();
|
|
20
|
+
var baseKey = device === 'DESKTOP' ? currentKey : stringifiedKey + ":MOBILE" || currentKey;
|
|
21
|
+
var keyWithHover = baseKey.toString() + ":HOVER";
|
|
22
|
+
var value = props[baseKey];
|
|
23
|
+
var hoverValue = props[keyWithHover];
|
|
24
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
25
|
+
return { normal: __assign(__assign({}, acc.normal), (_a = {}, _a[currentKey] = value, _a)), hover: __assign({}, acc.hover) };
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
normal: __assign(__assign({}, acc.normal), (_b = {}, _b[currentKey] = value, _b)),
|
|
29
|
+
hover: __assign(__assign({}, acc.hover), (_c = {}, _c[currentKey] = hoverValue, _c))
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
normal: {},
|
|
33
|
+
hover: {}
|
|
34
|
+
});
|
|
35
|
+
var style = getBtnColorStyles(valueSet.normal, propKey);
|
|
36
|
+
var hoverStyle = getBtnColorStyles(valueSet.hover, propKey);
|
|
37
|
+
return { style: style, hoverStyle: hoverStyle };
|
|
38
|
+
}
|
|
39
|
+
exports.parseStyleColorToCSSProp = parseStyleColorToCSSProp;
|
|
40
|
+
function getBtnColorStyles(value, cbName) {
|
|
41
|
+
if (value["CB_STYLE_PROP_" + cbName + "_SPEC_TYPE"] === 'NONE') {
|
|
42
|
+
return { backgroundColor: 'none' };
|
|
43
|
+
}
|
|
44
|
+
if (value["CB_STYLE_PROP_" + cbName + "_SPEC_TYPE"] === 'SOLID') {
|
|
45
|
+
var style = {
|
|
46
|
+
backgroundColor: value["CB_STYLE_PROP_" + cbName + "_SPEC_COLOR"]
|
|
47
|
+
};
|
|
48
|
+
return style;
|
|
49
|
+
}
|
|
50
|
+
return getLinearGradientStyles(value, cbName);
|
|
51
|
+
}
|
|
52
|
+
exports.getBtnColorStyles = getBtnColorStyles;
|
|
53
|
+
function getLinearGradientStyles(value, cbName) {
|
|
54
|
+
var angle = value["CB_STYLE_PROP_" + cbName + "_SPEC_ANGLE"];
|
|
55
|
+
var startColor = value["CB_STYLE_PROP_" + cbName + "_SPEC_STARTCOLOR"];
|
|
56
|
+
var startLoc = value["CB_STYLE_PROP_" + cbName + "_SPEC_STARTLOC"];
|
|
57
|
+
var endColor = value["CB_STYLE_PROP_" + cbName + "_SPEC_ENDCOLOR"];
|
|
58
|
+
var endLoc = value["CB_STYLE_PROP_" + cbName + "_SPEC_ENDLOC"];
|
|
59
|
+
if (value["CB_STYLE_PROP_" + cbName + "_SPEC_GRADIENT"] === 'LINEAR') {
|
|
60
|
+
var gradient = angle + "deg, " + startColor + " " + startLoc + "%, " + endColor + " " + endLoc + "%";
|
|
61
|
+
var style = { background: "linear-gradient(" + gradient + ")" };
|
|
62
|
+
return style;
|
|
63
|
+
}
|
|
64
|
+
if (value["CB_STYLE_PROP_" + cbName + "_SPEC_GRADIENT"] === 'RADIAL') {
|
|
65
|
+
var gradient = startColor + " " + startLoc + "%, " + endColor + " " + endLoc + "%";
|
|
66
|
+
var style = { background: "radial-gradient(" + gradient + ")" };
|
|
67
|
+
return style;
|
|
68
|
+
}
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
exports.getLinearGradientStyles = getLinearGradientStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
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.replaceUndefinedValues = exports.parseStyleTextToCSSProp = void 0;
|
|
7
|
+
var textUtil_1 = require("./textUtil");
|
|
8
|
+
Object.defineProperty(exports, "parseStyleTextToCSSProp", { enumerable: true, get: function () { return textUtil_1.parseStyleTextToCSSProp; } });
|
|
9
|
+
var replaceUndefinedValues_1 = require("./replaceUndefinedValues");
|
|
10
|
+
Object.defineProperty(exports, "replaceUndefinedValues", { enumerable: true, get: function () { return __importDefault(replaceUndefinedValues_1).default; } });
|
|
@@ -0,0 +1,40 @@
|
|
|
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 replaceUndefinedValues(jsonData) {
|
|
15
|
+
return Object.entries(jsonData).reduce(function (acc, cur) {
|
|
16
|
+
var _a;
|
|
17
|
+
var _b = cur, currentPropKey = _b[0], currentProps = _b[1];
|
|
18
|
+
var propKey = ['CB_STYLE_PROP', 'CB_EFFECT_PROP', 'CB_LAYOUT_PROP'];
|
|
19
|
+
var isIncludedPropKey = propKey.some(function (key) { return currentPropKey.includes(key); });
|
|
20
|
+
if (isIncludedPropKey) {
|
|
21
|
+
var specs = Object.keys(currentProps).reduce(function (accSpecs, curSpec) {
|
|
22
|
+
var isTargetNeedOverride = curSpec.endsWith(':MOBILE') &&
|
|
23
|
+
(currentProps[curSpec] === undefined || currentProps[curSpec] === null);
|
|
24
|
+
if (isTargetNeedOverride) {
|
|
25
|
+
var undefinedMobileKey = curSpec.replace(':MOBILE', '');
|
|
26
|
+
if (undefinedMobileKey in currentProps) {
|
|
27
|
+
accSpecs[curSpec] = currentProps[undefinedMobileKey];
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
accSpecs[curSpec] = currentProps[curSpec];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return __assign({}, accSpecs);
|
|
34
|
+
}, currentProps);
|
|
35
|
+
return __assign(__assign({}, acc), (_a = {}, _a[currentPropKey] = specs, _a));
|
|
36
|
+
}
|
|
37
|
+
return acc;
|
|
38
|
+
}, jsonData);
|
|
39
|
+
}
|
|
40
|
+
exports.default = replaceUndefinedValues;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Device } from '../util/types';
|
|
2
|
+
export declare function parseStyleTextToCSSProp<T>({ availableSpecCodes, props, propKey, device }: ParseStyleTextProps<T>): {
|
|
3
|
+
style: {};
|
|
4
|
+
hoverStyle: {};
|
|
5
|
+
};
|
|
6
|
+
declare type ParseStyleTextProps<T> = {
|
|
7
|
+
availableSpecCodes: Array<keyof T>;
|
|
8
|
+
props: T;
|
|
9
|
+
propKey: 'TEXT';
|
|
10
|
+
device: Device;
|
|
11
|
+
} | {
|
|
12
|
+
availableSpecCodes: Array<keyof T>;
|
|
13
|
+
props: T;
|
|
14
|
+
propKey: 'BTNTEXT';
|
|
15
|
+
device: Device;
|
|
16
|
+
};
|
|
17
|
+
export declare function getTextCSSPropKey(key: string, cbName: 'TEXT' | 'BTNTEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems";
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,200 @@
|
|
|
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.getTextCSSPropKey = exports.parseStyleTextToCSSProp = void 0;
|
|
15
|
+
function parseStyleTextToCSSProp(_a) {
|
|
16
|
+
var availableSpecCodes = _a.availableSpecCodes, props = _a.props, propKey = _a.propKey, device = _a.device;
|
|
17
|
+
return availableSpecCodes.reduce(function (acc, currentKey) {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
19
|
+
var stringifiedKey = currentKey.toString();
|
|
20
|
+
var keyWithDevice = device === 'DESKTOP' ? currentKey : stringifiedKey + ":MOBILE" || currentKey;
|
|
21
|
+
var keyWithHover = keyWithDevice.toString() + ":HOVER";
|
|
22
|
+
var cssPropertyKey = getTextCSSPropKey(stringifiedKey, propKey);
|
|
23
|
+
var value = props[keyWithDevice];
|
|
24
|
+
var hoverValue = props[keyWithHover];
|
|
25
|
+
if (cssPropertyKey === 'lineHeight') {
|
|
26
|
+
var numValue = typeof value === 'number' ? value / 100 : value;
|
|
27
|
+
var numHoverValue = typeof hoverValue === 'number' ? hoverValue / 100 : hoverValue;
|
|
28
|
+
if (numHoverValue === null || numHoverValue === undefined) {
|
|
29
|
+
return {
|
|
30
|
+
style: __assign(__assign({}, acc.style), (_a = {}, _a[cssPropertyKey] = numValue, _a)),
|
|
31
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
style: __assign(__assign({}, acc.style), (_b = {}, _b[cssPropertyKey] = numValue, _b)),
|
|
36
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_c = {}, _c[cssPropertyKey] = numHoverValue, _c))
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (cssPropertyKey === 'fontFamily') {
|
|
40
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
41
|
+
return {
|
|
42
|
+
style: __assign(__assign({}, acc.style), (_d = {}, _d[cssPropertyKey] = getFontName(String(value)), _d)),
|
|
43
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
style: __assign(__assign({}, acc.style), (_e = {}, _e[cssPropertyKey] = getFontName(String(value)), _e)),
|
|
48
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_f = {}, _f[cssPropertyKey] = getFontName(String(hoverValue)), _f))
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (cssPropertyKey === 'letterSpacing') {
|
|
52
|
+
var numValue = typeof value === 'number' ? Math.abs(+value) * (+value > 0 ? 0.01 : -0.01) + "em" : value;
|
|
53
|
+
var numHoverValue = typeof hoverValue === 'number'
|
|
54
|
+
? Math.abs(+hoverValue) * (+hoverValue > 0 ? 0.01 : -0.01) + "em"
|
|
55
|
+
: hoverValue;
|
|
56
|
+
if (numHoverValue === null || numHoverValue === undefined) {
|
|
57
|
+
return {
|
|
58
|
+
style: __assign(__assign({}, acc.style), (_g = {}, _g[cssPropertyKey] = numValue, _g)),
|
|
59
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
style: __assign(__assign({}, acc.style), (_h = {}, _h[cssPropertyKey] = numValue, _h)),
|
|
64
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_j = {}, _j[cssPropertyKey] = numHoverValue, _j))
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (cssPropertyKey === 'fontSize') {
|
|
68
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
69
|
+
return {
|
|
70
|
+
style: __assign(__assign({}, acc.style), (_k = {}, _k[cssPropertyKey] = value + "px", _k)),
|
|
71
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
style: __assign(__assign({}, acc.style), (_l = {}, _l[cssPropertyKey] = value + "px", _l)),
|
|
76
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_m = {}, _m[cssPropertyKey] = hoverValue + "px", _m))
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (cssPropertyKey === 'HORIZONTAL') {
|
|
80
|
+
var horizontalObj = getHorizontalPositionValue(String(value));
|
|
81
|
+
var hoverHorizontalObj = getHorizontalPositionValue(String(hoverValue));
|
|
82
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
83
|
+
return { style: __assign(__assign({}, acc.style), horizontalObj), hoverStyle: __assign({}, acc.hoverStyle) };
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
style: __assign(__assign({}, acc.style), horizontalObj),
|
|
87
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), hoverHorizontalObj)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
if (cssPropertyKey === 'alignItems') {
|
|
91
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
92
|
+
return {
|
|
93
|
+
style: __assign(__assign({}, acc.style), (_o = {}, _o[cssPropertyKey] = getVerticalPositionValue(String(value)), _o.display = 'flex', _o)),
|
|
94
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
style: __assign(__assign({}, acc.style), (_p = {}, _p[cssPropertyKey] = getVerticalPositionValue(String(value)), _p.display = 'flex', _p)),
|
|
99
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_q = {}, _q[cssPropertyKey] = getVerticalPositionValue(String(hoverValue)), _q))
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (hoverValue === null || hoverValue === undefined) {
|
|
103
|
+
return {
|
|
104
|
+
style: __assign(__assign({}, acc.style), (_r = {}, _r[cssPropertyKey] = value, _r)),
|
|
105
|
+
hoverStyle: __assign({}, acc.hoverStyle)
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
style: __assign(__assign({}, acc.style), (_s = {}, _s[cssPropertyKey] = value, _s)),
|
|
110
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_t = {}, _t[cssPropertyKey] = hoverValue, _t))
|
|
111
|
+
};
|
|
112
|
+
}, {
|
|
113
|
+
style: {},
|
|
114
|
+
hoverStyle: {}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
exports.parseStyleTextToCSSProp = parseStyleTextToCSSProp;
|
|
118
|
+
function getTextCSSPropKey(key, cbName) {
|
|
119
|
+
switch (key) {
|
|
120
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_COLOR":
|
|
121
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_COLOR:HOVER":
|
|
122
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_COLOR:MOBILE":
|
|
123
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_COLOR:MOBILE:HOVER":
|
|
124
|
+
return 'color';
|
|
125
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_TYPEFACE":
|
|
126
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_TYPEFACE:HOVER":
|
|
127
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_TYPEFACE:MOBILE":
|
|
128
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_TYPEFACE:MOBILE:HOVER":
|
|
129
|
+
return 'fontFamily';
|
|
130
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LETTERSPACING":
|
|
131
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LETTERSPACING:HOVER":
|
|
132
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LETTERSPACING:MOBILE":
|
|
133
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LETTERSPACING:MOBILE:HOVER":
|
|
134
|
+
return 'letterSpacing';
|
|
135
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LINEHEIGHT":
|
|
136
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LINEHEIGHT:HOVER":
|
|
137
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LINEHEIGHT:MOBILE":
|
|
138
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_LINEHEIGHT:MOBILE:HOVER":
|
|
139
|
+
return 'lineHeight';
|
|
140
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_SIZE":
|
|
141
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_SIZE:HOVER":
|
|
142
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_SIZE:MOBILE":
|
|
143
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_SIZE:MOBILE:HOVER":
|
|
144
|
+
return 'fontSize';
|
|
145
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_WEIGHT":
|
|
146
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_WEIGHT:HOVER":
|
|
147
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_WEIGHT:MOBILE":
|
|
148
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_WEIGHT:MOBILE:HOVER":
|
|
149
|
+
return 'fontWeight';
|
|
150
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_HORIZONTAL":
|
|
151
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_HORIZONTAL:HOVER":
|
|
152
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_HORIZONTAL:MOBILE":
|
|
153
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_HORIZONTAL:MOBILE:HOVER":
|
|
154
|
+
return 'HORIZONTAL';
|
|
155
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_VERTICAL":
|
|
156
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_VERTICAL:HOVER":
|
|
157
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_VERTICAL:MOBILE":
|
|
158
|
+
case "CB_STYLE_PROP_" + cbName + "_SPEC_VERTICAL:MOBILE:HOVER":
|
|
159
|
+
return 'alignItems';
|
|
160
|
+
default:
|
|
161
|
+
return '';
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.getTextCSSPropKey = getTextCSSPropKey;
|
|
165
|
+
function getFontName(value) {
|
|
166
|
+
switch (value) {
|
|
167
|
+
case 'SYSSANS':
|
|
168
|
+
return 'sans-serif';
|
|
169
|
+
case 'SYSSERIF':
|
|
170
|
+
return 'serif';
|
|
171
|
+
case 'PRETENDARD':
|
|
172
|
+
return 'Pretendard-Regular, sans-serif';
|
|
173
|
+
default:
|
|
174
|
+
return '';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function getHorizontalPositionValue(value) {
|
|
178
|
+
switch (value) {
|
|
179
|
+
case 'LEFT':
|
|
180
|
+
return { display: 'flex', justifyContent: 'flex-start', textAlign: 'left' };
|
|
181
|
+
case 'RIGHT':
|
|
182
|
+
return { display: 'flex', justifyContent: 'flex-end', textAlign: 'right' };
|
|
183
|
+
case 'CENTER':
|
|
184
|
+
return { display: 'flex', justifyContent: 'center', textAlign: 'center' };
|
|
185
|
+
default:
|
|
186
|
+
return {};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function getVerticalPositionValue(value) {
|
|
190
|
+
switch (value) {
|
|
191
|
+
case 'TOP':
|
|
192
|
+
return 'flex-start';
|
|
193
|
+
case 'BOTTOM':
|
|
194
|
+
return 'flex-end';
|
|
195
|
+
case 'MIDDLE':
|
|
196
|
+
return 'center';
|
|
197
|
+
default:
|
|
198
|
+
return '';
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { CB_BTN_PROPERTIES_TYPE, CB_DIVIDER_PROPERTIES_TYPE, CB_IMG_PROPERTIES_TYPE, CB_RICHTEXT_PROPERTIES_TYPE, CB_TEXT_PROPERTIES_TYPE, CB_TWITTER_PROPERTIES_TYPE, CB_YOUTUBE_PROPERTIES_TYPE } from './util/types';
|
|
2
|
+
export declare type CB_TYPES = 'GENERAL';
|
|
3
|
+
export declare type ComponentBlock = CB_TEXT_TYPE | CB_BTN_TYPE | CB_RICHTEXT | CB_DIVIDER | CB_IMG | CB_YOUTUBE | CB_TWITTER;
|
|
4
|
+
declare type GeneralCustomSectionType = {
|
|
5
|
+
id: number;
|
|
6
|
+
type: 'GENERAL';
|
|
7
|
+
availablePlugins: Array<string>;
|
|
8
|
+
queryableTapSrc: string;
|
|
9
|
+
queryableDefinitionPreset: string;
|
|
10
|
+
dynamicLayoutSectionId: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type AllCBProperties = CB_TEXT_PROPERTIES_TYPE | CB_BTN_PROPERTIES_TYPE | CB_RICHTEXT_PROPERTIES_TYPE | CB_RICHTEXT_PROPERTIES_TYPE | CB_DIVIDER_PROPERTIES_TYPE | CB_YOUTUBE_PROPERTIES_TYPE | CB_IMG_PROPERTIES_TYPE | CB_TWITTER_PROPERTIES_TYPE;
|
|
13
|
+
export declare type CB_TEXT_TYPE = GeneralCustomSectionType & {
|
|
14
|
+
componentBlockCode: CB_ALL_CODES.CB_TEXT;
|
|
15
|
+
properties: CB_TEXT_PROPERTIES_TYPE;
|
|
16
|
+
};
|
|
17
|
+
export declare type CB_BTN_TYPE = GeneralCustomSectionType & {
|
|
18
|
+
componentBlockCode: CB_ALL_CODES.CB_BTN;
|
|
19
|
+
properties: CB_BTN_PROPERTIES_TYPE;
|
|
20
|
+
};
|
|
21
|
+
export declare type CB_RICHTEXT = GeneralCustomSectionType & {
|
|
22
|
+
componentBlockCode: CB_ALL_CODES.CB_RICHTEXT;
|
|
23
|
+
properties: CB_RICHTEXT_PROPERTIES_TYPE;
|
|
24
|
+
};
|
|
25
|
+
export declare type CB_DIVIDER = GeneralCustomSectionType & {
|
|
26
|
+
componentBlockCode: CB_ALL_CODES.CB_DIVIDER;
|
|
27
|
+
properties: CB_DIVIDER_PROPERTIES_TYPE;
|
|
28
|
+
};
|
|
29
|
+
export declare type CB_IMG = GeneralCustomSectionType & {
|
|
30
|
+
componentBlockCode: CB_ALL_CODES.CB_IMG;
|
|
31
|
+
properties: CB_IMG_PROPERTIES_TYPE;
|
|
32
|
+
};
|
|
33
|
+
export declare type CB_YOUTUBE = GeneralCustomSectionType & {
|
|
34
|
+
componentBlockCode: CB_ALL_CODES.CB_YOUTUBE;
|
|
35
|
+
properties: CB_YOUTUBE_PROPERTIES_TYPE;
|
|
36
|
+
};
|
|
37
|
+
export declare type CB_TWITTER = GeneralCustomSectionType & {
|
|
38
|
+
componentBlockCode: CB_ALL_CODES.CB_TWITTER;
|
|
39
|
+
properties: CB_TWITTER_PROPERTIES_TYPE;
|
|
40
|
+
};
|
|
41
|
+
export declare enum CB_ALL_CODES {
|
|
42
|
+
CB_TEXT = "CB_TEXT",
|
|
43
|
+
CB_BTN = "CB_BTN",
|
|
44
|
+
CB_RICHTEXT = "CB_RICHTEXT",
|
|
45
|
+
CB_DIVIDER = "CB_DIVIDER",
|
|
46
|
+
CB_IMG = "CB_IMG",
|
|
47
|
+
CB_YOUTUBE = "CB_YOUTUBE",
|
|
48
|
+
CB_TWITTER = "CB_TWITTER"
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CB_ALL_CODES = void 0;
|
|
4
|
+
var CB_ALL_CODES;
|
|
5
|
+
(function (CB_ALL_CODES) {
|
|
6
|
+
CB_ALL_CODES["CB_TEXT"] = "CB_TEXT";
|
|
7
|
+
CB_ALL_CODES["CB_BTN"] = "CB_BTN";
|
|
8
|
+
CB_ALL_CODES["CB_RICHTEXT"] = "CB_RICHTEXT";
|
|
9
|
+
CB_ALL_CODES["CB_DIVIDER"] = "CB_DIVIDER";
|
|
10
|
+
CB_ALL_CODES["CB_IMG"] = "CB_IMG";
|
|
11
|
+
CB_ALL_CODES["CB_YOUTUBE"] = "CB_YOUTUBE";
|
|
12
|
+
CB_ALL_CODES["CB_TWITTER"] = "CB_TWITTER";
|
|
13
|
+
})(CB_ALL_CODES = exports.CB_ALL_CODES || (exports.CB_ALL_CODES = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
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.parseContentProperties = void 0;
|
|
7
|
+
var parseContentVisibility_1 = __importDefault(require("./parseContentVisibility"));
|
|
8
|
+
var types_1 = require("./types");
|
|
9
|
+
function parseContentProperties(namedProps, device) {
|
|
10
|
+
var name = namedProps.name;
|
|
11
|
+
switch (name) {
|
|
12
|
+
case types_1.CB_CONTENT_PROP_KEYS.CB_CONTENT_PROP_VISIBILITY:
|
|
13
|
+
return (0, parseContentVisibility_1.default)(namedProps, device);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.parseContentProperties = parseContentProperties;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Device, StyleType } from '../types';
|
|
2
|
+
import type { CB_CONTENT_PROP_KEYS } from './types';
|
|
3
|
+
export declare type CB_CONTENT_PROP_VISIBILITY_SPECS = {
|
|
4
|
+
CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
|
|
5
|
+
CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type NAMED_CB_CONTENT_VISIBILITY_PROPS = {
|
|
8
|
+
name: CB_CONTENT_PROP_KEYS.CB_CONTENT_PROP_VISIBILITY;
|
|
9
|
+
specs: CB_CONTENT_PROP_VISIBILITY_SPECS;
|
|
10
|
+
};
|
|
11
|
+
declare function parseContentVisibility(namedProps: NAMED_CB_CONTENT_VISIBILITY_PROPS, device: Device): StyleType;
|
|
12
|
+
export default parseContentVisibility;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function parseContentVisibility(namedProps, device) {
|
|
4
|
+
var specs = namedProps.specs;
|
|
5
|
+
if (device === 'DESKTOP') {
|
|
6
|
+
return {
|
|
7
|
+
style: {
|
|
8
|
+
visibility: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP ? 'visible' : 'hidden'
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
style: {
|
|
14
|
+
visibility: specs.CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB ? 'visible' : 'hidden'
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
exports.default = parseContentVisibility;
|