@simple-reporting/base 1.0.24 → 1.0.26
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/.github/workflows/npm-publish.yml +5 -4
- package/cli.js +5 -1
- package/dev/package.json +6 -1
- package/dev/src/assets/scss/word.scss +44 -1
- package/livingdocs/010.Titles/010.title-h1/scss/word.scss +5 -0
- package/livingdocs/010.Titles/020.title-h2/scss/word.scss +10 -0
- package/livingdocs/010.Titles/030.title-h3/scss/word.scss +10 -0
- package/livingdocs/010.Titles/040.title-h4/scss/word.scss +10 -0
- package/livingdocs/010.Titles/050.title-h5/scss/word.scss +5 -0
- package/livingdocs/010.Titles/060.title-h6/scss/word.scss +5 -0
- package/livingdocs/020.Text/010.lead/scss/word.scss +5 -0
- package/livingdocs/020.Text/020.paragraph/scss/word.scss +5 -0
- package/livingdocs/020.Text/030.paragraph-strong/scss/word.scss +6 -0
- package/livingdocs/020.Text/040.link/scss/word.scss +5 -0
- package/livingdocs/020.Text/050.quote/scss/word.scss +7 -0
- package/livingdocs/020.Text/060.quote-with-portrait/scss/word.scss +7 -0
- package/livingdocs/020.Text/080.footnote-item/scss/word.scss +6 -0
- package/livingdocs/030.Lists/010.unordered-list/scss/general.scss +0 -5
- package/livingdocs/030.Lists/010.unordered-list/scss/word.scss +6 -0
- package/livingdocs/030.Lists/020.ordered-list/scss/word.scss +9 -0
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/word.scss +9 -0
- package/livingdocs/030.Lists/040.list-item/scss/pdf.scss +2 -2
- package/livingdocs/030.Lists/040.list-item/scss/word.scss +19 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +37 -34
- package/livingdocs/040.Media/010.table/scss/word.scss +21 -0
- package/livingdocs/040.Media/020.image/scss/word.scss +5 -0
- package/livingdocs/040.Media/030.video/scss/word.scss +5 -0
- package/livingdocs/040.Media/030.video/video.html +2 -2
- package/livingdocs/060.Buttons/020.button/scss/word.scss +6 -1
- package/livingdocs/080.CV/010.cv/cv.html +7 -7
- package/livingdocs/080.CV/020.cv-time-span/scss/word.scss +5 -0
- package/livingdocs/090.Signatures/010.signature-container/scss/word.scss +5 -0
- package/livingdocs/090.Signatures/020.signature-item/scss/word.scss +6 -0
- package/livingdocs/100.Misc/010.anchor/anchor.html +2 -1
- package/livingdocs/110.PDF/010.pdf-pagebreak/pdf-pagebreak.html +1 -1
- package/livingdocs/110.PDF/010.pdf-pagebreak/scss/word.scss +5 -0
- package/livingdocs/110.PDF/030.pdf-publication-title/pdf-publication-title.html +1 -0
- package/livingdocs/110.PDF/040.pdf-chapter-title/pdf-chapter-title.html +1 -0
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/pdf-chapter-navigation.html +1 -0
- package/livingdocs/110.PDF/070.pdf-cover/pdf-cover.html +1 -1
- package/livingdocs/110.PDF/080.pdf-toc-page/pdf-toc-page.html +2 -2
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/editor.scss +2 -2
- package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +3 -3
- package/package.json +4 -1
- package/scripts/build.d.ts +1 -1
- package/scripts/build.js +188 -97
- package/srl/.srl/components/Srl/Article/Root.vue +4 -3
- package/srl/.srl/types/nswow.d.ts +3 -0
- package/livingdocs/020.Text/050.quote/properties.json +0 -7
|
@@ -7,18 +7,19 @@ on:
|
|
|
7
7
|
release:
|
|
8
8
|
types: [created]
|
|
9
9
|
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write # Required for OIDC
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
10
14
|
jobs:
|
|
11
|
-
|
|
12
15
|
publish-npm:
|
|
13
16
|
runs-on: ubuntu-latest
|
|
14
17
|
steps:
|
|
15
18
|
- uses: actions/checkout@v4
|
|
16
19
|
- uses: actions/setup-node@v4
|
|
17
20
|
with:
|
|
18
|
-
node-version:
|
|
21
|
+
node-version: 24
|
|
19
22
|
registry-url: https://registry.npmjs.org/
|
|
20
23
|
- run: npm ci
|
|
21
24
|
- run: node scripts/renamePackage.js
|
|
22
25
|
- run: node scripts/doPublish.js -v ${{ github.ref_name }}
|
|
23
|
-
env:
|
|
24
|
-
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
|
package/cli.js
CHANGED
|
@@ -79,8 +79,12 @@ commander
|
|
|
79
79
|
commander
|
|
80
80
|
.command('build')
|
|
81
81
|
.description('Build ldd, app, pdf and word for production')
|
|
82
|
-
.argument('[version]', '
|
|
82
|
+
.argument('[version]', 'Livingdocs version')
|
|
83
83
|
.option('-c, --customer <customer>', 'The customer to build for')
|
|
84
|
+
.option(
|
|
85
|
+
'-t, --target <targets>',
|
|
86
|
+
'Comma separated targets: app,pdf,word,xbrl,ldd (default: all)'
|
|
87
|
+
)
|
|
84
88
|
.action(async (version, options) => {
|
|
85
89
|
await build(version, options);
|
|
86
90
|
});
|
package/dev/package.json
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "vite",
|
|
12
12
|
"build": "srl build",
|
|
13
|
+
"build-app": "srl build --target app",
|
|
14
|
+
"build-pdf": "srl build --target pdf",
|
|
15
|
+
"build-word": "srl build --target word",
|
|
16
|
+
"build-xbrl": "srl build --target xbrl",
|
|
17
|
+
"build-ldd": "srl build --target ldd",
|
|
13
18
|
"build-type-check": "run-p type-check \"build {@}\" --",
|
|
14
19
|
"preview": "vite preview",
|
|
15
20
|
"test:unit": "vitest",
|
|
@@ -19,7 +24,7 @@
|
|
|
19
24
|
"postinstall": "srl prepare"
|
|
20
25
|
},
|
|
21
26
|
"dependencies": {
|
|
22
|
-
"@simple-reporting/base": "^1.0.
|
|
27
|
+
"@simple-reporting/base": "^1.0.26",
|
|
23
28
|
"axios": "^1.12.2",
|
|
24
29
|
"chalk": "^5.6.2",
|
|
25
30
|
"exceljs": "^4.4.0",
|
|
@@ -1,2 +1,45 @@
|
|
|
1
1
|
@use 'srl';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
.srl-chapter,
|
|
4
|
+
.srl-article {
|
|
5
|
+
page-break-after: always;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.srl-article[class*="srl-category-notes_"],
|
|
9
|
+
.srl-article[class*="srl-category-notes-"],
|
|
10
|
+
.srl-article[class*="srl-category-note_"],
|
|
11
|
+
.srl-article[class*="srl-category-note-"] {
|
|
12
|
+
page-break-after: avoid;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[class*="srl-category-notes_"] + .srl-article,
|
|
16
|
+
[class*="srl-category-notes-"] + .srl-article,
|
|
17
|
+
[class*="srl-category-note_"] + .srl-article,
|
|
18
|
+
[class*="srl-category-note-"] + .srl-article {
|
|
19
|
+
page-break-after: always;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
Hold titles and the following component on the same page
|
|
24
|
+
*/
|
|
25
|
+
.srl-title-h1,
|
|
26
|
+
.srl-title-h2,
|
|
27
|
+
.srl-title-h3,
|
|
28
|
+
.srl-title-h4,
|
|
29
|
+
.srl-title-h5 {
|
|
30
|
+
& + * {
|
|
31
|
+
page-break-before: avoid;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.srl-article + [class*="srl-category-notes_"],
|
|
36
|
+
.srl-article + [class*="srl-category-notes-"],
|
|
37
|
+
.srl-article + [class*="srl-category-note_"],
|
|
38
|
+
.srl-article + [class*="srl-category-note-"] {
|
|
39
|
+
margin-top: srl.spacer-get(800);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
strong,
|
|
43
|
+
[class*="bold"] {
|
|
44
|
+
font-weight: bold;
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use "srl";
|
|
2
|
+
|
|
3
|
+
.srl-list-group__item {
|
|
4
|
+
font-family: 'Arial', sans-serif;
|
|
5
|
+
|
|
6
|
+
&:before {
|
|
7
|
+
.srl-list-group--ul & {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.srl-list-group--ol & {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.srl-list-group--alphanumeric & {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -49,7 +49,7 @@ td {
|
|
|
49
49
|
);
|
|
50
50
|
vertical-align: #{map.get(srl.$meta, table, vertical-align)};
|
|
51
51
|
border-bottom: (
|
|
52
|
-
|
|
52
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
53
53
|
map.get($table-border-regular, style)
|
|
54
54
|
srl.colors-get(map.get($table-border-regular, color))
|
|
55
55
|
);
|
|
@@ -91,115 +91,113 @@ td {
|
|
|
91
91
|
/*
|
|
92
92
|
Borders
|
|
93
93
|
*/
|
|
94
|
-
&[class*=
|
|
94
|
+
&[class*='head'] {
|
|
95
95
|
border-bottom: (
|
|
96
|
-
|
|
96
|
+
srl.system-root-style(srl-table-border-bold-width)
|
|
97
97
|
map.get($table-border-bold, style)
|
|
98
98
|
srl.colors-get(map.get($table-border-bold, color))
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
&[class*=
|
|
102
|
+
&[class*='linetop'] {
|
|
103
103
|
border-top: (
|
|
104
|
-
srl-table-border-regular-width
|
|
104
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
105
105
|
map.get($table-border-regular, style)
|
|
106
106
|
srl.colors-get(map.get($table-border-regular, color))
|
|
107
107
|
);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
&[class*=
|
|
110
|
+
&[class*='blinetop'] {
|
|
111
111
|
border-top: (
|
|
112
|
-
|
|
112
|
+
srl.system-root-style(srl-table-border-bold-width)
|
|
113
113
|
map.get($table-border-bold, style)
|
|
114
114
|
srl.colors-get(map.get($table-border-bold, color))
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
&[class*=
|
|
118
|
+
&[class*='nolinetop'] {
|
|
119
119
|
border-top: (
|
|
120
|
-
|
|
120
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
121
121
|
map.get($table-border-regular, style)
|
|
122
122
|
transparent
|
|
123
123
|
);
|
|
124
124
|
|
|
125
|
-
&[class*=
|
|
126
|
-
border-top-width: (
|
|
127
|
-
var(--srl-table-border-regular-width)
|
|
128
|
-
);
|
|
125
|
+
&[class*='head'] {
|
|
126
|
+
border-top-width: srl.system-root-style(srl-table-border-regular-width)
|
|
129
127
|
}
|
|
130
128
|
}
|
|
131
129
|
|
|
132
|
-
&[class*=
|
|
130
|
+
&[class*='linebottom'] {
|
|
133
131
|
border-bottom: (
|
|
134
|
-
|
|
132
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
135
133
|
map.get($table-border-regular, style)
|
|
136
134
|
srl.colors-get(map.get($table-border-regular, color))
|
|
137
135
|
);
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
&[class*=
|
|
138
|
+
&[class*='blinebottom'] {
|
|
141
139
|
border-bottom: (
|
|
142
|
-
|
|
140
|
+
srl.system-root-style(srl-table-border-bold-width)
|
|
143
141
|
map.get($table-border-bold, style)
|
|
144
142
|
srl.colors-get(map.get($table-border-bold, color))
|
|
145
143
|
);
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
&[class*=
|
|
146
|
+
&[class*='nolinebottom'] {
|
|
149
147
|
border-bottom: (
|
|
150
|
-
|
|
148
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
151
149
|
map.get($table-border-regular, style)
|
|
152
150
|
transparent
|
|
153
151
|
);
|
|
154
152
|
|
|
155
153
|
&[class*="head"] {
|
|
156
|
-
border-bottom-width:
|
|
154
|
+
border-bottom-width: srl.system-root-style(srl-table-border-regular-width);
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
|
|
160
|
-
&[class*=
|
|
158
|
+
&[class*='lineleft'] {
|
|
161
159
|
border-left: (
|
|
162
|
-
|
|
160
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
163
161
|
map.get($table-border-regular, style)
|
|
164
162
|
srl.colors-get(map.get($table-border-regular, color))
|
|
165
163
|
);
|
|
166
164
|
}
|
|
167
165
|
|
|
168
|
-
&[class*=
|
|
166
|
+
&[class*='blineleft'] {
|
|
169
167
|
border-left: (
|
|
170
|
-
|
|
168
|
+
srl.system-root-style(srl-table-border-bold-width)
|
|
171
169
|
map.get($table-border-bold, style)
|
|
172
170
|
srl.colors-get(map.get($table-border-bold, color))
|
|
173
171
|
);
|
|
174
172
|
}
|
|
175
173
|
|
|
176
|
-
&[class*=
|
|
174
|
+
&[class*='nolineleft'] {
|
|
177
175
|
border-left: (
|
|
178
|
-
|
|
176
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
179
177
|
map.get($table-border-regular, style)
|
|
180
178
|
transparent
|
|
181
179
|
);
|
|
182
180
|
}
|
|
183
181
|
|
|
184
|
-
&[class*=
|
|
182
|
+
&[class*='lineright'] {
|
|
185
183
|
border-right: (
|
|
186
|
-
|
|
184
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
187
185
|
map.get($table-border-regular, style)
|
|
188
186
|
srl.colors-get(map.get($table-border-regular, color))
|
|
189
187
|
);
|
|
190
188
|
}
|
|
191
189
|
|
|
192
|
-
&[class*=
|
|
190
|
+
&[class*='blineright'] {
|
|
193
191
|
border-right: (
|
|
194
|
-
|
|
192
|
+
srl.system-root-style(srl-table-border-bold-width)
|
|
195
193
|
map.get($table-border-bold, style)
|
|
196
194
|
srl.colors-get(map.get($table-border-bold, color))
|
|
197
195
|
);
|
|
198
196
|
}
|
|
199
197
|
|
|
200
|
-
&[class*=
|
|
198
|
+
&[class*='nolineright'] {
|
|
201
199
|
border-right: (
|
|
202
|
-
|
|
200
|
+
srl.system-root-style(srl-table-border-regular-width)
|
|
203
201
|
map.get($table-border-regular, style)
|
|
204
202
|
transparent
|
|
205
203
|
);
|
|
@@ -231,9 +229,14 @@ td {
|
|
|
231
229
|
DEFINE HERE; DIFFERENT CSS CLASSES IN EVERY PROJECT
|
|
232
230
|
*/
|
|
233
231
|
@for $i from 1 through 10 {
|
|
234
|
-
$suffix:
|
|
232
|
+
$suffix: "#{$i}";
|
|
233
|
+
|
|
234
|
+
@if $i < 10 {
|
|
235
|
+
$suffix: "0#{$i}";
|
|
236
|
+
}
|
|
237
|
+
|
|
235
238
|
&[class*="background-#{$suffix}"] {
|
|
236
|
-
background-color:
|
|
239
|
+
background-color: srl.system-root-style(srl-table-background-#{$suffix}, transparent);
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
242
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use "srl";
|
|
2
|
+
|
|
3
|
+
.srl-table {
|
|
4
|
+
page-break-inside: avoid;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
th,
|
|
8
|
+
td {
|
|
9
|
+
font-family: 'Arial', sans-serif;
|
|
10
|
+
|
|
11
|
+
&[class*="head"],
|
|
12
|
+
&[class*="bold"],
|
|
13
|
+
&[class*="regular"] {
|
|
14
|
+
font-family: 'Arial', sans-serif;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&[class*="head"],
|
|
18
|
+
&[class*="bold"] {
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<div class="srl-video">
|
|
1
|
+
<div class="srl-video" data-remove-from-word="complete">
|
|
2
2
|
<div class="srl-grid srl-grid--media">
|
|
3
3
|
<div class="srl-grid__inner srl-video__inner">
|
|
4
4
|
<srl-ld-video data-remove-from-xbrl="transient" data-remove-from-pdf="transient">
|
|
5
|
-
<div class="srl-video__video-container" doc-html="free-html"
|
|
5
|
+
<div class="srl-video__video-container" doc-html="free-html" data-remove-from-pdf="complete"></div>
|
|
6
6
|
<img class="srl-video__thumbnail" doc-image="video-thumbnail"></img>
|
|
7
7
|
<div class="srl-video__play" data-remove-from-pdf="complete">
|
|
8
8
|
<button class="srl-button srl-has-icon" type="button">
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div class="srl-cv__header-content">
|
|
10
10
|
<p class="srl-title-h3">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
<span class="srl-title-h3__text" doc-editable="cv-title-h3">
|
|
12
|
+
Max Mustermann
|
|
13
|
+
</span>
|
|
14
14
|
</p>
|
|
15
15
|
<p class="srl-title-h4">
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<span class="srl-title-h4__text" doc-editable="cv-title-h4">
|
|
17
|
+
Chairman of the Group Management, Chief Executive Officer (CEO)
|
|
18
|
+
</span>
|
|
19
19
|
</p>
|
|
20
20
|
<p class="srl-paragraph" doc-editable="cv-text-excerpt">
|
|
21
21
|
Swiss, born 1956 <br />
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<div class="srl-cv__content srl-article-accordion__content">
|
|
28
28
|
<div class="srl-article-accordion__wrapper" doc-container="cv-content"></div>
|
|
29
29
|
</div>
|
|
30
|
-
<div class="srl-grid srl-cv__button-container">
|
|
30
|
+
<div class="srl-grid srl-cv__button-container" data-remove-from-pdf="complete" data-remove-from-word="complete" data-remove-from-xhtml="complete">
|
|
31
31
|
<div class="srl-grid__inner srl-flex srl-justify-self-center">
|
|
32
32
|
<button type="button" class="srl-cv__button srl-article-accordion__toggle">
|
|
33
33
|
<span class="srl-cv__button-more" doc-editable="cv-text-more">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
<p class="srl-anchor srl-editor-component" data-remove-from-translate-plus="true" data-remove-from-xhtml="complete"
|
|
1
|
+
<p class="srl-anchor srl-editor-component" data-remove-from-translate-plus="true" data-remove-from-xhtml="complete"
|
|
2
|
+
data-is-anchor="true">
|
|
2
3
|
<span class="srl-anchor__text srl-editor-component__text" doc-editable="anchor-text">
|
|
3
4
|
Must start with a letter (A–Z or a–z); a number is not allowed. After the
|
|
4
5
|
first letter, any combination of letters (a–z, A–Z), digits (0–9), hyphens
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="srl-pdf-pagebreak srl-editor-component" data-remove-from-web="complete">
|
|
2
|
-
<span class="srl-pdf-pagebreak__editor-text srl-editor-component__text" data-remove-from-pdf="complete">
|
|
2
|
+
<span class="srl-pdf-pagebreak__editor-text srl-editor-component__text" data-remove-from-pdf="complete" data-remove-from-word="complete">
|
|
3
3
|
PDF page break
|
|
4
4
|
</span>
|
|
5
5
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<p
|
|
2
2
|
class="srl-pdf-publication-title srl-editor-component"
|
|
3
3
|
data-remove-from-web="complete"
|
|
4
|
+
data-remove-from-word="complete"
|
|
4
5
|
>
|
|
5
6
|
<span class="srl-pdf-publication-title__text srl-editor-component__text" doc-editable="pdf-publication-titletext">
|
|
6
7
|
Publication title
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<div class="srl-pdf-toc-page">
|
|
1
|
+
<div class="srl-pdf-toc-page" data-remove-from-word="complete" data-is-toc-page="true">
|
|
2
2
|
<div class="srl-pdf-toc-page__inner">
|
|
3
3
|
<div class="srl-pdf-toc-page__title" doc-editable="pdf-toc-page-title">
|
|
4
4
|
Chapter title
|
|
5
5
|
</div>
|
|
6
|
-
<div class="srl-pdf-toc-page__toc-container" doc-container="toc"></div>
|
|
6
|
+
<div class="srl-pdf-toc-page__toc-container" doc-container="toc" data-is-toc-container="true"></div>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
@@ -24,8 +24,8 @@ $page-margin-left: srl.system-size-unit(map.get(srl.$meta, pdf, margin, left));
|
|
|
24
24
|
|
|
25
25
|
display: grid;
|
|
26
26
|
grid-template-columns: repeat(8, 1fr);
|
|
27
|
-
column-gap:
|
|
28
|
-
row-gap:
|
|
27
|
+
column-gap: srl.system-root-style(srl-gutter-column-gap);
|
|
28
|
+
row-gap: srl.system-root-style(srl-gutter-row-gap);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.srl-pdf-toc-page__title,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<a class="srl-pdf-toc__item" doc-link="href" data-page-number="">
|
|
2
|
-
<div class="srl-pdf-toc__text" doc-editable="pdf-toc-item-text">
|
|
1
|
+
<a class="srl-pdf-toc__item" doc-link="href" data-page-number="" data-is-toc-item="true">
|
|
2
|
+
<div class="srl-pdf-toc__text" doc-editable="pdf-toc-item-text" data-is-toc-text="true">
|
|
3
3
|
Article title
|
|
4
4
|
</div>
|
|
5
|
-
<div class="srl-pdf-toc__number" doc-editable="pdf-toc-item-number">1</div>
|
|
5
|
+
<div class="srl-pdf-toc__number" doc-editable="pdf-toc-item-number" data-is-toc-number="true">1</div>
|
|
6
6
|
</a>
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-reporting/base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Manage srl templates, build and publish",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/mmssolutionsio/simple-reporting-library"
|
|
7
|
+
},
|
|
5
8
|
"bin": {
|
|
6
9
|
"srl": "cli.js"
|
|
7
10
|
},
|
package/scripts/build.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {string} version
|
|
6
6
|
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
7
7
|
*/
|
|
8
|
-
export function build(version: string, options
|
|
8
|
+
export function build(version: string, options?: {}): Promise<void>;
|
|
9
9
|
/**
|
|
10
10
|
* Builds the project sequentially by executing a series of asynchronous tasks in a specific order.
|
|
11
11
|
* This method is used to build the project in a predetermined sequence.
|
package/scripts/build.js
CHANGED
|
@@ -24,7 +24,7 @@ import folders from './folders.js';
|
|
|
24
24
|
import { mapLdd } from './ldd/mapLdd.js';
|
|
25
25
|
import { LivingdocsDesignValidator } from './ldd/LivingdocsDesignValidator.js';
|
|
26
26
|
import { camelCase } from './utils.js';
|
|
27
|
-
import { buildVariables } from
|
|
27
|
+
import { buildVariables } from './build/variables.js';
|
|
28
28
|
import './dotenv.js';
|
|
29
29
|
|
|
30
30
|
const placeholderId = '6297EAFB-33A0-48B8-8D64-E61CDC3E9035';
|
|
@@ -85,11 +85,11 @@ async function cleanOutput() {
|
|
|
85
85
|
* @returns {Promise<void>} A Promise that resolves when the application is built.
|
|
86
86
|
*/
|
|
87
87
|
async function buildApp() {
|
|
88
|
-
console.log(
|
|
88
|
+
console.log('\n\nBuild application');
|
|
89
89
|
buildVariables.system.environment = 'production';
|
|
90
90
|
buildVariables.system.build = 'app';
|
|
91
91
|
buildVariables.system['size-unit'] = 'rem';
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
await checkFolders();
|
|
94
94
|
const build = await viteBuild({
|
|
95
95
|
build: {
|
|
@@ -198,7 +198,7 @@ async function buildApp() {
|
|
|
198
198
|
* @returns {Promise<void>} A Promise that resolves when the application is built.
|
|
199
199
|
*/
|
|
200
200
|
async function buildDDev() {
|
|
201
|
-
console.log(
|
|
201
|
+
console.log('\n\nBuild application for DDEV');
|
|
202
202
|
buildVariables.system.environment = 'production';
|
|
203
203
|
buildVariables.system.build = 'app';
|
|
204
204
|
buildVariables.system['size-unit'] = 'rem';
|
|
@@ -221,7 +221,7 @@ async function buildDDev() {
|
|
|
221
221
|
* @returns {Promise<void>} - A Promise that resolves when the zip operation is complete, or rejects with an error.
|
|
222
222
|
*/
|
|
223
223
|
async function zipApp() {
|
|
224
|
-
console.log(
|
|
224
|
+
console.log('\n\nCreate zip file for app');
|
|
225
225
|
await checkFolders();
|
|
226
226
|
const archiver = require('archiver');
|
|
227
227
|
const output = createWriteStream(join(outputPath, 'app.zip'));
|
|
@@ -252,7 +252,7 @@ async function zipApp() {
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
async function zipLdd() {
|
|
255
|
-
console.log(
|
|
255
|
+
console.log('\n\nCreate zip file for LDD');
|
|
256
256
|
await checkFolders();
|
|
257
257
|
|
|
258
258
|
const archiver = require('archiver');
|
|
@@ -290,7 +290,7 @@ async function zipLdd() {
|
|
|
290
290
|
* false otherwise.
|
|
291
291
|
*/
|
|
292
292
|
async function buildPdf() {
|
|
293
|
-
console.log(
|
|
293
|
+
console.log('\n\nBuild PDF');
|
|
294
294
|
buildVariables.system.environment = 'production';
|
|
295
295
|
buildVariables.system.build = 'pdf';
|
|
296
296
|
buildVariables.system['size-unit'] = 'rem';
|
|
@@ -326,7 +326,7 @@ async function buildPdf() {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
async function buildXbrl() {
|
|
329
|
-
console.log(
|
|
329
|
+
console.log('\n\nBuild XBRL');
|
|
330
330
|
buildVariables.system.environment = 'production';
|
|
331
331
|
buildVariables.system.build = 'xbrl';
|
|
332
332
|
buildVariables.system['size-unit'] = 'rem';
|
|
@@ -369,7 +369,7 @@ async function buildXbrl() {
|
|
|
369
369
|
* @returns {Promise<boolean>} - A Promise that resolves to true if the LDD build is successful, false otherwise.
|
|
370
370
|
*/
|
|
371
371
|
async function buildLdd(version) {
|
|
372
|
-
console.log(
|
|
372
|
+
console.log('\n\nBuild Livingdocs');
|
|
373
373
|
buildVariables.system.environment = 'production';
|
|
374
374
|
buildVariables.system.build = 'ldd';
|
|
375
375
|
buildVariables.system['size-unit'] = 'rem';
|
|
@@ -433,12 +433,15 @@ async function buildLdd(version) {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
const fontFiles = await glob(
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
const fontFiles = await glob(
|
|
437
|
+
join(folders.srlAssets, 'fonts', '**', '*.scss'),
|
|
438
|
+
{
|
|
439
|
+
withFileTypes: true,
|
|
440
|
+
},
|
|
441
|
+
);
|
|
439
442
|
|
|
440
443
|
if (fontFiles.length) {
|
|
441
|
-
console.log(
|
|
444
|
+
console.log('\n\nBuild Livingdocs fonts');
|
|
442
445
|
|
|
443
446
|
const importPath = join(folders.srlImports, 'fonts');
|
|
444
447
|
try {
|
|
@@ -449,10 +452,13 @@ async function buildLdd(version) {
|
|
|
449
452
|
const importFile = join(importPath, 'style.scss');
|
|
450
453
|
|
|
451
454
|
const importFonts = [];
|
|
452
|
-
fontFiles.forEach(
|
|
455
|
+
fontFiles.forEach((f) => {
|
|
453
456
|
importFonts.push(`../../../${f.relativePosix()}`);
|
|
454
|
-
})
|
|
455
|
-
await writeFileSync(
|
|
457
|
+
});
|
|
458
|
+
await writeFileSync(
|
|
459
|
+
importFile,
|
|
460
|
+
`@use "` + importFonts.join('" as *;\n@use "') + `" as *;\n`,
|
|
461
|
+
);
|
|
456
462
|
|
|
457
463
|
await viteBuild({
|
|
458
464
|
css: {
|
|
@@ -475,15 +481,15 @@ async function buildLdd(version) {
|
|
|
475
481
|
return '[name][extname]';
|
|
476
482
|
}
|
|
477
483
|
return '[name]-[hash][extname]';
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
},
|
|
481
487
|
},
|
|
482
488
|
publicDir: false,
|
|
483
|
-
})
|
|
489
|
+
});
|
|
484
490
|
}
|
|
485
491
|
|
|
486
|
-
console.log(
|
|
492
|
+
console.log('\n\nBuild Livingdocs design.json');
|
|
487
493
|
await writeLivingDocsJson();
|
|
488
494
|
|
|
489
495
|
return true;
|
|
@@ -526,25 +532,43 @@ async function buildPdfCustomer(customer) {
|
|
|
526
532
|
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
527
533
|
const lddJson = await readLivingDocsJson();
|
|
528
534
|
|
|
535
|
+
try {
|
|
536
|
+
const wordDir = join(folders.srlOutput, 'word');
|
|
537
|
+
const lddWordDir = join(folders.srlOutput, 'ldd', 'word');
|
|
538
|
+
statSync(wordDir);
|
|
539
|
+
await cpSync(wordDir, lddWordDir, { recursive: true });
|
|
540
|
+
console.log(`Word folder has been copied to ${relative(folders.root, lddWordDir)}`);
|
|
541
|
+
} catch (e) {
|
|
542
|
+
console.error(e)
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
try {
|
|
546
|
+
const xbrlDir = join(folders.srlOutput, 'xbrl');
|
|
547
|
+
const lddXbrlDir = join(folders.srlOutput, 'ldd', 'xbrl');
|
|
548
|
+
statSync(xbrlDir);
|
|
549
|
+
await cpSync(xbrlDir, lddXbrlDir, { recursive: true });
|
|
550
|
+
console.log(`Xbrl folder has been copied to ${relative(folders.root, lddXbrlDir)}`);
|
|
551
|
+
} catch (e) {
|
|
552
|
+
console.error(e)
|
|
553
|
+
}
|
|
554
|
+
|
|
529
555
|
try {
|
|
530
556
|
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
531
557
|
statSync(pdfDir);
|
|
532
558
|
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
533
|
-
console.log(
|
|
559
|
+
console.log(
|
|
560
|
+
`PDF folder has been copied to ${relative(folders.root, lddPdfDir)}`,
|
|
561
|
+
);
|
|
534
562
|
} catch (e) {
|
|
535
|
-
console.error(e)
|
|
563
|
+
console.error(e);
|
|
536
564
|
}
|
|
537
565
|
|
|
538
566
|
try {
|
|
539
567
|
statSync(customerDir);
|
|
540
568
|
const customerTarget = join(lddPdfDir, customerName);
|
|
541
569
|
mkdirSync(customerTarget, { recursive: true });
|
|
542
|
-
const jsReferences = [
|
|
543
|
-
|
|
544
|
-
];
|
|
545
|
-
const cssReferences = [
|
|
546
|
-
'pdf.css'
|
|
547
|
-
];
|
|
570
|
+
const jsReferences = ['pdf.js'];
|
|
571
|
+
const cssReferences = ['pdf.css'];
|
|
548
572
|
|
|
549
573
|
try {
|
|
550
574
|
const tsPath = join(customerDir, 'custom.ts');
|
|
@@ -573,9 +597,9 @@ async function buildPdfCustomer(customer) {
|
|
|
573
597
|
return '[name][extname]';
|
|
574
598
|
}
|
|
575
599
|
return 'assets/[name]-[hash][extname]';
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
},
|
|
579
603
|
},
|
|
580
604
|
publicDir: false,
|
|
581
605
|
};
|
|
@@ -599,9 +623,13 @@ async function buildPdfCustomer(customer) {
|
|
|
599
623
|
statSync(publicDir);
|
|
600
624
|
const publicTarget = join(customerTarget, 'public');
|
|
601
625
|
await cpSync(publicDir, publicTarget, { recursive: true });
|
|
602
|
-
console.log(
|
|
626
|
+
console.log(
|
|
627
|
+
`Customer ${customer} public folder has been copied to ${relative(folders.root, publicTarget)}`,
|
|
628
|
+
);
|
|
603
629
|
|
|
604
|
-
const publicFiles = await glob(join(publicTarget, '**', '*'), {
|
|
630
|
+
const publicFiles = await glob(join(publicTarget, '**', '*'), {
|
|
631
|
+
withFileTypes: true,
|
|
632
|
+
});
|
|
605
633
|
|
|
606
634
|
for (const publicFile of publicFiles) {
|
|
607
635
|
if (publicFile.isFile()) {
|
|
@@ -620,35 +648,50 @@ async function buildPdfCustomer(customer) {
|
|
|
620
648
|
const nsWowUrl = `${internalLddUrl}/${lddJson.name}/${lddJson.version}/pdf`;
|
|
621
649
|
|
|
622
650
|
const pdfConfig = [];
|
|
623
|
-
cssReferences.forEach(
|
|
624
|
-
pdfConfig.push(
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
651
|
+
cssReferences.forEach((p) => {
|
|
652
|
+
pdfConfig.push(
|
|
653
|
+
` <userStyleSheets><uri>${nsWowUrl}/${p}</uri></userStyleSheets>`,
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
jsReferences.forEach((p) => {
|
|
658
|
+
pdfConfig.push(
|
|
659
|
+
` <userScripts><beforeDocumentScripts>true</beforeDocumentScripts><uri>${nsWowUrl}/${p}</uri></userScripts>`,
|
|
660
|
+
);
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
const pdfConfigContent =
|
|
664
|
+
pdfXmlStart +
|
|
665
|
+
` <appendLog>false</appendLog>\n` +
|
|
666
|
+
pdfConfig.join('\n') +
|
|
667
|
+
pdfXmlEnd;
|
|
635
668
|
const pdfConfigPath = join(customerTarget, 'pdf-configuration.xml');
|
|
636
669
|
writeFileSync(pdfConfigPath, pdfConfigContent);
|
|
637
|
-
console.log(
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
+
|
|
643
|
-
+
|
|
644
|
-
+
|
|
645
|
-
|
|
670
|
+
console.log(
|
|
671
|
+
`Customer ${customer} PDF configuration file has been built to ${relative(folders.root, pdfConfigPath)}`,
|
|
672
|
+
);
|
|
673
|
+
|
|
674
|
+
const pdfConfigDebugContent =
|
|
675
|
+
pdfXmlStart +
|
|
676
|
+
` <appendLog>true</appendLog>\n` +
|
|
677
|
+
` <inspectableSettings><enabled>true</enabled></inspectableSettings>\n` +
|
|
678
|
+
` <debugSettings><all>true</all></debugSettings>\n` +
|
|
679
|
+
pdfConfig.join('\n') +
|
|
680
|
+
pdfXmlEnd;
|
|
681
|
+
const pdfConfigDebugPath = join(
|
|
682
|
+
customerTarget,
|
|
683
|
+
'pdf-configuration-debug.xml',
|
|
684
|
+
);
|
|
646
685
|
writeFileSync(pdfConfigDebugPath, pdfConfigDebugContent);
|
|
647
|
-
console.log(
|
|
686
|
+
console.log(
|
|
687
|
+
`Customer ${customer} PDF debug configuration file has been built to ${relative(folders.root, pdfConfigDebugPath)}`,
|
|
688
|
+
);
|
|
648
689
|
|
|
649
|
-
console.log(
|
|
690
|
+
console.log(
|
|
691
|
+
`Customer ${customer} PDF files has been built to ${relative(folders.root, customerTarget)}`,
|
|
692
|
+
);
|
|
650
693
|
|
|
651
|
-
console.log(
|
|
694
|
+
console.log('\n');
|
|
652
695
|
} catch (e) {}
|
|
653
696
|
|
|
654
697
|
return true;
|
|
@@ -662,7 +705,7 @@ async function buildPdfCustomer(customer) {
|
|
|
662
705
|
* or false if there was an error during the build process.
|
|
663
706
|
*/
|
|
664
707
|
async function buildWord() {
|
|
665
|
-
console.log(
|
|
708
|
+
console.log('\n\nBuild Word');
|
|
666
709
|
buildVariables.system.environment = 'production';
|
|
667
710
|
buildVariables.system.build = 'word';
|
|
668
711
|
buildVariables.system['size-unit'] = 'pt';
|
|
@@ -703,33 +746,71 @@ async function buildWord() {
|
|
|
703
746
|
* @param {string} version
|
|
704
747
|
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
705
748
|
*/
|
|
706
|
-
async function build(version, options) {
|
|
707
|
-
|
|
749
|
+
async function build(version, options = {}) {
|
|
708
750
|
try {
|
|
709
751
|
await checkFolders();
|
|
752
|
+
|
|
710
753
|
const packageJson = await readPackageJson();
|
|
711
754
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
755
|
+
// target option for separate build
|
|
756
|
+
const targetsString = options.target || 'app,pdf,word,xbrl,ldd';
|
|
757
|
+
const targets = targetsString
|
|
758
|
+
.split(',')
|
|
759
|
+
.map((t) => t.trim())
|
|
760
|
+
.filter(Boolean);
|
|
761
|
+
const has = (name) => targets.includes(name);
|
|
762
|
+
|
|
763
|
+
if (has('ldd')) {
|
|
764
|
+
if (!version) {
|
|
765
|
+
const prompt = new Input({
|
|
766
|
+
message: 'Livingdocs version',
|
|
767
|
+
initial: packageJson.version,
|
|
768
|
+
});
|
|
769
|
+
version = await prompt.run();
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
packageJson.version = version;
|
|
773
|
+
await writePackageJson();
|
|
718
774
|
}
|
|
719
775
|
|
|
720
|
-
|
|
721
|
-
await writePackageJson();
|
|
776
|
+
|
|
722
777
|
|
|
723
778
|
await cleanOutput();
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
779
|
+
|
|
780
|
+
if (has('app')) {
|
|
781
|
+
await buildApp();
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
if (has('pdf')) {
|
|
785
|
+
await buildPdf();
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
if (has('word')) {
|
|
789
|
+
await buildWord();
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
if (has('xbrl') || has('xhtml')) {
|
|
793
|
+
await buildXbrl();
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
if (has('ldd')) {
|
|
797
|
+
await buildLdd();
|
|
798
|
+
|
|
799
|
+
const livingdocsJson = await readLivingDocsJson();
|
|
800
|
+
new LivingdocsDesignValidator(livingdocsJson).IsDesignValid();
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
if (has('pdf') && options.customer) {
|
|
804
|
+
await buildPdfCustomer(options.customer);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
if (has('ldd')) {
|
|
808
|
+
await zipLdd();
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
if (has('app')) {
|
|
812
|
+
await zipApp();
|
|
813
|
+
}
|
|
733
814
|
} catch (error) {
|
|
734
815
|
console.log(error);
|
|
735
816
|
}
|
|
@@ -773,45 +854,53 @@ async function mapScss() {
|
|
|
773
854
|
|
|
774
855
|
const output = {
|
|
775
856
|
app: [
|
|
776
|
-
|
|
777
|
-
|
|
857
|
+
`"../../srl/config" as *`,
|
|
858
|
+
`"@simple-reporting/base/scss/init-root.scss" as *`,
|
|
778
859
|
],
|
|
779
860
|
ldd: [
|
|
780
|
-
|
|
781
|
-
|
|
861
|
+
`"../../srl/config" as *`,
|
|
862
|
+
`"@simple-reporting/base/scss/init-root.scss" as *`,
|
|
782
863
|
],
|
|
783
864
|
pdf: [
|
|
784
|
-
|
|
785
|
-
|
|
865
|
+
`"../../srl/config" as *`,
|
|
866
|
+
`"@simple-reporting/base/scss/init-root.scss" as *`,
|
|
786
867
|
],
|
|
787
868
|
word: [
|
|
788
|
-
|
|
789
|
-
|
|
869
|
+
`"../../srl/config" as *`,
|
|
870
|
+
`"@simple-reporting/base/scss/init-root.scss" as *`,
|
|
790
871
|
],
|
|
791
872
|
xbrl: [
|
|
792
|
-
|
|
793
|
-
|
|
873
|
+
`"../../srl/config" as *`,
|
|
874
|
+
`"@simple-reporting/base/scss/init-root.scss" as *`,
|
|
794
875
|
],
|
|
795
876
|
};
|
|
796
877
|
|
|
797
|
-
const fontFiles = await glob(
|
|
798
|
-
|
|
799
|
-
|
|
878
|
+
const fontFiles = await glob(
|
|
879
|
+
join(folders.srlAssets, 'fonts', '**', '*.scss'),
|
|
880
|
+
{
|
|
881
|
+
withFileTypes: true,
|
|
882
|
+
},
|
|
883
|
+
);
|
|
800
884
|
|
|
801
|
-
const fontsOutput = []
|
|
885
|
+
const fontsOutput = [];
|
|
802
886
|
|
|
803
887
|
if (fontFiles.length) {
|
|
804
|
-
fontsOutput.push(
|
|
805
|
-
|
|
888
|
+
fontsOutput.push(
|
|
889
|
+
`@import "${internalLddUrl}/${packageJson.name}/${packageJson.version}/fonts/style.css";`,
|
|
890
|
+
);
|
|
891
|
+
fontFiles.forEach((f) => {
|
|
806
892
|
output.app.push(`"${relativePathToRoot}${f.relativePosix()}" as *`);
|
|
807
893
|
output.xbrl.push(`"${relativePathToRoot}${f.relativePosix()}" as *`);
|
|
808
|
-
})
|
|
894
|
+
});
|
|
809
895
|
output.ldd.push(`"./fonts.scss" as *`);
|
|
810
896
|
output.pdf.push(`"./fonts.scss" as *`);
|
|
811
897
|
output.word.push(`"./fonts.scss" as *`);
|
|
812
898
|
}
|
|
813
899
|
|
|
814
|
-
await writeFileSync(
|
|
900
|
+
await writeFileSync(
|
|
901
|
+
join(folders.srlImports, 'fonts.scss'),
|
|
902
|
+
fontsOutput.join('\n'),
|
|
903
|
+
);
|
|
815
904
|
|
|
816
905
|
const mainFiles = await glob(join(folders.srlAssets, 'scss', '*.scss'), {
|
|
817
906
|
withFileTypes: true,
|
|
@@ -950,7 +1039,9 @@ async function mapScss() {
|
|
|
950
1039
|
|
|
951
1040
|
await writeFileSync(
|
|
952
1041
|
join(folders.srlImports, 'xbrl.scss'),
|
|
953
|
-
`@use ` +
|
|
1042
|
+
`@use ` +
|
|
1043
|
+
output.xbrl.join(`;\n@use `) +
|
|
1044
|
+
`;\n@use "@simple-reporting/base/scss/xbrl-core-styles.scss" as *;\n`,
|
|
954
1045
|
);
|
|
955
1046
|
|
|
956
1047
|
return true;
|
|
@@ -32,24 +32,25 @@ import { nextTick, ref, onMounted } from 'vue';
|
|
|
32
32
|
import VRuntimeTemplate from 'vue3-runtime-template';
|
|
33
33
|
import Autoload from '@/Autoload.ts';
|
|
34
34
|
import { useRoute } from 'vue-router';
|
|
35
|
-
import { useArticle,
|
|
35
|
+
import { useArticle, useConfig } from '#composables';
|
|
36
36
|
import { prepareHtmlContent } from '#utils';
|
|
37
37
|
|
|
38
38
|
const articleRoot = ref<HTMLDivElement | null>(null);
|
|
39
39
|
const config = useConfig();
|
|
40
40
|
const route = useRoute();
|
|
41
|
-
const articles = useArticles();
|
|
42
41
|
const content = ref<string>('');
|
|
43
42
|
const locale = route.params.locale as string;
|
|
44
43
|
const article = useArticle();
|
|
45
44
|
|
|
46
45
|
if (article.value) {
|
|
47
46
|
const file = `./html/${locale}/${article.value.name}.html`;
|
|
47
|
+
const publicationTitle = config.value.settings.publicationName[locale];
|
|
48
|
+
|
|
48
49
|
try {
|
|
49
50
|
const req = await fetch(file);
|
|
50
51
|
let text = await req.text();
|
|
51
52
|
|
|
52
|
-
document.title = article.value.translatedTitle
|
|
53
|
+
document.title = `${article.value.translatedTitle} - ${publicationTitle}`;
|
|
53
54
|
content.value = prepareHtmlContent(text);
|
|
54
55
|
} catch (error) {
|
|
55
56
|
console.error(`Failed to load article content from ${file}:`, error);
|