@posx/core 5.5.98 → 5.5.100
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/build/index.d.ts +14 -4
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -427,7 +427,7 @@ declare module '@posx/core/services/app.service' {
|
|
|
427
427
|
import { IEmployeeRole } from '@posx/core/types/role.type';
|
|
428
428
|
import { AppRemoteService, IAppRemoteService, IAppModelSequence } from '@posx/core/services/abstract.service';
|
|
429
429
|
import { IAppConfig, IConfig, UpdateGeneralConfigOptions, ICache } from '@posx/core/types/config.type';
|
|
430
|
-
import { IPrintJob, IPrintTemplate, IPrinter, IRenderPrintTemplateOptions, RenderPrintTemplateOptions } from '@posx/core/types/printer.type';
|
|
430
|
+
import { IPrintJob, IPrintTemplate, IPrinter, IRenderPrintTemplateOptions, RenderPrintTemplateOptions, ITemplateData } from '@posx/core/types/printer.type';
|
|
431
431
|
import { IPayment, IPaymentMethod } from '@posx/core/types/payment.type';
|
|
432
432
|
import { INote, INoteGroup } from '@posx/core/types/note.type';
|
|
433
433
|
import { ISection, ISectionItem } from '@posx/core/types/section.type';
|
|
@@ -944,6 +944,14 @@ declare module '@posx/core/services/app.service' {
|
|
|
944
944
|
* @returns print command
|
|
945
945
|
*/
|
|
946
946
|
renderReportPrintTemplate(reportData: IReportData, config: IConfig, template: IPrintTemplate, options?: IRenderPrintTemplateOptions): Promise<IPrintCommand>;
|
|
947
|
+
/**
|
|
948
|
+
* Render print template by data
|
|
949
|
+
* @param template template to render
|
|
950
|
+
* @param templateData template data to render
|
|
951
|
+
* @param options options to render
|
|
952
|
+
* @returns print command
|
|
953
|
+
*/
|
|
954
|
+
renderPrintTemplateByData(template: IPrintTemplate, templateData: ITemplateData, options?: IRenderPrintTemplateOptions): Promise<IPrintCommand>;
|
|
947
955
|
}
|
|
948
956
|
export class PrintTemplateService extends AppRemoteService<IPrintTemplate> implements IPrintTemplateService {
|
|
949
957
|
readonly http: AxiosInstance;
|
|
@@ -957,7 +965,7 @@ declare module '@posx/core/services/app.service' {
|
|
|
957
965
|
initialize(): Promise<void>;
|
|
958
966
|
renderPrintTemplate(invoice: IInvoice, config: IConfig, template: IPrintTemplate, options?: RenderPrintTemplateOptions): Promise<IPrintCommand>;
|
|
959
967
|
renderReportPrintTemplate(reportData: ReportData, config: IConfig, template: IPrintTemplate, options?: RenderPrintTemplateOptions): Promise<IPrintCommand>;
|
|
960
|
-
|
|
968
|
+
renderPrintTemplateByData(template: IPrintTemplate, templateData: ITemplateData, options?: RenderPrintTemplateOptions): Promise<IPrintCommand>;
|
|
961
969
|
private getPrintTemplate;
|
|
962
970
|
private getCodepageByCountryCode;
|
|
963
971
|
private renderPrintCommand;
|
|
@@ -3598,15 +3606,16 @@ declare module '@posx/core/types/printer.type' {
|
|
|
3598
3606
|
retries: number;
|
|
3599
3607
|
constructor();
|
|
3600
3608
|
}
|
|
3601
|
-
export interface
|
|
3609
|
+
export interface ITemplateData {
|
|
3602
3610
|
config: IConfig;
|
|
3603
3611
|
invoice: IInvoice;
|
|
3604
3612
|
printer_name: string;
|
|
3605
3613
|
printed_at: Date;
|
|
3606
3614
|
normalized_printed_at: string;
|
|
3607
3615
|
report_data: IReportData;
|
|
3616
|
+
meta: Record<string, any>;
|
|
3608
3617
|
}
|
|
3609
|
-
export class TemplateData implements
|
|
3618
|
+
export class TemplateData implements ITemplateData {
|
|
3610
3619
|
config: IConfig;
|
|
3611
3620
|
invoice: IInvoice;
|
|
3612
3621
|
report_data: IReportData;
|
|
@@ -3614,6 +3623,7 @@ declare module '@posx/core/types/printer.type' {
|
|
|
3614
3623
|
printer_name: string;
|
|
3615
3624
|
printed_at: Date;
|
|
3616
3625
|
normalized_printed_at: string;
|
|
3626
|
+
meta: Record<string, any>;
|
|
3617
3627
|
}
|
|
3618
3628
|
export type IRenderPrintTemplateOptions = {
|
|
3619
3629
|
printer_name: string;
|