ngx-print 20.1.0-beta.2 → 20.1.0-beta.4

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/index.d.ts DELETED
@@ -1,246 +0,0 @@
1
- import * as rxjs from 'rxjs';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from '@angular/core';
4
-
5
- declare class PrintOptions {
6
- printSectionId: string;
7
- printTitle: string;
8
- useExistingCss: boolean;
9
- bodyClass: string;
10
- openNewTab: boolean;
11
- previewOnly: boolean;
12
- closeWindow: boolean;
13
- printDelay: number;
14
- constructor(options?: Partial<PrintOptions>);
15
- }
16
-
17
- declare global {
18
- interface Window {
19
- eval: typeof Function;
20
- }
21
- }
22
- declare class PrintBase {
23
- private nonce;
24
- private _printStyle;
25
- private _styleSheetFile;
26
- protected printComplete: Subject<void>;
27
- /**
28
- * Sets the print styles based on the provided values.
29
- *
30
- * @param {Object} values - Key-value pairs representing print styles.
31
- * @protected
32
- */
33
- protected setPrintStyle(values: {
34
- [key: string]: {
35
- [key: string]: string;
36
- };
37
- }): void;
38
- /**
39
- *
40
- *
41
- * @returns the string that create the stylesheet which will be injected
42
- * later within <style></style> tag.
43
- *
44
- * -join/replace to transform an array objects to css-styled string
45
- */
46
- returnStyleValues(): string;
47
- /**
48
- * @returns string which contains the link tags containing the css which will
49
- * be injected later within <head></head> tag.
50
- *
51
- */
52
- private returnStyleSheetLinkTags;
53
- /**
54
- * Sets the style sheet file based on the provided CSS list.
55
- *
56
- * @param {string} cssList - CSS file or list of CSS files.
57
- * @protected
58
- */
59
- protected setStyleSheetFile(cssList: string): void;
60
- /**
61
- * Updates the default values for input elements.
62
- *
63
- * @param {HTMLCollectionOf<HTMLInputElement>} elements - Collection of input elements.
64
- * @private
65
- */
66
- private updateInputDefaults;
67
- /**
68
- * Updates the default values for select elements.
69
- *
70
- * @param {HTMLCollectionOf<HTMLSelectElement>} elements - Collection of select elements.
71
- * @private
72
- */
73
- private updateSelectDefaults;
74
- /**
75
- * Updates the default values for textarea elements.
76
- *
77
- * @param {HTMLCollectionOf<HTMLTextAreaElement>} elements - Collection of textarea elements.
78
- * @private
79
- */
80
- private updateTextAreaDefaults;
81
- /**
82
- * Converts a canvas element to an image and returns its HTML string.
83
- *
84
- * @param {HTMLCanvasElement} element - The canvas element to convert.
85
- * @returns {string} - HTML string of the image.
86
- * @private
87
- */
88
- private canvasToImageHtml;
89
- /**
90
- * Includes canvas contents in the print section via img tags.
91
- *
92
- * @param {HTMLCollectionOf<HTMLCanvasElement>} elements - Collection of canvas elements.
93
- * @private
94
- */
95
- private updateCanvasToImage;
96
- /**
97
- * Retrieves the HTML content of a specified printing section.
98
- *
99
- * @param {string} printSectionId - Id of the printing section.
100
- * @returns {string | null} - HTML content of the printing section, or null if not found.
101
- * @private
102
- */
103
- private getHtmlContents;
104
- /**
105
- * Retrieves the HTML content of elements with the specified tag.
106
- *
107
- * @param {keyof HTMLElementTagNameMap} tag - HTML tag name.
108
- * @returns {string} - Concatenated outerHTML of elements with the specified tag.
109
- * @private
110
- */
111
- private getElementTag;
112
- protected notifyPrintComplete(): void;
113
- /**
114
- * Prints the specified content using the provided print options.
115
- *
116
- * @param {PrintOptions} printOptions - Options for printing.
117
- * @public
118
- */
119
- protected print(printOptions: PrintOptions): void;
120
- static ɵfac: i0.ɵɵFactoryDeclaration<PrintBase, never>;
121
- static ɵprov: i0.ɵɵInjectableDeclaration<PrintBase>;
122
- }
123
-
124
- /**
125
- * Service for handling printing functionality in Angular applications.
126
- * Extends the base printing class (PrintBase).
127
- *
128
- * @export
129
- * @class NgxPrintService
130
- * @extends {PrintBase}
131
- */
132
- declare class NgxPrintService extends PrintBase {
133
- printComplete$: rxjs.Observable<void>;
134
- /**
135
- * Initiates the printing process using the provided print options.
136
- *
137
- * @param {PrintOptions} printOptions - Options for configuring the printing process.
138
- * @memberof NgxPrintService
139
- * @returns {void}
140
- */
141
- print(printOptions: PrintOptions): void;
142
- /**
143
- * Sets the print style for the printing process.
144
- *
145
- * @param {{ [key: string]: { [key: string]: string } }} values - A dictionary representing the print styles.
146
- * @memberof NgxPrintService
147
- * @setter
148
- */
149
- set printStyle(values: {
150
- [key: string]: {
151
- [key: string]: string;
152
- };
153
- });
154
- /**
155
- * Sets the stylesheet file for the printing process.
156
- *
157
- * @param {string} cssList - A string representing the path to the stylesheet file.
158
- * @memberof NgxPrintService
159
- * @setter
160
- */
161
- set styleSheetFile(cssList: string);
162
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxPrintService, never>;
163
- static ɵprov: i0.ɵɵInjectableDeclaration<NgxPrintService>;
164
- }
165
-
166
- declare class NgxPrintDirective extends PrintBase {
167
- private printOptions;
168
- /**
169
- * Prevents the print dialog from opening on the window
170
- *
171
- * @memberof NgxPrintDirective
172
- */
173
- set previewOnly(value: boolean);
174
- /**
175
- *
176
- *
177
- * @memberof NgxPrintDirective
178
- */
179
- set printSectionId(value: string);
180
- /**
181
- *
182
- *
183
- * @memberof NgxPrintDirective
184
- */
185
- set printTitle(value: string);
186
- /**
187
- *
188
- *
189
- * @memberof NgxPrintDirective
190
- */
191
- set useExistingCss(value: boolean);
192
- /**
193
- * A delay in milliseconds to force the print dialog to wait before opened. Default: 0
194
- *
195
- * @memberof NgxPrintDirective
196
- */
197
- set printDelay(value: number);
198
- /**
199
- * Whether to close the window after print() returns.
200
- *
201
- */
202
- set closeWindow(value: boolean);
203
- /**
204
- * Class attribute to apply to the body element.
205
- *
206
- */
207
- set bodyClass(value: string);
208
- /**
209
- * Whether to open a new window or default to new window.
210
- *
211
- */
212
- set openNewTab(value: boolean);
213
- /**
214
- *
215
- *
216
- * @memberof NgxPrintDirective
217
- */
218
- set printStyle(values: {
219
- [key: string]: {
220
- [key: string]: string;
221
- };
222
- });
223
- /**
224
- * @memberof NgxPrintDirective
225
- * @param cssList
226
- */
227
- set styleSheetFile(cssList: string);
228
- /**
229
- *
230
- *
231
- * @memberof NgxPrintDirective
232
- */
233
- print(): void;
234
- readonly printCompleted: i0.OutputEmitterRef<void>;
235
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxPrintDirective, never>;
236
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxPrintDirective, "[ngxPrint]", never, { "previewOnly": { "alias": "previewOnly"; "required": false; }; "printSectionId": { "alias": "printSectionId"; "required": false; }; "printTitle": { "alias": "printTitle"; "required": false; }; "useExistingCss": { "alias": "useExistingCss"; "required": false; }; "printDelay": { "alias": "printDelay"; "required": false; }; "closeWindow": { "alias": "closeWindow"; "required": false; }; "bodyClass": { "alias": "bodyClass"; "required": false; }; "openNewTab": { "alias": "openNewTab"; "required": false; }; "printStyle": { "alias": "printStyle"; "required": false; }; "styleSheetFile": { "alias": "styleSheetFile"; "required": false; }; }, { "printCompleted": "printCompleted"; }, never, never, true, never>;
237
- }
238
-
239
- declare class NgxPrintModule {
240
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxPrintModule, never>;
241
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxPrintModule, never, [typeof NgxPrintDirective], [typeof NgxPrintDirective]>;
242
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxPrintModule>;
243
- }
244
-
245
- export { NgxPrintDirective, NgxPrintModule, NgxPrintService, PrintOptions };
246
- //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../src/lib/print-options.ts","../../src/lib/ngx-print.base.ts","../../src/lib/ngx-print.service.ts","../../src/lib/ngx-print.directive.ts","../../src/lib/ngx-print.module.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;;;AAAA;;;;;;;;;AAUc;AAKb;;ACXD;AACE;;AAEC;AACF;AACD;;;;;AAWE;;;;;AAKG;AACH;;AAAmD;;AAAyB;AAS5E;;;;;;;AAOG;;AAMH;;;;AAIG;AACH;AAIA;;;;;AAKG;AACH;AAiBA;;;;;AAKG;AACH;AAQA;;;;;AAKG;AACH;AAUA;;;;;AAKG;AACH;AAOA;;;;;;AAMG;AACH;AAKA;;;;;AAKG;AACH;AAQA;;;;;;AAMG;AACH;AAiBA;;;;;;AAMG;AACH;AAUA;AAIA;;;;;AAKG;AACH;;;AAkFD;;ACtRD;;;;;;;AAOG;AACH;AAIE;AACA;;;;;;AAMG;AACI;AAKP;;;;;;AAMG;;;AACuC;;;AAI1C;;;;;;AAMG;AACH;;;AAGD;;AC9CD;;AAME;;;;AAIG;AACH;AAIA;;;;AAIG;AACH;AAIA;;;;AAIG;AACH;AAIA;;;;AAIG;AACH;AAIA;;;;AAIG;AACH;AAIA;;;AAGG;AACH;AAIA;;;AAGG;AACH;AAIA;;;AAGG;AACH;AAIA;;;;AAIG;;;AAEuC;;;AAI1C;;;AAGG;AACH;AAKA;;;;AAIG;AAEI;;;;AAQR;;AC7GD;;;;AAI8B;;"}