pds-dev-kit-web 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/styles/colorSet/index.d.ts +2 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- 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 -19
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WrapperDefaultOptions = void 0;
|
|
4
|
+
exports.WrapperDefaultOptions = {
|
|
5
|
+
width: 600,
|
|
6
|
+
height: 400,
|
|
7
|
+
alignHorizontal: 'center',
|
|
8
|
+
alignVertical: 'center',
|
|
9
|
+
paddingBottom: 20,
|
|
10
|
+
paddingLeft: 20,
|
|
11
|
+
paddingRight: 20,
|
|
12
|
+
paddingTop: 20,
|
|
13
|
+
zIndex: 0,
|
|
14
|
+
borderType: 'dotted',
|
|
15
|
+
borderSize: 5,
|
|
16
|
+
borderColor: 'dodgerblue',
|
|
17
|
+
borderRadius: 30,
|
|
18
|
+
backgroundType: 'gradient',
|
|
19
|
+
backgroundColor: 'gray',
|
|
20
|
+
backgroundGradientType: 'circular',
|
|
21
|
+
backgroundGradientStartColor: 'blue',
|
|
22
|
+
backgroundGradientStartPosition: 0,
|
|
23
|
+
backgroundGradientEndColor: 'lightblue',
|
|
24
|
+
backgroundGradientEndPosition: 100,
|
|
25
|
+
backgroundGradientDegree: 90,
|
|
26
|
+
shadowType: 'outside',
|
|
27
|
+
shadowColor: 'gray',
|
|
28
|
+
shadowHorizontalDistance: 15,
|
|
29
|
+
shadowVerticalDistance: 10,
|
|
30
|
+
shadowBlur: 3,
|
|
31
|
+
shadowSpread: 3,
|
|
32
|
+
opacity: 0.85
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Wrapper } from './Wrapper';
|
|
@@ -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.Wrapper = void 0;
|
|
7
|
+
var Wrapper_1 = require("./Wrapper");
|
|
8
|
+
Object.defineProperty(exports, "Wrapper", { enumerable: true, get: function () { return __importDefault(Wrapper_1).default; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitterTimeline = exports.Text = exports.RichText = void 0;
|
|
4
|
+
var RichText_1 = require("./RichText");
|
|
5
|
+
Object.defineProperty(exports, "RichText", { enumerable: true, get: function () { return RichText_1.RichText; } });
|
|
6
|
+
var Text_1 = require("./Text");
|
|
7
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
|
|
8
|
+
var TwitterTimeline_1 = require("./TwitterTimeline");
|
|
9
|
+
Object.defineProperty(exports, "TwitterTimeline", { enumerable: true, get: function () { return TwitterTimeline_1.TwitterTimeline; } });
|
package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js
CHANGED
|
@@ -36,6 +36,9 @@ function EditModeSectionMatcher(_a) {
|
|
|
36
36
|
exports.default = EditModeSectionMatcher;
|
|
37
37
|
function Matcher(_a) {
|
|
38
38
|
var props = __rest(_a, []);
|
|
39
|
+
if (props.type === 'CUSTOM') {
|
|
40
|
+
return (0, jsx_runtime_1.jsx)(sections_1.CustomSection, __assign({}, props), void 0);
|
|
41
|
+
}
|
|
39
42
|
var schema = props.manifest.schema;
|
|
40
43
|
switch (schema) {
|
|
41
44
|
case 'BASE_INTRO':
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
3
|
+
import type { ISection } from '../../types';
|
|
4
|
+
declare type SectionPropTypes = ISection & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
} & {
|
|
7
|
+
overrideStyles?: CSSProperties;
|
|
8
|
+
isMobile?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function CustomSection({ children, overrideStyles, isMobile, ...props }: SectionPropTypes): JSX.Element;
|
|
11
|
+
export default CustomSection;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
+
t[p[i]] = s[p[i]];
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
34
|
+
var CustomSectionBackground_1 = __importDefault(require("./components/CustomSectionBackground"));
|
|
35
|
+
var sectionContext_1 = require("./sectionContext");
|
|
36
|
+
function CustomSection(_a) {
|
|
37
|
+
var _b;
|
|
38
|
+
var children = _a.children, overrideStyles = _a.overrideStyles, _c = _a.isMobile, isMobile = _c === void 0 ? false : _c, props = __rest(_a, ["children", "overrideStyles", "isMobile"]);
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(sectionContext_1.sectionContext.Provider, __assign({ value: __assign({}, props) }, { children: (0, jsx_runtime_1.jsxs)(S_Section, __assign({ style: overrideStyles, isIframeSection: ((_b = props.manifest) === null || _b === void 0 ? void 0 : _b.schema) === 'EXP_IFRAME' }, { children: [(0, jsx_runtime_1.jsx)(CustomSectionBackground_1.default, { isMobile: isMobile }, void 0), children] }), void 0) }), void 0));
|
|
40
|
+
}
|
|
41
|
+
var S_Section = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n height: ", ";\n justify-content: center;\n position: relative;\n width: 100%;\n z-index: 0;\n"], ["\n align-items: center;\n box-sizing: border-box;\n display: flex;\n height: ", ";\n justify-content: center;\n position: relative;\n width: 100%;\n z-index: 0;\n"])), function (_a) {
|
|
42
|
+
var isIframeSection = _a.isIframeSection;
|
|
43
|
+
return (isIframeSection ? '100%' : 'auto');
|
|
44
|
+
});
|
|
45
|
+
exports.default = CustomSection;
|
|
46
|
+
var templateObject_1;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
declare type State = {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
9
|
+
constructor(props: Props);
|
|
10
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
11
|
+
static getDerivedStateFromError(): State;
|
|
12
|
+
reset(): void;
|
|
13
|
+
render(): React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
18
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
19
|
+
return cooked;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
/* eslint-disable react/destructuring-assignment */
|
|
27
|
+
/* eslint-disable no-console */
|
|
28
|
+
var react_1 = require("react");
|
|
29
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
30
|
+
var ErrorBoundary = /** @class */ (function (_super) {
|
|
31
|
+
__extends(ErrorBoundary, _super);
|
|
32
|
+
function ErrorBoundary(props) {
|
|
33
|
+
var _this = _super.call(this, props) || this;
|
|
34
|
+
_this.state = {
|
|
35
|
+
hasError: false
|
|
36
|
+
};
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
ErrorBoundary.prototype.componentDidCatch = function (error, errorInfo) {
|
|
40
|
+
console.error('Uncaught error:', error, errorInfo);
|
|
41
|
+
};
|
|
42
|
+
ErrorBoundary.getDerivedStateFromError = function () {
|
|
43
|
+
return { hasError: true };
|
|
44
|
+
};
|
|
45
|
+
ErrorBoundary.prototype.reset = function () {
|
|
46
|
+
this.setState({
|
|
47
|
+
hasError: false
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
ErrorBoundary.prototype.render = function () {
|
|
51
|
+
var hasError = this.state.hasError;
|
|
52
|
+
if (hasError) {
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(ErrorWrapper, { children: "Error" }, void 0);
|
|
54
|
+
}
|
|
55
|
+
var children = this.props.children;
|
|
56
|
+
return children;
|
|
57
|
+
};
|
|
58
|
+
return ErrorBoundary;
|
|
59
|
+
}(react_1.Component));
|
|
60
|
+
var ErrorWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n flex-direction: row;\n height: 100%;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: center;\n display: flex;\n flex-direction: row;\n height: 100%;\n justify-content: center;\n width: 100%;\n"])));
|
|
61
|
+
exports.default = ErrorBoundary;
|
|
62
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ErrorBoundary } from './ErrorBoundary';
|
|
@@ -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.ErrorBoundary = void 0;
|
|
7
|
+
var ErrorBoundary_1 = require("./ErrorBoundary");
|
|
8
|
+
Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return __importDefault(ErrorBoundary_1).default; } });
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import type { ISection } from '../../types';
|
|
3
|
-
declare
|
|
3
|
+
declare type SectionPropTypes = ISection & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
-
}
|
|
5
|
+
} & {
|
|
6
|
+
overrideStyles?: CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
declare function Section({ children, overrideStyles, ...props }: SectionPropTypes): JSX.Element;
|
|
6
9
|
export default Section;
|
|
@@ -36,8 +36,10 @@ var pdsOriginal_1 = require("../pdsOriginal");
|
|
|
36
36
|
var YouTubeIframe_1 = require("../YouTubeIframe");
|
|
37
37
|
var sectionContext_1 = require("./sectionContext");
|
|
38
38
|
function Section(_a) {
|
|
39
|
-
var
|
|
40
|
-
|
|
39
|
+
var _b;
|
|
40
|
+
var children = _a.children, overrideStyles = _a.overrideStyles, props = __rest(_a, ["children", "overrideStyles"]);
|
|
41
|
+
var _c = (0, react_1.useState)(false), isHover = _c[0], setIsHover = _c[1];
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(sectionContext_1.sectionContext.Provider, __assign({ value: __assign({}, props) }, { children: (0, jsx_runtime_1.jsxs)(S_Section, __assign({ style: overrideStyles, isIframeSection: ((_b = props.manifest) === null || _b === void 0 ? void 0 : _b.schema) === 'EXP_IFRAME', onMouseEnter: function () { return setIsHover(true); }, onMouseMove: function () { return !isHover && setIsHover(true); }, onMouseLeave: function () { return setIsHover(false); } }, { children: [(0, jsx_runtime_1.jsx)(Background, {}, void 0), children] }), void 0) }), void 0));
|
|
41
43
|
}
|
|
42
44
|
var S_Section = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n height: ", ";\n position: relative;\n width: 100%;\n z-index: 0;\n"], ["\n box-sizing: border-box;\n height: ", ";\n position: relative;\n width: 100%;\n z-index: 0;\n"])), function (_a) {
|
|
43
45
|
var isIframeSection = _a.isIframeSection;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
+
var react_1 = require("react");
|
|
23
|
+
var util_1 = require("../../../../DynamicLayout/sections/CustomSection/util");
|
|
24
|
+
var isNullOrUndefined_1 = __importDefault(require("../../../../DynamicLayout/sections/CustomSection/util/isNullOrUndefined"));
|
|
25
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
26
|
+
var sectionContext_1 = require("../sectionContext");
|
|
27
|
+
var CustomSectionBackgroundMedia_1 = require("./CustomSectionBackgroundMedia");
|
|
28
|
+
function CustomSectionBackground(_a) {
|
|
29
|
+
var _b = _a.isMobile, isMobile = _b === void 0 ? false : _b;
|
|
30
|
+
var context = (0, react_1.useContext)(sectionContext_1.sectionContext);
|
|
31
|
+
var id = context.id, jsonProperties = context.jsonProperties;
|
|
32
|
+
var backgroundRef = (0, react_1.useRef)(null);
|
|
33
|
+
var _c = jsonProperties || {}, CB_STYLE_PROP_BGOVERLAY = _c.CB_STYLE_PROP_BGOVERLAY, CB_STYLE_PROP_BGMEDIA = _c.CB_STYLE_PROP_BGMEDIA;
|
|
34
|
+
var _d = (0, util_1.parseJsonProperties)(jsonProperties, isMobile ? 'MOBILE' : 'DESKTOP'), style = _d.style, overlayStyle = _d.overlayStyle, effect = _d.effect;
|
|
35
|
+
var isOverlay = getIsOverlay(isMobile, CB_STYLE_PROP_BGOVERLAY);
|
|
36
|
+
var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
|
|
37
|
+
var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isOverlay && CB_STYLE_PROP_BGOVERLAY && ((0, jsx_runtime_1.jsx)(S_CustomBackgroundOverlay, { className: "Overlay", style: __assign({}, overlayStyle) }, void 0)), (0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ className: "CustomSection", ref: backgroundRef, style: __assign(__assign({}, effect), { background: style.background }) }, { children: isBgMedia && CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: CB_STYLE_PROP_BGMEDIA, componentStyle: style, playerId: id, mediaType: mediaType || 'NONE', device: isMobile ? 'MOBILE' : 'DESKTOP', backgroundRef: backgroundRef }, void 0)) }), void 0)] }, void 0));
|
|
39
|
+
}
|
|
40
|
+
function getIsOverlay(isMobile, specs) {
|
|
41
|
+
if (!specs) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (isMobile) {
|
|
45
|
+
return specs['CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
46
|
+
}
|
|
47
|
+
return specs.CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE !== 'NONE';
|
|
48
|
+
}
|
|
49
|
+
function getIsBgMedia(isMobile, specs) {
|
|
50
|
+
if (!specs) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (isMobile) {
|
|
54
|
+
return specs['CB_STYLE_PROP_BGMEDIA_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
55
|
+
}
|
|
56
|
+
return specs.CB_STYLE_PROP_BGMEDIA_SPEC_TYPE !== 'NONE';
|
|
57
|
+
}
|
|
58
|
+
function getMediaType(isMobile, specs) {
|
|
59
|
+
if (!specs) {
|
|
60
|
+
return 'NONE';
|
|
61
|
+
}
|
|
62
|
+
if (isMobile) {
|
|
63
|
+
return (0, isNullOrUndefined_1.default)(specs['CB_STYLE_PROP_BGMEDIA_SPEC_TYPE:MOBILE'])
|
|
64
|
+
? specs.CB_STYLE_PROP_BGMEDIA_SPEC_TYPE
|
|
65
|
+
: specs['CB_STYLE_PROP_BGMEDIA_SPEC_TYPE:MOBILE'];
|
|
66
|
+
}
|
|
67
|
+
return specs.CB_STYLE_PROP_BGMEDIA_SPEC_TYPE;
|
|
68
|
+
}
|
|
69
|
+
var S_CustomBackgroundWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -2;\n"], ["\n align-items: center;\n bottom: 0;\n display: flex;\n justify-content: center;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -2;\n"])));
|
|
70
|
+
var S_CustomBackgroundOverlay = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -1;\n"], ["\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n z-index: -1;\n"])));
|
|
71
|
+
exports.default = CustomSectionBackground;
|
|
72
|
+
var templateObject_1, templateObject_2;
|
package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { CSSProperties } from 'styled-components';
|
|
3
|
+
import type { Device } from '../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
4
|
+
import type { CB_STYLE_PROP_BGMEDIA_SPECS } from '../../../../DynamicLayout/types';
|
|
5
|
+
declare type Props = {
|
|
6
|
+
specs: CB_STYLE_PROP_BGMEDIA_SPECS;
|
|
7
|
+
playerId: number;
|
|
8
|
+
mediaType: string;
|
|
9
|
+
componentStyle: CSSProperties;
|
|
10
|
+
device: Device;
|
|
11
|
+
backgroundRef: MutableRefObject<HTMLDivElement | null>;
|
|
12
|
+
};
|
|
13
|
+
export declare function CustomSectionBackgroundMedia({ specs, playerId, mediaType, componentStyle, device, backgroundRef }: Props): JSX.Element;
|
|
14
|
+
export {};
|
package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.CustomSectionBackgroundMedia = void 0;
|
|
38
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
|
+
var react_1 = require("react");
|
|
40
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
41
|
+
var YouTubeIframe_1 = require("../../YouTubeIframe");
|
|
42
|
+
var util_1 = require("../util");
|
|
43
|
+
function CustomSectionBackgroundMedia(_a) {
|
|
44
|
+
var specs = _a.specs, playerId = _a.playerId, mediaType = _a.mediaType, componentStyle = _a.componentStyle, device = _a.device, backgroundRef = _a.backgroundRef;
|
|
45
|
+
var _b = (0, util_1.parseSectionBackgroundMediaData)(specs, device), CB_STYLE_PROP_BGMEDIA_SPEC_YSRC = _b.CB_STYLE_PROP_BGMEDIA_SPEC_YSRC, CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY = _b.CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY, CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME, CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME = _b.CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR = _b.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR;
|
|
46
|
+
var _c = (0, react_1.useState)({ width: 0, height: 0 }), youtubeSize = _c[0], setYoutubeSize = _c[1];
|
|
47
|
+
var getResponsiveYoutubeSize = (0, react_1.useCallback)(function () {
|
|
48
|
+
var backgroundWrapper = backgroundRef.current;
|
|
49
|
+
if (!backgroundWrapper)
|
|
50
|
+
return { width: 0, height: 0 };
|
|
51
|
+
var backgroundSize = {
|
|
52
|
+
width: backgroundWrapper.getBoundingClientRect().width,
|
|
53
|
+
height: backgroundWrapper.getBoundingClientRect().height
|
|
54
|
+
};
|
|
55
|
+
var isHorizontal = backgroundSize.width / backgroundSize.height > 1;
|
|
56
|
+
var isOverRatio = backgroundSize.width / backgroundSize.height > 16 / 9;
|
|
57
|
+
var youtubeSize = isHorizontal && isOverRatio
|
|
58
|
+
? { width: backgroundSize.width, height: backgroundSize.width * (9 / 16) }
|
|
59
|
+
: { width: backgroundSize.height * (16 / 9), height: backgroundSize.height };
|
|
60
|
+
return youtubeSize;
|
|
61
|
+
}, [backgroundRef.current]);
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
if (mediaType !== 'YOUTUBE')
|
|
64
|
+
return;
|
|
65
|
+
setYoutubeSize(getResponsiveYoutubeSize());
|
|
66
|
+
}, [getResponsiveYoutubeSize, CB_STYLE_PROP_BGMEDIA_SPEC_YSRC]);
|
|
67
|
+
(0, react_1.useEffect)(function () {
|
|
68
|
+
if (mediaType !== 'YOUTUBE')
|
|
69
|
+
return;
|
|
70
|
+
function onResize() {
|
|
71
|
+
setYoutubeSize(getResponsiveYoutubeSize());
|
|
72
|
+
}
|
|
73
|
+
var element = backgroundRef.current;
|
|
74
|
+
if (!element)
|
|
75
|
+
return;
|
|
76
|
+
var observer = new ResizeObserver(function (entries) {
|
|
77
|
+
entries.forEach(function () {
|
|
78
|
+
onResize();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
observer.observe(element);
|
|
82
|
+
return function () {
|
|
83
|
+
observer.disconnect();
|
|
84
|
+
};
|
|
85
|
+
}, [device, specs, playerId, mediaType]);
|
|
86
|
+
if ('background' in componentStyle) {
|
|
87
|
+
delete componentStyle.background;
|
|
88
|
+
}
|
|
89
|
+
switch (mediaType) {
|
|
90
|
+
case 'IMAGE':
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR && ((0, jsx_runtime_1.jsx)(S_Image, __assign({ src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), normalStyle: componentStyle }, { children: (0, jsx_runtime_1.jsx)("img", { src: String(CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR), style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0)) }, void 0));
|
|
92
|
+
case 'YOUTUBE':
|
|
93
|
+
return ((0, jsx_runtime_1.jsx)(S_YoutubeContainer, __assign({}, youtubeSize, { children: youtubeSize.height > 0 && youtubeSize.width > 0 && ((0, jsx_runtime_1.jsx)(YouTubeIframe_1.YouTubeIframe, { id: playerId, src: String(CB_STYLE_PROP_BGMEDIA_SPEC_YSRC), loopMode: CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY ? 'use' : 'none', startSeconds: Number(CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME), endSeconds: Number(CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME), customHeight: youtubeSize.height, customWidth: youtubeSize.width }, void 0)) }), void 0));
|
|
94
|
+
case 'NONE':
|
|
95
|
+
default:
|
|
96
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.CustomSectionBackgroundMedia = CustomSectionBackgroundMedia;
|
|
100
|
+
var S_Image = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n & img {\n ", ";\n }\n"], ["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n & img {\n ", ";\n }\n"])), function (_a) {
|
|
101
|
+
var src = _a.src;
|
|
102
|
+
return "url(" + src + ")";
|
|
103
|
+
}, function (_a) {
|
|
104
|
+
var normalStyle = _a.normalStyle;
|
|
105
|
+
var isContain = normalStyle.backgroundSize === 'contain';
|
|
106
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, normalStyle), { backgroundPosition: isContain ? 'center' : normalStyle.backgroundPosition }));
|
|
107
|
+
}, function (_a) {
|
|
108
|
+
var normalStyle = _a.normalStyle;
|
|
109
|
+
var isContain = normalStyle.backgroundSize === 'contain';
|
|
110
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
|
|
111
|
+
});
|
|
112
|
+
var S_YoutubeContainer = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n"], ["\n height: ", ";\n width: ", ";\n"])), function (_a) {
|
|
113
|
+
var height = _a.height;
|
|
114
|
+
return height + "px";
|
|
115
|
+
}, function (_a) {
|
|
116
|
+
var width = _a.width;
|
|
117
|
+
return width + "px";
|
|
118
|
+
});
|
|
119
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.sectionContext = exports.Section = void 0;
|
|
6
|
+
exports.sectionContext = exports.Section = exports.CustomSection = void 0;
|
|
7
|
+
var CustomSection_1 = require("./CustomSection");
|
|
8
|
+
Object.defineProperty(exports, "CustomSection", { enumerable: true, get: function () { return __importDefault(CustomSection_1).default; } });
|
|
7
9
|
var Section_1 = require("./Section");
|
|
8
10
|
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return __importDefault(Section_1).default; } });
|
|
9
11
|
var sectionContext_1 = require("./sectionContext");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as parseSectionBackgroundMediaData } from './parseSectionBackgroundMediaData';
|
|
@@ -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.parseSectionBackgroundMediaData = void 0;
|
|
7
|
+
var parseSectionBackgroundMediaData_1 = require("./parseSectionBackgroundMediaData");
|
|
8
|
+
Object.defineProperty(exports, "parseSectionBackgroundMediaData", { enumerable: true, get: function () { return __importDefault(parseSectionBackgroundMediaData_1).default; } });
|
package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Device } from '../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
2
|
+
import type { CB_STYLE_PROP_BGMEDIA_SPECS } from '../../../../DynamicLayout/types';
|
|
3
|
+
declare type SpecKeys = keyof Omit<CB_STYLE_PROP_BGMEDIA_SPECS, 'CB_STYLE_PROP_BGMEDIA_SPEC_MPLAY'>;
|
|
4
|
+
declare type ValueSetType = Partial<Record<SpecKeys, string | number | boolean | undefined>>;
|
|
5
|
+
export default function UseCustomSectionBackgroundMediaData(specs: CB_STYLE_PROP_BGMEDIA_SPECS, device: Device): ValueSetType;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var isNullOrUndefined_1 = __importDefault(require("../../../../DynamicLayout/sections/CustomSection/util/isNullOrUndefined"));
|
|
18
|
+
var AVAILABLE_SPECS = [
|
|
19
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_YSRC',
|
|
20
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_TYPE',
|
|
21
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL',
|
|
22
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME',
|
|
23
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY',
|
|
24
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT',
|
|
25
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION',
|
|
26
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR',
|
|
27
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT',
|
|
28
|
+
'CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME'
|
|
29
|
+
];
|
|
30
|
+
function UseCustomSectionBackgroundMediaData(specs, device) {
|
|
31
|
+
return AVAILABLE_SPECS.reduce(function (acc, cur) {
|
|
32
|
+
var _a;
|
|
33
|
+
var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
|
|
34
|
+
var value = (0, isNullOrUndefined_1.default)(specs[baseKey]) ? specs[cur] : specs[baseKey];
|
|
35
|
+
return __assign(__assign({}, acc), (_a = {}, _a[cur] = value, _a));
|
|
36
|
+
}, {});
|
|
37
|
+
}
|
|
38
|
+
exports.default = UseCustomSectionBackgroundMediaData;
|
|
@@ -26,6 +26,9 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
26
26
|
var sections_1 = require("../../sections");
|
|
27
27
|
function SectionMatcher(_a) {
|
|
28
28
|
var props = __rest(_a, []);
|
|
29
|
+
if (props.type === 'CUSTOM') {
|
|
30
|
+
return (0, jsx_runtime_1.jsx)(sections_1.CustomSection, __assign({}, props), void 0);
|
|
31
|
+
}
|
|
29
32
|
var schema = props.manifest.schema;
|
|
30
33
|
switch (schema) {
|
|
31
34
|
case 'BASE_INTRO':
|
|
@@ -43,7 +46,7 @@ function SectionMatcher(_a) {
|
|
|
43
46
|
case 'PRG_MEMBERSHIP_DISPLAY':
|
|
44
47
|
return (0, jsx_runtime_1.jsx)(sections_1.NormalTypeMembershipSection, __assign({}, props), void 0);
|
|
45
48
|
default:
|
|
46
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
49
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: Schema NOT FOUND" }, void 0);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
exports.default = SectionMatcher;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
declare type Props = {
|
|
3
3
|
id: number;
|
|
4
4
|
src: string;
|
|
5
|
+
loopMode?: 'use' | 'none';
|
|
6
|
+
startSeconds?: number;
|
|
7
|
+
endSeconds?: number;
|
|
8
|
+
customHeight?: number;
|
|
9
|
+
customWidth?: number;
|
|
5
10
|
};
|
|
6
|
-
declare function YouTubeIframe({ id, src }: Props): JSX.Element;
|
|
11
|
+
declare function YouTubeIframe({ id, src, loopMode, startSeconds, endSeconds, customHeight, customWidth }: Props): JSX.Element;
|
|
7
12
|
export default YouTubeIframe;
|