@things-factory/pdf 10.1.131 → 10.1.141
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-client/pages/pdf-template/pdf-template-editor.d.ts +38 -0
- package/dist-client/pages/pdf-template/pdf-template-editor.js +198 -0
- package/dist-client/pages/pdf-template/pdf-template-editor.js.map +1 -0
- package/dist-client/pages/pdf-template/pdf-template-list-page.js +4 -3
- package/dist-client/pages/pdf-template/pdf-template-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controller/pdf-release-service.d.ts +11 -0
- package/dist-server/controller/pdf-release-service.js +23 -0
- package/dist-server/controller/pdf-release-service.js.map +1 -0
- package/dist-server/index.d.ts +3 -0
- package/dist-server/index.js +8 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/pdf-generate/pdf-generate-resolver.js +2 -12
- package/dist-server/service/pdf-generate/pdf-generate-resolver.js.map +1 -1
- package/dist-server/service/pdf-template/pdf-template-type.d.ts +1 -0
- package/dist-server/service/pdf-template/pdf-template-type.js +4 -0
- package/dist-server/service/pdf-template/pdf-template-type.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/things-factory.config.js +5 -1
- package/translations/en.json +11 -8
- package/translations/ko.json +10 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PDFRelease } from '../service/pdf-release/pdf-release';
|
|
2
|
+
import { PDFTemplate } from '../service/pdf-template/pdf-template';
|
|
3
|
+
/**
|
|
4
|
+
* Print a template with data and keep it — a PDFRelease whose file is an attachment of it. For a module that prints
|
|
5
|
+
* its own documents (a certificate, a quotation) inside its own resolver: it holds the transaction and the
|
|
6
|
+
* privilege; this needs `context.state` (domain, user, tx).
|
|
7
|
+
*/
|
|
8
|
+
export declare function releasePdf(context: ResolverContext, template: PDFTemplate, data: any, name?: string): Promise<{
|
|
9
|
+
release: PDFRelease;
|
|
10
|
+
contents: Buffer;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.releasePdf = releasePdf;
|
|
4
|
+
const stream_1 = require("stream");
|
|
5
|
+
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
6
|
+
const pdf_release_1 = require("../service/pdf-release/pdf-release");
|
|
7
|
+
const pdf_service_1 = require("./pdf-service");
|
|
8
|
+
const service = new pdf_service_1.PdfService();
|
|
9
|
+
/** A generated PDF handed to the attachment store as an upload would be. */
|
|
10
|
+
const upload = (filename, contents) => Promise.resolve({ filename, mimetype: 'application/pdf', encoding: '7bit', createReadStream: () => stream_1.Readable.from([contents]) });
|
|
11
|
+
/**
|
|
12
|
+
* Print a template with data and keep it — a PDFRelease whose file is an attachment of it. For a module that prints
|
|
13
|
+
* its own documents (a certificate, a quotation) inside its own resolver: it holds the transaction and the
|
|
14
|
+
* privilege; this needs `context.state` (domain, user, tx).
|
|
15
|
+
*/
|
|
16
|
+
async function releasePdf(context, template, data, name = `${template.name}-${Date.now()}`) {
|
|
17
|
+
const { domain, user, tx } = context.state;
|
|
18
|
+
const contents = await service.generatePdf(template, data);
|
|
19
|
+
const release = await tx.getRepository(pdf_release_1.PDFRelease).save({ domain, name, template, state: pdf_release_1.PDFReleaseStatus.published, creator: user, updater: user });
|
|
20
|
+
await (0, attachment_base_1.createAttachment)(null, { attachment: { file: upload(`${name}.pdf`, contents), refType: 'PDFRelease', refBy: release.id, category: 'document' } }, context);
|
|
21
|
+
return { release, contents };
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=pdf-release-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-release-service.js","sourceRoot":"","sources":["../../server/controller/pdf-release-service.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,CAAA;IAChK,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;AAC9B,CAAC","sourcesContent":["import { Readable } from 'stream'\n\nimport { createAttachment } from '@things-factory/attachment-base'\n\nimport { PDFRelease, PDFReleaseStatus } from '../service/pdf-release/pdf-release'\nimport { PDFTemplate } from '../service/pdf-template/pdf-template'\nimport { PdfService } from './pdf-service'\n\nconst service = new PdfService()\n\n/** A generated PDF handed to the attachment store as an upload would be. */\nconst upload = (filename: string, contents: Buffer) =>\n Promise.resolve({ filename, mimetype: 'application/pdf', encoding: '7bit', createReadStream: () => Readable.from([contents]) })\n\n/**\n * Print a template with data and keep it — a PDFRelease whose file is an attachment of it. For a module that prints\n * its own documents (a certificate, a quotation) inside its own resolver: it holds the transaction and the\n * privilege; this needs `context.state` (domain, user, tx).\n */\nexport async function releasePdf(context: ResolverContext, template: PDFTemplate, data: any, name = `${template.name}-${Date.now()}`): Promise<{ release: PDFRelease; contents: Buffer }> {\n const { domain, user, tx } = context.state\n const contents = await service.generatePdf(template, data)\n const release = await tx.getRepository(PDFRelease).save({ domain, name, template, state: PDFReleaseStatus.published, creator: user, updater: user })\n await createAttachment(null, { attachment: { file: upload(`${name}.pdf`, contents), refType: 'PDFRelease', refBy: release.id, category: 'document' } }, context)\n return { release, contents }\n}\n"]}
|
package/dist-server/index.d.ts
CHANGED
package/dist-server/index.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.releasePdf = exports.PdfService = exports.PAGE_SIZES = exports.composePdfDocument = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./service"), exports);
|
|
6
|
+
var pdf_document_1 = require("./controller/pdf-document");
|
|
7
|
+
Object.defineProperty(exports, "composePdfDocument", { enumerable: true, get: function () { return pdf_document_1.composePdfDocument; } });
|
|
8
|
+
Object.defineProperty(exports, "PAGE_SIZES", { enumerable: true, get: function () { return pdf_document_1.PAGE_SIZES; } });
|
|
9
|
+
var pdf_service_1 = require("./controller/pdf-service");
|
|
10
|
+
Object.defineProperty(exports, "PdfService", { enumerable: true, get: function () { return pdf_service_1.PdfService; } });
|
|
11
|
+
var pdf_release_service_1 = require("./controller/pdf-release-service");
|
|
12
|
+
Object.defineProperty(exports, "releasePdf", { enumerable: true, get: function () { return pdf_release_service_1.releasePdf; } });
|
|
5
13
|
//# sourceMappingURL=index.js.map
|
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;AAAA,oDAAyB;AACzB,0DAA0E;AAAjE,kHAAA,kBAAkB,OAAA;AAAE,0GAAA,UAAU,OAAA;AACvC,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,wEAA6D;AAApD,iHAAA,UAAU,OAAA","sourcesContent":["export * from './service'\nexport { composePdfDocument, PAGE_SIZES } from './controller/pdf-document'\nexport { PdfService } from './controller/pdf-service'\nexport { releasePdf } from './controller/pdf-release-service'\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './pdf-release/pdf-release';
|
|
2
2
|
export * from './pdf-template/pdf-template';
|
|
3
|
-
export declare const entities: (typeof import("./pdf-
|
|
3
|
+
export declare const entities: (typeof import("./pdf-release/pdf-release").PDFRelease | typeof import("./pdf-template/pdf-template").PDFTemplate)[];
|
|
4
4
|
export declare const subscribers: any[];
|
|
5
5
|
export declare const schema: {
|
|
6
|
-
resolverClasses: (typeof import("./pdf-
|
|
6
|
+
resolverClasses: (typeof import("./pdf-template/pdf-template-query").PDFTemplateQuery | typeof import("./pdf-generate/pdf-generate-resolver").PDFGenerateResolver | typeof import("./pdf-release/pdf-release-query").PDFReleaseQuery | typeof import("./pdf-release/pdf-release-mutation").PDFReleaseMutation | typeof import("./pdf-template/pdf-template-mutation").PDFTemplateMutation)[];
|
|
7
7
|
};
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDFGenerateResolver = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const stream_1 = require("stream");
|
|
6
5
|
const type_graphql_1 = require("type-graphql");
|
|
7
|
-
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
8
6
|
const shell_1 = require("@things-factory/shell");
|
|
9
7
|
const pdf_service_1 = require("../../controller/pdf-service");
|
|
8
|
+
const pdf_release_service_1 = require("../../controller/pdf-release-service");
|
|
10
9
|
const pdf_release_1 = require("../pdf-release/pdf-release");
|
|
11
10
|
const pdf_template_1 = require("../pdf-template/pdf-template");
|
|
12
|
-
/** A generated PDF handed to the attachment store as an upload would be. */
|
|
13
|
-
const upload = (filename, contents) => Promise.resolve({ filename, mimetype: 'application/pdf', encoding: '7bit', createReadStream: () => stream_1.Readable.from([contents]) });
|
|
14
11
|
let PDFGenerateResolver = class PDFGenerateResolver {
|
|
15
12
|
constructor() {
|
|
16
13
|
this.pdfService = new pdf_service_1.PdfService();
|
|
@@ -26,14 +23,7 @@ let PDFGenerateResolver = class PDFGenerateResolver {
|
|
|
26
23
|
return (await this.pdfService.generatePdf(await this.templateOf(context, templateId), data)).toString('base64');
|
|
27
24
|
}
|
|
28
25
|
async generatePDF(templateId, data, context) {
|
|
29
|
-
|
|
30
|
-
const template = await this.templateOf(context, templateId);
|
|
31
|
-
const repository = tx.getRepository(pdf_release_1.PDFRelease);
|
|
32
|
-
const name = `${template.name}-${Date.now()}`;
|
|
33
|
-
const contents = await this.pdfService.generatePdf(template, data);
|
|
34
|
-
const release = await repository.save({ domain, name, template, state: pdf_release_1.PDFReleaseStatus.published, creator: user, updater: user });
|
|
35
|
-
await (0, attachment_base_1.createAttachment)(null, { attachment: { file: upload(`${name}.pdf`, contents), refType: 'PDFRelease', refBy: release.id, category: 'document' } }, context);
|
|
36
|
-
return release;
|
|
26
|
+
return (await (0, pdf_release_service_1.releasePdf)(context, await this.templateOf(context, templateId), data)).release;
|
|
37
27
|
}
|
|
38
28
|
};
|
|
39
29
|
exports.PDFGenerateResolver = PDFGenerateResolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-generate-resolver.js","sourceRoot":"","sources":["../../../server/service/pdf-generate/pdf-generate-resolver.ts"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"pdf-generate-resolver.js","sourceRoot":"","sources":["../../../server/service/pdf-generate/pdf-generate-resolver.ts"],"names":[],"mappings":";;;;AAAA,+CAA6E;AAE7E,iDAAoD;AAEpD,8DAAyD;AACzD,8EAAiE;AACjE,4DAAuD;AACvD,+DAA0D;AAGnD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAAzB;QACG,eAAU,GAAG,IAAI,wBAAU,EAAE,CAAA;IAsBvC,CAAC;IApBS,KAAK,CAAC,UAAU,CAAC,OAAwB,EAAE,UAAkB;QACnE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QACpC,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,0BAAW,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QACtH,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;QACzE,OAAO,QAAQ,CAAA;IACjB,CAAC;IAKK,AAAN,KAAK,CAAC,SAAS,CAAoB,UAAkB,EAAyD,IAAS,EAAS,OAAwB;QACtJ,OAAO,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,W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IAD/B,IAAA,uBAAQ,GAAE;GACE,mBAAmB,CAuB/B","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Query, Resolver } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\n\nimport { PdfService } from '../../controller/pdf-service'\nimport { releasePdf } from '../../controller/pdf-release-service'\nimport { PDFRelease } from '../pdf-release/pdf-release'\nimport { PDFTemplate } from '../pdf-template/pdf-template'\n\n@Resolver()\nexport class PDFGenerateResolver {\n private pdfService = new PdfService()\n\n private async templateOf(context: ResolverContext, templateId: string): Promise<PDFTemplate> {\n const { domain, tx } = context.state\n const template = await tx.getRepository(PDFTemplate).findOne({ where: { id: templateId, domain: { id: domain.id } } })\n if (!template) throw new Error(context.t('error.pdf-template-not-found'))\n return template\n }\n\n @Directive('@privilege(category: \"pdf\", privilege: \"query\", domainOwnerGranted: true)')\n @Directive('@transaction')\n @Query(() => String, { description: 'To print a template with data to a PDF without keeping it — base64, for a preview' })\n async renderPDF(@Arg('templateId') templateId: string, @Arg('data', type => ScalarObject, { nullable: true }) data: any, @Ctx() context: ResolverContext): Promise<string> {\n return (await this.pdfService.generatePdf(await this.templateOf(context, templateId), data)).toString('base64')\n }\n\n @Directive('@privilege(category: \"pdf\", privilege: \"mutation\", domainOwnerGranted: true)')\n @Directive('@transaction')\n @Mutation(() => PDFRelease, { description: 'To print a template with data to a PDF and keep it as a release — its file is an attachment of the release' })\n async generatePDF(@Arg('templateId') templateId: string, @Arg('data', type => ScalarObject, { nullable: true }) data: any, @Ctx() context: ResolverContext): Promise<PDFRelease> {\n return (await releasePdf(context, await this.templateOf(context, templateId), data)).release\n }\n}\n"]}
|
|
@@ -101,6 +101,10 @@ tslib_1.__decorate([
|
|
|
101
101
|
(0, type_graphql_1.Field)({ nullable: true, defaultValue: 'A4' }),
|
|
102
102
|
tslib_1.__metadata("design:type", String)
|
|
103
103
|
], PDFTemplatePatch.prototype, "page_size", void 0);
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
106
|
+
tslib_1.__metadata("design:type", String)
|
|
107
|
+
], PDFTemplatePatch.prototype, "watermark", void 0);
|
|
104
108
|
tslib_1.__decorate([
|
|
105
109
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
106
110
|
tslib_1.__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-template-type.js","sourceRoot":"","sources":["../../../server/service/pdf-template/pdf-template-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAA+D;AAGxD,IAAM,cAAc,GAApB,MAAM,cAAc;CAiC1B,CAAA;AAjCY,wCAAc;AAEzB;IADC,IAAA,oBAAK,GAAE;;4CACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gCAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC5B;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACD;AAGzB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACF;AAGxB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACF;AAGxB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACH;AAGvB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACJ;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;;iDAC7B;AAGjB;IADC,IAAA,oBA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B,IAAA,wBAAS,GAAE;GACC,gBAAgB,CAuC5B;AAGM,IAAM,eAAe,GAArB,MAAM,eAAe;CAM3B,CAAA;AANY,0CAAe;AAE1B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,0BAAW,CAAC,CAAC;;8CACT;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;8CACN;0BALF,eAAe;IAD3B,IAAA,yBAAU,GAAE;GACA,eAAe,CAM3B","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\n\nimport { PDFTemplate, PDFTemplateStatus } from './pdf-template'\n\n@InputType()\nexport class NewPDFTemplate {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => PDFTemplateStatus, { nullable: true })\n state?: PDFTemplateStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n content_template?: string\n\n @Field({ nullable: true })\n header_template?: string\n\n @Field({ nullable: true })\n footer_template?: string\n\n @Field({ nullable: true })\n cover_template?: string\n\n @Field({ nullable: true })\n last_template?: string\n\n @Field({ nullable: true, defaultValue: 'A4' })\n page_size: string\n\n @Field({ nullable: true })\n watermark: string\n}\n\n@InputType()\nexport class PDFTemplatePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => PDFTemplateStatus, { nullable: true })\n state?: PDFTemplateStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n content_template?: string\n\n @Field({ nullable: true })\n header_template?: string\n\n @Field({ nullable: true })\n footer_template?: string\n\n @Field({ nullable: true })\n cover_template?: string\n\n @Field({ nullable: true })\n last_template?: string\n\n @Field({ nullable: true, defaultValue: 'A4' })\n page_size?: string\n\n @Field({ nullable: true })\n watermark?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class PDFTemplateList {\n @Field(type => [PDFTemplate])\n items: PDFTemplate[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|