@driveflux/pdf 1.6.68 → 1.6.69
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__/tou.js +11 -10
- package/dist/__mocks__/tou.js.map +1 -1
- package/dist/components/StandardPage.d.ts.map +1 -1
- package/dist/components/StandardPage.js +20 -99
- package/dist/components/StandardPage.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +9 -92
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +12 -97
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js.map +1 -1
- package/dist/templates/SubscriptionAgreement/utils.d.ts +3 -0
- package/dist/templates/SubscriptionAgreement/utils.d.ts.map +1 -1
- package/dist/templates/SubscriptionAgreement/utils.js +31 -3
- package/dist/templates/SubscriptionAgreement/utils.js.map +1 -1
- package/package.json +2 -2
package/dist/__mocks__/tou.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const mockTermsOfUse = {
|
|
2
2
|
items: [
|
|
3
3
|
{
|
|
4
4
|
content: 'Terms of Use',
|
|
5
5
|
items: [
|
|
6
6
|
{
|
|
7
|
-
content: 'These Terms of Use
|
|
8
|
-
items: []
|
|
9
|
-
}
|
|
10
|
-
]
|
|
7
|
+
content: 'These Terms of ***Use*** are NOT no yes defined and govern the relationship, rules and regulations of the interactions by FLUX and its Members.',
|
|
8
|
+
items: [],
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
content: 'Introduction',
|
|
14
14
|
items: [
|
|
15
15
|
{
|
|
16
16
|
content: 'FLUX is an online business functioning as a technology provider that facilitates vehicle subscriptions.',
|
|
17
|
-
items: []
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
]
|
|
17
|
+
items: [],
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
22
|
};
|
|
23
|
+
//# sourceMappingURL=tou.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tou.js","sourceRoot":"","sources":["../../src/__mocks__/tou.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE;QACN;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,
|
|
1
|
+
{"version":3,"file":"tou.js","sourceRoot":"","sources":["../../src/__mocks__/tou.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,KAAK,EAAE;QACN;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,iJAAiJ;oBAClJ,KAAK,EAAE,EAAE;iBACT;aACD;SACD;QACD;YACC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE;gBACN;oBACC,OAAO,EACN,yGAAyG;oBAC1G,KAAK,EAAE,EAAE;iBACT;aACD;SACD;KACD;CACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardPage.d.ts","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,KAAK,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"StandardPage.d.ts","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,KAAK,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AA8B3B,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAaxD,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,113 +1,34 @@
|
|
|
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 = _object_without_properties_loose(source, excluded);
|
|
56
|
-
var key, i;
|
|
57
|
-
if (Object.getOwnPropertySymbols) {
|
|
58
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
59
|
-
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
60
|
-
key = sourceSymbolKeys[i];
|
|
61
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
62
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
63
|
-
target[key] = source[key];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return target;
|
|
67
|
-
}
|
|
68
|
-
function _object_without_properties_loose(source, excluded) {
|
|
69
|
-
if (source == null) return {};
|
|
70
|
-
var target = {};
|
|
71
|
-
var sourceKeys = Object.keys(source);
|
|
72
|
-
var key, i;
|
|
73
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
74
|
-
key = sourceKeys[i];
|
|
75
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
76
|
-
target[key] = source[key];
|
|
77
|
-
}
|
|
78
|
-
return target;
|
|
79
|
-
}
|
|
80
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
81
2
|
import { Font, Page } from '@react-pdf/renderer';
|
|
82
3
|
Font.register({
|
|
83
4
|
family: 'Figtree',
|
|
84
5
|
fonts: [
|
|
85
6
|
{
|
|
86
|
-
src: 'https://fonts.gstatic.com/s/figtree/
|
|
87
|
-
fontWeight: 'normal'
|
|
7
|
+
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_d_QF5e.ttf',
|
|
8
|
+
fontWeight: 'normal',
|
|
88
9
|
},
|
|
89
10
|
{
|
|
90
|
-
src: 'https://fonts.gstatic.com/s/figtree/
|
|
91
|
-
fontWeight: 'bold'
|
|
92
|
-
}
|
|
93
|
-
|
|
11
|
+
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xmz-HUzqDCFdgfMsYiV_F7wfS-Bs_eYR15e.ttf',
|
|
12
|
+
fontWeight: 'bold',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A7YdyEU.ttf',
|
|
16
|
+
fontWeight: 'normal',
|
|
17
|
+
fontStyle: 'italic',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
src: 'https://fonts.gstatic.com/s/figtree/v8/_Xm9-HUzqDCFdgfMm4GnA4aZFrUvtOK3A1EayEU.ttf',
|
|
21
|
+
fontWeight: 'bold',
|
|
22
|
+
fontStyle: 'italic',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
94
25
|
});
|
|
95
26
|
Font.register({
|
|
96
27
|
family: 'Allura',
|
|
97
|
-
src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf'
|
|
28
|
+
src: 'https://fonts.gstatic.com/s/allura/v21/9oRPNYsQpS4zjuAPjAIXPtrrGA.ttf',
|
|
98
29
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"children",
|
|
102
|
-
"style"
|
|
103
|
-
]);
|
|
104
|
-
return /*#__PURE__*/ _jsx(Page, _object_spread_props(_object_spread({
|
|
105
|
-
style: _object_spread({
|
|
106
|
-
fontFamily: 'Figtree',
|
|
107
|
-
fontStyle: 'normal'
|
|
108
|
-
}, style)
|
|
109
|
-
}, props), {
|
|
110
|
-
children: children
|
|
111
|
-
}));
|
|
30
|
+
const StandardDocument = ({ children, style, ...props }) => {
|
|
31
|
+
return (_jsx(Page, { style: { fontFamily: 'Figtree', fontStyle: 'normal', ...style }, ...props, children: children }));
|
|
112
32
|
};
|
|
113
33
|
export default StandardDocument;
|
|
34
|
+
//# sourceMappingURL=StandardPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardPage.js","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,qBAAqB,CAAA;AAMhE,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE;QACN;YACC,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"StandardPage.js","sourceRoot":"","sources":["../../src/components/StandardPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,qBAAqB,CAAA;AAMhE,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE;QACN;YACC,GAAG,EAAE,iFAAiF;YACtF,UAAU,EAAE,QAAQ;SACpB;QACD;YACC,GAAG,EAAE,iFAAiF;YACtF,UAAU,EAAE,MAAM;SAClB;QACD;YACC,GAAG,EAAE,oFAAoF;YACzF,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,QAAQ;SACnB;QACD;YACC,GAAG,EAAE,oFAAoF;YACzF,UAAU,EAAE,MAAM;YAClB,SAAS,EAAE,QAAQ;SACnB;KACD;CACD,CAAC,CAAA;AACF,IAAI,CAAC,QAAQ,CAAC;IACb,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,uEAAuE;CAC5E,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAuC,CAAC,EAC7D,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACR,EAAE,EAAE;IACJ,OAAO,CACN,KAAC,IAAI,IACJ,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAC3D,KAAK,YAER,QAAQ,GACH,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfUse.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,kBAAkB,EAClB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TermsOfUse.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,kBAAkB,EAClB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,KAAK,KAAK,GAAG;IACZ,UAAU,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CAoCzB,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,98 +1,15 @@
|
|
|
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
|
-
}
|
|
26
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
i + 1
|
|
36
|
-
]);
|
|
37
|
-
var indicesString = currentIndices.join('.');
|
|
38
|
-
return /*#__PURE__*/ _jsxs(View, {
|
|
39
|
-
style: {
|
|
40
|
-
rowGap: 16
|
|
41
|
-
},
|
|
42
|
-
children: [
|
|
43
|
-
item.content && /*#__PURE__*/ _jsxs(View, {
|
|
44
|
-
style: {
|
|
45
|
-
flexDirection: 'row',
|
|
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: item.content
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}),
|
|
64
|
-
((_item_items = item.items) === null || _item_items === void 0 ? void 0 : _item_items.length) > 0 && /*#__PURE__*/ _jsx(View, {
|
|
65
|
-
style: {
|
|
66
|
-
paddingLeft: 16,
|
|
67
|
-
rowGap: 16
|
|
68
|
-
},
|
|
69
|
-
children: getTerms(item.items, currentIndices)
|
|
70
|
-
})
|
|
71
|
-
]
|
|
72
|
-
}, "".// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
73
|
-
concat(indicesString, "-").concat(i));
|
|
3
|
+
import { renderMarkdown } from './utils.js';
|
|
4
|
+
const TermsOfUse = ({ termsOfUse }) => {
|
|
5
|
+
const getTerms = (items, indices = []) => {
|
|
6
|
+
return items.map((item, i) => {
|
|
7
|
+
const currentIndices = [...indices, i + 1];
|
|
8
|
+
const indicesString = currentIndices.join('.');
|
|
9
|
+
return (_jsxs(View, { style: { rowGap: 16 }, children: [item.content && (_jsxs(View, { style: { flexDirection: 'row', columnGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: indicesString }), _jsxs(Text, { style: { textAlign: 'justify', flex: 1 }, children: [renderMarkdown(item.content), ' '] })] })), item.items?.length > 0 && (_jsx(View, { style: { paddingLeft: 16, rowGap: 16 }, children: getTerms(item.items, currentIndices) }))] }, indicesString));
|
|
74
10
|
});
|
|
75
11
|
};
|
|
76
|
-
return
|
|
77
|
-
style: {
|
|
78
|
-
rowGap: 16
|
|
79
|
-
},
|
|
80
|
-
children: [
|
|
81
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
82
|
-
style: {
|
|
83
|
-
fontWeight: 'bold',
|
|
84
|
-
textTransform: 'uppercase'
|
|
85
|
-
},
|
|
86
|
-
children: 'Terms of Use'
|
|
87
|
-
}),
|
|
88
|
-
/*#__PURE__*/ _jsx(View, {
|
|
89
|
-
style: {
|
|
90
|
-
rowGap: 16,
|
|
91
|
-
lineHeight: 1.4
|
|
92
|
-
},
|
|
93
|
-
children: getTerms(termsOfUse.items)
|
|
94
|
-
})
|
|
95
|
-
]
|
|
96
|
-
});
|
|
12
|
+
return (_jsxs(View, { style: { rowGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold', textTransform: 'uppercase' }, children: 'Terms of Use' }), _jsx(View, { style: { rowGap: 16, lineHeight: 1.4 }, children: getTerms(termsOfUse.items) })] }));
|
|
97
13
|
};
|
|
98
14
|
export default TermsOfUse;
|
|
15
|
+
//# sourceMappingURL=TermsOfUse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfUse.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"TermsOfUse.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUse.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAM3C,MAAM,UAAU,GAAc,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;IAChD,MAAM,QAAQ,GAAG,CAAC,KAAuB,EAAE,UAAoB,EAAE,EAAE,EAAE;QACpE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EA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C,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfUseSubSection.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TermsOfUseSubSection.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAI/B,KAAK,wBAAwB,GAC1B,MAAM,GACN;IACA,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,wBAAwB,EAAE,CAAA;CACtC,CAAA;AAEJ,KAAK,KAAK,GAAG;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,UAAU,EAAE,wBAAwB,CAAA;CACpC,CAAA;AAED,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CA8CnC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -1,102 +1,17 @@
|
|
|
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
|
-
}
|
|
26
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
2
|
import { Text, View } from '@react-pdf/renderer';
|
|
28
3
|
import { useMemo } from 'react';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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;
|
|
4
|
+
import { renderMarkdown } from './utils.js';
|
|
5
|
+
const TermsOfUseSubSection = ({ indices, subSection }) => {
|
|
6
|
+
const { indicesString, paddingLeft } = useMemo(() => ({
|
|
7
|
+
indicesString: indices.reduce((prev, curr, i) => `${prev}${curr}${i === indices.length - 1 ? '' : '.'}`, ''),
|
|
8
|
+
paddingLeft: Math.max(indices.length - 2, 0) * 16,
|
|
9
|
+
}), [indices.length, indices.reduce]);
|
|
10
|
+
return typeof subSection === 'string' ? (_jsxs(View, { style: { flexDirection: 'row', paddingLeft, columnGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: indicesString }), _jsx(Text, { style: { textAlign: 'justify', flex: 1 }, children: subSection })] }, indicesString)) : 'subSections' in subSection ? (_jsxs(View, { style: { gap: 16 }, children: [_jsxs(View, { style: { flexDirection: 'row', paddingLeft, columnGap: 16 }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: indicesString }), _jsx(Text, { style: { textAlign: 'justify', flex: 1 }, children: typeof subSection === 'string'
|
|
11
|
+
? renderMarkdown(subSection)
|
|
12
|
+
: renderMarkdown(subSection.paragraph) })] }, indicesString), subSection.subSections.map((subSection, i) => (_jsx(TermsOfUseSubSection, { indices: [...indices, i + 1], subSection: subSection }, `${indices}.${
|
|
13
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
|
|
14
|
+
i}`)))] }, indicesString)) : null;
|
|
101
15
|
};
|
|
102
16
|
export default TermsOfUseSubSection;
|
|
17
|
+
//# sourceMappingURL=TermsOfUseSubSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TermsOfUseSubSection.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TermsOfUseSubSection.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/TermsOfUseSubSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAc3C,M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AE,MAAM,EAAE,YAAG,aAAa,GAAQ,EAC3D,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,YAC5C,OAAO,UAAU,KAAK,QAAQ;4BAC9B,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC;4BAC5B,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,GACjC,KAPF,aAAa,CAQZ,EACN,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CAC9C,KAAC,oBAAoB,IAKpB,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,EAC5B,UAAU,EAAE,UAAU,IALjB,GAAG,OAAO,IAAI;YAClB,8DAA8D;YAC9D,CACD,EAAE,CAGD,CACF,CAAC,KArBQ,aAAa,CAsBjB,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACT,CAAC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { UserIdentification } from '@driveflux/db';
|
|
2
|
+
import { Text } from '@react-pdf/renderer';
|
|
3
|
+
import React from 'react';
|
|
2
4
|
export declare const formatIdentification: (identification?: UserIdentification | null) => string;
|
|
5
|
+
export declare const renderMarkdown: (text: string) => (string | React.CElement<React.PropsWithChildren<import("@react-pdf/renderer").TextProps> | import("@react-pdf/renderer").SVGTextProps, Text>)[];
|
|
3
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,oBAAoB,GAChC,iBAAiB,kBAAkB,GAAG,IAAI,WAK1C,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,qJAuC1C,CAAA"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Text } from '@react-pdf/renderer';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export const formatIdentification = (identification) => {
|
|
4
|
+
return identification?.type === 'id'
|
|
5
|
+
? `${identification?.number?.slice(0, 6)}-${identification?.number?.slice(6, 8)}-${identification?.number?.slice(8)}`
|
|
6
|
+
: identification?.number || '-';
|
|
4
7
|
};
|
|
8
|
+
export const renderMarkdown = (text) => {
|
|
9
|
+
const parts = text.split(/(\*\*\*.*?\*\*\*|\*\*.*?\*\*|\*.*?\*)/g);
|
|
10
|
+
return parts.map((part, index) => {
|
|
11
|
+
if (part.startsWith('***') && part.endsWith('***')) {
|
|
12
|
+
return React.createElement(Text, {
|
|
13
|
+
key: index,
|
|
14
|
+
style: { fontWeight: 'bold', fontStyle: 'italic' },
|
|
15
|
+
}, part.slice(3, -3));
|
|
16
|
+
}
|
|
17
|
+
if (part.startsWith('**') && part.endsWith('**')) {
|
|
18
|
+
return React.createElement(Text, {
|
|
19
|
+
key: index,
|
|
20
|
+
style: { fontWeight: 'bold' },
|
|
21
|
+
}, part.slice(2, -2));
|
|
22
|
+
}
|
|
23
|
+
if (part.startsWith('*') && part.endsWith('*')) {
|
|
24
|
+
return React.createElement(Text, {
|
|
25
|
+
key: index,
|
|
26
|
+
style: { fontStyle: 'italic' },
|
|
27
|
+
}, part.slice(1, -1));
|
|
28
|
+
}
|
|
29
|
+
return part;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,cAA0C,EACzC,EAAE;IACH,OAAO,cAAc,EAAE,IAAI,KAAK,IAAI;QACnC,CAAC,CAAC,GAAG,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;QACrH,CAAC,CAAC,cAAc,EAAE,MAAM,IAAI,GAAG,CAAA;AACjC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE;IAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;IAElE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAChC,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC,aAAa,CACzB,IAAI,EACJ;gBACC,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE;aAClD,EACD,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAAA;QACF,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,OAAO,KAAK,CAAC,aAAa,CACzB,IAAI,EACJ;gBACC,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;aAC7B,EACD,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAAA;QACF,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAChD,OAAO,KAAK,CAAC,aAAa,CACzB,IAAI,EACJ;gBACC,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;aAC9B,EACD,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAAA;QACF,CAAC;QAED,OAAO,IAAI,CAAA;IACZ,CAAC,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/pdf",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@driveflux/db": "2.2.
|
|
15
|
+
"@driveflux/db": "2.2.52",
|
|
16
16
|
"@driveflux/env": "1.5.0",
|
|
17
17
|
"@driveflux/format-money": "5.4.1",
|
|
18
18
|
"@driveflux/time": "4.4.1",
|