pds-dev-kit-web-test 2.2.48 → 2.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/assets/icons/fill/Home.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Home.js +30 -0
- package/dist/src/common/assets/icons/fill/PappType.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/PappType.js +30 -0
- package/dist/src/common/assets/icons/fill/Plan.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Plan.js +30 -0
- package/dist/src/common/assets/icons/fill/Sales.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Sales.js +30 -0
- package/dist/src/common/assets/icons/fill/SellerIntro.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/SellerIntro.js +30 -0
- package/dist/src/common/assets/icons/fill/Shoppingbag.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Shoppingbag.js +30 -0
- package/dist/src/common/assets/icons/fill/Site.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Site.js +30 -0
- package/dist/src/common/assets/icons/fill/StarShaped.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/StarShaped.js +30 -0
- package/dist/src/common/assets/icons/fill/Target.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Target.js +30 -0
- package/dist/src/common/assets/icons/fill/User.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/User.js +30 -0
- package/dist/src/common/assets/icons/fill/Xmark.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Xmark.js +30 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +11 -0
- package/dist/src/common/assets/icons/fill/index.js +23 -1
- package/dist/src/common/assets/icons/line/Site.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Site.js +30 -0
- package/dist/src/common/assets/icons/line/StarShaped.d.ts +4 -0
- package/dist/src/common/assets/icons/line/StarShaped.js +30 -0
- package/dist/src/common/assets/icons/line/Ticket.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Ticket.js +30 -0
- package/dist/src/common/assets/icons/line/User.d.ts +4 -0
- package/dist/src/common/assets/icons/line/User.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +4 -0
- package/dist/src/common/assets/icons/line/index.js +8 -0
- package/dist/src/common/services/i18n/resources/en.json +2 -1
- package/dist/src/common/services/i18n/resources/es.json +2 -1
- package/dist/src/common/services/i18n/resources/fil.json +2 -1
- package/dist/src/common/services/i18n/resources/index.d.ts +7 -0
- package/dist/src/common/services/i18n/resources/ja.json +2 -1
- package/dist/src/common/services/i18n/resources/ko.json +2 -1
- package/dist/src/common/services/i18n/resources/zh-cn.json +2 -1
- package/dist/src/common/services/i18n/resources/zh-tw.json +2 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +6 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +7 -2
- package/dist/src/common/styles/colorSet/UIColor.json +8 -1
- package/dist/src/common/styles/colorSet/index.d.ts +19 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +7 -0
- package/dist/src/common/types/components.d.ts +1 -0
- package/dist/src/desktop/components/BasicListItem/RightBox/MainButton.js +1 -2
- package/dist/src/desktop/components/BasicListItem/RightBox/Switch.js +1 -1
- package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +17 -5
- package/dist/src/desktop/components/DesktopAlertDialog/DesktopAlertDialog.js +6 -1
- package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.js +1 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/SecondaryMenu.js +68 -3
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/DynamicDesktopNavBarTemplates.d.ts +0 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.d.ts +0 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.js +5 -6
- package/dist/src/desktop/components/TextButton/TextButton.d.ts +3 -2
- package/dist/src/desktop/components/TextButton/TextButton.js +15 -2
- package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.d.ts +2 -1
- package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.js +20 -9
- package/dist/src/mobile/components/BasicListItem/RightBox/MainButton.js +1 -2
- package/dist/src/mobile/components/BasicListItem/RightBox/Switch.js +1 -1
- package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +15 -3
- package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +4 -3
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.d.ts +3 -2
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +18 -6
- package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +3 -2
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.js +50 -0
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +2467 -2
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +4321 -15
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +23 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +10 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +292 -26
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +14 -10
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/Embed.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/Embed.js +48 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.js +45 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/IframeDenied.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/IframeDenied.js +21 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.js +9 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/types.d.ts +6 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +6 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +5 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.d.ts +22 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +273 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/utils.d.ts +13 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/utils.js +127 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +21 -9
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +40 -11
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +14 -1
- package/dist/src/sub/DynamicLayout/types.d.ts +25 -19
- package/dist/src/sub/DynamicLayout/utils/deepCopy.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/utils/deepCopy.js +15 -0
- package/package.json +2 -2
- package/release-note.md +5 -6
- package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +0 -2
- package/dist/src/sub/DynamicLayout/mock_customSection.js +0 -840
- package/dist/src/sub/DynamicLayout/nakedMocks.json +0 -847
|
@@ -81,7 +81,7 @@ function DesktopHeaderBar(_a) {
|
|
|
81
81
|
var leftButton2Mode = function () {
|
|
82
82
|
switch (leftBtn2Mode) {
|
|
83
83
|
case 'mbtn': {
|
|
84
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: styleTheme === 'type_a' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" }), (0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { styleTheme: "secondary", size: "xsmall", text: leftBtn2Text, onClick: handleClickLeft2Btn })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "round", baseSize: "xsmall", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconFillType: "fill", iconSize: 16, iconName: "
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: styleTheme === 'type_a' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" }), (0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { styleTheme: "secondary", size: "xsmall", text: leftBtn2Text, onClick: handleClickLeft2Btn })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { shapeType: "round", baseSize: "xsmall", baseColorKey: "ui_cpnt_button_fill_base_transparent", iconFillType: "fill", iconSize: 16, iconName: "ic_question", iconColorKey: "ui_cpnt_button_icon_primary", fillType: "fill", onClick: handleClickLeft2Btn })] })) }));
|
|
85
85
|
}
|
|
86
86
|
case 'tbtn': {
|
|
87
87
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" }), (0, jsx_runtime_1.jsx)(TextButton_1.TextButton, { size: "xsmall", text: leftBtn2Text, onClick: handleClickLeft2Btn })] }));
|
|
@@ -19,12 +19,77 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
+
var react_1 = require("react");
|
|
23
|
+
var smoothscroll_polyfill_1 = __importDefault(require("smoothscroll-polyfill"));
|
|
22
24
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
+
var __1 = require("../../..");
|
|
26
|
+
var hooks_1 = require("../../../../common/hooks");
|
|
23
27
|
var MenuItemNav_1 = require("../components/MenuItemNav");
|
|
28
|
+
// NOTE: safari-scroll-behavior-smooth polyfill
|
|
29
|
+
smoothscroll_polyfill_1.default.polyfill();
|
|
30
|
+
var DESKTOP_SCROLL_LEFT = 320;
|
|
24
31
|
function SecondaryMenu(_a) {
|
|
25
32
|
var menus = _a.menus, showMenuAsIcon = _a.showMenuAsIcon, style = _a.style;
|
|
26
|
-
|
|
33
|
+
var _b = (0, react_1.useState)({ node: null }), primaryRef = _b[0], setPrimaryRef = _b[1];
|
|
34
|
+
var primaryCallbackRef = (0, react_1.useCallback)(function (node) {
|
|
35
|
+
if (!node) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
setPrimaryRef({ node: node });
|
|
39
|
+
}, [menus]);
|
|
40
|
+
(0, react_1.useEffect)(function () {
|
|
41
|
+
if (!primaryRef.node) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
primaryRef.node.addEventListener('wheel', handleScroll);
|
|
45
|
+
function handleScroll(e) {
|
|
46
|
+
if (primaryRef.node) {
|
|
47
|
+
primaryRef.node.scrollTo({ left: primaryRef.node.scrollLeft + e.deltaY });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return function () {
|
|
51
|
+
if (!primaryRef.node) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
primaryRef.node.removeEventListener('scroll', handleScroll);
|
|
55
|
+
};
|
|
56
|
+
}, [primaryRef]);
|
|
57
|
+
var _c = (0, hooks_1.useDetectOverflow)(primaryRef, true), trigger = _c.trigger, isOverflow = _c.isOverflow, isScrollBoxStart = _c.isScrollBoxStart, isScrollBoxEnd = _c.isScrollBoxEnd;
|
|
58
|
+
var onClickLeftButton = function () {
|
|
59
|
+
primaryRef.node &&
|
|
60
|
+
primaryRef.node.scroll({
|
|
61
|
+
left: primaryRef.node.scrollLeft - DESKTOP_SCROLL_LEFT,
|
|
62
|
+
behavior: 'smooth'
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var onClickRightButton = function () {
|
|
66
|
+
primaryRef.node &&
|
|
67
|
+
primaryRef.node.scroll({
|
|
68
|
+
left: primaryRef.node.scrollLeft + DESKTOP_SCROLL_LEFT,
|
|
69
|
+
behavior: 'smooth'
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(S_SecondaryMenu, __assign({ style: style }, { children: [isOverflow && !isScrollBoxStart && ((0, jsx_runtime_1.jsx)(S_LeftButtonWrapper, { children: (0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(__1.D_IconButton, { fillType: "fill", baseSize: "medium", baseColorKey: "ui_menu_background", iconName: "ic_arrow_left", iconFillType: "line", iconColorKey: "ui_cpnt_button_icon_default", shapeType: "circular", iconSize: 20, onClick: onClickLeftButton }) }) })), (0, jsx_runtime_1.jsx)(S_Main_SecondaryMenu, __assign({ style: style, onScroll: function () { return trigger(); }, ref: primaryCallbackRef }, { children: menus.map(function (menu, index) { return ((0, jsx_runtime_1.jsx)(MenuItemNav_1.MenuItemNav, { menu: menu, showMenuAsIcon: showMenuAsIcon }, index)); }) })), isOverflow && !isScrollBoxEnd && ((0, jsx_runtime_1.jsx)(S_RightButtonWrapper, { children: (0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(__1.D_IconButton, { fillType: "fill", baseSize: "medium", baseColorKey: "ui_menu_background", iconName: "ic_arrow_right", iconFillType: "line", iconColorKey: "ui_cpnt_button_icon_default", shapeType: "circular", iconSize: 20, onClick: onClickRightButton }) }) }))] })));
|
|
27
73
|
}
|
|
28
|
-
var S_Main_SecondaryMenu = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n grid-area: SECONDARY_MENU;\n"], ["\n display: flex;\n grid-area: SECONDARY_MENU;\n"])));
|
|
74
|
+
var S_Main_SecondaryMenu = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n grid-area: SECONDARY_MENU;\n overflow-x: auto;\n overscroll-behavior-y: none;\n width: max-content;\n\n & > div:first-child {\n margin-left: 32px;\n }\n"], ["\n display: flex;\n grid-area: SECONDARY_MENU;\n overflow-x: auto;\n overscroll-behavior-y: none;\n width: max-content;\n\n & > div:first-child {\n margin-left: 32px;\n }\n"])));
|
|
75
|
+
var S_SecondaryMenu = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n height: 48px;\n max-height: 100%;\n max-width: 100%;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n width: 100%;\n"], ["\n display: flex;\n height: 48px;\n max-height: 100%;\n max-width: 100%;\n overflow-x: hidden;\n overflow-y: hidden;\n position: relative;\n width: 100%;\n"])));
|
|
76
|
+
var S_RightButtonWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 100%;\n position: absolute;\n right: 0;\n\n &::before {\n background: ", ";\n content: '';\n display: block;\n height: 100%;\n pointer-events: none;\n width: 50px;\n }\n"], ["\n align-items: center;\n display: flex;\n height: 100%;\n position: absolute;\n right: 0;\n\n &::before {\n background: ", ";\n content: '';\n display: block;\n height: 100%;\n pointer-events: none;\n width: 50px;\n }\n"])), function (_a) {
|
|
77
|
+
var theme = _a.theme;
|
|
78
|
+
return "linear-gradient(to left, ".concat(theme.ui_menu_background, " 10%, ").concat(theme.ui_cpnt_pg_gradient_02, " 90%)");
|
|
79
|
+
});
|
|
80
|
+
var S_LeftButtonWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 100%;\n left: 0;\n position: absolute;\n\n &::after {\n background: ", ";\n content: '';\n display: block;\n height: 100%;\n pointer-events: none;\n width: 50px;\n }\n"], ["\n align-items: center;\n display: flex;\n height: 100%;\n left: 0;\n position: absolute;\n\n &::after {\n background: ", ";\n content: '';\n display: block;\n height: 100%;\n pointer-events: none;\n width: 50px;\n }\n"])), function (_a) {
|
|
81
|
+
var theme = _a.theme;
|
|
82
|
+
return "linear-gradient(to right, ".concat(theme.ui_menu_background, " 20%, ").concat(theme.ui_cpnt_pg_gradient_02, " 80%)");
|
|
83
|
+
});
|
|
84
|
+
var S_ButtonWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n height: 50px;\n\n & > button {\n background-color: ", ";\n\n * path {\n stroke: ", ";\n }\n }\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n height: 50px;\n\n & > button {\n background-color: ", ";\n\n * path {\n stroke: ", ";\n }\n }\n"])), function (_a) {
|
|
85
|
+
var theme = _a.theme;
|
|
86
|
+
return theme.ui_menu_background;
|
|
87
|
+
}, function (_a) {
|
|
88
|
+
var theme = _a.theme;
|
|
89
|
+
return theme.ui_menu_button_base;
|
|
90
|
+
}, function (_a) {
|
|
91
|
+
var theme = _a.theme;
|
|
92
|
+
return theme.ui_temp_grey_02;
|
|
93
|
+
});
|
|
29
94
|
exports.default = SecondaryMenu;
|
|
30
|
-
var templateObject_1;
|
|
95
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -74,7 +74,7 @@ exports.TEMPLATES_DATA = {
|
|
|
74
74
|
showSecondaryMenu: false,
|
|
75
75
|
primaryMenuOptions: {
|
|
76
76
|
showMenuAsIcon: false,
|
|
77
|
-
maxLength:
|
|
77
|
+
maxLength: 99,
|
|
78
78
|
style: {
|
|
79
79
|
justifyContent: 'flex-end'
|
|
80
80
|
}
|
|
@@ -188,7 +188,7 @@ exports.TEMPLATES_DATA = {
|
|
|
188
188
|
showSecondaryMenu: false,
|
|
189
189
|
primaryMenuOptions: {
|
|
190
190
|
showMenuAsIcon: false,
|
|
191
|
-
maxLength:
|
|
191
|
+
maxLength: 99,
|
|
192
192
|
style: {
|
|
193
193
|
justifyContent: 'flex-end'
|
|
194
194
|
}
|
|
@@ -235,18 +235,17 @@ exports.TEMPLATES_DATA = {
|
|
|
235
235
|
showSecondaryMenu: true,
|
|
236
236
|
primaryMenuOptions: {
|
|
237
237
|
showMenuAsIcon: false,
|
|
238
|
-
maxLength:
|
|
238
|
+
maxLength: 99,
|
|
239
239
|
style: {
|
|
240
240
|
justifyContent: 'right'
|
|
241
241
|
}
|
|
242
242
|
},
|
|
243
243
|
secondaryMenuOptions: {
|
|
244
244
|
showMenuAsIcon: false,
|
|
245
|
-
maxLength:
|
|
245
|
+
maxLength: 99,
|
|
246
246
|
style: {
|
|
247
247
|
width: '100%',
|
|
248
|
-
justifyContent: 'left'
|
|
249
|
-
paddingLeft: '32px'
|
|
248
|
+
justifyContent: 'left'
|
|
250
249
|
}
|
|
251
250
|
},
|
|
252
251
|
userProfileOptions: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { PDSTextType } from '../../../common';
|
|
2
|
+
import type React from 'react';
|
|
3
3
|
export type TextButtonProps = {
|
|
4
4
|
text?: PDSTextType;
|
|
5
5
|
size?: 'rlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
@@ -9,6 +9,7 @@ export type TextButtonProps = {
|
|
|
9
9
|
state?: 'normal' | 'disabled';
|
|
10
10
|
colorTheme?: 'none' | 'red' | 'grey_01' | 'grey2' | 'white' | 'white2';
|
|
11
11
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
12
13
|
};
|
|
13
|
-
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, colorTheme, onClick, ...rest }: TextButtonProps): JSX.Element;
|
|
14
|
+
declare function TextButton({ text, size, responsiveMode, fontWeight, type, state, colorTheme, onClick, onKeyDown, ...rest }: TextButtonProps): JSX.Element;
|
|
14
15
|
export default TextButton;
|
|
@@ -50,6 +50,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
50
50
|
};
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
53
|
+
var react_1 = require("react");
|
|
53
54
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
54
55
|
var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
|
|
55
56
|
var TextLabel_1 = require("../TextLabel");
|
|
@@ -69,13 +70,25 @@ var textColor = {
|
|
|
69
70
|
white2: 'sysTextWhite'
|
|
70
71
|
};
|
|
71
72
|
function TextButton(_a) {
|
|
72
|
-
var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, onClick = _a.onClick, rest = __rest(_a, ["text", "size", "responsiveMode", "fontWeight", "type", "state", "colorTheme", "onClick"]);
|
|
73
|
+
var text = _a.text, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.responsiveMode, responsiveMode = _c === void 0 ? 'none' : _c, fontWeight = _a.fontWeight, _d = _a.type, type = _d === void 0 ? 'button' : _d, _e = _a.state, state = _e === void 0 ? 'normal' : _e, _f = _a.colorTheme, colorTheme = _f === void 0 ? 'none' : _f, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["text", "size", "responsiveMode", "fontWeight", "type", "state", "colorTheme", "onClick", "onKeyDown"]);
|
|
74
|
+
var buttonRef = (0, react_1.useRef)(null);
|
|
75
|
+
/**
|
|
76
|
+
* @when keydown 이벤트가 있을 때만
|
|
77
|
+
* @expected onKeyDown 이벤트가 작동하기 위해 버튼에 포커스를 맞춥니다.
|
|
78
|
+
*/
|
|
79
|
+
(0, react_1.useEffect)(function () {
|
|
80
|
+
if (!onKeyDown)
|
|
81
|
+
return;
|
|
82
|
+
if (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) {
|
|
83
|
+
buttonRef.current.focus();
|
|
84
|
+
}
|
|
85
|
+
}, []);
|
|
73
86
|
var handleClick = function (e) {
|
|
74
87
|
if (onClick) {
|
|
75
88
|
onClick(e);
|
|
76
89
|
}
|
|
77
90
|
};
|
|
78
|
-
return ((0, jsx_runtime_1.jsx)(S_Button, __assign({ "x-pds-name": "TextButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, rest, { size: size, responsiveMode: responsiveMode, onClick: handleClick, type: type, fontWeight: fontWeight, disabled: state === 'disabled', state: state, colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : textColor[colorTheme], singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })));
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)(S_Button, __assign({ ref: buttonRef, "x-pds-name": "TextButton", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, rest, { size: size, responsiveMode: responsiveMode, onClick: handleClick, onKeyDown: onKeyDown, type: type, fontWeight: fontWeight, disabled: state === 'disabled', state: state, colorTheme: colorTheme }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: textStyle[size], colorTheme: state === 'disabled' ? 'sysTextTertiary' : textColor[colorTheme], singleLineMode: "use", ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }) })));
|
|
79
92
|
}
|
|
80
93
|
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 14px;\n height: 48px;\n ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"], ["\n border-radius: 14px;\n height: 48px;\n ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"])), function (_a) {
|
|
81
94
|
var size = _a.size;
|
|
@@ -12,7 +12,8 @@ export type DesktopTutorialModalInfoType = {
|
|
|
12
12
|
type DesktopTutorialModalProps = {
|
|
13
13
|
modalTitleText: PDSTextType;
|
|
14
14
|
infoArray: DesktopTutorialModalInfoType[];
|
|
15
|
+
sequenceMode?: 'use' | 'none';
|
|
15
16
|
onClose: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
17
|
};
|
|
17
|
-
declare function DesktopTutorialModal({ modalTitleText, infoArray, onClose }: DesktopTutorialModalProps): import("react").ReactPortal;
|
|
18
|
+
declare function DesktopTutorialModal({ modalTitleText, infoArray, sequenceMode, onClose }: DesktopTutorialModalProps): import("react").ReactPortal;
|
|
18
19
|
export default DesktopTutorialModal;
|
|
@@ -28,7 +28,7 @@ var hybrid_1 = require("../../../hybrid");
|
|
|
28
28
|
var components_1 = require("../../components");
|
|
29
29
|
var Components_1 = require("./Components");
|
|
30
30
|
function DesktopTutorialModal(_a) {
|
|
31
|
-
var modalTitleText = _a.modalTitleText, infoArray = _a.infoArray, onClose = _a.onClose;
|
|
31
|
+
var modalTitleText = _a.modalTitleText, infoArray = _a.infoArray, _b = _a.sequenceMode, sequenceMode = _b === void 0 ? 'use' : _b, onClose = _a.onClose;
|
|
32
32
|
var container = (0, react_1.useState)(function () {
|
|
33
33
|
var modalRoot = document.createElement('div');
|
|
34
34
|
modalRoot.setAttribute('id', 'DesktopTutorialModal');
|
|
@@ -44,12 +44,7 @@ function DesktopTutorialModal(_a) {
|
|
|
44
44
|
root.removeChild(container);
|
|
45
45
|
};
|
|
46
46
|
}, []);
|
|
47
|
-
var
|
|
48
|
-
if (onClose) {
|
|
49
|
-
onClose(e);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var _b = (0, react_1.useState)("".concat(infoArray[0].sideTabTitleText, "0")), selectedItem = _b[0], setSelectedItem = _b[1];
|
|
47
|
+
var _c = (0, react_1.useState)("".concat(infoArray[0].sideTabTitleText, "0")), selectedItem = _c[0], setSelectedItem = _c[1];
|
|
53
48
|
var sideTabTitleArray = infoArray.map(function (data, index) {
|
|
54
49
|
return {
|
|
55
50
|
title: data.sideTabTitleText,
|
|
@@ -57,15 +52,31 @@ function DesktopTutorialModal(_a) {
|
|
|
57
52
|
onClick: function () { return setSelectedItem("".concat(data.sideTabTitleText).concat(index)); }
|
|
58
53
|
};
|
|
59
54
|
});
|
|
55
|
+
var lastIndex = infoArray.length - 1;
|
|
56
|
+
var numberPattern = /\d+$/;
|
|
57
|
+
var selectedItemIndexPart = selectedItem.match(numberPattern);
|
|
58
|
+
var selectedItemIndex = selectedItemIndexPart && parseInt(selectedItemIndexPart[0], 10);
|
|
59
|
+
var handleClickNextBtn = function () {
|
|
60
|
+
if (selectedItemIndexPart) {
|
|
61
|
+
var incrementedIndex = parseInt(selectedItemIndexPart[0], 10) + 1;
|
|
62
|
+
var newSelectedItem = "".concat(infoArray[incrementedIndex].sideTabTitleText).concat(incrementedIndex);
|
|
63
|
+
setSelectedItem(newSelectedItem);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var handleClickCloseBtn = function (e) {
|
|
67
|
+
if (onClose) {
|
|
68
|
+
onClose(e);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
60
71
|
return react_dom_1.default.createPortal((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(S_ModalWrapper, __assign({ "x-pds-name": "DesktopTutorialModal", "x-pds-element-type": "panel", "x-pds-device-type": "desktop" }, { children: [(0, jsx_runtime_1.jsxs)(S_LeftPanel, { children: [(0, jsx_runtime_1.jsx)(S_Header, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: modalTitleText, lineLimit: 2, ellipsisMode: "use", styleTheme: "headingBold" }) }), (0, jsx_runtime_1.jsxs)(S_SideTabWrapper, { children: [(0, jsx_runtime_1.jsx)(Components_1.SideTab, { itemArray: sideTabTitleArray }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_i" })] })] }), infoArray
|
|
61
72
|
.filter(function (data, index) { return selectedItem === "".concat(data.sideTabTitleText).concat(index); })
|
|
62
|
-
.map(function (data, index) { return ((0, jsx_runtime_1.jsxs)(S_RightPanel, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { src: data.imageSrc, shapeType: "rectangle", width: "responsive", ratio: "16_9", scaleType: "cover", backgroundFillMode: "use" }), (0, jsx_runtime_1.jsxs)(S_InfoBox, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: data.infoTitleText ? data.infoTitleText : data.sideTabTitleText, styleTheme: "headingBold" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: data.infoDescText, styleTheme: "body2Regular", colorTheme: "sysTextSecondary" })] }), data.btnMode === 'btn_amount1' && ((0, jsx_runtime_1.jsx)(S_Footer, { children: (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: data.btn1Text, type: "button", size: "medium", onClick: data.onClickBtn1 }) }))] }, "".concat(data.sideTabTitleText).concat(index))); }), (0, jsx_runtime_1.jsx)(S_IconButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.IconButton, { shapeType: "circular", baseSize: "medium", baseColorKey: "ui_cpnt_button_fill_base_tutorialmodal", iconName: "ic_xmark", iconColorKey: "ui_cpnt_button_icon_white", onClick: handleClickCloseBtn }) })] }))] }), container);
|
|
73
|
+
.map(function (data, index) { return ((0, jsx_runtime_1.jsxs)(S_RightPanel, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.ImageView, { src: data.imageSrc, shapeType: "rectangle", width: "responsive", ratio: "16_9", scaleType: "cover", backgroundFillMode: "use" }), (0, jsx_runtime_1.jsxs)(S_InfoBox, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: data.infoTitleText ? data.infoTitleText : data.sideTabTitleText, styleTheme: "headingBold" }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: data.infoDescText, styleTheme: "body2Regular", colorTheme: "sysTextSecondary" })] }), data.btnMode === 'btn_amount1' && ((0, jsx_runtime_1.jsx)(S_Footer, { children: (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: data.btn1Text, type: "button", size: "medium", onClick: data.onClickBtn1 }) }))] }, "".concat(data.sideTabTitleText).concat(index))); }), (0, jsx_runtime_1.jsx)(S_IconButtonWrapper, { children: sequenceMode === 'use' && selectedItemIndex !== lastIndex ? ((0, jsx_runtime_1.jsx)(components_1.IconButton, { shapeType: "circular", baseSize: "medium", baseColorKey: "ui_cpnt_button_fill_base_tutorialmodal", iconName: "ic_arrow_right", iconColorKey: "ui_cpnt_button_icon_white", onClick: handleClickNextBtn })) : ((0, jsx_runtime_1.jsx)(components_1.IconButton, { shapeType: "circular", baseSize: "medium", baseColorKey: "ui_cpnt_button_fill_base_tutorialmodal", iconName: "ic_xmark", iconColorKey: "ui_cpnt_button_icon_white", onClick: handleClickCloseBtn })) })] }))] }), container);
|
|
63
74
|
}
|
|
64
75
|
var S_ModalOverlay = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"], ["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"])), function (_a) {
|
|
65
76
|
var theme = _a.theme;
|
|
66
77
|
return theme.ui_cpnt_modal_dimmed;
|
|
67
78
|
}, animationStyle_1.modalOverlayOnAni);
|
|
68
|
-
var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n
|
|
79
|
+
var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n height: 80vh;\n left: 50%;\n max-height: 720px;\n min-height: 560px;\n overflow: hidden;\n pointer-events: auto;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 960px;\n\n ", "\n"], ["\n background-color: ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n height: 80vh;\n left: 50%;\n max-height: 720px;\n min-height: 560px;\n overflow: hidden;\n pointer-events: auto;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 960px;\n\n ", "\n"])), function (_a) {
|
|
69
80
|
var theme = _a.theme;
|
|
70
81
|
return theme.ui_cpnt_modal_base;
|
|
71
82
|
}, function (_a) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
var components_1 = require("../../../../hybrid/components");
|
|
5
4
|
var MainButton_1 = require("../../MainButton");
|
|
6
5
|
var MainButton = function (_a) {
|
|
7
6
|
var text = _a.text, state = _a.state, fill = _a.fill, onClick = _a.onClick;
|
|
8
|
-
return ((0, jsx_runtime_1.
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { text: text, state: state, fillType: fill ? 'fill' : 'line', size: "small", onClick: onClick }));
|
|
9
8
|
};
|
|
10
9
|
exports.default = MainButton;
|
|
@@ -12,7 +12,7 @@ var components_1 = require("../../../../hybrid/components");
|
|
|
12
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
13
|
var Switch = function (_a) {
|
|
14
14
|
var name = _a.name, state = _a.state, status = _a.status, onClick = _a.onClick;
|
|
15
|
-
return ((0, jsx_runtime_1.
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(S_SwitchWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.Switch, { name: name, state: state, status: status, onClick: onClick }) }));
|
|
16
16
|
};
|
|
17
17
|
var S_SwitchWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n min-height: 32px;\n min-width: 68px;\n position: relative;\n right: 0;\n"], ["\n display: flex;\n justify-content: flex-end;\n min-height: 32px;\n min-width: 68px;\n position: relative;\n right: 0;\n"])));
|
|
18
18
|
exports.default = Switch;
|
|
@@ -65,13 +65,23 @@ function ContextMenuItem(_a) {
|
|
|
65
65
|
if (state === 'disabled') {
|
|
66
66
|
textColorTheme = 'sysTextTertiary';
|
|
67
67
|
}
|
|
68
|
+
var descTextColorTheme;
|
|
69
|
+
if (isSelected) {
|
|
70
|
+
descTextColorTheme = 'sysTextTertiary';
|
|
71
|
+
}
|
|
72
|
+
if (!isSelected && state === 'normal') {
|
|
73
|
+
descTextColorTheme = 'sysTextTertiary';
|
|
74
|
+
}
|
|
75
|
+
if (state === 'disabled') {
|
|
76
|
+
descTextColorTheme = 'sysTextTertiary';
|
|
77
|
+
}
|
|
68
78
|
var getIconColorKey = function () {
|
|
69
79
|
if (state === 'disabled') {
|
|
70
80
|
return 'ui_cpnt_dropdown_display_icon_disabled';
|
|
71
81
|
}
|
|
72
82
|
return 'ui_cpnt_dropdown_display_icon_normal';
|
|
73
83
|
};
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)(S_ContextMenuItem, __assign({ "x-pds-name": "ContextMenuItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", size: size, onClick: handleClick, selected: isSelected, displayType: displayType }, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (option === null || option === void 0 ? void 0 : option.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { size: size === 'small' ? 20 : 24, iconName: option.iconName, fillType: option.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b", spacingType: "width" }), ' '] })), (displayType === 'text_only' || displayType === 'icon_text') && (option === null || option === void 0 ? void 0 : option.text) && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: option.text || text, styleTheme: option.fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: textColorTheme, ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] })));
|
|
84
|
+
return ((0, jsx_runtime_1.jsxs)(S_ContextMenuItem, __assign({ "x-pds-name": "ContextMenuItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", size: size, onClick: handleClick, selected: isSelected, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_LeftSide, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (option === null || option === void 0 ? void 0 : option.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { size: size === 'small' ? 20 : 24, iconName: option.iconName, fillType: option.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b", spacingType: "width" }), ' '] })), (displayType === 'text_only' || displayType === 'icon_text') && (option === null || option === void 0 ? void 0 : option.text) && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: option.text || text, styleTheme: option.fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: textColorTheme, ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] }), (0, jsx_runtime_1.jsx)(S_RightSide, { children: (displayType === 'text_only' || displayType === 'icon_text') && (option === null || option === void 0 ? void 0 : option.descText) && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: option.descText, styleTheme: "form2Regular", singleLineMode: "use", colorTheme: descTextColorTheme, ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all", textAlign: "right" })) })] })));
|
|
75
85
|
}
|
|
76
86
|
var large = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 48px;\n padding: 0 ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"], ["\n height: 48px;\n padding: 0 ", ";\n\n & > div {\n height: 48px;\n line-height: 48px;\n }\n"])), function (_a) {
|
|
77
87
|
var theme = _a.theme;
|
|
@@ -85,7 +95,7 @@ var small = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 =
|
|
|
85
95
|
var theme = _a.theme;
|
|
86
96
|
return theme.spacing.spacingD;
|
|
87
97
|
});
|
|
88
|
-
var S_ContextMenuItem = styled_components_1.default.li(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
98
|
+
var S_ContextMenuItem = styled_components_1.default.li(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
89
99
|
var theme = _a.theme, selected = _a.selected;
|
|
90
100
|
return selected
|
|
91
101
|
? theme.ui_cpnt_contextmenu_menu_base_selected
|
|
@@ -97,5 +107,7 @@ var S_ContextMenuItem = styled_components_1.default.li(templateObject_4 || (temp
|
|
|
97
107
|
var size = _a.size;
|
|
98
108
|
return size && { large: large, medium: medium, small: small }[size];
|
|
99
109
|
});
|
|
110
|
+
var S_LeftSide = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
111
|
+
var S_RightSide = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
100
112
|
exports.default = ContextMenuItem;
|
|
101
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
113
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DynamicLayoutProps } from './types';
|
|
3
|
-
declare function DynamicLayout({ device, mode, isPreview, sections, scrollDownTargetSectionId, editingSectionId, navigationHandler, sectionActionHandler, onClickEditSection, programmedSectionComponents }: DynamicLayoutProps): JSX.Element;
|
|
3
|
+
declare function DynamicLayout({ device, mode, isPreview, sections, scrollDownTargetSectionId, editingSectionId, navigationHandler, sectionActionHandler, onClickEditSection, programmedSectionComponents, shortcutKeyMode, dynamicLayoutRef }: DynamicLayoutProps): JSX.Element;
|
|
4
4
|
export default DynamicLayout;
|
|
@@ -25,7 +25,7 @@ var EditModeSectionMatcher_1 = require("./components/EditModeSectionMatcher");
|
|
|
25
25
|
var SectionMatcher_1 = require("./components/SectionMatcher");
|
|
26
26
|
var dynamicLayoutContext_1 = require("./dynamicLayoutContext");
|
|
27
27
|
function DynamicLayout(_a) {
|
|
28
|
-
var device = _a.device, _b = _a.mode, mode = _b === void 0 ? 'NORMAL' : _b, isPreview = _a.isPreview, sections = _a.sections, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, navigationHandler = _a.navigationHandler, sectionActionHandler = _a.sectionActionHandler, onClickEditSection = _a.onClickEditSection, programmedSectionComponents = _a.programmedSectionComponents;
|
|
28
|
+
var device = _a.device, _b = _a.mode, mode = _b === void 0 ? 'NORMAL' : _b, isPreview = _a.isPreview, sections = _a.sections, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, navigationHandler = _a.navigationHandler, sectionActionHandler = _a.sectionActionHandler, onClickEditSection = _a.onClickEditSection, programmedSectionComponents = _a.programmedSectionComponents, shortcutKeyMode = _a.shortcutKeyMode, dynamicLayoutRef = _a.dynamicLayoutRef;
|
|
29
29
|
var filteredSortedSection = __spreadArray([], sections, true).filter(function (section) { return section.display; })
|
|
30
30
|
.sort(function (a, b) { return a.order - b.order; });
|
|
31
31
|
var iframeSection = filteredSortedSection.find(function (section) { return section.manifest.schema === 'EXP_IFRAME' && section.display; });
|
|
@@ -36,8 +36,9 @@ function DynamicLayout(_a) {
|
|
|
36
36
|
navigationHandler: navigationHandler,
|
|
37
37
|
sectionActionHandler: sectionActionHandler,
|
|
38
38
|
editingSectionId: editingSectionId,
|
|
39
|
-
programmedSectionComponents: programmedSectionComponents
|
|
40
|
-
|
|
39
|
+
programmedSectionComponents: programmedSectionComponents,
|
|
40
|
+
shortcutKeyMode: shortcutKeyMode
|
|
41
|
+
} }, { children: [mode === 'EDIT' && onClickEditSection && ((0, jsx_runtime_1.jsx)(EditModeSectionMatcher_1.EditModeSectionMatcher, { dynamicLayoutRef: dynamicLayoutRef, editingSectionId: editingSectionId, scrollDownTargetSectionId: scrollDownTargetSectionId, filteredSortedSection: filteredSortedSection, onClickEditSection: onClickEditSection })), mode !== 'EDIT' &&
|
|
41
42
|
(iframeSection ? ((0, jsx_runtime_1.jsx)(SectionMatcher_1.SectionMatcher, __assign({}, iframeSection), iframeSection.id)) : (filteredSortedSection.map(function (section) { return (0, jsx_runtime_1.jsx)(SectionMatcher_1.SectionMatcher, __assign({}, section), section.id); })))] })));
|
|
42
43
|
}
|
|
43
44
|
exports.default = DynamicLayout;
|
package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { ISection } from '../../types';
|
|
3
|
-
export default function EditModeSectionMatcher({ filteredSortedSection, scrollDownTargetSectionId, editingSectionId, onClickEditSection }: {
|
|
2
|
+
import type { DynamicLayoutProps, ISection } from '../../types';
|
|
3
|
+
export default function EditModeSectionMatcher({ filteredSortedSection, scrollDownTargetSectionId, editingSectionId, dynamicLayoutRef, onClickEditSection }: {
|
|
4
4
|
filteredSortedSection: ISection[];
|
|
5
5
|
scrollDownTargetSectionId?: number;
|
|
6
6
|
editingSectionId?: number;
|
|
7
|
+
dynamicLayoutRef: DynamicLayoutProps['dynamicLayoutRef'];
|
|
7
8
|
onClickEditSection: (section: ISection) => void;
|
|
8
9
|
}): JSX.Element;
|
package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js
CHANGED
|
@@ -26,19 +26,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
+
var react_1 = require("react");
|
|
29
30
|
var sections_1 = require("../../../DynamicLayout/sections");
|
|
30
31
|
var SectionBox_1 = __importDefault(require("./SectionBox"));
|
|
31
32
|
function EditModeSectionMatcher(_a) {
|
|
32
|
-
var filteredSortedSection = _a.filteredSortedSection, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, onClickEditSection = _a.onClickEditSection;
|
|
33
|
+
var filteredSortedSection = _a.filteredSortedSection, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, dynamicLayoutRef = _a.dynamicLayoutRef, onClickEditSection = _a.onClickEditSection;
|
|
33
34
|
var iframeSection = filteredSortedSection.find(function (section) { return section.manifest.schema === 'EXP_IFRAME' && section.display; });
|
|
34
|
-
|
|
35
|
+
var _b = (0, react_1.useState)(null), selectedSectionRef = _b[0], setSelectedSectionRef = _b[1];
|
|
36
|
+
var refCallback = (0, react_1.useCallback)(function (node) {
|
|
37
|
+
setSelectedSectionRef(node);
|
|
38
|
+
}, []);
|
|
39
|
+
(0, react_1.useImperativeHandle)(dynamicLayoutRef, function () {
|
|
40
|
+
return {
|
|
41
|
+
selectCB: function (cb) {
|
|
42
|
+
selectedSectionRef === null || selectedSectionRef === void 0 ? void 0 : selectedSectionRef.selectCB(cb);
|
|
43
|
+
},
|
|
44
|
+
selectCBInBulk: function (cbIds) {
|
|
45
|
+
selectedSectionRef === null || selectedSectionRef === void 0 ? void 0 : selectedSectionRef.selectCBInBulk(cbIds);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}, [selectedSectionRef]);
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: iframeSection ? ((0, jsx_runtime_1.jsx)(SectionBox_1.default, __assign({ isIframeSection: true, isEditing: editingSectionId === iframeSection.id, scrollIntoThisSection: iframeSection.id === scrollDownTargetSectionId, onClick: function () { return onClickEditSection(iframeSection); } }, { children: (0, jsx_runtime_1.jsx)(DesignedSectionsMatcher, __assign({}, iframeSection)) }), iframeSection.id)) : (filteredSortedSection.map(function (section) { return ((0, jsx_runtime_1.jsx)(SectionBox_1.default, __assign({ isEditing: editingSectionId === section.id, scrollIntoThisSection: section.id === scrollDownTargetSectionId, onClick: function () { return onClickEditSection(section); } }, { children: section.type === 'CUSTOM' ? ((0, jsx_runtime_1.jsx)(sections_1.CustomSection, __assign({}, section, { ref: editingSectionId === section.id ? refCallback : null }))) : ((0, jsx_runtime_1.jsx)(DesignedSectionsMatcher, __assign({}, section))) }), section.id)); })) }));
|
|
35
50
|
}
|
|
36
51
|
exports.default = EditModeSectionMatcher;
|
|
37
|
-
function
|
|
52
|
+
function DesignedSectionsMatcher(_a) {
|
|
38
53
|
var props = __rest(_a, []);
|
|
39
|
-
if (props.type === 'CUSTOM') {
|
|
40
|
-
return (0, jsx_runtime_1.jsx)(sections_1.CustomSection, __assign({}, props));
|
|
41
|
-
}
|
|
42
54
|
var schema = props.manifest.schema;
|
|
43
55
|
switch (schema) {
|
|
44
56
|
case 'BASE_INTRO':
|
|
@@ -30,8 +30,9 @@ function CustomSectionBackground(_a) {
|
|
|
30
30
|
var context = (0, react_1.useContext)(sectionContext_1.sectionContext);
|
|
31
31
|
var id = context.id, jsonProperties = context.jsonProperties;
|
|
32
32
|
var backgroundRef = (0, react_1.useRef)(null);
|
|
33
|
-
var
|
|
34
|
-
var
|
|
33
|
+
var data = jsonProperties.data;
|
|
34
|
+
var CB_STYLE_PROP_BGOVERLAY = data.CB_STYLE_PROP_BGOVERLAY, CB_STYLE_PROP_BGMEDIA = data.CB_STYLE_PROP_BGMEDIA;
|
|
35
|
+
var _c = (0, util_1.parseJsonProperties)(data, isMobile ? 'MOBILE' : 'DESKTOP'), style = _c.style, overlayStyle = _c.overlayStyle, effect = _c.effect;
|
|
35
36
|
var isOverlay = getIsOverlay(isMobile, CB_STYLE_PROP_BGOVERLAY);
|
|
36
37
|
var isBgMedia = getIsBgMedia(isMobile, CB_STYLE_PROP_BGMEDIA);
|
|
37
38
|
var mediaType = getMediaType(isMobile, CB_STYLE_PROP_BGMEDIA);
|
package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const CUSTOMSECTION_SHORTCUT_KEYS: string[];
|
|
2
|
+
export type CustomSectionShortcutType = 'BULK_SELECT' | 'COLLISION_SELECT' | 'SELECT_ALL' | null;
|
|
3
|
+
declare function useCustomSectionShortcut(): {
|
|
4
|
+
shortcut: CustomSectionShortcutType;
|
|
5
|
+
};
|
|
6
|
+
export default useCustomSectionShortcut;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUSTOMSECTION_SHORTCUT_KEYS = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
exports.CUSTOMSECTION_SHORTCUT_KEYS = ['Shift', 'Meta', 'A', 'ㅁ'];
|
|
6
|
+
function useCustomSectionShortcut() {
|
|
7
|
+
var _a = (0, react_1.useState)(null), shortcut = _a[0], setShortcut = _a[1];
|
|
8
|
+
(0, react_1.useEffect)(function () {
|
|
9
|
+
var keys = new Map();
|
|
10
|
+
function onKeyDown(e) {
|
|
11
|
+
if (!exports.CUSTOMSECTION_SHORTCUT_KEYS.includes(e.key)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
keys.set(e.key, true);
|
|
15
|
+
var isShiftOn = keys.get('Shift');
|
|
16
|
+
var isMetaOn = keys.get('Meta');
|
|
17
|
+
var isAOn = keys.get('A') || keys.get('ㅁ');
|
|
18
|
+
if (isShiftOn && isAOn) {
|
|
19
|
+
setShortcut('SELECT_ALL');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (isShiftOn && isMetaOn) {
|
|
23
|
+
setShortcut('COLLISION_SELECT');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (isShiftOn) {
|
|
27
|
+
setShortcut('BULK_SELECT');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function onKeyUp(e) {
|
|
31
|
+
if (e.key === 'a') {
|
|
32
|
+
keys.delete('A');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
keys.delete(e.key);
|
|
36
|
+
}
|
|
37
|
+
setShortcut(null);
|
|
38
|
+
}
|
|
39
|
+
document.addEventListener('keydown', onKeyDown);
|
|
40
|
+
document.addEventListener('keyup', onKeyUp);
|
|
41
|
+
return function () {
|
|
42
|
+
document.removeEventListener('keydown', onKeyDown);
|
|
43
|
+
document.removeEventListener('keyup', onKeyUp);
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
return {
|
|
47
|
+
shortcut: shortcut
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.default = useCustomSectionShortcut;
|