taxtank-core 2.0.15 → 2.0.17
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/fesm2022/taxtank-core.mjs +16 -3
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/index.d.ts +4 -0
- package/package.json +1 -1
@@ -11623,8 +11623,7 @@ class SseService {
|
|
11623
11623
|
*/
|
11624
11624
|
on(topic) {
|
11625
11625
|
const url = new URL(this.environment.mercureUrl);
|
11626
|
-
url.searchParams.append('topic',
|
11627
|
-
// tslint:disable-next-line:typedef
|
11626
|
+
url.searchParams.append('topic', this.jwtService.decodeToken().mercure.subscribe[0].replace('{+path}', topic));
|
11628
11627
|
return new Observable((observer) => {
|
11629
11628
|
const es = new EventSourcePolyfill(url, {
|
11630
11629
|
headers: {
|
@@ -20558,7 +20557,8 @@ class PdfFromHtmlTableService extends PdfFromTableService {
|
|
20558
20557
|
tables.forEach((table) => {
|
20559
20558
|
table.querySelectorAll('tbody .mat-mdc-row')
|
20560
20559
|
.forEach(row => row.classList.contains('expandable-row') ? row.remove() : '');
|
20561
|
-
this.
|
20560
|
+
const captionText = this.getCaptionText(table.caption);
|
20561
|
+
this.addCaption(pdf, captionText, pageBreak);
|
20562
20562
|
pdf.autoTable({
|
20563
20563
|
html: table,
|
20564
20564
|
...customOptions,
|
@@ -20569,6 +20569,17 @@ class PdfFromHtmlTableService extends PdfFromTableService {
|
|
20569
20569
|
});
|
20570
20570
|
return pdf;
|
20571
20571
|
}
|
20572
|
+
/**
|
20573
|
+
* extracts formatted text from caption's html
|
20574
|
+
*/
|
20575
|
+
getCaptionText(caption) {
|
20576
|
+
if (!caption) {
|
20577
|
+
return '';
|
20578
|
+
}
|
20579
|
+
return caption.children.length ?
|
20580
|
+
Array.from(caption.children).map((node) => node.textContent).join('\n') :
|
20581
|
+
caption.innerText;
|
20582
|
+
}
|
20572
20583
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PdfFromHtmlTableService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
20573
20584
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: PdfFromHtmlTableService, providedIn: 'root' }); }
|
20574
20585
|
}
|
@@ -20926,6 +20937,8 @@ class XlsxService {
|
|
20926
20937
|
SheetNames: [],
|
20927
20938
|
Sheets: {}
|
20928
20939
|
};
|
20940
|
+
// Ancors to A1 cell in xlsx table. Without this script tries to write in A0 which is incorrect
|
20941
|
+
xlsx.utils.sheet_add_aoa(worksheet, [['']], { origin: 'A1' });
|
20929
20942
|
tables.forEach((data) => {
|
20930
20943
|
// add caption for the current table
|
20931
20944
|
xlsx.utils.sheet_add_aoa(worksheet, [[data.caption?.innerText]], { origin: -1 });
|