@borurio-print/print-designer 1.0.2 → 1.0.3
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/README.md +130 -128
- package/dist-lib/PrintDesigner.vue.d.ts +26 -1
- package/dist-lib/core/componentRegistry.d.ts +4 -1
- package/dist-lib/core/dataResolver.d.ts +6 -0
- package/dist-lib/core/pdfPageRenderer.d.ts +4 -0
- package/dist-lib/core/printPagination.d.ts +9 -0
- package/dist-lib/core/types.d.ts +169 -5
- package/dist-lib/iconfont-DUQHAX2j.js +35 -0
- package/dist-lib/index-GDGs3f4y.js +10301 -0
- package/dist-lib/index.d.ts +13 -2
- package/dist-lib/{index.es-BwhKze_p.js → index.es-Q3peh10r.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/locales/en-US.d.ts +110 -0
- package/dist-lib/locales/zh-CN.d.ts +110 -0
- package/dist-lib/pdf-BS8Eyhri.js +19080 -0
- package/dist-lib/{pdfGenerator-cShpHBr8.js → pdfGenerator-C9f7apmx.js} +1299 -1238
- package/dist-lib/style.css +1 -1
- package/dist-lib/views/print-designer/components/BarcodeSvgElement.vue.d.ts +2 -0
- package/dist-lib/views/print-designer/components/ComponentPanel.vue.d.ts +10 -4
- package/dist-lib/views/print-designer/components/ElementListPanel.vue.d.ts +7 -1
- package/dist-lib/views/print-designer/components/ElementPropertiesPanel.vue.d.ts +2 -0
- package/dist-lib/views/print-designer/components/ImageSvgElement.vue.d.ts +11 -0
- package/dist-lib/views/print-designer/components/PdfPagesRenderer.vue.d.ts +2 -3
- package/dist-lib/views/print-designer/components/PdfSvgElement.vue.d.ts +11 -0
- package/dist-lib/views/print-designer/components/QrcodeSvgElement.vue.d.ts +2 -0
- package/dist-lib/views/print-designer/components/SvgElementsRenderer.vue.d.ts +6 -2
- package/dist-lib/views/print-designer/components/TableSvgElement.vue.d.ts +12 -0
- package/dist-lib/views/print-designer/components/TemplateInfoPanel.vue.d.ts +2 -1
- package/dist-lib/views/print-designer/components/WorkspaceToolbar.vue.d.ts +4 -0
- package/dist-lib/views/print-designer/components/properties/DisplayTypeProperty.vue.d.ts +12 -0
- package/dist-lib/views/print-designer/components/properties/PdfCropModeProperty.vue.d.ts +12 -0
- package/dist-lib/views/print-designer/components/properties/PdfCropRatioProperty.vue.d.ts +12 -0
- package/dist-lib/views/print-designer/components/properties/PositionProperty.vue.d.ts +12 -0
- package/dist-lib/views/print-designer/components/properties/TableConfigProperty.vue.d.ts +12 -0
- package/package.json +4 -1
- package/dist-lib/iconfont-BnrPP-u4.js +0 -35
- package/dist-lib/index-B7uQiXj_.js +0 -6971
package/dist-lib/index.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import './designer.css';
|
|
2
2
|
import type { DefineComponent } from 'vue';
|
|
3
|
+
import type { BusinessFieldGroup, PrintResult } from './core/types';
|
|
3
4
|
/**
|
|
4
5
|
* 公共组件类型仅使用 Vue 3.2 已经提供的 DefineComponent 签名。
|
|
5
6
|
* 这样业务项目不会被生成声明中 Vue 3.5 新增的内部类型强制升级。
|
|
6
7
|
*/
|
|
7
|
-
export
|
|
8
|
+
export interface PrintDesignerProps {
|
|
9
|
+
fieldGroups?: readonly BusinessFieldGroup[];
|
|
10
|
+
onPrintResult?: (result: PrintResult) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface PrintDesignerExpose {
|
|
13
|
+
getTemplate: () => import('./core/types').PrintTemplate;
|
|
14
|
+
loadTemplate: (template: import('./core/types').PrintTemplate) => void;
|
|
15
|
+
generatePdf: (data: unknown) => Promise<Blob>;
|
|
16
|
+
previewPdf: (data: unknown) => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export type PrintDesignerComponent = DefineComponent<PrintDesignerProps, object, any>;
|
|
8
19
|
export interface IconFontProps {
|
|
9
20
|
name: string;
|
|
10
21
|
size?: number | string;
|
|
@@ -17,4 +28,4 @@ export { default as enUS } from './locales/en-US';
|
|
|
17
28
|
export { default as zhCN } from './locales/zh-CN';
|
|
18
29
|
export { formatDesignerDate, formatDesignerDateTime, isTextStyleElement, resolveDesignerText, } from './core/dynamicText';
|
|
19
30
|
export type { DynamicTextContext } from './core/dynamicText';
|
|
20
|
-
export type { BarcodeDesignerElement, BaseDesignerElement, DesignerElement, DesignerElementType, DynamicTextBaseDesignerElement, ElementPropertyConfig, ElementPropertyKey, ElementPropertyValue, ElementTransformPatch, LineDesignerElement, PageNumberDesignerElement, QrcodeDesignerElement, RectangleDesignerElement, ResizeHandle, SerialNumberDesignerElement, TemplateInfo, TemplateSize, TextDesignerElement, TextStyleDesignerElement, TimeDesignerElement, TimeMode, } from './core/types';
|
|
31
|
+
export type { BarcodeDesignerElement, BaseDesignerElement, BusinessField, BusinessFieldGroup, DesignerElement, DesignerElementType, DynamicTextBaseDesignerElement, ElementPropertyConfig, ElementPropertyKey, ElementPropertyValue, ElementTransformPatch, FieldElementType, ImageDesignerElement, LineDesignerElement, PageNumberDesignerElement, PdfCropMode, PdfDesignerElement, PrintTemplate, PrintRenderPage, PrintResult, QrcodeDesignerElement, RectangleDesignerElement, ResizeHandle, SerialNumberDesignerElement, TableColumn, TableColumnAlign, TableColumnType, TableColumnWidthMode, TableConfigValue, TableDesignerElement, TableGroupHeaderCell, TableMode, TableRuntimeData, TableRuntimeGroup, TemplateInfo, TemplateMode, TemplatePage, TemplateSize, TextDesignerElement, TextStyleDesignerElement, TimeDesignerElement, TimeMode, } from './core/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Ta, g as Hu } from "./index-
|
|
2
|
-
import { _ as Ea } from "./pdfGenerator-
|
|
1
|
+
import { c as Ta, g as Hu } from "./index-GDGs3f4y.js";
|
|
2
|
+
import { _ as Ea } from "./pdfGenerator-C9f7apmx.js";
|
|
3
3
|
var Ja = {}, en = {}, ir, rn;
|
|
4
4
|
function Q() {
|
|
5
5
|
if (rn) return ir;
|
package/dist-lib/index.js
CHANGED
|
@@ -4,6 +4,11 @@ declare const _default: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
edit: string;
|
|
6
6
|
name: string;
|
|
7
|
+
templateType: string;
|
|
8
|
+
singleTemplate: string;
|
|
9
|
+
dualTemplate: string;
|
|
10
|
+
firstTemplate: string;
|
|
11
|
+
continuationTemplate: string;
|
|
7
12
|
size: string;
|
|
8
13
|
dialogTitle: string;
|
|
9
14
|
namePlaceholder: string;
|
|
@@ -17,6 +22,11 @@ declare const _default: {
|
|
|
17
22
|
nameMaxLength: string;
|
|
18
23
|
sizeRange: string;
|
|
19
24
|
};
|
|
25
|
+
quickSizes: string;
|
|
26
|
+
quickSize50x30: string;
|
|
27
|
+
quickSize100x100: string;
|
|
28
|
+
quickSize100x150: string;
|
|
29
|
+
quickSizeA4: string;
|
|
20
30
|
};
|
|
21
31
|
components: {
|
|
22
32
|
title: string;
|
|
@@ -29,6 +39,10 @@ declare const _default: {
|
|
|
29
39
|
serialNumber: string;
|
|
30
40
|
time: string;
|
|
31
41
|
pageNumber: string;
|
|
42
|
+
table: string;
|
|
43
|
+
advancedTitle: string;
|
|
44
|
+
image: string;
|
|
45
|
+
pdf: string;
|
|
32
46
|
};
|
|
33
47
|
toolbar: {
|
|
34
48
|
showGrid: string;
|
|
@@ -40,12 +54,25 @@ declare const _default: {
|
|
|
40
54
|
reset: string;
|
|
41
55
|
resetTitle: string;
|
|
42
56
|
resetConfirm: string;
|
|
57
|
+
save: string;
|
|
58
|
+
savedTemplatePlaceholder: string;
|
|
59
|
+
saveSuccess: string;
|
|
60
|
+
saveFailed: string;
|
|
61
|
+
loadSuccess: string;
|
|
62
|
+
loadFailed: string;
|
|
63
|
+
testPrint: string;
|
|
64
|
+
packingListMissing: string;
|
|
65
|
+
printFailed: string;
|
|
66
|
+
clipboard: string;
|
|
67
|
+
paste: string;
|
|
43
68
|
};
|
|
44
69
|
properties: {
|
|
45
70
|
title: string;
|
|
46
71
|
empty: string;
|
|
47
72
|
content: string;
|
|
48
73
|
contentPlaceholder: string;
|
|
74
|
+
x: string;
|
|
75
|
+
y: string;
|
|
49
76
|
width: string;
|
|
50
77
|
height: string;
|
|
51
78
|
fontSize: string;
|
|
@@ -62,15 +89,98 @@ declare const _default: {
|
|
|
62
89
|
includeTime: string;
|
|
63
90
|
fixedDatePlaceholder: string;
|
|
64
91
|
fixedDateTimePlaceholder: string;
|
|
92
|
+
displayType: string;
|
|
93
|
+
tableConfig: string;
|
|
94
|
+
tableField: string;
|
|
95
|
+
tableFieldPlaceholder: string;
|
|
96
|
+
tableShowHeader: string;
|
|
97
|
+
tableShowBorder: string;
|
|
98
|
+
tablePreviewRows: string;
|
|
99
|
+
tableColumn: string;
|
|
100
|
+
tableColumnTitle: string;
|
|
101
|
+
tableColumnFieldPlaceholder: string;
|
|
102
|
+
tableColumnContent: string;
|
|
103
|
+
tableColumnWidthRatio: string;
|
|
104
|
+
tableColumnWidthMode: string;
|
|
105
|
+
tableAutoWidth: string;
|
|
106
|
+
tableFixedWidth: string;
|
|
107
|
+
tableColumnWidth: string;
|
|
108
|
+
tableColumnMinWidth: string;
|
|
109
|
+
tableColumnAlign: string;
|
|
110
|
+
tableAlignLeft: string;
|
|
111
|
+
tableAlignCenter: string;
|
|
112
|
+
tableAlignRight: string;
|
|
113
|
+
tableAddColumn: string;
|
|
114
|
+
tableDeleteColumn: string;
|
|
115
|
+
imageSource: string;
|
|
116
|
+
imageSourcePlaceholder: string;
|
|
117
|
+
tableColumnType: string;
|
|
118
|
+
tableColumnTypeText: string;
|
|
119
|
+
tableColumnTypeSerialNumber: string;
|
|
120
|
+
tableColumnTypeImage: string;
|
|
121
|
+
tableColumnImageContent: string;
|
|
122
|
+
tableHeaderBackground: string;
|
|
123
|
+
tableHeaderRowHeight: string;
|
|
124
|
+
tableBodyRowHeight: string;
|
|
125
|
+
tableColumnGroupTitle: string;
|
|
126
|
+
tableColumnHeaderAlign: string;
|
|
127
|
+
tableColumnCellAlign: string;
|
|
128
|
+
tableMode: string;
|
|
129
|
+
tableModeNormal: string;
|
|
130
|
+
tableModeGroupedDetail: string;
|
|
131
|
+
tableGroupField: string;
|
|
132
|
+
tableGroupFieldPlaceholder: string;
|
|
133
|
+
tableDetailField: string;
|
|
134
|
+
tableDetailFieldPlaceholder: string;
|
|
135
|
+
tableRepeatHeader: string;
|
|
136
|
+
tableGroupHeaderRowHeight: string;
|
|
137
|
+
tablePreviewGroups: string;
|
|
138
|
+
tableGroupHeaderCells: string;
|
|
139
|
+
tableGroupHeaderCell: string;
|
|
140
|
+
tableGroupHeaderCellContent: string;
|
|
141
|
+
tableGroupHeaderCellFieldPlaceholder: string;
|
|
142
|
+
tableGroupHeaderCellAlign: string;
|
|
143
|
+
tableAddGroupHeaderCell: string;
|
|
144
|
+
tableDetailColumns: string;
|
|
145
|
+
canvasAlignment: string;
|
|
146
|
+
horizontalAlignment: string;
|
|
147
|
+
verticalAlignment: string;
|
|
148
|
+
alignCanvasLeft: string;
|
|
149
|
+
alignCanvasHorizontalCenter: string;
|
|
150
|
+
alignCanvasRight: string;
|
|
151
|
+
alignCanvasTop: string;
|
|
152
|
+
alignCanvasVerticalCenter: string;
|
|
153
|
+
alignCanvasBottom: string;
|
|
154
|
+
alignLeftShort: string;
|
|
155
|
+
alignCenterShort: string;
|
|
156
|
+
alignRightShort: string;
|
|
157
|
+
alignTopShort: string;
|
|
158
|
+
alignMiddleShort: string;
|
|
159
|
+
alignBottomShort: string;
|
|
160
|
+
pdfSource: string;
|
|
161
|
+
pdfSourcePlaceholder: string;
|
|
162
|
+
pdfCropMode: string;
|
|
163
|
+
pdfCropNone: string;
|
|
164
|
+
pdfCropCurrentSize: string;
|
|
165
|
+
pdfCropScale: string;
|
|
166
|
+
pdfCropWidth: string;
|
|
167
|
+
pdfCropHeight: string;
|
|
168
|
+
pdfCropRatio: string;
|
|
65
169
|
};
|
|
66
170
|
elementDefaults: {
|
|
67
171
|
textContent: string;
|
|
68
172
|
qrcodeContent: string;
|
|
69
173
|
barcodeContent: string;
|
|
174
|
+
tableColumnTitle: string;
|
|
175
|
+
tableCellContent: string;
|
|
176
|
+
tableGroupIndexContent: string;
|
|
177
|
+
tableGroupLabelContent: string;
|
|
178
|
+
tableGroupValueContent: string;
|
|
70
179
|
};
|
|
71
180
|
elementList: {
|
|
72
181
|
title: string;
|
|
73
182
|
delete: string;
|
|
183
|
+
copy: string;
|
|
74
184
|
};
|
|
75
185
|
preview: {
|
|
76
186
|
title: string;
|
|
@@ -4,6 +4,11 @@ declare const _default: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
edit: string;
|
|
6
6
|
name: string;
|
|
7
|
+
templateType: string;
|
|
8
|
+
singleTemplate: string;
|
|
9
|
+
dualTemplate: string;
|
|
10
|
+
firstTemplate: string;
|
|
11
|
+
continuationTemplate: string;
|
|
7
12
|
size: string;
|
|
8
13
|
dialogTitle: string;
|
|
9
14
|
namePlaceholder: string;
|
|
@@ -17,6 +22,11 @@ declare const _default: {
|
|
|
17
22
|
nameMaxLength: string;
|
|
18
23
|
sizeRange: string;
|
|
19
24
|
};
|
|
25
|
+
quickSizes: string;
|
|
26
|
+
quickSize50x30: string;
|
|
27
|
+
quickSize100x100: string;
|
|
28
|
+
quickSize100x150: string;
|
|
29
|
+
quickSizeA4: string;
|
|
20
30
|
};
|
|
21
31
|
components: {
|
|
22
32
|
title: string;
|
|
@@ -29,6 +39,10 @@ declare const _default: {
|
|
|
29
39
|
serialNumber: string;
|
|
30
40
|
time: string;
|
|
31
41
|
pageNumber: string;
|
|
42
|
+
table: string;
|
|
43
|
+
advancedTitle: string;
|
|
44
|
+
image: string;
|
|
45
|
+
pdf: string;
|
|
32
46
|
};
|
|
33
47
|
toolbar: {
|
|
34
48
|
showGrid: string;
|
|
@@ -40,12 +54,25 @@ declare const _default: {
|
|
|
40
54
|
reset: string;
|
|
41
55
|
resetTitle: string;
|
|
42
56
|
resetConfirm: string;
|
|
57
|
+
save: string;
|
|
58
|
+
savedTemplatePlaceholder: string;
|
|
59
|
+
saveSuccess: string;
|
|
60
|
+
saveFailed: string;
|
|
61
|
+
loadSuccess: string;
|
|
62
|
+
loadFailed: string;
|
|
63
|
+
testPrint: string;
|
|
64
|
+
packingListMissing: string;
|
|
65
|
+
printFailed: string;
|
|
66
|
+
clipboard: string;
|
|
67
|
+
paste: string;
|
|
43
68
|
};
|
|
44
69
|
properties: {
|
|
45
70
|
title: string;
|
|
46
71
|
empty: string;
|
|
47
72
|
content: string;
|
|
48
73
|
contentPlaceholder: string;
|
|
74
|
+
x: string;
|
|
75
|
+
y: string;
|
|
49
76
|
width: string;
|
|
50
77
|
height: string;
|
|
51
78
|
fontSize: string;
|
|
@@ -62,15 +89,98 @@ declare const _default: {
|
|
|
62
89
|
includeTime: string;
|
|
63
90
|
fixedDatePlaceholder: string;
|
|
64
91
|
fixedDateTimePlaceholder: string;
|
|
92
|
+
displayType: string;
|
|
93
|
+
tableConfig: string;
|
|
94
|
+
tableField: string;
|
|
95
|
+
tableFieldPlaceholder: string;
|
|
96
|
+
tableShowHeader: string;
|
|
97
|
+
tableShowBorder: string;
|
|
98
|
+
tablePreviewRows: string;
|
|
99
|
+
tableColumn: string;
|
|
100
|
+
tableColumnTitle: string;
|
|
101
|
+
tableColumnFieldPlaceholder: string;
|
|
102
|
+
tableColumnContent: string;
|
|
103
|
+
tableColumnWidthRatio: string;
|
|
104
|
+
tableColumnWidthMode: string;
|
|
105
|
+
tableAutoWidth: string;
|
|
106
|
+
tableFixedWidth: string;
|
|
107
|
+
tableColumnWidth: string;
|
|
108
|
+
tableColumnMinWidth: string;
|
|
109
|
+
tableColumnAlign: string;
|
|
110
|
+
tableAlignLeft: string;
|
|
111
|
+
tableAlignCenter: string;
|
|
112
|
+
tableAlignRight: string;
|
|
113
|
+
tableAddColumn: string;
|
|
114
|
+
tableDeleteColumn: string;
|
|
115
|
+
imageSource: string;
|
|
116
|
+
imageSourcePlaceholder: string;
|
|
117
|
+
tableColumnType: string;
|
|
118
|
+
tableColumnTypeText: string;
|
|
119
|
+
tableColumnTypeSerialNumber: string;
|
|
120
|
+
tableColumnTypeImage: string;
|
|
121
|
+
tableColumnImageContent: string;
|
|
122
|
+
tableHeaderBackground: string;
|
|
123
|
+
tableHeaderRowHeight: string;
|
|
124
|
+
tableBodyRowHeight: string;
|
|
125
|
+
tableColumnGroupTitle: string;
|
|
126
|
+
tableColumnHeaderAlign: string;
|
|
127
|
+
tableColumnCellAlign: string;
|
|
128
|
+
tableMode: string;
|
|
129
|
+
tableModeNormal: string;
|
|
130
|
+
tableModeGroupedDetail: string;
|
|
131
|
+
tableGroupField: string;
|
|
132
|
+
tableGroupFieldPlaceholder: string;
|
|
133
|
+
tableDetailField: string;
|
|
134
|
+
tableDetailFieldPlaceholder: string;
|
|
135
|
+
tableRepeatHeader: string;
|
|
136
|
+
tableGroupHeaderRowHeight: string;
|
|
137
|
+
tablePreviewGroups: string;
|
|
138
|
+
tableGroupHeaderCells: string;
|
|
139
|
+
tableGroupHeaderCell: string;
|
|
140
|
+
tableGroupHeaderCellContent: string;
|
|
141
|
+
tableGroupHeaderCellFieldPlaceholder: string;
|
|
142
|
+
tableGroupHeaderCellAlign: string;
|
|
143
|
+
tableAddGroupHeaderCell: string;
|
|
144
|
+
tableDetailColumns: string;
|
|
145
|
+
canvasAlignment: string;
|
|
146
|
+
horizontalAlignment: string;
|
|
147
|
+
verticalAlignment: string;
|
|
148
|
+
alignCanvasLeft: string;
|
|
149
|
+
alignCanvasHorizontalCenter: string;
|
|
150
|
+
alignCanvasRight: string;
|
|
151
|
+
alignCanvasTop: string;
|
|
152
|
+
alignCanvasVerticalCenter: string;
|
|
153
|
+
alignCanvasBottom: string;
|
|
154
|
+
alignLeftShort: string;
|
|
155
|
+
alignCenterShort: string;
|
|
156
|
+
alignRightShort: string;
|
|
157
|
+
alignTopShort: string;
|
|
158
|
+
alignMiddleShort: string;
|
|
159
|
+
alignBottomShort: string;
|
|
160
|
+
pdfSource: string;
|
|
161
|
+
pdfSourcePlaceholder: string;
|
|
162
|
+
pdfCropMode: string;
|
|
163
|
+
pdfCropNone: string;
|
|
164
|
+
pdfCropCurrentSize: string;
|
|
165
|
+
pdfCropScale: string;
|
|
166
|
+
pdfCropWidth: string;
|
|
167
|
+
pdfCropHeight: string;
|
|
168
|
+
pdfCropRatio: string;
|
|
65
169
|
};
|
|
66
170
|
elementDefaults: {
|
|
67
171
|
textContent: string;
|
|
68
172
|
qrcodeContent: string;
|
|
69
173
|
barcodeContent: string;
|
|
174
|
+
tableColumnTitle: string;
|
|
175
|
+
tableCellContent: string;
|
|
176
|
+
tableGroupIndexContent: string;
|
|
177
|
+
tableGroupLabelContent: string;
|
|
178
|
+
tableGroupValueContent: string;
|
|
70
179
|
};
|
|
71
180
|
elementList: {
|
|
72
181
|
title: string;
|
|
73
182
|
delete: string;
|
|
183
|
+
copy: string;
|
|
74
184
|
};
|
|
75
185
|
preview: {
|
|
76
186
|
title: string;
|