@driveflux/pdf 1.6.2 → 1.6.4

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.
Files changed (33) hide show
  1. package/dist/__mocks__/subscription.d.ts.map +1 -1
  2. package/dist/__mocks__/subscription.js +123 -380
  3. package/dist/__mocks__/subscription.js.map +1 -1
  4. package/dist/components/FluxLogo.js +3 -62
  5. package/dist/components/StandardPage.js +8 -97
  6. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +27 -145
  7. package/dist/templates/QuotationPdf/GFV.js +12 -49
  8. package/dist/templates/QuotationPdf/Header.js +5 -63
  9. package/dist/templates/QuotationPdf/Pricing.d.ts.map +1 -1
  10. package/dist/templates/QuotationPdf/Pricing.js +206 -566
  11. package/dist/templates/QuotationPdf/Pricing.js.map +1 -1
  12. package/dist/templates/QuotationPdf/QuotationPdfPage.js +3 -23
  13. package/dist/templates/QuotationPdf/SectionBoxNew.js +4 -34
  14. package/dist/templates/QuotationPdf/TermsSection.js +5 -42
  15. package/dist/templates/QuotationPdf/VehiclePhotos.js +24 -54
  16. package/dist/templates/QuotationPdf/index.js +11 -198
  17. package/dist/templates/QuotationPdf/translations.d.ts +1 -0
  18. package/dist/templates/QuotationPdf/translations.d.ts.map +1 -1
  19. package/dist/templates/QuotationPdf/translations.js +24 -38
  20. package/dist/templates/QuotationPdf/translations.js.map +1 -1
  21. package/dist/templates/SubscriptionAgreement/Confirmation.js +11 -66
  22. package/dist/templates/SubscriptionAgreement/CoverPage.js +10 -77
  23. package/dist/templates/SubscriptionAgreement/CoverPageSection.js +5 -16
  24. package/dist/templates/SubscriptionAgreement/Details.js +43 -69
  25. package/dist/templates/SubscriptionAgreement/Footer.js +6 -48
  26. package/dist/templates/SubscriptionAgreement/Header.js +5 -35
  27. package/dist/templates/SubscriptionAgreement/LabelValue.js +3 -25
  28. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +3 -26
  29. package/dist/templates/SubscriptionAgreement/TermsOfUse.js +3 -52
  30. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +9 -97
  31. package/dist/templates/SubscriptionAgreement/index.js +15 -249
  32. package/dist/utils.js +16 -166
  33. package/package.json +2 -2
@@ -4,77 +4,22 @@ import { Image, Text, View } from '@react-pdf/renderer';
4
4
  import { format } from 'date-fns';
5
5
  import { colors } from '../../theme/index.js';
6
6
  import LabelValue from './LabelValue.js';
7
- var Confirmation = function(param) {
8
- var tConfirmation = param.tConfirmation, subscription = param.subscription;
9
- var _subscription_signature, _subscription_user_identification;
10
- if (!((_subscription_signature = subscription.signature) === null || _subscription_signature === void 0 ? void 0 : _subscription_signature.signature)) {
7
+ const Confirmation = ({ tConfirmation, subscription }) => {
8
+ if (!subscription.signature?.signature) {
11
9
  throw new Error('Missing signature');
12
10
  }
13
- var border = "1px solid ".concat(colors.primary2);
14
- return /*#__PURE__*/ _jsxs(View, {
15
- style: {
16
- borderLeft: border,
17
- borderRight: border,
18
- borderBottom: border
19
- },
20
- children: [
21
- /*#__PURE__*/ _jsx(View, {
22
- style: {
11
+ const border = `1px solid ${colors.primary2}`;
12
+ return (_jsxs(View, { style: { borderLeft: border, borderRight: border, borderBottom: border }, children: [_jsx(View, { style: {
23
13
  backgroundColor: colors.primary1,
24
14
  borderTop: border,
25
- padding: 8
26
- },
27
- children: /*#__PURE__*/ _jsx(Text, {
28
- style: {
15
+ padding: 8,
16
+ }, children: _jsx(Text, { style: {
29
17
  fontWeight: 'bold',
30
18
  textTransform: 'uppercase',
31
- letterSpacing: 1
32
- },
33
- children: tConfirmation.title
34
- })
35
- }),
36
- /*#__PURE__*/ _jsxs(View, {
37
- style: {
38
- padding: 8,
39
- paddingBottom: 16,
40
- rowGap: 8,
41
- borderTop: border
42
- },
43
- children: [
44
- /*#__PURE__*/ _jsx(Text, {
45
- children: tConfirmation.agreementText(subscription.businessId ? 'business' : 'member')
46
- }),
47
- /*#__PURE__*/ _jsx(View, {
48
- style: {
49
- height: 160,
50
- alignItems: 'flex-start'
51
- },
52
- children: /*#__PURE__*/ _jsx(Image, {
53
- src: subscription.signature.signature
54
- })
55
- }),
56
- /*#__PURE__*/ _jsxs(View, {
57
- style: {
58
- rowGap: 8
59
- },
60
- children: [
61
- /*#__PURE__*/ _jsx(LabelValue, {
62
- label: tConfirmation.name,
63
- value: userName(subscription.user)
64
- }),
65
- /*#__PURE__*/ _jsx(LabelValue, {
66
- label: tConfirmation.idOrPassportNo,
67
- value: (_subscription_user_identification = subscription.user.identification) === null || _subscription_user_identification === void 0 ? void 0 : _subscription_user_identification.number
68
- }),
69
- /*#__PURE__*/ _jsx(LabelValue, {
70
- label: tConfirmation.date,
71
- value: subscription.signature.signedAt ? format(subscription.signature.signedAt, 'dd-MM-yyyy hh:mm a') : undefined
72
- })
73
- ]
74
- })
75
- ]
76
- })
77
- ]
78
- });
19
+ letterSpacing: 1,
20
+ }, children: tConfirmation.title }) }), _jsxs(View, { style: { padding: 8, paddingBottom: 16, rowGap: 8, borderTop: border }, children: [_jsx(Text, { children: tConfirmation.agreementText(subscription.businessId ? 'business' : 'member') }), _jsx(View, { style: { height: 160, alignItems: 'flex-start' }, children: _jsx(Image, { src: subscription.signature.signature }) }), _jsxs(View, { style: { rowGap: 8 }, children: [_jsx(LabelValue, { label: tConfirmation.name, value: userName(subscription.user) }), _jsx(LabelValue, { label: tConfirmation.idOrPassportNo, value: subscription.user.identification?.number }), _jsx(LabelValue, { label: tConfirmation.date, value: subscription.signature.signedAt
21
+ ? format(subscription.signature.signedAt, 'dd-MM-yyyy hh:mm a')
22
+ : undefined })] })] })] }));
79
23
  };
80
24
  export default Confirmation;
25
+ //# sourceMappingURL=Confirmation.js.map
@@ -5,91 +5,24 @@ import { format } from 'date-fns';
5
5
  import { colors } from '../../theme/colors.js';
6
6
  import CoverPageSection from './CoverPageSection.js';
7
7
  import LabelValue from './LabelValue.js';
8
- var CoverPage = function(param) {
9
- var tTitle = param.tTitle, tCover = param.tCover, signedAt = param.signedAt, user = param.user;
10
- var _user_identification;
11
- return /*#__PURE__*/ _jsxs(View, {
12
- style: {
13
- flex: 1,
14
- paddingVertical: 80,
15
- justifyContent: 'space-between'
16
- },
17
- children: [
18
- /*#__PURE__*/ _jsx(Text, {
19
- style: {
8
+ const CoverPage = ({ tTitle, tCover, signedAt, user }) => {
9
+ return (_jsxs(View, { style: { flex: 1, paddingVertical: 80, justifyContent: 'space-between' }, children: [_jsx(Text, { style: {
20
10
  fontWeight: 'bold',
21
11
  fontSize: 40,
22
12
  textTransform: 'uppercase',
23
- flex: 1
24
- },
25
- children: tTitle
26
- }),
27
- /*#__PURE__*/ _jsxs(View, {
28
- style: {
13
+ flex: 1,
14
+ }, children: tTitle }), _jsxs(View, { style: {
29
15
  padding: 16,
30
16
  rowGap: 32,
31
- border: "1px solid ".concat(colors.primary2),
32
- fontSize: 10
33
- },
34
- children: [
35
- /*#__PURE__*/ _jsx(CoverPageSection, {
36
- title: tCover.effectiveDate,
37
- children: /*#__PURE__*/ _jsxs(View, {
38
- style: {
39
- flexDirection: 'row',
40
- columnGap: 4
41
- },
42
- children: [
43
- /*#__PURE__*/ _jsx(Text, {
44
- style: {
45
- textDecoration: 'underline'
46
- },
47
- children: format(signedAt, 'do')
48
- }),
49
- /*#__PURE__*/ _jsx(Text, {
50
- children: tCover.of
51
- }),
52
- /*#__PURE__*/ _jsx(Text, {
53
- style: {
54
- textDecoration: 'underline'
55
- },
56
- children: format(signedAt, 'MMM')
57
- }),
58
- /*#__PURE__*/ _jsx(Text, {
59
- children: format(signedAt, 'yyyy')
60
- })
61
- ]
62
- })
63
- }),
64
- /*#__PURE__*/ _jsxs(CoverPageSection, {
65
- title: tCover.agreementBetween,
66
- children: [
67
- /*#__PURE__*/ _jsx(LabelValue, {
68
- label: tCover.name,
69
- value: userName(user)
70
- }),
71
- /*#__PURE__*/ _jsx(LabelValue, {
72
- label: tCover.idOrPassportNo,
73
- value: (_user_identification = user.identification) === null || _user_identification === void 0 ? void 0 : _user_identification.number
74
- })
75
- ]
76
- }),
77
- /*#__PURE__*/ _jsx(Text, {
78
- style: {
17
+ border: `1px solid ${colors.primary2}`,
18
+ fontSize: 10,
19
+ }, children: [_jsx(CoverPageSection, { title: tCover.effectiveDate, children: _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'do') }), _jsx(Text, { children: tCover.of }), _jsx(Text, { style: { textDecoration: 'underline' }, children: format(signedAt, 'MMM') }), _jsx(Text, { children: format(signedAt, 'yyyy') })] }) }), _jsxs(CoverPageSection, { title: tCover.agreementBetween, children: [_jsx(LabelValue, { label: tCover.name, value: userName(user) }), _jsx(LabelValue, { label: tCover.idOrPassportNo, value: user.identification?.number })] }), _jsx(Text, { style: {
79
20
  fontSize: 8,
80
21
  fontWeight: 'bold',
81
22
  color: colors.primary3,
82
23
  textTransform: 'uppercase',
83
- letterSpacing: 1
84
- },
85
- children: tCover.and
86
- }),
87
- /*#__PURE__*/ _jsx(Text, {
88
- children: "FLUX Sdn Bhd (1264766-H)"
89
- })
90
- ]
91
- })
92
- ]
93
- });
24
+ letterSpacing: 1,
25
+ }, children: tCover.and }), _jsx(Text, { children: "FLUX Sdn Bhd (1264766-H)" })] })] }));
94
26
  };
95
27
  export default CoverPage;
28
+ //# sourceMappingURL=CoverPage.js.map
@@ -1,25 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
3
  import { colors } from '../../theme/colors.js';
4
- var CoverPageSection = function(param) {
5
- var title = param.title, children = param.children;
6
- return /*#__PURE__*/ _jsxs(View, {
7
- style: {
8
- rowGap: 16
9
- },
10
- children: [
11
- /*#__PURE__*/ _jsx(Text, {
12
- style: {
4
+ const CoverPageSection = ({ title, children, }) => {
5
+ return (_jsxs(View, { style: { rowGap: 16 }, children: [_jsx(Text, { style: {
13
6
  fontSize: 8,
14
7
  fontWeight: 'bold',
15
8
  color: colors.primary3,
16
9
  textTransform: 'uppercase',
17
- letterSpacing: 1
18
- },
19
- children: "".concat(title, ":")
20
- }),
21
- children
22
- ]
23
- });
10
+ letterSpacing: 1,
11
+ }, children: `${title}:` }), children] }));
24
12
  };
25
13
  export default CoverPageSection;
14
+ //# sourceMappingURL=CoverPageSection.js.map
@@ -4,113 +4,86 @@ import { format } from '@driveflux/time';
4
4
  import { Text, View } from '@react-pdf/renderer';
5
5
  import { colors } from '../../theme/index.js';
6
6
  import LabelValue from './LabelValue.js';
7
- var Details = function(param) {
8
- var tDetails = param.tDetails, subscription = param.subscription;
9
- var _subscription_user_identification, _subscription_vehicle, _subscription_vehicle1, _subscription_vehicle2, _subscription_vehicle3, _subscription_vehicle4, _subscription_schedule, _subscription_schedule1;
10
- var details = {
7
+ const Details = ({ tDetails, subscription }) => {
8
+ const details = {
11
9
  member: [
12
10
  {
13
11
  key: tDetails.member.name,
14
- value: userName(subscription.user)
12
+ value: userName(subscription.user),
15
13
  },
16
14
  {
17
15
  key: tDetails.member.idOrPassportNo,
18
- value: (_subscription_user_identification = subscription.user.identification) === null || _subscription_user_identification === void 0 ? void 0 : _subscription_user_identification.number
19
- }
16
+ value: subscription.user.identification?.number,
17
+ },
20
18
  ],
21
19
  vehicle: [
22
20
  {
23
21
  key: tDetails.vehicle.make,
24
- value: (_subscription_vehicle = subscription.vehicle) === null || _subscription_vehicle === void 0 ? void 0 : _subscription_vehicle.make
22
+ value: subscription.vehicle?.make,
25
23
  },
26
24
  {
27
25
  key: tDetails.vehicle.model,
28
- value: "".concat((_subscription_vehicle1 = subscription.vehicle) === null || _subscription_vehicle1 === void 0 ? void 0 : _subscription_vehicle1.vehicleModel, " ").concat((_subscription_vehicle2 = subscription.vehicle) === null || _subscription_vehicle2 === void 0 ? void 0 : _subscription_vehicle2.variant)
26
+ value: `${subscription.vehicle?.vehicleModel} ${subscription.vehicle?.variant}`,
29
27
  },
30
28
  {
31
29
  key: tDetails.vehicle.year,
32
- value: (_subscription_vehicle3 = subscription.vehicle) === null || _subscription_vehicle3 === void 0 ? void 0 : _subscription_vehicle3.year
30
+ value: subscription.vehicle?.year,
33
31
  },
34
32
  {
35
33
  key: tDetails.vehicle.plateNo,
36
- value: (_subscription_vehicle4 = subscription.vehicle) === null || _subscription_vehicle4 === void 0 ? void 0 : _subscription_vehicle4.registrationNumber
37
- }
34
+ value: subscription.vehicle?.registrationNumber,
35
+ },
38
36
  ],
39
37
  subscription: [
40
38
  {
41
39
  key: tDetails.subscription.subscriptionPlan,
42
- value: getPlanTranslation(subscription.plan)
40
+ value: getPlanTranslation(subscription.plan),
43
41
  },
44
42
  {
45
43
  key: tDetails.subscription.mileagePackage,
46
- value: getFullMileagePackageTranslation(subscription.mileagePackage)
44
+ value: getFullMileagePackageTranslation(subscription.mileagePackage),
47
45
  },
48
46
  {
49
47
  key: tDetails.subscription.startDate,
50
- value: subscription.startedAt ? format(subscription.startedAt, 'dd-MM-yyyy') : undefined
48
+ value: subscription.startedAt
49
+ ? format(subscription.startedAt, 'dd-MM-yyyy')
50
+ : undefined,
51
51
  },
52
52
  {
53
53
  key: tDetails.subscription.endDate,
54
- value: subscription.endedAt ? format(subscription.endedAt, 'dd-MM-yyyy') : ((_subscription_schedule = subscription.schedule) === null || _subscription_schedule === void 0 ? void 0 : _subscription_schedule.endAt) ? format((_subscription_schedule1 = subscription.schedule) === null || _subscription_schedule1 === void 0 ? void 0 : _subscription_schedule1.endAt, 'dd-MM-yyyy') : undefined
55
- }
56
- ]
54
+ value: subscription.endedAt
55
+ ? format(subscription.endedAt, 'dd-MM-yyyy')
56
+ : subscription.schedule?.endAt
57
+ ? format(subscription.schedule?.endAt, 'dd-MM-yyyy')
58
+ : undefined,
59
+ },
60
+ ],
57
61
  };
58
- var border = "1px solid ".concat(colors.primary2);
59
- return /*#__PURE__*/ _jsxs(View, {
60
- style: {
61
- borderLeft: border,
62
- borderRight: border
63
- },
64
- children: [
65
- /*#__PURE__*/ _jsx(View, {
66
- style: {
62
+ const border = `1px solid ${colors.primary2}`;
63
+ return (_jsxs(View, { style: { borderLeft: border, borderRight: border }, children: [_jsx(View, { style: {
67
64
  backgroundColor: colors.primary1,
68
65
  borderTop: border,
69
- padding: 8
70
- },
71
- children: /*#__PURE__*/ _jsx(Text, {
72
- style: {
66
+ padding: 8,
67
+ }, children: _jsx(Text, { style: {
73
68
  fontWeight: 'bold',
74
69
  textTransform: 'uppercase',
75
- letterSpacing: 1
76
- },
77
- children: tDetails.agreement
78
- })
79
- }),
80
- Object.keys(details).map(function(key, i) {
81
- return /*#__PURE__*/ _jsxs(View, {
82
- style: {
83
- padding: 8,
84
- paddingBottom: 16,
85
- rowGap: 8,
86
- borderTop: border
87
- },
88
- children: [
89
- /*#__PURE__*/ _jsx(Text, {
90
- style: {
91
- textTransform: 'uppercase',
92
- color: colors.primary2,
93
- fontSize: 8,
94
- letterSpacing: 1
95
- },
96
- children: "".concat(key, " details")
97
- }),
98
- details[key].map(function(line) {
99
- return /*#__PURE__*/ _jsx(LabelValue, {
100
- label: line.key,
101
- value: line.value
102
- }, line.key);
103
- })
104
- ]
105
- }, key);
106
- })
107
- ]
108
- });
70
+ letterSpacing: 1,
71
+ }, children: tDetails.agreement }) }), Object.keys(details).map((key, i) => (_jsxs(View, { style: {
72
+ padding: 8,
73
+ paddingBottom: 16,
74
+ rowGap: 8,
75
+ borderTop: border,
76
+ }, children: [_jsx(Text, { style: {
77
+ textTransform: 'uppercase',
78
+ color: colors.primary2,
79
+ fontSize: 8,
80
+ letterSpacing: 1,
81
+ }, children: `${key} details` }), details[key].map((line) => (_jsx(LabelValue, { label: line.key, value: line.value }, line.key)))] }, key)))] }));
109
82
  };
110
83
  export default Details;
111
84
  // TODO: replace this with dump's once the package is ready
112
- var getPlanTranslation = function(plan, vehicleType) {
113
- switch(plan){
85
+ const getPlanTranslation = (plan, vehicleType) => {
86
+ switch (plan) {
114
87
  case 'plan60':
115
88
  return vehicleType === 'motorcycle' ? '60 Months' : '60 Months (Basic)';
116
89
  case 'plan36':
@@ -127,8 +100,8 @@ var getPlanTranslation = function(plan, vehicleType) {
127
100
  return 'Unknown Plan';
128
101
  }
129
102
  };
130
- var getFullMileagePackageTranslation = function(plan) {
131
- switch(plan){
103
+ const getFullMileagePackageTranslation = (plan) => {
104
+ switch (plan) {
132
105
  case 'lite':
133
106
  return 'Lite - 1,250KM';
134
107
  case 'standard':
@@ -141,3 +114,4 @@ var getFullMileagePackageTranslation = function(plan) {
141
114
  return 'Unknown Mileage Package';
142
115
  }
143
116
  };
117
+ //# sourceMappingURL=Details.js.map
@@ -1,58 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
3
  import { colors } from '../../theme/colors.js';
4
- var Footer = function(param) {
5
- var tComputerGenerated = param.tComputerGenerated, tPage = param.tPage, tOf = param.tOf;
6
- return /*#__PURE__*/ _jsxs(View, {
7
- fixed: true,
8
- style: {
4
+ const Footer = ({ tComputerGenerated, tPage, tOf }) => {
5
+ return (_jsxs(View, { fixed: true, style: {
9
6
  justifyContent: 'space-between',
10
7
  flexDirection: 'row',
11
8
  paddingTop: 16,
12
9
  marginTop: 16,
13
- borderTop: "1px solid ".concat(colors.links),
10
+ borderTop: `1px solid ${colors.links}`,
14
11
  color: colors.primary2,
15
- fontSize: 8
16
- },
17
- children: [
18
- /*#__PURE__*/ _jsx(Text, {
19
- children: tComputerGenerated
20
- }),
21
- /*#__PURE__*/ _jsxs(View, {
22
- style: {
23
- flexDirection: 'row',
24
- columnGap: 4
25
- },
26
- children: [
27
- /*#__PURE__*/ _jsx(Text, {
28
- children: tPage
29
- }),
30
- /*#__PURE__*/ _jsx(Text, {
31
- style: {
32
- fontWeight: 'bold',
33
- color: colors.black
34
- },
35
- render: function(param) {
36
- var pageNumber = param.pageNumber;
37
- return "".concat(pageNumber);
38
- }
39
- }),
40
- /*#__PURE__*/ _jsx(Text, {
41
- children: tOf
42
- }),
43
- /*#__PURE__*/ _jsx(Text, {
44
- style: {
45
- fontWeight: 'bold',
46
- color: colors.black
47
- },
48
- render: function(param) {
49
- var totalPages = param.totalPages;
50
- return "".concat(totalPages);
51
- }
52
- })
53
- ]
54
- })
55
- ]
56
- });
12
+ fontSize: 8,
13
+ }, children: [_jsx(Text, { children: tComputerGenerated }), _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { children: tPage }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ pageNumber }) => `${pageNumber}` }), _jsx(Text, { children: tOf }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ totalPages }) => `${totalPages}` })] })] }));
57
14
  };
58
15
  export default Footer;
16
+ //# sourceMappingURL=Footer.js.map
@@ -2,45 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Link, Text, View } from '@react-pdf/renderer';
3
3
  import FluxLogo from '../../components/FluxLogo.js';
4
4
  import { colors } from '../../theme/colors.js';
5
- var Header = function(param) {
6
- var tTitle = param.tTitle, userId = param.userId, subscriptionId = param.subscriptionId;
7
- return /*#__PURE__*/ _jsxs(View, {
8
- fixed: true,
9
- style: {
5
+ const Header = ({ tTitle, userId, subscriptionId }) => {
6
+ return (_jsxs(View, { fixed: true, style: {
10
7
  flexDirection: 'row',
11
8
  justifyContent: 'space-between',
12
9
  alignItems: 'center',
13
10
  paddingBottom: 40,
14
11
  // to not get pushed by the content
15
- minHeight: 69
16
- },
17
- children: [
18
- /*#__PURE__*/ _jsx(Link, {
19
- src: "https://driveflux.com",
20
- children: /*#__PURE__*/ _jsx(FluxLogo, {})
21
- }),
22
- /*#__PURE__*/ _jsxs(View, {
23
- style: {
24
- rowGap: 4,
25
- fontSize: 8,
26
- alignItems: 'flex-end'
27
- },
28
- children: [
29
- /*#__PURE__*/ _jsx(Text, {
30
- style: {
31
- fontWeight: 'bold'
32
- },
33
- children: tTitle
34
- }),
35
- /*#__PURE__*/ _jsx(Text, {
36
- style: {
37
- color: colors.primary2
38
- },
39
- children: "FLUX-".concat(userId, "-").concat(subscriptionId)
40
- })
41
- ]
42
- })
43
- ]
44
- });
12
+ minHeight: 69,
13
+ }, children: [_jsx(Link, { src: "https://driveflux.com", children: _jsx(FluxLogo, {}) }), _jsxs(View, { style: { rowGap: 4, fontSize: 8, alignItems: 'flex-end' }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: tTitle }), _jsx(Text, { style: { color: colors.primary2 }, children: `FLUX-${userId}-${subscriptionId}` })] })] }));
45
14
  };
46
15
  export default Header;
16
+ //# sourceMappingURL=Header.js.map
@@ -1,29 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
- var LabelValue = function(param) {
4
- var label = param.label, value = param.value;
5
- return /*#__PURE__*/ _jsxs(View, {
6
- style: {
7
- flexDirection: 'row'
8
- },
9
- children: [
10
- /*#__PURE__*/ _jsx(Text, {
11
- style: {
12
- minWidth: 120,
13
- textTransform: 'capitalize'
14
- },
15
- children: label
16
- }),
17
- /*#__PURE__*/ _jsx(Text, {
18
- children: ':'
19
- }),
20
- /*#__PURE__*/ _jsx(Text, {
21
- style: {
22
- paddingLeft: 16
23
- },
24
- children: value ? "".concat(value) : '-'
25
- })
26
- ]
27
- });
3
+ const LabelValue = ({ label, value }) => {
4
+ return (_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(Text, { style: { minWidth: 120, textTransform: 'capitalize' }, children: label }), _jsx(Text, { children: ':' }), _jsx(Text, { style: { paddingLeft: 16 }, children: value ? `${value}` : '-' })] }));
28
5
  };
29
6
  export default LabelValue;
7
+ //# sourceMappingURL=LabelValue.js.map
@@ -3,31 +3,8 @@ import { View } from '@react-pdf/renderer';
3
3
  import StandardPage from '../../components/StandardPage.js';
4
4
  import Footer from './Footer.js';
5
5
  import Header from './Header.js';
6
- var SubscriptionAgreementPage = function(param) {
7
- var t = param.t, userId = param.userId, subscriptionId = param.subscriptionId, children = param.children;
8
- return /*#__PURE__*/ _jsxs(StandardPage, {
9
- style: {
10
- padding: 40,
11
- fontSize: 10
12
- },
13
- children: [
14
- /*#__PURE__*/ _jsx(Header, {
15
- tTitle: t.title,
16
- userId: userId,
17
- subscriptionId: subscriptionId
18
- }),
19
- /*#__PURE__*/ _jsx(View, {
20
- style: {
21
- flex: 1
22
- },
23
- children: children
24
- }),
25
- /*#__PURE__*/ _jsx(Footer, {
26
- tComputerGenerated: t.computerGenerated,
27
- tPage: t.page,
28
- tOf: t.of
29
- })
30
- ]
31
- });
6
+ const SubscriptionAgreementPage = ({ t, userId, subscriptionId, children, }) => {
7
+ return (_jsxs(StandardPage, { style: { padding: 40, fontSize: 10 }, children: [_jsx(Header, { tTitle: t.title, userId: userId, subscriptionId: subscriptionId }), _jsx(View, { style: { flex: 1 }, children: children }), _jsx(Footer, { tComputerGenerated: t.computerGenerated, tPage: t.page, tOf: t.of })] }));
32
8
  };
33
9
  export default SubscriptionAgreementPage;
10
+ //# sourceMappingURL=SubscriptionAgreementPage.js.map
@@ -1,57 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
3
  import TermsOfUseSubSection from './TermsOfUseSubSection.js';
4
- var TermsOfUse = function(param) {
5
- var t = param.t;
6
- return /*#__PURE__*/ _jsxs(View, {
7
- style: {
8
- rowGap: 16
9
- },
10
- children: [
11
- /*#__PURE__*/ _jsx(Text, {
12
- style: {
13
- fontWeight: 'bold',
14
- textTransform: 'uppercase'
15
- },
16
- children: t.title
17
- }),
18
- /*#__PURE__*/ _jsx(View, {
19
- style: {
20
- rowGap: 16,
21
- lineHeight: 1.4
22
- },
23
- children: t.content.map(function(section, i) {
24
- return /*#__PURE__*/ _jsxs(View, {
25
- style: {
26
- rowGap: 16
27
- },
28
- children: [
29
- /*#__PURE__*/ _jsx(Text, {
30
- style: {
31
- fontWeight: 'bold'
32
- },
33
- children: "".concat(i + 1, " ").concat(section.title)
34
- }),
35
- /*#__PURE__*/ _jsx(View, {
36
- style: {
37
- rowGap: 16,
38
- paddingLeft: 16
39
- },
40
- children: section.subSections.map(function(subSection, j) {
41
- return /*#__PURE__*/ _jsx(TermsOfUseSubSection, {
42
- indices: [
43
- i + 1,
44
- j + 1
45
- ],
46
- subSection: subSection
47
- }, "".concat(i + 1, ".").concat(j));
48
- })
49
- })
50
- ]
51
- }, section.title);
52
- })
53
- })
54
- ]
55
- });
4
+ const TermsOfUse = ({ t }) => {
5
+ return (_jsxs(View, { style: { rowGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold', textTransform: 'uppercase' }, children: t.title }), _jsx(View, { style: { rowGap: 16, lineHeight: 1.4 }, children: t.content.map((section, i) => (_jsxs(View, { style: { rowGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: `${i + 1} ${section.title}` }), _jsx(View, { style: { rowGap: 16, paddingLeft: 16 }, children: section.subSections.map((subSection, j) => (_jsx(TermsOfUseSubSection, { indices: [i + 1, j + 1], subSection: subSection }, `${i + 1}.${j}`))) })] }, section.title))) })] }));
56
6
  };
57
7
  export default TermsOfUse;
8
+ //# sourceMappingURL=TermsOfUse.js.map