@simple-reporting/base 1.0.21 → 1.0.23
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/dev/package.json +1 -1
- package/dev/src/assets/scss/general.scss +1 -0
- package/dev/src/assets/scss/pdf.scss +13 -0
- package/dev/src/assets/scss/placeholders.scss +48 -0
- package/dev/src/entries/pdf.ts +14 -1
- package/dev/srl.config.json +106 -0
- package/livingdocs/010.Titles/010.title-h1/scss/general.scss +12 -0
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +12 -1
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +0 -1
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +0 -1
- package/livingdocs/010.Titles/050.title-h5/scss/general.scss +0 -1
- package/livingdocs/010.Titles/060.title-h6/scss/general.scss +0 -1
- package/livingdocs/020.Text/010.lead/scss/general.scss +0 -1
- package/livingdocs/020.Text/020.paragraph/scss/general.scss +0 -1
- package/livingdocs/020.Text/040.link/scss/general.scss +0 -1
- package/livingdocs/020.Text/050.quote/scss/general.scss +0 -4
- package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +4 -1
- package/livingdocs/020.Text/070.footnote-container/scss/general.scss +1 -2
- package/livingdocs/020.Text/080.footnote-item/scss/general.scss +0 -8
- package/livingdocs/020.Text/080.footnote-item/scss/pdf.scss +8 -1
- package/livingdocs/020.Text/080.footnote-item/scss/web.scss +8 -1
- package/livingdocs/030.Lists/010.unordered-list/scss/general.scss +3 -3
- package/livingdocs/030.Lists/010.unordered-list/scss/pdf.scss +8 -0
- package/livingdocs/030.Lists/010.unordered-list/scss/web.scss +2 -0
- package/livingdocs/030.Lists/010.unordered-list/unordered-list.html +1 -1
- package/livingdocs/030.Lists/020.ordered-list/scss/general.scss +2 -5
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/general.scss +2 -5
- package/livingdocs/030.Lists/040.list-item/scss/general.scss +7 -0
- package/livingdocs/030.Lists/040.list-item/scss/web.scss +13 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +18 -39
- package/livingdocs/040.Media/010.table/scss/pdf.scss +20 -0
- package/livingdocs/040.Media/020.image/scss/general.scss +0 -4
- package/livingdocs/080.CV/010.cv/cv.html +34 -32
- package/livingdocs/080.CV/010.cv/scss/app.scss +1 -0
- package/livingdocs/080.CV/010.cv/scss/editor.scss +1 -0
- package/livingdocs/080.CV/010.cv/scss/general.scss +15 -0
- package/livingdocs/080.CV/010.cv/scss/pdf.scss +14 -0
- package/livingdocs/080.CV/010.cv/scss/web.scss +15 -0
- package/livingdocs/080.CV/010.cv/scss/word.scss +0 -0
- package/livingdocs/080.CV/010.cv/scss/xbrl.scss +1 -0
- package/livingdocs/080.CV/020.cv-time-span/cv-time-span.html +14 -12
- package/livingdocs/080.CV/020.cv-time-span/scss/app.scss +1 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/editor.scss +1 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/general.scss +10 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/pdf.scss +10 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/web.scss +10 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/word.scss +0 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/xbrl.scss +1 -0
- package/livingdocs/090.Signatures/020.signature-item/scss/general.scss +1 -0
- package/livingdocs/100.Misc/010.anchor/anchor.html +1 -1
- package/livingdocs/100.Misc/020.accordion/accordion.html +7 -5
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/pdf-chapter-navigation.html +1 -1
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/editor.scss +4 -0
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/general.scss +9 -1
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/pdf.scss +0 -9
- package/livingdocs/110.PDF/060.pdf-chapter-navigation-item/pdf-chapter-navigation-item.html +3 -2
- package/livingdocs/110.PDF/060.pdf-chapter-navigation-item/scss/general.scss +14 -1
- package/livingdocs/110.PDF/060.pdf-chapter-navigation-item/scss/pdf.scss +1 -14
- package/livingdocs/110.PDF/070.pdf-cover/ld-conf.json +3 -0
- package/livingdocs/110.PDF/070.pdf-cover/properties.json +19 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/editor.scss +7 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/general.scss +22 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/pdf.scss +22 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/web.scss +1 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/word.scss +0 -0
- package/livingdocs/110.PDF/070.pdf-cover/scss/xbrl.scss +1 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/pdf-toc-page.html +1 -1
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/editor.scss +35 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/general.scss +5 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/pdf.scss +20 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/web.scss +1 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/word.scss +0 -0
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/xbrl.scss +1 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/pdf-toc-item-title.html +1 -1
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/editor.scss +3 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/general.scss +5 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/pdf.scss +2 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/web.scss +1 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/word.scss +0 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/scss/xbrl.scss +1 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +2 -2
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/editor.scss +3 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/general.scss +23 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/pdf.scss +2 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/web.scss +1 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/word.scss +0 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/xbrl.scss +1 -0
- package/livingdocs/999.Properties/pdf-spacer/properties.json +7 -11
- package/livingdocs/999.Properties/pdf-spacer/scss/pdf.scss +29 -0
- package/package.json +1 -1
- package/scripts/build.js +2 -2
- package/scripts/init.js +1 -1
- package/srl/.srl/App.vue +9 -5
- package/srl/.srl/components/Srl/Article/Accordion.vue +106 -0
- package/srl/.srl/components/Srl/Article/Dialog/Button.vue +39 -16
- package/srl/.srl/components/Srl/Category/Accordion.vue +32 -4
- package/srl/.srl/plugins/initProject.ts +12 -7
- package/srl/.srl/utils/html.ts +71 -62
- package/srl/.srl/utils/index.ts +28 -1
- package/srl/.srl/utils/pageState.ts +61 -0
- package/srl/srl/pdf/PDFNotes.ts +71 -0
- package/srl/srl/pdf/PDFSetPageNumbers.ts +25 -0
- /package/srl/srl/{Awesomizr.js → pdf/Awesomizr.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface PDFNotesConfig {
|
|
2
|
+
noteClass: string; // kann mehrere Selektoren per Komma enthalten
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export default class PDFNotes {
|
|
6
|
+
private notesArticles: NodeListOf<HTMLElement>;
|
|
7
|
+
private selectors: string[];
|
|
8
|
+
private excludedClasses = ['srl-grid', 'srl-linkable'];
|
|
9
|
+
|
|
10
|
+
constructor(config: PDFNotesConfig) {
|
|
11
|
+
const { noteClass } = config;
|
|
12
|
+
|
|
13
|
+
if (!noteClass) {
|
|
14
|
+
console.warn("PDFNotes: 'noteClass' ist erforderlich.");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Selektoren sauber splitten
|
|
19
|
+
this.selectors = noteClass.split(',').map(s => s.trim()).filter(Boolean);
|
|
20
|
+
|
|
21
|
+
// Gesamtliste nur wenn du sie sonst brauchst
|
|
22
|
+
this.notesArticles = document.querySelectorAll(noteClass);
|
|
23
|
+
|
|
24
|
+
if (this.notesArticles.length === 0) {
|
|
25
|
+
console.warn(`PDFNotes: Keine Elemente gefunden mit Selektor '${noteClass}'.`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
this.markLastNotePerSelector();
|
|
30
|
+
this.setFirstAndLastNoteClass();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private setFirstAndLastNoteClass(): void {
|
|
34
|
+
this.notesArticles.forEach(container => {
|
|
35
|
+
const children = Array.from(container.children) as HTMLElement[];
|
|
36
|
+
if (children.length === 0) return;
|
|
37
|
+
|
|
38
|
+
const firstChild = children[0];
|
|
39
|
+
const lastChild = children[children.length - 1];
|
|
40
|
+
|
|
41
|
+
const getRelevantClass = (el: HTMLElement): string | null => {
|
|
42
|
+
const classes = Array.from(el.classList);
|
|
43
|
+
const relevant = classes.find(cls => !this.excludedClasses.includes(cls));
|
|
44
|
+
return relevant || null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const firstClass = getRelevantClass(firstChild);
|
|
48
|
+
const lastClass = getRelevantClass(lastChild);
|
|
49
|
+
|
|
50
|
+
if (firstClass) container.classList.add(`${firstClass}-first`);
|
|
51
|
+
if (lastClass && lastClass !== firstClass) container.classList.add(`${lastClass}-last`);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Neu: letzte Note je Selektor markieren
|
|
56
|
+
private markLastNotePerSelector(): void {
|
|
57
|
+
if (!this.selectors || this.selectors.length === 0) return;
|
|
58
|
+
|
|
59
|
+
this.selectors.forEach(sel => {
|
|
60
|
+
const nodes = document.querySelectorAll<HTMLElement>(sel);
|
|
61
|
+
if (nodes.length === 0) return;
|
|
62
|
+
|
|
63
|
+
const last = nodes[nodes.length - 1];
|
|
64
|
+
last.classList.add('last-note');
|
|
65
|
+
|
|
66
|
+
// Falls du unterschiedliche Klassen pro Typ willst, entkommentieren:
|
|
67
|
+
// const typeKey = sel.replace(/^[.#]/, '').replace(/[^a-zA-Z0-9_]/g, '_');
|
|
68
|
+
// last.classList.add(`last-note-${typeKey}`);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface PDFSetPageNumbersConfig {
|
|
2
|
+
tocItemClass: string;
|
|
3
|
+
tocItemPageNumberClass: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export default class PDFSetPageNumbers {
|
|
7
|
+
private tocItems: NodeListOf<HTMLElement>;
|
|
8
|
+
private pageNumberClass: string;
|
|
9
|
+
|
|
10
|
+
constructor(config: PDFSetPageNumbersConfig) {
|
|
11
|
+
const { tocItemClass, tocItemPageNumberClass } = config;
|
|
12
|
+
|
|
13
|
+
this.tocItems = document.querySelectorAll(tocItemClass);
|
|
14
|
+
this.pageNumberClass = tocItemPageNumberClass;
|
|
15
|
+
|
|
16
|
+
this.tocItems.forEach(item => {
|
|
17
|
+
const link = item.getAttribute('href');
|
|
18
|
+
const num = item.querySelector<HTMLElement>(this.pageNumberClass);
|
|
19
|
+
|
|
20
|
+
if (num && link) {
|
|
21
|
+
num.setAttribute('data-page-number', link);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
File without changes
|