@driveflux/pdf 1.0.1
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/.eslintrc +3 -0
- package/.swcrc +14 -0
- package/.turbo/turbo-build.log +6 -0
- package/CHANGELOG.md +69 -0
- package/dist/__mocks__/subscription.d.ts +3 -0
- package/dist/__mocks__/subscription.d.ts.map +1 -0
- package/dist/__mocks__/subscription.js +1069 -0
- package/dist/cjs/__mocks__/subscription.js +1079 -0
- package/dist/cjs/components/FluxLogo.js +76 -0
- package/dist/cjs/components/StandardPage.js +129 -0
- package/dist/cjs/debug.js +202 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/templates/SubscriptionAgreement/Confirmation.js +95 -0
- package/dist/cjs/templates/SubscriptionAgreement/CoverPage.js +110 -0
- package/dist/cjs/templates/SubscriptionAgreement/CoverPageSection.js +35 -0
- package/dist/cjs/templates/SubscriptionAgreement/Details.js +161 -0
- package/dist/cjs/templates/SubscriptionAgreement/Footer.js +68 -0
- package/dist/cjs/templates/SubscriptionAgreement/Header.js +61 -0
- package/dist/cjs/templates/SubscriptionAgreement/LabelValue.js +39 -0
- package/dist/cjs/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +48 -0
- package/dist/cjs/templates/SubscriptionAgreement/TermsOfUse.js +72 -0
- package/dist/cjs/templates/SubscriptionAgreement/TermsOfUseSubSection.js +108 -0
- package/dist/cjs/templates/SubscriptionAgreement/index.js +276 -0
- package/dist/cjs/templates/SubscriptionAgreement/translations.js +666 -0
- package/dist/cjs/templates/SubscriptionAgreement/utils.js +14 -0
- package/dist/cjs/templates/index.js +18 -0
- package/dist/cjs/theme/colors.js +147 -0
- package/dist/cjs/theme/index.js +18 -0
- package/dist/cjs/types.js +4 -0
- package/dist/cjs/utils.js +165 -0
- package/dist/cjs/watch.js +20 -0
- package/dist/components/FluxLogo.d.ts +3 -0
- package/dist/components/FluxLogo.d.ts.map +1 -0
- package/dist/components/FluxLogo.js +66 -0
- package/dist/components/StandardPage.d.ts +6 -0
- package/dist/components/StandardPage.d.ts.map +1 -0
- package/dist/components/StandardPage.js +114 -0
- package/dist/debug.d.ts +2 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.js +198 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts +10 -0
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/Confirmation.js +80 -0
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +12 -0
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/CoverPage.js +95 -0
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts +7 -0
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +25 -0
- package/dist/templates/SubscriptionAgreement/Details.d.ts +10 -0
- package/dist/templates/SubscriptionAgreement/Details.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/Details.js +146 -0
- package/dist/templates/SubscriptionAgreement/Footer.d.ts +10 -0
- package/dist/templates/SubscriptionAgreement/Footer.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/Footer.js +58 -0
- package/dist/templates/SubscriptionAgreement/Header.d.ts +10 -0
- package/dist/templates/SubscriptionAgreement/Header.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/Header.js +46 -0
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts +8 -0
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/LabelValue.js +29 -0
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts +10 -0
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +33 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts +8 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +57 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts +12 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +98 -0
- package/dist/templates/SubscriptionAgreement/index.d.ts +14 -0
- package/dist/templates/SubscriptionAgreement/index.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/index.js +261 -0
- package/dist/templates/SubscriptionAgreement/translations.d.ts +72 -0
- package/dist/templates/SubscriptionAgreement/translations.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/translations.js +656 -0
- package/dist/templates/SubscriptionAgreement/utils.d.ts +3 -0
- package/dist/templates/SubscriptionAgreement/utils.d.ts.map +1 -0
- package/dist/templates/SubscriptionAgreement/utils.js +4 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +1 -0
- package/dist/theme/colors.d.ts +148 -0
- package/dist/theme/colors.d.ts.map +1 -0
- package/dist/theme/colors.js +137 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +150 -0
- package/dist/watch.d.ts +2 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +11 -0
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/package.json +43 -0
- package/src/__mocks__/subscription.ts +803 -0
- package/src/components/FluxLogo.tsx +52 -0
- package/src/components/StandardPage.tsx +32 -0
- package/src/debug.ts +36 -0
- package/src/index.ts +3 -0
- package/src/templates/SubscriptionAgreement/Confirmation.tsx +49 -0
- package/src/templates/SubscriptionAgreement/CoverPage.tsx +52 -0
- package/src/templates/SubscriptionAgreement/CoverPageSection.tsx +25 -0
- package/src/templates/SubscriptionAgreement/Details.tsx +127 -0
- package/src/templates/SubscriptionAgreement/Footer.tsx +37 -0
- package/src/templates/SubscriptionAgreement/Header.tsx +37 -0
- package/src/templates/SubscriptionAgreement/LabelValue.tsx +19 -0
- package/src/templates/SubscriptionAgreement/SubscriptionAgreementPage.tsx +24 -0
- package/src/templates/SubscriptionAgreement/TermsOfUse.tsx +30 -0
- package/src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx +44 -0
- package/src/templates/SubscriptionAgreement/index.tsx +66 -0
- package/src/templates/SubscriptionAgreement/translations.ts +664 -0
- package/src/templates/SubscriptionAgreement/utils.ts +7 -0
- package/src/templates/index.ts +1 -0
- package/src/theme/colors.ts +180 -0
- package/src/theme/index.ts +1 -0
- package/src/types.ts +1 -0
- package/src/utils.ts +10 -0
- package/src/watch.ts +16 -0
- package/tsconfig.json +13 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _user = require("@driveflux/db/models/user");
|
|
13
|
+
var _time = require("@driveflux/time");
|
|
14
|
+
var _renderer = require("@react-pdf/renderer");
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
var _index = require("../../theme/index.js");
|
|
17
|
+
var _LabelValue = /*#__PURE__*/ _interop_require_default(require("./LabelValue.js"));
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
var Details = function(param) {
|
|
24
|
+
var tDetails = param.tDetails, subscription = param.subscription;
|
|
25
|
+
var details = (0, _react.useMemo)(function() {
|
|
26
|
+
var _subscription_user_identification, _subscription_vehicle, _subscription_vehicle1, _subscription_vehicle2, _subscription_vehicle3, _subscription_schedule, _subscription_schedule1;
|
|
27
|
+
return {
|
|
28
|
+
member: [
|
|
29
|
+
{
|
|
30
|
+
key: tDetails.member.name,
|
|
31
|
+
value: (0, _user.userName)(subscription.user)
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: tDetails.member.idOrPassportNo,
|
|
35
|
+
value: (_subscription_user_identification = subscription.user.identification) === null || _subscription_user_identification === void 0 ? void 0 : _subscription_user_identification.number
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
vehicle: [
|
|
39
|
+
{
|
|
40
|
+
key: tDetails.vehicle.make,
|
|
41
|
+
value: (_subscription_vehicle = subscription.vehicle) === null || _subscription_vehicle === void 0 ? void 0 : _subscription_vehicle.make
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: tDetails.vehicle.model,
|
|
45
|
+
value: (_subscription_vehicle1 = subscription.vehicle) === null || _subscription_vehicle1 === void 0 ? void 0 : _subscription_vehicle1.vehicleModel
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: tDetails.vehicle.year,
|
|
49
|
+
value: (_subscription_vehicle2 = subscription.vehicle) === null || _subscription_vehicle2 === void 0 ? void 0 : _subscription_vehicle2.year
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: tDetails.vehicle.plateNo,
|
|
53
|
+
value: (_subscription_vehicle3 = subscription.vehicle) === null || _subscription_vehicle3 === void 0 ? void 0 : _subscription_vehicle3.registrationNumber
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
subscription: [
|
|
57
|
+
{
|
|
58
|
+
key: tDetails.subscription.subscriptionPlan,
|
|
59
|
+
value: getPlanTranslation(subscription.plan)
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: tDetails.subscription.mileagePackage,
|
|
63
|
+
value: getFullMileagePackageTranslation(subscription.mileagePackage)
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: tDetails.subscription.startDate,
|
|
67
|
+
value: subscription.startedAt ? (0, _time.format)(subscription.startedAt, 'dd-MM-yyyy') : undefined
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: tDetails.subscription.endDate,
|
|
71
|
+
value: subscription.endedAt ? (0, _time.format)(subscription.endedAt, 'dd-MM-yyyy') : ((_subscription_schedule = subscription.schedule) === null || _subscription_schedule === void 0 ? void 0 : _subscription_schedule.endAt) ? (0, _time.format)((_subscription_schedule1 = subscription.schedule) === null || _subscription_schedule1 === void 0 ? void 0 : _subscription_schedule1.endAt, 'dd-MM-yyyy') : undefined
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
}, []);
|
|
76
|
+
var border = "1px solid ".concat(_index.colors.primary2);
|
|
77
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
78
|
+
style: {
|
|
79
|
+
borderLeft: border,
|
|
80
|
+
borderRight: border
|
|
81
|
+
},
|
|
82
|
+
children: [
|
|
83
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
|
|
84
|
+
style: {
|
|
85
|
+
backgroundColor: _index.colors.primary1,
|
|
86
|
+
borderTop: border,
|
|
87
|
+
padding: 8
|
|
88
|
+
},
|
|
89
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
90
|
+
style: {
|
|
91
|
+
fontWeight: 'bold',
|
|
92
|
+
textTransform: 'uppercase',
|
|
93
|
+
letterSpacing: 1
|
|
94
|
+
},
|
|
95
|
+
children: tDetails.agreement
|
|
96
|
+
})
|
|
97
|
+
}),
|
|
98
|
+
Object.keys(details).map(function(key, i) {
|
|
99
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
100
|
+
style: {
|
|
101
|
+
padding: 8,
|
|
102
|
+
paddingBottom: 16,
|
|
103
|
+
rowGap: 8,
|
|
104
|
+
borderTop: border
|
|
105
|
+
},
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
108
|
+
style: {
|
|
109
|
+
textTransform: 'uppercase',
|
|
110
|
+
color: _index.colors.primary2,
|
|
111
|
+
fontSize: 8,
|
|
112
|
+
letterSpacing: 1
|
|
113
|
+
},
|
|
114
|
+
children: "".concat(key, " details")
|
|
115
|
+
}),
|
|
116
|
+
details[key].map(function(line) {
|
|
117
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_LabelValue.default, {
|
|
118
|
+
label: line.key,
|
|
119
|
+
value: line.value
|
|
120
|
+
}, line.key);
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
}, key);
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
var _default = Details;
|
|
129
|
+
// TODO: replace this with dump's once the package is ready
|
|
130
|
+
var getPlanTranslation = function(plan, vehicleType) {
|
|
131
|
+
switch(plan){
|
|
132
|
+
case 'plan60':
|
|
133
|
+
return vehicleType === 'motorcycle' ? '60 Months' : '60 Months (Basic)';
|
|
134
|
+
case 'plan36':
|
|
135
|
+
return '36 Months';
|
|
136
|
+
case 'plan24':
|
|
137
|
+
return '24 Months';
|
|
138
|
+
case 'plan12':
|
|
139
|
+
return '12 Months';
|
|
140
|
+
case 'plan1':
|
|
141
|
+
return 'Monthly (Ultra)';
|
|
142
|
+
case 'planWeekly':
|
|
143
|
+
return 'Weekly';
|
|
144
|
+
default:
|
|
145
|
+
return 'Unknown Plan';
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
var getFullMileagePackageTranslation = function(plan) {
|
|
149
|
+
switch(plan){
|
|
150
|
+
case 'lite':
|
|
151
|
+
return 'Lite - 1,250KM';
|
|
152
|
+
case 'standard':
|
|
153
|
+
return 'Standard - 2,000KM';
|
|
154
|
+
case 'plus':
|
|
155
|
+
return 'Plus - 2,750KM';
|
|
156
|
+
case 'unlimited':
|
|
157
|
+
return 'Unlimited';
|
|
158
|
+
default:
|
|
159
|
+
return 'Unknown Mileage Package';
|
|
160
|
+
}
|
|
161
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _colors = require("../../theme/colors.js");
|
|
14
|
+
var Footer = function(param) {
|
|
15
|
+
var tComputerGenerated = param.tComputerGenerated, tPage = param.tPage, tOf = param.tOf;
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
17
|
+
fixed: true,
|
|
18
|
+
style: {
|
|
19
|
+
justifyContent: 'space-between',
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
paddingTop: 16,
|
|
22
|
+
marginTop: 16,
|
|
23
|
+
borderTop: "1px solid ".concat(_colors.colors.links),
|
|
24
|
+
color: _colors.colors.primary2,
|
|
25
|
+
fontSize: 8
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
29
|
+
children: tComputerGenerated
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
32
|
+
style: {
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
columnGap: 4
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
38
|
+
children: tPage
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
41
|
+
style: {
|
|
42
|
+
fontWeight: 'bold',
|
|
43
|
+
color: _colors.colors.black
|
|
44
|
+
},
|
|
45
|
+
render: function(param) {
|
|
46
|
+
var pageNumber = param.pageNumber;
|
|
47
|
+
return "".concat(pageNumber);
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
51
|
+
children: tOf
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
54
|
+
style: {
|
|
55
|
+
fontWeight: 'bold',
|
|
56
|
+
color: _colors.colors.black
|
|
57
|
+
},
|
|
58
|
+
render: function(param) {
|
|
59
|
+
var totalPages = param.totalPages;
|
|
60
|
+
return "".concat(totalPages);
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var _default = Footer;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _FluxLogo = /*#__PURE__*/ _interop_require_default(require("../../components/FluxLogo.js"));
|
|
14
|
+
var _colors = require("../../theme/colors.js");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var Header = function(param) {
|
|
21
|
+
var tTitle = param.tTitle, userId = param.userId, subscriptionId = param.subscriptionId;
|
|
22
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
23
|
+
fixed: true,
|
|
24
|
+
style: {
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
justifyContent: 'space-between',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
paddingBottom: 40,
|
|
29
|
+
// to not get pushed by the content
|
|
30
|
+
minHeight: 69
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Link, {
|
|
34
|
+
src: "https://driveflux.com",
|
|
35
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FluxLogo.default, {})
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
38
|
+
style: {
|
|
39
|
+
rowGap: 4,
|
|
40
|
+
fontSize: 8,
|
|
41
|
+
alignItems: 'flex-end'
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
45
|
+
style: {
|
|
46
|
+
fontWeight: 'bold'
|
|
47
|
+
},
|
|
48
|
+
children: tTitle
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
51
|
+
style: {
|
|
52
|
+
color: _colors.colors.primary2
|
|
53
|
+
},
|
|
54
|
+
children: "FLUX-".concat(userId, "-").concat(subscriptionId)
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
var _default = Header;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var LabelValue = function(param) {
|
|
14
|
+
var label = param.label, value = param.value;
|
|
15
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
16
|
+
style: {
|
|
17
|
+
flexDirection: 'row'
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
21
|
+
style: {
|
|
22
|
+
minWidth: 120,
|
|
23
|
+
textTransform: 'capitalize'
|
|
24
|
+
},
|
|
25
|
+
children: label
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
28
|
+
children: ":"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
31
|
+
style: {
|
|
32
|
+
paddingLeft: 16
|
|
33
|
+
},
|
|
34
|
+
children: "".concat(value) || '-'
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var _default = LabelValue;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _StandardPage = /*#__PURE__*/ _interop_require_default(require("../../components/StandardPage.js"));
|
|
14
|
+
var _Footer = /*#__PURE__*/ _interop_require_default(require("./Footer.js"));
|
|
15
|
+
var _Header = /*#__PURE__*/ _interop_require_default(require("./Header.js"));
|
|
16
|
+
function _interop_require_default(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : {
|
|
18
|
+
default: obj
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
var SubscriptionAgreementPage = function(param) {
|
|
22
|
+
var t = param.t, userId = param.userId, subscriptionId = param.subscriptionId, children = param.children;
|
|
23
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_StandardPage.default, {
|
|
24
|
+
style: {
|
|
25
|
+
padding: 40,
|
|
26
|
+
fontSize: 10
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Header.default, {
|
|
30
|
+
tTitle: t.title,
|
|
31
|
+
userId: userId,
|
|
32
|
+
subscriptionId: subscriptionId
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
|
|
35
|
+
style: {
|
|
36
|
+
flex: 1
|
|
37
|
+
},
|
|
38
|
+
children: children
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Footer.default, {
|
|
41
|
+
tComputerGenerated: t.computerGenerated,
|
|
42
|
+
tPage: t.page,
|
|
43
|
+
tOf: t.of
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var _default = SubscriptionAgreementPage;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _TermsOfUseSubSection = /*#__PURE__*/ _interop_require_default(require("./TermsOfUseSubSection.js"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
var TermsOfUse = function(param) {
|
|
20
|
+
var t = param.t;
|
|
21
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
22
|
+
style: {
|
|
23
|
+
rowGap: 16
|
|
24
|
+
},
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
27
|
+
style: {
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
textTransform: 'uppercase'
|
|
30
|
+
},
|
|
31
|
+
children: t.title
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
|
|
34
|
+
style: {
|
|
35
|
+
rowGap: 16,
|
|
36
|
+
lineHeight: 1.4
|
|
37
|
+
},
|
|
38
|
+
children: t.content.map(function(section, i) {
|
|
39
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
40
|
+
style: {
|
|
41
|
+
rowGap: 16
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
45
|
+
style: {
|
|
46
|
+
fontWeight: 'bold'
|
|
47
|
+
},
|
|
48
|
+
children: "".concat(i + 1, " ").concat(section.title)
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
|
|
51
|
+
style: {
|
|
52
|
+
rowGap: 16,
|
|
53
|
+
paddingLeft: 16
|
|
54
|
+
},
|
|
55
|
+
children: section.subSections.map(function(subSection, j) {
|
|
56
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TermsOfUseSubSection.default, {
|
|
57
|
+
indices: [
|
|
58
|
+
i + 1,
|
|
59
|
+
j + 1
|
|
60
|
+
],
|
|
61
|
+
subSection: subSection
|
|
62
|
+
}, "".concat(i + 1, ".").concat(j));
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}, section.title);
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
var _default = TermsOfUse;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
var _renderer = require("@react-pdf/renderer");
|
|
13
|
+
var _react = require("react");
|
|
14
|
+
function _array_like_to_array(arr, len) {
|
|
15
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
16
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
17
|
+
return arr2;
|
|
18
|
+
}
|
|
19
|
+
function _array_without_holes(arr) {
|
|
20
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
21
|
+
}
|
|
22
|
+
function _iterable_to_array(iter) {
|
|
23
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24
|
+
}
|
|
25
|
+
function _non_iterable_spread() {
|
|
26
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
27
|
+
}
|
|
28
|
+
function _to_consumable_array(arr) {
|
|
29
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
30
|
+
}
|
|
31
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
32
|
+
if (!o) return;
|
|
33
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
34
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
35
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
36
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
37
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
38
|
+
}
|
|
39
|
+
var TermsOfUseSubSection = function(param) {
|
|
40
|
+
var indices = param.indices, subSection = param.subSection;
|
|
41
|
+
var _useMemo = (0, _react.useMemo)(function() {
|
|
42
|
+
return {
|
|
43
|
+
indicesString: indices.reduce(function(prev, curr, i) {
|
|
44
|
+
return "".concat(prev).concat(curr).concat(i === indices.length - 1 ? '' : '.');
|
|
45
|
+
}, ''),
|
|
46
|
+
paddingLeft: Math.max(indices.length - 2, 0) * 16
|
|
47
|
+
};
|
|
48
|
+
}, []), indicesString = _useMemo.indicesString, paddingLeft = _useMemo.paddingLeft;
|
|
49
|
+
return typeof subSection === 'string' ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
50
|
+
style: {
|
|
51
|
+
flexDirection: 'row',
|
|
52
|
+
paddingLeft: paddingLeft,
|
|
53
|
+
columnGap: 16
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
57
|
+
style: {
|
|
58
|
+
fontWeight: 'bold'
|
|
59
|
+
},
|
|
60
|
+
children: indicesString
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
63
|
+
style: {
|
|
64
|
+
textAlign: 'justify',
|
|
65
|
+
flex: 1
|
|
66
|
+
},
|
|
67
|
+
children: subSection
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}, indicesString) : 'subSections' in subSection ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
71
|
+
style: {
|
|
72
|
+
gap: 16
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
76
|
+
style: {
|
|
77
|
+
flexDirection: 'row',
|
|
78
|
+
paddingLeft: paddingLeft,
|
|
79
|
+
columnGap: 16
|
|
80
|
+
},
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
83
|
+
style: {
|
|
84
|
+
fontWeight: 'bold'
|
|
85
|
+
},
|
|
86
|
+
children: indicesString
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
89
|
+
style: {
|
|
90
|
+
textAlign: 'justify',
|
|
91
|
+
flex: 1
|
|
92
|
+
},
|
|
93
|
+
children: subSection.paragraph
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}, indicesString),
|
|
97
|
+
subSection.subSections.map(function(subSection, i) {
|
|
98
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(TermsOfUseSubSection, {
|
|
99
|
+
indices: _to_consumable_array(indices).concat([
|
|
100
|
+
i + 1
|
|
101
|
+
]),
|
|
102
|
+
subSection: subSection
|
|
103
|
+
}, "".concat(indices, ".").concat(i));
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}, indicesString) : null;
|
|
107
|
+
};
|
|
108
|
+
var _default = TermsOfUseSubSection;
|