@driveflux/pdf 1.7.1 → 2.0.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.js +10 -11
- package/dist/__mocks__/subscription.d.ts +2 -0
- package/dist/__mocks__/subscription.d.ts.map +1 -1
- package/dist/__mocks__/subscription.js +408 -140
- package/dist/__mocks__/subscription.js.map +1 -1
- package/dist/__mocks__/tou.d.ts +10 -0
- package/dist/__mocks__/tou.d.ts.map +1 -0
- package/dist/__mocks__/tou.js +22 -0
- package/dist/__mocks__/tou.js.map +1 -0
- package/dist/components/FluxLogo.js +62 -3
- package/dist/components/StandardPage.js +97 -8
- package/dist/debug.js +207 -27
- package/dist/debug.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +145 -27
- package/dist/templates/QuotationPdf/GFV.js +49 -12
- package/dist/templates/QuotationPdf/Header.js +63 -5
- package/dist/templates/QuotationPdf/Pricing.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/Pricing.js +574 -208
- package/dist/templates/QuotationPdf/Pricing.js.map +1 -1
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +23 -3
- package/dist/templates/QuotationPdf/SectionBoxNew.js +34 -4
- package/dist/templates/QuotationPdf/TermsSection.js +42 -5
- package/dist/templates/QuotationPdf/VehiclePhotos.js +54 -24
- package/dist/templates/QuotationPdf/index.js +189 -10
- package/dist/templates/QuotationPdf/translations.d.ts.map +1 -1
- package/dist/templates/QuotationPdf/translations.js +34 -23
- package/dist/templates/QuotationPdf/translations.js.map +1 -1
- package/dist/templates/QuotationPdf/utils.js +59 -29
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts +2 -0
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/Confirmation.js +66 -11
- package/dist/templates/SubscriptionAgreement/Confirmation.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +3 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.js +94 -11
- package/dist/templates/SubscriptionAgreement/CoverPage.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +16 -5
- package/dist/templates/SubscriptionAgreement/Details.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/Details.js +140 -46
- package/dist/templates/SubscriptionAgreement/Details.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/Footer.js +48 -6
- package/dist/templates/SubscriptionAgreement/Header.js +35 -5
- package/dist/templates/SubscriptionAgreement/LabelValue.js +25 -3
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +26 -3
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts +2 -2
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +94 -4
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +97 -9
- package/dist/templates/SubscriptionAgreement/index.d.ts +5 -1
- package/dist/templates/SubscriptionAgreement/index.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/index.js +245 -14
- package/dist/templates/SubscriptionAgreement/index.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/translations.d.ts +6 -0
- package/dist/templates/SubscriptionAgreement/translations.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/translations.js +199 -192
- package/dist/templates/SubscriptionAgreement/translations.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/types.d.ts +2 -1
- package/dist/templates/SubscriptionAgreement/types.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/types.js +1 -2
- package/dist/templates/SubscriptionAgreement/utils.js +3 -5
- package/dist/templates/index.js +0 -1
- package/dist/theme/colors.js +44 -63
- package/dist/theme/index.js +0 -1
- package/dist/types.js +1 -2
- package/dist/utils.js +159 -16
- package/dist/watch.js +3 -4
- package/package.json +7 -7
|
@@ -1,14 +1,102 @@
|
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_without_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
|
+
}
|
|
9
|
+
function _iterable_to_array(iter) {
|
|
10
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
|
+
}
|
|
12
|
+
function _non_iterable_spread() {
|
|
13
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
|
+
}
|
|
15
|
+
function _to_consumable_array(arr) {
|
|
16
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
17
|
+
}
|
|
18
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
19
|
+
if (!o) return;
|
|
20
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
21
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25
|
+
}
|
|
1
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
27
|
import { Text, View } from '@react-pdf/renderer';
|
|
3
28
|
import { useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
var TermsOfUseSubSection = function(param) {
|
|
30
|
+
var indices = param.indices, subSection = param.subSection;
|
|
31
|
+
var _useMemo = useMemo(function() {
|
|
32
|
+
return {
|
|
33
|
+
indicesString: indices.reduce(function(prev, curr, i) {
|
|
34
|
+
return "".concat(prev).concat(curr).concat(i === indices.length - 1 ? '' : '.');
|
|
35
|
+
}, ''),
|
|
36
|
+
paddingLeft: Math.max(indices.length - 2, 0) * 16
|
|
37
|
+
};
|
|
38
|
+
}, [
|
|
39
|
+
indices.length,
|
|
40
|
+
indices.reduce
|
|
41
|
+
]), indicesString = _useMemo.indicesString, paddingLeft = _useMemo.paddingLeft;
|
|
42
|
+
return typeof subSection === 'string' ? /*#__PURE__*/ _jsxs(View, {
|
|
43
|
+
style: {
|
|
44
|
+
flexDirection: 'row',
|
|
45
|
+
paddingLeft: paddingLeft,
|
|
46
|
+
columnGap: 16
|
|
47
|
+
},
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
50
|
+
style: {
|
|
51
|
+
fontWeight: 'bold'
|
|
52
|
+
},
|
|
53
|
+
children: indicesString
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
56
|
+
style: {
|
|
57
|
+
textAlign: 'justify',
|
|
58
|
+
flex: 1
|
|
59
|
+
},
|
|
60
|
+
children: subSection
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}, indicesString) : 'subSections' in subSection ? /*#__PURE__*/ _jsxs(View, {
|
|
64
|
+
style: {
|
|
65
|
+
gap: 16
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ _jsxs(View, {
|
|
69
|
+
style: {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
paddingLeft: paddingLeft,
|
|
72
|
+
columnGap: 16
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
76
|
+
style: {
|
|
77
|
+
fontWeight: 'bold'
|
|
78
|
+
},
|
|
79
|
+
children: indicesString
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
82
|
+
style: {
|
|
83
|
+
textAlign: 'justify',
|
|
84
|
+
flex: 1
|
|
85
|
+
},
|
|
86
|
+
children: subSection.paragraph
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
}, indicesString),
|
|
90
|
+
subSection.subSections.map(function(subSection, i) {
|
|
91
|
+
return /*#__PURE__*/ _jsx(TermsOfUseSubSection, {
|
|
92
|
+
indices: _to_consumable_array(indices).concat([
|
|
93
|
+
i + 1
|
|
94
|
+
]),
|
|
95
|
+
subSection: subSection
|
|
96
|
+
}, "".// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
97
|
+
concat(indices, ".").concat(i));
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}, indicesString) : null;
|
|
12
101
|
};
|
|
13
102
|
export default TermsOfUseSubSection;
|
|
14
|
-
//# sourceMappingURL=TermsOfUseSubSection.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import type { SubscriptionSignature } from '@driveflux/db';
|
|
2
|
+
import type { TermsOfUseSettings } from '@driveflux/db/types/helpers';
|
|
1
3
|
import type { PdfTemplatesSupportedLocales } from '../../types.js';
|
|
2
4
|
import type { SubscriptionForAgreement } from './types.js';
|
|
3
5
|
type Options = {
|
|
4
6
|
locale?: PdfTemplatesSupportedLocales;
|
|
5
7
|
subscription: SubscriptionForAgreement;
|
|
8
|
+
termsOfUse: TermsOfUseSettings;
|
|
9
|
+
signature: SubscriptionSignature;
|
|
6
10
|
};
|
|
7
|
-
export declare const generateSubscriptionAgreementPdf: ({ locale, subscription }: Options, fileName?: string) => Promise<Buffer<ArrayBufferLike>>;
|
|
11
|
+
export declare const generateSubscriptionAgreementPdf: ({ locale, subscription, termsOfUse, signature }: Options, fileName?: string) => Promise<Buffer<ArrayBufferLike>>;
|
|
8
12
|
export {};
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AAQlE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE1D,KAAK,OAAO,GAAG;IACd,MAAM,CAAC,EAAE,4BAA4B,CAAA;IACrC,YAAY,EAAE,wBAAwB,CAAA;IACtC,UAAU,EAAE,kBAAkB,CAAA;IAC9B,SAAS,EAAE,qBAAqB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,gCAAgC,GAC5C,iDAAwD,OAAO,EAC/D,WAAW,MAAM,qCAcjB,CAAA"}
|
|
@@ -1,3 +1,175 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2
|
+
try {
|
|
3
|
+
var info = gen[key](arg);
|
|
4
|
+
var value = info.value;
|
|
5
|
+
} catch (error) {
|
|
6
|
+
reject(error);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (info.done) {
|
|
10
|
+
resolve(value);
|
|
11
|
+
} else {
|
|
12
|
+
Promise.resolve(value).then(_next, _throw);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(undefined);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
function _object_spread(target) {
|
|
44
|
+
for(var i = 1; i < arguments.length; i++){
|
|
45
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
46
|
+
var ownKeys = Object.keys(source);
|
|
47
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
48
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
49
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
ownKeys.forEach(function(key) {
|
|
53
|
+
_define_property(target, key, source[key]);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return target;
|
|
57
|
+
}
|
|
58
|
+
function ownKeys(object, enumerableOnly) {
|
|
59
|
+
var keys = Object.keys(object);
|
|
60
|
+
if (Object.getOwnPropertySymbols) {
|
|
61
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
62
|
+
if (enumerableOnly) {
|
|
63
|
+
symbols = symbols.filter(function(sym) {
|
|
64
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
keys.push.apply(keys, symbols);
|
|
68
|
+
}
|
|
69
|
+
return keys;
|
|
70
|
+
}
|
|
71
|
+
function _object_spread_props(target, source) {
|
|
72
|
+
source = source != null ? source : {};
|
|
73
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
74
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
75
|
+
} else {
|
|
76
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
77
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return target;
|
|
81
|
+
}
|
|
82
|
+
function _ts_generator(thisArg, body) {
|
|
83
|
+
var f, y, t, _ = {
|
|
84
|
+
label: 0,
|
|
85
|
+
sent: function() {
|
|
86
|
+
if (t[0] & 1) throw t[1];
|
|
87
|
+
return t[1];
|
|
88
|
+
},
|
|
89
|
+
trys: [],
|
|
90
|
+
ops: []
|
|
91
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
92
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
93
|
+
return this;
|
|
94
|
+
}), g;
|
|
95
|
+
function verb(n) {
|
|
96
|
+
return function(v) {
|
|
97
|
+
return step([
|
|
98
|
+
n,
|
|
99
|
+
v
|
|
100
|
+
]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function step(op) {
|
|
104
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
105
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
106
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
107
|
+
if (y = 0, t) op = [
|
|
108
|
+
op[0] & 2,
|
|
109
|
+
t.value
|
|
110
|
+
];
|
|
111
|
+
switch(op[0]){
|
|
112
|
+
case 0:
|
|
113
|
+
case 1:
|
|
114
|
+
t = op;
|
|
115
|
+
break;
|
|
116
|
+
case 4:
|
|
117
|
+
_.label++;
|
|
118
|
+
return {
|
|
119
|
+
value: op[1],
|
|
120
|
+
done: false
|
|
121
|
+
};
|
|
122
|
+
case 5:
|
|
123
|
+
_.label++;
|
|
124
|
+
y = op[1];
|
|
125
|
+
op = [
|
|
126
|
+
0
|
|
127
|
+
];
|
|
128
|
+
continue;
|
|
129
|
+
case 7:
|
|
130
|
+
op = _.ops.pop();
|
|
131
|
+
_.trys.pop();
|
|
132
|
+
continue;
|
|
133
|
+
default:
|
|
134
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
135
|
+
_ = 0;
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
139
|
+
_.label = op[1];
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
143
|
+
_.label = t[1];
|
|
144
|
+
t = op;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
if (t && _.label < t[2]) {
|
|
148
|
+
_.label = t[2];
|
|
149
|
+
_.ops.push(op);
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
if (t[2]) _.ops.pop();
|
|
153
|
+
_.trys.pop();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
op = body.call(thisArg, _);
|
|
157
|
+
} catch (e) {
|
|
158
|
+
op = [
|
|
159
|
+
6,
|
|
160
|
+
e
|
|
161
|
+
];
|
|
162
|
+
y = 0;
|
|
163
|
+
} finally{
|
|
164
|
+
f = t = 0;
|
|
165
|
+
}
|
|
166
|
+
if (op[0] & 5) throw op[1];
|
|
167
|
+
return {
|
|
168
|
+
value: op[0] ? op[1] : void 0,
|
|
169
|
+
done: true
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
1
173
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
174
|
import { Document } from '@react-pdf/renderer';
|
|
3
175
|
import { useMemo } from 'react';
|
|
@@ -8,25 +180,84 @@ import Details from './Details.js';
|
|
|
8
180
|
import SubscriptionAgreementPage from './SubscriptionAgreementPage.js';
|
|
9
181
|
import TermsOfUse from './TermsOfUse.js';
|
|
10
182
|
import { useTranslations } from './translations.js';
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
183
|
+
export var generateSubscriptionAgreementPdf = function(param, fileName) {
|
|
184
|
+
var _param_locale = param.locale, locale = _param_locale === void 0 ? 'en' : _param_locale, subscription = param.subscription, termsOfUse = param.termsOfUse, signature = param.signature;
|
|
185
|
+
return _async_to_generator(function() {
|
|
186
|
+
return _ts_generator(this, function(_state) {
|
|
187
|
+
switch(_state.label){
|
|
188
|
+
case 0:
|
|
189
|
+
if (!signature) {
|
|
190
|
+
throw new Error('Signature not found');
|
|
191
|
+
}
|
|
192
|
+
return [
|
|
193
|
+
4,
|
|
194
|
+
toPdf(/*#__PURE__*/ _jsx(SubscriptionAgreement, {
|
|
195
|
+
locale: locale,
|
|
196
|
+
signature: signature,
|
|
197
|
+
subscription: subscription,
|
|
198
|
+
termsOfUse: termsOfUse
|
|
199
|
+
}), fileName)
|
|
200
|
+
];
|
|
201
|
+
case 1:
|
|
202
|
+
return [
|
|
203
|
+
2,
|
|
204
|
+
_state.sent()
|
|
205
|
+
];
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
})();
|
|
16
209
|
};
|
|
17
|
-
|
|
210
|
+
var SubscriptionAgreement = function(param) {
|
|
211
|
+
var _param_locale = param.locale, locale = _param_locale === void 0 ? 'en' : _param_locale, signature = param.signature, subscription = param.subscription, termsOfUse = param.termsOfUse;
|
|
18
212
|
if (!signature.signedAt) {
|
|
19
|
-
throw new Error(
|
|
213
|
+
throw new Error("Missing 'signature.signedAt'");
|
|
20
214
|
}
|
|
21
|
-
|
|
22
|
-
|
|
215
|
+
var useT = useTranslations(locale);
|
|
216
|
+
var pageProps = useMemo(function() {
|
|
23
217
|
return {
|
|
24
218
|
t: useT,
|
|
25
219
|
userId: subscription.userId,
|
|
26
|
-
subscriptionId: subscription.id
|
|
220
|
+
subscriptionId: subscription.id
|
|
27
221
|
};
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
|
|
222
|
+
}, [
|
|
223
|
+
subscription.userId,
|
|
224
|
+
subscription.id,
|
|
225
|
+
useT
|
|
226
|
+
]);
|
|
227
|
+
var payerType = subscription.payerType;
|
|
228
|
+
var t = pageProps.t;
|
|
229
|
+
return /*#__PURE__*/ _jsxs(Document, {
|
|
230
|
+
title: t.title,
|
|
231
|
+
language: locale,
|
|
232
|
+
children: [
|
|
233
|
+
/*#__PURE__*/ _jsx(SubscriptionAgreementPage, _object_spread_props(_object_spread({}, pageProps), {
|
|
234
|
+
children: /*#__PURE__*/ _jsx(CoverPage, {
|
|
235
|
+
tTitle: t.title,
|
|
236
|
+
tCover: t.cover,
|
|
237
|
+
signedAt: signature.signedAt,
|
|
238
|
+
user: subscription.user,
|
|
239
|
+
business: subscription.business,
|
|
240
|
+
payerType: payerType
|
|
241
|
+
})
|
|
242
|
+
})),
|
|
243
|
+
/*#__PURE__*/ _jsx(SubscriptionAgreementPage, _object_spread_props(_object_spread({}, pageProps), {
|
|
244
|
+
children: /*#__PURE__*/ _jsx(TermsOfUse, {
|
|
245
|
+
termsOfUse: termsOfUse
|
|
246
|
+
})
|
|
247
|
+
})),
|
|
248
|
+
/*#__PURE__*/ _jsxs(SubscriptionAgreementPage, _object_spread_props(_object_spread({}, pageProps), {
|
|
249
|
+
children: [
|
|
250
|
+
/*#__PURE__*/ _jsx(Details, {
|
|
251
|
+
tDetails: t.details,
|
|
252
|
+
subscription: subscription
|
|
253
|
+
}),
|
|
254
|
+
/*#__PURE__*/ _jsx(Confirmation, {
|
|
255
|
+
tConfirmation: t.confirmation,
|
|
256
|
+
subscription: subscription,
|
|
257
|
+
signature: signature
|
|
258
|
+
})
|
|
259
|
+
]
|
|
260
|
+
}))
|
|
261
|
+
]
|
|
262
|
+
});
|
|
31
263
|
};
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAW,OAAO,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,yBAAyB,MAAM,gCAAgC,CAAA;AACtE,OAAO,UAAU,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAUnD,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EACpD,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAW,EAC/D,QAAiB,EAChB,EAAE;IACH,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACvC,CAAC;IACD,OAAO,MAAM,KAAK,CACjB,KAAC,qBAAqB,IACrB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,GACrB,EACF,QAAQ,CACR,CAAA;AACF,CAAC,CAAA;AASD,MAAM,qBAAqB,GAAc,CAAC,EACzC,MAAM,GAAG,IAAI,EACb,SAAS,EACT,YAAY,EACZ,UAAU,GACV,EAAE,EAAE;IACJ,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAChD,CAAC;IACD,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IACpC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,OAAO;YACN,CAAC,EAAE,IAAI;YACP,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,cAAc,EAAE,YAAY,CAAC,EAAE;SAC/B,CAAA;IACF,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAA;IAChD,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAA;IAExC,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IACvB,OAAO,CACN,MAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,aACzC,KAAC,yBAAyB,OAAK,SAAS,YACvC,KAAC,SAAS,IACT,MAAM,EAAE,CAAC,CAAC,KAAK,EACf,MAAM,EAAE,CAAC,CAAC,KAAK,EACf,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAC5B,IAAI,EAAE,YAAY,CAAC,IAAI,EACvB,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,SAAS,EAAE,SAAS,GACnB,GACyB,EAC5B,KAAC,yBAAyB,OAAK,SAAS,YACvC,KAAC,UAAU,IAAC,UAAU,EAAE,UAAU,GAAI,GACX,EAC5B,MAAC,yBAAyB,OAAK,SAAS,aACvC,KAAC,OAAO,IAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,GAAI,EAC5D,KAAC,YAAY,IACZ,aAAa,EAAE,CAAC,CAAC,YAAY,EAC7B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,GACnB,IACyB,IAClB,CACX,CAAA;AACF,CAAC,CAAA"}
|
|
@@ -10,6 +10,8 @@ declare const enTranslation: {
|
|
|
10
10
|
and: string;
|
|
11
11
|
name: string;
|
|
12
12
|
idOrPassportNo: string;
|
|
13
|
+
companyName: string;
|
|
14
|
+
companyNo: string;
|
|
13
15
|
};
|
|
14
16
|
termsOfUse: {
|
|
15
17
|
title: string;
|
|
@@ -45,6 +47,10 @@ declare const enTranslation: {
|
|
|
45
47
|
name: string;
|
|
46
48
|
idOrPassportNo: string;
|
|
47
49
|
};
|
|
50
|
+
business: {
|
|
51
|
+
name: string;
|
|
52
|
+
companyNo: string;
|
|
53
|
+
};
|
|
48
54
|
vehicle: {
|
|
49
55
|
make: string;
|
|
50
56
|
model: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/translations.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAwqBS,QAAQ,GAAG,UAAU;;;;;CAMhD,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,OAAO,aAAa,CAAA;AAEnE,eAAO,MAAM,eAAe,GAC3B,QAAQ,IAAI,KACV,gCAKF,CAAA"}
|