@pdfme/common 3.0.0-dev.2 → 3.0.1-dev.13
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/cjs/__tests__/helper.test.js +4 -13
- package/dist/cjs/__tests__/helper.test.js.map +1 -1
- package/dist/cjs/src/helper.js +2 -2
- package/dist/cjs/src/helper.js.map +1 -1
- package/dist/esm/__tests__/helper.test.js +4 -13
- package/dist/esm/__tests__/helper.test.js.map +1 -1
- package/dist/esm/src/helper.js +2 -2
- package/dist/esm/src/helper.js.map +1 -1
- package/package.json +2 -2
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
22
|
__setModuleDefault(result, mod);
|
23
23
|
return result;
|
24
24
|
};
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
32
|
-
});
|
33
|
-
};
|
34
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
26
|
const fs_1 = require("fs");
|
36
27
|
const path = __importStar(require("path"));
|
@@ -230,8 +221,8 @@ Check this document: https://pdfme.com/docs/custom-fonts`);
|
|
230
221
|
describe('checkPlugins test', () => {
|
231
222
|
const plugins = {
|
232
223
|
myText: {
|
233
|
-
pdf: () =>
|
234
|
-
ui: () =>
|
224
|
+
pdf: async () => { },
|
225
|
+
ui: async () => { },
|
235
226
|
propPanel: {
|
236
227
|
schema: {},
|
237
228
|
defaultValue: '',
|
@@ -239,8 +230,8 @@ describe('checkPlugins test', () => {
|
|
239
230
|
},
|
240
231
|
},
|
241
232
|
myImage: {
|
242
|
-
pdf: () =>
|
243
|
-
ui: () =>
|
233
|
+
pdf: async () => { },
|
234
|
+
ui: async () => { },
|
244
235
|
propPanel: {
|
245
236
|
schema: {},
|
246
237
|
defaultValue: '',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.test.js","sourceRoot":"","sources":["../../../__tests__/helper.test.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"helper.test.js","sourceRoot":"","sources":["../../../__tests__/helper.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAAkC;AAClC,2CAA6B;AAC7B,0CAA6E;AAC7E,gCAA4E;AAE5E,MAAM,QAAQ,GAAG,IAAA,iBAAY,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC,CAAC;AACxF,MAAM,SAAS,GAAG,IAAA,iBAAY,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mCAAmC,CAAC,CAAC,CAAC;AAE1F,MAAM,aAAa,GAAG,GAAS,EAAE,CAAC,CAAC;IACjC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IAClD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,GAAa,EAAE,CAAC,CAAC;IACnC,OAAO,EAAE,eAAS;IAClB,OAAO,EAAE;QACP;YACE,CAAC,EAAE;gBACD,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,gBAAgB;gBAC1B,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;gBACxB,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;YACD,CAAC,EAAE;gBACD,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,EAAE,CA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ACpC,IAAI,EAAE,CAAC;SACR;QAAC,OAAO,CAAM,EAAE;YACf,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CACvB,mEAAmE,CACpE,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACrE,IAAI;YACF,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC/B,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC;YACpC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC;YACrC,IAAA,qBAAY,EAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;YACpC,IAAI,EAAE,CAAC;SACR;QAAC,OAAO,CAAM,EAAE;YACf,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CACvB,yEAAyE,CAC1E,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cjs/src/helper.js
CHANGED
@@ -73,7 +73,7 @@ const b64toUint8Array = (base64) => {
|
|
73
73
|
};
|
74
74
|
exports.b64toUint8Array = b64toUint8Array;
|
75
75
|
const getFontNamesInSchemas = (schemas) => uniq(schemas
|
76
|
-
.map((s) => Object.values(s).map((v) =>
|
76
|
+
.map((s) => Object.values(s).map((v) => v.fontName ?? ''))
|
77
77
|
.reduce((acc, cur) => acc.concat(cur), [])
|
78
78
|
.filter(Boolean));
|
79
79
|
const checkFont = (arg) => {
|
@@ -101,7 +101,7 @@ exports.checkFont = checkFont;
|
|
101
101
|
const checkPlugins = (arg) => {
|
102
102
|
const { plugins, template: { schemas }, } = arg;
|
103
103
|
const allSchemaTypes = uniq(schemas.map((s) => Object.values(s).map((v) => v.type)).flat());
|
104
|
-
const pluginsSchemaTypes = Object.values(plugins).map((p) => p
|
104
|
+
const pluginsSchemaTypes = Object.values(plugins).map((p) => p?.propPanel.defaultSchema.type);
|
105
105
|
if (allSchemaTypes.some((s) => !pluginsSchemaTypes.includes(s))) {
|
106
106
|
throw Error(`[@pdfme/common] ${allSchemaTypes
|
107
107
|
.filter((s) => !pluginsSchemaTypes.includes(s))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAAgC;AAEhC,qCAQkB;AAClB,2CAMqB;AAErB,MAAM,IAAI,GAAG,CAAI,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAEzD,MAAM,mBAAmB,GAAG,CAAC,IAAU,EAAE,EAAE;IAChD,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAChE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,GAAG,CAAC;QAElC,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;IACrD,CAAC,EAAE,OAAO,CAAC,CAAC;IACZ,IAAI,gBAAgB,KAAK,OAAO,EAAE;QAChC,MAAM,KAAK,CACT,0FAA0F,CAC3F,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAdW,QAAA,mBAAmB,uBAc9B;AAEK,MAAM,cAAc,GAAG,GAAS,EAAE,CAAC,CAAC;IACzC,CAAC,6BAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAe,EAAC,8BAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;CACnF,CAAC,CAAC;AAFU,QAAA,cAAc,kBAExB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,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,sBAAmB,CAAC,CAAC;AAA9E,QAAA,kBAAkB,sBAA4D;AACpF,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,sBAAmB,CAAC,CAAC;AAA9E,QAAA,kBAAkB,sBAA4D"}
|
@@ -1,12 +1,3 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
1
|
import { readFileSync } from 'fs';
|
11
2
|
import * as path from 'path';
|
12
3
|
import { mm2pt, pt2mm, pt2px, checkFont, checkPlugins } from '../src/helper';
|
@@ -205,8 +196,8 @@ Check this document: https://pdfme.com/docs/custom-fonts`);
|
|
205
196
|
describe('checkPlugins test', () => {
|
206
197
|
const plugins = {
|
207
198
|
myText: {
|
208
|
-
pdf: () =>
|
209
|
-
ui: () =>
|
199
|
+
pdf: async () => { },
|
200
|
+
ui: async () => { },
|
210
201
|
propPanel: {
|
211
202
|
schema: {},
|
212
203
|
defaultValue: '',
|
@@ -214,8 +205,8 @@ describe('checkPlugins test', () => {
|
|
214
205
|
},
|
215
206
|
},
|
216
207
|
myImage: {
|
217
|
-
pdf: () =>
|
218
|
-
ui: () =>
|
208
|
+
pdf: async () => { },
|
209
|
+
ui: async () => { },
|
219
210
|
propPanel: {
|
220
211
|
schema: {},
|
221
212
|
defaultValue: '',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.test.js","sourceRoot":"","sources":["../../../__tests__/helper.test.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"helper.test.js","sourceRoot":"","sources":["../../../__tests__/helper.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,SAAS,EAA2B,MAAM,QAAQ,CAAC;AAE5E,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC,CAAC;AACxF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mCAAmC,CAAC,CAAC,CAAC;AAE1F,MAAM,aAAa,GAAG,GAAS,EAAE,CAAC,CAAC;IACjC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;IAClD,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,GAAa,EAAE,CAAC,CAAC;IACnC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE;QACP;YACE,CAAC,EAAE;gBACD,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,gBAAgB;gBAC1B,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;gBACxB,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;YACD,CAAC,EAAE;gBACD,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;gBACxB,KAAK,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MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;YAC/B,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC;YACpC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,OAAO,CAAC;YACrC,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;YACpC,IAAI,EAAE,CAAC;SACR;QAAC,OAAO,CAAM,EAAE;YACf,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CACvB,yEAAyE,CAC1E,CAAC;SACH;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/esm/src/helper.js
CHANGED
@@ -63,7 +63,7 @@ export const b64toUint8Array = (base64) => {
|
|
63
63
|
return unit8arr;
|
64
64
|
};
|
65
65
|
const getFontNamesInSchemas = (schemas) => uniq(schemas
|
66
|
-
.map((s) => Object.values(s).map((v) =>
|
66
|
+
.map((s) => Object.values(s).map((v) => v.fontName ?? ''))
|
67
67
|
.reduce((acc, cur) => acc.concat(cur), [])
|
68
68
|
.filter(Boolean));
|
69
69
|
export const checkFont = (arg) => {
|
@@ -90,7 +90,7 @@ Check this document: https://pdfme.com/docs/custom-fonts`);
|
|
90
90
|
export const checkPlugins = (arg) => {
|
91
91
|
const { plugins, template: { schemas }, } = arg;
|
92
92
|
const allSchemaTypes = uniq(schemas.map((s) => Object.values(s).map((v) => v.type)).flat());
|
93
|
-
const pluginsSchemaTypes = Object.values(plugins).map((p) => p
|
93
|
+
const pluginsSchemaTypes = Object.values(plugins).map((p) => p?.propPanel.defaultSchema.type);
|
94
94
|
if (allSchemaTypes.some((s) => !pluginsSchemaTypes.includes(s))) {
|
95
95
|
throw Error(`[@pdfme/common] ${allSchemaTypes
|
96
96
|
.filter((s) => !pluginsSchemaTypes.includes(s))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":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M,iBAAiB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/common",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.1-dev.13",
|
4
4
|
"sideEffects": false,
|
5
5
|
"author": "hand-dot",
|
6
6
|
"license": "MIT",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
},
|
36
36
|
"scripts": {
|
37
37
|
"develop": "tsc -p tsconfig.esm.json -w",
|
38
|
-
"build": "npm
|
38
|
+
"build": "npm-run-all --parallel build:cjs build:esm",
|
39
39
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
40
40
|
"build:esm": "tsc -p tsconfig.esm.json",
|
41
41
|
"clean": "rimraf dist",
|