pds-dev-kit-web-test 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/Image.js +46 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Image/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.d.ts +2 -3
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/RichText.js +3 -3
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/RichText/index.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.d.ts +13 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/Text.js +63 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Text/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.d.ts +3 -11
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimeline.js +18 -18
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.d.ts +14 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/TwitterTimeline/TwitterTimelineRerender.js +41 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.d.ts +35 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/Wrapper.js +141 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/constants.js +33 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/Wrapper/index.js +8 -0
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.d.ts +3 -2
- package/dist/src/sub/DynamicLayout/components/ComponentBlocks/index.js +3 -1
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +3 -3
- package/dist/src/sub/DynamicLayout/components/Section/Section.d.ts +6 -3
- package/dist/src/sub/DynamicLayout/components/Section/Section.js +40 -8
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +9 -0
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +68 -0
- package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +4 -4
- package/dist/src/sub/DynamicLayout/components/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/components/index.js +1 -6
- package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/mock_customSection.js +838 -0
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +5 -210
- package/dist/src/sub/DynamicLayout/nakedMocks.json +783 -0
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +17 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +2 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +85 -51
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +55 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +70 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +73 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +68 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider.js +66 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image.d.ts +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image.js +102 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +62 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.d.ts +44 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text.d.ts +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text.js +58 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter.d.ts +10 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +69 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/parseYoutubeContentProp.js +33 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.d.ts +48 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{BlockMatcher/blocks/Button.js → components/ComponentBlock/componentBlocks/components/S_CB_Box.js} +6 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.js +13 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +24 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.d.ts +0 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/utils/CLINKhandler.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/index.js +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/index.js +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +26 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +31 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.js +66 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/index.js +10 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.js +79 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +50 -81
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +11 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/index.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.d.ts +12 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/parseContentVisibility.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/contentPropParsers/types.js +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.d.ts +4 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/constants.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/index.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.js +51 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/types.js +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/index.js +18 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/index.js +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.d.ts +24 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropArrange.js +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +21 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.js +32 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/types.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.js +61 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +20 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.js +54 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/index.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgColor.js +58 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgImage.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.d.ts +43 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay.js +64 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +38 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.js +73 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +26 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.js +65 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.d.ts +19 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropImage.js +118 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.d.ts +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropOpacity.js +41 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.d.ts +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +46 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +39 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +80 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +22 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +16 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +134 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/index.js +3 -1
- package/dist/src/sub/DynamicLayout/types.d.ts +70 -4
- package/package.json +2 -3
- package/release-note.md +2 -2
- package/dist/src/sub/DynamicLayout/components/Box.d.ts +0 -13
- package/dist/src/sub/DynamicLayout/components/Box.js +0 -73
- package/dist/src/sub/DynamicLayout/custonSectionSampleData.d.ts +0 -218
- package/dist/src/sub/DynamicLayout/custonSectionSampleData.js +0 -198
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.d.ts +0 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/BlockMatcher.js +0 -71
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Accordion.js +0 -46
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionBody.js +0 -74
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.d.ts +0 -13
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionCore.js +0 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionHeader.js +0 -49
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/AccordionItem.js +0 -19
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.d.ts +0 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/AccordionCore/index.js +0 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Button.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Divider.js +0 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Image.js +0 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Instagram.js +0 -19
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/RichText.js +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Text.js +0 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Twitter.js +0 -30
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/Youtube.js +0 -38
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/blocks/index.js +0 -24
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/BlockMatcher/index.js +0 -8
|
@@ -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;
|
|
@@ -31,24 +31,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
33
|
var react_1 = require("react");
|
|
34
|
+
var util_1 = require("../../../DynamicLayout/sections/CustomSection/util");
|
|
34
35
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
35
36
|
var pdsOriginal_1 = require("../pdsOriginal");
|
|
36
37
|
var YouTubeIframe_1 = require("../YouTubeIframe");
|
|
38
|
+
var CustomSectionBackgroundMedia_1 = require("./components/CustomSectionBackgroundMedia");
|
|
37
39
|
var sectionContext_1 = require("./sectionContext");
|
|
38
40
|
function Section(_a) {
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
+
var _b;
|
|
42
|
+
var children = _a.children, overrideStyles = _a.overrideStyles, props = __rest(_a, ["children", "overrideStyles"]);
|
|
43
|
+
var _c = (0, react_1.useState)(false), isHover = _c[0], setIsHover = _c[1];
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(sectionContext_1.sectionContext.Provider, __assign({ value: 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, { isHover: isHover }, void 0), children] }), void 0) }), void 0));
|
|
41
45
|
}
|
|
42
46
|
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
47
|
var isIframeSection = _a.isIframeSection;
|
|
44
48
|
return (isIframeSection ? '100%' : 'auto');
|
|
45
49
|
});
|
|
46
|
-
function Background() {
|
|
50
|
+
function Background(_a) {
|
|
51
|
+
var isHover = _a.isHover;
|
|
47
52
|
var context = (0, react_1.useContext)(sectionContext_1.sectionContext);
|
|
48
|
-
var id = context.id;
|
|
49
|
-
var
|
|
53
|
+
var id = context.id, jsonProperties = context.jsonProperties;
|
|
54
|
+
var _b = context.styles, backgroundMediaSrc = _b.backgroundMediaSrc, backgroundColorInHex = _b.backgroundColorInHex, backgroundOverlayColorInHex = _b.backgroundOverlayColorInHex, backgroundMediaType = _b.backgroundMediaType;
|
|
50
55
|
var backgroundRef = (0, react_1.useRef)(null);
|
|
51
|
-
var
|
|
56
|
+
var backgroundOverlayRef = (0, react_1.useRef)(null);
|
|
57
|
+
var _c = (0, react_1.useState)({ width: 0, height: 0 }), youtubeSize = _c[0], setYoutubeSize = _c[1];
|
|
52
58
|
var getResponsiveYoutubeSize = (0, react_1.useCallback)(function () {
|
|
53
59
|
var backgroundWrapper = backgroundRef.current;
|
|
54
60
|
if (!backgroundWrapper)
|
|
@@ -88,6 +94,24 @@ function Background() {
|
|
|
88
94
|
observer.disconnect();
|
|
89
95
|
};
|
|
90
96
|
}, []);
|
|
97
|
+
(0, react_1.useEffect)(function () {
|
|
98
|
+
var sectionElement = backgroundRef.current;
|
|
99
|
+
var sectionOverlayElement = backgroundOverlayRef.current;
|
|
100
|
+
if (sectionElement && style && hoverStyle) {
|
|
101
|
+
if ('background' in style && 'background' in hoverStyle) {
|
|
102
|
+
sectionElement.style.background = isHover
|
|
103
|
+
? hoverStyle.background
|
|
104
|
+
: style.background;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (sectionOverlayElement && overlayStyle && overlayHoverStyle) {
|
|
108
|
+
if ('background' in overlayStyle && 'background' in overlayHoverStyle) {
|
|
109
|
+
sectionOverlayElement.style.background = isHover
|
|
110
|
+
? overlayHoverStyle.background
|
|
111
|
+
: overlayStyle.background;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, [isHover]);
|
|
91
115
|
var backgroundMedia = (0, react_1.useMemo)(function () {
|
|
92
116
|
switch (backgroundMediaType) {
|
|
93
117
|
case 'IMAGE':
|
|
@@ -101,7 +125,13 @@ function Background() {
|
|
|
101
125
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
102
126
|
}
|
|
103
127
|
}, [youtubeSize, id, backgroundMediaType, backgroundMediaSrc]);
|
|
104
|
-
|
|
128
|
+
if (!jsonProperties) {
|
|
129
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_BackgroundWrapper, __assign({ ref: backgroundRef, color: backgroundColorInHex }, { children: backgroundMediaSrc && backgroundMedia }), void 0), (0, jsx_runtime_1.jsx)(S_BackgroundOverlay, { color: backgroundOverlayColorInHex }, void 0)] }, void 0));
|
|
130
|
+
}
|
|
131
|
+
var _d = (0, util_1.parseJsonProperties)(jsonProperties, 'DESKTOP'), style = _d.style, hoverStyle = _d.hoverStyle, overlayStyle = _d.overlayStyle, overlayHoverStyle = _d.overlayHoverStyle, layout = _d.layout, effect = _d.effect;
|
|
132
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_CustomBackgroundWrapper, __assign({ className: "CustomSection", ref: backgroundRef, style: __assign(__assign(__assign(__assign({}, layout), effect), style), { visibility: isHover ? hoverStyle.visibility : style.visibility }) }, { children: jsonProperties.CB_STYLE_PROP_BGMEDIA && ((0, jsx_runtime_1.jsx)(CustomSectionBackgroundMedia_1.CustomSectionBackgroundMedia, { specs: jsonProperties.CB_STYLE_PROP_BGMEDIA, playerId: id, mediaType: isHover
|
|
133
|
+
? jsonProperties.CB_STYLE_PROP_BGMEDIA.CB_STYLE_PROP_BGMEDIA_SPEC_TYPE
|
|
134
|
+
: jsonProperties.CB_STYLE_PROP_BGMEDIA['CB_STYLE_PROP_BGMEDIA_SPEC_TYPE:HOVER'] }, void 0)) }), void 0), (0, jsx_runtime_1.jsx)(S_CustomBackgroundOverlay, { className: "Overlay", ref: backgroundOverlayRef }, void 0)] }, void 0));
|
|
105
135
|
}
|
|
106
136
|
var S_BackgroundWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\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 background-color: ", ";\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"])), function (_a) {
|
|
107
137
|
var color = _a.color;
|
|
@@ -118,5 +148,7 @@ var S_YoutubeContainer = styled_components_1.default.div(templateObject_4 || (te
|
|
|
118
148
|
var width = _a.width;
|
|
119
149
|
return width + "px";
|
|
120
150
|
});
|
|
151
|
+
var S_CustomBackgroundWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __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"])));
|
|
152
|
+
var S_CustomBackgroundOverlay = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __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"])));
|
|
121
153
|
exports.default = Section;
|
|
122
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
154
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CB_STYLE_PROP_BGMEDIA_SPECS } from '../../../../DynamicLayout/types';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
specs: CB_STYLE_PROP_BGMEDIA_SPECS;
|
|
5
|
+
playerId: number;
|
|
6
|
+
mediaType: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function CustomSectionBackgroundMedia({ specs, playerId, mediaType }: Props): JSX.Element;
|
|
9
|
+
export {};
|
package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
exports.CustomSectionBackgroundMedia = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
24
|
+
var react_1 = require("react");
|
|
25
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
26
|
+
var pdsOriginal_1 = require("../../pdsOriginal");
|
|
27
|
+
var YouTubeIframe_1 = require("../../YouTubeIframe");
|
|
28
|
+
function CustomSectionBackgroundMedia(_a) {
|
|
29
|
+
var specs = _a.specs, playerId = _a.playerId, mediaType = _a.mediaType;
|
|
30
|
+
var CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME = specs.CB_STYLE_PROP_BGMEDIA_SPEC_ENDTIME, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT = specs.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION = specs.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEPOSITION, CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR = specs.CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR, CB_STYLE_PROP_BGMEDIA_SPEC_MPLAY = specs.CB_STYLE_PROP_BGMEDIA_SPEC_MPLAY, CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY = specs.CB_STYLE_PROP_BGMEDIA_SPEC_REPLAY, CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL = specs.CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL, CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME = specs.CB_STYLE_PROP_BGMEDIA_SPEC_STARTTIME, CB_STYLE_PROP_BGMEDIA_SPEC_YSRC = specs.CB_STYLE_PROP_BGMEDIA_SPEC_YSRC;
|
|
31
|
+
var scaleType = (0, react_1.useMemo)(function () {
|
|
32
|
+
switch (CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT) {
|
|
33
|
+
case 'FILL':
|
|
34
|
+
return 'fill';
|
|
35
|
+
case 'CONTAIN':
|
|
36
|
+
return 'contain';
|
|
37
|
+
case 'COVER':
|
|
38
|
+
return 'cover';
|
|
39
|
+
case 'NONE':
|
|
40
|
+
return 'none';
|
|
41
|
+
default:
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}, [CB_STYLE_PROP_BGMEDIA_SPEC_IMAGEFIT]);
|
|
45
|
+
switch (mediaType) {
|
|
46
|
+
case 'IMAGE':
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ isOverflowScroll: CB_STYLE_PROP_BGMEDIA_SPEC_SCROLL, scaleType: scaleType }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: CB_STYLE_PROP_BGMEDIA_SPEC_IMAGESELECTOR, width: "responsive", height: "responsive", scaleType: scaleType, shapeType: "rectangle" }, void 0) }), void 0));
|
|
48
|
+
case 'YOUTUBE':
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(S_YoutubeContainer, { children: (0, jsx_runtime_1.jsx)(YouTubeIframe_1.YouTubeIframe, { id: playerId, src: CB_STYLE_PROP_BGMEDIA_SPEC_YSRC }, void 0) }, void 0));
|
|
50
|
+
default:
|
|
51
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.CustomSectionBackgroundMedia = CustomSectionBackgroundMedia;
|
|
55
|
+
var S_ImageWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow: ", ";\n\n ", ";\n"], ["\n overflow: ", ";\n\n ", ";\n"])), function (_a) {
|
|
56
|
+
var isOverflowScroll = _a.isOverflowScroll;
|
|
57
|
+
return (isOverflowScroll ? 'scroll' : 'hidden');
|
|
58
|
+
}, function (_a) {
|
|
59
|
+
var scaleType = _a.scaleType;
|
|
60
|
+
switch (scaleType) {
|
|
61
|
+
case 'cover':
|
|
62
|
+
return "height: 100%;\n width: 100%;";
|
|
63
|
+
default:
|
|
64
|
+
return "height: auto;\n width: auto";
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
var S_YoutubeContainer = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100%;\n width: 100%;\n"], ["\n height: 100%;\n width: 100%;\n"])));
|
|
68
|
+
var templateObject_1, templateObject_2;
|
|
@@ -23,10 +23,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
-
var CustomSection_1 = require("../../../DynamicLayout/sections/CustomSection");
|
|
27
26
|
var sections_1 = require("../../sections");
|
|
28
27
|
function SectionMatcher(_a) {
|
|
29
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
|
+
}
|
|
30
32
|
var schema = props.manifest.schema;
|
|
31
33
|
switch (schema) {
|
|
32
34
|
case 'BASE_INTRO':
|
|
@@ -43,10 +45,8 @@ function SectionMatcher(_a) {
|
|
|
43
45
|
return (0, jsx_runtime_1.jsx)(sections_1.FullscreenIframeSection, __assign({}, props), void 0);
|
|
44
46
|
case 'PRG_MEMBERSHIP_DISPLAY':
|
|
45
47
|
return (0, jsx_runtime_1.jsx)(sections_1.NormalTypeMembershipSection, __assign({}, props), void 0);
|
|
46
|
-
case 'CUSTOM_SECTION':
|
|
47
|
-
return (0, jsx_runtime_1.jsx)(CustomSection_1.CustomSection, __assign({}, props), void 0);
|
|
48
48
|
default:
|
|
49
|
-
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);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
exports.default = SectionMatcher;
|
|
@@ -9,13 +9,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
13
|
+
exports.Section = void 0;
|
|
17
14
|
__exportStar(require("./pdsOriginal"), exports);
|
|
18
15
|
var Section_1 = require("./Section");
|
|
19
16
|
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return Section_1.Section; } });
|
|
20
|
-
var Box_1 = require("./Box");
|
|
21
|
-
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return __importDefault(Box_1).default; } });
|