@pdfme/schemas 5.3.8 → 5.3.9-dev.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__/barcode.test.js +119 -120
- package/dist/cjs/__tests__/barcode.test.js.map +1 -1
- package/dist/cjs/__tests__/multiVariableText.test.js +15 -15
- package/dist/cjs/__tests__/multiVariableText.test.js.map +1 -1
- package/dist/cjs/__tests__/text.test.js +88 -78
- package/dist/cjs/__tests__/text.test.js.map +1 -1
- package/dist/cjs/__tests__/utils.test.js +76 -15
- package/dist/cjs/__tests__/utils.test.js.map +1 -1
- package/dist/cjs/src/barcodes/helper.js +2 -1
- package/dist/cjs/src/barcodes/helper.js.map +1 -1
- package/dist/cjs/src/barcodes/pdfRender.js.map +1 -1
- package/dist/cjs/src/barcodes/propPanel.js +3 -3
- package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
- package/dist/cjs/src/barcodes/uiRender.js.map +1 -1
- package/dist/cjs/src/checkbox/index.js +4 -4
- package/dist/cjs/src/checkbox/index.js.map +1 -1
- package/dist/cjs/src/date/date.js +2 -2
- package/dist/cjs/src/date/date.js.map +1 -1
- package/dist/cjs/src/date/dateTime.js +2 -2
- package/dist/cjs/src/date/dateTime.js.map +1 -1
- package/dist/cjs/src/date/helper.js +28 -18
- package/dist/cjs/src/date/helper.js.map +1 -1
- package/dist/cjs/src/date/time.js +2 -2
- package/dist/cjs/src/date/time.js.map +1 -1
- package/dist/cjs/src/graphics/image.js.map +1 -1
- package/dist/cjs/src/graphics/imagehelper.js.map +1 -1
- package/dist/cjs/src/graphics/svg.js +25 -2
- package/dist/cjs/src/graphics/svg.js.map +1 -1
- package/dist/cjs/src/index.js +34 -31
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/multiVariableText/helper.js +2 -2
- package/dist/cjs/src/multiVariableText/helper.js.map +1 -1
- package/dist/cjs/src/multiVariableText/pdfRender.js +5 -5
- package/dist/cjs/src/multiVariableText/pdfRender.js.map +1 -1
- package/dist/cjs/src/multiVariableText/propPanel.js +19 -14
- package/dist/cjs/src/multiVariableText/propPanel.js.map +1 -1
- package/dist/cjs/src/multiVariableText/uiRender.js +25 -15
- package/dist/cjs/src/multiVariableText/uiRender.js.map +1 -1
- package/dist/cjs/src/radioGroup/index.js +4 -4
- package/dist/cjs/src/radioGroup/index.js.map +1 -1
- package/dist/cjs/src/select/index.js +9 -9
- package/dist/cjs/src/select/index.js.map +1 -1
- package/dist/cjs/src/shapes/line.js +1 -1
- package/dist/cjs/src/shapes/rectAndEllipse.js +8 -4
- package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/cjs/src/tables/classes.js +4 -4
- package/dist/cjs/src/tables/classes.js.map +1 -1
- package/dist/cjs/src/tables/dynamicTemplate.js +2 -2
- package/dist/cjs/src/tables/dynamicTemplate.js.map +1 -1
- package/dist/cjs/src/tables/helper.js +25 -25
- package/dist/cjs/src/tables/helper.js.map +1 -1
- package/dist/cjs/src/tables/pdfRender.js +8 -8
- package/dist/cjs/src/tables/pdfRender.js.map +1 -1
- package/dist/cjs/src/tables/tableHelper.js +6 -7
- package/dist/cjs/src/tables/tableHelper.js.map +1 -1
- package/dist/cjs/src/tables/uiRender.js.map +1 -1
- package/dist/cjs/src/text/extraFormatter.js +17 -17
- package/dist/cjs/src/text/extraFormatter.js.map +1 -1
- package/dist/cjs/src/text/helper.js +17 -7
- package/dist/cjs/src/text/helper.js.map +1 -1
- package/dist/cjs/src/text/pdfRender.js +1 -1
- package/dist/cjs/src/text/pdfRender.js.map +1 -1
- package/dist/cjs/src/text/propPanel.js +2 -2
- package/dist/cjs/src/text/propPanel.js.map +1 -1
- package/dist/cjs/src/text/uiRender.js.map +1 -1
- package/dist/cjs/src/utils.js +52 -12
- package/dist/cjs/src/utils.js.map +1 -1
- package/dist/esm/__tests__/barcode.test.js +14 -15
- package/dist/esm/__tests__/barcode.test.js.map +1 -1
- package/dist/esm/__tests__/multiVariableText.test.js +1 -1
- package/dist/esm/__tests__/multiVariableText.test.js.map +1 -1
- package/dist/esm/__tests__/text.test.js +2 -2
- package/dist/esm/__tests__/text.test.js.map +1 -1
- package/dist/esm/__tests__/utils.test.js +65 -4
- package/dist/esm/__tests__/utils.test.js.map +1 -1
- package/dist/esm/src/barcodes/helper.js +2 -1
- package/dist/esm/src/barcodes/helper.js.map +1 -1
- package/dist/esm/src/barcodes/pdfRender.js.map +1 -1
- package/dist/esm/src/barcodes/propPanel.js +3 -3
- package/dist/esm/src/barcodes/propPanel.js.map +1 -1
- package/dist/esm/src/barcodes/uiRender.js.map +1 -1
- package/dist/esm/src/checkbox/index.js +2 -2
- package/dist/esm/src/checkbox/index.js.map +1 -1
- package/dist/esm/src/date/date.js +1 -1
- package/dist/esm/src/date/date.js.map +1 -1
- package/dist/esm/src/date/dateTime.js +1 -1
- package/dist/esm/src/date/dateTime.js.map +1 -1
- package/dist/esm/src/date/helper.js +4 -4
- package/dist/esm/src/date/helper.js.map +1 -1
- package/dist/esm/src/date/time.js +1 -1
- package/dist/esm/src/date/time.js.map +1 -1
- package/dist/esm/src/graphics/image.js.map +1 -1
- package/dist/esm/src/graphics/imagehelper.js.map +1 -1
- package/dist/esm/src/graphics/svg.js +25 -2
- package/dist/esm/src/graphics/svg.js.map +1 -1
- package/dist/esm/src/index.js +16 -14
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/multiVariableText/helper.js +2 -2
- package/dist/esm/src/multiVariableText/helper.js.map +1 -1
- package/dist/esm/src/multiVariableText/pdfRender.js +2 -2
- package/dist/esm/src/multiVariableText/pdfRender.js.map +1 -1
- package/dist/esm/src/multiVariableText/propPanel.js +15 -10
- package/dist/esm/src/multiVariableText/propPanel.js.map +1 -1
- package/dist/esm/src/multiVariableText/uiRender.js +19 -9
- package/dist/esm/src/multiVariableText/uiRender.js.map +1 -1
- package/dist/esm/src/radioGroup/index.js +2 -2
- package/dist/esm/src/radioGroup/index.js.map +1 -1
- package/dist/esm/src/select/index.js +2 -2
- package/dist/esm/src/select/index.js.map +1 -1
- package/dist/esm/src/shapes/line.js +1 -1
- package/dist/esm/src/shapes/rectAndEllipse.js +8 -4
- package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/esm/src/tables/classes.js +1 -1
- package/dist/esm/src/tables/classes.js.map +1 -1
- package/dist/esm/src/tables/dynamicTemplate.js +1 -1
- package/dist/esm/src/tables/dynamicTemplate.js.map +1 -1
- package/dist/esm/src/tables/helper.js +5 -5
- package/dist/esm/src/tables/helper.js.map +1 -1
- package/dist/esm/src/tables/pdfRender.js +4 -4
- package/dist/esm/src/tables/pdfRender.js.map +1 -1
- package/dist/esm/src/tables/tableHelper.js +1 -1
- package/dist/esm/src/tables/tableHelper.js.map +1 -1
- package/dist/esm/src/tables/uiRender.js.map +1 -1
- package/dist/esm/src/text/extraFormatter.js +2 -2
- package/dist/esm/src/text/extraFormatter.js.map +1 -1
- package/dist/esm/src/text/helper.js.map +1 -1
- package/dist/esm/src/text/pdfRender.js +1 -1
- package/dist/esm/src/text/pdfRender.js.map +1 -1
- package/dist/esm/src/text/propPanel.js +1 -1
- package/dist/esm/src/text/propPanel.js.map +1 -1
- package/dist/esm/src/text/uiRender.js.map +1 -1
- package/dist/esm/src/utils.js +52 -12
- package/dist/esm/src/utils.js.map +1 -1
- package/dist/node/__tests__/barcode.test.js +119 -120
- package/dist/node/__tests__/barcode.test.js.map +1 -1
- package/dist/node/__tests__/multiVariableText.test.js +15 -15
- package/dist/node/__tests__/multiVariableText.test.js.map +1 -1
- package/dist/node/__tests__/text.test.js +88 -78
- package/dist/node/__tests__/text.test.js.map +1 -1
- package/dist/node/__tests__/utils.test.js +76 -15
- package/dist/node/__tests__/utils.test.js.map +1 -1
- package/dist/node/src/barcodes/helper.js +2 -1
- package/dist/node/src/barcodes/helper.js.map +1 -1
- package/dist/node/src/barcodes/pdfRender.js.map +1 -1
- package/dist/node/src/barcodes/propPanel.js +3 -3
- package/dist/node/src/barcodes/propPanel.js.map +1 -1
- package/dist/node/src/barcodes/uiRender.js.map +1 -1
- package/dist/node/src/checkbox/index.js +4 -4
- package/dist/node/src/checkbox/index.js.map +1 -1
- package/dist/node/src/date/date.js +2 -2
- package/dist/node/src/date/date.js.map +1 -1
- package/dist/node/src/date/dateTime.js +2 -2
- package/dist/node/src/date/dateTime.js.map +1 -1
- package/dist/node/src/date/helper.js +28 -18
- package/dist/node/src/date/helper.js.map +1 -1
- package/dist/node/src/date/time.js +2 -2
- package/dist/node/src/date/time.js.map +1 -1
- package/dist/node/src/graphics/image.js.map +1 -1
- package/dist/node/src/graphics/imagehelper.js.map +1 -1
- package/dist/node/src/graphics/svg.js +25 -2
- package/dist/node/src/graphics/svg.js.map +1 -1
- package/dist/node/src/index.js +34 -31
- package/dist/node/src/index.js.map +1 -1
- package/dist/node/src/multiVariableText/helper.js +2 -2
- package/dist/node/src/multiVariableText/helper.js.map +1 -1
- package/dist/node/src/multiVariableText/pdfRender.js +5 -5
- package/dist/node/src/multiVariableText/pdfRender.js.map +1 -1
- package/dist/node/src/multiVariableText/propPanel.js +19 -14
- package/dist/node/src/multiVariableText/propPanel.js.map +1 -1
- package/dist/node/src/multiVariableText/uiRender.js +25 -15
- package/dist/node/src/multiVariableText/uiRender.js.map +1 -1
- package/dist/node/src/radioGroup/index.js +4 -4
- package/dist/node/src/radioGroup/index.js.map +1 -1
- package/dist/node/src/select/index.js +9 -9
- package/dist/node/src/select/index.js.map +1 -1
- package/dist/node/src/shapes/line.js +1 -1
- package/dist/node/src/shapes/rectAndEllipse.js +8 -4
- package/dist/node/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/node/src/tables/classes.js +4 -4
- package/dist/node/src/tables/classes.js.map +1 -1
- package/dist/node/src/tables/dynamicTemplate.js +2 -2
- package/dist/node/src/tables/dynamicTemplate.js.map +1 -1
- package/dist/node/src/tables/helper.js +25 -25
- package/dist/node/src/tables/helper.js.map +1 -1
- package/dist/node/src/tables/pdfRender.js +8 -8
- package/dist/node/src/tables/pdfRender.js.map +1 -1
- package/dist/node/src/tables/tableHelper.js +6 -7
- package/dist/node/src/tables/tableHelper.js.map +1 -1
- package/dist/node/src/tables/uiRender.js.map +1 -1
- package/dist/node/src/text/extraFormatter.js +17 -17
- package/dist/node/src/text/extraFormatter.js.map +1 -1
- package/dist/node/src/text/helper.js +17 -7
- package/dist/node/src/text/helper.js.map +1 -1
- package/dist/node/src/text/pdfRender.js +1 -1
- package/dist/node/src/text/pdfRender.js.map +1 -1
- package/dist/node/src/text/propPanel.js +2 -2
- package/dist/node/src/text/propPanel.js.map +1 -1
- package/dist/node/src/text/uiRender.js.map +1 -1
- package/dist/node/src/utils.js +52 -12
- package/dist/node/src/utils.js.map +1 -1
- package/dist/types/src/barcodes/helper.d.ts +1 -1
- package/dist/types/src/barcodes/index.d.ts +1 -1
- package/dist/types/src/barcodes/pdfRender.d.ts +1 -1
- package/dist/types/src/barcodes/propPanel.d.ts +1 -1
- package/dist/types/src/barcodes/uiRender.d.ts +1 -1
- package/dist/types/src/date/date.d.ts +1 -1
- package/dist/types/src/date/dateTime.d.ts +1 -1
- package/dist/types/src/date/helper.d.ts +1 -1
- package/dist/types/src/date/time.d.ts +1 -1
- package/dist/types/src/date/types.d.ts +6 -1
- package/dist/types/src/index.d.ts +16 -15
- package/dist/types/src/multiVariableText/helper.d.ts +1 -1
- package/dist/types/src/multiVariableText/index.d.ts +1 -1
- package/dist/types/src/multiVariableText/pdfRender.d.ts +1 -1
- package/dist/types/src/multiVariableText/propPanel.d.ts +1 -1
- package/dist/types/src/multiVariableText/types.d.ts +1 -1
- package/dist/types/src/multiVariableText/uiRender.d.ts +1 -1
- package/dist/types/src/select/index.d.ts +1 -1
- package/dist/types/src/shapes/rectAndEllipse.d.ts +16 -96
- package/dist/types/src/tables/cell.d.ts +1 -1
- package/dist/types/src/tables/classes.d.ts +1 -1
- package/dist/types/src/tables/helper.d.ts +5 -5
- package/dist/types/src/tables/pdfRender.d.ts +1 -1
- package/dist/types/src/tables/propPanel.d.ts +1 -1
- package/dist/types/src/tables/tableHelper.d.ts +1 -1
- package/dist/types/src/tables/types.d.ts +1 -1
- package/dist/types/src/text/constants.d.ts +1 -1
- package/dist/types/src/text/helper.d.ts +1 -1
- package/dist/types/src/text/index.d.ts +1 -1
- package/dist/types/src/text/pdfRender.d.ts +1 -1
- package/dist/types/src/text/propPanel.d.ts +1 -1
- package/dist/types/src/text/uiRender.d.ts +1 -1
- package/dist/types/src/utils.d.ts +4 -85
- package/eslint.config.mjs +22 -0
- package/package.json +3 -4
- package/src/barcodes/helper.ts +3 -4
- package/src/barcodes/index.ts +2 -2
- package/src/barcodes/pdfRender.ts +2 -2
- package/src/barcodes/propPanel.ts +4 -5
- package/src/barcodes/uiRender.ts +1 -1
- package/src/checkbox/index.ts +2 -2
- package/src/date/date.ts +1 -1
- package/src/date/dateTime.ts +1 -1
- package/src/date/helper.ts +20 -13
- package/src/date/time.ts +1 -1
- package/src/date/types.ts +7 -1
- package/src/graphics/imagehelper.ts +1 -1
- package/src/graphics/svg.ts +27 -2
- package/src/index.ts +17 -14
- package/src/multiVariableText/helper.ts +15 -7
- package/src/multiVariableText/index.ts +1 -1
- package/src/multiVariableText/pdfRender.ts +3 -3
- package/src/multiVariableText/propPanel.ts +19 -16
- package/src/multiVariableText/types.ts +1 -1
- package/src/multiVariableText/uiRender.ts +26 -23
- package/src/radioGroup/index.ts +3 -3
- package/src/select/index.ts +4 -4
- package/src/shapes/line.ts +1 -1
- package/src/shapes/rectAndEllipse.ts +10 -4
- package/src/tables/cell.ts +5 -5
- package/src/tables/classes.ts +7 -7
- package/src/tables/dynamicTemplate.ts +3 -3
- package/src/tables/helper.ts +7 -7
- package/src/tables/pdfRender.ts +9 -9
- package/src/tables/propPanel.ts +1 -1
- package/src/tables/tableHelper.ts +15 -12
- package/src/tables/types.ts +1 -1
- package/src/tables/uiRender.ts +6 -6
- package/src/text/constants.ts +1 -1
- package/src/text/extraFormatter.ts +2 -2
- package/src/text/helper.ts +6 -6
- package/src/text/index.ts +1 -1
- package/src/text/pdfRender.ts +4 -4
- package/src/text/propPanel.ts +2 -2
- package/src/text/uiRender.ts +14 -6
- package/src/utils.ts +60 -15
- package/tsconfig.cjs.json +1 -1
- package/tsconfig.esm.json +2 -1
- package/tsconfig.node.json +2 -1
- package/.eslintrc.cjs +0 -3
@@ -32,60 +32,20 @@ export declare const rectangle: {
|
|
32
32
|
};
|
33
33
|
schema: ((propPanelProps: Omit<{
|
34
34
|
rootElement: HTMLDivElement;
|
35
|
-
activeSchema:
|
36
|
-
width: number;
|
37
|
-
height: number;
|
38
|
-
type: string;
|
39
|
-
name: string;
|
40
|
-
position: {
|
41
|
-
x: number;
|
42
|
-
y: number;
|
43
|
-
};
|
44
|
-
id: string;
|
45
|
-
opacity?: number | undefined;
|
46
|
-
rotate?: number | undefined;
|
47
|
-
required?: boolean | undefined;
|
48
|
-
content?: string | undefined;
|
49
|
-
readOnly?: boolean | undefined;
|
50
|
-
__bodyRange?: {
|
51
|
-
start: number;
|
52
|
-
end?: number | undefined;
|
53
|
-
} | undefined;
|
54
|
-
__isSplit?: boolean | undefined;
|
55
|
-
};
|
35
|
+
activeSchema: import("@pdfme/common").SchemaForUI;
|
56
36
|
activeElements: HTMLElement[];
|
57
37
|
changeSchemas: import("@pdfme/common").ChangeSchemas;
|
58
|
-
schemas:
|
59
|
-
width: number;
|
60
|
-
height: number;
|
61
|
-
type: string;
|
62
|
-
name: string;
|
63
|
-
position: {
|
64
|
-
x: number;
|
65
|
-
y: number;
|
66
|
-
};
|
67
|
-
id: string;
|
68
|
-
opacity?: number | undefined;
|
69
|
-
rotate?: number | undefined;
|
70
|
-
required?: boolean | undefined;
|
71
|
-
content?: string | undefined;
|
72
|
-
readOnly?: boolean | undefined;
|
73
|
-
__bodyRange?: {
|
74
|
-
start: number;
|
75
|
-
end?: number | undefined;
|
76
|
-
} | undefined;
|
77
|
-
__isSplit?: boolean | undefined;
|
78
|
-
}[];
|
38
|
+
schemas: import("@pdfme/common").SchemaForUI[];
|
79
39
|
options: import("@pdfme/common").UIOptions;
|
80
40
|
theme: import("antd").GlobalToken;
|
81
|
-
i18n: (key: string) => string;
|
82
|
-
}, "rootElement">) => Record<string,
|
83
|
-
widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void
|
41
|
+
i18n: (key: keyof import("@pdfme/common").Dict | string) => string;
|
42
|
+
}, "rootElement">) => Record<string, import("@pdfme/common").PropPanelSchema>) | Record<string, import("@pdfme/common").PropPanelSchema>;
|
43
|
+
widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void>;
|
84
44
|
};
|
85
45
|
icon: string;
|
86
|
-
pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => void |
|
87
|
-
ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => void |
|
88
|
-
uninterruptedEditMode?: boolean
|
46
|
+
pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => Promise<void> | void;
|
47
|
+
ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => Promise<void> | void;
|
48
|
+
uninterruptedEditMode?: boolean;
|
89
49
|
};
|
90
50
|
export declare const ellipse: {
|
91
51
|
propPanel: {
|
@@ -114,59 +74,19 @@ export declare const ellipse: {
|
|
114
74
|
};
|
115
75
|
schema: ((propPanelProps: Omit<{
|
116
76
|
rootElement: HTMLDivElement;
|
117
|
-
activeSchema:
|
118
|
-
width: number;
|
119
|
-
height: number;
|
120
|
-
type: string;
|
121
|
-
name: string;
|
122
|
-
position: {
|
123
|
-
x: number;
|
124
|
-
y: number;
|
125
|
-
};
|
126
|
-
id: string;
|
127
|
-
opacity?: number | undefined;
|
128
|
-
rotate?: number | undefined;
|
129
|
-
required?: boolean | undefined;
|
130
|
-
content?: string | undefined;
|
131
|
-
readOnly?: boolean | undefined;
|
132
|
-
__bodyRange?: {
|
133
|
-
start: number;
|
134
|
-
end?: number | undefined;
|
135
|
-
} | undefined;
|
136
|
-
__isSplit?: boolean | undefined;
|
137
|
-
};
|
77
|
+
activeSchema: import("@pdfme/common").SchemaForUI;
|
138
78
|
activeElements: HTMLElement[];
|
139
79
|
changeSchemas: import("@pdfme/common").ChangeSchemas;
|
140
|
-
schemas:
|
141
|
-
width: number;
|
142
|
-
height: number;
|
143
|
-
type: string;
|
144
|
-
name: string;
|
145
|
-
position: {
|
146
|
-
x: number;
|
147
|
-
y: number;
|
148
|
-
};
|
149
|
-
id: string;
|
150
|
-
opacity?: number | undefined;
|
151
|
-
rotate?: number | undefined;
|
152
|
-
required?: boolean | undefined;
|
153
|
-
content?: string | undefined;
|
154
|
-
readOnly?: boolean | undefined;
|
155
|
-
__bodyRange?: {
|
156
|
-
start: number;
|
157
|
-
end?: number | undefined;
|
158
|
-
} | undefined;
|
159
|
-
__isSplit?: boolean | undefined;
|
160
|
-
}[];
|
80
|
+
schemas: import("@pdfme/common").SchemaForUI[];
|
161
81
|
options: import("@pdfme/common").UIOptions;
|
162
82
|
theme: import("antd").GlobalToken;
|
163
|
-
i18n: (key: string) => string;
|
164
|
-
}, "rootElement">) => Record<string,
|
165
|
-
widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void
|
83
|
+
i18n: (key: keyof import("@pdfme/common").Dict | string) => string;
|
84
|
+
}, "rootElement">) => Record<string, import("@pdfme/common").PropPanelSchema>) | Record<string, import("@pdfme/common").PropPanelSchema>;
|
85
|
+
widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void>;
|
166
86
|
};
|
167
87
|
icon: string;
|
168
|
-
pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => void |
|
169
|
-
ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => void |
|
170
|
-
uninterruptedEditMode?: boolean
|
88
|
+
pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => Promise<void> | void;
|
89
|
+
ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => Promise<void> | void;
|
90
|
+
uninterruptedEditMode?: boolean;
|
171
91
|
};
|
172
92
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const getDefaultCellStyles: () => {
|
2
2
|
fontName: undefined;
|
3
|
-
alignment: import("../text/types").ALIGNMENT;
|
4
|
-
verticalAlignment: import("../text/types").VERTICAL_ALIGNMENT;
|
3
|
+
alignment: import("../text/types.js").ALIGNMENT;
|
4
|
+
verticalAlignment: import("../text/types.js").VERTICAL_ALIGNMENT;
|
5
5
|
fontSize: number;
|
6
6
|
lineHeight: number;
|
7
7
|
characterSpacing: number;
|
@@ -25,7 +25,7 @@ export declare const getCellPropPanelSchema: (arg: {
|
|
25
25
|
i18n: (key: string) => string;
|
26
26
|
fallbackFontName: string;
|
27
27
|
fontNames: string[];
|
28
|
-
isBody?: boolean
|
28
|
+
isBody?: boolean;
|
29
29
|
}) => {
|
30
30
|
'-': {
|
31
31
|
type: string;
|
@@ -182,7 +182,7 @@ export declare const getCellPropPanelSchema: (arg: {
|
|
182
182
|
props: {
|
183
183
|
options: {
|
184
184
|
label: string;
|
185
|
-
value: import("../text/types").ALIGNMENT;
|
185
|
+
value: import("../text/types.js").ALIGNMENT;
|
186
186
|
}[];
|
187
187
|
};
|
188
188
|
span: number;
|
@@ -194,7 +194,7 @@ export declare const getCellPropPanelSchema: (arg: {
|
|
194
194
|
props: {
|
195
195
|
options: {
|
196
196
|
label: string;
|
197
|
-
value: import("../text/types").VERTICAL_ALIGNMENT;
|
197
|
+
value: import("../text/types.js").VERTICAL_ALIGNMENT;
|
198
198
|
}[];
|
199
199
|
};
|
200
200
|
span: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ALIGNMENT, VERTICAL_ALIGNMENT, DYNAMIC_FONT_SIZE_FIT } from './types';
|
1
|
+
import { ALIGNMENT, VERTICAL_ALIGNMENT, DYNAMIC_FONT_SIZE_FIT } from './types.js';
|
2
2
|
export declare const DEFAULT_FONT_SIZE = 13;
|
3
3
|
export declare const ALIGN_LEFT: ALIGNMENT;
|
4
4
|
export declare const ALIGN_CENTER: ALIGNMENT;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as fontkit from 'fontkit';
|
2
2
|
import type { Font as FontKitFont } from 'fontkit';
|
3
3
|
import { Font } from '@pdfme/common';
|
4
|
-
import type { TextSchema, FontWidthCalcValues } from './types';
|
4
|
+
import type { TextSchema, FontWidthCalcValues } from './types.js';
|
5
5
|
export declare const getBrowserVerticalFontAdjustments: (fontKitFont: FontKitFont, fontSize: number, lineHeight: number, verticalAlignment: string) => {
|
6
6
|
topAdj: number;
|
7
7
|
bottomAdj: number;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { Font as FontKitFont } from 'fontkit';
|
2
2
|
import { UIRenderProps } from '@pdfme/common';
|
3
|
-
import type { TextSchema } from './types';
|
3
|
+
import type { TextSchema } from './types.js';
|
4
4
|
export declare const uiRender: (arg: UIRenderProps<TextSchema>) => Promise<void>;
|
5
5
|
export declare const buildStyledTextContainer: (arg: UIRenderProps<TextSchema>, fontKitFont: FontKitFont, value: string) => HTMLDivElement;
|
6
6
|
/**
|
@@ -4,7 +4,7 @@ import { IconNode } from 'lucide';
|
|
4
4
|
export declare const convertForPdfLayoutProps: ({ schema, pageHeight, applyRotateTranslate, }: {
|
5
5
|
schema: Schema;
|
6
6
|
pageHeight: number;
|
7
|
-
applyRotateTranslate?: boolean
|
7
|
+
applyRotateTranslate?: boolean;
|
8
8
|
}) => {
|
9
9
|
position: {
|
10
10
|
x: number;
|
@@ -26,90 +26,9 @@ export declare const rotatePoint: (point: {
|
|
26
26
|
y: number;
|
27
27
|
};
|
28
28
|
export declare const getDynamicHeightsForTable: (value: string, args: {
|
29
|
-
schema:
|
30
|
-
|
31
|
-
|
32
|
-
content: import("zod").ZodOptional<import("zod").ZodString>;
|
33
|
-
position: import("zod").ZodObject<{
|
34
|
-
x: import("zod").ZodNumber;
|
35
|
-
y: import("zod").ZodNumber;
|
36
|
-
}, "strip", import("zod").ZodTypeAny, {
|
37
|
-
x: number;
|
38
|
-
y: number;
|
39
|
-
}, {
|
40
|
-
x: number;
|
41
|
-
y: number;
|
42
|
-
}>;
|
43
|
-
width: import("zod").ZodNumber;
|
44
|
-
height: import("zod").ZodNumber;
|
45
|
-
rotate: import("zod").ZodOptional<import("zod").ZodNumber>;
|
46
|
-
opacity: import("zod").ZodOptional<import("zod").ZodNumber>;
|
47
|
-
readOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
48
|
-
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
49
|
-
__bodyRange: import("zod").ZodOptional<import("zod").ZodObject<{
|
50
|
-
start: import("zod").ZodNumber;
|
51
|
-
end: import("zod").ZodOptional<import("zod").ZodNumber>;
|
52
|
-
}, "strip", import("zod").ZodTypeAny, {
|
53
|
-
start: number;
|
54
|
-
end?: number | undefined;
|
55
|
-
}, {
|
56
|
-
start: number;
|
57
|
-
end?: number | undefined;
|
58
|
-
}>>;
|
59
|
-
__isSplit: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
60
|
-
}, import("zod").ZodTypeAny, "passthrough">;
|
61
|
-
basePdf: string | Uint8Array | ArrayBuffer | {
|
62
|
-
width: number;
|
63
|
-
height: number;
|
64
|
-
padding: [number, number, number, number];
|
65
|
-
staticSchema?: import("zod").objectOutputType<{
|
66
|
-
name: import("zod").ZodString;
|
67
|
-
type: import("zod").ZodString;
|
68
|
-
content: import("zod").ZodOptional<import("zod").ZodString>;
|
69
|
-
position: import("zod").ZodObject<{
|
70
|
-
x: import("zod").ZodNumber;
|
71
|
-
y: import("zod").ZodNumber;
|
72
|
-
}, "strip", import("zod").ZodTypeAny, {
|
73
|
-
x: number;
|
74
|
-
y: number;
|
75
|
-
}, {
|
76
|
-
x: number;
|
77
|
-
y: number;
|
78
|
-
}>;
|
79
|
-
width: import("zod").ZodNumber;
|
80
|
-
height: import("zod").ZodNumber;
|
81
|
-
rotate: import("zod").ZodOptional<import("zod").ZodNumber>;
|
82
|
-
opacity: import("zod").ZodOptional<import("zod").ZodNumber>;
|
83
|
-
readOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
84
|
-
required: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
85
|
-
__bodyRange: import("zod").ZodOptional<import("zod").ZodObject<{
|
86
|
-
start: import("zod").ZodNumber;
|
87
|
-
end: import("zod").ZodOptional<import("zod").ZodNumber>;
|
88
|
-
}, "strip", import("zod").ZodTypeAny, {
|
89
|
-
start: number;
|
90
|
-
end?: number | undefined;
|
91
|
-
}, {
|
92
|
-
start: number;
|
93
|
-
end?: number | undefined;
|
94
|
-
}>>;
|
95
|
-
__isSplit: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
96
|
-
}, import("zod").ZodTypeAny, "passthrough">[] | undefined;
|
97
|
-
};
|
98
|
-
options: import("zod").objectOutputType<{
|
99
|
-
font: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
|
100
|
-
data: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodType<ArrayBuffer, import("zod").ZodTypeDef, ArrayBuffer>, import("zod").ZodType<Uint8Array, import("zod").ZodTypeDef, Uint8Array>]>;
|
101
|
-
fallback: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
102
|
-
subset: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
103
|
-
}, "strip", import("zod").ZodTypeAny, {
|
104
|
-
data: string | Uint8Array | ArrayBuffer;
|
105
|
-
fallback?: boolean | undefined;
|
106
|
-
subset?: boolean | undefined;
|
107
|
-
}, {
|
108
|
-
data: string | Uint8Array | ArrayBuffer;
|
109
|
-
fallback?: boolean | undefined;
|
110
|
-
subset?: boolean | undefined;
|
111
|
-
}>>>;
|
112
|
-
}, import("zod").ZodTypeAny, "passthrough">;
|
29
|
+
schema: Schema;
|
30
|
+
basePdf: import("@pdfme/common").BasePdf;
|
31
|
+
options: import("@pdfme/common").CommonOptions;
|
113
32
|
_cache: Map<any, any>;
|
114
33
|
}) => Promise<number[]>;
|
115
34
|
export declare const addAlphaToHex: (hex: string, alphaPercentage: number) => string;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { fileURLToPath } from 'url';
|
2
|
+
import { dirname, resolve } from 'path';
|
3
|
+
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
5
|
+
const __dirname = dirname(__filename);
|
6
|
+
|
7
|
+
// Import the root config
|
8
|
+
const rootConfigPath = resolve(__dirname, '../../eslint.config.mjs');
|
9
|
+
const rootConfig = await import(rootConfigPath);
|
10
|
+
|
11
|
+
export default [
|
12
|
+
...rootConfig.default,
|
13
|
+
{
|
14
|
+
files: ['src/**/*.ts'],
|
15
|
+
languageOptions: {
|
16
|
+
parserOptions: {
|
17
|
+
project: ['./tsconfig.esm.json'],
|
18
|
+
tsconfigRootDir: __dirname,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
},
|
22
|
+
];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/schemas",
|
3
|
-
"version": "5.3.
|
3
|
+
"version": "5.3.9-dev.1",
|
4
4
|
"sideEffects": false,
|
5
5
|
"author": "hand-dot",
|
6
6
|
"license": "MIT",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"build:esm": "tsc -p tsconfig.esm.json",
|
50
50
|
"build:node": "tsc -p tsconfig.node.json",
|
51
51
|
"clean": "rimraf dist",
|
52
|
-
"lint": "eslint --ext .ts src",
|
52
|
+
"lint": "eslint --ext .ts src --config eslint.config.mjs --no-error-on-unmatched-pattern",
|
53
53
|
"test": "jest",
|
54
54
|
"prune": "ts-prune src",
|
55
55
|
"prettier": "prettier --write 'src/**/*.ts'"
|
@@ -59,9 +59,8 @@
|
|
59
59
|
"air-datepicker": "^3.5.3",
|
60
60
|
"bwip-js": "^4.1.1",
|
61
61
|
"date-fns": "^4.1.0",
|
62
|
-
"fast-xml-parser": "^4.3.2",
|
63
62
|
"fontkit": "^2.0.2",
|
64
|
-
"lucide": "^0.
|
63
|
+
"lucide": "^0.477.0"
|
65
64
|
},
|
66
65
|
"devDependencies": {
|
67
66
|
"@pdfme/common": "file:../common",
|
package/src/barcodes/helper.ts
CHANGED
@@ -2,7 +2,7 @@ import { b64toUint8Array } from '@pdfme/common';
|
|
2
2
|
import bwipjs, { RenderOptions } from 'bwip-js';
|
3
3
|
import { Buffer } from 'buffer';
|
4
4
|
import { BARCODE_TYPES, DEFAULT_BARCODE_INCLUDETEXT } from './constants.js';
|
5
|
-
import { BarcodeTypes } from './types';
|
5
|
+
import { BarcodeTypes } from './types.js';
|
6
6
|
|
7
7
|
// GTIN-13, GTIN-8, GTIN-12, GTIN-14
|
8
8
|
const validateCheckDigit = (input: string, checkDigitPos: number) => {
|
@@ -63,7 +63,7 @@ export const validateBarcodeInput = (type: BarcodeTypes, input: string) => {
|
|
63
63
|
// 有効文字は漢字、ひらがな、カタカナ以外。
|
64
64
|
// https://qiita.com/graminume/items/2ac8dd9c32277fa9da64
|
65
65
|
return !input.match(
|
66
|
-
/([\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]|[A-Za-z0-9!"#$%&'()*+,-./:;<=>?@[\]^_`{|}〜 ])
|
66
|
+
/([\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]|[A-Za-z0-9!"#$%&'()*+,-./:;<=>?@[\]^_`{|}〜 ])+/,
|
67
67
|
);
|
68
68
|
}
|
69
69
|
if (type === 'nw7') {
|
@@ -169,11 +169,10 @@ export const createBarCode = async (arg: {
|
|
169
169
|
// @ts-ignore
|
170
170
|
bwipjs.toCanvas(canvas, bwipjsArg);
|
171
171
|
const dataUrl = canvas.toDataURL('image/png');
|
172
|
-
res = b64toUint8Array(dataUrl).buffer
|
172
|
+
res = Buffer.from(b64toUint8Array(dataUrl).buffer);
|
173
173
|
} else {
|
174
174
|
res = await bwipjs.toBuffer(bwipjsArg);
|
175
175
|
}
|
176
176
|
|
177
177
|
return res;
|
178
178
|
};
|
179
|
-
|
package/src/barcodes/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { pdfRender } from './pdfRender.js';
|
2
2
|
import { getPropPanelByBarcodeType } from './propPanel.js';
|
3
3
|
import { uiRender } from './uiRender.js';
|
4
|
-
import type { BarcodeSchema, BarcodeTypes } from './types';
|
4
|
+
import type { BarcodeSchema, BarcodeTypes } from './types.js';
|
5
5
|
import { BARCODE_TYPES } from './constants.js';
|
6
6
|
import { createSvgStr } from '../utils.js';
|
7
7
|
import { Plugin } from '@pdfme/common';
|
@@ -17,7 +17,7 @@ const barcodes = BARCODE_TYPES.reduce(
|
|
17
17
|
icon: createSvgStr(type == 'qrcode' ? QrCode : Barcode),
|
18
18
|
},
|
19
19
|
}),
|
20
|
-
{} as Record<BarcodeTypes, Plugin<BarcodeSchema
|
20
|
+
{} as Record<BarcodeTypes, Plugin<BarcodeSchema>>,
|
21
21
|
);
|
22
22
|
|
23
23
|
export default barcodes;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PDFRenderProps } from '@pdfme/common';
|
2
2
|
import { convertForPdfLayoutProps } from '../utils.js';
|
3
|
-
import type { BarcodeSchema } from './types';
|
3
|
+
import type { BarcodeSchema } from './types.js';
|
4
4
|
import { createBarCode, validateBarcodeInput } from './helper.js';
|
5
5
|
|
6
6
|
const getBarcodeCacheKey = (schema: BarcodeSchema, value: string) => {
|
@@ -15,7 +15,7 @@ export const pdfRender = async (arg: PDFRenderProps<BarcodeSchema>) => {
|
|
15
15
|
let image = _cache.get(inputBarcodeCacheKey);
|
16
16
|
if (!image) {
|
17
17
|
const imageBuf = await createBarCode(
|
18
|
-
Object.assign(schema, { type: schema.type, input: value })
|
18
|
+
Object.assign(schema, { type: schema.type, input: value }),
|
19
19
|
);
|
20
20
|
image = await pdfDoc.embedPng(imageBuf);
|
21
21
|
_cache.set(inputBarcodeCacheKey, image);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { PropPanel } from '@pdfme/common';
|
2
|
-
import type { BarcodeSchema } from './types';
|
2
|
+
import type { BarcodeSchema } from './types.js';
|
3
3
|
import {
|
4
4
|
DEFAULT_BARCODE_COLOR,
|
5
5
|
DEFAULT_BARCODE_BG_COLOR,
|
@@ -16,7 +16,6 @@ const defaultIncludetext = { includetext: DEFAULT_BARCODE_INCLUDETEXT };
|
|
16
16
|
const position = { x: 0, y: 0 };
|
17
17
|
const default40x20 = { width: 40, height: 20 };
|
18
18
|
|
19
|
-
|
20
19
|
const barcodeDefaults: { defaultSchema: BarcodeSchema }[] = [
|
21
20
|
{
|
22
21
|
defaultSchema: {
|
@@ -190,7 +189,7 @@ export const getPropPanelByBarcodeType = (barcodeType: string): PropPanel<Barcod
|
|
190
189
|
type: 'string',
|
191
190
|
widget: 'color',
|
192
191
|
props: {
|
193
|
-
disabledAlpha: true
|
192
|
+
disabledAlpha: true,
|
194
193
|
},
|
195
194
|
rules: [
|
196
195
|
{
|
@@ -204,7 +203,7 @@ export const getPropPanelByBarcodeType = (barcodeType: string): PropPanel<Barcod
|
|
204
203
|
type: 'string',
|
205
204
|
widget: 'color',
|
206
205
|
props: {
|
207
|
-
disabledAlpha: true
|
206
|
+
disabledAlpha: true,
|
208
207
|
},
|
209
208
|
rules: [
|
210
209
|
{
|
@@ -220,7 +219,7 @@ export const getPropPanelByBarcodeType = (barcodeType: string): PropPanel<Barcod
|
|
220
219
|
type: 'string',
|
221
220
|
widget: 'color',
|
222
221
|
props: {
|
223
|
-
disabledAlpha: true
|
222
|
+
disabledAlpha: true,
|
224
223
|
},
|
225
224
|
},
|
226
225
|
includetext: {
|
package/src/barcodes/uiRender.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type * as CSS from 'csstype';
|
2
2
|
import { UIRenderProps } from '@pdfme/common';
|
3
|
-
import type { BarcodeSchema } from './types';
|
3
|
+
import type { BarcodeSchema } from './types.js';
|
4
4
|
import { validateBarcodeInput, createBarCode } from './helper.js';
|
5
5
|
import { addAlphaToHex, isEditable, createErrorElm } from '../utils.js';
|
6
6
|
|
package/src/checkbox/index.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Plugin } from '@pdfme/common';
|
2
2
|
import { Schema } from '@pdfme/common';
|
3
|
-
import svg from '../graphics/svg';
|
3
|
+
import svg from '../graphics/svg.js';
|
4
4
|
import { isEditable } from '../utils.js';
|
5
5
|
import { HEX_COLOR_PATTERN } from '../constants.js';
|
6
6
|
import { Square, SquareCheck } from 'lucide';
|
@@ -49,7 +49,7 @@ const schema: Plugin<Checkbox> = {
|
|
49
49
|
type: 'string',
|
50
50
|
widget: 'color',
|
51
51
|
props: {
|
52
|
-
disabledAlpha: true
|
52
|
+
disabledAlpha: true,
|
53
53
|
},
|
54
54
|
required: true,
|
55
55
|
rules: [{ pattern: HEX_COLOR_PATTERN, message: i18n('validation.hexColor') }],
|
package/src/date/date.ts
CHANGED
package/src/date/dateTime.ts
CHANGED