pds-dev-kit-web 2.0.9-alpha.5 → 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 +3 -1
- package/dist/src/common/services/i18n/resources/es.json +3 -1
- package/dist/src/common/services/i18n/resources/fil.json +3 -1
- package/dist/src/common/services/i18n/resources/index.d.ts +14 -0
- package/dist/src/common/services/i18n/resources/ja.json +3 -1
- package/dist/src/common/services/i18n/resources/ko.json +3 -1
- package/dist/src/common/services/i18n/resources/zh-cn.json +3 -1
- package/dist/src/common/services/i18n/resources/zh-tw.json +3 -1
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +2 -2
- package/dist/src/sub/DynamicLayout/mock_storybook.js +2 -2
- 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 +2 -40
- 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.js +27 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/desktop/components/SectionContents.js +17 -2
- 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 +2 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/EmptyMembershipSheet.js +8 -9
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/MembershipContents.js +3 -4
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateA/mobile/components/SectionContents.js +16 -2
- 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 +1 -28
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipBenefitInfo.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/MembershipPlanSheet.js +27 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/desktop/components/SectionContents.js +16 -2
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/M_TemplateB.js +11 -1
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/EmptyMembershipSheet.js +8 -9
- package/dist/src/sub/DynamicLayout/sections/MembershipSection/EditType/templates/TemplateB/mobile/components/MembershipContents.js +5 -6
- 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 -2
- 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/types.d.ts +2 -2
- 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 -4
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "Free Trial",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "One-time Payment",
|
|
23
|
-
"str_payment_option_subs_regularly": "Regular Payment"
|
|
23
|
+
"str_payment_option_subs_regularly": "Regular Payment",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "Start for Free"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "Free Trial",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "One-time Payment",
|
|
23
|
-
"str_payment_option_subs_regularly": "Regular Payment"
|
|
23
|
+
"str_payment_option_subs_regularly": "Regular Payment",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "Start for Free"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "Libreng subok",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "Isang beses na pagbayad",
|
|
23
|
-
"str_payment_option_subs_regularly": "Regular na Pagbabayad"
|
|
23
|
+
"str_payment_option_subs_regularly": "Regular na Pagbabayad",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "Magsimula nang Libre"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -22,6 +22,8 @@ declare const locale: {
|
|
|
22
22
|
str_payment_option_unlimited_free: string;
|
|
23
23
|
str_payment_option_one_time: string;
|
|
24
24
|
str_payment_option_subs_regularly: string;
|
|
25
|
+
str_5831: string;
|
|
26
|
+
str_1460: string;
|
|
25
27
|
};
|
|
26
28
|
};
|
|
27
29
|
readonly en: {
|
|
@@ -47,6 +49,8 @@ declare const locale: {
|
|
|
47
49
|
str_payment_option_unlimited_free: string;
|
|
48
50
|
str_payment_option_one_time: string;
|
|
49
51
|
str_payment_option_subs_regularly: string;
|
|
52
|
+
str_5831: string;
|
|
53
|
+
str_1460: string;
|
|
50
54
|
};
|
|
51
55
|
};
|
|
52
56
|
readonly ja: {
|
|
@@ -72,6 +76,8 @@ declare const locale: {
|
|
|
72
76
|
str_payment_option_unlimited_free: string;
|
|
73
77
|
str_payment_option_one_time: string;
|
|
74
78
|
str_payment_option_subs_regularly: string;
|
|
79
|
+
str_5831: string;
|
|
80
|
+
str_1460: string;
|
|
75
81
|
};
|
|
76
82
|
};
|
|
77
83
|
readonly es: {
|
|
@@ -97,6 +103,8 @@ declare const locale: {
|
|
|
97
103
|
str_payment_option_unlimited_free: string;
|
|
98
104
|
str_payment_option_one_time: string;
|
|
99
105
|
str_payment_option_subs_regularly: string;
|
|
106
|
+
str_5831: string;
|
|
107
|
+
str_1460: string;
|
|
100
108
|
};
|
|
101
109
|
};
|
|
102
110
|
readonly 'zh-cn': {
|
|
@@ -122,6 +130,8 @@ declare const locale: {
|
|
|
122
130
|
str_payment_option_unlimited_free: string;
|
|
123
131
|
str_payment_option_one_time: string;
|
|
124
132
|
str_payment_option_subs_regularly: string;
|
|
133
|
+
str_5831: string;
|
|
134
|
+
str_1460: string;
|
|
125
135
|
};
|
|
126
136
|
};
|
|
127
137
|
readonly 'zh-tw': {
|
|
@@ -147,6 +157,8 @@ declare const locale: {
|
|
|
147
157
|
str_payment_option_unlimited_free: string;
|
|
148
158
|
str_payment_option_one_time: string;
|
|
149
159
|
str_payment_option_subs_regularly: string;
|
|
160
|
+
str_5831: string;
|
|
161
|
+
str_1460: string;
|
|
150
162
|
};
|
|
151
163
|
};
|
|
152
164
|
readonly fil: {
|
|
@@ -172,6 +184,8 @@ declare const locale: {
|
|
|
172
184
|
str_payment_option_unlimited_free: string;
|
|
173
185
|
str_payment_option_one_time: string;
|
|
174
186
|
str_payment_option_subs_regularly: string;
|
|
187
|
+
str_5831: string;
|
|
188
|
+
str_1460: string;
|
|
175
189
|
};
|
|
176
190
|
};
|
|
177
191
|
};
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "免费体验",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "One-time Payment",
|
|
23
|
-
"str_payment_option_subs_regularly": "Regular Payment"
|
|
23
|
+
"str_payment_option_subs_regularly": "Regular Payment",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "Start for Free"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "무료 체험",
|
|
21
21
|
"str_payment_option_unlimited_free": "무료",
|
|
22
22
|
"str_payment_option_one_time": "1회 결제",
|
|
23
|
-
"str_payment_option_subs_regularly": "정기 결제"
|
|
23
|
+
"str_payment_option_subs_regularly": "정기 결제",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "무료로 시작하기"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "免费体验",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "一次性付款",
|
|
23
|
-
"str_payment_option_subs_regularly": "定期付款"
|
|
23
|
+
"str_payment_option_subs_regularly": "定期付款",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "免费开始"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"str_payment_option_subs_temporary_free": "期限內免費",
|
|
21
21
|
"str_payment_option_unlimited_free": "Free Access",
|
|
22
22
|
"str_payment_option_one_time": "結算一次",
|
|
23
|
-
"str_payment_option_subs_regularly": "定期結算"
|
|
23
|
+
"str_payment_option_subs_regularly": "定期結算",
|
|
24
|
+
"str_5831": "{{price}} USD",
|
|
25
|
+
"str_1460": "免費開始"
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1192,7 +1192,7 @@ exports.samplePageMembershipSection = {
|
|
|
1192
1192
|
subscriptionProductId: i + 1,
|
|
1193
1193
|
subscriptionProduct: {
|
|
1194
1194
|
id: i + 1,
|
|
1195
|
-
type: '
|
|
1195
|
+
type: 'COUPON_FREE_FINITE',
|
|
1196
1196
|
title: i % 2 ? '청춘이 황금시대를 우리의 같은 무엇을' : '짧은 제목',
|
|
1197
1197
|
alias: i % 2
|
|
1198
1198
|
? "CONNECTED_SUBSCRIPTION_PRODUCTS_" + alphabet[i] + "_ALIAS"
|
|
@@ -1201,7 +1201,7 @@ exports.samplePageMembershipSection = {
|
|
|
1201
1201
|
isDeactivated: i % 2 === 0,
|
|
1202
1202
|
fee: {
|
|
1203
1203
|
currency: 'KRW',
|
|
1204
|
-
amount:
|
|
1204
|
+
amount: 10000
|
|
1205
1205
|
},
|
|
1206
1206
|
insertedAt: '2023-01-06T09:05:45',
|
|
1207
1207
|
updatedAt: '2023-01-06T09:05:45'
|
|
@@ -1513,7 +1513,7 @@ exports.MembershipSectionsMock = [
|
|
|
1513
1513
|
isDeactivated: j % 2 === 0,
|
|
1514
1514
|
fee: {
|
|
1515
1515
|
currency: 'KRW',
|
|
1516
|
-
amount:
|
|
1516
|
+
amount: 10000
|
|
1517
1517
|
},
|
|
1518
1518
|
insertedAt: '2023-01-06T09:05:45',
|
|
1519
1519
|
updatedAt: '2023-01-06T09:05:45'
|
|
@@ -2286,7 +2286,7 @@ exports.MembershipSectionsMockOnlyOneConnectedSubscriptionProduct = [
|
|
|
2286
2286
|
isDeactivated: j % 2 === 0,
|
|
2287
2287
|
fee: {
|
|
2288
2288
|
currency: 'KRW',
|
|
2289
|
-
amount:
|
|
2289
|
+
amount: 10000
|
|
2290
2290
|
},
|
|
2291
2291
|
insertedAt: '2023-01-06T09:05:45',
|
|
2292
2292
|
updatedAt: '2023-01-06T09:05:45'
|
|
@@ -30,22 +30,47 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
30
30
|
};
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
33
|
+
var react_1 = require("react");
|
|
33
34
|
var components_1 = require("../../../../DynamicLayout/components");
|
|
34
35
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
35
36
|
var templates_1 = require("./templates");
|
|
36
37
|
function EditTypeMembershipSection(_a) {
|
|
37
38
|
var props = __rest(_a, []);
|
|
38
39
|
var template = props.template;
|
|
39
|
-
|
|
40
|
+
var resizeTarget = (0, react_1.useRef)(null);
|
|
41
|
+
var _b = (0, react_1.useState)(true), isWideView = _b[0], setIsWideView = _b[1];
|
|
42
|
+
var handleCheckIsWideView = function (value) {
|
|
43
|
+
setIsWideView(value);
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @when : 화면 진입 시
|
|
47
|
+
* @expected : 콘텐츠 영역의 크기를 확인해서 wideView인지 확인하고, observer를 추가합니다.
|
|
48
|
+
* @clear : observer를 제거합니다.
|
|
49
|
+
*/
|
|
50
|
+
(0, react_1.useEffect)(function () {
|
|
51
|
+
var element = resizeTarget === null || resizeTarget === void 0 ? void 0 : resizeTarget.current;
|
|
52
|
+
if (!element)
|
|
53
|
+
return;
|
|
54
|
+
var observer = new ResizeObserver(function (entries) {
|
|
55
|
+
entries.forEach(function (entry) {
|
|
56
|
+
handleCheckIsWideView(entry.contentRect.width > 1500);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
observer.observe(element);
|
|
60
|
+
return function () {
|
|
61
|
+
observer.disconnect();
|
|
62
|
+
};
|
|
63
|
+
}, []);
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ "x-dlayout-section-type": "Membership", ref: resizeTarget }, { children: (0, jsx_runtime_1.jsx)(components_1.Section, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(TemplateMather, { styleTemplate: template, isWideView: isWideView }, void 0) }), void 0) }), void 0));
|
|
40
65
|
}
|
|
41
66
|
var S_SectionWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
42
67
|
function TemplateMather(_a) {
|
|
43
|
-
var styleTemplate = _a.styleTemplate;
|
|
68
|
+
var styleTemplate = _a.styleTemplate, isWideView = _a.isWideView;
|
|
44
69
|
switch (styleTemplate) {
|
|
45
70
|
case 'PRG_MEMBERSHIP_DISPLAY_A':
|
|
46
|
-
return (0, jsx_runtime_1.jsx)(templates_1.TemplateA, {}, void 0);
|
|
71
|
+
return (0, jsx_runtime_1.jsx)(templates_1.TemplateA, { isWideView: isWideView }, void 0);
|
|
47
72
|
case 'PRG_MEMBERSHIP_DISPLAY_B':
|
|
48
|
-
return (0, jsx_runtime_1.jsx)(templates_1.TemplateB, {}, void 0);
|
|
73
|
+
return (0, jsx_runtime_1.jsx)(templates_1.TemplateB, { isWideView: isWideView }, void 0);
|
|
49
74
|
default:
|
|
50
75
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
51
76
|
}
|
|
@@ -6,7 +6,8 @@ var Section_1 = require("../../../../../../DynamicLayout/components/Section");
|
|
|
6
6
|
var dynamicLayoutContext_1 = require("../../../../../../DynamicLayout/dynamicLayoutContext");
|
|
7
7
|
var desktop_1 = require("./desktop");
|
|
8
8
|
var mobile_1 = require("./mobile");
|
|
9
|
-
function TemplateA() {
|
|
9
|
+
function TemplateA(_a) {
|
|
10
|
+
var isWideView = _a.isWideView;
|
|
10
11
|
var device = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext).device;
|
|
11
12
|
var section = (0, react_1.useContext)(Section_1.sectionContext);
|
|
12
13
|
if (!section) {
|
|
@@ -18,7 +19,7 @@ function TemplateA() {
|
|
|
18
19
|
}
|
|
19
20
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: {
|
|
20
21
|
MOBILE: ((0, jsx_runtime_1.jsx)(mobile_1.M_TemplateA, { membershipDisplay: programData.preview.resources.real.membershipDisplay }, void 0)),
|
|
21
|
-
DESKTOP: ((0, jsx_runtime_1.jsx)(desktop_1.D_TemplateA, { membershipDisplay: programData.preview.resources.real.membershipDisplay }, void 0))
|
|
22
|
+
DESKTOP: ((0, jsx_runtime_1.jsx)(desktop_1.D_TemplateA, { membershipDisplay: programData.preview.resources.real.membershipDisplay, isWideView: isWideView }, void 0))
|
|
22
23
|
}[device] }, void 0));
|
|
23
24
|
}
|
|
24
25
|
exports.default = TemplateA;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { IMembershipDisplay } from '../../../../../../../DynamicLayout/types';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
membershipDisplay: IMembershipDisplay;
|
|
5
|
+
isWideView: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare function TemplateA({ membershipDisplay }: Props): JSX.Element;
|
|
7
|
+
declare function TemplateA({ membershipDisplay, isWideView }: Props): JSX.Element;
|
|
7
8
|
export default TemplateA;
|
|
@@ -3,59 +3,21 @@ 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
|
-
};
|
|
17
6
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
8
|
};
|
|
20
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
10
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
-
var react_1 = require("react");
|
|
23
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
24
12
|
var EmptyMembershipSheet_1 = __importDefault(require("./components/EmptyMembershipSheet"));
|
|
25
13
|
var MembershipSheet_1 = __importDefault(require("./components/MembershipSheet"));
|
|
26
14
|
var SectionContents_1 = __importDefault(require("./components/SectionContents"));
|
|
27
15
|
function TemplateA(_a) {
|
|
28
|
-
var membershipDisplay = _a.membershipDisplay;
|
|
29
|
-
var _b = (0, react_1.useState)(true), isWideView = _b[0], setIsWideView = _b[1];
|
|
30
|
-
var targetRef = (0, react_1.useRef)(null);
|
|
16
|
+
var membershipDisplay = _a.membershipDisplay, isWideView = _a.isWideView;
|
|
31
17
|
var orderedMemberships = membershipDisplay.connectedMemberships
|
|
32
18
|
.slice()
|
|
33
19
|
.sort(function (a, b) { return a.order - b.order; });
|
|
34
|
-
|
|
35
|
-
if (!targetRef.current) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
setIsWideView(targetRef.current.clientWidth > 1300);
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @when : 화면 진입 시
|
|
42
|
-
* @expected : 콘텐츠 영역의 크기를 확인해서 wideView인지 확인하고, 윈도우창 크기를 조절하는 이벤트 핸들러를 추가합니다.
|
|
43
|
-
* @clear : 윈도우창 크기를 조절하는 이벤트 핸들러를 제거합니다.
|
|
44
|
-
*/
|
|
45
|
-
(0, react_1.useEffect)(function () {
|
|
46
|
-
if (!targetRef.current) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
window.addEventListener('resize', handleSize);
|
|
50
|
-
setIsWideView(targetRef.current.clientWidth > 1300);
|
|
51
|
-
return function () {
|
|
52
|
-
if (!targetRef.current) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
window.removeEventListener('resize', handleSize);
|
|
56
|
-
};
|
|
57
|
-
}, []);
|
|
58
|
-
return ((0, jsx_runtime_1.jsxs)(S_MembershipSection, __assign({ ref: targetRef }, { children: [(0, jsx_runtime_1.jsx)(SectionContents_1.default, {}, void 0), orderedMemberships.length > 0 ? ((0, jsx_runtime_1.jsx)(MembershipSheet_1.default, { connectedMemberships: orderedMemberships, isWideView: isWideView }, void 0)) : ((0, jsx_runtime_1.jsx)(EmptyMembershipSheet_1.default, {}, void 0))] }), void 0));
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(S_MembershipSection, { children: [(0, jsx_runtime_1.jsx)(SectionContents_1.default, {}, void 0), orderedMemberships.length > 0 ? ((0, jsx_runtime_1.jsx)(MembershipSheet_1.default, { connectedMemberships: orderedMemberships, isWideView: isWideView }, void 0)) : ((0, jsx_runtime_1.jsx)(EmptyMembershipSheet_1.default, {}, void 0))] }, void 0));
|
|
59
21
|
}
|
|
60
22
|
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) {
|
|
61
23
|
var theme = _a.theme;
|
|
@@ -5,6 +5,6 @@ var components_1 = require("../../../../../../../../DynamicLayout/components");
|
|
|
5
5
|
var components_2 = require("../../../../../../../../DynamicLayout/sections/MembershipSection/components");
|
|
6
6
|
function MembershipBenefitInfo(_a) {
|
|
7
7
|
var membershipBenefitInfo = _a.membershipBenefitInfo, itemToneTextLabelColor = _a.itemToneTextLabelColor;
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_e" }, void 0), membershipBenefitInfo.benefitAlpha && ((0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitAlpha, styleTheme: "
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_e" }, void 0), membershipBenefitInfo.benefitAlpha && ((0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitAlpha, styleTheme: "subTitleRegular", color: itemToneTextLabelColor, textAlign: "left", wordBreak: "break_all", bulletPointMode: "use" }, void 0)), membershipBenefitInfo.benefitBravo && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitBravo, styleTheme: "subTitleRegular", color: itemToneTextLabelColor, textAlign: "left", wordBreak: "break_all", bulletPointMode: "use" }, void 0)] }, void 0)), membershipBenefitInfo.benefitCharlie && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitCharlie, styleTheme: "subTitleRegular", color: itemToneTextLabelColor, textAlign: "left", wordBreak: "break_all", bulletPointMode: "use" }, void 0)] }, void 0)), membershipBenefitInfo.benefitDelta && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitDelta, styleTheme: "subTitleRegular", color: itemToneTextLabelColor, textAlign: "left", wordBreak: "break_all", bulletPointMode: "use" }, void 0)] }, void 0)), membershipBenefitInfo.benefitEcho && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: membershipBenefitInfo.benefitEcho, styleTheme: "subTitleRegular", color: itemToneTextLabelColor, textAlign: "left", wordBreak: "break_all", bulletPointMode: "use" }, void 0)] }, void 0))] }, void 0));
|
|
9
9
|
}
|
|
10
10
|
exports.default = MembershipBenefitInfo;
|
|
@@ -19,11 +19,13 @@ 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");
|
|
22
23
|
var react_i18next_1 = require("react-i18next");
|
|
23
24
|
var panels_1 = require("../../../../../../../../../desktop/panels");
|
|
24
25
|
var components_1 = require("../../../../../../../../../hybrid/components");
|
|
25
26
|
var components_2 = require("../../../../../../../../DynamicLayout/sections/MembershipSection/components");
|
|
26
27
|
var constants_1 = require("../../../../../../../../DynamicLayout/sections/MembershipSection/constants");
|
|
28
|
+
var formatCurrency_1 = __importDefault(require("../../../../../../../../DynamicLayout/utils/formatCurrency"));
|
|
27
29
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
28
30
|
function MembershipPlanSheet(_a) {
|
|
29
31
|
var connectedSubscriptionProducts = _a.connectedSubscriptionProducts, sectionStyles = _a.sectionStyles;
|
|
@@ -31,11 +33,35 @@ function MembershipPlanSheet(_a) {
|
|
|
31
33
|
var subscriptionProduct = connectedSubscriptionProducts.subscriptionProduct;
|
|
32
34
|
var type = subscriptionProduct.type, alias = subscriptionProduct.alias, fee = subscriptionProduct.fee;
|
|
33
35
|
var itemToneType = sectionStyles.itemToneType, itemHighlightingColorInHex = sectionStyles.itemHighlightingColorInHex, programmedItemActionButtonTextType = sectionStyles.programmedItemActionButtonTextType;
|
|
36
|
+
var productFeeText = (0, react_1.useMemo)(function () {
|
|
37
|
+
var amount = fee.amount, currency = fee.currency;
|
|
38
|
+
var price = (0, formatCurrency_1.default)(amount, currency);
|
|
39
|
+
switch (currency) {
|
|
40
|
+
case 'KRW':
|
|
41
|
+
return t('str_5339', { price: price });
|
|
42
|
+
case 'USD':
|
|
43
|
+
return t('str_5831', { price: price });
|
|
44
|
+
default:
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
47
|
+
}, [subscriptionProduct]);
|
|
48
|
+
var itemActionButtonText = (0, react_1.useMemo)(function () {
|
|
49
|
+
var itemActionButtonTextType = t({ A: 'str_5350', B: 'str_5351', C: 'str_5352', D: 'str_5353', E: 'str_5354' }[programmedItemActionButtonTextType]);
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'COUPON_FREE_FINITE':
|
|
52
|
+
case 'COUPON_FREE_INFINITE':
|
|
53
|
+
case 'FREE_FINITE':
|
|
54
|
+
case 'FREE_INFINITE':
|
|
55
|
+
return t('str_1460');
|
|
56
|
+
default:
|
|
57
|
+
return itemActionButtonTextType;
|
|
58
|
+
}
|
|
59
|
+
}, [programmedItemActionButtonTextType, type]);
|
|
34
60
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_g" }, void 0), (0, jsx_runtime_1.jsxs)(panels_1.ContentSheet, __assign({ width: "100%", height: "auto", shapeType: "round", paddingBottom: "spacing_d", overrideCSS: {
|
|
35
61
|
display: 'flex',
|
|
36
62
|
cursor: 'pointer',
|
|
37
63
|
backgroundColor: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipPlanSheetBackgroundColor
|
|
38
|
-
} }, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipInfoBox, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipInfoTitle, { children: [type && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Title, { text: t(constants_1.MEMBERSHIP_SECTION_SUBSCRIPTION_PRODUCT_TYPE_TEXT[type]), styleTheme: "body2Regular", color: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetTextLabelColor, textAlign: "left", lineLimit: 2, wordBreak: "break_all", ellipsisMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), alias && ((0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: alias, styleTheme: "body2Bold", color: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetTextLabelColor, wordBreak: "break_all", textAlign: "left" }, void 0))] }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_d" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Title, { text:
|
|
64
|
+
} }, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipInfoBox, { children: [(0, jsx_runtime_1.jsxs)(S_MembershipInfoTitle, { children: [type && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Title, { text: t(constants_1.MEMBERSHIP_SECTION_SUBSCRIPTION_PRODUCT_TYPE_TEXT[type]), styleTheme: "body2Regular", color: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetTextLabelColor, textAlign: "left", lineLimit: 2, wordBreak: "break_all", ellipsisMode: "use" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0)] }, void 0)), alias && ((0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Description, { text: alias, styleTheme: "body2Bold", color: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetTextLabelColor, wordBreak: "break_all", textAlign: "left" }, void 0))] }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_d" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.Title, { text: productFeeText, customFontSize: "32px", customFontWeight: "bold", wordBreak: "break_all", color: itemHighlightingColorInHex }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_d", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.ColorOverrideIcon, { iconName: "ic_arrow_down", iconColor: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetTextLabelColor }, void 0)] }), void 0), (0, jsx_runtime_1.jsx)(components_2.D_MembershipSectionItem.XlargeMainButton, { buttonText: itemActionButtonText, buttonBackgroundColor: itemHighlightingColorInHex, buttonTextColor: "#FDFDFDFF", "$paddingBottom": "56px" }, void 0)] }, void 0));
|
|
39
65
|
}
|
|
40
66
|
var S_MembershipInfoTitle = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
41
67
|
var S_MembershipInfoBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
@@ -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,9 +30,13 @@ 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
|
-
|
|
33
|
+
var isEmptySection = !title && !description && !buttonAlphaLabel;
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(S_SectionDataBox, __assign({ isEmptySection: isEmptySection }, { 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
35
|
}
|
|
24
|
-
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom:
|
|
36
|
+
var S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-bottom: ", ";\n"], ["\n margin-bottom: ", ";\n"])), function (_a) {
|
|
37
|
+
var isEmptySection = _a.isEmptySection;
|
|
38
|
+
return (isEmptySection ? 0 : '80px');
|
|
39
|
+
});
|
|
25
40
|
var S_DescriptionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n"], ["\n padding-top: ", ";\n"])), function (_a) {
|
|
26
41
|
var theme = _a.theme;
|
|
27
42
|
return theme.spacing.spacingF;
|
|
@@ -3,5 +3,5 @@ import type { IMembershipDisplay } from '../../../../../../../DynamicLayout/type
|
|
|
3
3
|
declare type Props = {
|
|
4
4
|
membershipDisplay: IMembershipDisplay;
|
|
5
5
|
};
|
|
6
|
-
declare function
|
|
7
|
-
export default
|
|
6
|
+
declare function TemplateA({ membershipDisplay }: Props): JSX.Element;
|
|
7
|
+
export default TemplateA;
|
|
@@ -12,7 +12,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
12
12
|
var EmptyMembershipSheet_1 = __importDefault(require("./components/EmptyMembershipSheet"));
|
|
13
13
|
var MembershipContents_1 = __importDefault(require("./components/MembershipContents"));
|
|
14
14
|
var SectionContents_1 = __importDefault(require("./components/SectionContents"));
|
|
15
|
-
function
|
|
15
|
+
function TemplateA(_a) {
|
|
16
16
|
var membershipDisplay = _a.membershipDisplay;
|
|
17
17
|
var orderedConnectedMemberships = membershipDisplay.connectedMemberships.slice().sort(function (a, b) { return a.order - b.order; }) || [];
|
|
18
18
|
return ((0, jsx_runtime_1.jsxs)(S_MembershipSection, { children: [(0, jsx_runtime_1.jsx)(SectionContents_1.default, {}, void 0), orderedConnectedMemberships.length > 0 ? ((0, jsx_runtime_1.jsx)(MembershipContents_1.default, { orderedConnectedMemberships: orderedConnectedMemberships }, void 0)) : ((0, jsx_runtime_1.jsx)(EmptyMembershipSheet_1.default, {}, void 0))] }, void 0));
|
|
@@ -24,5 +24,5 @@ var S_MembershipSection = styled_components_1.default.div(templateObject_1 || (t
|
|
|
24
24
|
var theme = _a.theme;
|
|
25
25
|
return theme.spacing.spacingE;
|
|
26
26
|
});
|
|
27
|
-
exports.default =
|
|
27
|
+
exports.default = TemplateA;
|
|
28
28
|
var templateObject_1;
|
|
@@ -15,9 +15,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
15
15
|
var react_1 = require("react");
|
|
16
16
|
var react_i18next_1 = require("react-i18next");
|
|
17
17
|
var panels_1 = require("../../../../../../../../../desktop/panels");
|
|
18
|
-
var components_1 = require("../../../../../../../../DynamicLayout/components");
|
|
19
18
|
var Section_1 = require("../../../../../../../../DynamicLayout/components/Section");
|
|
20
|
-
var
|
|
19
|
+
var components_1 = require("../../../../../../../../DynamicLayout/sections/MembershipSection/components");
|
|
21
20
|
var constants_1 = require("../../../../../../../../DynamicLayout/sections/MembershipSection/constants");
|
|
22
21
|
function MembershipSheet() {
|
|
23
22
|
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
@@ -26,12 +25,12 @@ function MembershipSheet() {
|
|
|
26
25
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
27
26
|
}
|
|
28
27
|
var itemToneType = section.styles.itemToneType;
|
|
29
|
-
return ((0, jsx_runtime_1.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(panels_1.ContentSheet, __assign({ overrideCSS: {
|
|
29
|
+
backgroundColor: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].membershipSheetBackgroundColor,
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
marginBottom: '96px'
|
|
34
|
+
}, width: "100%", height: "180px", shapeType: "round" }, { children: (0, jsx_runtime_1.jsx)(components_1.D_MembershipSectionItem.Title, { text: t('str_5299'), styleTheme: "body2Regular", color: constants_1.MEMBERSHIP_SECTION_TONE_COLOR[itemToneType].emptyMembershipSheetTextLabelColor }, void 0) }), void 0));
|
|
36
35
|
}
|
|
37
36
|
exports.default = MembershipSheet;
|
|
@@ -9,14 +9,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
11
|
var react_1 = require("react");
|
|
12
|
-
var pdsOriginal_1 = require("../../../../../../../../DynamicLayout/components/pdsOriginal");
|
|
13
12
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
14
13
|
var MembershipSectionSheet_1 = __importDefault(require("./MembershipSectionSheet"));
|
|
15
14
|
function MembershipContents(_a) {
|
|
16
15
|
var orderedConnectedMemberships = _a.orderedConnectedMemberships;
|
|
17
|
-
return ((0, jsx_runtime_1.
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(S_MembershipBox, { children: orderedConnectedMemberships.map(function (connectedMembership) {
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsx)(MembershipSectionSheet_1.default, { membership: connectedMembership.membership }, void 0) }, connectedMembership.id));
|
|
18
|
+
}) }, void 0));
|
|
20
19
|
}
|
|
21
20
|
var S_MembershipBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n"])));
|
|
22
21
|
exports.default = MembershipContents;
|
|
@@ -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,9 +30,12 @@ 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.M_MembershipSectionItem.Title, { text: title, textAlign: "center", color: titleColorInHex, styleTheme: "
|
|
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: "displayBold" }, 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: "body1Bold" }, 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 S_SectionDataBox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin:
|
|
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
|
+
});
|
|
25
39
|
var S_DescriptionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n"], ["\n padding-top: ", ";\n"])), function (_a) {
|
|
26
40
|
var theme = _a.theme;
|
|
27
41
|
return theme.spacing.spacingD;
|
|
@@ -6,7 +6,8 @@ var Section_1 = require("../../../../../../DynamicLayout/components/Section");
|
|
|
6
6
|
var dynamicLayoutContext_1 = require("../../../../../../DynamicLayout/dynamicLayoutContext");
|
|
7
7
|
var desktop_1 = require("./desktop");
|
|
8
8
|
var mobile_1 = require("./mobile");
|
|
9
|
-
function TemplateB() {
|
|
9
|
+
function TemplateB(_a) {
|
|
10
|
+
var isWideView = _a.isWideView;
|
|
10
11
|
var device = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext).device;
|
|
11
12
|
var section = (0, react_1.useContext)(Section_1.sectionContext);
|
|
12
13
|
if (!section) {
|
|
@@ -18,7 +19,7 @@ function TemplateB() {
|
|
|
18
19
|
}
|
|
19
20
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: {
|
|
20
21
|
MOBILE: ((0, jsx_runtime_1.jsx)(mobile_1.M_TemplateB, { membershipDisplay: programData.preview.resources.real.membershipDisplay }, void 0)),
|
|
21
|
-
DESKTOP: ((0, jsx_runtime_1.jsx)(desktop_1.D_TemplateB, { membershipDisplay: programData.preview.resources.real.membershipDisplay }, void 0))
|
|
22
|
+
DESKTOP: ((0, jsx_runtime_1.jsx)(desktop_1.D_TemplateB, { membershipDisplay: programData.preview.resources.real.membershipDisplay, isWideView: isWideView }, void 0))
|
|
22
23
|
}[device] }, void 0));
|
|
23
24
|
}
|
|
24
25
|
exports.default = TemplateB;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { IMembershipDisplay } from '../../../../../../../DynamicLayout/types';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
membershipDisplay: IMembershipDisplay;
|
|
5
|
+
isWideView: boolean;
|
|
5
6
|
};
|
|
6
|
-
declare function TemplateB({ membershipDisplay }: Props): JSX.Element;
|
|
7
|
+
declare function TemplateB({ membershipDisplay, isWideView }: Props): JSX.Element;
|
|
7
8
|
export default TemplateB;
|