@legalplace/prerenderx 3.3.1 → 3.3.2-staging.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.
|
@@ -57,8 +57,13 @@ var parseOutputWithVariables = function (output, index, variables, autonums) {
|
|
|
57
57
|
parsedOutput = parsedOutput.replace(/\[\[PAGE_BREAK\]\]/gi, '<div style="page-break-after:always"></div>');
|
|
58
58
|
parsedOutput = parsedOutput.replace(/\[(E|B)_BLUR\]/gi, "");
|
|
59
59
|
parsedOutput = parsedOutput.replace(/\[signature:([0-9]+)\]/g, function (v, signatureId) {
|
|
60
|
-
return "<span data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\"></span>";
|
|
60
|
+
return "<span data-signature=\"signature\" data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\"></span>";
|
|
61
61
|
});
|
|
62
|
+
parsedOutput = parsedOutput.replace(/\[signature:date\]/g, function () { return '<span data-signature="date"></span>'; });
|
|
63
|
+
parsedOutput = parsedOutput.replace(/\[signature:date:([0-9]+)\]/g, function (v, signatureId) {
|
|
64
|
+
return "<span data-signature=\"date\" data-signature-id=\"" + signatureId + "\" data-signer-index=\"" + index + "\"></span>";
|
|
65
|
+
});
|
|
66
|
+
parsedOutput = parsedOutput.replace(/\[date\]/g, function () { return '<span date-signature="date"></span>'; });
|
|
62
67
|
autonums.forEach(function (currentAn) {
|
|
63
68
|
if (currentAn[3] === null)
|
|
64
69
|
parsedOutput = parsedOutput.replace("[" + currentAn[0] + ":" + currentAn[1] + "]", "<span class=\"" + currentAn[0] + "\">" + currentAn[2] + "</span>");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/prerenderx",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2-staging.0",
|
|
4
4
|
"description": "PrerenderX",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://git.legalplace.eu/legalplace/prerenderx",
|
|
@@ -30,13 +30,12 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.7.2",
|
|
32
32
|
"@babel/preset-typescript": "^7.7.2",
|
|
33
|
-
"@legalplace/types": "
|
|
33
|
+
"@legalplace/types": "2.1.2-staging.0",
|
|
34
34
|
"@types/jest": "^24.0.15",
|
|
35
35
|
"@types/node": "^20.8.10",
|
|
36
36
|
"jest": "^24.8.0",
|
|
37
37
|
"redux-mock-store": "^1.5.3",
|
|
38
38
|
"ts-jest": "^24.0.2"
|
|
39
39
|
},
|
|
40
|
-
"prettier": "@legalplace/prettier-config"
|
|
41
|
-
"gitHead": "095bb47bf79e380b4a909dbb702b70f4c7485528"
|
|
40
|
+
"prettier": "@legalplace/prettier-config"
|
|
42
41
|
}
|
package/src/libs/OutputParser.ts
CHANGED
|
@@ -129,7 +129,24 @@ export const parseOutputWithVariables: parseOutputT = (
|
|
|
129
129
|
parsedOutput = parsedOutput.replace(
|
|
130
130
|
/\[signature:([0-9]+)\]/g,
|
|
131
131
|
(v, signatureId) =>
|
|
132
|
-
`<span data-signature-id="${signatureId}" data-signer-index="${index}"></span>`
|
|
132
|
+
`<span data-signature="signature" data-signature-id="${signatureId}" data-signer-index="${index}"></span>`
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// Signature date tag
|
|
136
|
+
parsedOutput = parsedOutput.replace(
|
|
137
|
+
/\[signature:date\]/g,
|
|
138
|
+
() => '<span data-signature="date"></span>'
|
|
139
|
+
);
|
|
140
|
+
parsedOutput = parsedOutput.replace(
|
|
141
|
+
/\[signature:date:([0-9]+)\]/g,
|
|
142
|
+
(v, signatureId) =>
|
|
143
|
+
`<span data-signature="date" data-signature-id="${signatureId}" data-signer-index="${index}"></span>`
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
// Obsolete signature date tag
|
|
147
|
+
parsedOutput = parsedOutput.replace(
|
|
148
|
+
/\[date\]/g,
|
|
149
|
+
() => '<span date-signature="date"></span>'
|
|
133
150
|
);
|
|
134
151
|
|
|
135
152
|
// Inserting autonums
|