@driveflux/pdf 2.0.12 → 3.0.0-next.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.
Files changed (54) hide show
  1. package/dist/__mocks__/quotation.js +11 -10
  2. package/dist/__mocks__/subscription.d.ts.map +1 -1
  3. package/dist/__mocks__/subscription.js +143 -421
  4. package/dist/__mocks__/subscription.js.map +1 -1
  5. package/dist/__mocks__/tou.js +10 -9
  6. package/dist/components/FluxLogo.js +3 -62
  7. package/dist/components/StandardPage.js +10 -99
  8. package/dist/debug.js +27 -206
  9. package/dist/debug.js.map +1 -1
  10. package/dist/index.js +1 -0
  11. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +1 -1
  12. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +27 -145
  13. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js.map +1 -1
  14. package/dist/templates/QuotationPdf/GFV.js +12 -49
  15. package/dist/templates/QuotationPdf/Header.js +5 -63
  16. package/dist/templates/QuotationPdf/Pricing.d.ts.map +1 -1
  17. package/dist/templates/QuotationPdf/Pricing.js +201 -573
  18. package/dist/templates/QuotationPdf/Pricing.js.map +1 -1
  19. package/dist/templates/QuotationPdf/QuotationPdfPage.js +3 -23
  20. package/dist/templates/QuotationPdf/SectionBoxNew.js +4 -34
  21. package/dist/templates/QuotationPdf/TermsSection.js +5 -42
  22. package/dist/templates/QuotationPdf/TermsSection.js.map +1 -1
  23. package/dist/templates/QuotationPdf/VehiclePhotos.js +24 -54
  24. package/dist/templates/QuotationPdf/VehiclePhotos.js.map +1 -1
  25. package/dist/templates/QuotationPdf/index.js +11 -190
  26. package/dist/templates/QuotationPdf/index.js.map +1 -1
  27. package/dist/templates/QuotationPdf/translations.js +22 -34
  28. package/dist/templates/QuotationPdf/utils.d.ts +2 -2
  29. package/dist/templates/QuotationPdf/utils.js +29 -59
  30. package/dist/templates/QuotationPdf/utils.js.map +1 -1
  31. package/dist/templates/SubscriptionAgreement/Confirmation.js +10 -65
  32. package/dist/templates/SubscriptionAgreement/CoverPage.js +10 -93
  33. package/dist/templates/SubscriptionAgreement/CoverPageSection.js +5 -16
  34. package/dist/templates/SubscriptionAgreement/Details.js +51 -129
  35. package/dist/templates/SubscriptionAgreement/Details.js.map +1 -1
  36. package/dist/templates/SubscriptionAgreement/Footer.js +6 -48
  37. package/dist/templates/SubscriptionAgreement/Header.js +5 -35
  38. package/dist/templates/SubscriptionAgreement/LabelValue.js +3 -25
  39. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +3 -26
  40. package/dist/templates/SubscriptionAgreement/TermsOfUse.js +8 -94
  41. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +11 -97
  42. package/dist/templates/SubscriptionAgreement/index.js +15 -245
  43. package/dist/templates/SubscriptionAgreement/translations.js +194 -195
  44. package/dist/templates/SubscriptionAgreement/types.d.ts +1 -2
  45. package/dist/templates/SubscriptionAgreement/types.d.ts.map +1 -1
  46. package/dist/templates/SubscriptionAgreement/types.js +2 -1
  47. package/dist/templates/SubscriptionAgreement/utils.js +11 -16
  48. package/dist/templates/index.js +1 -0
  49. package/dist/theme/colors.js +63 -44
  50. package/dist/theme/index.js +1 -0
  51. package/dist/types.js +2 -1
  52. package/dist/utils.js +16 -159
  53. package/dist/watch.js +4 -3
  54. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../src/templates/SubscriptionAgreement/Details.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,UAAU,MAAM,iBAAiB,CAAA;AASxC,MAAM,OAAO,GAAc,CAAC,E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IAAC,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAO,IAAI,CAAC,GAAG,CAAI,CACjE,CAAC,KAlBG,GAAG,CAmBF,CACP,CAAC,IACI,CACP,CAAA;AACF,CAAC,CAAA;AAED,eAAe,OAAO,CAAA;AAEtB,2DAA2D;AAC3D,MAAM,kBAAkB,GAAG,CAC1B,IAAsB,EACtB,WAAyB,EACxB,EAAE;IACH,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,QAAQ;YACZ,OAAO,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAA;QACxE,KAAK,QAAQ;YACZ,OAAO,WAAW,CAAA;QACnB,KAAK,QAAQ;YACZ,OAAO,WAAW,CAAA;QACnB,KAAK,QAAQ;YACZ,OAAO,WAAW,CAAA;QACnB,KAAK,OAAO;YACX,OAAO,iBAAiB,CAAA;QACzB,KAAK,YAAY;YAChB,OAAO,QAAQ,CAAA;QAChB;YACC,OAAO,cAAc,CAAA;IACvB,CAAC;AACF,CAAC,CAAA;AAED,MAAM,gCAAgC,GAAG,CAAC,IAA4B,EAAE,EAAE;IACzE,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,MAAM;YACV,OAAO,gBAAgB,CAAA;QACxB,KAAK,UAAU;YACd,OAAO,oBAAoB,CAAA;QAC5B,KAAK,MAAM;YACV,OAAO,gBAAgB,CAAA;QACxB,KAAK,WAAW;YACf,OAAO,WAAW,CAAA;QACnB;YACC,OAAO,yBAAyB,CAAA;IAClC,CAAC;AACF,CAAC,CAAA"}
@@ -1,58 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
3
  import { colors } from '../../theme/colors.js';
4
- var Footer = function(param) {
5
- var tComputerGenerated = param.tComputerGenerated, tPage = param.tPage, tOf = param.tOf;
6
- return /*#__PURE__*/ _jsxs(View, {
7
- fixed: true,
8
- style: {
4
+ const Footer = ({ tComputerGenerated, tPage, tOf }) => {
5
+ return (_jsxs(View, { fixed: true, style: {
9
6
  justifyContent: 'space-between',
10
7
  flexDirection: 'row',
11
8
  paddingTop: 16,
12
9
  marginTop: 16,
13
- borderTop: "1px solid ".concat(colors.links),
10
+ borderTop: `1px solid ${colors.links}`,
14
11
  color: colors.primary2,
15
- fontSize: 8
16
- },
17
- children: [
18
- /*#__PURE__*/ _jsx(Text, {
19
- children: tComputerGenerated
20
- }),
21
- /*#__PURE__*/ _jsxs(View, {
22
- style: {
23
- flexDirection: 'row',
24
- columnGap: 4
25
- },
26
- children: [
27
- /*#__PURE__*/ _jsx(Text, {
28
- children: tPage
29
- }),
30
- /*#__PURE__*/ _jsx(Text, {
31
- style: {
32
- fontWeight: 'bold',
33
- color: colors.black
34
- },
35
- render: function(param) {
36
- var pageNumber = param.pageNumber;
37
- return "".concat(pageNumber);
38
- }
39
- }),
40
- /*#__PURE__*/ _jsx(Text, {
41
- children: tOf
42
- }),
43
- /*#__PURE__*/ _jsx(Text, {
44
- style: {
45
- fontWeight: 'bold',
46
- color: colors.black
47
- },
48
- render: function(param) {
49
- var totalPages = param.totalPages;
50
- return "".concat(totalPages);
51
- }
52
- })
53
- ]
54
- })
55
- ]
56
- });
12
+ fontSize: 8,
13
+ }, children: [_jsx(Text, { children: tComputerGenerated }), _jsxs(View, { style: { flexDirection: 'row', columnGap: 4 }, children: [_jsx(Text, { children: tPage }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ pageNumber }) => `${pageNumber}` }), _jsx(Text, { children: tOf }), _jsx(Text, { style: { fontWeight: 'bold', color: colors.black }, render: ({ totalPages }) => `${totalPages}` })] })] }));
57
14
  };
58
15
  export default Footer;
16
+ //# sourceMappingURL=Footer.js.map
@@ -2,45 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Link, Text, View } from '@react-pdf/renderer';
3
3
  import FluxLogo from '../../components/FluxLogo.js';
4
4
  import { colors } from '../../theme/colors.js';
5
- var Header = function(param) {
6
- var tTitle = param.tTitle, userId = param.userId, subscriptionId = param.subscriptionId;
7
- return /*#__PURE__*/ _jsxs(View, {
8
- fixed: true,
9
- style: {
5
+ const Header = ({ tTitle, userId, subscriptionId }) => {
6
+ return (_jsxs(View, { fixed: true, style: {
10
7
  flexDirection: 'row',
11
8
  justifyContent: 'space-between',
12
9
  alignItems: 'center',
13
10
  paddingBottom: 40,
14
11
  // to not get pushed by the content
15
- minHeight: 69
16
- },
17
- children: [
18
- /*#__PURE__*/ _jsx(Link, {
19
- src: "https://driveflux.com",
20
- children: /*#__PURE__*/ _jsx(FluxLogo, {})
21
- }),
22
- /*#__PURE__*/ _jsxs(View, {
23
- style: {
24
- rowGap: 4,
25
- fontSize: 8,
26
- alignItems: 'flex-end'
27
- },
28
- children: [
29
- /*#__PURE__*/ _jsx(Text, {
30
- style: {
31
- fontWeight: 'bold'
32
- },
33
- children: tTitle
34
- }),
35
- /*#__PURE__*/ _jsx(Text, {
36
- style: {
37
- color: colors.primary2
38
- },
39
- children: "FLUX-".concat(userId, "-").concat(subscriptionId)
40
- })
41
- ]
42
- })
43
- ]
44
- });
12
+ minHeight: 69,
13
+ }, children: [_jsx(Link, { src: "https://driveflux.com", children: _jsx(FluxLogo, {}) }), _jsxs(View, { style: { rowGap: 4, fontSize: 8, alignItems: 'flex-end' }, children: [_jsx(Text, { style: { fontWeight: 'bold' }, children: tTitle }), _jsx(Text, { style: { color: colors.primary2 }, children: `FLUX-${userId}-${subscriptionId}` })] })] }));
45
14
  };
46
15
  export default Header;
16
+ //# sourceMappingURL=Header.js.map
@@ -1,29 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from '@react-pdf/renderer';
3
- var LabelValue = function(param) {
4
- var label = param.label, value = param.value;
5
- return /*#__PURE__*/ _jsxs(View, {
6
- style: {
7
- flexDirection: 'row'
8
- },
9
- children: [
10
- /*#__PURE__*/ _jsx(Text, {
11
- style: {
12
- minWidth: 120,
13
- textTransform: 'capitalize'
14
- },
15
- children: label
16
- }),
17
- /*#__PURE__*/ _jsx(Text, {
18
- children: ':'
19
- }),
20
- /*#__PURE__*/ _jsx(Text, {
21
- style: {
22
- paddingLeft: 16
23
- },
24
- children: value ? "".concat(value) : '-'
25
- })
26
- ]
27
- });
3
+ const LabelValue = ({ label, value }) => {
4
+ return (_jsxs(View, { style: { flexDirection: 'row' }, children: [_jsx(Text, { style: { minWidth: 120, textTransform: 'capitalize' }, children: label }), _jsx(Text, { children: ':' }), _jsx(Text, { style: { paddingLeft: 16 }, children: value ? `${value}` : '-' })] }));
28
5
  };
29
6
  export default LabelValue;
7
+ //# sourceMappingURL=LabelValue.js.map
@@ -3,31 +3,8 @@ import { View } from '@react-pdf/renderer';
3
3
  import StandardPage from '../../components/StandardPage.js';
4
4
  import Footer from './Footer.js';
5
5
  import Header from './Header.js';
6
- var SubscriptionAgreementPage = function(param) {
7
- var t = param.t, userId = param.userId, subscriptionId = param.subscriptionId, children = param.children;
8
- return /*#__PURE__*/ _jsxs(StandardPage, {
9
- style: {
10
- padding: 40,
11
- fontSize: 10
12
- },
13
- children: [
14
- /*#__PURE__*/ _jsx(Header, {
15
- tTitle: t.title,
16
- userId: userId,
17
- subscriptionId: subscriptionId
18
- }),
19
- /*#__PURE__*/ _jsx(View, {
20
- style: {
21
- flex: 1
22
- },
23
- children: children
24
- }),
25
- /*#__PURE__*/ _jsx(Footer, {
26
- tComputerGenerated: t.computerGenerated,
27
- tPage: t.page,
28
- tOf: t.of
29
- })
30
- ]
31
- });
6
+ const SubscriptionAgreementPage = ({ t, userId, subscriptionId, children, }) => {
7
+ return (_jsxs(StandardPage, { style: { padding: 40, fontSize: 10 }, children: [_jsx(Header, { tTitle: t.title, userId: userId, subscriptionId: subscriptionId }), _jsx(View, { style: { flex: 1 }, children: children }), _jsx(Footer, { tComputerGenerated: t.computerGenerated, tPage: t.page, tOf: t.of })] }));
32
8
  };
33
9
  export default SubscriptionAgreementPage;
10
+ //# sourceMappingURL=SubscriptionAgreementPage.js.map
@@ -1,101 +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
3
  import { renderMarkdown } from './utils.js';
29
- var TermsOfUse = function(param) {
30
- var termsOfUse = param.termsOfUse;
31
- var getTerms = function(items) {
32
- var indices = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
33
- return items.map(function(item, i) {
34
- var _item_items;
35
- var currentIndices = _to_consumable_array(indices).concat([
36
- i + 1
37
- ]);
38
- var indicesString = currentIndices.join('.');
39
- return /*#__PURE__*/ _jsxs(View, {
40
- style: {
41
- rowGap: 16
42
- },
43
- children: [
44
- item.content && /*#__PURE__*/ _jsxs(View, {
45
- style: {
46
- flexDirection: 'row',
47
- columnGap: 16
48
- },
49
- children: [
50
- /*#__PURE__*/ _jsx(Text, {
51
- style: {
52
- fontWeight: 'bold'
53
- },
54
- children: indicesString
55
- }),
56
- /*#__PURE__*/ _jsxs(Text, {
57
- style: {
58
- textAlign: 'justify',
59
- flex: 1
60
- },
61
- children: [
62
- renderMarkdown(item.content),
63
- ' '
64
- ]
65
- })
66
- ]
67
- }),
68
- ((_item_items = item.items) === null || _item_items === void 0 ? void 0 : _item_items.length) > 0 && /*#__PURE__*/ _jsx(View, {
69
- style: {
70
- paddingLeft: 16,
71
- rowGap: 16
72
- },
73
- children: getTerms(item.items, currentIndices)
74
- })
75
- ]
76
- }, indicesString);
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));
77
10
  });
78
11
  };
79
- return /*#__PURE__*/ _jsxs(View, {
80
- style: {
81
- rowGap: 16
82
- },
83
- children: [
84
- /*#__PURE__*/ _jsx(Text, {
85
- style: {
86
- fontWeight: 'bold',
87
- textTransform: 'uppercase'
88
- },
89
- children: 'Terms of Use'
90
- }),
91
- /*#__PURE__*/ _jsx(View, {
92
- style: {
93
- rowGap: 16,
94
- lineHeight: 1.4
95
- },
96
- children: getTerms(termsOfUse.items)
97
- })
98
- ]
99
- });
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) })] }));
100
13
  };
101
14
  export default TermsOfUse;
15
+ //# sourceMappingURL=TermsOfUse.js.map
@@ -1,103 +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
4
  import { renderMarkdown } from './utils.js';
30
- var TermsOfUseSubSection = function(param) {
31
- var indices = param.indices, subSection = param.subSection;
32
- var _useMemo = useMemo(function() {
33
- return {
34
- indicesString: indices.reduce(function(prev, curr, i) {
35
- return "".concat(prev).concat(curr).concat(i === indices.length - 1 ? '' : '.');
36
- }, ''),
37
- paddingLeft: Math.max(indices.length - 2, 0) * 16
38
- };
39
- }, [
40
- indices.length,
41
- indices.reduce
42
- ]), indicesString = _useMemo.indicesString, paddingLeft = _useMemo.paddingLeft;
43
- return typeof subSection === 'string' ? /*#__PURE__*/ _jsxs(View, {
44
- style: {
45
- flexDirection: 'row',
46
- paddingLeft: paddingLeft,
47
- columnGap: 16
48
- },
49
- children: [
50
- /*#__PURE__*/ _jsx(Text, {
51
- style: {
52
- fontWeight: 'bold'
53
- },
54
- children: indicesString
55
- }),
56
- /*#__PURE__*/ _jsx(Text, {
57
- style: {
58
- textAlign: 'justify',
59
- flex: 1
60
- },
61
- children: subSection
62
- })
63
- ]
64
- }, indicesString) : 'subSections' in subSection ? /*#__PURE__*/ _jsxs(View, {
65
- style: {
66
- gap: 16
67
- },
68
- children: [
69
- /*#__PURE__*/ _jsxs(View, {
70
- style: {
71
- flexDirection: 'row',
72
- paddingLeft: paddingLeft,
73
- columnGap: 16
74
- },
75
- children: [
76
- /*#__PURE__*/ _jsx(Text, {
77
- style: {
78
- fontWeight: 'bold'
79
- },
80
- children: indicesString
81
- }),
82
- /*#__PURE__*/ _jsx(Text, {
83
- style: {
84
- textAlign: 'justify',
85
- flex: 1
86
- },
87
- children: typeof subSection === 'string' ? renderMarkdown(subSection) : renderMarkdown(subSection.paragraph)
88
- })
89
- ]
90
- }, indicesString),
91
- subSection.subSections.map(function(subSection, i) {
92
- return /*#__PURE__*/ _jsx(TermsOfUseSubSection, {
93
- indices: _to_consumable_array(indices).concat([
94
- i + 1
95
- ]),
96
- subSection: subSection
97
- }, "".// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
98
- concat(indices, ".").concat(i));
99
- })
100
- ]
101
- }, indicesString) : null;
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;
102
15
  };
103
16
  export default TermsOfUseSubSection;
17
+ //# sourceMappingURL=TermsOfUseSubSection.js.map