pds-dev-kit-web 2.0.9-alpha.4 → 2.0.9-alpha.6
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/services/i18n/resources/en.json +19 -1
- package/dist/src/common/services/i18n/resources/es.json +19 -1
- package/dist/src/common/services/i18n/resources/fil.json +19 -1
- package/dist/src/common/services/i18n/resources/index.d.ts +126 -0
- package/dist/src/common/services/i18n/resources/ja.json +19 -1
- package/dist/src/common/services/i18n/resources/ko.json +19 -1
- package/dist/src/common/services/i18n/resources/zh-cn.json +19 -1
- package/dist/src/common/services/i18n/resources/zh-tw.json +19 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +3 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +3 -1
- package/dist/src/common/styles/colorSet/SemanticColor.json +5 -1
- package/dist/src/common/styles/colorSet/UIColor.json +3 -1
- package/dist/src/common/styles/colorSet/index.d.ts +12 -2
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +2 -0
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +1 -2
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +19 -13
- package/dist/src/sub/DynamicLayout/mock_storybook.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/mock_storybook.js +785 -12
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/MembershipSection.js +29 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/TemplateA.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/TemplateA.js +3 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/D_TemplateA.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/D_TemplateA.js +4 -14
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipPlanSheet.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipPlanSheet.js +32 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipSheet.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/EmptyMembershipSheet.js +35 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipBenefitInfo.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.d.ts +3 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipPlanSheet.js +30 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/MembershipSheet.js +8 -6
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/NarrowMembershipListView.js +3 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/SectionContents.js +16 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/WideMembershipListView.js +1 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/M_TemplateA.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/M_TemplateA.js +5 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/EmptyMembershipSheet.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/EmptyMembershipSheet.js +36 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipContents.js +4 -8
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/SectionContents.js +19 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/TemplateB.d.ts +3 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/TemplateB.js +3 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/D_TemplateB.d.ts +2 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/D_TemplateB.js +4 -14
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipPlanSheet.d.ts +7 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipPlanSheet.js +32 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipSheet.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/EmptyMembershipSheet.js +35 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.js +2 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipCard.js +14 -12
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.js +28 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipSheet.js +3 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/SectionContents.js +15 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/M_TemplateB.js +12 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/EmptyMembershipSheet.d.ts +3 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/EmptyMembershipSheet.js +52 -0
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipContents.js +5 -9
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipSectionSheet.js +4 -6
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/SectionContents.js +2 -5
- 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 +16 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/M_TemplateA.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/M_TemplateA.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateA/mobile/components/SectionContents.js +19 -4
- 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 +15 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/M_TemplateB.js +11 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/NormalType/templates/TemplateB/mobile/components/SectionContents.js +2 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.d.ts +7 -5
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/desktop/MembershipSectionItem.js +20 -15
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.d.ts +5 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/components/mobile/MembershipSectionItem.js +17 -15
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/constants.d.ts +8 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/constants.js +31 -3
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/type.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/types.d.ts +3 -3
- package/dist/src/sub/DynamicLayout/utils/formatCurrency.d.ts +8 -0
- package/dist/src/sub/DynamicLayout/utils/formatCurrency.js +27 -0
- package/package.json +1 -1
- package/release-note.md +2 -2
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/GlobalFixedOverlay.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/GlobalFixedOverlay.js +0 -43
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlay.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlay.js +0 -80
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlayMembershipList.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlayMembershipList.js +0 -27
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlayPlanSheet.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/MembershipSectionGlobalFixedOverlayPlanSheet.js +0 -39
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/MembershipSectionGlobalFixedOverlay/index.js +0 -8
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/GlobalFixedOverlay/index.js +0 -8
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/index.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/components/index.js +0 -5
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare function
|
|
3
|
-
export default
|
|
2
|
+
declare function TemplateA(): JSX.Element;
|
|
3
|
+
export default TemplateA;
|
|
@@ -12,10 +12,10 @@ var react_1 = require("react");
|
|
|
12
12
|
var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
|
|
13
13
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
14
14
|
var SectionContents_1 = __importDefault(require("./components/SectionContents"));
|
|
15
|
-
function
|
|
15
|
+
function TemplateA() {
|
|
16
16
|
return ((0, jsx_runtime_1.jsxs)(S_MembershipSection, { children: [(0, jsx_runtime_1.jsx)(SectionContents_1.default, {}, void 0), (0, jsx_runtime_1.jsx)(MembershipSection, {}, void 0)] }, void 0));
|
|
17
17
|
}
|
|
18
|
-
var S_MembershipSection = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin
|
|
18
|
+
var S_MembershipSection = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: ", " auto;\n padding: 0 ", ";\n"], ["\n margin: ", " auto;\n padding: 0 ", ";\n"])), function (_a) {
|
|
19
19
|
var theme = _a.theme;
|
|
20
20
|
return theme.spacing.spacingG;
|
|
21
21
|
}, function (_a) {
|
|
@@ -29,5 +29,5 @@ function MembershipSection() {
|
|
|
29
29
|
}
|
|
30
30
|
return programmedSectionComponents.PRG_MEMBERSHIP_DISPLAY ? (programmedSectionComponents.PRG_MEMBERSHIP_DISPLAY) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0));
|
|
31
31
|
}
|
|
32
|
-
exports.default =
|
|
32
|
+
exports.default = TemplateA;
|
|
33
33
|
var templateObject_1;
|
|
@@ -3,6 +3,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
6
17
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
19
|
};
|
|
@@ -19,15 +30,19 @@ function SectionContents() {
|
|
|
19
30
|
}
|
|
20
31
|
var _a = section.styles, buttonAlphaBackgroundColorInHex = _a.buttonAlphaBackgroundColorInHex, buttonAlphaLabelColorInHex = _a.buttonAlphaLabelColorInHex, buttonAlphaDesignType = _a.buttonAlphaDesignType, descriptionColorInHex = _a.descriptionColorInHex, titleColorInHex = _a.titleColorInHex;
|
|
21
32
|
var _b = section.properties, title = _b.title, description = _b.description, buttonAlphaLabel = _b.buttonAlphaLabel, buttonAlphaLinkSrc = _b.buttonAlphaLinkSrc, buttonAlphaLinkType = _b.buttonAlphaLinkType;
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, styleTheme: "headingBold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "body1Regular" }, void 0) }, void 0)), buttonAlphaLinkSrc && ((0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.DesignedSectionButton, { buttonType: buttonAlphaDesignType, text: buttonAlphaLabel, linkType: buttonAlphaLinkType, src: buttonAlphaLinkSrc, textColor: buttonAlphaLabelColorInHex, backgroundColor: buttonAlphaBackgroundColorInHex, borderColor: buttonAlphaLabelColorInHex }, void 0) }, void 0))] }), void 0));
|
|
23
34
|
}
|
|
24
|
-
var
|
|
35
|
+
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
|
|
36
|
+
var isEmptySectionData = _a.isEmptySectionData, theme = _a.theme;
|
|
37
|
+
return isEmptySectionData ? 0 : theme.spacing.spacingG;
|
|
38
|
+
});
|
|
39
|
+
var S_DescriptionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n"], ["\n padding-top: ", ";\n"])), function (_a) {
|
|
25
40
|
var theme = _a.theme;
|
|
26
41
|
return theme.spacing.spacingD;
|
|
27
42
|
});
|
|
28
|
-
var S_ButtonWrapper = styled_components_1.default.div(
|
|
43
|
+
var S_ButtonWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-top: ", ";\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n padding-top: ", ";\n"])), function (_a) {
|
|
29
44
|
var theme = _a.theme;
|
|
30
45
|
return theme.spacing.spacingF;
|
|
31
46
|
});
|
|
32
47
|
exports.default = SectionContents;
|
|
33
|
-
var templateObject_1, templateObject_2;
|
|
48
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -17,7 +17,7 @@ function TemplateB() {
|
|
|
17
17
|
}
|
|
18
18
|
var S_MembershipSection = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n --max-viewport-width: 1920;\n --max-viewport-width-px: 1920px;\n --max-width: 1500;\n --max-width-px: 1500px;\n --min-viewport-width: 1200;\n --min-viewport-width-px: 1200px;\n --min-width: 1000;\n --min-width-px: 1000px;\n margin: ", " auto;\n max-width: var(--max-width-px);\n min-width: var(--min-width-px);\n width: calc(\n (100% - var(--min-viewport-width-px)) * (var(--max-width) - var(--min-width)) /\n (var(--max-viewport-width) - var(--min-viewport-width)) + var(--min-width-px)\n );\n"], ["\n --max-viewport-width: 1920;\n --max-viewport-width-px: 1920px;\n --max-width: 1500;\n --max-width-px: 1500px;\n --min-viewport-width: 1200;\n --min-viewport-width-px: 1200px;\n --min-width: 1000;\n --min-width-px: 1000px;\n margin: ", " auto;\n max-width: var(--max-width-px);\n min-width: var(--min-width-px);\n width: calc(\n (100% - var(--min-viewport-width-px)) * (var(--max-width) - var(--min-width)) /\n (var(--max-viewport-width) - var(--min-viewport-width)) + var(--min-width-px)\n );\n"])), function (_a) {
|
|
19
19
|
var theme = _a.theme;
|
|
20
|
-
return theme.spacing.
|
|
20
|
+
return theme.spacing.spacingK;
|
|
21
21
|
});
|
|
22
22
|
function MembershipSection() {
|
|
23
23
|
var programmedSectionComponents = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext).programmedSectionComponents;
|
|
@@ -3,6 +3,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
3
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
6
17
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
19
|
};
|
|
@@ -19,11 +30,11 @@ function SectionContents() {
|
|
|
19
30
|
}
|
|
20
31
|
var _a = section.styles, buttonAlphaBackgroundColorInHex = _a.buttonAlphaBackgroundColorInHex, buttonAlphaLabelColorInHex = _a.buttonAlphaLabelColorInHex, buttonAlphaDesignType = _a.buttonAlphaDesignType, descriptionColorInHex = _a.descriptionColorInHex, titleColorInHex = _a.titleColorInHex;
|
|
21
32
|
var _b = section.properties, title = _b.title, description = _b.description, buttonAlphaLabel = _b.buttonAlphaLabel, buttonAlphaLinkSrc = _b.buttonAlphaLinkSrc, buttonAlphaLinkType = _b.buttonAlphaLinkType;
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, customFontSize: "48px", customFontWeight: "bold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "headingBold" }, void 0) }, void 0)),
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySectionData: !title && !description && !buttonAlphaLinkSrc }, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, customFontSize: "48px", customFontWeight: "bold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "headingBold" }, void 0) }, void 0)), buttonAlphaLinkSrc && ((0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.DesignedSectionButton, { buttonType: buttonAlphaDesignType, text: buttonAlphaLabel, linkType: buttonAlphaLinkType, src: buttonAlphaLinkSrc, textColor: buttonAlphaLabelColorInHex, backgroundColor: buttonAlphaBackgroundColorInHex, borderColor: buttonAlphaLabelColorInHex }, void 0) }, void 0))] }), void 0));
|
|
23
34
|
}
|
|
24
|
-
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom:
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return theme.spacing.
|
|
35
|
+
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
|
|
36
|
+
var isEmptySectionData = _a.isEmptySectionData, theme = _a.theme;
|
|
37
|
+
return isEmptySectionData ? 0 : theme.spacing.spacingG;
|
|
27
38
|
});
|
|
28
39
|
var S_DescriptionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n"], ["\n padding-top: ", ";\n"])), function (_a) {
|
|
29
40
|
var theme = _a.theme;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
8
|
};
|
|
@@ -6,10 +10,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
10
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
11
|
var react_1 = require("react");
|
|
8
12
|
var dynamicLayoutContext_1 = require("../../../../../../../DynamicLayout/dynamicLayoutContext");
|
|
13
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
9
14
|
var SectionContents_1 = __importDefault(require("./components/SectionContents"));
|
|
10
15
|
function TemplateB() {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(S_MembershipSection, { children: [(0, jsx_runtime_1.jsx)(SectionContents_1.default, {}, void 0), (0, jsx_runtime_1.jsx)(MembershipSection, {}, void 0)] }, void 0));
|
|
12
17
|
}
|
|
18
|
+
var S_MembershipSection = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-top: ", ";\n"], ["\n margin-top: ", ";\n"])), function (_a) {
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return theme.spacing.spacingG;
|
|
21
|
+
});
|
|
13
22
|
function MembershipSection() {
|
|
14
23
|
var programmedSectionComponents = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext).programmedSectionComponents;
|
|
15
24
|
if (!programmedSectionComponents) {
|
|
@@ -18,3 +27,4 @@ function MembershipSection() {
|
|
|
18
27
|
return programmedSectionComponents.PRG_MEMBERSHIP_DISPLAY ? (programmedSectionComponents.PRG_MEMBERSHIP_DISPLAY) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0));
|
|
19
28
|
}
|
|
20
29
|
exports.default = TemplateB;
|
|
30
|
+
var templateObject_1;
|
|
@@ -19,12 +19,9 @@ function SectionContents() {
|
|
|
19
19
|
}
|
|
20
20
|
var _a = section.styles, buttonAlphaBackgroundColorInHex = _a.buttonAlphaBackgroundColorInHex, buttonAlphaLabelColorInHex = _a.buttonAlphaLabelColorInHex, buttonAlphaDesignType = _a.buttonAlphaDesignType, descriptionColorInHex = _a.descriptionColorInHex, titleColorInHex = _a.titleColorInHex;
|
|
21
21
|
var _b = section.properties, title = _b.title, description = _b.description, buttonAlphaLabel = _b.buttonAlphaLabel, buttonAlphaLinkSrc = _b.buttonAlphaLinkSrc, buttonAlphaLinkType = _b.buttonAlphaLinkType;
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, styleTheme: "headingBold" }, void 0)), description && ((0, jsx_runtime_1.jsx)(S_DescriptionWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.Description, { text: description, textAlign: "center", color: descriptionColorInHex, styleTheme: "body1Regular" }, void 0) }, void 0)), buttonAlphaLinkSrc && ((0, jsx_runtime_1.jsx)(S_ButtonWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.M_MembershipSectionItem.DesignedSectionButton, { buttonType: buttonAlphaDesignType, text: buttonAlphaLabel, linkType: buttonAlphaLinkType, src: buttonAlphaLinkSrc, textColor: buttonAlphaLabelColorInHex, backgroundColor: buttonAlphaBackgroundColorInHex, borderColor: buttonAlphaLabelColorInHex }, void 0) }, void 0))] }, void 0));
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return theme.spacing.spacingG;
|
|
27
|
-
}, function (_a) {
|
|
24
|
+
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0 ", ";\n"], ["\n padding: 0 ", ";\n"])), function (_a) {
|
|
28
25
|
var theme = _a.theme;
|
|
29
26
|
return theme.spacing.spacingE;
|
|
30
27
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FillIconNameKeys, LineIconNameKeys } from '../../../../../DynamicLayout/components/pdsOriginal/common';
|
|
3
3
|
import type { TextLabelProps } from '../../../../../DynamicLayout/components/pdsOriginal/desktop/TextLabel/TextLabel';
|
|
4
|
-
import type { IItemButton, IItemDescription, IItemTitle, IMembershipCardTemplate
|
|
4
|
+
import type { IItemButton, IItemDescription, IItemTitle, IMembershipCardTemplate } from '../../../../../DynamicLayout/types';
|
|
5
5
|
declare function MembershipSectionItem(): JSX.Element;
|
|
6
6
|
declare namespace MembershipSectionItem {
|
|
7
7
|
var Title: ({ text, color, lineHeight, ...textLabelProps }: IItemTitle & TextLabelProps & {
|
|
@@ -12,7 +12,7 @@ declare namespace MembershipSectionItem {
|
|
|
12
12
|
var IconButton: ({ iconButtonIconColor, iconButtonDisabledIconColor, iconButtonBackgroundColor, iconButtonBorderColor, iconButtonDisabledBackgroundColor, isDisabled, iconName, state, onClick }: IconButtonProps) => JSX.Element;
|
|
13
13
|
var MembershipCard: ({ membershipCardTemplate }: MembershipCardProps) => JSX.Element;
|
|
14
14
|
var ColorOverrideIcon: ({ iconColor, iconName }: ColorOverrideIconProps) => JSX.Element;
|
|
15
|
-
var XlargeMainButton: ({ buttonTextColor, buttonBackgroundColor,
|
|
15
|
+
var XlargeMainButton: ({ buttonTextColor, buttonBackgroundColor, state, buttonText, $paddingBottom }: XlargeMainButtonProps) => JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
declare type IconButtonProps = {
|
|
18
18
|
iconButtonIconColor: string;
|
|
@@ -33,8 +33,10 @@ declare type ColorOverrideIconProps = {
|
|
|
33
33
|
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
34
34
|
};
|
|
35
35
|
declare type XlargeMainButtonProps = {
|
|
36
|
-
buttonTextColor
|
|
37
|
-
buttonBackgroundColor
|
|
38
|
-
|
|
36
|
+
buttonTextColor?: string;
|
|
37
|
+
buttonBackgroundColor?: string;
|
|
38
|
+
state?: 'normal' | 'disabled';
|
|
39
|
+
buttonText: string;
|
|
40
|
+
$paddingBottom?: string;
|
|
39
41
|
};
|
|
40
42
|
export default MembershipSectionItem;
|
|
@@ -50,6 +50,7 @@ var react_1 = require("react");
|
|
|
50
50
|
var pdsOriginal_1 = require("../../../../../DynamicLayout/components/pdsOriginal");
|
|
51
51
|
var dynamicLayoutContext_1 = require("../../../../../DynamicLayout/dynamicLayoutContext");
|
|
52
52
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
53
|
+
var constants_1 = require("../../constants");
|
|
53
54
|
function MembershipSectionItem() {
|
|
54
55
|
return (0, jsx_runtime_1.jsx)(S_Item, { "x-dlayout-section-element-name": "Item", isClickable: false }, void 0);
|
|
55
56
|
}
|
|
@@ -171,12 +172,13 @@ var S_IconButtonWrapper = styled_components_1.default.div(templateObject_6 || (t
|
|
|
171
172
|
function MembershipCard(_a) {
|
|
172
173
|
var membershipCardTemplate = _a.membershipCardTemplate;
|
|
173
174
|
var backgroundImageSrc = membershipCardTemplate.backgroundImageSrc, designSchema = membershipCardTemplate.designSchema, logoImageSrc = membershipCardTemplate.logoImageSrc, overlayColorPrimary = membershipCardTemplate.overlayColorPrimary, overlayColorSecondary = membershipCardTemplate.overlayColorSecondary, overlayType = membershipCardTemplate.overlayType;
|
|
174
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipCardBox, { children: [(0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: backgroundImageSrc, width: 288, height: 455.
|
|
175
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipCardBox, { children: [(0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: backgroundImageSrc, width: 288, height: 455, scaleType: "cover" }, void 0), (0, jsx_runtime_1.jsx)(S_GlossyOverlayWrapper, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: constants_1.COMMON_OVERLAY_IMAGE_SRC, width: 288, height: 455, ratio: "10_16", scaleType: "cover" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(S_LogoImageWrapper, __assign({ designSchema: designSchema }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: logoImageSrc, width: "responsive", scaleType: "contain" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(S_MembershipCardOverlay, { overlayType: overlayType, overlayColorPrimary: overlayColorPrimary, overlayColorSecondary: overlayColorSecondary }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(S_MembershipCardShadow, {}, void 0)] }), void 0));
|
|
175
176
|
}
|
|
176
177
|
var S_MembershipCardBox = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n height: 455px;\n min-width: 288px;\n overflow: hidden;\n position: relative;\n"], ["\n border-radius: 12px;\n height: 455px;\n min-width: 288px;\n overflow: hidden;\n position: relative;\n"])));
|
|
177
|
-
var
|
|
178
|
-
var
|
|
179
|
-
var
|
|
178
|
+
var S_GlossyOverlayWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n inset: 0;\n position: absolute;\n"], ["\n inset: 0;\n position: absolute;\n"])));
|
|
179
|
+
var designSchemaA = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n left: 10%;\n top: 6%;\n width: 50%;\n"], ["\n left: 10%;\n top: 6%;\n width: 50%;\n"])));
|
|
180
|
+
var designSchemaB = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 60%;\n"], ["\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n width: 60%;\n"])));
|
|
181
|
+
var S_LogoImageWrapper = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n position: absolute;\n z-index: 3;\n\n ", "\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n position: absolute;\n z-index: 3;\n\n ", "\n"])), function (_a) {
|
|
180
182
|
var designSchema = _a.designSchema;
|
|
181
183
|
switch (designSchema) {
|
|
182
184
|
case 'A':
|
|
@@ -187,15 +189,15 @@ var S_LogoImageWrapper = styled_components_1.default.div(templateObject_10 || (t
|
|
|
187
189
|
return designSchemaA;
|
|
188
190
|
}
|
|
189
191
|
});
|
|
190
|
-
var overlaySolidType = (0, styled_components_1.css)(
|
|
192
|
+
var overlaySolidType = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
191
193
|
var overlayColorPrimary = _a.overlayColorPrimary;
|
|
192
|
-
return overlayColorPrimary
|
|
194
|
+
return overlayColorPrimary;
|
|
193
195
|
});
|
|
194
|
-
var overlayGradientType = (0, styled_components_1.css)(
|
|
196
|
+
var overlayGradientType = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), function (_a) {
|
|
195
197
|
var overlayColorPrimary = _a.overlayColorPrimary, overlayColorSecondary = _a.overlayColorSecondary;
|
|
196
|
-
return "linear-gradient(135deg, " + overlayColorPrimary + "
|
|
198
|
+
return "linear-gradient(135deg, " + overlayColorPrimary + ", " + overlayColorSecondary + ")";
|
|
197
199
|
});
|
|
198
|
-
var S_MembershipCardOverlay = styled_components_1.default.div(
|
|
200
|
+
var S_MembershipCardOverlay = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n height: 455px;\n position: absolute;\n top: 0;\n width: 288px;\n z-index: 2;\n\n ", "\n"], ["\n height: 455px;\n position: absolute;\n top: 0;\n width: 288px;\n z-index: 2;\n\n ", "\n"])), function (_a) {
|
|
199
201
|
var overlayType = _a.overlayType;
|
|
200
202
|
switch (overlayType) {
|
|
201
203
|
case 'NONE':
|
|
@@ -208,22 +210,25 @@ var S_MembershipCardOverlay = styled_components_1.default.div(templateObject_13
|
|
|
208
210
|
return;
|
|
209
211
|
}
|
|
210
212
|
});
|
|
211
|
-
var S_MembershipCardShadow = styled_components_1.default.div(
|
|
213
|
+
var S_MembershipCardShadow = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n height: 455px;\n position: absolute;\n top: 0;\n width: 288px;\n\n &::after {\n border-radius: 12px;\n box-shadow: 0 25px 30px 0 rgba(0, 0, 0, 0.2);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n"], ["\n height: 455px;\n position: absolute;\n top: 0;\n width: 288px;\n\n &::after {\n border-radius: 12px;\n box-shadow: 0 25px 30px 0 rgba(0, 0, 0, 0.2);\n content: '';\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n"])));
|
|
212
214
|
function ColorOverrideIcon(_a) {
|
|
213
215
|
var iconColor = _a.iconColor, iconName = _a.iconName;
|
|
214
216
|
return ((0, jsx_runtime_1.jsx)(S_ColorOverrideIconWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", iconColor: iconColor }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.Icon, { colorKey: "ui_cpnt_icon_sys_grey_01", iconName: iconName }, void 0) }), void 0));
|
|
215
217
|
}
|
|
216
|
-
var S_ColorOverrideIconWrapper = styled_components_1.default.div(
|
|
218
|
+
var S_ColorOverrideIconWrapper = styled_components_1.default.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n\n & path {\n stroke: ", ";\n }\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n\n & path {\n stroke: ", ";\n }\n"])), function (_a) {
|
|
217
219
|
var iconColor = _a.iconColor;
|
|
218
220
|
return iconColor;
|
|
219
221
|
});
|
|
220
222
|
function XlargeMainButton(_a) {
|
|
221
|
-
var buttonTextColor = _a.buttonTextColor, buttonBackgroundColor = _a.buttonBackgroundColor,
|
|
222
|
-
return ((0, jsx_runtime_1.jsx)(S_XlargeMainButtonPropsWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", buttonTextColor: buttonTextColor, buttonBackgroundColor: buttonBackgroundColor }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.D_MainButton, { text:
|
|
223
|
+
var buttonTextColor = _a.buttonTextColor, buttonBackgroundColor = _a.buttonBackgroundColor, _b = _a.state, state = _b === void 0 ? 'normal' : _b, buttonText = _a.buttonText, $paddingBottom = _a.$paddingBottom;
|
|
224
|
+
return ((0, jsx_runtime_1.jsx)(S_XlargeMainButtonPropsWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", buttonTextColor: buttonTextColor, buttonBackgroundColor: buttonBackgroundColor, "$paddingBottom": $paddingBottom }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.D_MainButton, { text: buttonText, size: "rlarge", state: state, responsiveMode: "use" }, void 0) }), void 0));
|
|
223
225
|
}
|
|
224
|
-
var S_XlargeMainButtonPropsWrapper = styled_components_1.default.div(
|
|
226
|
+
var S_XlargeMainButtonPropsWrapper = styled_components_1.default.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n margin-top: ", ";\n padding-bottom: ", ";\n\n & > button {\n background-color: ", ";\n box-sizing: border-box;\n height: 64px;\n\n & div {\n color: ", ";\n text-align: center;\n }\n }\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n margin-top: ", ";\n padding-bottom: ", ";\n\n & > button {\n background-color: ", ";\n box-sizing: border-box;\n height: 64px;\n\n & div {\n color: ", ";\n text-align: center;\n }\n }\n"])), function (_a) {
|
|
225
227
|
var theme = _a.theme;
|
|
226
228
|
return theme.spacing.spacingF;
|
|
229
|
+
}, function (_a) {
|
|
230
|
+
var $paddingBottom = _a.$paddingBottom;
|
|
231
|
+
return $paddingBottom && $paddingBottom;
|
|
227
232
|
}, function (_a) {
|
|
228
233
|
var theme = _a.theme, buttonBackgroundColor = _a.buttonBackgroundColor;
|
|
229
234
|
return buttonBackgroundColor
|
|
@@ -241,4 +246,4 @@ MembershipSectionItem.MembershipCard = MembershipCard;
|
|
|
241
246
|
MembershipSectionItem.ColorOverrideIcon = ColorOverrideIcon;
|
|
242
247
|
MembershipSectionItem.XlargeMainButton = XlargeMainButton;
|
|
243
248
|
exports.default = MembershipSectionItem;
|
|
244
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
249
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17;
|
|
@@ -12,7 +12,7 @@ declare namespace MembershipSectionItem {
|
|
|
12
12
|
var IconButton: ({ iconButtonBackgroundColor, iconButtonBorderColor, iconButtonDisabledBackgroundColor, iconButtonDisabledIconColor, iconButtonIconColor, isDisabled, iconName, state, onClick }: IconButtonProps) => JSX.Element;
|
|
13
13
|
var MembershipCard: ({ membershipCardTemplate, cardWidth }: MembershipCardProps) => JSX.Element;
|
|
14
14
|
var ColorOverrideIcon: ({ iconColor, iconName }: ColorOverrideIconProps) => JSX.Element;
|
|
15
|
-
var XlargeMainButton: ({ buttonTextColor, buttonBackgroundColor, buttonText, onClick }: XlargeMainButtonProps) => JSX.Element;
|
|
15
|
+
var XlargeMainButton: ({ buttonTextColor, buttonBackgroundColor, buttonText, onClick, state }: XlargeMainButtonProps) => JSX.Element;
|
|
16
16
|
}
|
|
17
17
|
declare type IconButtonProps = {
|
|
18
18
|
iconButtonIconColor: string;
|
|
@@ -34,9 +34,10 @@ declare type ColorOverrideIconProps = {
|
|
|
34
34
|
iconName: FillIconNameKeys | LineIconNameKeys;
|
|
35
35
|
};
|
|
36
36
|
declare type XlargeMainButtonProps = {
|
|
37
|
-
buttonTextColor
|
|
38
|
-
buttonBackgroundColor
|
|
39
|
-
buttonText
|
|
37
|
+
buttonTextColor?: string;
|
|
38
|
+
buttonBackgroundColor?: string;
|
|
39
|
+
buttonText?: string;
|
|
40
40
|
onClick?: () => void;
|
|
41
|
+
state?: 'normal' | 'disabled';
|
|
41
42
|
};
|
|
42
43
|
export default MembershipSectionItem;
|
|
@@ -50,6 +50,7 @@ var react_1 = require("react");
|
|
|
50
50
|
var pdsOriginal_1 = require("../../../../../DynamicLayout/components/pdsOriginal");
|
|
51
51
|
var dynamicLayoutContext_1 = require("../../../../../DynamicLayout/dynamicLayoutContext");
|
|
52
52
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
53
|
+
var constants_1 = require("../../constants");
|
|
53
54
|
function MembershipSectionItem() {
|
|
54
55
|
return (0, jsx_runtime_1.jsx)(S_Item, { "x-dlayout-section-element-name": "Item", isClickable: false }, void 0);
|
|
55
56
|
}
|
|
@@ -171,18 +172,19 @@ var S_IconButtonWrapper = styled_components_1.default.div(templateObject_6 || (t
|
|
|
171
172
|
function MembershipCard(_a) {
|
|
172
173
|
var membershipCardTemplate = _a.membershipCardTemplate, cardWidth = _a.cardWidth;
|
|
173
174
|
var backgroundImageSrc = membershipCardTemplate.backgroundImageSrc, designSchema = membershipCardTemplate.designSchema, logoImageSrc = membershipCardTemplate.logoImageSrc, overlayColorPrimary = membershipCardTemplate.overlayColorPrimary, overlayColorSecondary = membershipCardTemplate.overlayColorSecondary, overlayType = membershipCardTemplate.overlayType;
|
|
174
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(S_MembershipCardBox, { children: [(0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: backgroundImageSrc, width: cardWidth ? cardWidth : 'responsive', ratio: "10_16", scaleType: "cover" }, void 0), (0, jsx_runtime_1.jsx)(S_LogoImageWrapper, __assign({ designSchema: designSchema }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: logoImageSrc, width: "responsive", scaleType: "contain" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(S_MembershipCardOverlay, { overlayType: overlayType, overlayColorPrimary: overlayColorPrimary, overlayColorSecondary: overlayColorSecondary, cardWidth: cardWidth }, void 0)] }, void 0) }, void 0));
|
|
175
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(S_MembershipCardBox, { children: [(0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: backgroundImageSrc, width: cardWidth ? cardWidth : 'responsive', ratio: "10_16", scaleType: "cover" }, void 0), (0, jsx_runtime_1.jsx)(S_GlossyOverlayWrapper, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: constants_1.COMMON_OVERLAY_IMAGE_SRC, width: cardWidth ? cardWidth : 'responsive', ratio: "10_16", scaleType: "cover" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(S_LogoImageWrapper, __assign({ designSchema: designSchema }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.ImageView, { src: logoImageSrc, width: "responsive", scaleType: "contain" }, void 0) }), void 0), (0, jsx_runtime_1.jsx)(S_MembershipCardOverlay, { overlayType: overlayType, overlayColorPrimary: overlayColorPrimary, overlayColorSecondary: overlayColorSecondary, cardWidth: cardWidth }, void 0)] }, void 0) }, void 0));
|
|
175
176
|
}
|
|
176
|
-
var S_MembershipCardBox = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n height: ", ";\n min-width: ", ";\n overflow: hidden;\n position: relative;\n width:
|
|
177
|
+
var S_MembershipCardBox = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n height: ", ";\n min-width: ", ";\n overflow: hidden;\n position: relative;\n width: 100%;\n"], ["\n border-radius: 12px;\n height: ", ";\n min-width: ", ";\n overflow: hidden;\n position: relative;\n width: 100%;\n"])), function (_a) {
|
|
177
178
|
var cardWidth = _a.cardWidth;
|
|
178
179
|
return (cardWidth ? cardWidth * 1.6 + "px" : '100%');
|
|
179
180
|
}, function (_a) {
|
|
180
181
|
var cardWidth = _a.cardWidth;
|
|
181
182
|
return (cardWidth ? cardWidth + "px" : '100%');
|
|
182
183
|
});
|
|
183
|
-
var
|
|
184
|
-
var
|
|
185
|
-
var
|
|
184
|
+
var S_GlossyOverlayWrapper = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n inset: 0;\n position: absolute;\n"], ["\n inset: 0;\n position: absolute;\n"])));
|
|
185
|
+
var designSchemaA = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n left: 10%;\n top: 6%;\n"], ["\n left: 10%;\n top: 6%;\n"])));
|
|
186
|
+
var designSchemaB = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n"], ["\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n"])));
|
|
187
|
+
var S_LogoImageWrapper = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n position: absolute;\n width: ", ";\n z-index: 3;\n\n ", "\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n position: absolute;\n width: ", ";\n z-index: 3;\n\n ", "\n"])), function (_a) {
|
|
186
188
|
var cardWidth = _a.cardWidth, designSchema = _a.designSchema;
|
|
187
189
|
if (designSchema === 'A') {
|
|
188
190
|
return cardWidth ? cardWidth * 0.5 + "px" : '50%';
|
|
@@ -202,15 +204,15 @@ var S_LogoImageWrapper = styled_components_1.default.div(templateObject_10 || (t
|
|
|
202
204
|
return designSchemaA;
|
|
203
205
|
}
|
|
204
206
|
});
|
|
205
|
-
var overlaySolidType = (0, styled_components_1.css)(
|
|
207
|
+
var overlaySolidType = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
206
208
|
var overlayColorPrimary = _a.overlayColorPrimary;
|
|
207
|
-
return overlayColorPrimary
|
|
209
|
+
return overlayColorPrimary;
|
|
208
210
|
});
|
|
209
|
-
var overlayGradientType = (0, styled_components_1.css)(
|
|
211
|
+
var overlayGradientType = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), function (_a) {
|
|
210
212
|
var overlayColorPrimary = _a.overlayColorPrimary, overlayColorSecondary = _a.overlayColorSecondary;
|
|
211
|
-
return "linear-gradient(135deg, " + overlayColorPrimary + "
|
|
213
|
+
return "linear-gradient(135deg, " + overlayColorPrimary + ", " + overlayColorSecondary + ")";
|
|
212
214
|
});
|
|
213
|
-
var S_MembershipCardOverlay = styled_components_1.default.div(
|
|
215
|
+
var S_MembershipCardOverlay = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n height: ", ";\n position: absolute;\n top: 0;\n width: ", ";\n z-index: 2;\n\n ", "\n"], ["\n height: ", ";\n position: absolute;\n top: 0;\n width: ", ";\n z-index: 2;\n\n ", "\n"])), function (_a) {
|
|
214
216
|
var cardWidth = _a.cardWidth;
|
|
215
217
|
return (cardWidth ? cardWidth * 1.6 + "px" : '100%');
|
|
216
218
|
}, function (_a) {
|
|
@@ -233,18 +235,18 @@ function ColorOverrideIcon(_a) {
|
|
|
233
235
|
var iconColor = _a.iconColor, iconName = _a.iconName;
|
|
234
236
|
return ((0, jsx_runtime_1.jsx)(S_ColorOverrideIconWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", iconColor: iconColor }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.Icon, { colorKey: "ui_cpnt_icon_sys_grey_01", iconName: iconName }, void 0) }), void 0));
|
|
235
237
|
}
|
|
236
|
-
var S_ColorOverrideIconWrapper = styled_components_1.default.div(
|
|
238
|
+
var S_ColorOverrideIconWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: center;\n\n & path {\n stroke: ", ";\n }\n"], ["\n align-items: center;\n display: flex;\n justify-content: center;\n\n & path {\n stroke: ", ";\n }\n"])), function (_a) {
|
|
237
239
|
var iconColor = _a.iconColor;
|
|
238
240
|
return iconColor;
|
|
239
241
|
});
|
|
240
242
|
function XlargeMainButton(_a) {
|
|
241
|
-
var buttonTextColor = _a.buttonTextColor, buttonBackgroundColor = _a.buttonBackgroundColor, buttonText = _a.buttonText, onClick = _a.onClick;
|
|
243
|
+
var buttonTextColor = _a.buttonTextColor, buttonBackgroundColor = _a.buttonBackgroundColor, buttonText = _a.buttonText, onClick = _a.onClick, _b = _a.state, state = _b === void 0 ? 'normal' : _b;
|
|
242
244
|
var handleOnclick = function () {
|
|
243
245
|
onClick && onClick();
|
|
244
246
|
};
|
|
245
|
-
return ((0, jsx_runtime_1.jsx)(S_XlargeMainButtonPropsWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", buttonTextColor: buttonTextColor, buttonBackgroundColor: buttonBackgroundColor }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.M_MainButton, { text: buttonText, size: "rlarge", responsiveMode: "use", onClick: handleOnclick }, void 0) }), void 0));
|
|
247
|
+
return ((0, jsx_runtime_1.jsx)(S_XlargeMainButtonPropsWrapper, __assign({ "x-dlayout-membership-item-element-name": "Icon", buttonTextColor: buttonTextColor, buttonBackgroundColor: buttonBackgroundColor }, { children: (0, jsx_runtime_1.jsx)(pdsOriginal_1.M_MainButton, { text: buttonText, size: "rlarge", responsiveMode: "use", onClick: handleOnclick, state: state }, void 0) }), void 0));
|
|
246
248
|
}
|
|
247
|
-
var S_XlargeMainButtonPropsWrapper = styled_components_1.default.div(
|
|
249
|
+
var S_XlargeMainButtonPropsWrapper = styled_components_1.default.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n & > button {\n background-color: ", ";\n box-sizing: border-box;\n height: 100%;\n\n & div {\n -webkit-line-clamp: 2;\n align-items: center;\n color: ", ";\n display: flex;\n height: 64px;\n justify-content: center;\n line-height: 24px;\n overflow: auto;\n text-align: center;\n }\n }\n"], ["\n & > button {\n background-color: ", ";\n box-sizing: border-box;\n height: 100%;\n\n & div {\n -webkit-line-clamp: 2;\n align-items: center;\n color: ", ";\n display: flex;\n height: 64px;\n justify-content: center;\n line-height: 24px;\n overflow: auto;\n text-align: center;\n }\n }\n"])), function (_a) {
|
|
248
250
|
var theme = _a.theme, buttonBackgroundColor = _a.buttonBackgroundColor;
|
|
249
251
|
return buttonBackgroundColor
|
|
250
252
|
? buttonBackgroundColor
|
|
@@ -261,4 +263,4 @@ MembershipSectionItem.MembershipCard = MembershipCard;
|
|
|
261
263
|
MembershipSectionItem.ColorOverrideIcon = ColorOverrideIcon;
|
|
262
264
|
MembershipSectionItem.XlargeMainButton = XlargeMainButton;
|
|
263
265
|
exports.default = MembershipSectionItem;
|
|
264
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15;
|
|
266
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { TypeOfMembershipSectionToneColor } from './type';
|
|
2
|
-
import type { TypeOfItemToneType } from '../../../DynamicLayout/types';
|
|
2
|
+
import type { SubscriptionProductType, TypeOfItemToneType, TypeOfProgrammedItemActionButtonTextType } from '../../../DynamicLayout/types';
|
|
3
|
+
export declare const COMMON_OVERLAY_IMAGE_SRC = "https://static.publ.site/membership_card_deco.png";
|
|
3
4
|
export declare const MEMBERSHIP_SECTION_TONE_COLOR: {
|
|
4
5
|
[key in TypeOfItemToneType]: TypeOfMembershipSectionToneColor;
|
|
5
6
|
};
|
|
7
|
+
export declare const MEMBERSHIP_SECTION_ACTION_BUTTON_TEXT: {
|
|
8
|
+
[key in TypeOfProgrammedItemActionButtonTextType]: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const MEMBERSHIP_SECTION_SUBSCRIPTION_PRODUCT_TYPE_TEXT: {
|
|
11
|
+
[key in SubscriptionProductType]: string;
|
|
12
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MEMBERSHIP_SECTION_TONE_COLOR = void 0;
|
|
3
|
+
exports.MEMBERSHIP_SECTION_SUBSCRIPTION_PRODUCT_TYPE_TEXT = exports.MEMBERSHIP_SECTION_ACTION_BUTTON_TEXT = exports.MEMBERSHIP_SECTION_TONE_COLOR = exports.COMMON_OVERLAY_IMAGE_SRC = void 0;
|
|
4
|
+
exports.COMMON_OVERLAY_IMAGE_SRC = 'https://static.publ.site/membership_card_deco.png';
|
|
4
5
|
exports.MEMBERSHIP_SECTION_TONE_COLOR = {
|
|
5
6
|
LIGHT: {
|
|
6
7
|
contentBackgroundDimColor: '#F5F5F8B3',
|
|
@@ -12,7 +13,10 @@ exports.MEMBERSHIP_SECTION_TONE_COLOR = {
|
|
|
12
13
|
membershipPlanSheetBackgroundColor: '#EAEBEFFF',
|
|
13
14
|
membershipSheetBackgroundColor: '#F5F5F8FF',
|
|
14
15
|
membershipSheetTextLabelColor: '#1E1E20FF',
|
|
15
|
-
scrollbarColor: '#E3E5E9FF'
|
|
16
|
+
scrollbarColor: '#E3E5E9FF',
|
|
17
|
+
disabledProgrammedItemActionButtonTextColor: '#AAAAB1FF',
|
|
18
|
+
disabledProgrammedItemActionButtonBackgroundColor: '#E3E5E9FF',
|
|
19
|
+
emptyMembershipSheetTextLabelColor: '#68686BFF'
|
|
16
20
|
},
|
|
17
21
|
DARK: {
|
|
18
22
|
contentBackgroundDimColor: '#25252699',
|
|
@@ -24,6 +28,30 @@ exports.MEMBERSHIP_SECTION_TONE_COLOR = {
|
|
|
24
28
|
membershipPlanSheetBackgroundColor: '#303032FF',
|
|
25
29
|
membershipSheetBackgroundColor: '#252526FF',
|
|
26
30
|
membershipSheetTextLabelColor: '#FDFDFDFF',
|
|
27
|
-
scrollbarColor: '#404042FF'
|
|
31
|
+
scrollbarColor: '#404042FF',
|
|
32
|
+
disabledProgrammedItemActionButtonTextColor: '#68686CFF',
|
|
33
|
+
disabledProgrammedItemActionButtonBackgroundColor: '#404042FF',
|
|
34
|
+
emptyMembershipSheetTextLabelColor: '#A5A5ABFF'
|
|
28
35
|
}
|
|
29
36
|
};
|
|
37
|
+
exports.MEMBERSHIP_SECTION_ACTION_BUTTON_TEXT = {
|
|
38
|
+
A: 'str_5350',
|
|
39
|
+
B: 'str_5351',
|
|
40
|
+
C: 'str_5352',
|
|
41
|
+
D: 'str_5353',
|
|
42
|
+
E: 'str_5354'
|
|
43
|
+
};
|
|
44
|
+
exports.MEMBERSHIP_SECTION_SUBSCRIPTION_PRODUCT_TYPE_TEXT = {
|
|
45
|
+
COUPON_FREE_FINITE: 'str_payment_option_coupon_free_finite',
|
|
46
|
+
COUPON_FREE_INFINITE: 'str_payment_option_coupon_free_infinite',
|
|
47
|
+
COUPON_ONCE_FINITE: 'str_payment_option_coupon_one_time',
|
|
48
|
+
COUPON_ONCE_INFINITE: 'str_payment_option_coupon_one_time',
|
|
49
|
+
FREE_FINITE: 'str_payment_option_subs_temporary_free',
|
|
50
|
+
FREE_INFINITE: 'str_payment_option_unlimited_free',
|
|
51
|
+
ONCE_FINITE: 'str_payment_option_one_time',
|
|
52
|
+
ONCE_INFINITE: 'str_payment_option_one_time',
|
|
53
|
+
SUBSCRIPTION_30DAYS: 'str_payment_option_subs_regularly',
|
|
54
|
+
SUBSCRIPTION_90DAYS: 'str_payment_option_subs_regularly',
|
|
55
|
+
SUBSCRIPTION_180DAYS: 'str_payment_option_subs_regularly',
|
|
56
|
+
SUBSCRIPTION_365DAYS: 'str_payment_option_subs_regularly'
|
|
57
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type TypeOfMembershipSectionToneColor = {
|
|
2
2
|
[key in colorTonePreset]: string;
|
|
3
3
|
};
|
|
4
|
-
declare type colorTonePreset = 'contentBackgroundDimColor' | 'iconButtonBackgroundColor' | 'iconButtonBorderColor' | 'iconButtonDisabledBackgroundColor' | 'iconButtonDisabledIconColor' | 'iconButtonIconColor' | 'membershipPlanSheetBackgroundColor' | 'membershipSheetBackgroundColor' | 'membershipSheetTextLabelColor' | 'scrollbarColor';
|
|
4
|
+
declare type colorTonePreset = 'contentBackgroundDimColor' | 'iconButtonBackgroundColor' | 'iconButtonBorderColor' | 'iconButtonDisabledBackgroundColor' | 'iconButtonDisabledIconColor' | 'iconButtonIconColor' | 'membershipPlanSheetBackgroundColor' | 'membershipSheetBackgroundColor' | 'membershipSheetTextLabelColor' | 'scrollbarColor' | 'disabledProgrammedItemActionButtonTextColor' | 'disabledProgrammedItemActionButtonBackgroundColor' | 'emptyMembershipSheetTextLabelColor';
|
|
5
5
|
export {};
|
|
@@ -35,7 +35,7 @@ export interface ISection {
|
|
|
35
35
|
dynamicLayoutSectionItems: Array<IItem> | null;
|
|
36
36
|
insertedAt: string;
|
|
37
37
|
updatedAt: string;
|
|
38
|
-
type
|
|
38
|
+
type: TypeOfSectionType;
|
|
39
39
|
program?: 'MEMBERSHIP_DISPLAY';
|
|
40
40
|
programData?: {
|
|
41
41
|
mdid: string;
|
|
@@ -215,7 +215,7 @@ export declare type DynamicLayoutProps = {
|
|
|
215
215
|
sectionActionHandler?: (action: TypeOfSectionAction) => void;
|
|
216
216
|
programmedSectionComponents?: IProgrammedSectionComponents;
|
|
217
217
|
};
|
|
218
|
-
declare type SubscriptionProductType = 'FREE_INFINITE' | 'FREE_FINITE' | 'ONCE_INFINITE' | 'ONCE_FINITE' | 'COUPON_FREE_INFINITE' | 'COUPON_FREE_FINITE' | 'COUPON_ONCE_INFINITE' | 'COUPON_ONCE_FINITE' | 'SUBSCRIPTION_30DAYS' | 'SUBSCRIPTION_90DAYS' | 'SUBSCRIPTION_180DAYS' | 'SUBSCRIPTION_365DAYS';
|
|
218
|
+
export declare type SubscriptionProductType = 'FREE_INFINITE' | 'FREE_FINITE' | 'ONCE_INFINITE' | 'ONCE_FINITE' | 'COUPON_FREE_INFINITE' | 'COUPON_FREE_FINITE' | 'COUPON_ONCE_INFINITE' | 'COUPON_ONCE_FINITE' | 'SUBSCRIPTION_30DAYS' | 'SUBSCRIPTION_90DAYS' | 'SUBSCRIPTION_180DAYS' | 'SUBSCRIPTION_365DAYS';
|
|
219
219
|
declare type ExpiryPeriodInDaysType = 1 | 3 | 7 | 14 | 30;
|
|
220
220
|
export declare type IMembershipCardTemplate = {
|
|
221
221
|
backgroundImageSrc: string;
|
|
@@ -246,7 +246,7 @@ export declare type IConnectedSubscriptionProducts = {
|
|
|
246
246
|
isDeactivated: boolean;
|
|
247
247
|
fee: {
|
|
248
248
|
currency: 'KRW' | 'USD';
|
|
249
|
-
amount: string;
|
|
249
|
+
amount: string | number;
|
|
250
250
|
};
|
|
251
251
|
insertedAt: string;
|
|
252
252
|
updatedAt: string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* currency에 따라 숫자를 통화 형식으로 변환한다.
|
|
5
|
+
*
|
|
6
|
+
* ex) KRW 1024 => 1,024
|
|
7
|
+
*
|
|
8
|
+
* ex) USD 1024 => 1,024.00
|
|
9
|
+
*/
|
|
10
|
+
function formatCurrency(value, currency) {
|
|
11
|
+
if (currency === void 0) { currency = 'KRW'; }
|
|
12
|
+
var decimals;
|
|
13
|
+
switch (currency) {
|
|
14
|
+
case 'KRW':
|
|
15
|
+
decimals = 0;
|
|
16
|
+
break;
|
|
17
|
+
case 'USD':
|
|
18
|
+
decimals = 2;
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
var str = Number(value).toFixed(decimals);
|
|
22
|
+
if (decimals) {
|
|
23
|
+
return str.replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
|
|
24
|
+
}
|
|
25
|
+
return str.replace(/(\d)(?=(\d{3})+$)/g, '$1,');
|
|
26
|
+
}
|
|
27
|
+
exports.default = formatCurrency;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ISection } from '../../../../../DynamicLayout/types';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
filteredSortedSection: ISection[];
|
|
5
|
-
};
|
|
6
|
-
declare function GlobalFixedOverlay({ filteredSortedSection }: Props): JSX.Element;
|
|
7
|
-
export default GlobalFixedOverlay;
|