@driveflux/pdf 1.7.1 → 1.7.2

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 (38) hide show
  1. package/dist/__mocks__/quotation.js +10 -11
  2. package/dist/__mocks__/subscription.js +380 -122
  3. package/dist/components/FluxLogo.js +62 -3
  4. package/dist/components/StandardPage.js +97 -8
  5. package/dist/debug.js +203 -26
  6. package/dist/index.js +0 -1
  7. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +145 -27
  8. package/dist/templates/QuotationPdf/GFV.js +49 -12
  9. package/dist/templates/QuotationPdf/Header.js +63 -5
  10. package/dist/templates/QuotationPdf/Pricing.js +574 -204
  11. package/dist/templates/QuotationPdf/QuotationPdfPage.js +23 -3
  12. package/dist/templates/QuotationPdf/SectionBoxNew.js +34 -4
  13. package/dist/templates/QuotationPdf/TermsSection.js +42 -5
  14. package/dist/templates/QuotationPdf/VehiclePhotos.js +54 -24
  15. package/dist/templates/QuotationPdf/index.js +189 -10
  16. package/dist/templates/QuotationPdf/translations.js +38 -23
  17. package/dist/templates/QuotationPdf/utils.js +59 -29
  18. package/dist/templates/SubscriptionAgreement/Confirmation.js +66 -11
  19. package/dist/templates/SubscriptionAgreement/CoverPage.js +77 -10
  20. package/dist/templates/SubscriptionAgreement/CoverPageSection.js +16 -5
  21. package/dist/templates/SubscriptionAgreement/Details.js +69 -43
  22. package/dist/templates/SubscriptionAgreement/Footer.js +48 -6
  23. package/dist/templates/SubscriptionAgreement/Header.js +35 -5
  24. package/dist/templates/SubscriptionAgreement/LabelValue.js +25 -3
  25. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +26 -3
  26. package/dist/templates/SubscriptionAgreement/TermsOfUse.js +52 -3
  27. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +97 -9
  28. package/dist/templates/SubscriptionAgreement/index.js +240 -14
  29. package/dist/templates/SubscriptionAgreement/translations.js +194 -193
  30. package/dist/templates/SubscriptionAgreement/types.js +1 -2
  31. package/dist/templates/SubscriptionAgreement/utils.js +3 -5
  32. package/dist/templates/index.js +0 -1
  33. package/dist/theme/colors.js +44 -63
  34. package/dist/theme/index.js +0 -1
  35. package/dist/types.js +1 -2
  36. package/dist/utils.js +159 -16
  37. package/dist/watch.js +3 -4
  38. package/package.json +2 -2
@@ -2,23 +2,60 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { formatMoney } from '@driveflux/format-money';
3
3
  import { Text, View } from '@react-pdf/renderer';
4
4
  import { colors } from '../../theme/colors.js';
5
- const GFV = ({ quotation, t }) => {
6
- if (!quotation.fees.gfv)
7
- return;
8
- return (_jsxs(View, { style: {
9
- border: `1px solid ${colors.primary2}`,
5
+ var GFV = function(param) {
6
+ var quotation = param.quotation, t = param.t;
7
+ if (!quotation.fees.gfv) return;
8
+ return /*#__PURE__*/ _jsxs(View, {
9
+ style: {
10
+ border: "1px solid ".concat(colors.primary2),
10
11
  padding: 16,
11
- rowGap: 16,
12
- }, children: [_jsx(Text, { style: {
12
+ rowGap: 16
13
+ },
14
+ children: [
15
+ /*#__PURE__*/ _jsx(Text, {
16
+ style: {
13
17
  color: colors.black,
14
18
  fontWeight: 'bold',
15
19
  letterSpacing: 1,
16
20
  textTransform: 'uppercase',
17
- flexWrap: 'nowrap',
18
- }, children: t?.fees.gfv.title }), _jsxs(View, { style: { display: 'flex', flexDirection: 'row', flexWrap: 'wrap' }, children: [_jsxs(Text, { style: {
21
+ flexWrap: 'nowrap'
22
+ },
23
+ children: t === null || t === void 0 ? void 0 : t.fees.gfv.title
24
+ }),
25
+ /*#__PURE__*/ _jsxs(View, {
26
+ style: {
27
+ display: 'flex',
28
+ flexDirection: 'row',
29
+ flexWrap: 'wrap'
30
+ },
31
+ children: [
32
+ /*#__PURE__*/ _jsxs(Text, {
33
+ style: {
19
34
  color: colors.primary3,
20
- letterSpacing: 1,
21
- }, children: ["You have the option to purchase this vehicle with GFV amount of", ' '] }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.primary3 }, children: formatMoney(quotation.fees.gfv) }), _jsx(Text, { style: { color: colors.primary3, letterSpacing: 1 }, children: "at the end of your subscription." })] })] }));
35
+ letterSpacing: 1
36
+ },
37
+ children: [
38
+ "You have the option to purchase this vehicle with GFV amount of",
39
+ ' '
40
+ ]
41
+ }),
42
+ /*#__PURE__*/ _jsx(Text, {
43
+ style: {
44
+ fontWeight: 'bold',
45
+ color: colors.primary3
46
+ },
47
+ children: formatMoney(quotation.fees.gfv)
48
+ }),
49
+ /*#__PURE__*/ _jsx(Text, {
50
+ style: {
51
+ color: colors.primary3,
52
+ letterSpacing: 1
53
+ },
54
+ children: "at the end of your subscription."
55
+ })
56
+ ]
57
+ })
58
+ ]
59
+ });
22
60
  };
23
61
  export default GFV;
24
- //# sourceMappingURL=GFV.js.map
@@ -2,12 +2,70 @@ 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
- const Header = ({ tTitle, quotationId, quotationDate }) => {
6
- return (_jsxs(View, { style: { gap: 24 }, children: [_jsx(Link, { src: "https://driveflux.com", children: _jsx(FluxLogo, {}) }), _jsxs(View, { style: { gap: 4 }, children: [_jsx(Text, { style: {
5
+ var Header = function(param) {
6
+ var tTitle = param.tTitle, quotationId = param.quotationId, quotationDate = param.quotationDate;
7
+ return /*#__PURE__*/ _jsxs(View, {
8
+ style: {
9
+ gap: 24
10
+ },
11
+ children: [
12
+ /*#__PURE__*/ _jsx(Link, {
13
+ src: "https://driveflux.com",
14
+ children: /*#__PURE__*/ _jsx(FluxLogo, {})
15
+ }),
16
+ /*#__PURE__*/ _jsxs(View, {
17
+ style: {
18
+ gap: 4
19
+ },
20
+ children: [
21
+ /*#__PURE__*/ _jsx(Text, {
22
+ style: {
7
23
  fontWeight: 'bold',
8
24
  textTransform: 'uppercase',
9
- fontSize: 18,
10
- }, children: tTitle }), _jsxs(View, { style: { justifyContent: 'space-between', flexDirection: 'row' }, children: [_jsx(Text, { style: { color: colors.primary3, fontSize: 10 }, children: quotationId }), _jsxs(View, { style: { gap: 8, flexDirection: 'row' }, children: [_jsx(Text, { style: { fontSize: 10, color: colors.black }, children: "Date" }), _jsx(Text, { style: { color: colors.primary3, fontSize: 10 }, children: quotationDate })] })] })] })] }));
25
+ fontSize: 18
26
+ },
27
+ children: tTitle
28
+ }),
29
+ /*#__PURE__*/ _jsxs(View, {
30
+ style: {
31
+ justifyContent: 'space-between',
32
+ flexDirection: 'row'
33
+ },
34
+ children: [
35
+ /*#__PURE__*/ _jsx(Text, {
36
+ style: {
37
+ color: colors.primary3,
38
+ fontSize: 10
39
+ },
40
+ children: quotationId
41
+ }),
42
+ /*#__PURE__*/ _jsxs(View, {
43
+ style: {
44
+ gap: 8,
45
+ flexDirection: 'row'
46
+ },
47
+ children: [
48
+ /*#__PURE__*/ _jsx(Text, {
49
+ style: {
50
+ fontSize: 10,
51
+ color: colors.black
52
+ },
53
+ children: "Date"
54
+ }),
55
+ /*#__PURE__*/ _jsx(Text, {
56
+ style: {
57
+ color: colors.primary3,
58
+ fontSize: 10
59
+ },
60
+ children: quotationDate
61
+ })
62
+ ]
63
+ })
64
+ ]
65
+ })
66
+ ]
67
+ })
68
+ ]
69
+ });
11
70
  };
12
71
  export default Header;
13
- //# sourceMappingURL=Header.js.map