@sv-print/hiprint 0.2.25 → 0.3.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/index.d.ts +23 -5
- package/dist/index.js +901 -889
- package/dist/index.mjs +10574 -10565
- package/dist/index.umd.js +901 -889
- package/dist/print-lock.css +0 -16
- package/dist/style.css +1 -1
- package/package.json +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare type Hiprint = hiprint;
|
|
|
36
36
|
export declare class hiprint {
|
|
37
37
|
static init: (options: InitOptions) => void;
|
|
38
38
|
static register: (options: RegisterOptions) => string;
|
|
39
|
-
static setConfig: (options
|
|
39
|
+
static setConfig: (options?: ConfigOptions) => void;
|
|
40
40
|
static getOptionItems: Record<string, any>;
|
|
41
41
|
static updateElementType: <T>(tid: string, callback: (type: T) => T) => void;
|
|
42
42
|
static hiwebSocket: HiWebSocket;
|
|
@@ -76,7 +76,7 @@ export declare interface PanelJson {
|
|
|
76
76
|
width?: number;
|
|
77
77
|
paperHeader?: number;
|
|
78
78
|
paperFooter?: number;
|
|
79
|
-
printElements?:
|
|
79
|
+
printElements?: PrintElementJson[];
|
|
80
80
|
paperNumberLeft?: number;
|
|
81
81
|
paperNumberTop?: number;
|
|
82
82
|
paperNumberDisabled?: boolean;
|
|
@@ -155,6 +155,24 @@ export declare interface Print2Options extends Record<string, any> {
|
|
|
155
155
|
|
|
156
156
|
export declare type PrintData = Record<string, any> | Record<string, any>[];
|
|
157
157
|
|
|
158
|
+
export declare interface PrintElementJson {
|
|
159
|
+
type: {
|
|
160
|
+
title: string;
|
|
161
|
+
type: string;
|
|
162
|
+
};
|
|
163
|
+
options?: PrintElementOptionsJson;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export declare interface PrintElementOptionsJson extends Record<string, any> {
|
|
167
|
+
left?: number;
|
|
168
|
+
top?: number;
|
|
169
|
+
width?: number;
|
|
170
|
+
height?: number;
|
|
171
|
+
title?: string;
|
|
172
|
+
field?: string;
|
|
173
|
+
testData?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
158
176
|
export declare interface PrintElementType extends Record<string, any> {
|
|
159
177
|
tid: string;
|
|
160
178
|
type: string;
|
|
@@ -191,9 +209,9 @@ export declare class PrintTemplate {
|
|
|
191
209
|
container: any;
|
|
192
210
|
editingPanel: Array<any>;
|
|
193
211
|
printPanels: Array<any>;
|
|
194
|
-
design: (container: string, { grid
|
|
212
|
+
design: (container: string, option: { grid?: boolean; activePanel?: boolean }) => any;
|
|
195
213
|
buildPagination: (container: string) => void;
|
|
196
|
-
update: (json: PrintTemplateJson, panelIndex
|
|
214
|
+
update: (json: PrintTemplateJson, panelIndex?: number, history?: boolean) => any;
|
|
197
215
|
print: (
|
|
198
216
|
data: PrintData,
|
|
199
217
|
options?: { leftOffset?: number; topOffset?: number },
|
|
@@ -222,7 +240,7 @@ export declare class PrintTemplate {
|
|
|
222
240
|
updateOption: (key: string, val: any) => void;
|
|
223
241
|
setElsAlign: (align: string, toPaper?: boolean) => void;
|
|
224
242
|
setElsSpace: (dis: number, isHor: boolean) => void;
|
|
225
|
-
selectAllEls: (reverse?: boolean) =>
|
|
243
|
+
selectAllEls: (reverse?: boolean) => PrintElementJson[];
|
|
226
244
|
addPrintElementToPaperByTid: (tid: string, left?: number, top?: number) => any;
|
|
227
245
|
getJson: () => PrintTemplateJson;
|
|
228
246
|
getJsonTid: () => PrintTemplateJson;
|