@driveflux/pdf 1.6.67 → 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/CoverPage.js +93 -10
- package/dist/templates/SubscriptionAgreement/Details.js +129 -51
- 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/index.js +254 -16
- package/dist/templates/SubscriptionAgreement/translations.js +195 -194
- package/dist/templates/SubscriptionAgreement/types.js +1 -2
- 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
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export { };
|
|
@@ -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,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": {
|
|
@@ -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",
|