@legalplace/prerenderx 3.2.0 → 3.2.1
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/CHANGELOG.md +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -0
- package/dist/libs/Prerender.d.ts +1 -19
- package/dist/libs/Prerender.js +2 -2
- package/dist/types/types.d.ts +17 -0
- package/dist/types/types.js +2 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/libs/Prerender.ts +3 -25
- package/src/types/types.ts +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.2.1](https://git.legalplace.eu/legalplace/prerenderx/compare/v3.2.0...v3.2.1) (2022-12-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* enabling pdf/docx when model value is null api[#7032](https://git.legalplace.eu/legalplace/prerenderx/issues/7032) ([12c6983](https://git.legalplace.eu/legalplace/prerenderx/commit/12c698324add0c0723aea21a2b8db6b309c59336))
|
|
11
|
+
|
|
5
12
|
## [3.2.0](https://git.legalplace.eu/legalplace/prerenderx/compare/v3.1.0...v3.2.0) (2022-04-04)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
14
|
};
|
|
5
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
16
|
var Prerender_1 = __importDefault(require("./libs/Prerender"));
|
|
17
|
+
__exportStar(require("./types/types"), exports);
|
|
7
18
|
exports.default = Prerender_1.default;
|
package/dist/libs/Prerender.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import { ModelV3 } from '@legalplace/models-v3-types';
|
|
2
2
|
import OvcType from '@legalplace/types/dist/ovc';
|
|
3
3
|
import InputsType from '@legalplace/types/dist/inputs';
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
slug: string;
|
|
7
|
-
pdf: boolean;
|
|
8
|
-
docx: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare type DocumentPdfFormIndex = {
|
|
11
|
-
name: string;
|
|
12
|
-
slug: string;
|
|
13
|
-
form: boolean;
|
|
14
|
-
fdf: {
|
|
15
|
-
id: string;
|
|
16
|
-
fields: Record<string, string>;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
declare type FDFType = {
|
|
20
|
-
id: string;
|
|
21
|
-
fields: Record<string, string>;
|
|
22
|
-
};
|
|
4
|
+
import type { FDFType, DocumentOutputIndex, DocumentPdfFormIndex } from "../types/types";
|
|
23
5
|
declare class Prerender {
|
|
24
6
|
private model;
|
|
25
7
|
private references;
|
package/dist/libs/Prerender.js
CHANGED
|
@@ -70,8 +70,8 @@ var Prerender = (function () {
|
|
|
70
70
|
_this.documentsIndex[hash] = {
|
|
71
71
|
name: OutputParser_1.parseDocumentNameWithVariables(document.name, _this.ovc, _this.references, document.fallbackName),
|
|
72
72
|
slug: slug,
|
|
73
|
-
pdf: ((_a = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _a === void 0 ? void 0 : _a.pdf)
|
|
74
|
-
docx: ((_b = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _b === void 0 ? void 0 : _b.docx)
|
|
73
|
+
pdf: ((_a = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _a === void 0 ? void 0 : _a.pdf) !== false,
|
|
74
|
+
docx: ((_b = documentParams === null || documentParams === void 0 ? void 0 : documentParams.formats) === null || _b === void 0 ? void 0 : _b.docx) !== false
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare type DocumentOutputIndex = {
|
|
2
|
+
name: string;
|
|
3
|
+
slug: string;
|
|
4
|
+
pdf: boolean;
|
|
5
|
+
docx: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type DocumentPdfFormIndex = {
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
form: boolean;
|
|
11
|
+
fdf: FDFType;
|
|
12
|
+
};
|
|
13
|
+
export declare type DocumentIndex = Record<string, DocumentOutputIndex | DocumentPdfFormIndex>;
|
|
14
|
+
export declare type FDFType = {
|
|
15
|
+
id: string;
|
|
16
|
+
fields: Record<string, string>;
|
|
17
|
+
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/libs/Prerender.ts
CHANGED
|
@@ -10,29 +10,7 @@ import NumAuto from './NumAuto'
|
|
|
10
10
|
import IntputsInitiator from './InputsInitiator'
|
|
11
11
|
import FillPdfForm from './FillPdfForm'
|
|
12
12
|
import { parseDocumentNameWithVariables } from './OutputParser'
|
|
13
|
-
|
|
14
|
-
type DocumentOutputIndex = {
|
|
15
|
-
name: string
|
|
16
|
-
slug: string
|
|
17
|
-
pdf: boolean
|
|
18
|
-
docx: boolean
|
|
19
|
-
}
|
|
20
|
-
type DocumentPdfFormIndex = {
|
|
21
|
-
name: string
|
|
22
|
-
slug: string
|
|
23
|
-
form: boolean
|
|
24
|
-
fdf: {
|
|
25
|
-
id: string
|
|
26
|
-
fields: Record<string, string>
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
type DocumentIndex = Record<string, DocumentOutputIndex | DocumentPdfFormIndex>
|
|
31
|
-
|
|
32
|
-
type FDFType = {
|
|
33
|
-
id: string
|
|
34
|
-
fields: Record<string, string>
|
|
35
|
-
}
|
|
13
|
+
import type { FDFType, DocumentIndex, DocumentOutputIndex, DocumentPdfFormIndex } from "../types/types"
|
|
36
14
|
|
|
37
15
|
class Prerender {
|
|
38
16
|
private model: ModelV3
|
|
@@ -131,8 +109,8 @@ class Prerender {
|
|
|
131
109
|
this.documentsIndex[hash] = {
|
|
132
110
|
name: parseDocumentNameWithVariables(document.name, this.ovc, this.references, document.fallbackName),
|
|
133
111
|
slug,
|
|
134
|
-
pdf: documentParams?.formats?.pdf
|
|
135
|
-
docx: documentParams?.formats?.docx
|
|
112
|
+
pdf: documentParams?.formats?.pdf !== false,
|
|
113
|
+
docx: documentParams?.formats?.docx !== false
|
|
136
114
|
}
|
|
137
115
|
}
|
|
138
116
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type DocumentOutputIndex = {
|
|
2
|
+
name: string
|
|
3
|
+
slug: string
|
|
4
|
+
pdf: boolean
|
|
5
|
+
docx: boolean
|
|
6
|
+
}
|
|
7
|
+
export type DocumentPdfFormIndex = {
|
|
8
|
+
name: string
|
|
9
|
+
slug: string
|
|
10
|
+
form: boolean
|
|
11
|
+
fdf: FDFType
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type DocumentIndex = Record<string, DocumentOutputIndex | DocumentPdfFormIndex>
|
|
15
|
+
|
|
16
|
+
export type FDFType = {
|
|
17
|
+
id: string
|
|
18
|
+
fields: Record<string, string>
|
|
19
|
+
}
|