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,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
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 jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
/* eslint-disable react/destructuring-assignment */
|
|
19
|
+
var react_1 = require("react");
|
|
20
|
+
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
|
21
|
+
var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
|
|
22
|
+
var newUtils_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils");
|
|
23
|
+
var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
|
|
24
|
+
var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
|
|
25
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
|
26
|
+
var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
|
|
27
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
28
|
+
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
29
|
+
function Button(props) {
|
|
30
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
31
|
+
var CB_STYLE_PROP_BTNCOLOR = props.CB_STYLE_PROP_BTNCOLOR, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW;
|
|
32
|
+
var _c = (0, useCLINK_1.default)({
|
|
33
|
+
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
34
|
+
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
35
|
+
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
|
|
36
|
+
internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
|
|
37
|
+
}), onClickCLINK = _c.onClickCLINK, CLINKCursor = _c.CLINKCursor;
|
|
38
|
+
var _d = getBTNStyles(props.CB_STYLE_PROP_BTNTEXT, device), btnTextStyle = _d.style, btnTextHoverStyle = _d.hoverStyle;
|
|
39
|
+
var _e = getBTNColorStyles(CB_STYLE_PROP_BTNCOLOR, device), btnColorStyle = _e.style, btnColorHoverStyle = _e.hoverStyle;
|
|
40
|
+
var _f = (0, util_1.parseProperties)(props, device), propsStyle = _f.style, propsHoverStyle = _f.hoverStyle, layoutStyle = _f.layout, effect = _f.effect;
|
|
41
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
42
|
+
if (mode === 'EDIT') {
|
|
43
|
+
propsStyle.visibility = 'visible';
|
|
44
|
+
}
|
|
45
|
+
var cbRef = (0, react_1.useRef)(null);
|
|
46
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
|
|
47
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
48
|
+
var effectCssProperties = isVisible ? effect : {};
|
|
49
|
+
var hasEffect = props.CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE !== 'NONE' &&
|
|
50
|
+
props.CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
51
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), effectCssProperties), btnColorStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0) }), void 0)] }, void 0));
|
|
53
|
+
}
|
|
54
|
+
function getBTNStyles(props, device) {
|
|
55
|
+
var availableSpecCodes = [
|
|
56
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE',
|
|
57
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT',
|
|
58
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE',
|
|
59
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT',
|
|
60
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING',
|
|
61
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_COLOR',
|
|
62
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL',
|
|
63
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL'
|
|
64
|
+
];
|
|
65
|
+
return (0, newUtils_1.parseStyleTextToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, device: device, propKey: 'BTNTEXT' });
|
|
66
|
+
}
|
|
67
|
+
function getBTNColorStyles(props, device) {
|
|
68
|
+
var availableSpecCodes = [
|
|
69
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE',
|
|
70
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR',
|
|
71
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR',
|
|
72
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC',
|
|
73
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT',
|
|
74
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR',
|
|
75
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC',
|
|
76
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE'
|
|
77
|
+
];
|
|
78
|
+
return (0, colorUtil_1.parseStyleColorToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, propKey: 'BTNCOLOR', device: device });
|
|
79
|
+
}
|
|
80
|
+
exports.default = Button;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX } from '../../../../util/types';
|
|
2
|
+
export declare type BtnPropsKeys = keyof CB_BTNTEXT_STYLE_PROPS;
|
|
3
|
+
export declare type CB_BTNTEXT_STYLE_PROPS = {
|
|
4
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE: ENUM_STRING;
|
|
5
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT: NUMBER_INTEGER;
|
|
6
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_SIZE: NUMBER_INTEGER;
|
|
7
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT: NUMBER_INTEGER;
|
|
8
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING: NUMBER_INTEGER;
|
|
9
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_COLOR: STRING_8DIGIT_HEX;
|
|
10
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL: ENUM_STRING;
|
|
11
|
+
CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL: ENUM_STRING;
|
|
12
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:HOVER': ENUM_STRING | null | undefined;
|
|
13
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE': ENUM_STRING | null | undefined;
|
|
14
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_TYPEFACE:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
15
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT:HOVER': NUMBER_INTEGER | null | undefined;
|
|
16
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
17
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_WEIGHT:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
18
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
19
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
20
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_SIZE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
21
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT:HOVER': NUMBER_INTEGER | null | undefined;
|
|
22
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
23
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LINEHEIGHT:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
24
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING:HOVER': NUMBER_INTEGER | null | undefined;
|
|
25
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
26
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_LETTERSPACING:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
27
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_COLOR:HOVER': STRING_8DIGIT_HEX | null | undefined;
|
|
28
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | null | undefined;
|
|
29
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | null | undefined;
|
|
30
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL:HOVER': ENUM_STRING | null | undefined;
|
|
31
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL:MOBILE': ENUM_STRING | null | undefined;
|
|
32
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_HORIZONTAL:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
33
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL:HOVER': ENUM_STRING | null | undefined;
|
|
34
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL:MOBILE': ENUM_STRING | null | undefined;
|
|
35
|
+
'CB_STYLE_PROP_BTNTEXT_SPEC_VERTICAL:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
export declare type CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT = 'LINEAR' | 'RADIAL';
|
|
38
|
+
export declare type CB_STYLE_PROP_BTNCOLOR_ENUM_TYPE = 'NONE' | 'SOLID' | 'GRADIENT';
|
|
39
|
+
export declare type CB_STYLE_PROP_BTNCOLOR_SPECS_BASE = {
|
|
40
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE: NUMBER_INTEGER;
|
|
41
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR: ENUM_STRING;
|
|
42
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR: ENUM_STRING;
|
|
43
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC: NUMBER_INTEGER;
|
|
44
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT: CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT;
|
|
45
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR: ENUM_STRING;
|
|
46
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC: NUMBER_INTEGER;
|
|
47
|
+
CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE: CB_STYLE_PROP_BTNCOLOR_ENUM_TYPE;
|
|
48
|
+
};
|
|
49
|
+
export declare type CB_STYLE_PROP_BTNCOLOR_SPECS = CB_STYLE_PROP_BTNCOLOR_SPECS_BASE & {
|
|
50
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
51
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
52
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
53
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR:HOVER': ENUM_STRING | null | undefined;
|
|
54
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
55
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_COLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
56
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR:HOVER': ENUM_STRING | null | undefined;
|
|
57
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
58
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
59
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC:HOVER': NUMBER_INTEGER | null | undefined;
|
|
60
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
61
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
62
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT:HOVER': CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT | null | undefined;
|
|
63
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT:MOBILE': CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT | null | undefined;
|
|
64
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_GRADIENT:MOBILE:HOVER': CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT | null | undefined;
|
|
65
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR:HOVER': ENUM_STRING | null | undefined;
|
|
66
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
67
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
68
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC:HOVER': NUMBER_INTEGER | null | undefined;
|
|
69
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
70
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
71
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE:HOVER': CB_STYLE_PROP_BTNCOLOR_ENUM_TYPE | null | undefined;
|
|
72
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE:MOBILE': CB_STYLE_PROP_BTNCOLOR_ENUM_TYPE | null | undefined;
|
|
73
|
+
'CB_STYLE_PROP_BTNCOLOR_SPEC_TYPE:MOBILE:HOVER': CB_STYLE_PROP_BTNCOLOR_ENUM_TYPE | null | undefined;
|
|
74
|
+
};
|
|
75
|
+
export declare type BtnColorPropsKeys = keyof CB_STYLE_PROP_BTNCOLOR_SPECS;
|
|
76
|
+
export declare type BTNColorValueSetType = Partial<Record<keyof CB_STYLE_PROP_BTNCOLOR_SPECS, CB_STYLE_PROP_BTNCOLOR_ENUM_GRADIENT | NUMBER_INTEGER | ENUM_STRING | undefined>>;
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
var react_1 = require("react");
|
|
39
|
+
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
|
40
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
41
|
+
var hooks_1 = require("../../../../hooks");
|
|
42
|
+
var util_1 = require("../../../../util");
|
|
43
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
|
44
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
45
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
46
|
+
function Divider(props) {
|
|
47
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
48
|
+
var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
|
49
|
+
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
|
50
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
51
|
+
if (mode === 'EDIT') {
|
|
52
|
+
propsStyle.visibility = 'visible';
|
|
53
|
+
}
|
|
54
|
+
var cbRef = (0, react_1.useRef)(null);
|
|
55
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
|
|
56
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
57
|
+
var effectCssProperties = isVisible ? effect : {};
|
|
58
|
+
var hasEffect = CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE !== 'NONE' &&
|
|
59
|
+
CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
60
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: layoutStyle, hoverStyle: {} }, { children: (0, jsx_runtime_1.jsx)(S_DIVIDER, { className: "cb-divider", normalStyle: __assign(__assign({}, propsStyle), effectCssProperties), hoverStyle: __assign({}, propsHoverStyle) }, void 0) }), void 0) }), void 0)] }, void 0));
|
|
62
|
+
}
|
|
63
|
+
var S_DIVIDER = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"], ["\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n"])), function (_a) {
|
|
64
|
+
var normalStyle = _a.normalStyle;
|
|
65
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign({}, normalStyle));
|
|
66
|
+
}, function (_a) {
|
|
67
|
+
var hoverStyle = _a.hoverStyle;
|
|
68
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign({}, hoverStyle));
|
|
69
|
+
});
|
|
70
|
+
exports.default = Divider;
|
|
71
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
var react_1 = require("react");
|
|
42
|
+
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
|
43
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
44
|
+
var hooks_1 = require("../../../../hooks");
|
|
45
|
+
var util_1 = require("../../../../util");
|
|
46
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
|
47
|
+
var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
|
|
48
|
+
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
49
|
+
function Image(props) {
|
|
50
|
+
var device = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext).device;
|
|
51
|
+
var CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _a = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _a.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _a.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _a.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _a.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
|
|
52
|
+
var _b = (0, useCLINK_1.default)({
|
|
53
|
+
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
54
|
+
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
55
|
+
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
|
|
56
|
+
internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
|
|
57
|
+
}), onClickCLINK = _b.onClickCLINK, CLINKCursor = _b.CLINKCursor;
|
|
58
|
+
var _c = (0, util_1.parseProperties)(props, device), style = _c.style, hoverStyle = _c.hoverStyle, layout = _c.layout, effect = _c.effect;
|
|
59
|
+
var cbRef = (0, react_1.useRef)(null);
|
|
60
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
|
|
61
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
62
|
+
var effectCssProperties = isVisible ? effect : {};
|
|
63
|
+
var hasEffect = CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE !== 'NONE' &&
|
|
64
|
+
CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
65
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
66
|
+
return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, layout), effectCssProperties), style), { cursor: CLINKCursor }), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device, ref: cbRef, onClick: onClickCLINK }, { children: (0, jsx_runtime_1.jsx)(S_Image, __assign({ src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, normalStyle: {
|
|
67
|
+
borderBottomRightRadius: style.borderBottomRightRadius,
|
|
68
|
+
borderBottomLeftRadius: style.borderBottomRightRadius,
|
|
69
|
+
borderColor: style.borderColor,
|
|
70
|
+
borderStyle: style.borderStyle,
|
|
71
|
+
borderTopLeftRadius: style.borderTopLeftRadius,
|
|
72
|
+
borderTopRightRadius: style.borderTopRightRadius,
|
|
73
|
+
backgroundPosition: style.backgroundPosition,
|
|
74
|
+
backgroundSize: style.backgroundSize
|
|
75
|
+
}, hoverStyle: {
|
|
76
|
+
borderBottomRightRadius: hoverStyle.borderBottomRightRadius,
|
|
77
|
+
borderBottomLeftRadius: hoverStyle.borderBottomLeftRadius,
|
|
78
|
+
borderColor: hoverStyle.borderColor,
|
|
79
|
+
borderStyle: hoverStyle.borderStyle,
|
|
80
|
+
borderTopLeftRadius: hoverStyle.borderTopLeftRadius,
|
|
81
|
+
borderTopRightRadius: hoverStyle.borderTopRightRadius,
|
|
82
|
+
backgroundPosition: hoverStyle.backgroundPosition,
|
|
83
|
+
backgroundSize: hoverStyle.backgroundSize
|
|
84
|
+
} }, { children: (0, jsx_runtime_1.jsx)("img", { src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, style: { visibility: 'hidden', width: '100%', height: '100%' } }, void 0) }), void 0) }), void 0) }), void 0));
|
|
85
|
+
}
|
|
86
|
+
var S_Image = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n\n & img {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"], ["\n background-image: ", ";\n background-repeat: no-repeat;\n height: 100%;\n width: 100%;\n\n ", ";\n\n &:hover {\n ", ";\n }\n\n & img {\n ", ";\n }\n\n &:hover img {\n ", ";\n }\n"])), function (_a) {
|
|
87
|
+
var src = _a.src;
|
|
88
|
+
return "url(" + src + ")";
|
|
89
|
+
}, function (_a) {
|
|
90
|
+
var normalStyle = _a.normalStyle;
|
|
91
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, normalStyle), { backgroundPosition: normalStyle.backgroundPosition }));
|
|
92
|
+
}, function (_a) {
|
|
93
|
+
var hoverStyle = _a.hoverStyle;
|
|
94
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), __assign(__assign({}, hoverStyle), { backgroundPosition: hoverStyle.backgroundPosition }));
|
|
95
|
+
}, function (_a) {
|
|
96
|
+
var normalStyle = _a.normalStyle;
|
|
97
|
+
var isContain = normalStyle.backgroundSize === 'contain';
|
|
98
|
+
return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
|
|
99
|
+
}, function (_a) {
|
|
100
|
+
var hoverStyle = _a.hoverStyle, normalStyle = _a.normalStyle;
|
|
101
|
+
var isContain = hoverStyle.backgroundSize
|
|
102
|
+
? hoverStyle.backgroundSize === 'contain'
|
|
103
|
+
: normalStyle.backgroundSize === 'contain';
|
|
104
|
+
return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n object-fit: ", ";\n "], ["\n object-fit: ", ";\n "])), isContain ? 'contain' : 'cover');
|
|
105
|
+
});
|
|
106
|
+
exports.default = Image;
|
|
107
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ENUM_STRING, STRING_PLAIN } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
2
|
+
export declare type ImagePropsKeys = keyof CB_IMAGE_STYLE_PROPS;
|
|
3
|
+
export declare type CB_IMAGE_STYLE_PROPS = {
|
|
4
|
+
CB_STYLE_PROP_IMAGE_SPEC_FIT: STRING_PLAIN;
|
|
5
|
+
CB_STYLE_PROP_IMAGE_SPEC_POSITION: ENUM_STRING;
|
|
6
|
+
'CB_STYLE_PROP_IMAGE_SPEC_FIT:HOVER': STRING_PLAIN | null | undefined;
|
|
7
|
+
'CB_STYLE_PROP_IMAGE_SPEC_FIT:MOBILE': STRING_PLAIN | null | undefined;
|
|
8
|
+
'CB_STYLE_PROP_IMAGE_SPEC_FIT:MOBILE:HOVER': STRING_PLAIN | null | undefined;
|
|
9
|
+
'CB_STYLE_PROP_IMAGE_SPEC_POSITION:HOVER': ENUM_STRING | null | undefined;
|
|
10
|
+
'CB_STYLE_PROP_IMAGE_SPEC_POSITION:MOBILE': ENUM_STRING | null | undefined;
|
|
11
|
+
'CB_STYLE_PROP_IMAGE_SPEC_POSITION:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
12
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CB_RICHTEXT_PROPERTIES_TYPE } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
3
|
+
declare type Props = CB_RICHTEXT_PROPERTIES_TYPE;
|
|
4
|
+
declare function RichText(props: Props): JSX.Element;
|
|
5
|
+
export default RichText;
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
/* eslint-disable react/destructuring-assignment */
|
|
23
|
+
var react_1 = require("react");
|
|
24
|
+
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
|
25
|
+
var RichText_1 = require("../../../../../../../DynamicLayout/components/ComponentBlocks/RichText");
|
|
26
|
+
var hooks_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/hooks");
|
|
27
|
+
var colorUtil_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/newUtils/colorUtil");
|
|
28
|
+
var util_1 = require("../../../../../../../DynamicLayout/sections/CustomSection/util");
|
|
29
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
30
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
|
31
|
+
var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
|
|
32
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
33
|
+
function RichText(props) {
|
|
34
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
35
|
+
var CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW;
|
|
36
|
+
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
|
37
|
+
var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
|
|
38
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
39
|
+
if (mode === 'EDIT') {
|
|
40
|
+
propsStyle.visibility = 'visible';
|
|
41
|
+
}
|
|
42
|
+
var cbRef = (0, react_1.useRef)(null);
|
|
43
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
|
|
44
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
45
|
+
var effectCssProperties = isVisible ? effect : {};
|
|
46
|
+
var hasEffect = props.CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE !== 'NONE' &&
|
|
47
|
+
props.CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
48
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: (0, jsx_runtime_1.jsx)(S_RichTextWrapper, { children: (0, jsx_runtime_1.jsx)(RichText_1.RichText, { text: props.CB_CONTENT_PROP_TEXTEDIT.CB_CONTENT_PROP_TEXTEDIT_SPEC_EDITOR }, void 0) }, void 0) }), void 0) }), void 0)] }, void 0));
|
|
50
|
+
}
|
|
51
|
+
function getBGColorStyles(props, device) {
|
|
52
|
+
var availableSpecCodes = [
|
|
53
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE',
|
|
54
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR',
|
|
55
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR',
|
|
56
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC',
|
|
57
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT',
|
|
58
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR',
|
|
59
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC',
|
|
60
|
+
'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE'
|
|
61
|
+
];
|
|
62
|
+
return (0, colorUtil_1.parseStyleColorToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, propKey: 'BGCOLOR', device: device });
|
|
63
|
+
}
|
|
64
|
+
var S_RichTextWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n overflow-y: auto;\n position: relative;\n\n iframe {\n max-width: 100%;\n }\n"], ["\n overflow-y: auto;\n position: relative;\n\n iframe {\n max-width: 100%;\n }\n"])));
|
|
65
|
+
exports.default = RichText;
|
|
66
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RichText } from './RichText';
|
|
@@ -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.RichText = void 0;
|
|
7
|
+
var RichText_1 = require("./RichText");
|
|
8
|
+
Object.defineProperty(exports, "RichText", { enumerable: true, get: function () { return __importDefault(RichText_1).default; } });
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { BGColorPropsKeys, CB_STYLE_PROP_BGCOLOR_SPECS } from '../Youtube/types';
|
|
2
|
+
import type { ENUM_STRING, NUMBER_INTEGER } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
|
|
3
|
+
export declare type CB_STYLE_PROP_BGOVERLAY_ENUM_GRADIENT = 'LINEAR' | 'RADIAL';
|
|
4
|
+
export declare type CB_STYLE_PROP_BGOVERLAY_ENUM_TYPE = 'NONE' | 'SOLID' | 'GRADIENT';
|
|
5
|
+
export declare type CB_STYLE_PROP_BGOVERLAY_SPECS_BASE = {
|
|
6
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE: NUMBER_INTEGER;
|
|
7
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR: ENUM_STRING;
|
|
8
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR: ENUM_STRING;
|
|
9
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC: NUMBER_INTEGER;
|
|
10
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT: ENUM_STRING;
|
|
11
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR: ENUM_STRING;
|
|
12
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC: NUMBER_INTEGER;
|
|
13
|
+
CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE: ENUM_STRING;
|
|
14
|
+
};
|
|
15
|
+
export declare type CB_STYLE_PROP_BGOVERLAY_SPECS = CB_STYLE_PROP_BGOVERLAY_SPECS_BASE & {
|
|
16
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
17
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
18
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ANGLE:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
19
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:HOVER': ENUM_STRING | null | undefined;
|
|
20
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
21
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_COLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
22
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:HOVER': ENUM_STRING | null | undefined;
|
|
23
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
24
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
25
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:HOVER': NUMBER_INTEGER | null | undefined;
|
|
26
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
27
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_ENDLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
28
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:HOVER': ENUM_STRING | null | undefined;
|
|
29
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:MOBILE': ENUM_STRING | null | undefined;
|
|
30
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_GRADIENT:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
31
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:HOVER': ENUM_STRING | null | undefined;
|
|
32
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:MOBILE': ENUM_STRING | null | undefined;
|
|
33
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTCOLOR:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
34
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:HOVER': NUMBER_INTEGER | null | undefined;
|
|
35
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:MOBILE': NUMBER_INTEGER | null | undefined;
|
|
36
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_STARTLOC:MOBILE:HOVER': NUMBER_INTEGER | null | undefined;
|
|
37
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:HOVER': ENUM_STRING | null | undefined;
|
|
38
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE': ENUM_STRING | null | undefined;
|
|
39
|
+
'CB_STYLE_PROP_BGOVERLAY_SPEC_TYPE:MOBILE:HOVER': ENUM_STRING | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
export declare type BGOverlayPropsKeys = keyof CB_STYLE_PROP_BGOVERLAY_SPECS;
|
|
42
|
+
export declare type BGOverlayValueSetType = Partial<Record<keyof CB_STYLE_PROP_BGOVERLAY_SPECS, NUMBER_INTEGER | ENUM_STRING | undefined>>;
|
|
43
|
+
export declare type RichTextBGColorPropsKeys = BGColorPropsKeys;
|
|
44
|
+
export declare type CB_STYLE_PROP_BGCOLOR_PROPS = CB_STYLE_PROP_BGCOLOR_SPECS;
|
|
@@ -0,0 +1,65 @@
|
|
|
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 jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
/* eslint-disable react/destructuring-assignment */
|
|
19
|
+
var react_1 = require("react");
|
|
20
|
+
var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
|
|
21
|
+
var hooks_1 = require("../../../../hooks");
|
|
22
|
+
var textUtil_1 = require("../../../../newUtils/textUtil");
|
|
23
|
+
var util_1 = require("../../../../util");
|
|
24
|
+
var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
|
|
25
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
26
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
27
|
+
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
28
|
+
function Text(props) {
|
|
29
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
30
|
+
var _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC;
|
|
31
|
+
var _c = (0, useCLINK_1.default)({
|
|
32
|
+
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
33
|
+
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
34
|
+
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB,
|
|
35
|
+
internalSrc: String(CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC)
|
|
36
|
+
}), CLINKCursor = _c.CLINKCursor, onClickCLINK = _c.onClickCLINK;
|
|
37
|
+
var _d = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _d.style, textHoverStyle = _d.hoverStyle;
|
|
38
|
+
var _e = (0, util_1.parseProperties)(props, device), propsStyle = _e.style, propsHoverStyle = _e.hoverStyle, layoutStyle = _e.layout, effect = _e.effect;
|
|
39
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
40
|
+
if (mode === 'EDIT') {
|
|
41
|
+
propsStyle.visibility = 'visible';
|
|
42
|
+
}
|
|
43
|
+
var cbRef = (0, react_1.useRef)(null);
|
|
44
|
+
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
|
|
45
|
+
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
46
|
+
var effectCssProperties = isVisible ? effect : {};
|
|
47
|
+
var hasEffect = props.CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE !== 'NONE' &&
|
|
48
|
+
props.CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] !== 'NONE';
|
|
49
|
+
var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
|
|
50
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}, void 0), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0) }), void 0)] }, void 0));
|
|
51
|
+
}
|
|
52
|
+
function getTextStyles(props, device) {
|
|
53
|
+
var availableSpecCodes = [
|
|
54
|
+
'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE',
|
|
55
|
+
'CB_STYLE_PROP_TEXT_SPEC_WEIGHT',
|
|
56
|
+
'CB_STYLE_PROP_TEXT_SPEC_SIZE',
|
|
57
|
+
'CB_STYLE_PROP_TEXT_SPEC_LINEHEIGHT',
|
|
58
|
+
'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING',
|
|
59
|
+
'CB_STYLE_PROP_TEXT_SPEC_COLOR',
|
|
60
|
+
'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL',
|
|
61
|
+
'CB_STYLE_PROP_TEXT_SPEC_VERTICAL'
|
|
62
|
+
];
|
|
63
|
+
return (0, textUtil_1.parseStyleTextToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, device: device, propKey: 'TEXT' });
|
|
64
|
+
}
|
|
65
|
+
exports.default = Text;
|