@driveflux/pdf 1.2.5 → 1.2.7
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/__mocks__/subscription.d.ts.map +1 -1
- package/dist/__mocks__/subscription.js +4 -0
- package/dist/cjs/package.json +3 -0
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +27 -2
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +1 -0
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/SectionBoxNew.js +3 -2
- package/dist/templates/QuotationPdf/translations.d.ts +4 -1
- package/dist/templates/QuotationPdf/translations.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/translations.js +5 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/__mocks__/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/__mocks__/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAE5D,eAAO,MAAM,YAAY,EAAE,wBA8zB1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/CustomerSubscriptionSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAOhE,KAAK,KAAK,GAAG;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,CAAC,EAAE,uBAAuB,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,2BAA2B,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"CustomerSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/CustomerSubscriptionSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAOhE,KAAK,KAAK,GAAG;IACZ,SAAS,EAAE,SAAS,CAAA;IACpB,CAAC,EAAE,uBAAuB,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,2BAA2B,EAAE,EAAE,CAAC,KAAK,CA4I1C,CAAA;AAED,eAAe,2BAA2B,CAAA"}
|
|
@@ -121,14 +121,39 @@ var CustomerSubscriptionSection = function(param) {
|
|
|
121
121
|
})
|
|
122
122
|
]
|
|
123
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: {
|
|
144
|
+
color: colors.primary3,
|
|
145
|
+
fontWeight: 'bold',
|
|
146
|
+
letterSpacing: 1
|
|
147
|
+
},
|
|
148
|
+
children: t.subIncludes.excessMileage.title
|
|
124
149
|
}),
|
|
125
|
-
|
|
150
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
126
151
|
style: {
|
|
127
152
|
fontSize: '9px',
|
|
128
153
|
color: colors.primary3,
|
|
129
154
|
letterSpacing: 1
|
|
130
155
|
},
|
|
131
|
-
children: t.subIncludes.excessMileage(quotation.fees.excessMileageFee || 0)
|
|
156
|
+
children: t.subIncludes.excessMileage.description(quotation.fees.excessMileageFee || 0)
|
|
132
157
|
})
|
|
133
158
|
]
|
|
134
159
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionBoxNew.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/SectionBoxNew.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG1C,KAAK,KAAK,GAAG;IACZ,UAAU,EAAE,SAAS,CAAA;IACrB,aAAa,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"SectionBoxNew.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/SectionBoxNew.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG1C,KAAK,KAAK,GAAG;IACZ,UAAU,EAAE,SAAS,CAAA;IACrB,aAAa,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAS5B,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { View } from '@react-pdf/renderer';
|
|
3
3
|
import { colors } from '../../theme/colors.js';
|
|
4
4
|
var SectionBoxNew = function(param) {
|
|
5
|
-
var topContent = param.topContent, bottomContent = param.bottomContent;
|
|
5
|
+
var topContent = param.topContent, bottomContent = param.bottomContent, children = param.children;
|
|
6
6
|
return /*#__PURE__*/ _jsxs(View, {
|
|
7
7
|
style: {
|
|
8
8
|
border: "1px solid ".concat(colors.primary2)
|
|
@@ -26,7 +26,8 @@ var SectionBoxNew = function(param) {
|
|
|
26
26
|
rowGap: 16
|
|
27
27
|
},
|
|
28
28
|
children: bottomContent
|
|
29
|
-
})
|
|
29
|
+
}),
|
|
30
|
+
children
|
|
30
31
|
]
|
|
31
32
|
});
|
|
32
33
|
};
|
|
@@ -16,7 +16,10 @@ declare const enTranslation: {
|
|
|
16
16
|
subIncludes: {
|
|
17
17
|
title: string;
|
|
18
18
|
content: string[];
|
|
19
|
-
excessMileage:
|
|
19
|
+
excessMileage: {
|
|
20
|
+
title: string;
|
|
21
|
+
description: (excessMileage: number) => string;
|
|
22
|
+
};
|
|
20
23
|
};
|
|
21
24
|
pricing: {
|
|
22
25
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/QuotationPdf/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;yCA+Ba,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CrC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,aAAa,CAAA;AAE1D,eAAO,MAAM,eAAe,WAAY,IAAI,KAAG,uBAK9C,CAAA"}
|
|
@@ -27,8 +27,11 @@ var enTranslation = {
|
|
|
27
27
|
'Independently rated vehicle inspection',
|
|
28
28
|
'Option to purchase the vehicle at the end of the subscription'
|
|
29
29
|
],
|
|
30
|
-
excessMileage:
|
|
31
|
-
|
|
30
|
+
excessMileage: {
|
|
31
|
+
title: 'Excess Mileage Fees',
|
|
32
|
+
description: function(excessMileage) {
|
|
33
|
+
return "If usage exceeds chosen mileage package, excess mileage fees for this vehicle is RM".concat(excessMileage, " per KM.");
|
|
34
|
+
}
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
pricing: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/pdf",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@driveflux/db": "1.5.
|
|
15
|
+
"@driveflux/db": "1.5.2",
|
|
16
16
|
"@driveflux/env": "1.2.0",
|
|
17
17
|
"@driveflux/format-money": "5.2.0",
|
|
18
18
|
"@driveflux/time": "4.2.0",
|