@pdfme/ui 1.0.0-beta.2 → 1.0.0-beta.7
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/index.js +3 -0
- package/dist/{@pdfme/ui.js.LICENSE.txt → index.js.LICENSE.txt} +3 -1
- package/dist/index.js.map +1 -0
- package/dist/types/{ui/src/Designer.d.ts → Designer.d.ts} +0 -0
- package/dist/types/{ui/src/Form.d.ts → Form.d.ts} +0 -0
- package/dist/types/{ui/src/Viewer.d.ts → Viewer.d.ts} +0 -0
- package/dist/types/{ui/src/libs/class.d.ts → class.d.ts} +7 -19
- package/dist/types/{ui/src/components → components}/Designer/Main/Guides.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Main/Mask.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Main/Moveable.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Main/Selecto.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Main/index.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/ExampleInputEditor.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/PositionAndSizeEditor.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/TextPropEditor.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/TypeAndKeyEditor.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/index.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/ListView.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Designer/Sidebar/index.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Designer/index.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Divider.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Error.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Paper.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Preview/Pager/Page.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Preview/Pager/Unit.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Preview/index.d.ts +0 -1
- package/dist/types/{ui/src/components → components}/Root.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Schemas/BarcodeSchema.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Schemas/ImageSchema.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Schemas/SchemaUI.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Schemas/TextSchema.d.ts +0 -0
- package/dist/types/{ui/src/components → components}/Spinner.d.ts +0 -0
- package/dist/types/{ui/src/constants.d.ts → constants.d.ts} +0 -0
- package/dist/types/{ui/src/libs/contexts.d.ts → contexts.d.ts} +0 -0
- package/dist/types/{ui/src/helper.d.ts → helper.d.ts} +0 -0
- package/dist/types/{ui/src/hooks.d.ts → hooks.d.ts} +0 -0
- package/dist/types/{ui/src/i18n.d.ts → i18n.d.ts} +0 -0
- package/dist/types/index.d.ts +6 -0
- package/package.json +8 -5
- package/src/helper.ts +1 -1
- package/src/index.ts +5 -41
- package/tsconfig.json +1 -0
- package/webpack.config.js +1 -2
- package/dist/@pdfme/ui.js +0 -3
- package/dist/@pdfme/ui.js.map +0 -1
- package/dist/types/common/src/barcode.d.ts +0 -2
- package/dist/types/common/src/constants.d.ts +0 -6
- package/dist/types/common/src/helper.d.ts +0 -15
- package/dist/types/common/src/index.d.ts +0 -4
- package/dist/types/common/src/schema.d.ts +0 -3613
- package/dist/types/common/src/type.d.ts +0 -64
- package/dist/types/common/src/utils.d.ts +0 -12
- package/dist/types/ui/src/class.d.ts +0 -72
- package/dist/types/ui/src/contexts.d.ts +0 -7
- package/dist/types/ui/src/index.d.ts +0 -5
- package/dist/types/ui/src/libs/helper.d.ts +0 -64
- package/dist/types/ui/src/libs/hooks.d.ts +0 -26
- package/dist/types/ui/src/libs/i18n.d.ts +0 -30
- package/dist/types/ui/src/libs/ui.d.ts +0 -64
File without changes
|
File without changes
|
File without changes
|
@@ -1,15 +1,4 @@
|
|
1
|
-
import { Template, Size, UIProps, PreviewProps
|
2
|
-
interface CommonConstructor {
|
3
|
-
domContainer: HTMLElement;
|
4
|
-
template: Template;
|
5
|
-
options?: UIOptions;
|
6
|
-
}
|
7
|
-
export declare type DesignerConstructor = CommonConstructor;
|
8
|
-
export declare type PreviewUIConstructor = CommonConstructor & {
|
9
|
-
inputs: {
|
10
|
-
[key: string]: string;
|
11
|
-
}[];
|
12
|
-
};
|
1
|
+
import { Template, Size, UIProps, PreviewProps } from '@pdfme/common';
|
13
2
|
export declare abstract class BaseUIClass {
|
14
3
|
protected domContainer: HTMLElement | null;
|
15
4
|
protected template: Template;
|
@@ -37,30 +26,30 @@ export declare abstract class BaseUIClass {
|
|
37
26
|
characterSpacing?: number | undefined;
|
38
27
|
lineHeight?: number | undefined;
|
39
28
|
type: "text";
|
40
|
-
height: number;
|
41
|
-
width: number;
|
42
29
|
position: {
|
43
30
|
x: number;
|
44
31
|
y: number;
|
45
32
|
};
|
33
|
+
width: number;
|
34
|
+
height: number;
|
46
35
|
} | {
|
47
36
|
rotate?: number | undefined;
|
48
37
|
type: "image";
|
49
|
-
height: number;
|
50
|
-
width: number;
|
51
38
|
position: {
|
52
39
|
x: number;
|
53
40
|
y: number;
|
54
41
|
};
|
42
|
+
width: number;
|
43
|
+
height: number;
|
55
44
|
} | {
|
56
45
|
rotate?: number | undefined;
|
57
46
|
type: "qrcode" | "japanpost" | "ean13" | "ean8" | "code39" | "code128" | "nw7" | "itf14" | "upca" | "upce";
|
58
|
-
height: number;
|
59
|
-
width: number;
|
60
47
|
position: {
|
61
48
|
x: number;
|
62
49
|
y: number;
|
63
50
|
};
|
51
|
+
width: number;
|
52
|
+
height: number;
|
64
53
|
}>[];
|
65
54
|
basePdf: string | ArrayBuffer | Uint8Array;
|
66
55
|
};
|
@@ -81,4 +70,3 @@ export declare abstract class PreviewUI extends BaseUIClass {
|
|
81
70
|
}[]): void;
|
82
71
|
protected abstract render(): void;
|
83
72
|
}
|
84
|
-
export {};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/dist/types/{ui/src/components → components}/Designer/Sidebar/DetailView/TextPropEditor.d.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import Designer from './Designer';
|
2
|
+
import Form from './Form';
|
3
|
+
import Viewer from './Viewer';
|
4
|
+
export { Designer, Viewer, Form };
|
5
|
+
export type { Lang, Size, Alignment, SchemaType, BarCodeType, TextSchema, ImageSchema, BarcodeSchema, Schema, SchemaForUI, Font, BasePdf, Template, CommonProps, GeneratorOptions, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, } from '@pdfme/common';
|
6
|
+
export { BLANK_PDF, isTextSchema, isImageSchema, isBarcodeSchema, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, validateBarcodeInput, } from '@pdfme/common';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/ui",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.7",
|
4
4
|
"author": "hand-dot",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "TypeScript base PDF generator and React base UI. Open source, developed by the community, and completely free to use under the MIT license!",
|
@@ -9,8 +9,8 @@
|
|
9
9
|
"bugs": {
|
10
10
|
"url": "https://github.com/pdfme/pdfme/issues"
|
11
11
|
},
|
12
|
-
"main": "dist
|
13
|
-
"module": "
|
12
|
+
"main": "dist/index.js",
|
13
|
+
"module": "dist/index.js",
|
14
14
|
"types": "dist/types/index.d.ts",
|
15
15
|
"engines": {
|
16
16
|
"node": ">=14"
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"prune": "ts-prune src"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@pdfme/common": "^1.0.0-beta.
|
29
|
+
"@pdfme/common": "^1.0.0-beta.7",
|
30
30
|
"@scena/react-guides": "^0.16.0",
|
31
31
|
"hotkeys-js": "^3.8.7",
|
32
32
|
"pdfjs-dist": "^2.12.313",
|
@@ -76,5 +76,8 @@
|
|
76
76
|
"**/*.test.ts",
|
77
77
|
"**/*.test.tsx"
|
78
78
|
]
|
79
|
+
},
|
80
|
+
"publishConfig": {
|
81
|
+
"access": "public"
|
79
82
|
}
|
80
|
-
}
|
83
|
+
}
|
package/src/helper.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// @ts-ignore
|
2
2
|
import PDFJSWorker from 'pdfjs-dist/build/pdf.worker.entry';
|
3
|
-
import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist';
|
3
|
+
import { getDocument, GlobalWorkerOptions } from 'pdfjs-dist/legacy/build/pdf.js';
|
4
4
|
GlobalWorkerOptions.workerSrc = PDFJSWorker;
|
5
5
|
import hotkeys from 'hotkeys-js';
|
6
6
|
import {
|
package/src/index.ts
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
import Designer from './Designer';
|
2
2
|
import Form from './Form';
|
3
3
|
import Viewer from './Viewer';
|
4
|
-
|
5
|
-
|
4
|
+
|
5
|
+
export { Designer, Viewer, Form };
|
6
|
+
|
7
|
+
export type {
|
6
8
|
Lang,
|
7
9
|
Size,
|
8
10
|
Alignment,
|
9
11
|
SchemaType,
|
10
|
-
schemaTypes,
|
11
12
|
BarCodeType,
|
12
13
|
TextSchema,
|
13
|
-
isTextSchema,
|
14
14
|
ImageSchema,
|
15
|
-
isImageSchema,
|
16
15
|
BarcodeSchema,
|
17
|
-
isBarcodeSchema,
|
18
16
|
Schema,
|
19
17
|
SchemaForUI,
|
20
18
|
Font,
|
@@ -26,52 +24,18 @@ import {
|
|
26
24
|
UIOptions,
|
27
25
|
UIProps,
|
28
26
|
PreviewProps,
|
29
|
-
PreviewReactProps,
|
30
27
|
DesignerProps,
|
31
|
-
DesignerReactProps,
|
32
|
-
checkTemplate,
|
33
|
-
checkUIProps,
|
34
|
-
checkPreviewProps,
|
35
|
-
checkDesignerProps,
|
36
|
-
checkGenerateProps,
|
37
|
-
validateBarcodeInput,
|
38
28
|
} from '@pdfme/common';
|
39
29
|
|
40
30
|
export {
|
41
|
-
Designer,
|
42
|
-
Viewer,
|
43
|
-
Form,
|
44
31
|
BLANK_PDF,
|
45
|
-
Lang,
|
46
|
-
Size,
|
47
|
-
Alignment,
|
48
|
-
SchemaType,
|
49
|
-
schemaTypes,
|
50
|
-
BarCodeType,
|
51
|
-
TextSchema,
|
52
32
|
isTextSchema,
|
53
|
-
ImageSchema,
|
54
33
|
isImageSchema,
|
55
|
-
BarcodeSchema,
|
56
34
|
isBarcodeSchema,
|
57
|
-
Schema,
|
58
|
-
SchemaForUI,
|
59
|
-
Font,
|
60
|
-
BasePdf,
|
61
|
-
Template,
|
62
|
-
CommonProps,
|
63
|
-
GeneratorOptions,
|
64
|
-
GenerateProps,
|
65
|
-
UIOptions,
|
66
|
-
UIProps,
|
67
|
-
PreviewProps,
|
68
|
-
PreviewReactProps,
|
69
|
-
DesignerProps,
|
70
|
-
DesignerReactProps,
|
71
35
|
checkTemplate,
|
72
36
|
checkUIProps,
|
73
37
|
checkPreviewProps,
|
74
38
|
checkDesignerProps,
|
75
39
|
checkGenerateProps,
|
76
40
|
validateBarcodeInput,
|
77
|
-
};
|
41
|
+
} from '@pdfme/common';
|
package/tsconfig.json
CHANGED
package/webpack.config.js
CHANGED