@sv-print/hiprint 0.2.23 → 0.2.25

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 CHANGED
@@ -40,16 +40,19 @@ export declare class hiprint {
40
40
  static getOptionItems: Record<string, any>;
41
41
  static updateElementType: <T>(tid: string, callback: (type: T) => T) => void;
42
42
  static hiwebSocket: HiWebSocket;
43
- static refreshPrinterList: (callback: (printerList: PrinterInfo[]) => void) => void;
44
- static getAddress: (type: string, callback: (addr: Record<string, any>, e: any) => void) => void;
43
+ static setHost: (host: string, token?: string) => Promise<any>;
44
+ static refreshPrinterList: () => Promise<PrinterInfo[]>;
45
+ static getAddress: () => Promise<Record<string, any>>;
46
+ static getClients: () => Promise<any[]>;
47
+ static getClientInfo: () => Promise<any>;
45
48
  static ippPrint: (...args: any) => void;
46
49
  static ippRequest: (...args: any) => void;
47
50
  static PrintElementTypeManager: PrintElementTypeManager;
48
51
  static PrintElementTypeGroup: PrintElementTypeGroup;
49
52
  static PrintTemplate: typeof PrintTemplate;
50
- static print: (data: Templates) => void;
51
- static print2: (data: Templates, printSuccess: (e: any) => void, printError: (e: any) => void) => void;
52
- static getHtml: (data: Templates) => any;
53
+ static print: (data: Templates) => Promise<any>;
54
+ static print2: (data: Templates) => Promise<any>;
55
+ static getHtml: (data: Templates) => Promise<any>;
53
56
  }
54
57
 
55
58
  export declare interface HiWebSocket {
@@ -255,7 +258,7 @@ export declare interface PrintTemplateOptions extends Record<string, any> {
255
258
  onPanelAddClick?: (panel: any, createPanel: any) => void;
256
259
  onFunctionClick?: (option: any, printElement: any, event: any) => void;
257
260
  onZoomChange?: (scale: number) => void;
258
- customDataFun?: (data: any, field: string, printData: PrintData) => any;
261
+ customDataFun?: (ele: any, data: any, field: string, printData: PrintData) => any;
259
262
  beforeDragIn?: (printTemplate: any, panel: any, ele: any) => boolean;
260
263
  }
261
264