@driveflux/pdf 1.0.14 → 1.1.0
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__/quotation.d.ts +1 -1
- package/dist/__mocks__/quotation.d.ts.map +1 -1
- package/dist/__mocks__/subscription.d.ts +1 -1
- package/dist/__mocks__/subscription.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +2 -2
- package/dist/templates/QuotationPdf/index.d.ts +1 -1
- package/dist/templates/QuotationPdf/index.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/utils.d.ts +2 -3
- package/dist/templates/QuotationPdf/utils.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/utils.js +0 -14
- package/dist/templates/SubscriptionAgreement/index.d.ts +1 -1
- package/dist/templates/SubscriptionAgreement/index.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/translations.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/utils.d.ts +1 -1
- package/dist/templates/SubscriptionAgreement/utils.d.ts.map +1 -1
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +36 -36
- package/dist/utils.d.ts +2 -8
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +7 -31
- package/package.json +23 -20
- package/.eslintrc +0 -3
- package/.swcrc +0 -14
- package/.turbo/turbo-build.log +0 -6
- package/CHANGELOG.md +0 -179
- package/dist/cjs/__mocks__/quotation.js +0 -69
- package/dist/cjs/__mocks__/subscription.js +0 -1079
- package/dist/cjs/components/FluxLogo.js +0 -76
- package/dist/cjs/components/StandardPage.js +0 -129
- package/dist/cjs/debug.js +0 -234
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/templates/QuotationPdf/CustomerSubscriptionSection.js +0 -147
- package/dist/cjs/templates/QuotationPdf/GFV.js +0 -57
- package/dist/cjs/templates/QuotationPdf/Header.js +0 -86
- package/dist/cjs/templates/QuotationPdf/Pricing.js +0 -430
- package/dist/cjs/templates/QuotationPdf/QuotationPdfPage.js +0 -45
- package/dist/cjs/templates/QuotationPdf/SectionBoxNew.js +0 -43
- package/dist/cjs/templates/QuotationPdf/TermsSection.js +0 -60
- package/dist/cjs/templates/QuotationPdf/index.js +0 -208
- package/dist/cjs/templates/QuotationPdf/translations.js +0 -103
- package/dist/cjs/templates/QuotationPdf/utils.js +0 -108
- package/dist/cjs/templates/SubscriptionAgreement/Confirmation.js +0 -95
- package/dist/cjs/templates/SubscriptionAgreement/CoverPage.js +0 -110
- package/dist/cjs/templates/SubscriptionAgreement/CoverPageSection.js +0 -35
- package/dist/cjs/templates/SubscriptionAgreement/Details.js +0 -161
- package/dist/cjs/templates/SubscriptionAgreement/Footer.js +0 -68
- package/dist/cjs/templates/SubscriptionAgreement/Header.js +0 -61
- package/dist/cjs/templates/SubscriptionAgreement/LabelValue.js +0 -39
- package/dist/cjs/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +0 -48
- package/dist/cjs/templates/SubscriptionAgreement/TermsOfUse.js +0 -72
- package/dist/cjs/templates/SubscriptionAgreement/TermsOfUseSubSection.js +0 -108
- package/dist/cjs/templates/SubscriptionAgreement/index.js +0 -276
- package/dist/cjs/templates/SubscriptionAgreement/translations.js +0 -666
- package/dist/cjs/templates/SubscriptionAgreement/utils.js +0 -14
- package/dist/cjs/templates/index.js +0 -19
- package/dist/cjs/theme/colors.js +0 -147
- package/dist/cjs/theme/index.js +0 -18
- package/dist/cjs/types.js +0 -4
- package/dist/cjs/utils.js +0 -184
- package/dist/cjs/watch.js +0 -20
- package/index.cjs +0 -1
- package/index.d.ts +0 -1
- package/src/__mocks__/quotation.ts +0 -62
- package/src/__mocks__/subscription.ts +0 -803
- package/src/components/FluxLogo.tsx +0 -52
- package/src/components/StandardPage.tsx +0 -32
- package/src/debug.ts +0 -45
- package/src/index.ts +0 -3
- package/src/templates/QuotationPdf/CustomerSubscriptionSection.tsx +0 -68
- package/src/templates/QuotationPdf/GFV.tsx +0 -29
- package/src/templates/QuotationPdf/Header.tsx +0 -31
- package/src/templates/QuotationPdf/Pricing.tsx +0 -214
- package/src/templates/QuotationPdf/QuotationPdfPage.tsx +0 -25
- package/src/templates/QuotationPdf/SectionBoxNew.tsx +0 -20
- package/src/templates/QuotationPdf/TermsSection.tsx +0 -28
- package/src/templates/QuotationPdf/index.tsx +0 -46
- package/src/templates/QuotationPdf/translations.ts +0 -82
- package/src/templates/QuotationPdf/utils.ts +0 -59
- package/src/templates/SubscriptionAgreement/Confirmation.tsx +0 -49
- package/src/templates/SubscriptionAgreement/CoverPage.tsx +0 -52
- package/src/templates/SubscriptionAgreement/CoverPageSection.tsx +0 -25
- package/src/templates/SubscriptionAgreement/Details.tsx +0 -127
- package/src/templates/SubscriptionAgreement/Footer.tsx +0 -37
- package/src/templates/SubscriptionAgreement/Header.tsx +0 -37
- package/src/templates/SubscriptionAgreement/LabelValue.tsx +0 -19
- package/src/templates/SubscriptionAgreement/SubscriptionAgreementPage.tsx +0 -24
- package/src/templates/SubscriptionAgreement/TermsOfUse.tsx +0 -30
- package/src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx +0 -44
- package/src/templates/SubscriptionAgreement/index.tsx +0 -66
- package/src/templates/SubscriptionAgreement/translations.ts +0 -664
- package/src/templates/SubscriptionAgreement/utils.ts +0 -7
- package/src/templates/index.ts +0 -2
- package/src/theme/colors.ts +0 -180
- package/src/theme/index.ts +0 -1
- package/src/types.ts +0 -1
- package/src/utils.ts +0 -27
- package/src/watch.ts +0 -16
- package/tsconfig.json +0 -13
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,86 +0,0 @@
|
|
|
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 _FluxLogo = /*#__PURE__*/ _interop_require_default(require("../../components/FluxLogo.js"));
|
|
14
|
-
var _colors = require("../../theme/colors.js");
|
|
15
|
-
function _interop_require_default(obj) {
|
|
16
|
-
return obj && obj.__esModule ? obj : {
|
|
17
|
-
default: obj
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
var Header = function(param) {
|
|
21
|
-
var tTitle = param.tTitle, quotationId = param.quotationId, quotationDate = param.quotationDate;
|
|
22
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
23
|
-
style: {
|
|
24
|
-
gap: 24
|
|
25
|
-
},
|
|
26
|
-
children: [
|
|
27
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Link, {
|
|
28
|
-
src: "https://driveflux.com",
|
|
29
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FluxLogo.default, {})
|
|
30
|
-
}),
|
|
31
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
32
|
-
style: {
|
|
33
|
-
gap: 4
|
|
34
|
-
},
|
|
35
|
-
children: [
|
|
36
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
37
|
-
style: {
|
|
38
|
-
fontWeight: 'bold',
|
|
39
|
-
textTransform: 'uppercase',
|
|
40
|
-
fontSize: 18
|
|
41
|
-
},
|
|
42
|
-
children: tTitle
|
|
43
|
-
}),
|
|
44
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
45
|
-
style: {
|
|
46
|
-
justifyContent: 'space-between',
|
|
47
|
-
flexDirection: 'row'
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
51
|
-
style: {
|
|
52
|
-
color: _colors.colors.primary3,
|
|
53
|
-
fontSize: 10
|
|
54
|
-
},
|
|
55
|
-
children: quotationId
|
|
56
|
-
}),
|
|
57
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_renderer.View, {
|
|
58
|
-
style: {
|
|
59
|
-
gap: 8,
|
|
60
|
-
flexDirection: 'row'
|
|
61
|
-
},
|
|
62
|
-
children: [
|
|
63
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
64
|
-
style: {
|
|
65
|
-
fontSize: 10,
|
|
66
|
-
color: _colors.colors.black
|
|
67
|
-
},
|
|
68
|
-
children: "Date"
|
|
69
|
-
}),
|
|
70
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_renderer.Text, {
|
|
71
|
-
style: {
|
|
72
|
-
color: _colors.colors.primary3,
|
|
73
|
-
fontSize: 10
|
|
74
|
-
},
|
|
75
|
-
children: quotationDate
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
})
|
|
83
|
-
]
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
var _default = Header;
|
|
@@ -1,430 +0,0 @@
|
|
|
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;
|
|
@@ -1,45 +0,0 @@
|
|
|
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;
|
|
@@ -1,43 +0,0 @@
|
|
|
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;
|
|
@@ -1,60 +0,0 @@
|
|
|
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;
|