@legalplace/prerenderx 2.3.50 → 2.3.52
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/libs/Prerender.d.ts
CHANGED
package/dist/libs/Prerender.js
CHANGED
|
@@ -36,7 +36,7 @@ var Prerender = (function () {
|
|
|
36
36
|
Prerender.prototype.generateDocumentNamesHash = function () {
|
|
37
37
|
var _this = this;
|
|
38
38
|
Object.keys(this.model.documents).forEach(function (documentName) {
|
|
39
|
-
var _a, _b;
|
|
39
|
+
var _a, _b, _c;
|
|
40
40
|
var document = _this.model.documents[documentName];
|
|
41
41
|
var documentParams = _this.model.documents[documentName].params;
|
|
42
42
|
var conditionObject = _this.references.conditions.documents[documentName];
|
|
@@ -48,7 +48,8 @@ var Prerender = (function () {
|
|
|
48
48
|
.digest('hex');
|
|
49
49
|
if (typeof document.pdf === 'object' && typeof document.pdf.id === 'string' && typeof document.pdf.form === 'object') {
|
|
50
50
|
_this.documentsIndex[hash] = {
|
|
51
|
-
name:
|
|
51
|
+
name: document.name,
|
|
52
|
+
slug: documentName,
|
|
52
53
|
form: true,
|
|
53
54
|
fdf: {
|
|
54
55
|
id: '',
|
|
@@ -62,7 +63,8 @@ var Prerender = (function () {
|
|
|
62
63
|
name: document.name,
|
|
63
64
|
slug: documentName,
|
|
64
65
|
pdf: ((_a = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _a === void 0 ? void 0 : _a.pdf) === undefined ? true : documentParams.formats.pdf,
|
|
65
|
-
docx: ((_b = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _b === void 0 ? void 0 : _b.docx) === undefined ? true : documentParams.formats.docx
|
|
66
|
+
docx: ((_b = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _b === void 0 ? void 0 : _b.docx) === undefined ? true : documentParams.formats.docx,
|
|
67
|
+
displayed: ((_c = documentParams === null || documentParams === void 0 ? void 0 : documentParams.visibility) === null || _c === void 0 ? void 0 : _c.displayBo) === true ? true : false
|
|
66
68
|
};
|
|
67
69
|
}
|
|
68
70
|
}
|
|
@@ -82,10 +84,10 @@ var Prerender = (function () {
|
|
|
82
84
|
Object.keys(this.documentsIndex).forEach(function (documentNameHash) {
|
|
83
85
|
var index = _this.documentsIndex[documentNameHash];
|
|
84
86
|
if (Prerender.isPdfForm(index)) {
|
|
85
|
-
_this.renderedDocuments[documentNameHash] = _this.pdfFiller.fillDocument(_this.documentsIndex[documentNameHash].
|
|
87
|
+
_this.renderedDocuments[documentNameHash] = _this.pdfFiller.fillDocument(_this.documentsIndex[documentNameHash].slug);
|
|
86
88
|
}
|
|
87
89
|
else {
|
|
88
|
-
_this.renderedDocuments[documentNameHash] = _this.documentRender.renderDocument(_this.documentsIndex[documentNameHash].
|
|
90
|
+
_this.renderedDocuments[documentNameHash] = _this.documentRender.renderDocument(_this.documentsIndex[documentNameHash].slug);
|
|
89
91
|
}
|
|
90
92
|
});
|
|
91
93
|
};
|
package/package.json
CHANGED
package/src/libs/Prerender.ts
CHANGED
|
@@ -14,9 +14,11 @@ type DocumentOutputIndex = {
|
|
|
14
14
|
slug: string
|
|
15
15
|
pdf: boolean
|
|
16
16
|
docx: boolean
|
|
17
|
+
displayed: boolean
|
|
17
18
|
}
|
|
18
19
|
type DocumentPdfFormIndex = {
|
|
19
20
|
name: string
|
|
21
|
+
slug: string
|
|
20
22
|
form: boolean
|
|
21
23
|
fdf: {
|
|
22
24
|
id: string
|
|
@@ -106,7 +108,8 @@ class Prerender {
|
|
|
106
108
|
// Referencing in index
|
|
107
109
|
if (typeof document.pdf === 'object' && typeof document.pdf.id === 'string' && typeof document.pdf.form === 'object') {
|
|
108
110
|
this.documentsIndex[hash] = {
|
|
109
|
-
name:
|
|
111
|
+
name: document.name,
|
|
112
|
+
slug: documentName,
|
|
110
113
|
form: true,
|
|
111
114
|
fdf: {
|
|
112
115
|
id: '',
|
|
@@ -119,7 +122,8 @@ class Prerender {
|
|
|
119
122
|
name: document.name,
|
|
120
123
|
slug: documentName,
|
|
121
124
|
pdf: documentParams?.formats?.pdf === undefined ? true : documentParams.formats.pdf,
|
|
122
|
-
docx: documentParams?.formats?.docx === undefined ? true : documentParams.formats.docx
|
|
125
|
+
docx: documentParams?.formats?.docx === undefined ? true : documentParams.formats.docx,
|
|
126
|
+
displayed: documentParams?.visibility?.displayBo === true ? true : false
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
}
|
|
@@ -139,9 +143,9 @@ class Prerender {
|
|
|
139
143
|
Object.keys(this.documentsIndex).forEach(documentNameHash => {
|
|
140
144
|
const index = this.documentsIndex[documentNameHash]
|
|
141
145
|
if (Prerender.isPdfForm(index)) {
|
|
142
|
-
this.renderedDocuments[documentNameHash] = this.pdfFiller.fillDocument(this.documentsIndex[documentNameHash].
|
|
146
|
+
this.renderedDocuments[documentNameHash] = this.pdfFiller.fillDocument(this.documentsIndex[documentNameHash].slug)
|
|
143
147
|
} else {
|
|
144
|
-
this.renderedDocuments[documentNameHash] = this.documentRender.renderDocument(this.documentsIndex[documentNameHash].
|
|
148
|
+
this.renderedDocuments[documentNameHash] = this.documentRender.renderDocument(this.documentsIndex[documentNameHash].slug)
|
|
145
149
|
}
|
|
146
150
|
})
|
|
147
151
|
}
|