@pdfme/common 2.2.1 → 3.0.0-beta.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/dist/cjs/__tests__/helper.test.js +292 -233
- package/dist/cjs/__tests__/helper.test.js.map +1 -1
- package/dist/cjs/src/constants.js +3 -17
- package/dist/cjs/src/constants.js.map +1 -1
- package/dist/cjs/src/helper.js +72 -99
- package/dist/cjs/src/helper.js.map +1 -1
- package/dist/cjs/src/index.js +7 -37
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/schema.js +17 -71
- package/dist/cjs/src/schema.js.map +1 -1
- package/dist/cjs/src/types.js +3 -0
- package/dist/cjs/src/types.js.map +1 -0
- package/dist/esm/__tests__/helper.test.js +270 -234
- package/dist/esm/__tests__/helper.test.js.map +1 -1
- package/dist/esm/src/constants.js +2 -16
- package/dist/esm/src/constants.js.map +1 -1
- package/dist/esm/src/helper.js +68 -98
- package/dist/esm/src/helper.js.map +1 -1
- package/dist/esm/src/index.js +3 -6
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/schema.js +14 -68
- package/dist/esm/src/schema.js.map +1 -1
- package/dist/esm/src/types.js +2 -0
- package/dist/esm/src/types.js.map +1 -0
- package/dist/types/src/constants.d.ts +2 -16
- package/dist/types/src/helper.d.ts +11 -2
- package/dist/types/src/index.d.ts +5 -8
- package/dist/types/src/schema.d.ts +696 -3574
- package/dist/types/src/types.d.ts +127 -0
- package/package.json +5 -11
- package/src/constants.ts +2 -18
- package/src/helper.ts +108 -116
- package/src/index.ts +28 -87
- package/src/schema.ts +18 -84
- package/src/types.ts +124 -0
- package/tsconfig.cjs.json +3 -2
- package/tsconfig.esm.json +3 -2
- package/dist/cjs/__tests__/barcode.test.js +0 -107
- package/dist/cjs/__tests__/barcode.test.js.map +0 -1
- package/dist/cjs/__tests__/font.test.js +0 -465
- package/dist/cjs/__tests__/font.test.js.map +0 -1
- package/dist/cjs/src/barcode.js +0 -53
- package/dist/cjs/src/barcode.js.map +0 -1
- package/dist/cjs/src/font.js +0 -310
- package/dist/cjs/src/font.js.map +0 -1
- package/dist/cjs/src/type.js +0 -12
- package/dist/cjs/src/type.js.map +0 -1
- package/dist/esm/__tests__/barcode.test.js +0 -102
- package/dist/esm/__tests__/barcode.test.js.map +0 -1
- package/dist/esm/__tests__/font.test.js +0 -440
- package/dist/esm/__tests__/font.test.js.map +0 -1
- package/dist/esm/src/barcode.js +0 -44
- package/dist/esm/src/barcode.js.map +0 -1
- package/dist/esm/src/font.js +0 -274
- package/dist/esm/src/font.js.map +0 -1
- package/dist/esm/src/type.js +0 -6
- package/dist/esm/src/type.js.map +0 -1
- package/dist/types/__tests__/barcode.test.d.ts +0 -1
- package/dist/types/__tests__/font.test.d.ts +0 -1
- package/dist/types/src/barcode.d.ts +0 -19
- package/dist/types/src/font.d.ts +0 -34
- package/dist/types/src/type.d.ts +0 -81
- package/src/barcode.ts +0 -51
- package/src/font.ts +0 -352
- package/src/type.ts +0 -69
package/dist/esm/src/helper.js
CHANGED
@@ -1,8 +1,22 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { Buffer } from 'buffer';
|
3
3
|
import { Inputs as InputsSchema, UIOptions as UIOptionsSchema, Template as TemplateSchema, PreviewProps as PreviewPropsSchema, DesignerProps as DesignerPropsSchema, GenerateProps as GeneratePropsSchema, UIProps as UIPropsSchema, } from './schema';
|
4
|
-
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO } from './constants';
|
5
|
-
|
4
|
+
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, DEFAULT_FONT_NAME, DEFAULT_FONT_VALUE, } from './constants';
|
5
|
+
const uniq = (array) => Array.from(new Set(array));
|
6
|
+
export const getFallbackFontName = (font) => {
|
7
|
+
const initial = '';
|
8
|
+
const fallbackFontName = Object.entries(font).reduce((acc, cur) => {
|
9
|
+
const [fontName, fontValue] = cur;
|
10
|
+
return !acc && fontValue.fallback ? fontName : acc;
|
11
|
+
}, initial);
|
12
|
+
if (fallbackFontName === initial) {
|
13
|
+
throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.`);
|
14
|
+
}
|
15
|
+
return fallbackFontName;
|
16
|
+
};
|
17
|
+
export const getDefaultFont = () => ({
|
18
|
+
[DEFAULT_FONT_NAME]: { data: b64toUint8Array(DEFAULT_FONT_VALUE), fallback: true },
|
19
|
+
});
|
6
20
|
export const mm2pt = (mm) => {
|
7
21
|
return parseFloat(String(mm)) * MM_TO_PT_RATIO;
|
8
22
|
};
|
@@ -20,7 +34,7 @@ const blob2Base64Pdf = (blob) => {
|
|
20
34
|
resolve(reader.result);
|
21
35
|
}
|
22
36
|
else {
|
23
|
-
reject(Error('template.basePdf must be pdf data.'));
|
37
|
+
reject(Error('[@pdfme/common] template.basePdf must be pdf data.'));
|
24
38
|
}
|
25
39
|
};
|
26
40
|
reader.readAsDataURL(blob);
|
@@ -48,6 +62,43 @@ export const b64toUint8Array = (base64) => {
|
|
48
62
|
}
|
49
63
|
return unit8arr;
|
50
64
|
};
|
65
|
+
const getFontNamesInSchemas = (schemas) => uniq(schemas
|
66
|
+
.map((s) => Object.values(s).map((v) => { var _a; return (_a = v.fontName) !== null && _a !== void 0 ? _a : ''; }))
|
67
|
+
.reduce((acc, cur) => acc.concat(cur), [])
|
68
|
+
.filter(Boolean));
|
69
|
+
export const checkFont = (arg) => {
|
70
|
+
const { font, template: { schemas }, } = arg;
|
71
|
+
const fontValues = Object.values(font);
|
72
|
+
const fallbackFontNum = fontValues.reduce((acc, cur) => (cur.fallback ? acc + 1 : acc), 0);
|
73
|
+
if (fallbackFontNum === 0) {
|
74
|
+
throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
75
|
+
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
|
76
|
+
}
|
77
|
+
if (fallbackFontNum > 1) {
|
78
|
+
throw Error(`[@pdfme/common] ${fallbackFontNum} fallback flags found in font. true fallback flag must be only one.
|
79
|
+
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);
|
80
|
+
}
|
81
|
+
const fontNamesInSchemas = getFontNamesInSchemas(schemas);
|
82
|
+
const fontNames = Object.keys(font);
|
83
|
+
if (fontNamesInSchemas.some((f) => !fontNames.includes(f))) {
|
84
|
+
throw Error(`[@pdfme/common] ${fontNamesInSchemas
|
85
|
+
.filter((f) => !fontNames.includes(f))
|
86
|
+
.join()} of template.schemas is not found in font.
|
87
|
+
Check this document: https://pdfme.com/docs/custom-fonts`);
|
88
|
+
}
|
89
|
+
};
|
90
|
+
export const checkPlugins = (arg) => {
|
91
|
+
const { plugins, template: { schemas }, } = arg;
|
92
|
+
const allSchemaTypes = uniq(schemas.map((s) => Object.values(s).map((v) => v.type)).flat());
|
93
|
+
// text and image are builtin schema types so they are not included in plugins.
|
94
|
+
const exceptBuiltinSchemaTypes = allSchemaTypes.filter((t) => t !== 'text' && t !== 'image');
|
95
|
+
const pluginsSchemaTypes = Object.keys(plugins);
|
96
|
+
if (exceptBuiltinSchemaTypes.some((s) => !pluginsSchemaTypes.includes(s))) {
|
97
|
+
throw Error(`[@pdfme/common] ${exceptBuiltinSchemaTypes
|
98
|
+
.filter((s) => !pluginsSchemaTypes.includes(s))
|
99
|
+
.join()} of template.schemas is not found in plugins.`);
|
100
|
+
}
|
101
|
+
};
|
51
102
|
const checkProps = (data, zodSchema) => {
|
52
103
|
try {
|
53
104
|
zodSchema.parse(data);
|
@@ -58,16 +109,24 @@ const checkProps = (data, zodSchema) => {
|
|
58
109
|
ERROR MESSAGE: ${issue.message}
|
59
110
|
--------------------------`);
|
60
111
|
const message = messages.join('\n');
|
61
|
-
throw Error(`Invalid argument:
|
112
|
+
throw Error(`[@pdfme/common] Invalid argument:
|
62
113
|
--------------------------
|
63
114
|
${message}`);
|
64
115
|
}
|
65
116
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
117
|
+
// Check fon if template and options exist
|
118
|
+
if (data && typeof data === 'object' && 'template' in data && 'options' in data) {
|
119
|
+
const { template, options } = data;
|
120
|
+
if (options && options.font) {
|
121
|
+
checkFont({ font: options.font, template });
|
122
|
+
}
|
123
|
+
}
|
124
|
+
// Check plugins if template and plugins exist
|
125
|
+
if (data && typeof data === 'object' && 'template' in data && 'plugins' in data) {
|
126
|
+
const { template, plugins } = data;
|
127
|
+
if (plugins) {
|
128
|
+
checkPlugins({ plugins, template });
|
129
|
+
}
|
71
130
|
}
|
72
131
|
};
|
73
132
|
export const checkInputs = (data) => checkProps(data, InputsSchema);
|
@@ -77,93 +136,4 @@ export const checkUIProps = (data) => checkProps(data, UIPropsSchema);
|
|
77
136
|
export const checkPreviewProps = (data) => checkProps(data, PreviewPropsSchema);
|
78
137
|
export const checkDesignerProps = (data) => checkProps(data, DesignerPropsSchema);
|
79
138
|
export const checkGenerateProps = (data) => checkProps(data, GeneratePropsSchema);
|
80
|
-
// GTIN-13, GTIN-8, GTIN-12, GTIN-14
|
81
|
-
const validateCheckDigit = (input, checkDigitPos) => {
|
82
|
-
let passCheckDigit = true;
|
83
|
-
if (input.length === checkDigitPos) {
|
84
|
-
const ds = input.slice(0, -1).replace(/[^0-9]/g, '');
|
85
|
-
let sum = 0;
|
86
|
-
let odd = 1;
|
87
|
-
for (let i = ds.length - 1; i > -1; i -= 1) {
|
88
|
-
sum += Number(ds[i]) * (odd ? 3 : 1);
|
89
|
-
odd ^= 1;
|
90
|
-
if (sum > 0xffffffffffff) {
|
91
|
-
// ~2^48 at max
|
92
|
-
sum %= 10;
|
93
|
-
}
|
94
|
-
}
|
95
|
-
passCheckDigit = String(10 - (sum % 10)).slice(-1) === input.slice(-1);
|
96
|
-
}
|
97
|
-
return passCheckDigit;
|
98
|
-
};
|
99
|
-
export const validateBarcodeInput = (type, input) => {
|
100
|
-
if (!input)
|
101
|
-
return false;
|
102
|
-
if (type === 'qrcode') {
|
103
|
-
// 500文字以下
|
104
|
-
return input.length < 500;
|
105
|
-
}
|
106
|
-
if (type === 'japanpost') {
|
107
|
-
// 郵便番号は数字(0-9)のみ。住所表示番号は英数字(0-9,A-Z)とハイフン(-)が使用可能です。
|
108
|
-
const regexp = /^(\d{7})(\d|[A-Z]|-)+$/;
|
109
|
-
return regexp.test(input);
|
110
|
-
}
|
111
|
-
if (type === 'ean13') {
|
112
|
-
// 有効文字は数値(0-9)のみ。チェックデジットを含まない12桁orチェックデジットを含む13桁。
|
113
|
-
const regexp = /^\d{12}$|^\d{13}$/;
|
114
|
-
return regexp.test(input) && validateCheckDigit(input, 13);
|
115
|
-
}
|
116
|
-
if (type === 'ean8') {
|
117
|
-
// 有効文字は数値(0-9)のみ。チェックデジットを含まない7桁orチェックデジットを含む8桁。
|
118
|
-
const regexp = /^\d{7}$|^\d{8}$/;
|
119
|
-
return regexp.test(input) && validateCheckDigit(input, 8);
|
120
|
-
}
|
121
|
-
if (type === 'code39') {
|
122
|
-
// 有効文字は数字(0-9)。アルファベット大文字(A-Z)、記号(-.$/+%)、半角スペース。
|
123
|
-
const regexp = /^(\d|[A-Z]|\-|\.|\$|\/|\+|\%|\s)+$/;
|
124
|
-
return regexp.test(input);
|
125
|
-
}
|
126
|
-
if (type === 'code128') {
|
127
|
-
// 有効文字は漢字、ひらがな、カタカナ以外。
|
128
|
-
// https://qiita.com/graminume/items/2ac8dd9c32277fa9da64
|
129
|
-
return !input.match(/([\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]|[A-Za-z0-9!"#$%&'()*+,-./:;<=>?@[\]^_`{|}〜 ])+/);
|
130
|
-
}
|
131
|
-
if (type === 'nw7') {
|
132
|
-
// 有効文字はNW-7は数字(0-9)と記号(-.$:/+)。
|
133
|
-
// スタートコード/ストップコードとして、コードの始まりと終わりはアルファベット(A-D)のいずれかを使用してください。
|
134
|
-
const regexp = /^[A-Da-d]([0-9\-\.\$\:\/\+])+[A-Da-d]$/;
|
135
|
-
return regexp.test(input);
|
136
|
-
}
|
137
|
-
if (type === 'itf14') {
|
138
|
-
// 有効文字は数値(0-9)のみ。 チェックデジットを含まない13桁orチェックデジットを含む14桁。
|
139
|
-
const regexp = /^\d{13}$|^\d{14}$/;
|
140
|
-
return regexp.test(input) && validateCheckDigit(input, 14);
|
141
|
-
}
|
142
|
-
if (type === 'upca') {
|
143
|
-
// 有効文字は数値(0-9)のみ。 チェックデジットを含まない11桁orチェックデジットを含む12桁。
|
144
|
-
const regexp = /^\d{11}$|^\d{12}$/;
|
145
|
-
return regexp.test(input) && validateCheckDigit(input, 12);
|
146
|
-
}
|
147
|
-
if (type === 'upce') {
|
148
|
-
// 有効文字は数値(0-9)のみ。 1桁目に指定できる数字(ナンバーシステムキャラクタ)は0のみ。
|
149
|
-
// チェックデジットを含まない7桁orチェックデジットを含む8桁。
|
150
|
-
const regexp = /^0(\d{6}$|\d{7}$)/;
|
151
|
-
return regexp.test(input) && validateCheckDigit(input, 8);
|
152
|
-
}
|
153
|
-
if (type === 'gs1datamatrix') {
|
154
|
-
let ret = false;
|
155
|
-
// find the GTIN application identifier, regex for "(01)" and the digits after it until another "("
|
156
|
-
const regexp = /\((01)\)(\d*)(\(|$)/;
|
157
|
-
let res = input.match(regexp);
|
158
|
-
if (res != null &&
|
159
|
-
input.length <= 52 && // 52 is the max length of a GS1 DataMatrix barcode before bwip-js throws an error
|
160
|
-
res[1] === '01' &&
|
161
|
-
(res[2].length === 14 || res[2].length === 8 || res[2].length === 12 || res[2].length === 13)) {
|
162
|
-
let gtin = res[2];
|
163
|
-
ret = validateCheckDigit(gtin, gtin.length);
|
164
|
-
}
|
165
|
-
return ret;
|
166
|
-
}
|
167
|
-
return false;
|
168
|
-
};
|
169
139
|
//# sourceMappingURL=helper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,M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AE,YAAY,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,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/dist/esm/src/index.js
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
4
|
-
import { getB64BasePdf, b64toUint8Array, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2px, validateBarcodeInput, } from './helper.js';
|
5
|
-
import { calculateDynamicFontSize, getFallbackFontName, getDefaultFont, heightOfFontAtSize, widthOfTextAtSize, checkFont, getFontKitFont, getBrowserVerticalFontAdjustments, getFontDescentInPt, getSplittedLines, } from './font.js';
|
6
|
-
export { DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, VERTICAL_ALIGN_TOP, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_BOTTOM, DEFAULT_VERTICAL_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, DEFAULT_BARCODE_BG_COLOR, DEFAULT_BARCODE_COLOR, DYNAMIC_FIT_VERTICAL, DYNAMIC_FIT_HORIZONTAL, DEFAULT_DYNAMIC_FIT, FONT_SIZE_ADJUSTMENT, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, DEFAULT_FONT_VALUE, schemaTypes, isTextSchema, isImageSchema, isBarcodeSchema, getB64BasePdf, b64toUint8Array, getFallbackFontName, getDefaultFont, getSplittedLines, heightOfFontAtSize, widthOfTextAtSize, mm2pt, pt2px, checkFont, getBrowserVerticalFontAdjustments, getFontDescentInPt, getFontKitFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, calculateDynamicFontSize, createBarCode };
|
1
|
+
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, } from './constants.js';
|
2
|
+
import { getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, } from './helper.js';
|
3
|
+
export { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
7
4
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAwBxB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,KAAK,GACN,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
package/dist/esm/src/schema.js
CHANGED
@@ -1,62 +1,22 @@
|
|
1
|
-
/* eslint dot-notation: "off"*/
|
2
1
|
import { z } from 'zod';
|
3
|
-
import { VERTICAL_ALIGN_TOP, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_BOTTOM } from "./constants";
|
4
2
|
const langs = ['en', 'ja', 'ar', 'th', 'pl', 'it'];
|
5
3
|
export const Lang = z.enum(langs);
|
6
4
|
export const Size = z.object({ height: z.number(), width: z.number() });
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
VERTICAL_ALIGN_TOP,
|
11
|
-
VERTICAL_ALIGN_MIDDLE,
|
12
|
-
VERTICAL_ALIGN_BOTTOM,
|
13
|
-
];
|
14
|
-
export const VerticalAlignment = z.enum(verticalAlignments);
|
15
|
-
// prettier-ignore
|
16
|
-
export const barcodeSchemaTypes = ['qrcode', 'japanpost', 'ean13', 'ean8', 'code39', 'code128', 'nw7', 'itf14', 'upca', 'upce', 'gs1datamatrix'];
|
17
|
-
const notBarcodeSchemaTypes = ['text', 'image'];
|
18
|
-
export const schemaTypes = [...notBarcodeSchemaTypes, ...barcodeSchemaTypes];
|
19
|
-
export const BarcodeSchemaType = z.enum(barcodeSchemaTypes);
|
20
|
-
export const SchemaType = z.enum(schemaTypes);
|
21
|
-
export const CommonSchema = z.object({
|
22
|
-
type: SchemaType,
|
5
|
+
export const Schema = z
|
6
|
+
.object({
|
7
|
+
type: z.string(),
|
23
8
|
position: z.object({ x: z.number(), y: z.number() }),
|
24
9
|
width: z.number(),
|
25
10
|
height: z.number(),
|
26
11
|
rotate: z.number().optional(),
|
27
|
-
})
|
28
|
-
|
29
|
-
type: z.literal(SchemaType.Enum.text),
|
30
|
-
alignment: Alignment.optional(),
|
31
|
-
verticalAlignment: VerticalAlignment.optional(),
|
32
|
-
fontSize: z.number().optional(),
|
33
|
-
fontName: z.string().optional(),
|
34
|
-
fontColor: z.string().optional(),
|
35
|
-
backgroundColor: z.string().optional(),
|
36
|
-
characterSpacing: z.number().optional(),
|
37
|
-
lineHeight: z.number().optional(),
|
38
|
-
dynamicFontSize: z.object({
|
39
|
-
max: z.number(),
|
40
|
-
min: z.number(),
|
41
|
-
fit: z.string().optional(),
|
42
|
-
}).optional(),
|
43
|
-
});
|
44
|
-
export const ImageSchema = CommonSchema.extend({ type: z.literal(SchemaType.Enum.image) });
|
45
|
-
export const BarcodeSchema = CommonSchema.extend({
|
46
|
-
type: BarcodeSchemaType,
|
47
|
-
backgroundcolor: z.string().optional(),
|
48
|
-
barcolor: z.string().optional(),
|
49
|
-
textcolor: z.string().optional(),
|
50
|
-
});
|
51
|
-
export const Schema = z.union([TextSchema, ImageSchema, BarcodeSchema]);
|
12
|
+
})
|
13
|
+
.passthrough();
|
52
14
|
const SchemaForUIAdditionalInfo = z.object({
|
53
|
-
id: z.string(),
|
15
|
+
id: z.string(),
|
16
|
+
key: z.string(),
|
17
|
+
data: z.string(),
|
54
18
|
});
|
55
|
-
export const SchemaForUI =
|
56
|
-
TextSchema.merge(SchemaForUIAdditionalInfo),
|
57
|
-
ImageSchema.merge(SchemaForUIAdditionalInfo),
|
58
|
-
BarcodeSchema.merge(SchemaForUIAdditionalInfo),
|
59
|
-
]);
|
19
|
+
export const SchemaForUI = Schema.merge(SchemaForUIAdditionalInfo);
|
60
20
|
const ArrayBufferSchema = z.any().refine((v) => v instanceof ArrayBuffer);
|
61
21
|
const Uint8ArraySchema = z.any().refine((v) => v instanceof Uint8Array);
|
62
22
|
export const Font = z.record(z.object({
|
@@ -72,39 +32,25 @@ export const Template = z.object({
|
|
72
32
|
columns: z.array(z.string()).optional(),
|
73
33
|
});
|
74
34
|
export const Inputs = z.array(z.record(z.string())).min(1);
|
75
|
-
const CommonOptions = z.object({ font: Font.optional() });
|
76
|
-
|
35
|
+
const CommonOptions = z.object({ font: Font.optional() }).passthrough();
|
36
|
+
const CommonProps = z.object({
|
77
37
|
template: Template,
|
78
38
|
options: CommonOptions.optional(),
|
39
|
+
plugins: z.record(z.object({ ui: z.any(), pdf: z.any(), propPanel: z.any() })).optional(),
|
79
40
|
});
|
80
41
|
// -------------------generate-------------------
|
81
|
-
export const GeneratorOptions = CommonOptions;
|
42
|
+
export const GeneratorOptions = CommonOptions.extend({});
|
82
43
|
export const GenerateProps = CommonProps.extend({
|
83
44
|
inputs: Inputs,
|
84
45
|
options: GeneratorOptions.optional(),
|
85
46
|
}).strict();
|
86
|
-
|
87
|
-
// ---------------------------------------------
|
47
|
+
// ---------------------ui------------------------
|
88
48
|
export const UIOptions = CommonOptions.extend({ lang: Lang.optional() });
|
89
49
|
const HTMLElementSchema = z.any().refine((v) => v instanceof HTMLElement);
|
90
50
|
export const UIProps = CommonProps.extend({
|
91
51
|
domContainer: HTMLElementSchema,
|
92
52
|
options: UIOptions.optional(),
|
93
53
|
});
|
94
|
-
// -----------------Form, Viewer-----------------
|
95
54
|
export const PreviewProps = UIProps.extend({ inputs: Inputs }).strict();
|
96
|
-
export const PreviewReactProps = PreviewProps.omit({ domContainer: true }).extend({
|
97
|
-
onChangeInput: z
|
98
|
-
.function()
|
99
|
-
.args(z.object({ index: z.number(), value: z.string(), key: z.string() }))
|
100
|
-
.returns(z.void())
|
101
|
-
.optional(),
|
102
|
-
size: Size,
|
103
|
-
});
|
104
|
-
// ---------------Designer---------------
|
105
55
|
export const DesignerProps = UIProps.extend({}).strict();
|
106
|
-
export const DesignerReactProps = DesignerProps.omit({ domContainer: true }).extend({
|
107
|
-
onSaveTemplate: z.function().args(Template).returns(z.void()),
|
108
|
-
size: Size,
|
109
|
-
});
|
110
56
|
//# sourceMappingURL=schema.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAE5D,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC;KACpB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IACpD,KAAK,EAAE,CAAC,CAAC,MAAM,EA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