@driveflux/pdf 4.0.77 → 4.0.79
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/components/FluxLogo.js +3 -62
- package/dist/components/StandardPage.js +10 -108
- package/dist/index.js +1 -0
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +27 -145
- package/dist/templates/QuotationPdf/GFV.js +12 -49
- package/dist/templates/QuotationPdf/Header.js +5 -63
- package/dist/templates/QuotationPdf/Pricing.js +191 -573
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +3 -23
- package/dist/templates/QuotationPdf/SectionBoxNew.js +4 -34
- package/dist/templates/QuotationPdf/TermsSection.js +5 -42
- package/dist/templates/QuotationPdf/VehiclePhotos.js +24 -54
- package/dist/templates/QuotationPdf/index.js +10 -197
- package/dist/templates/QuotationPdf/translations.js +22 -34
- package/dist/templates/QuotationPdf/utils.js +49 -92
- package/dist/templates/SubscriptionAgreement/Confirmation.js +10 -65
- package/dist/templates/SubscriptionAgreement/CoverPage.js +10 -93
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +5 -16
- package/dist/templates/SubscriptionAgreement/Details.js +59 -139
- package/dist/templates/SubscriptionAgreement/Footer.js +6 -48
- package/dist/templates/SubscriptionAgreement/Header.js +5 -35
- package/dist/templates/SubscriptionAgreement/LabelValue.js +3 -25
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +3 -26
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +8 -94
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +11 -97
- package/dist/templates/SubscriptionAgreement/index.js +15 -253
- package/dist/templates/SubscriptionAgreement/translations.js +194 -195
- package/dist/templates/SubscriptionAgreement/types.js +2 -1
- package/dist/templates/SubscriptionAgreement/utils.js +11 -16
- package/dist/templates/index.js +1 -0
- package/dist/theme/colors.js +63 -44
- package/dist/theme/index.js +1 -0
- package/dist/types.js +2 -1
- package/dist/utils.js +16 -167
- package/dist/watch.js +4 -3
- package/package.json +10 -10
|
@@ -1,66 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Defs, G, Path, Rect, Svg } from '@react-pdf/renderer';
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
width: "92",
|
|
6
|
-
height: "29",
|
|
7
|
-
viewBox: "0 0 92 29",
|
|
8
|
-
fill: "none",
|
|
9
|
-
children: [
|
|
10
|
-
/*#__PURE__*/ _jsxs(G, {
|
|
11
|
-
clipPath: "url(#clip0_664_102105)",
|
|
12
|
-
children: [
|
|
13
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
14
|
-
d: "M23.6621 6.12305H35.6903V8.00999H25.5568V13.5529H33.805V15.434H25.5568V22.8638H23.6715L23.6621 6.12305Z",
|
|
15
|
-
fill: "black"
|
|
16
|
-
}),
|
|
17
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
18
|
-
d: "M40.9981 6.12305H42.8834V20.9827H52.3039V22.8697H40.9922L40.9981 6.12305Z",
|
|
19
|
-
fill: "black"
|
|
20
|
-
}),
|
|
21
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
22
|
-
d: "M57.6172 15.6002V6.12305H59.5025V15.4811C59.5025 19.0946 61.4149 21.129 64.6187 21.129C67.7035 21.129 69.6642 19.2621 69.6642 15.6002V6.12305H71.5495V15.4552C71.5495 20.3376 68.751 22.8744 64.5669 22.8744C60.4381 22.8756 57.6172 20.3388 57.6172 15.6002Z",
|
|
23
|
-
fill: "black"
|
|
24
|
-
}),
|
|
25
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
26
|
-
d: "M83.2965 14.3324L77.1033 6.12305H79.3338L84.4736 12.9632L89.5663 6.12305H91.7674L85.5742 14.3077L92.0054 22.8756H89.7525L84.4006 15.6722L79.0451 22.8756H76.8594L83.2965 14.3324Z",
|
|
27
|
-
fill: "black"
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
30
|
-
opacity: "0.3",
|
|
31
|
-
d: "M3.05934 17.5614C2.45475 17.5598 1.86415 17.3792 1.36192 17.0423C0.859683 16.7054 0.468271 16.2273 0.23697 15.6682C0.00566877 15.1091 -0.0551799 14.494 0.0620863 13.9004C0.179353 13.3068 0.469491 12.7611 0.895964 12.3322L12.3256 0.892604C12.909 0.364801 13.6728 0.0817665 14.459 0.102098C15.2452 0.12243 15.9934 0.444573 16.5488 1.00183C17.1042 1.55908 17.4243 2.30877 17.4426 3.09567C17.461 3.88257 17.1764 4.64641 16.6476 5.22904L5.218 16.6686C4.93441 16.9521 4.59781 17.1768 4.22742 17.33C3.85703 17.4832 3.46011 17.5618 3.05934 17.5614Z",
|
|
32
|
-
fill: "#50C8E8"
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
35
|
-
opacity: "0.3",
|
|
36
|
-
d: "M8.77458 23.28C8.16964 23.2788 7.57859 23.0985 7.07593 22.7616C6.57326 22.4248 6.18149 21.9465 5.94999 21.3871C5.7185 20.8277 5.65764 20.2123 5.7751 19.6183C5.89256 19.0244 6.18308 18.4786 6.61002 18.0496L12.3213 12.3334C12.6004 12.027 12.9387 11.7804 13.3158 11.6086C13.6928 11.4368 14.1008 11.3433 14.5149 11.3338C14.9291 11.3243 15.3409 11.399 15.7254 11.5533C16.1099 11.7076 16.4592 11.9384 16.752 12.2317C17.0449 12.525 17.2753 12.8746 17.4293 13.2596C17.5832 13.6445 17.6576 14.0567 17.6479 14.4712C17.6382 14.8858 17.5446 15.294 17.3727 15.6713C17.2008 16.0486 16.9543 16.3871 16.648 16.6663L10.9368 22.3837C10.653 22.6681 10.3159 22.8936 9.94489 23.0474C9.57386 23.2013 9.17617 23.2803 8.77458 23.28Z",
|
|
37
|
-
fill: "#50C8E8"
|
|
38
|
-
}),
|
|
39
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
40
|
-
d: "M14.4866 29.0001C16.176 29.0001 17.5455 27.6294 17.5455 25.9385C17.5455 24.2477 16.176 22.877 14.4866 22.877C12.7972 22.877 11.4277 24.2477 11.4277 25.9385C11.4277 27.6294 12.7972 29.0001 14.4866 29.0001Z",
|
|
41
|
-
fill: "#50C8E8"
|
|
42
|
-
}),
|
|
43
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
44
|
-
d: "M14.4866 6.12314C16.176 6.12314 17.5455 4.75243 17.5455 3.06157C17.5455 1.37071 16.176 0 14.4866 0C12.7972 0 11.4277 1.37071 11.4277 3.06157C11.4277 4.75243 12.7972 6.12314 14.4866 6.12314Z",
|
|
45
|
-
fill: "#50C8E8"
|
|
46
|
-
}),
|
|
47
|
-
/*#__PURE__*/ _jsx(Path, {
|
|
48
|
-
d: "M14.4866 17.5616C16.176 17.5616 17.5455 16.1909 17.5455 14.5C17.5455 12.8092 16.176 11.4385 14.4866 11.4385C12.7972 11.4385 11.4277 12.8092 11.4277 14.5C11.4277 16.1909 12.7972 17.5616 14.4866 17.5616Z",
|
|
49
|
-
fill: "#50C8E8"
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
}),
|
|
53
|
-
/*#__PURE__*/ _jsx(Defs, {
|
|
54
|
-
children: /*#__PURE__*/ _jsx("clipPath", {
|
|
55
|
-
id: "clip0_664_102105",
|
|
56
|
-
children: /*#__PURE__*/ _jsx(Rect, {
|
|
57
|
-
width: "92",
|
|
58
|
-
height: "29",
|
|
59
|
-
fill: "white"
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
});
|
|
3
|
+
const FluxLogo = () => {
|
|
4
|
+
return (_jsxs(Svg, { width: "92", height: "29", viewBox: "0 0 92 29", fill: "none", children: [_jsxs(G, { clipPath: "url(#clip0_664_102105)", children: [_jsx(Path, { d: "M23.6621 6.12305H35.6903V8.00999H25.5568V13.5529H33.805V15.434H25.5568V22.8638H23.6715L23.6621 6.12305Z", fill: "black" }), _jsx(Path, { d: "M40.9981 6.12305H42.8834V20.9827H52.3039V22.8697H40.9922L40.9981 6.12305Z", fill: "black" }), _jsx(Path, { d: "M57.6172 15.6002V6.12305H59.5025V15.4811C59.5025 19.0946 61.4149 21.129 64.6187 21.129C67.7035 21.129 69.6642 19.2621 69.6642 15.6002V6.12305H71.5495V15.4552C71.5495 20.3376 68.751 22.8744 64.5669 22.8744C60.4381 22.8756 57.6172 20.3388 57.6172 15.6002Z", fill: "black" }), _jsx(Path, { d: "M83.2965 14.3324L77.1033 6.12305H79.3338L84.4736 12.9632L89.5663 6.12305H91.7674L85.5742 14.3077L92.0054 22.8756H89.7525L84.4006 15.6722L79.0451 22.8756H76.8594L83.2965 14.3324Z", fill: "black" }), _jsx(Path, { opacity: "0.3", d: "M3.05934 17.5614C2.45475 17.5598 1.86415 17.3792 1.36192 17.0423C0.859683 16.7054 0.468271 16.2273 0.23697 15.6682C0.00566877 15.1091 -0.0551799 14.494 0.0620863 13.9004C0.179353 13.3068 0.469491 12.7611 0.895964 12.3322L12.3256 0.892604C12.909 0.364801 13.6728 0.0817665 14.459 0.102098C15.2452 0.12243 15.9934 0.444573 16.5488 1.00183C17.1042 1.55908 17.4243 2.30877 17.4426 3.09567C17.461 3.88257 17.1764 4.64641 16.6476 5.22904L5.218 16.6686C4.93441 16.9521 4.59781 17.1768 4.22742 17.33C3.85703 17.4832 3.46011 17.5618 3.05934 17.5614Z", fill: "#50C8E8" }), _jsx(Path, { opacity: "0.3", d: "M8.77458 23.28C8.16964 23.2788 7.57859 23.0985 7.07593 22.7616C6.57326 22.4248 6.18149 21.9465 5.94999 21.3871C5.7185 20.8277 5.65764 20.2123 5.7751 19.6183C5.89256 19.0244 6.18308 18.4786 6.61002 18.0496L12.3213 12.3334C12.6004 12.027 12.9387 11.7804 13.3158 11.6086C13.6928 11.4368 14.1008 11.3433 14.5149 11.3338C14.9291 11.3243 15.3409 11.399 15.7254 11.5533C16.1099 11.7076 16.4592 11.9384 16.752 12.2317C17.0449 12.525 17.2753 12.8746 17.4293 13.2596C17.5832 13.6445 17.6576 14.0567 17.6479 14.4712C17.6382 14.8858 17.5446 15.294 17.3727 15.6713C17.2008 16.0486 16.9543 16.3871 16.648 16.6663L10.9368 22.3837C10.653 22.6681 10.3159 22.8936 9.94489 23.0474C9.57386 23.2013 9.17617 23.2803 8.77458 23.28Z", fill: "#50C8E8" }), _jsx(Path, { d: "M14.4866 29.0001C16.176 29.0001 17.5455 27.6294 17.5455 25.9385C17.5455 24.2477 16.176 22.877 14.4866 22.877C12.7972 22.877 11.4277 24.2477 11.4277 25.9385C11.4277 27.6294 12.7972 29.0001 14.4866 29.0001Z", fill: "#50C8E8" }), _jsx(Path, { d: "M14.4866 6.12314C16.176 6.12314 17.5455 4.75243 17.5455 3.06157C17.5455 1.37071 16.176 0 14.4866 0C12.7972 0 11.4277 1.37071 11.4277 3.06157C11.4277 4.75243 12.7972 6.12314 14.4866 6.12314Z", fill: "#50C8E8" }), _jsx(Path, { d: "M14.4866 17.5616C16.176 17.5616 17.5455 16.1909 17.5455 14.5C17.5455 12.8092 16.176 11.4385 14.4866 11.4385C12.7972 11.4385 11.4277 12.8092 11.4277 14.5C11.4277 16.1909 12.7972 17.5616 14.4866 17.5616Z", fill: "#50C8E8" })] }), _jsx(Defs, { children: _jsx("clipPath", { id: "clip0_664_102105", children: _jsx(Rect, { width: "92", height: "29", fill: "white" }) }) })] }));
|
|
65
5
|
};
|
|
66
6
|
export default FluxLogo;
|
|
7
|
+
//# sourceMappingURL=FluxLogo.js.map
|
|
@@ -1,91 +1,3 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(object, enumerableOnly) {
|
|
30
|
-
var keys = Object.keys(object);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
-
if (enumerableOnly) {
|
|
34
|
-
symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
keys.push.apply(keys, symbols);
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
|
-
function _object_without_properties(source, excluded) {
|
|
54
|
-
if (source == null) return {};
|
|
55
|
-
var target = {}, sourceKeys, key, i;
|
|
56
|
-
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
57
|
-
sourceKeys = Reflect.ownKeys(Object(source));
|
|
58
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
59
|
-
key = sourceKeys[i];
|
|
60
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
-
target[key] = source[key];
|
|
63
|
-
}
|
|
64
|
-
return target;
|
|
65
|
-
}
|
|
66
|
-
target = _object_without_properties_loose(source, excluded);
|
|
67
|
-
if (Object.getOwnPropertySymbols) {
|
|
68
|
-
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
69
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
70
|
-
key = sourceKeys[i];
|
|
71
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
72
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
73
|
-
target[key] = source[key];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return target;
|
|
77
|
-
}
|
|
78
|
-
function _object_without_properties_loose(source, excluded) {
|
|
79
|
-
if (source == null) return {};
|
|
80
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
81
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
82
|
-
key = sourceKeys[i];
|
|
83
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
84
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
85
|
-
target[key] = source[key];
|
|
86
|
-
}
|
|
87
|
-
return target;
|
|
88
|
-
}
|
|
89
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
90
2
|
import { Font, Page } from '@react-pdf/renderer';
|
|
91
3
|
Font.register({
|
|
@@ -93,40 +5,30 @@ Font.register({
|
|
|
93
5
|
fonts: [
|
|
94
6
|
{
|
|
95
7
|
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_d_QF5e.ttf',
|
|
96
|
-
fontWeight: 'normal'
|
|
8
|
+
fontWeight: 'normal',
|
|
97
9
|
},
|
|
98
10
|
{
|
|
99
11
|
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_eYR15e.ttf',
|
|
100
|
-
fontWeight: 'bold'
|
|
12
|
+
fontWeight: 'bold',
|
|
101
13
|
},
|
|
102
14
|
{
|
|
103
15
|
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A7YdyEU.ttf',
|
|
104
16
|
fontWeight: 'normal',
|
|
105
|
-
fontStyle: 'italic'
|
|
17
|
+
fontStyle: 'italic',
|
|
106
18
|
},
|
|
107
19
|
{
|
|
108
20
|
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A1EayEU.ttf',
|
|
109
21
|
fontWeight: 'bold',
|
|
110
|
-
fontStyle: 'italic'
|
|
111
|
-
}
|
|
112
|
-
]
|
|
22
|
+
fontStyle: 'italic',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
113
25
|
});
|
|
114
26
|
Font.register({
|
|
115
27
|
family: 'Allura',
|
|
116
|
-
src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf'
|
|
28
|
+
src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf',
|
|
117
29
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"children",
|
|
121
|
-
"style"
|
|
122
|
-
]);
|
|
123
|
-
return /*#__PURE__*/ _jsx(Page, _object_spread_props(_object_spread({
|
|
124
|
-
style: _object_spread({
|
|
125
|
-
fontFamily: 'Figtree',
|
|
126
|
-
fontStyle: 'normal'
|
|
127
|
-
}, style)
|
|
128
|
-
}, props), {
|
|
129
|
-
children: children
|
|
130
|
-
}));
|
|
30
|
+
const StandardDocument = ({ children, style, ...props }) => {
|
|
31
|
+
return (_jsx(Page, { style: { fontFamily: 'Figtree', fontStyle: 'normal', ...style }, ...props, children: children }));
|
|
131
32
|
};
|
|
132
33
|
export default StandardDocument;
|
|
34
|
+
//# sourceMappingURL=StandardPage.js.map
|
package/dist/index.js
CHANGED
|
@@ -2,164 +2,46 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
4
|
import SectionBoxNew from './SectionBoxNew.js';
|
|
5
|
-
import { formatAddress, getFullMileagePackageTranslation, getSimplifiedPlanTranslation } from './utils.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var labelColor = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : colors.black, valueColor = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : colors.primary3;
|
|
10
|
-
return /*#__PURE__*/ _jsxs(View, {
|
|
11
|
-
style: {
|
|
12
|
-
gap: 4
|
|
13
|
-
},
|
|
14
|
-
children: [
|
|
15
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
16
|
-
style: {
|
|
17
|
-
color: labelColor,
|
|
18
|
-
letterSpacing: 1
|
|
19
|
-
},
|
|
20
|
-
children: label
|
|
21
|
-
}),
|
|
22
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
23
|
-
style: {
|
|
24
|
-
color: valueColor,
|
|
25
|
-
letterSpacing: 1
|
|
26
|
-
},
|
|
27
|
-
children: value
|
|
28
|
-
})
|
|
29
|
-
]
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
return /*#__PURE__*/ _jsx(View, {
|
|
33
|
-
children: /*#__PURE__*/ _jsx(SectionBoxNew, {
|
|
34
|
-
topContent: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
35
|
-
children: [
|
|
36
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
37
|
-
style: {
|
|
5
|
+
import { formatAddress, getFullMileagePackageTranslation, getSimplifiedPlanTranslation, } from './utils.js';
|
|
6
|
+
const CustomerSubscriptionSection = ({ quotation, t }) => {
|
|
7
|
+
const displayContent = (label, value, labelColor = colors.black, valueColor = colors.primary3) => (_jsxs(View, { style: { gap: 4 }, children: [_jsx(Text, { style: { color: labelColor, letterSpacing: 1 }, children: label }), _jsx(Text, { style: { color: valueColor, letterSpacing: 1 }, children: value })] }));
|
|
8
|
+
return (_jsx(View, { children: _jsx(SectionBoxNew, { topContent: _jsxs(_Fragment, { children: [_jsx(Text, { style: {
|
|
38
9
|
textTransform: 'uppercase',
|
|
39
10
|
fontSize: 12,
|
|
40
|
-
fontWeight: 'bold'
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/*#__PURE__*/ _jsxs(View, {
|
|
45
|
-
style: {
|
|
46
|
-
flexDirection: 'row',
|
|
47
|
-
justifyContent: 'space-between'
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
displayContent(t.customer.name, quotation.customerName),
|
|
51
|
-
quotation.customer.email && displayContent(t.customer.email, quotation.customer.email)
|
|
52
|
-
]
|
|
53
|
-
}),
|
|
54
|
-
quotation.customer.address && displayContent(t.customer.address, formatAddress(quotation.customer.address))
|
|
55
|
-
]
|
|
56
|
-
}),
|
|
57
|
-
bottomContent: /*#__PURE__*/ _jsxs(_Fragment, {
|
|
58
|
-
children: [
|
|
59
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
60
|
-
style: {
|
|
11
|
+
fontWeight: 'bold',
|
|
12
|
+
}, children: t.customer.title }), _jsxs(View, { style: { flexDirection: 'row', justifyContent: 'space-between' }, children: [displayContent(t.customer.name, quotation.customerName), quotation.customer.email &&
|
|
13
|
+
displayContent(t.customer.email, quotation.customer.email)] }), quotation.customer.address &&
|
|
14
|
+
displayContent(t.customer.address, formatAddress(quotation.customer.address))] }), bottomContent: _jsxs(_Fragment, { children: [_jsx(Text, { style: {
|
|
61
15
|
textTransform: 'uppercase',
|
|
62
16
|
fontSize: 12,
|
|
63
|
-
fontWeight: 'bold'
|
|
64
|
-
},
|
|
65
|
-
children: t.subscription.title
|
|
66
|
-
}),
|
|
67
|
-
/*#__PURE__*/ _jsxs(View, {
|
|
68
|
-
style: {
|
|
17
|
+
fontWeight: 'bold',
|
|
18
|
+
}, children: t.subscription.title }), _jsxs(View, { style: {
|
|
69
19
|
flexDirection: 'row',
|
|
70
20
|
justifyContent: 'space-between',
|
|
71
|
-
gap: 4
|
|
72
|
-
},
|
|
73
|
-
children: [
|
|
74
|
-
displayContent(t.subscription.vehicleName, quotation.vehicleName),
|
|
75
|
-
/*#__PURE__*/ _jsxs(View, {
|
|
76
|
-
style: {
|
|
21
|
+
gap: 4,
|
|
22
|
+
}, children: [displayContent(t.subscription.vehicleName, quotation.vehicleName), _jsxs(View, { style: {
|
|
77
23
|
justifyContent: 'space-between',
|
|
78
24
|
flexDirection: 'row',
|
|
79
|
-
gap: 16
|
|
80
|
-
},
|
|
81
|
-
children: [
|
|
82
|
-
displayContent(t.subscription.plan, getSimplifiedPlanTranslation(quotation.plan)),
|
|
83
|
-
displayContent(t.subscription.mileagePackage, getFullMileagePackageTranslation(quotation.mileagePackage))
|
|
84
|
-
]
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
}),
|
|
88
|
-
/*#__PURE__*/ _jsxs(View, {
|
|
89
|
-
style: {
|
|
90
|
-
rowGap: 8
|
|
91
|
-
},
|
|
92
|
-
children: [
|
|
93
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
94
|
-
style: {
|
|
25
|
+
gap: 16,
|
|
26
|
+
}, children: [displayContent(t.subscription.plan, getSimplifiedPlanTranslation(quotation.plan)), displayContent(t.subscription.mileagePackage, getFullMileagePackageTranslation(quotation.mileagePackage))] })] }), _jsxs(View, { style: { rowGap: 8 }, children: [_jsx(Text, { style: {
|
|
95
27
|
color: colors.primary3,
|
|
96
28
|
fontWeight: 'bold',
|
|
97
|
-
letterSpacing: 1
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
alignItems: 'flex-start',
|
|
106
|
-
rowGap: 8
|
|
107
|
-
},
|
|
108
|
-
children: [
|
|
109
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
110
|
-
style: {
|
|
111
|
-
marginRight: 4
|
|
112
|
-
},
|
|
113
|
-
children: "•"
|
|
114
|
-
}),
|
|
115
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
116
|
-
style: {
|
|
117
|
-
color: colors.primary3,
|
|
118
|
-
letterSpacing: 1
|
|
119
|
-
},
|
|
120
|
-
children: line
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
}, i);
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
})
|
|
127
|
-
]
|
|
128
|
-
}),
|
|
129
|
-
children: quotation.mileagePackage !== 'unlimited' && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
130
|
-
children: [
|
|
131
|
-
/*#__PURE__*/ _jsx(View, {
|
|
132
|
-
style: {
|
|
133
|
-
borderBottom: "1px solid ".concat(colors.primary2)
|
|
134
|
-
}
|
|
135
|
-
}),
|
|
136
|
-
/*#__PURE__*/ _jsxs(View, {
|
|
137
|
-
style: {
|
|
138
|
-
padding: 16,
|
|
139
|
-
rowGap: 16
|
|
140
|
-
},
|
|
141
|
-
children: [
|
|
142
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
143
|
-
style: {
|
|
29
|
+
letterSpacing: 1,
|
|
30
|
+
}, children: t.subIncludes.title }), t.subIncludes.content.map((line, i) => (_jsxs(View
|
|
31
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
32
|
+
, { style: {
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
alignItems: 'flex-start',
|
|
35
|
+
rowGap: 8,
|
|
36
|
+
}, children: [_jsx(Text, { style: { marginRight: 4 }, children: "\u2022" }), _jsx(Text, { style: { color: colors.primary3, letterSpacing: 1 }, children: line })] }, i)))] })] }), children: quotation.mileagePackage !== 'unlimited' && (_jsxs(_Fragment, { children: [_jsx(View, { style: { borderBottom: `1px solid ${colors.primary2}` } }), _jsxs(View, { style: { padding: 16, rowGap: 16 }, children: [_jsx(Text, { style: {
|
|
144
37
|
color: colors.primary3,
|
|
145
38
|
fontWeight: 'bold',
|
|
146
|
-
letterSpacing: 1
|
|
147
|
-
},
|
|
148
|
-
children: t.subIncludes.excessMileage.title
|
|
149
|
-
}),
|
|
150
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
151
|
-
style: {
|
|
39
|
+
letterSpacing: 1,
|
|
40
|
+
}, children: t.subIncludes.excessMileage.title }), _jsx(Text, { style: {
|
|
152
41
|
fontSize: '9px',
|
|
153
42
|
color: colors.primary3,
|
|
154
|
-
letterSpacing: 1
|
|
155
|
-
},
|
|
156
|
-
children: t.subIncludes.excessMileage.description(quotation.fees.excessMileageFee || 0)
|
|
157
|
-
})
|
|
158
|
-
]
|
|
159
|
-
})
|
|
160
|
-
]
|
|
161
|
-
})
|
|
162
|
-
})
|
|
163
|
-
});
|
|
43
|
+
letterSpacing: 1,
|
|
44
|
+
}, children: t.subIncludes.excessMileage.description(quotation.fees.excessMileageFee || 0) })] })] })) }) }));
|
|
164
45
|
};
|
|
165
46
|
export default CustomerSubscriptionSection;
|
|
47
|
+
//# sourceMappingURL=CustomerSubscriptionSection.js.map
|
|
@@ -2,60 +2,23 @@ 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
border: "1px solid ".concat(colors.primary2),
|
|
5
|
+
const GFV = ({ quotation, t }) => {
|
|
6
|
+
if (!quotation.fees.gfv)
|
|
7
|
+
return;
|
|
8
|
+
return (_jsxs(View, { style: {
|
|
9
|
+
border: `1px solid ${colors.primary2}`,
|
|
11
10
|
padding: 16,
|
|
12
|
-
rowGap: 16
|
|
13
|
-
},
|
|
14
|
-
children: [
|
|
15
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
16
|
-
style: {
|
|
11
|
+
rowGap: 16,
|
|
12
|
+
}, children: [_jsx(Text, { style: {
|
|
17
13
|
color: colors.black,
|
|
18
14
|
fontWeight: 'bold',
|
|
19
15
|
letterSpacing: 1,
|
|
20
16
|
textTransform: 'uppercase',
|
|
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: {
|
|
17
|
+
flexWrap: 'nowrap',
|
|
18
|
+
}, children: t?.fees.gfv.title }), _jsxs(View, { style: { display: 'flex', flexDirection: 'row', flexWrap: 'wrap' }, children: [_jsxs(Text, { style: {
|
|
34
19
|
color: colors.primary3,
|
|
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
|
-
});
|
|
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." })] })] }));
|
|
60
22
|
};
|
|
61
23
|
export default GFV;
|
|
24
|
+
//# sourceMappingURL=GFV.js.map
|
|
@@ -2,70 +2,12 @@ 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
|
-
|
|
6
|
-
|
|
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: {
|
|
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: {
|
|
23
7
|
fontWeight: 'bold',
|
|
24
8
|
textTransform: 'uppercase',
|
|
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
|
-
});
|
|
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 })] })] })] })] }));
|
|
70
11
|
};
|
|
71
12
|
export default Header;
|
|
13
|
+
//# sourceMappingURL=Header.js.map
|