pds-dev-kit-web-test 0.2.3 → 0.2.5
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/desktop/common/components/TextFieldBase/TextFieldBase.js +1 -1
- package/dist/src/desktop/components/BasicListItem/Contents.d.ts +1 -1
- package/dist/src/desktop/components/BasicListItem/Contents.js +1 -1
- package/dist/src/desktop/components/BasicListItem/LeftBox/Badge.js +1 -1
- package/dist/src/desktop/components/BasicListItem/LeftBox/Checkbox.js +1 -1
- package/dist/src/desktop/components/BasicListItem/LeftBox/Icon.js +1 -1
- package/dist/src/desktop/components/BasicListItem/LeftBox/Image.js +1 -1
- package/dist/src/desktop/components/BasicListItem/LeftBox/Radio.js +1 -1
- package/dist/src/desktop/components/BasicListItem/RightBox/Description.d.ts +1 -1
- package/dist/src/desktop/components/BasicListItem/RightBox/Description.js +1 -1
- package/dist/src/desktop/components/BasicListItem/RightBox/MainButton.js +1 -1
- package/dist/src/desktop/components/BasicListItem/RightBox/Switch.js +1 -1
- package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +1 -1
- package/dist/src/mobile/components/BasicListItem/Contents.d.ts +1 -1
- package/dist/src/mobile/components/BasicListItem/Contents.js +1 -1
- package/dist/src/mobile/components/BasicListItem/LeftBox/Badge.js +1 -1
- package/dist/src/mobile/components/BasicListItem/LeftBox/Checkbox.js +1 -1
- package/dist/src/mobile/components/BasicListItem/LeftBox/Icon.js +1 -1
- package/dist/src/mobile/components/BasicListItem/LeftBox/Image.js +1 -1
- package/dist/src/mobile/components/BasicListItem/LeftBox/Radio.js +1 -1
- package/dist/src/mobile/components/BasicListItem/RightBox/Description.d.ts +1 -1
- package/dist/src/mobile/components/BasicListItem/RightBox/Description.js +1 -1
- package/dist/src/mobile/components/BasicListItem/RightBox/MainButton.js +1 -1
- package/dist/src/mobile/components/BasicListItem/RightBox/Switch.js +1 -1
- package/dist/src/sub/AdminList/AdminList/AdminList.d.ts +1 -1
- package/dist/src/sub/AdminList/AdminList/AdminList.js +2 -2
- package/dist/src/sub/AdminList/AdminList/HeaderRow.d.ts +1 -1
- package/dist/src/sub/AdminList/AdminList/HeaderRow.js +2 -2
- package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.d.ts +1 -1
- package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.js +2 -2
- package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.d.ts +1 -1
- package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.js +2 -2
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.d.ts +1 -1
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +3 -3
- package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.d.ts +1 -1
- package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.js +2 -2
- package/dist/src/sub/AdminList/ToolBar/ChipList.d.ts +1 -1
- package/dist/src/sub/AdminList/ToolBar/ChipList.js +1 -1
- package/dist/src/sub/AdminList/ToolBar/SearchField.js +4 -4
- package/dist/src/sub/AdminList/ToolBar/ToolBar.d.ts +1 -1
- package/dist/src/sub/AdminList/ToolBar/ToolBar.js +3 -3
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +1 -1
- package/dist/src/sub/DynamicLayout/components/Section/Section.js +1 -1
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/mock_customSection.js +218 -238
- package/dist/src/sub/DynamicLayout/nakedMocks.json +139 -83
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +9 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +33 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +11 -29
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +22 -16
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Divider.d.ts → Divider/Divider.d.ts} +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Divider.js → Divider/Divider.js} +7 -7
- 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.js → Image/Image.js} +24 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Image.d.ts → Image/types.d.ts} +1 -5
- 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 +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +8 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/types.d.ts +1 -1
- 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.js → Text/Text.js} +14 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Text.d.ts → Text/types.d.ts} +1 -5
- 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.js → Twitter/Twitter.js} +10 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Twitter.d.ts → Twitter/types.d.ts} +1 -5
- 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 +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +9 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/types.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_HiddenCover.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/hooks/useCLINK.js +1 -1
- 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/newUtils/colorUtil.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +14 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropBorder.d.ts +6 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropDivider.d.ts +5 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropShadow.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +38 -38
- package/dist/src/sub/DynamicLayout/sections/FullscreenIframeSection/templates/TemplateA/desktop/D_TemplateA.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/FullscreenIframeSection/templates/TemplateA/mobile/M_TemplateA.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/MembershipSection.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/MembershipSection.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/TemplateA.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/D_TemplateA.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipBenefitInfo.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipBenefitInfo.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.js +5 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/NarrowMembershipListView.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/NarrowMembershipListView.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/UnavailableMembershipPlanSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/UnavailableMembershipPlanSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/WideMembershipListView.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/WideMembershipListView.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/M_TemplateA.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/EmptyMembershipSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipBenefitInfo.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipBenefitInfo.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipContents.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipSectionSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipSectionSheet.js +5 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/TemplateB.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/D_TemplateB.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipCard.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipCard.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.js +5 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipSheet.js +6 -6
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/UnavailableMembershipPlanSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/UnavailableMembershipPlanSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/M_TemplateB.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/EmptyMembershipSheet.js +4 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipBenefitInfo.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipBenefitInfo.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipContents.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipSectionSheet.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipSectionSheet.js +5 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/MembershipSection.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/MembershipSection.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/TemplateA.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/desktop/D_TemplateA.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/desktop/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/M_TemplateA.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/TemplateB.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/desktop/D_TemplateB.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/desktop/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/M_TemplateB.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/components/SectionContents.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.d.ts +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.d.ts +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/constants.d.ts +1 -1
- package/package.json +2 -2
- package/release-note.md +15 -6
- package/webhook/node_modules/esrecurse/.babelrc +0 -3
|
@@ -20,11 +20,11 @@ var newUtils_1 = require("../../newUtils");
|
|
|
20
20
|
var types_1 = require("../../types");
|
|
21
21
|
require("../../util");
|
|
22
22
|
var Button_1 = __importDefault(require("./componentBlocks/Button/Button"));
|
|
23
|
-
var Divider_1 = __importDefault(require("./componentBlocks/Divider"));
|
|
24
|
-
var Image_1 = __importDefault(require("./componentBlocks/Image"));
|
|
23
|
+
var Divider_1 = __importDefault(require("./componentBlocks/Divider/Divider"));
|
|
24
|
+
var Image_1 = __importDefault(require("./componentBlocks/Image/Image"));
|
|
25
25
|
var RichText_1 = require("./componentBlocks/RichText");
|
|
26
|
-
var Text_1 = __importDefault(require("./componentBlocks/Text"));
|
|
27
|
-
var Twitter_1 = __importDefault(require("./componentBlocks/Twitter"));
|
|
26
|
+
var Text_1 = __importDefault(require("./componentBlocks/Text/Text"));
|
|
27
|
+
var Twitter_1 = __importDefault(require("./componentBlocks/Twitter/Twitter"));
|
|
28
28
|
var Youtube_1 = require("./componentBlocks/Youtube");
|
|
29
29
|
function ComponentBlockMatcher(props) {
|
|
30
30
|
var device = 'MOBILE';
|
|
@@ -32,37 +32,19 @@ function ComponentBlockMatcher(props) {
|
|
|
32
32
|
var propsWithValue = device === 'MOBILE' ? (0, newUtils_1.replaceUndefinedValues)(properties) : properties;
|
|
33
33
|
switch (componentBlockCode) {
|
|
34
34
|
case types_1.CB_ALL_CODES.CB_BTN:
|
|
35
|
-
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
return (0, jsx_runtime_1.jsx)(Button_1.default, __assign({}, propsWithValue), void 0);
|
|
38
|
-
}
|
|
39
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: CB_BTN" }, void 0);
|
|
35
|
+
return (0, jsx_runtime_1.jsx)(Button_1.default, __assign({}, propsWithValue), void 0);
|
|
40
36
|
case types_1.CB_ALL_CODES.CB_TEXT:
|
|
41
|
-
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
return (0, jsx_runtime_1.jsx)(Text_1.default, __assign({}, propsWithValue), void 0);
|
|
44
|
-
}
|
|
45
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: CB_TEXT" }, void 0);
|
|
37
|
+
return (0, jsx_runtime_1.jsx)(Text_1.default, __assign({}, propsWithValue), void 0);
|
|
46
38
|
case types_1.CB_ALL_CODES.CB_RICHTEXT:
|
|
47
|
-
return (0, jsx_runtime_1.jsx)(RichText_1.RichText, __assign({},
|
|
39
|
+
return (0, jsx_runtime_1.jsx)(RichText_1.RichText, __assign({}, propsWithValue), void 0);
|
|
48
40
|
case types_1.CB_ALL_CODES.CB_DIVIDER:
|
|
49
|
-
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
return (0, jsx_runtime_1.jsx)(Divider_1.default, __assign({}, properties), void 0);
|
|
52
|
-
}
|
|
53
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: CB_DIVIDER" }, void 0);
|
|
41
|
+
return (0, jsx_runtime_1.jsx)(Divider_1.default, __assign({}, propsWithValue), void 0);
|
|
54
42
|
case types_1.CB_ALL_CODES.CB_IMG:
|
|
55
|
-
|
|
56
|
-
return (0, jsx_runtime_1.jsx)(Image_1.default, __assign({}, properties), void 0);
|
|
57
|
-
}
|
|
58
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: CB_IMAGE" }, void 0);
|
|
43
|
+
return (0, jsx_runtime_1.jsx)(Image_1.default, __assign({}, propsWithValue), void 0);
|
|
59
44
|
case types_1.CB_ALL_CODES.CB_TWITTER:
|
|
60
|
-
|
|
61
|
-
return (0, jsx_runtime_1.jsx)(Twitter_1.default, __assign({}, properties), void 0);
|
|
62
|
-
}
|
|
63
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "ERROR: CB_TWITTER" }, void 0);
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(Twitter_1.default, __assign({}, propsWithValue), void 0);
|
|
64
46
|
case types_1.CB_ALL_CODES.CB_YOUTUBE:
|
|
65
|
-
return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({},
|
|
47
|
+
return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue), void 0);
|
|
66
48
|
default:
|
|
67
49
|
return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" }, void 0);
|
|
68
50
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { CB_BTN_PROPERTIES_TYPE } from '
|
|
2
|
+
import type { CB_BTN_PROPERTIES_TYPE } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
3
3
|
declare type Props = CB_BTN_PROPERTIES_TYPE;
|
|
4
4
|
declare function Button(props: Props): JSX.Element;
|
|
5
5
|
export default Button;
|
|
@@ -17,34 +17,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
/* eslint-disable react/destructuring-assignment */
|
|
19
19
|
var react_1 = require("react");
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
20
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
21
|
+
var hooks_1 = require("@sub/DynamicLayout/sections/CustomSection/hooks");
|
|
22
|
+
var newUtils_1 = require("@sub/DynamicLayout/sections/CustomSection/newUtils");
|
|
23
|
+
var colorUtil_1 = require("@sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil");
|
|
24
|
+
var util_1 = require("@sub/DynamicLayout/sections/CustomSection/util");
|
|
24
25
|
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
25
26
|
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
26
27
|
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
27
28
|
function Button(props) {
|
|
28
|
-
|
|
29
|
-
var
|
|
29
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
30
|
+
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;
|
|
30
31
|
var onClickBox = (0, useCLINK_1.default)({
|
|
31
|
-
src:
|
|
32
|
-
type:
|
|
33
|
-
openNewTab:
|
|
32
|
+
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
33
|
+
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
34
|
+
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB
|
|
34
35
|
});
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
var handleOnClick = function () {
|
|
37
|
+
if (mode === 'EDIT') {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
onClickBox();
|
|
41
|
+
};
|
|
42
|
+
var _c = getBTNStyles(props.CB_STYLE_PROP_BTNTEXT, device), btnTextStyle = _c.style, btnTextHoverStyle = _c.hoverStyle;
|
|
43
|
+
var _d = getBTNColorStyles(CB_STYLE_PROP_BTNCOLOR, device), btnColorStyle = _d.style, btnColorHoverStyle = _d.hoverStyle;
|
|
44
|
+
var _e = (0, util_1.parseProperties)(props, device), propsStyle = _e.style, propsHoverStyle = _e.hoverStyle, layoutStyle = _e.layout, effect = _e.effect;
|
|
45
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
40
46
|
if (mode === 'EDIT') {
|
|
41
|
-
|
|
47
|
+
propsStyle.visibility = 'visible';
|
|
42
48
|
}
|
|
43
49
|
var cbRef = (0, react_1.useRef)(null);
|
|
44
50
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
|
|
45
51
|
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
46
52
|
var effectCssProperties = isVisible ? effect : {};
|
|
47
|
-
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_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({},
|
|
53
|
+
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_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, btnTextStyle), propsStyle), layoutStyle), effectCssProperties), btnColorStyle), hoverStyle: __assign(__assign(__assign({}, btnTextHoverStyle), propsHoverStyle), btnColorHoverStyle), onClick: handleOnClick, ref: cbRef }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0)] }, void 0));
|
|
48
54
|
}
|
|
49
55
|
function getBTNStyles(props, device) {
|
|
50
56
|
var availableSpecCodes = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { CB_DIVIDER_PROPERTIES_TYPE } from '
|
|
2
|
+
import type { CB_DIVIDER_PROPERTIES_TYPE } from '../../../../util/types';
|
|
3
3
|
declare type Props = CB_DIVIDER_PROPERTIES_TYPE;
|
|
4
4
|
declare function Divider(props: Props): JSX.Element;
|
|
5
5
|
export default Divider;
|
|
@@ -36,15 +36,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
var react_1 = require("react");
|
|
39
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
39
40
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
40
|
-
var hooks_1 = require("
|
|
41
|
-
var util_1 = require("
|
|
42
|
-
var S_CB_Box_1 = require("
|
|
43
|
-
var S_HiddenCover_1 = require("
|
|
41
|
+
var hooks_1 = require("../../../../hooks");
|
|
42
|
+
var util_1 = require("../../../../util");
|
|
43
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
44
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
44
45
|
function Divider(props) {
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
var mode = 'EDIT';
|
|
46
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
47
|
+
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
|
48
48
|
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
49
49
|
if (mode === 'EDIT') {
|
|
50
50
|
propsStyle.visibility = 'visible';
|
|
@@ -33,24 +33,39 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
36
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
40
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
41
|
var react_1 = require("react");
|
|
42
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
39
43
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
40
|
-
var hooks_1 = require("
|
|
41
|
-
var util_1 = require("
|
|
42
|
-
var S_CB_Box_1 = require("
|
|
44
|
+
var hooks_1 = require("../../../../hooks");
|
|
45
|
+
var util_1 = require("../../../../util");
|
|
46
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
47
|
+
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
43
48
|
function Image(props) {
|
|
44
|
-
|
|
45
|
-
var CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE;
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
50
|
+
var CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _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;
|
|
51
|
+
var onClickBox = (0, useCLINK_1.default)({
|
|
52
|
+
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
53
|
+
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
54
|
+
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB
|
|
55
|
+
});
|
|
56
|
+
var _c = (0, util_1.parseProperties)(props, device), style = _c.style, hoverStyle = _c.hoverStyle, layout = _c.layout, effect = _c.effect;
|
|
57
|
+
var _d = imageStyleDivideProvider(style), componentStyle = _d.componentStyle, wrapperStyle = _d.wrapperStyle;
|
|
58
|
+
var _e = imageStyleDivideProvider(hoverStyle), hoverComponentStyle = _e.componentStyle, hoverWrapperStyle = _e.wrapperStyle;
|
|
49
59
|
var cbRef = (0, react_1.useRef)(null);
|
|
50
60
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
|
|
51
61
|
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
52
62
|
var effectCssProperties = isVisible ? effect : {};
|
|
53
|
-
|
|
63
|
+
var handleOnClick = function () {
|
|
64
|
+
if (mode === 'EDIT')
|
|
65
|
+
return;
|
|
66
|
+
onClickBox();
|
|
67
|
+
};
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign({}, layout), effectCssProperties), wrapperStyle), hoverStyle: hoverWrapperStyle, ref: cbRef, onClick: handleOnClick }, { children: (0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ normalStyle: componentStyle, hoverStyle: hoverComponentStyle }, { children: (0, jsx_runtime_1.jsx)(S_Image, { src: CB_CONTENT_PROP_IMAGE.CB_CONTENT_PROP_IMAGE_SPEC_SELECTOR, normalStyle: { objectFit: hoverComponentStyle.objectFit } }, void 0) }), void 0) }), void 0));
|
|
54
69
|
}
|
|
55
70
|
function imageStyleDivideProvider(style) {
|
|
56
71
|
return {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CB_IMG_PROPERTIES_TYPE, ENUM_STRING, STRING_PLAIN } from '../../../util/types';
|
|
3
|
-
declare type Props = CB_IMG_PROPERTIES_TYPE;
|
|
4
|
-
declare function Image(props: Props): JSX.Element;
|
|
1
|
+
import type { ENUM_STRING, STRING_PLAIN } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
5
2
|
export declare type ImagePropsKeys = keyof CB_IMAGE_STYLE_PROPS;
|
|
6
3
|
export declare type CB_IMAGE_STYLE_PROPS = {
|
|
7
4
|
CB_STYLE_PROP_IMAGE_SPEC_FIT: STRING_PLAIN;
|
|
@@ -13,4 +10,3 @@ export declare type CB_IMAGE_STYLE_PROPS = {
|
|
|
13
10
|
'CB_STYLE_PROP_IMAGE_SPEC_POSITION:MOBILE': ENUM_STRING | undefined;
|
|
14
11
|
'CB_STYLE_PROP_IMAGE_SPEC_POSITION:MOBILE:HOVER': ENUM_STRING | undefined;
|
|
15
12
|
};
|
|
16
|
-
export default Image;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { CB_RICHTEXT_PROPERTIES_TYPE } from '
|
|
2
|
+
import type { CB_RICHTEXT_PROPERTIES_TYPE } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
3
3
|
declare type Props = CB_RICHTEXT_PROPERTIES_TYPE;
|
|
4
4
|
declare function RichText(props: Props): JSX.Element;
|
|
5
5
|
export default RichText;
|
|
@@ -21,19 +21,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
22
|
/* eslint-disable react/destructuring-assignment */
|
|
23
23
|
var react_1 = require("react");
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
24
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
25
|
+
var RichText_1 = require("@sub/DynamicLayout/components/ComponentBlocks/RichText");
|
|
26
|
+
var hooks_1 = require("@sub/DynamicLayout/sections/CustomSection/hooks");
|
|
27
|
+
var colorUtil_1 = require("@sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil");
|
|
28
|
+
var util_1 = require("@sub/DynamicLayout/sections/CustomSection/util");
|
|
28
29
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
29
30
|
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
30
31
|
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
31
32
|
function RichText(props) {
|
|
32
|
-
|
|
33
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
33
34
|
var CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR;
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var mode = 'EDIT';
|
|
35
|
+
var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
|
|
36
|
+
var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
|
|
37
37
|
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
38
38
|
if (mode === 'EDIT') {
|
|
39
39
|
propsStyle.visibility = 'visible';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BGColorPropsKeys, CB_STYLE_PROP_BGCOLOR_SPECS } from '../Youtube/types';
|
|
2
|
-
import type { ENUM_STRING, NUMBER_INTEGER } from '
|
|
2
|
+
import type { ENUM_STRING, NUMBER_INTEGER } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
3
3
|
export declare type CB_STYLE_PROP_BGOVERLAY_ENUM_GRADIENT = 'LINEAR' | 'RADIAL';
|
|
4
4
|
export declare type CB_STYLE_PROP_BGOVERLAY_ENUM_TYPE = 'NONE' | 'SOLID' | 'GRADIENT';
|
|
5
5
|
export declare type CB_STYLE_PROP_BGOVERLAY_SPECS_BASE = {
|
|
@@ -17,32 +17,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
/* eslint-disable react/destructuring-assignment */
|
|
19
19
|
var react_1 = require("react");
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
20
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
21
|
+
var hooks_1 = require("../../../../hooks");
|
|
22
|
+
var textUtil_1 = require("../../../../newUtils/textUtil");
|
|
23
|
+
var util_1 = require("../../../../util");
|
|
24
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
25
|
+
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
26
|
+
var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
|
|
26
27
|
function Text(props) {
|
|
27
|
-
|
|
28
|
-
var
|
|
28
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
29
|
+
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;
|
|
29
30
|
var onClickBox = (0, useCLINK_1.default)({
|
|
30
31
|
src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
|
|
31
32
|
type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
|
|
32
33
|
openNewTab: CB_CONTENT_PROP_CLINK_SPEC_NEWTAB
|
|
33
34
|
});
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var isEditModeAndHidden = prosStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
35
|
+
var _c = getTextStyles(props.CB_STYLE_PROP_TEXT, device), textStyle = _c.style, textHoverStyle = _c.hoverStyle;
|
|
36
|
+
var _d = (0, util_1.parseProperties)(props, device), propsStyle = _d.style, propsHoverStyle = _d.hoverStyle, layoutStyle = _d.layout, effect = _d.effect;
|
|
37
|
+
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
38
38
|
if (mode === 'EDIT') {
|
|
39
|
-
|
|
39
|
+
propsStyle.visibility = 'visible';
|
|
40
40
|
}
|
|
41
41
|
var cbRef = (0, react_1.useRef)(null);
|
|
42
42
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
|
|
43
43
|
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
44
44
|
var effectCssProperties = isVisible ? effect : {};
|
|
45
|
-
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_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({},
|
|
45
|
+
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_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), hoverStyle: __assign(__assign({}, textHoverStyle), propsHoverStyle), onClick: mode !== 'EDIT' ? onClickBox : undefined, ref: cbRef }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT }), void 0)] }, void 0));
|
|
46
46
|
}
|
|
47
47
|
function getTextStyles(props, device) {
|
|
48
48
|
var availableSpecCodes = [
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CB_TEXT_PROPERTIES_TYPE, ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX } from '../../../util/types';
|
|
3
|
-
declare type Props = CB_TEXT_PROPERTIES_TYPE;
|
|
4
|
-
declare function Text(props: Props): JSX.Element;
|
|
1
|
+
import type { ENUM_STRING, NUMBER_INTEGER, STRING_8DIGIT_HEX } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
5
2
|
export declare type TextPropsKeys = keyof CB_TEXT_STYLE_PROPS;
|
|
6
3
|
export declare type CB_TEXT_STYLE_PROPS = {
|
|
7
4
|
CB_STYLE_PROP_TEXT_SPEC_TYPEFACE: ENUM_STRING;
|
|
@@ -29,4 +26,3 @@ export declare type CB_TEXT_STYLE_PROPS = {
|
|
|
29
26
|
'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE': STRING_8DIGIT_HEX | undefined;
|
|
30
27
|
'CB_STYLE_PROP_TEXT_SPEC_COLOR:MOBILE:HOVER': STRING_8DIGIT_HEX | undefined;
|
|
31
28
|
};
|
|
32
|
-
export default Text;
|
|
@@ -13,14 +13,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
15
|
var react_1 = require("react");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
16
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
17
|
+
var ComponentBlocks_1 = require("@sub/DynamicLayout/components/ComponentBlocks");
|
|
18
|
+
var hooks_1 = require("../../../../hooks");
|
|
19
|
+
var util_1 = require("../../../../util");
|
|
20
|
+
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
20
21
|
function Twitter(props) {
|
|
21
|
-
//
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
22
24
|
var CB_CONTENT_PROP_TWITTER_SPEC_SRC = props.CB_CONTENT_PROP_TWITTER.CB_CONTENT_PROP_TWITTER_SPEC_SRC, CB_STYLE_PROP_TWITTER_SPEC_THEME = props.CB_STYLE_PROP_TWITTER.CB_STYLE_PROP_TWITTER_SPEC_THEME;
|
|
23
|
-
var
|
|
25
|
+
var _b = (0, util_1.parseProperties)(props, device), style = _b.style, hoverStyle = _b.hoverStyle, layout = _b.layout, effect = _b.effect;
|
|
24
26
|
var userId = CB_CONTENT_PROP_TWITTER_SPEC_SRC.replace('https://twitter.com/', '');
|
|
25
27
|
var theme = CB_STYLE_PROP_TWITTER_SPEC_THEME.toLowerCase();
|
|
26
28
|
if ('display' in layout) {
|
|
@@ -36,6 +38,7 @@ function Twitter(props) {
|
|
|
36
38
|
var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 1, freezeOnceVisible: true });
|
|
37
39
|
var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
38
40
|
var effectCssProperties = isVisible ? effect : {};
|
|
39
|
-
|
|
41
|
+
var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), { overflowY: 'auto' }), editModeStyle), hoverStyle: hoverStyle, ref: cbRef }, { children: (0, jsx_runtime_1.jsx)(ComponentBlocks_1.TwitterTimeline, { userId: userId, theme: theme }, void 0) }), void 0) }, void 0));
|
|
40
43
|
}
|
|
41
44
|
exports.default = Twitter;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CB_TWITTER_PROPERTIES_TYPE, DefaultBrightTheme } from '../../../util/types';
|
|
3
|
-
declare type Props = CB_TWITTER_PROPERTIES_TYPE;
|
|
4
|
-
declare function Twitter(props: Props): JSX.Element;
|
|
1
|
+
import type { DefaultBrightTheme } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
5
2
|
export declare type TwitterPropsKeys = keyof CB_TWITTER_STYLE_PROPS;
|
|
6
3
|
export declare type CB_TWITTER_STYLE_PROPS = {
|
|
7
4
|
CB_STYLE_PROP_TWITTER_SPEC_THEME: DefaultBrightTheme;
|
|
8
5
|
'CB_STYLE_PROP_TWITTER_SPEC_THEME:MOBILE': DefaultBrightTheme | undefined;
|
|
9
6
|
};
|
|
10
|
-
export default Twitter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { CB_YOUTUBE_PROPERTIES_TYPE } from '
|
|
2
|
+
import type { CB_YOUTUBE_PROPERTIES_TYPE } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
3
3
|
declare type Props = CB_YOUTUBE_PROPERTIES_TYPE;
|
|
4
4
|
declare function Youtube(props: Props): JSX.Element;
|
|
5
5
|
export default Youtube;
|
|
@@ -20,21 +20,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
22
|
var react_1 = require("react");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
var DynamicLayout_1 = require("@sub/DynamicLayout");
|
|
24
|
+
var hooks_1 = require("@sub/DynamicLayout/sections/CustomSection/hooks");
|
|
25
|
+
var colorUtil_1 = require("@sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil");
|
|
26
|
+
var util_1 = require("@sub/DynamicLayout/sections/CustomSection/util");
|
|
26
27
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
27
28
|
var S_CB_Box_1 = require("../components/S_CB_Box");
|
|
28
29
|
var S_HiddenCover_1 = require("../components/S_HiddenCover");
|
|
29
30
|
var parseYoutubeContentProp_1 = __importDefault(require("./parseYoutubeContentProp"));
|
|
30
31
|
function Youtube(props) {
|
|
31
|
-
|
|
32
|
+
var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
|
|
32
33
|
var CB_CONTENT_PROP_YOUTUBE = props.CB_CONTENT_PROP_YOUTUBE, CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR;
|
|
33
|
-
var
|
|
34
|
-
var isEditMode =
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var mode = 'EDIT';
|
|
34
|
+
var _b = (0, parseYoutubeContentProp_1.default)(CB_CONTENT_PROP_YOUTUBE), youtubeSrc = _b.youtubeSrc, thumbnailSrc = _b.thumbnailSrc, id = _b.id;
|
|
35
|
+
var isEditMode = mode === 'EDIT';
|
|
36
|
+
var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
|
|
37
|
+
var _d = (0, util_1.parseProperties)(props, device), propsStyle = _d.style, propsHoverStyle = _d.hoverStyle, layoutStyle = _d.layout, effect = _d.effect;
|
|
38
38
|
var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
|
|
39
39
|
if (mode === 'EDIT') {
|
|
40
40
|
propsStyle.visibility = 'visible';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ENUM_STRING, NUMBER_INTEGER } from '
|
|
1
|
+
import type { ENUM_STRING, NUMBER_INTEGER } from '@sub/DynamicLayout/sections/CustomSection/util/types';
|
|
2
2
|
export declare type CB_CONTENT_PROP_YOUTUBE_TYPE = {
|
|
3
3
|
CB_CONTENT_PROP_YOUTUBE_SPEC_ENDTIME: number;
|
|
4
4
|
CB_CONTENT_PROP_YOUTUBE_SPEC_MPLAY: boolean;
|
|
@@ -9,5 +9,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.S_HiddenCover = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.S_HiddenCover = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: repeating-linear-gradient(\n -60deg,\n #ffffff26,\n #ffffff26 12px,\n #0000001a 12px,\n #0000001a 25px\n );\n height: 100%;\n pointer-events: none;\n position: absolute;\n width: 100%;\n"], ["\n background: repeating-linear-gradient(\n -60deg,\n #ffffff26,\n #ffffff26 12px,\n #0000001a 12px,\n #0000001a 25px\n );\n height: 100%;\n pointer-events: none;\n position: absolute;\n width: 100%;\n"])));
|
|
12
|
+
exports.S_HiddenCover = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: repeating-linear-gradient(\n -60deg,\n #ffffff26,\n #ffffff26 12px,\n #0000001a 12px,\n #0000001a 25px\n );\n height: 100%;\n pointer-events: none;\n position: absolute;\n width: 100%;\n z-index: 2;\n"], ["\n background: repeating-linear-gradient(\n -60deg,\n #ffffff26,\n #ffffff26 12px,\n #0000001a 12px,\n #0000001a 25px\n );\n height: 100%;\n pointer-events: none;\n position: absolute;\n width: 100%;\n z-index: 2;\n"])));
|
|
13
13
|
var templateObject_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var react_1 = require("react");
|
|
4
|
-
var dynamicLayoutContext_1 = require("
|
|
4
|
+
var dynamicLayoutContext_1 = require("@sub/DynamicLayout/dynamicLayoutContext");
|
|
5
5
|
// NOTE: link기능은 탄력적일 필요가 없음.
|
|
6
6
|
function useCLINK(props) {
|
|
7
7
|
var src = props.src, openNewTab = props.openNewTab, type = props.type;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var useRefDimensions = function (ref) {
|
|
5
|
+
var _a = (0, react_1.useState)({ width: 0, height: 0 }), dimensions = _a[0], setDimensions = _a[1];
|
|
6
|
+
(0, react_1.useEffect)(function () {
|
|
7
|
+
if (!ref.current)
|
|
8
|
+
return;
|
|
9
|
+
var resizeObserver = new ResizeObserver(function (callback) {
|
|
10
|
+
var object = callback[0];
|
|
11
|
+
var _a = object.contentRect, width = _a.width, height = _a.height;
|
|
12
|
+
setDimensions({ width: width, height: height });
|
|
13
|
+
});
|
|
14
|
+
resizeObserver.observe(ref.current);
|
|
15
|
+
return function () { return resizeObserver.disconnect(); }; // clean u
|
|
16
|
+
}, [ref]);
|
|
17
|
+
return dimensions;
|
|
18
|
+
};
|
|
19
|
+
exports.default = useRefDimensions;
|
|
@@ -22,8 +22,8 @@ function parseStyleColorToCSSProp(_a) {
|
|
|
22
22
|
var value = props[baseKey];
|
|
23
23
|
var hoverValue = props[keyWithHover];
|
|
24
24
|
return {
|
|
25
|
-
normal: __assign(__assign({}, acc.normal), (_a = {}, _a[
|
|
26
|
-
hover: __assign(__assign({}, acc.hover), (_b = {}, _b[
|
|
25
|
+
normal: __assign(__assign({}, acc.normal), (_a = {}, _a[currentKey] = value, _a)),
|
|
26
|
+
hover: __assign(__assign({}, acc.hover), (_b = {}, _b[currentKey] = hoverValue, _b))
|
|
27
27
|
};
|
|
28
28
|
}, {
|
|
29
29
|
normal: {},
|
package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js
CHANGED
|
@@ -15,25 +15,20 @@ function replaceUndefinedValues(jsonData) {
|
|
|
15
15
|
return Object.entries(jsonData).reduce(function (acc, cur) {
|
|
16
16
|
var _a;
|
|
17
17
|
var _b = cur, currentPropKey = _b[0], currentProps = _b[1];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
var propKey = ['CB_STYLE_PROP', 'CB_EFFECT_PROP', 'CB_LAYOUT_PROP'];
|
|
19
|
+
var isIncludedPropKey = propKey.some(function (key) { return currentPropKey.includes(key); });
|
|
20
|
+
if (isIncludedPropKey) {
|
|
21
|
+
var specs = Object.keys(currentProps).reduce(function (accSpecs, curSpec) {
|
|
22
|
+
if (currentProps[curSpec] === undefined || currentProps[curSpec] === null) {
|
|
23
|
+
var undefinedMobileKey = curSpec.replace(':MOBILE', '');
|
|
24
|
+
if (undefinedMobileKey in currentProps) {
|
|
25
|
+
accSpecs[curSpec] = currentProps[undefinedMobileKey];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
accSpecs[curSpec] = currentProps[curSpec];
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
|
-
|
|
28
|
-
keyCopy.replace(':HOVER', ':MOBILE:HOVER');
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
keyCopy += ':MOBILE';
|
|
32
|
-
}
|
|
33
|
-
if (hasOwnProperty(accSpecs, keyCopy)) {
|
|
34
|
-
return accSpecs;
|
|
35
|
-
}
|
|
36
|
-
return __assign(__assign({}, accSpecs), (_a = {}, _a[keyCopy] = value, _a));
|
|
31
|
+
return __assign({}, accSpecs);
|
|
37
32
|
}, currentProps);
|
|
38
33
|
return __assign(__assign({}, acc), (_a = {}, _a[currentPropKey] = specs, _a));
|
|
39
34
|
}
|
|
@@ -41,6 +36,7 @@ function replaceUndefinedValues(jsonData) {
|
|
|
41
36
|
}, jsonData);
|
|
42
37
|
}
|
|
43
38
|
exports.default = replaceUndefinedValues;
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
40
|
function hasOwnProperty(obj, prop) {
|
|
45
41
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
46
42
|
}
|
|
@@ -18,7 +18,7 @@ function parseEffectPropEntAnim(namedProps, device) {
|
|
|
18
18
|
var _a;
|
|
19
19
|
var baseKey = device === 'DESKTOP' ? cur : cur + ":MOBILE";
|
|
20
20
|
var value = specs[baseKey];
|
|
21
|
-
return __assign(__assign({}, acc), (_a = {}, _a[
|
|
21
|
+
return __assign(__assign({}, acc), (_a = {}, _a[cur] = value, _a));
|
|
22
22
|
}, {});
|
|
23
23
|
return { style: { animation: valueGenerator(animationCssProperties) } };
|
|
24
24
|
}
|