@driveflux/pdf 1.0.1 → 1.0.3

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 (70) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +16 -0
  3. package/dist/__mocks__/quotation.d.ts +3 -0
  4. package/dist/__mocks__/quotation.d.ts.map +1 -0
  5. package/dist/__mocks__/quotation.js +59 -0
  6. package/dist/cjs/__mocks__/quotation.js +69 -0
  7. package/dist/cjs/debug.js +33 -1
  8. package/dist/cjs/templates/QuotationPdf/CustomerSubscriptionSection.js +147 -0
  9. package/dist/cjs/templates/QuotationPdf/GFV.js +57 -0
  10. package/dist/cjs/templates/QuotationPdf/Header.js +86 -0
  11. package/dist/cjs/templates/QuotationPdf/Pricing.js +430 -0
  12. package/dist/cjs/templates/QuotationPdf/QuotationPdfPage.js +45 -0
  13. package/dist/cjs/templates/QuotationPdf/SectionBoxNew.js +43 -0
  14. package/dist/cjs/templates/QuotationPdf/TermsSection.js +60 -0
  15. package/dist/cjs/templates/QuotationPdf/index.js +208 -0
  16. package/dist/cjs/templates/QuotationPdf/translations.js +103 -0
  17. package/dist/cjs/templates/QuotationPdf/utils.js +91 -0
  18. package/dist/cjs/templates/SubscriptionAgreement/LabelValue.js +1 -1
  19. package/dist/cjs/templates/index.js +1 -0
  20. package/dist/debug.js +33 -1
  21. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts +10 -0
  22. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -0
  23. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +132 -0
  24. package/dist/templates/QuotationPdf/GFV.d.ts +10 -0
  25. package/dist/templates/QuotationPdf/GFV.d.ts.map +1 -0
  26. package/dist/templates/QuotationPdf/GFV.js +47 -0
  27. package/dist/templates/QuotationPdf/Header.d.ts +9 -0
  28. package/dist/templates/QuotationPdf/Header.d.ts.map +1 -0
  29. package/dist/templates/QuotationPdf/Header.js +71 -0
  30. package/dist/templates/QuotationPdf/Pricing.d.ts +10 -0
  31. package/dist/templates/QuotationPdf/Pricing.d.ts.map +1 -0
  32. package/dist/templates/QuotationPdf/Pricing.js +415 -0
  33. package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts +8 -0
  34. package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts.map +1 -0
  35. package/dist/templates/QuotationPdf/QuotationPdfPage.js +30 -0
  36. package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +8 -0
  37. package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +1 -0
  38. package/dist/templates/QuotationPdf/SectionBoxNew.js +33 -0
  39. package/dist/templates/QuotationPdf/TermsSection.d.ts +8 -0
  40. package/dist/templates/QuotationPdf/TermsSection.d.ts.map +1 -0
  41. package/dist/templates/QuotationPdf/TermsSection.js +50 -0
  42. package/dist/templates/QuotationPdf/index.d.ts +9 -0
  43. package/dist/templates/QuotationPdf/index.d.ts.map +1 -0
  44. package/dist/templates/QuotationPdf/index.js +193 -0
  45. package/dist/templates/QuotationPdf/translations.d.ts +59 -0
  46. package/dist/templates/QuotationPdf/translations.d.ts.map +1 -0
  47. package/dist/templates/QuotationPdf/translations.js +93 -0
  48. package/dist/templates/QuotationPdf/utils.d.ts +6 -0
  49. package/dist/templates/QuotationPdf/utils.d.ts.map +1 -0
  50. package/dist/templates/QuotationPdf/utils.js +70 -0
  51. package/dist/templates/SubscriptionAgreement/LabelValue.js +1 -1
  52. package/dist/templates/index.d.ts +1 -0
  53. package/dist/templates/index.d.ts.map +1 -1
  54. package/dist/templates/index.js +1 -0
  55. package/package.json +2 -2
  56. package/src/__mocks__/quotation.ts +62 -0
  57. package/src/debug.ts +12 -3
  58. package/src/templates/QuotationPdf/CustomerSubscriptionSection.tsx +65 -0
  59. package/src/templates/QuotationPdf/GFV.tsx +29 -0
  60. package/src/templates/QuotationPdf/Header.tsx +31 -0
  61. package/src/templates/QuotationPdf/Pricing.tsx +214 -0
  62. package/src/templates/QuotationPdf/QuotationPdfPage.tsx +25 -0
  63. package/src/templates/QuotationPdf/SectionBoxNew.tsx +20 -0
  64. package/src/templates/QuotationPdf/TermsSection.tsx +28 -0
  65. package/src/templates/QuotationPdf/index.tsx +46 -0
  66. package/src/templates/QuotationPdf/translations.ts +82 -0
  67. package/src/templates/QuotationPdf/utils.ts +44 -0
  68. package/src/templates/SubscriptionAgreement/LabelValue.tsx +1 -1
  69. package/src/templates/index.ts +1 -0
  70. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,430 @@
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 _formatmoney = require("@driveflux/format-money");
13
+ var _renderer = require("@react-pdf/renderer");
14
+ var _colors = require("../../theme/colors.js");
15
+ var _SectionBoxNew = /*#__PURE__*/ _interop_require_default(require("./SectionBoxNew.js"));
16
+ function _interop_require_default(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
21
+ var Pricing = function(param) {
22
+ var quotation = param.quotation, t = param.t;
23
+ var _quotation_fees_discountAmount, _quotation_fees_discountAmount1;
24
+ var _quotation_fees = quotation.fees, startFee = _quotation_fees.startFee, reservationFee = _quotation_fees.reservationFee, deposit = _quotation_fees.deposit, subscriptionFee = _quotation_fees.subscriptionFee, extraCharges = _quotation_fees.extraCharges, couponCode = _quotation_fees.couponCode, couponType = _quotation_fees.couponType, discountAmount = _quotation_fees.discountAmount;
25
+ var totalUpfrontFee = startFee + (reservationFee || 0) + deposit;
26
+ var totalMonthlyFee = subscriptionFee;
27
+ extraCharges.forEach(function(charge) {
28
+ if (charge.type === 'upfront') {
29
+ totalUpfrontFee += charge.amount;
30
+ } else if (charge.type === 'monthly') {
31
+ totalMonthlyFee += charge.amount;
32
+ }
33
+ });
34
+ if (couponCode && couponType === 'upfront') {
35
+ totalUpfrontFee -= discountAmount || 0;
36
+ }
37
+ if (couponCode && couponType === 'monthly') {
38
+ totalMonthlyFee -= discountAmount || 0;
39
+ }
40
+ var getFeeValue = function(key) {
41
+ switch(key){
42
+ case 'startFee':
43
+ return startFee;
44
+ case 'reservationFee':
45
+ return reservationFee;
46
+ case 'deposit':
47
+ return deposit;
48
+ case 'subscriptionFee':
49
+ return subscriptionFee;
50
+ default:
51
+ return null;
52
+ }
53
+ };
54
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
55
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_SectionBoxNew.default, {
56
+ topContent: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
57
+ children: [
58
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
59
+ style: {
60
+ textTransform: 'uppercase',
61
+ fontSize: 12,
62
+ fontWeight: 'bold'
63
+ },
64
+ children: t === null || t === void 0 ? void 0 : t.title
65
+ }),
66
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
67
+ style: {
68
+ fontWeight: 'bold',
69
+ color: _colors.colors.black,
70
+ letterSpacing: 1
71
+ },
72
+ children: t === null || t === void 0 ? void 0 : t.fees.upfront.title
73
+ }),
74
+ t === null || t === void 0 ? void 0 : t.fees.upfront.content.map(function(fee) {
75
+ var _getFeeValue;
76
+ var feeValue = (_getFeeValue = getFeeValue(fee.key)) === null || _getFeeValue === void 0 ? void 0 : _getFeeValue.toFixed(2);
77
+ if (feeValue === '0.00') {
78
+ return null;
79
+ }
80
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
81
+ style: {
82
+ justifyContent: 'space-between',
83
+ flexDirection: 'row',
84
+ rowGap: 8
85
+ },
86
+ children: [
87
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
88
+ style: {
89
+ paddingRight: 4,
90
+ letterSpacing: 1,
91
+ color: _colors.colors.primary3
92
+ },
93
+ children: fee.title
94
+ }),
95
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
96
+ style: {
97
+ color: _colors.colors.primary3,
98
+ letterSpacing: 1
99
+ },
100
+ children: feeValue !== null ? feeValue : ''
101
+ })
102
+ ]
103
+ }, fee.key);
104
+ }),
105
+ quotation.fees.extraCharges.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
106
+ children: quotation.fees.extraCharges.filter(function(charge) {
107
+ return charge.amount > 0;
108
+ }).filter(function(charge) {
109
+ return charge.type === 'upfront';
110
+ }).map(function(charge, i) {
111
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
112
+ style: {
113
+ justifyContent: 'space-between',
114
+ flexDirection: 'row',
115
+ rowGap: 8
116
+ },
117
+ children: [
118
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
119
+ style: {
120
+ paddingRight: 4,
121
+ letterSpacing: 1,
122
+ color: _colors.colors.primary3
123
+ },
124
+ children: [
125
+ t === null || t === void 0 ? void 0 : t.fees.extraCharge,
126
+ " - ",
127
+ charge.description
128
+ ]
129
+ }),
130
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
131
+ style: {
132
+ color: _colors.colors.primary3,
133
+ letterSpacing: 1
134
+ },
135
+ children: charge.amount.toFixed(2)
136
+ })
137
+ ]
138
+ }, i);
139
+ })
140
+ }),
141
+ quotation.fees.couponCode !== null && quotation.fees.couponType === 'upfront' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
142
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
143
+ style: {
144
+ justifyContent: 'space-between',
145
+ flexDirection: 'row',
146
+ rowGap: 8
147
+ },
148
+ children: [
149
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
150
+ style: {
151
+ paddingRight: 4,
152
+ letterSpacing: 1,
153
+ color: _colors.colors.primary3
154
+ },
155
+ children: [
156
+ t === null || t === void 0 ? void 0 : t.fees.promo,
157
+ " - ",
158
+ quotation.fees.couponCode
159
+ ]
160
+ }),
161
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
162
+ style: {
163
+ color: _colors.colors.accent4,
164
+ letterSpacing: 1
165
+ },
166
+ children: (_quotation_fees_discountAmount = quotation.fees.discountAmount) === null || _quotation_fees_discountAmount === void 0 ? void 0 : _quotation_fees_discountAmount.toFixed(2)
167
+ })
168
+ ]
169
+ })
170
+ }),
171
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
172
+ style: {
173
+ backgroundColor: _colors.colors.primary1,
174
+ borderTop: "1px solid ".concat(_colors.colors.primary1),
175
+ justifyContent: 'space-between',
176
+ flexDirection: 'row',
177
+ padding: 4
178
+ },
179
+ children: [
180
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
181
+ style: {
182
+ letterSpacing: 1,
183
+ paddingRight: 4
184
+ },
185
+ children: "Total"
186
+ }),
187
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
188
+ style: {
189
+ letterSpacing: 1
190
+ },
191
+ children: (0, _formatmoney.formatMoney)(totalUpfrontFee)
192
+ })
193
+ ]
194
+ }),
195
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
196
+ style: {
197
+ borderBottom: "1px solid ".concat(_colors.colors.primary2)
198
+ }
199
+ }),
200
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
201
+ style: {
202
+ fontWeight: 'bold',
203
+ color: _colors.colors.black,
204
+ letterSpacing: 1
205
+ },
206
+ children: t === null || t === void 0 ? void 0 : t.fees.monthly.title
207
+ }),
208
+ t === null || t === void 0 ? void 0 : t.fees.monthly.content.map(function(fee) {
209
+ var _getFeeValue;
210
+ var feeValue = (_getFeeValue = getFeeValue(fee.key)) === null || _getFeeValue === void 0 ? void 0 : _getFeeValue.toFixed(2);
211
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
212
+ style: {
213
+ justifyContent: 'space-between',
214
+ flexDirection: 'row',
215
+ rowGap: 8
216
+ },
217
+ children: [
218
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
219
+ style: {
220
+ paddingRight: 4,
221
+ letterSpacing: 1,
222
+ color: _colors.colors.primary3
223
+ },
224
+ children: fee.title
225
+ }),
226
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
227
+ style: {
228
+ color: _colors.colors.primary3,
229
+ letterSpacing: 1
230
+ },
231
+ children: feeValue !== null ? feeValue : ''
232
+ })
233
+ ]
234
+ }, fee.key);
235
+ }),
236
+ quotation.fees.extraCharges.length > 0 && /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
237
+ children: quotation.fees.extraCharges.filter(function(charge) {
238
+ return charge.type === 'monthly';
239
+ }).map(function(charge, i) {
240
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
241
+ style: {
242
+ justifyContent: 'space-between',
243
+ flexDirection: 'row',
244
+ rowGap: 8
245
+ },
246
+ children: [
247
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
248
+ style: {
249
+ paddingRight: 4,
250
+ letterSpacing: 1,
251
+ color: _colors.colors.primary3
252
+ },
253
+ children: [
254
+ t === null || t === void 0 ? void 0 : t.fees.extraCharge,
255
+ " - ",
256
+ charge.description
257
+ ]
258
+ }),
259
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
260
+ style: {
261
+ color: _colors.colors.primary3,
262
+ letterSpacing: 1
263
+ },
264
+ children: charge.amount.toFixed(2)
265
+ })
266
+ ]
267
+ }, i);
268
+ })
269
+ }),
270
+ quotation.fees.couponCode !== null && quotation.fees.couponType === 'monthly' && /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
271
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
272
+ style: {
273
+ justifyContent: 'space-between',
274
+ flexDirection: 'row',
275
+ rowGap: 8
276
+ },
277
+ children: [
278
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
279
+ style: {
280
+ paddingRight: 4,
281
+ letterSpacing: 1,
282
+ color: _colors.colors.primary3
283
+ },
284
+ children: [
285
+ t === null || t === void 0 ? void 0 : t.fees.promo,
286
+ " - ",
287
+ quotation.fees.couponCode
288
+ ]
289
+ }),
290
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
291
+ style: {
292
+ color: _colors.colors.accent4,
293
+ letterSpacing: 1
294
+ },
295
+ children: (_quotation_fees_discountAmount1 = quotation.fees.discountAmount) === null || _quotation_fees_discountAmount1 === void 0 ? void 0 : _quotation_fees_discountAmount1.toFixed(2)
296
+ })
297
+ ]
298
+ })
299
+ }),
300
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
301
+ style: {
302
+ backgroundColor: _colors.colors.primary1,
303
+ borderTop: "1px solid ".concat(_colors.colors.primary1),
304
+ justifyContent: 'space-between',
305
+ flexDirection: 'row',
306
+ padding: 4
307
+ },
308
+ children: [
309
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
310
+ style: {
311
+ letterSpacing: 1,
312
+ paddingRight: 4
313
+ },
314
+ children: "Total"
315
+ }),
316
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
317
+ style: {
318
+ letterSpacing: 1
319
+ },
320
+ children: (0, _formatmoney.formatMoney)(totalMonthlyFee)
321
+ })
322
+ ]
323
+ })
324
+ ]
325
+ }),
326
+ bottomContent: /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
327
+ children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
328
+ style: {
329
+ rowGap: 16
330
+ },
331
+ children: [
332
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
333
+ style: {
334
+ textTransform: 'uppercase',
335
+ fontSize: 12,
336
+ fontWeight: 'bold',
337
+ letterSpacing: 1
338
+ },
339
+ children: t === null || t === void 0 ? void 0 : t.fees.dueToday.title
340
+ }),
341
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
342
+ style: {
343
+ color: _colors.colors.primary3,
344
+ letterSpacing: 1
345
+ },
346
+ children: t === null || t === void 0 ? void 0 : t.fees.dueToday.description
347
+ }),
348
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
349
+ style: {
350
+ justifyContent: 'space-between',
351
+ flexDirection: 'row'
352
+ },
353
+ children: [
354
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
355
+ style: {
356
+ letterSpacing: 1,
357
+ color: _colors.colors.primary3
358
+ },
359
+ children: [
360
+ " ",
361
+ t === null || t === void 0 ? void 0 : t.fees.dueToday.subTotal
362
+ ]
363
+ }),
364
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
365
+ style: {
366
+ letterSpacing: 1,
367
+ color: _colors.colors.primary3
368
+ },
369
+ children: quotation.fees.amountBeforeTax.toFixed(2)
370
+ })
371
+ ]
372
+ }),
373
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
374
+ style: {
375
+ justifyContent: 'space-between',
376
+ flexDirection: 'row'
377
+ },
378
+ children: [
379
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.Text, {
380
+ style: {
381
+ letterSpacing: 1,
382
+ color: _colors.colors.primary3
383
+ },
384
+ children: [
385
+ " ",
386
+ t === null || t === void 0 ? void 0 : t.fees.dueToday.serviceFee
387
+ ]
388
+ }),
389
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
390
+ style: {
391
+ letterSpacing: 1,
392
+ color: _colors.colors.primary3
393
+ },
394
+ children: quotation.fees.taxAmount.toFixed(2)
395
+ })
396
+ ]
397
+ }),
398
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
399
+ style: {
400
+ backgroundColor: _colors.colors.primary1,
401
+ borderTop: "1px solid ".concat(_colors.colors.primary1),
402
+ justifyContent: 'space-between',
403
+ flexDirection: 'row',
404
+ padding: 4
405
+ },
406
+ children: [
407
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
408
+ style: {
409
+ letterSpacing: 1,
410
+ paddingRight: 4,
411
+ fontWeight: 'bold'
412
+ },
413
+ children: t === null || t === void 0 ? void 0 : t.fees.dueToday.grandTotal
414
+ }),
415
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
416
+ style: {
417
+ letterSpacing: 1,
418
+ fontWeight: 'bold'
419
+ },
420
+ children: (0, _formatmoney.formatMoney)(quotation.fees.amountAfterTax)
421
+ })
422
+ ]
423
+ })
424
+ ]
425
+ })
426
+ })
427
+ })
428
+ });
429
+ };
430
+ var _default = Pricing;
@@ -0,0 +1,45 @@
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 _datefns = require("date-fns");
14
+ var _StandardPage = /*#__PURE__*/ _interop_require_default(require("../../components/StandardPage.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 QuotationPdfPage = function(param) {
22
+ var quotation = param.quotation, children = param.children;
23
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_StandardPage.default, {
24
+ style: {
25
+ padding: 40,
26
+ fontSize: 10,
27
+ gap: 16
28
+ },
29
+ children: [
30
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_Header.default, {
31
+ tTitle: 'Quotation',
32
+ quotationId: quotation.id,
33
+ quotationDate: (0, _datefns.format)(quotation.createdAt, 'dd-MM-yyyy')
34
+ }),
35
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
36
+ style: {
37
+ flex: 1,
38
+ rowGap: 24
39
+ },
40
+ children: children
41
+ })
42
+ ]
43
+ });
44
+ };
45
+ var _default = QuotationPdfPage;
@@ -0,0 +1,43 @@
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 SectionBoxNew = function(param) {
15
+ var topContent = param.topContent, bottomContent = param.bottomContent;
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
17
+ style: {
18
+ border: "1px solid ".concat(_colors.colors.primary2)
19
+ },
20
+ children: [
21
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
22
+ style: {
23
+ padding: 16,
24
+ rowGap: 16
25
+ },
26
+ children: topContent
27
+ }),
28
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
29
+ style: {
30
+ borderBottom: "1px solid ".concat(_colors.colors.primary2)
31
+ }
32
+ }),
33
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
34
+ style: {
35
+ padding: 16,
36
+ rowGap: 16
37
+ },
38
+ children: bottomContent
39
+ })
40
+ ]
41
+ });
42
+ };
43
+ var _default = SectionBoxNew;
@@ -0,0 +1,60 @@
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 TermsSection = function(param) {
15
+ var t = param.t;
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
17
+ style: {
18
+ gap: 16
19
+ },
20
+ children: [
21
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
22
+ style: {
23
+ fontWeight: 'bold',
24
+ color: _colors.colors.black,
25
+ letterSpacing: 1,
26
+ textTransform: 'uppercase'
27
+ },
28
+ children: t === null || t === void 0 ? void 0 : t.title
29
+ }),
30
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.View, {
31
+ children: t.content.map(function(line, i) {
32
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
33
+ style: {
34
+ flexDirection: 'row',
35
+ alignItems: 'flex-start'
36
+ },
37
+ children: [
38
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
39
+ style: {
40
+ marginRight: 4,
41
+ fontSize: 8
42
+ },
43
+ children: "•"
44
+ }),
45
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
46
+ style: {
47
+ color: _colors.colors.primary3,
48
+ letterSpacing: 1,
49
+ fontSize: 8
50
+ },
51
+ children: line
52
+ })
53
+ ]
54
+ }, i);
55
+ })
56
+ })
57
+ ]
58
+ });
59
+ };
60
+ var _default = TermsSection;