deepak-print-library 0.0.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/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # PrintLibrary
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build print-library
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+
35
+ ```bash
36
+ cd dist/print-library
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,134 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders } from '@angular/common/http';
5
+ import { firstValueFrom } from 'rxjs';
6
+
7
+ class PrintLibrary {
8
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PrintLibrary, deps: [], target: i0.ɵɵFactoryTarget.Component });
9
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: PrintLibrary, isStandalone: true, selector: "lib-print-library", ngImport: i0, template: ` <p>print-library works!</p> `, isInline: true, styles: [""] });
10
+ }
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PrintLibrary, decorators: [{
12
+ type: Component,
13
+ args: [{ selector: 'lib-print-library', imports: [], template: ` <p>print-library works!</p> ` }]
14
+ }] });
15
+
16
+ class PrintService {
17
+ http;
18
+ apiUrl = 'https://localhost:7273/api/PrintTest/Print';
19
+ setprinterName;
20
+ setpaperSize;
21
+ setmargins;
22
+ setwidth;
23
+ setheight;
24
+ setorientation;
25
+ settext;
26
+ setselectedFile;
27
+ setsvg;
28
+ requestHeaders = new HttpHeaders()
29
+ .set('content-type', 'application/json')
30
+ .set('accept', 'application/json');
31
+ constructor(http) {
32
+ this.http = http;
33
+ }
34
+ setPrinterName(printername) {
35
+ this.setprinterName = printername;
36
+ return "Printer name is successfully set to " + this.setprinterName;
37
+ }
38
+ setMargins(margins) {
39
+ this.setmargins = margins;
40
+ return "Margins are successfully set to " + this.setmargins;
41
+ }
42
+ setwidthandheight(width, height) {
43
+ this.setwidth = width;
44
+ this.setheight = height;
45
+ return "Width and Height are successfully set to " + this.setwidth + " and " + this.setheight;
46
+ }
47
+ setOrientation(orientation) {
48
+ this.setorientation = orientation;
49
+ return "Orientation is successfully set to " + this.setorientation;
50
+ }
51
+ setAddText(text) {
52
+ this.settext = text;
53
+ return "Text is successfully added: " + this.settext;
54
+ }
55
+ setAddImage(selectedFile) {
56
+ this.setselectedFile = selectedFile;
57
+ return "Image is successfully added: " + this.setselectedFile.name;
58
+ }
59
+ setsvgGraphics(svg) {
60
+ this.setsvg = svg;
61
+ return "SVG Graphics is successfully set to " + this.setsvg;
62
+ }
63
+ async print() {
64
+ if (!this.setprinterName || !this.setpaperSize || !this.setmargins || !this.setwidth || !this.setheight || !this.setorientation || !this.settext || !this.setselectedFile || !this.setsvg) {
65
+ return "Please set all the required parameters before printing.";
66
+ }
67
+ const formdata = new FormData();
68
+ formdata.append("printerName", this.setprinterName);
69
+ formdata.append("paperSize", this.setpaperSize);
70
+ formdata.append("margins", this.setmargins);
71
+ formdata.append("width", this.setwidth.toString());
72
+ formdata.append("height", this.setheight.toString());
73
+ formdata.append("orientation", this.setorientation);
74
+ formdata.append("text", this.settext);
75
+ formdata.append("image", this.setselectedFile);
76
+ formdata.append("svgGraphics", this.setsvg);
77
+ try {
78
+ const response = await firstValueFrom(this.printCall(formdata));
79
+ console.log('Print request successful:', response);
80
+ return response?.toString() ?? '';
81
+ }
82
+ catch (error) {
83
+ console.error('Print request failed:', error);
84
+ return `Print request failed: ${error}`;
85
+ }
86
+ }
87
+ printCall(data) {
88
+ return this.http.post(this.apiUrl, data, {
89
+ headers: this.requestHeaders,
90
+ responseType: 'text',
91
+ });
92
+ }
93
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PrintService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
94
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PrintService, providedIn: 'root' });
95
+ }
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: PrintService, decorators: [{
97
+ type: Injectable,
98
+ args: [{
99
+ providedIn: 'root',
100
+ }]
101
+ }], ctorParameters: () => [{ type: i1.HttpClient }] });
102
+
103
+ class Print {
104
+ printService;
105
+ setprinterName;
106
+ setpaperSize;
107
+ setmargins;
108
+ setwidth;
109
+ setheight;
110
+ setorientation;
111
+ settext;
112
+ setselectedFile;
113
+ setsvg;
114
+ constructor(printService) {
115
+ this.printService = printService;
116
+ }
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: Print, deps: [{ token: PrintService }], target: i0.ɵɵFactoryTarget.Component });
118
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.2", type: Print, isStandalone: true, selector: "app-print", ngImport: i0, template: "<p>print works!</p>\n", styles: [""] });
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.2", ngImport: i0, type: Print, decorators: [{
121
+ type: Component,
122
+ args: [{ selector: 'app-print', template: "<p>print works!</p>\n" }]
123
+ }], ctorParameters: () => [{ type: PrintService }] });
124
+
125
+ /*
126
+ * Public API Surface of print-library
127
+ */
128
+
129
+ /**
130
+ * Generated bundle index. Do not edit.
131
+ */
132
+
133
+ export { Print, PrintLibrary, PrintService };
134
+ //# sourceMappingURL=deepak-print-library.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepak-print-library.mjs","sources":["../../../projects/print-library/src/lib/print-library.ts","../../../projects/print-library/src/lib/print-service.ts","../../../projects/print-library/src/lib/print/print.ts","../../../projects/print-library/src/lib/print/print.html","../../../projects/print-library/src/public-api.ts","../../../projects/print-library/src/deepak-print-library.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-print-library',\n imports: [],\n template: ` <p>print-library works!</p> `,\n styles: ``,\n})\nexport class PrintLibrary {}\n","import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { firstValueFrom, Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PrintService {\n\n private apiUrl = 'https://localhost:7273/api/PrintTest/Print';\n setprinterName!:string;\n setpaperSize!:string;\n setmargins!:string;\n setwidth!:number;\n setheight!:number;\n setorientation!:string;\n settext!:string;\n setselectedFile!:File;\n setsvg!:File;\n\n requestHeaders = new HttpHeaders()\n .set('content-type', 'application/json')\n .set('accept', 'application/json');\n\n constructor(private http: HttpClient) {}\n\n setPrinterName(printername: string): string {\n this.setprinterName = printername;\n return \"Printer name is successfully set to \" + this.setprinterName;\n }\n\n setMargins(margins: string): string {\n this.setmargins = margins;\n return \"Margins are successfully set to \" + this.setmargins;\n }\n\n setwidthandheight(width: number, height: number): string {\n this.setwidth = width;\n this.setheight = height;\n return \"Width and Height are successfully set to \" + this.setwidth + \" and \" + this.setheight;\n }\n \n setOrientation(orientation: string): string {\n this.setorientation = orientation;\n return \"Orientation is successfully set to \" + this.setorientation;\n }\n\n setAddText(text: string): string {\n this.settext = text;\n return \"Text is successfully added: \" + this.settext;\n }\n\n setAddImage(selectedFile:File): string {\n this.setselectedFile = selectedFile;\n return \"Image is successfully added: \" + this.setselectedFile.name;\n }\n\n setsvgGraphics(svg: File): string {\n this.setsvg = svg;\n return \"SVG Graphics is successfully set to \" + this.setsvg;\n }\n\n async print(): Promise<string> {\n \n if(!this.setprinterName || !this.setpaperSize || !this.setmargins || !this.setwidth || !this.setheight || !this.setorientation || !this.settext || !this.setselectedFile || !this.setsvg) {\n return \"Please set all the required parameters before printing.\";\n }\n \n const formdata = new FormData();\n formdata.append(\"printerName\", this.setprinterName);\n formdata.append(\"paperSize\", this.setpaperSize);\n formdata.append(\"margins\", this.setmargins);\n formdata.append(\"width\", this.setwidth.toString());\n formdata.append(\"height\", this.setheight.toString());\n formdata.append(\"orientation\", this.setorientation);\n formdata.append(\"text\", this.settext);\n formdata.append(\"image\", this.setselectedFile);\n formdata.append(\"svgGraphics\", this.setsvg);\n \n try {\n const response = await firstValueFrom(this.printCall(formdata));\n console.log('Print request successful:', response);\n return response?.toString() ?? '';\n } \n catch (error) {\n console.error('Print request failed:', error);\n return `Print request failed: ${error}`;\n }\n }\n\n private printCall(data: any): Observable<string> {\n return this.http.post(this.apiUrl, data, {\n headers: this.requestHeaders,\n responseType: 'text',\n });\n }\n}\n","import { Component } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\n//import { PrintModule } from './print-module';\nimport { PrintService } from '../print-service';\n\n@Component({\n selector: 'app-print',\n templateUrl: './print.html',\n styleUrls: ['./print.css'],\n})\nexport class Print {\n setprinterName!:string;\n setpaperSize!:string;\n setmargins!:string;\n setwidth!:number;\n setheight!:number;\n setorientation!:string;\n settext!:string;\n setselectedFile!:File;\n setsvg!:File;\n \n constructor(private printService: PrintService) {\n \n }\n\n /*\n public setPaperSize(papersize: string): string {\n this.setpaperSize = papersize;\n return \"Paper size is successfully set to \" + this.setpaperSize;\n }\n\n public setMargins(margins: string): string {\n this.setmargins = margins;\n return \"Margins are successfully set to \" + this.setmargins;\n }\n\n public setwidthandheight(width: number, height: number): string {\n this.setwidth = width;\n this.setheight = height;\n return \"Width and Height are successfully set to \" + this.setwidth + \" and \" + this.setheight;\n }\n \n public setOrientation(orientation: string): string {\n this.setorientation = orientation;\n return \"Orientation is successfully set to \" + this.setorientation;\n }\n\n public setAddText(text: string): string {\n this.settext = text;\n return \"Text is successfully added: \" + this.settext;\n }\n\n public setAddImage(selectedFile:File): string {\n this.setselectedFile = selectedFile;\n return \"Image is successfully added: \" + this.setselectedFile.name;\n }\n\n public setsvgGraphics(svg: File): string {\n this.setsvg = svg;\n return \"SVG Graphics is successfully set to \" + this.setsvg;\n }\n\n async print(): Promise<string> {\n \n if(!this.setprinterName || !this.setpaperSize || !this.setmargins || !this.setwidth || !this.setheight || !this.setorientation || !this.settext || !this.setselectedFile || !this.setsvg) {\n return \"Please set all the required parameters before printing.\";\n }\n \n const formdata = new FormData();\n formdata.append(\"printerName\", this.setprinterName);\n formdata.append(\"paperSize\", this.setpaperSize);\n formdata.append(\"margins\", this.setmargins);\n formdata.append(\"width\", this.setwidth.toString());\n formdata.append(\"height\", this.setheight.toString());\n formdata.append(\"orientation\", this.setorientation);\n formdata.append(\"text\", this.settext);\n formdata.append(\"image\", this.setselectedFile);\n formdata.append(\"svgGraphics\", this.setsvg);\n\n try {\n const response = await firstValueFrom(this.printService.print(formdata));\n console.log('Print request successful:', response);\n return response?.toString() ?? '';\n } \n catch (error) {\n console.error('Print request failed:', error);\n return `Print request failed: ${error}`;\n }\n }\n */\n\n}\n","<p>print works!</p>\n","/*\n * Public API Surface of print-library\n */\n\nexport * from './lib/print-library';\nexport * from './lib/print/print';\nexport * from './lib/print-service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.PrintService"],"mappings":";;;;;;MAQa,YAAY,CAAA;uGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,6EAHb,CAAA,6BAAA,CAA+B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG9B,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,SAAS;+BACE,mBAAmB,EAAA,OAAA,EACpB,EAAE,EAAA,QAAA,EACD,CAAA,6BAAA,CAA+B,EAAA;;;MCE9B,YAAY,CAAA;AAiBH,IAAA,IAAA;IAfZ,MAAM,GAAG,4CAA4C;AAC7D,IAAA,cAAc;AACd,IAAA,YAAY;AACZ,IAAA,UAAU;AACV,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,cAAc;AACd,IAAA,OAAO;AACP,IAAA,eAAe;AACf,IAAA,MAAM;IAEN,cAAc,GAAG,IAAI,WAAW;AAC/B,SAAA,GAAG,CAAC,cAAc,EAAE,kBAAkB;AACtC,SAAA,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC;AAElC,IAAA,WAAA,CAAoB,IAAgB,EAAA;QAAhB,IAAA,CAAA,IAAI,GAAJ,IAAI;IAAe;AAErC,IAAA,cAAc,CAAC,WA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EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FDSa,KAAK,EAAA,UAAA,EAAA,CAAA;kBALjB,SAAS;+BACE,WAAW,EAAA,QAAA,EAAA,uBAAA,EAAA;;;AENvB;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "deepak-print-library",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^21.2.0",
6
+ "@angular/core": "^21.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/deepak-print-library.mjs",
13
+ "typings": "types/deepak-print-library.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/deepak-print-library.d.ts",
20
+ "default": "./fesm2022/deepak-print-library.mjs"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,52 @@
1
+ import * as i0 from '@angular/core';
2
+ import { HttpHeaders, HttpClient } from '@angular/common/http';
3
+
4
+ declare class PrintLibrary {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrintLibrary, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<PrintLibrary, "lib-print-library", never, {}, {}, never, never, true, never>;
7
+ }
8
+
9
+ declare class PrintService {
10
+ private http;
11
+ private apiUrl;
12
+ setprinterName: string;
13
+ setpaperSize: string;
14
+ setmargins: string;
15
+ setwidth: number;
16
+ setheight: number;
17
+ setorientation: string;
18
+ settext: string;
19
+ setselectedFile: File;
20
+ setsvg: File;
21
+ requestHeaders: HttpHeaders;
22
+ constructor(http: HttpClient);
23
+ setPrinterName(printername: string): string;
24
+ setMargins(margins: string): string;
25
+ setwidthandheight(width: number, height: number): string;
26
+ setOrientation(orientation: string): string;
27
+ setAddText(text: string): string;
28
+ setAddImage(selectedFile: File): string;
29
+ setsvgGraphics(svg: File): string;
30
+ print(): Promise<string>;
31
+ private printCall;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrintService, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<PrintService>;
34
+ }
35
+
36
+ declare class Print {
37
+ private printService;
38
+ setprinterName: string;
39
+ setpaperSize: string;
40
+ setmargins: string;
41
+ setwidth: number;
42
+ setheight: number;
43
+ setorientation: string;
44
+ settext: string;
45
+ setselectedFile: File;
46
+ setsvg: File;
47
+ constructor(printService: PrintService);
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<Print, never>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<Print, "app-print", never, {}, {}, never, never, true, never>;
50
+ }
51
+
52
+ export { Print, PrintLibrary, PrintService };