@legalplace/prerenderx 2.3.49 → 2.3.51

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.
@@ -9,6 +9,7 @@ declare type DocumentOutputIndex = {
9
9
  };
10
10
  declare type DocumentPdfFormIndex = {
11
11
  name: string;
12
+ slug: string;
12
13
  form: boolean;
13
14
  fdf: {
14
15
  id: string;
@@ -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: documentName,
51
+ name: document.name,
52
+ slug: documentName,
52
53
  form: true,
53
54
  fdf: {
54
55
  id: '',
@@ -82,10 +83,10 @@ var Prerender = (function () {
82
83
  Object.keys(this.documentsIndex).forEach(function (documentNameHash) {
83
84
  var index = _this.documentsIndex[documentNameHash];
84
85
  if (Prerender.isPdfForm(index)) {
85
- _this.renderedDocuments[documentNameHash] = _this.pdfFiller.fillDocument(_this.documentsIndex[documentNameHash].name);
86
+ _this.renderedDocuments[documentNameHash] = _this.pdfFiller.fillDocument(_this.documentsIndex[documentNameHash].slug);
86
87
  }
87
88
  else {
88
- _this.renderedDocuments[documentNameHash] = _this.documentRender.renderDocument(_this.documentsIndex[documentNameHash].name);
89
+ _this.renderedDocuments[documentNameHash] = _this.documentRender.renderDocument(_this.documentsIndex[documentNameHash].slug);
89
90
  }
90
91
  });
91
92
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/prerenderx",
3
- "version": "2.3.49",
3
+ "version": "2.3.51",
4
4
  "description": "PrerenderX",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://git.legalplace.eu/legalplace/prerenderx",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@legalplace/lplogic": "^2.1.4",
18
18
  "@legalplace/models-v3-types": "^3.4.47",
19
- "@legalplace/referencesparser": "^1.4.1",
19
+ "@legalplace/referencesparser": "^1.4.11",
20
20
  "crypto": "^1.0.1",
21
21
  "typescript": "3.9.3"
22
22
  },
@@ -17,6 +17,7 @@ type DocumentOutputIndex = {
17
17
  }
18
18
  type DocumentPdfFormIndex = {
19
19
  name: string
20
+ slug: string
20
21
  form: boolean
21
22
  fdf: {
22
23
  id: string
@@ -106,7 +107,8 @@ class Prerender {
106
107
  // Referencing in index
107
108
  if (typeof document.pdf === 'object' && typeof document.pdf.id === 'string' && typeof document.pdf.form === 'object') {
108
109
  this.documentsIndex[hash] = {
109
- name: documentName,
110
+ name: document.name,
111
+ slug: documentName,
110
112
  form: true,
111
113
  fdf: {
112
114
  id: '',
@@ -139,9 +141,9 @@ class Prerender {
139
141
  Object.keys(this.documentsIndex).forEach(documentNameHash => {
140
142
  const index = this.documentsIndex[documentNameHash]
141
143
  if (Prerender.isPdfForm(index)) {
142
- this.renderedDocuments[documentNameHash] = this.pdfFiller.fillDocument(this.documentsIndex[documentNameHash].name)
144
+ this.renderedDocuments[documentNameHash] = this.pdfFiller.fillDocument(this.documentsIndex[documentNameHash].slug)
143
145
  } else {
144
- this.renderedDocuments[documentNameHash] = this.documentRender.renderDocument(this.documentsIndex[documentNameHash].name)
146
+ this.renderedDocuments[documentNameHash] = this.documentRender.renderDocument(this.documentsIndex[documentNameHash].slug)
145
147
  }
146
148
  })
147
149
  }