@simple-reporting/base 1.0.17 → 1.0.19
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/cli.js +4 -2
- package/dev/livingdocs.config.json +29 -16
- package/dev/package.json +1 -2
- package/dev/src/assets/scss/components/note/accordion.scss +4 -4
- package/dev/src/assets/scss/pdf.scss +3 -3
- package/dev/srl.config.json +6 -6
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +1 -1
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +1 -1
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +1 -1
- package/livingdocs/020.Text/010.lead/scss/general.scss +1 -1
- package/livingdocs/020.Text/050.quote/scss/general.scss +1 -1
- package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +2 -2
- package/livingdocs/020.Text/070.footnote-container/scss/general.scss +1 -0
- package/livingdocs/020.Text/070.footnote-container/scss/pdf.scss +9 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +2 -2
- package/livingdocs/040.Media/020.image/scss/general.scss +1 -1
- package/livingdocs/040.Media/030.video/scss/web.scss +2 -2
- package/livingdocs/060.Buttons/010.button-container/scss/general.scss +1 -1
- package/livingdocs/090.Signatures/010.signature-container/scss/general.scss +1 -1
- package/livingdocs/090.Signatures/010.signature-container/scss/web.scss +1 -1
- package/package.json +1 -1
- package/scripts/beaver.js +5 -5
- package/scripts/build.d.ts +1 -1
- package/scripts/build.js +112 -95
- package/scripts/folders.js +1 -1
- package/scripts/prepare.js +13 -1
- package/srl/{tsconfig.srl.json → .srl/tsconfig.srl.json} +2 -2
- package/srl/srl/colors.scss +2 -2
- package/srl/srl/config.scss +7 -7
- package/srl/srl/core-styles.scss +1 -1
- package/srl/srl/fonts.scss +1 -1
- package/srl/srl/grid.scss +1 -1
- package/srl/srl/helpers.scss +1 -1
- package/srl/srl/index.scss +9 -9
- package/srl/srl/meta.scss +1 -1
- package/srl/srl/pdf.scss +1 -1
- package/srl/srl/spacer.scss +1 -1
- package/srl/srl/system.scss +1 -1
- package/srl/srl/typography.scss +2 -2
- /package/{srl/scss → scss}/colors/functions.scss +0 -0
- /package/{srl/scss → scss}/colors/index.scss +0 -0
- /package/{srl/scss → scss}/colors/mixins.scss +0 -0
- /package/{srl/scss → scss}/colors/variables.scss +0 -0
- /package/{srl/scss → scss}/config.scss +0 -0
- /package/{srl/scss → scss}/core-styles.scss +0 -0
- /package/{srl/scss → scss}/fonts/functions.scss +0 -0
- /package/{srl/scss → scss}/fonts/index.scss +0 -0
- /package/{srl/scss → scss}/fonts/mixins.scss +0 -0
- /package/{srl/scss → scss}/fonts/variables.scss +0 -0
- /package/{srl/scss → scss}/grid/functions.scss +0 -0
- /package/{srl/scss → scss}/grid/index.scss +0 -0
- /package/{srl/scss → scss}/grid/mixins.scss +0 -0
- /package/{srl/scss → scss}/grid/variables.scss +0 -0
- /package/{srl/scss → scss}/helpers/functions.scss +0 -0
- /package/{srl/scss → scss}/helpers/index.scss +0 -0
- /package/{srl/scss → scss}/helpers/mixins.scss +0 -0
- /package/{srl/scss → scss}/helpers/variables.scss +0 -0
- /package/{srl/scss → scss}/index.scss +0 -0
- /package/{srl/scss → scss}/meta/functions.scss +0 -0
- /package/{srl/scss → scss}/meta/index.scss +0 -0
- /package/{srl/scss → scss}/meta/mixins.scss +0 -0
- /package/{srl/scss → scss}/meta/variables.scss +0 -0
- /package/{srl/scss → scss}/spacer/functions.scss +0 -0
- /package/{srl/scss → scss}/spacer/index.scss +0 -0
- /package/{srl/scss → scss}/spacer/mixins.scss +0 -0
- /package/{srl/scss → scss}/spacer/variables.scss +0 -0
- /package/{srl/scss → scss}/system/functions.scss +0 -0
- /package/{srl/scss → scss}/system/index.scss +0 -0
- /package/{srl/scss → scss}/system/mixins.scss +0 -0
- /package/{srl/scss → scss}/system/root.scss +0 -0
- /package/{srl/scss → scss}/system/variables.scss +0 -0
- /package/{srl/scss → scss}/typography/functions.scss +0 -0
- /package/{srl/scss → scss}/typography/index.scss +0 -0
- /package/{srl/scss → scss}/typography/mixins.scss +0 -0
- /package/{srl/scss → scss}/typography/variables.scss +0 -0
- /package/{srl/scss → scss}/xbrl-core-styles.scss +0 -0
- /package/srl/{App.vue → .srl/App.vue} +0 -0
- /package/srl/{components → .srl/components}/Srl/Aria/TabChain.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Article/Autoload.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Article/Dialog/Button.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Article/Root.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Category/Accordion/Content.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Category/Accordion/Toggle.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Category/Accordion.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon/After.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon/Before.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image/After.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image/Before.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Text.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item/Content.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu/Item.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Menu.vue +0 -0
- /package/srl/{components → .srl/components}/Srl/Page/Dialog.vue +0 -0
- /package/srl/{composables → .srl/composables}/article.ts +0 -0
- /package/srl/{composables → .srl/composables}/articles.ts +0 -0
- /package/srl/{composables → .srl/composables}/config.ts +0 -0
- /package/srl/{composables → .srl/composables}/cssStyles.ts +0 -0
- /package/srl/{composables → .srl/composables}/downloads.ts +0 -0
- /package/srl/{composables → .srl/composables}/index.ts +0 -0
- /package/srl/{composables → .srl/composables}/languageSwitch.ts +0 -0
- /package/srl/{composables → .srl/composables}/locale.ts +0 -0
- /package/srl/{composables → .srl/composables}/menu.ts +0 -0
- /package/srl/{composables → .srl/composables}/search.ts +0 -0
- /package/srl/{composables → .srl/composables}/settings.ts +0 -0
- /package/srl/{composables → .srl/composables}/viewPort.ts +0 -0
- /package/srl/{imports → .srl/imports}/app.scss +0 -0
- /package/srl/{imports → .srl/imports}/ldd.scss +0 -0
- /package/srl/{imports → .srl/imports}/pdf.scss +0 -0
- /package/srl/{imports → .srl/imports}/word.scss +0 -0
- /package/srl/{imports → .srl/imports}/xbrl.scss +0 -0
- /package/srl/{plugins → .srl/plugins}/asyncLdComponent.ts +0 -0
- /package/srl/{plugins → .srl/plugins}/asyncSrlComponents.ts +0 -0
- /package/srl/{plugins → .srl/plugins}/initProject.ts +0 -0
- /package/srl/{plugins → .srl/plugins}/vueSrlPlugin.ts +0 -0
- /package/srl/{types → .srl/types}/components.d.ts +0 -0
- /package/srl/{types → .srl/types}/global.d.ts +0 -0
- /package/srl/{types → .srl/types}/nswow.d.ts +0 -0
- /package/srl/{utils → .srl/utils}/camelCase.ts +0 -0
- /package/srl/{utils → .srl/utils}/html.ts +0 -0
- /package/srl/{utils → .srl/utils}/index.ts +0 -0
- /package/srl/{utils → .srl/utils}/uri.ts +0 -0
package/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
2
3
|
import { Command } from 'commander';
|
|
3
4
|
import { readFile } from 'fs/promises';
|
|
4
5
|
import {
|
|
@@ -79,8 +80,9 @@ commander
|
|
|
79
80
|
.command('build')
|
|
80
81
|
.description('Build ldd, app, pdf and word for production')
|
|
81
82
|
.argument('[version]', 'The name of component or group.')
|
|
82
|
-
.
|
|
83
|
-
|
|
83
|
+
.option('-c, --customer <customer>', 'The customer to build for')
|
|
84
|
+
.action(async (version, options) => {
|
|
85
|
+
await build(version, options);
|
|
84
86
|
});
|
|
85
87
|
|
|
86
88
|
commander
|
|
@@ -110,45 +110,58 @@
|
|
|
110
110
|
"identifier": "wp_cf_prettyTitle",
|
|
111
111
|
"type": "text",
|
|
112
112
|
"matches": [
|
|
113
|
-
"title-h1.text",
|
|
114
|
-
"title-h2.text",
|
|
115
|
-
"title-h3.text",
|
|
116
|
-
"title-h4.text",
|
|
117
|
-
"title-h5.text",
|
|
118
|
-
"title-h6.text"
|
|
113
|
+
"title-h1.title-h1-text",
|
|
114
|
+
"title-h2.title-h2-text",
|
|
115
|
+
"title-h3.title-h3-text",
|
|
116
|
+
"title-h4.title-h4-text",
|
|
117
|
+
"title-h5.title-h5-text",
|
|
118
|
+
"title-h6.title-h6-text"
|
|
119
119
|
]
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"identifier": "menuTitle",
|
|
123
123
|
"type": "text",
|
|
124
124
|
"matches": [
|
|
125
|
-
"title-h1.text",
|
|
126
|
-
"title-h2.text",
|
|
127
|
-
"title-h3.text",
|
|
128
|
-
"title-h4.text",
|
|
129
|
-
"title-h5.text",
|
|
130
|
-
"title-h6.text"
|
|
125
|
+
"title-h1.title-h1-text",
|
|
126
|
+
"title-h2.title-h2-text",
|
|
127
|
+
"title-h3.title-h3-text",
|
|
128
|
+
"title-h4.title-h4-text",
|
|
129
|
+
"title-h5.title-h5-text",
|
|
130
|
+
"title-h6.title-h6-text"
|
|
131
131
|
]
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"identifier": "wp_cf_prettyNumber",
|
|
135
135
|
"type": "text",
|
|
136
|
-
"matches": [
|
|
136
|
+
"matches": [
|
|
137
|
+
"title-h2.title-h2-number",
|
|
138
|
+
"title-h3.title-h3-number",
|
|
139
|
+
"title-h4.title-h4-number"
|
|
140
|
+
]
|
|
137
141
|
},
|
|
138
142
|
{
|
|
139
143
|
"identifier": "notesIdentifier",
|
|
140
144
|
"type": "text",
|
|
141
|
-
"matches": [
|
|
145
|
+
"matches": [
|
|
146
|
+
"title-h2.title-h2-number",
|
|
147
|
+
"title-h3.title-h3-number",
|
|
148
|
+
"title-h4.title-h4-number"
|
|
149
|
+
]
|
|
142
150
|
},
|
|
143
151
|
{
|
|
144
152
|
"identifier": "wp_cf_excerpt",
|
|
145
153
|
"type": "text",
|
|
146
|
-
"matches": [
|
|
154
|
+
"matches": [
|
|
155
|
+
"lead.text",
|
|
156
|
+
"paragraph.text"
|
|
157
|
+
]
|
|
147
158
|
},
|
|
148
159
|
{
|
|
149
160
|
"identifier": "wp_img-cf_featuredImage",
|
|
150
161
|
"type": "image",
|
|
151
|
-
"matches": [
|
|
162
|
+
"matches": [
|
|
163
|
+
"image.desktop-image"
|
|
164
|
+
]
|
|
152
165
|
}
|
|
153
166
|
]
|
|
154
167
|
}
|
package/dev/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"postinstall": "srl prepare"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@simple-reporting/base": "^1.0.
|
|
22
|
+
"@simple-reporting/base": "^1.0.19",
|
|
23
23
|
"axios": "^1.12.2",
|
|
24
24
|
"chalk": "^5.6.2",
|
|
25
25
|
"exceljs": "^4.4.0",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"node-html-parser": "^7.0.1",
|
|
30
30
|
"pinia": "^2.3.1",
|
|
31
31
|
"scrollmonitor": "^1.2.11",
|
|
32
|
-
"standard-scss": "github:mms-neidhartschoen/nsfd_standard-scss",
|
|
33
32
|
"vite-plugin-pwa": "^0.21.2",
|
|
34
33
|
"vue": "^3.5.13",
|
|
35
34
|
"vue-i18n": "^11.1.12",
|
|
@@ -5,7 +5,7 @@ $transition-duration: .3s;
|
|
|
5
5
|
|
|
6
6
|
.lc-accordion
|
|
7
7
|
{
|
|
8
|
-
@include srl.spacer-margin-top(
|
|
8
|
+
@include srl.spacer-margin-top(800);
|
|
9
9
|
|
|
10
10
|
&__inner {
|
|
11
11
|
|
|
@@ -64,14 +64,14 @@ $transition-duration: .3s;
|
|
|
64
64
|
border-width: srl.system-size-unit(1) 0 0 0;
|
|
65
65
|
text-align: left;
|
|
66
66
|
background-color: transparent;
|
|
67
|
-
padding: srl.spacer-get(
|
|
67
|
+
padding: srl.spacer-get(400) 0;
|
|
68
68
|
@include srl.spacer-gap(200);
|
|
69
69
|
cursor: pointer;
|
|
70
70
|
display: flex;
|
|
71
71
|
@extend %srl-regular-width;
|
|
72
72
|
|
|
73
73
|
.lc-title-h3__number {
|
|
74
|
-
width: srl.spacer-get(
|
|
74
|
+
width: srl.spacer-get(800);
|
|
75
75
|
color: srl.colors-black-1000();
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -123,7 +123,7 @@ $transition-duration: .3s;
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
&:not([hidden]) {
|
|
126
|
-
padding-bottom: srl.spacer-get(
|
|
126
|
+
padding-bottom: srl.spacer-get(400);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
&-inner {
|
|
@@ -42,21 +42,21 @@ img {
|
|
|
42
42
|
@top-left-corner {
|
|
43
43
|
content: element(publicationTitle);
|
|
44
44
|
position: absolute;
|
|
45
|
-
top: srl.spacer-get(
|
|
45
|
+
top: srl.spacer-get(400);
|
|
46
46
|
left: $page-margin-left;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
@top-left {
|
|
50
50
|
content: element(chapterNavigation);
|
|
51
51
|
position: absolute;
|
|
52
|
-
top: srl.spacer-get(
|
|
52
|
+
top: srl.spacer-get(400);
|
|
53
53
|
left: srl.grid-calculate-pdf-col-span-plus-one-gutter(2);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
@top-right-corner {
|
|
57
57
|
content: counter(page);
|
|
58
58
|
position: absolute;
|
|
59
|
-
top: srl.spacer-get(
|
|
59
|
+
top: srl.spacer-get(400);
|
|
60
60
|
right: $page-margin-right;
|
|
61
61
|
@include srl.typography-pdf-header()
|
|
62
62
|
}
|
package/dev/srl.config.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"meta": {
|
|
3
3
|
"meta": {
|
|
4
4
|
"title": {
|
|
5
|
-
"number-width":
|
|
5
|
+
"number-width": 800,
|
|
6
6
|
"number-width-pdf": 400
|
|
7
7
|
},
|
|
8
8
|
"list": {
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
"letter-spacing": 0,
|
|
155
155
|
"media": {
|
|
156
156
|
"print": {
|
|
157
|
-
"font-size": "
|
|
158
|
-
"line-height": 1.
|
|
157
|
+
"font-size": "16pt",
|
|
158
|
+
"line-height": 1.25
|
|
159
159
|
},
|
|
160
160
|
"up": {
|
|
161
161
|
"tablet-pt": {
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
},
|
|
870
|
-
"
|
|
870
|
+
"400": {
|
|
871
871
|
"size": 32,
|
|
872
872
|
"media": {
|
|
873
873
|
"print": {
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
},
|
|
878
|
-
"
|
|
878
|
+
"800": {
|
|
879
879
|
"size": 64,
|
|
880
880
|
"media": {
|
|
881
881
|
"print": {
|
|
@@ -883,7 +883,7 @@
|
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
885
|
},
|
|
886
|
-
"
|
|
886
|
+
"1600": {
|
|
887
887
|
"size": 128,
|
|
888
888
|
"media": {
|
|
889
889
|
"print": {
|
|
@@ -7,8 +7,8 @@ $quote-close: map.get(srl.$meta, quote, quote-close);
|
|
|
7
7
|
|
|
8
8
|
.srl-quote {
|
|
9
9
|
align-items: center;
|
|
10
|
-
row-gap: srl.spacer-get(
|
|
11
|
-
@include srl.spacer-margin-top(
|
|
10
|
+
row-gap: srl.spacer-get(400);
|
|
11
|
+
@include srl.spacer-margin-top(800);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.srl-quote__quote {
|
|
@@ -11,7 +11,7 @@ $table-border-bold: map.get(srl.$meta, table, border, bold);
|
|
|
11
11
|
|
|
12
12
|
.srl-table {
|
|
13
13
|
display: block;
|
|
14
|
-
@include srl.spacer-margin-top(
|
|
14
|
+
@include srl.spacer-margin-top(400);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.srl-table__container {
|
|
@@ -210,7 +210,7 @@ td {
|
|
|
210
210
|
|
|
211
211
|
&[class*="ind_ind"] {
|
|
212
212
|
&:first-child {
|
|
213
|
-
padding-left: srl.spacer-get(
|
|
213
|
+
padding-left: srl.spacer-get(400);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
package/package.json
CHANGED
package/scripts/beaver.js
CHANGED
|
@@ -46,7 +46,7 @@ function mapValues(values) {
|
|
|
46
46
|
* @returns {string} - The generated SCSS code.
|
|
47
47
|
*/
|
|
48
48
|
function writeTypographyScss(typography) {
|
|
49
|
-
let r = [`@use "config";`, `@forward "
|
|
49
|
+
let r = [`@use "config";`, `@forward "@simple-reporting/base/scss/typography";`];
|
|
50
50
|
if (typography) {
|
|
51
51
|
if (typography.typography) {
|
|
52
52
|
let o = [];
|
|
@@ -57,7 +57,7 @@ function writeTypographyScss(typography) {
|
|
|
57
57
|
o.push(`}\n`);
|
|
58
58
|
}
|
|
59
59
|
if (o.length) {
|
|
60
|
-
r.push(`@use "
|
|
60
|
+
r.push(`@use "@simple-reporting/base/scss/typography";\n`);
|
|
61
61
|
r.push(o.join(`\n`));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -72,7 +72,7 @@ function writeTypographyScss(typography) {
|
|
|
72
72
|
* @returns {string} - The SCSS code for importing and forwarding colors.
|
|
73
73
|
*/
|
|
74
74
|
function writeColorsScss(colors) {
|
|
75
|
-
let r = [`@use "config";`, `@forward "
|
|
75
|
+
let r = [`@use "config";`, `@forward "@simple-reporting/base/scss/colors";`];
|
|
76
76
|
if (colors) {
|
|
77
77
|
if (colors.colors) {
|
|
78
78
|
let o = [];
|
|
@@ -84,7 +84,7 @@ function writeColorsScss(colors) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (o.length) {
|
|
87
|
-
r.push(`@use "
|
|
87
|
+
r.push(`@use "@simple-reporting/base/scss/colors";\n`);
|
|
88
88
|
r.push(o.join(`\n`));
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -263,7 +263,7 @@ async function beaver(verbose = 0) {
|
|
|
263
263
|
if (typeof map[file] !== 'undefined') {
|
|
264
264
|
const o = [];
|
|
265
265
|
o.push(
|
|
266
|
-
`@use "
|
|
266
|
+
`@use "@simple-reporting/base/scss/${file}/variables.scss" as ${file}Variables with (`,
|
|
267
267
|
);
|
|
268
268
|
let v = [];
|
|
269
269
|
for (const variable in map[file]) {
|
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): Promise<void>;
|
|
8
|
+
export function build(version: string, options: any): 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
|
@@ -470,7 +470,6 @@ async function buildLdd(version) {
|
|
|
470
470
|
join(folders.root, 'livingdocs.config.json'),
|
|
471
471
|
join(folders.srlOutput, 'ldd', 'design.json'),
|
|
472
472
|
);
|
|
473
|
-
buildPdfCustomer()
|
|
474
473
|
});
|
|
475
474
|
} catch (e) {
|
|
476
475
|
console.error(e);
|
|
@@ -478,7 +477,17 @@ async function buildLdd(version) {
|
|
|
478
477
|
}
|
|
479
478
|
}
|
|
480
479
|
|
|
481
|
-
async function buildPdfCustomer() {
|
|
480
|
+
async function buildPdfCustomer(customer) {
|
|
481
|
+
const customerDir = join(folders.root, 'pdf', 'customers', customer);
|
|
482
|
+
|
|
483
|
+
try {
|
|
484
|
+
statSync(customerDir);
|
|
485
|
+
} catch (e) {
|
|
486
|
+
console.error(`Customer ${customer} does not exist in: ` + customerDir);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
console.log(`\nBuild PDF for customer ${customer}`);
|
|
490
|
+
|
|
482
491
|
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
483
492
|
const lddJson = await readLivingDocsJson();
|
|
484
493
|
|
|
@@ -486,108 +495,114 @@ async function buildPdfCustomer() {
|
|
|
486
495
|
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
487
496
|
statSync(pdfDir);
|
|
488
497
|
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
489
|
-
console.log(
|
|
498
|
+
console.log(`PDF folder has been copied to ${relative(folders.root, lddPdfDir)}`);
|
|
490
499
|
} catch (e) {
|
|
491
500
|
console.error(e)
|
|
492
501
|
}
|
|
493
502
|
|
|
494
503
|
try {
|
|
495
|
-
const customerDir = join(folders.root, 'pdf', 'customers');
|
|
496
504
|
statSync(customerDir);
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
|
|
505
|
+
const customerTarget = join(lddPdfDir, customer);
|
|
506
|
+
mkdirSync(customerTarget, { recursive: true });
|
|
507
|
+
const jsReferences = [
|
|
508
|
+
'pdf.js'
|
|
509
|
+
];
|
|
510
|
+
const cssReferences = [
|
|
511
|
+
'pdf.css'
|
|
512
|
+
];
|
|
500
513
|
|
|
501
514
|
try {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
];
|
|
510
|
-
const cssReferences = [
|
|
511
|
-
'pdf.css'
|
|
512
|
-
];
|
|
513
|
-
|
|
514
|
-
try {
|
|
515
|
-
const scssPath = join(customerFolder, 'custom.ts');
|
|
516
|
-
statSync(scssPath);
|
|
517
|
-
const config = {
|
|
518
|
-
css: {
|
|
519
|
-
preprocessorOptions: {
|
|
520
|
-
scss: {
|
|
521
|
-
api: 'modern-compiler',
|
|
522
|
-
},
|
|
523
|
-
},
|
|
515
|
+
const tsPath = join(customerDir, 'custom.ts');
|
|
516
|
+
statSync(tsPath);
|
|
517
|
+
const config = {
|
|
518
|
+
css: {
|
|
519
|
+
preprocessorOptions: {
|
|
520
|
+
scss: {
|
|
521
|
+
api: 'modern-compiler',
|
|
524
522
|
},
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
try {
|
|
539
|
-
statSync(join(customerTarget, 'custom.js'));
|
|
540
|
-
jsReferences.push(`${customer}/custom.js`);
|
|
541
|
-
} catch (e) {}
|
|
542
|
-
|
|
543
|
-
try {
|
|
544
|
-
statSync(join(customerTarget, 'custom.css'));
|
|
545
|
-
cssReferences.push(`${customer}/custom.css`);
|
|
546
|
-
} catch (e) {}
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
base: './',
|
|
526
|
+
build: {
|
|
527
|
+
outDir: customerTarget,
|
|
528
|
+
lib: {
|
|
529
|
+
fileName: 'custom',
|
|
530
|
+
entry: tsPath,
|
|
531
|
+
formats: ['es'],
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
publicDir: false,
|
|
535
|
+
};
|
|
547
536
|
|
|
537
|
+
try {
|
|
538
|
+
await viteBuild(config);
|
|
539
|
+
} catch (e) {
|
|
540
|
+
console.error(e);
|
|
541
|
+
}
|
|
542
|
+
jsReferences.push(join(customer, 'custom.js'));
|
|
543
|
+
} catch (e) {}
|
|
548
544
|
|
|
549
|
-
|
|
545
|
+
try {
|
|
546
|
+
const cssPath = join(customerTarget, 'custom.css');
|
|
547
|
+
statSync(cssPath);
|
|
548
|
+
cssReferences.push(join(customer, 'custom.css'));
|
|
549
|
+
} catch (e) {}
|
|
550
550
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
551
|
+
try {
|
|
552
|
+
const publicDir = join(customerDir, 'public');
|
|
553
|
+
statSync(publicDir);
|
|
554
|
+
const publicTarget = join(customerTarget, 'public');
|
|
555
|
+
await cpSync(publicDir, publicTarget, { recursive: true });
|
|
556
|
+
console.log(`Customer ${customer} public folder has been copied to ${relative(folders.root, publicTarget)}`);
|
|
557
|
+
|
|
558
|
+
const publicFiles = await glob(join(publicTarget, '**', '*'), { withFileTypes: true });
|
|
559
|
+
|
|
560
|
+
for (const publicFile of publicFiles) {
|
|
561
|
+
if (publicFile.isFile()) {
|
|
562
|
+
if (publicFile.name.endsWith('.css')) {
|
|
563
|
+
cssReferences.push(`${relative(lddPdfDir, publicFile.fullpath())}`);
|
|
564
|
+
}
|
|
565
|
+
if (publicFile.name.endsWith('.js')) {
|
|
566
|
+
jsReferences.push(`${relative(lddPdfDir, publicFile.fullpath())}`);
|
|
566
567
|
}
|
|
567
568
|
}
|
|
568
|
-
|
|
569
|
-
const ns = `${nsWowInternalLddUrl}/${lddJson.name}/${lddJson.version}/pdf`;
|
|
570
|
-
|
|
571
|
-
const pdfConfig = [
|
|
572
|
-
'<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'
|
|
573
|
-
];
|
|
574
|
-
cssReferences.forEach( p => {
|
|
575
|
-
pdfConfig.push(` <userStyleSheets><uri>${ns}/${p}</uri></userStyleSheets>`);
|
|
576
|
-
})
|
|
577
|
-
|
|
578
|
-
jsReferences.forEach( p => {
|
|
579
|
-
pdfConfig.push(` <userScripts><uri>${ns}/${p}</uri></userScripts>`);
|
|
580
|
-
})
|
|
581
|
-
|
|
582
|
-
pdfConfig.push(`</configuration>`);
|
|
583
|
-
|
|
584
|
-
const pdfConfigPath = join(customerTarget, 'pdf-configuration.xml');
|
|
585
|
-
await writeFileSync(pdfConfigPath, pdfConfig.join('\n'));
|
|
586
|
-
console.log(`Create PDF configuration file /${relative(folders.root, pdfConfigPath)}`);
|
|
587
569
|
}
|
|
588
|
-
} catch (e) {
|
|
589
|
-
|
|
590
|
-
|
|
570
|
+
} catch (e) {}
|
|
571
|
+
|
|
572
|
+
const pdfXmlStart = `<configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n`;
|
|
573
|
+
const pdfXmlEnd = `\n</configuration>`;
|
|
574
|
+
const nsWowUrl = `${nsWowInternalLddUrl}/${lddJson.name}/${lddJson.version}/pdf`;
|
|
575
|
+
|
|
576
|
+
const pdfConfig = [];
|
|
577
|
+
cssReferences.forEach( p => {
|
|
578
|
+
pdfConfig.push(` <userStyleSheets><uri>${nsWowUrl}/${p}</uri></userStyleSheets>`);
|
|
579
|
+
})
|
|
580
|
+
|
|
581
|
+
jsReferences.forEach( p => {
|
|
582
|
+
pdfConfig.push(` <userScripts><uri>${nsWowUrl}/${p}</uri></userScripts>`);
|
|
583
|
+
})
|
|
584
|
+
|
|
585
|
+
const pdfConfigContent = pdfXmlStart
|
|
586
|
+
+ ` <appendLog>false</appendLog>\n`
|
|
587
|
+
+ pdfConfig.join('\n')
|
|
588
|
+
+ pdfXmlEnd;
|
|
589
|
+
const pdfConfigPath = join(customerTarget, 'pdf-configuration.xml');
|
|
590
|
+
writeFileSync(pdfConfigPath, pdfConfigContent);
|
|
591
|
+
console.log(`Customer ${customer} PDF configuration file has been built to ${relative(folders.root, pdfConfigPath)}`);
|
|
592
|
+
|
|
593
|
+
const pdfConfigDebugContent = pdfXmlStart
|
|
594
|
+
+ ` <appendLog>true</appendLog>\n`
|
|
595
|
+
+ ` <inspectableSettings><enabled>true</enabled></inspectableSettings>\n`
|
|
596
|
+
+ ` <debugSettings><all>true</all></debugSettings>\n`
|
|
597
|
+
+ pdfConfig.join('\n')
|
|
598
|
+
+ pdfXmlEnd;
|
|
599
|
+
const pdfConfigDebugPath = join(customerTarget, 'pdf-configuration-debug.xml');
|
|
600
|
+
writeFileSync(pdfConfigDebugPath, pdfConfigDebugContent);
|
|
601
|
+
console.log(`Customer ${customer} PDF debug configuration file has been built to ${relative(folders.root, pdfConfigDebugPath)}`);
|
|
602
|
+
|
|
603
|
+
console.log(`Customer ${customer} PDF files has been built to ${relative(folders.root, customerTarget)}`);
|
|
604
|
+
|
|
605
|
+
console.log("\n");
|
|
591
606
|
} catch (e) {}
|
|
592
607
|
|
|
593
608
|
return true;
|
|
@@ -639,7 +654,8 @@ async function buildWord() {
|
|
|
639
654
|
* @param {string} version
|
|
640
655
|
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
641
656
|
*/
|
|
642
|
-
async function build(version) {
|
|
657
|
+
async function build(version, options) {
|
|
658
|
+
|
|
643
659
|
try {
|
|
644
660
|
await checkFolders();
|
|
645
661
|
const packageJson = await readPackageJson();
|
|
@@ -661,6 +677,7 @@ async function build(version) {
|
|
|
661
677
|
await buildWord();
|
|
662
678
|
await buildXbrl();
|
|
663
679
|
await buildLdd();
|
|
680
|
+
!options.customer || await buildPdfCustomer(options.customer);
|
|
664
681
|
new LivingdocsDesignValidator(await readLivingDocsJson()).IsDesignValid();
|
|
665
682
|
await zipApp();
|
|
666
683
|
await zipLdd();
|
|
@@ -845,32 +862,32 @@ async function mapScss() {
|
|
|
845
862
|
join(folders.srlImports, 'app.scss'),
|
|
846
863
|
`@use ` +
|
|
847
864
|
output.app.join(';\n@use ') +
|
|
848
|
-
`;\n@use "
|
|
865
|
+
`;\n@use "@simple-reporting/base/scss/core-styles.scss" as *;\n`,
|
|
849
866
|
);
|
|
850
867
|
await writeFileSync(
|
|
851
868
|
join(folders.srlImports, 'ldd.scss'),
|
|
852
869
|
`@use ` +
|
|
853
870
|
output.ldd.join(';\n@use ') +
|
|
854
|
-
`;\n@use "
|
|
871
|
+
`;\n@use "@simple-reporting/base/scss/core-styles.scss" as *;\n`,
|
|
855
872
|
);
|
|
856
873
|
await writeFileSync(
|
|
857
874
|
join(folders.srlImports, 'pdf.scss'),
|
|
858
875
|
`@use ` +
|
|
859
876
|
output.pdf.join(';\n@use ') +
|
|
860
|
-
`;\n@use "
|
|
877
|
+
`;\n@use "@simple-reporting/base/scss/core-styles.scss" as *;\n`,
|
|
861
878
|
);
|
|
862
879
|
await writeFileSync(
|
|
863
880
|
join(folders.srlImports, 'word.scss'),
|
|
864
881
|
`@use ` +
|
|
865
882
|
output.word.join(';\n@use ') +
|
|
866
|
-
`;\n@use "
|
|
883
|
+
`;\n@use "@simple-reporting/base/scss/core-styles.scss" as *;\n`,
|
|
867
884
|
);
|
|
868
885
|
|
|
869
886
|
await writeFileSync(
|
|
870
887
|
join(folders.srlImports, 'xbrl.scss'),
|
|
871
888
|
output.xbrl.length
|
|
872
889
|
? `@use ` + output.xbrl.join(';\n@use ')
|
|
873
|
-
: '' + `;\n@use "
|
|
890
|
+
: '' + `;\n@use "@simple-reporting/base/scss/xbrl-core-styles.scss" as *;\n`,
|
|
874
891
|
);
|
|
875
892
|
|
|
876
893
|
return true;
|
package/scripts/folders.js
CHANGED
|
@@ -7,7 +7,7 @@ export const packagePath = join(root, 'node_modules', packageName);
|
|
|
7
7
|
export const packageSrl = join(packagePath, 'srl');
|
|
8
8
|
export const packageLd = join(packagePath, 'livingdocs');
|
|
9
9
|
export const srlRoot = join(root, '.srl');
|
|
10
|
-
export const srlSystem = join(
|
|
10
|
+
export const srlSystem = join(root, 'srl');
|
|
11
11
|
export const srlComponents = join(srlRoot, 'components');
|
|
12
12
|
export const srlComposables = join(srlRoot, 'composables');
|
|
13
13
|
export const srlUtils = join(srlRoot, 'utils');
|
package/scripts/prepare.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import folders from './folders.js';
|
|
2
2
|
import fs from 'fs';
|
|
3
|
+
import { join } from 'path/posix';
|
|
3
4
|
|
|
4
5
|
async function prepare() {
|
|
5
6
|
if (fs.existsSync(folders.srlRoot)) {
|
|
6
7
|
await fs.rmSync(folders.srlRoot, { recursive: true, force: true });
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
const srlFolders = fs.readdirSync(folders.packageSrl, { withFileTypes: true });
|
|
10
|
+
for (const srlFolder of srlFolders) {
|
|
11
|
+
const srcPath = join(folders.packageSrl, srlFolder.name);
|
|
12
|
+
const destPath = join(folders.root, srlFolder.name);
|
|
13
|
+
fs.cpSync(srcPath, destPath, { recursive: true });
|
|
14
|
+
}
|
|
15
|
+
const srlIgnoresFiles = fs.readdirSync(join(folders.packageSrl, 'srl'), { withFileTypes: true });
|
|
16
|
+
const srlIgnoreContent = [];
|
|
17
|
+
for (const srlIgnoreFile of srlIgnoresFiles) {
|
|
18
|
+
srlIgnoreContent.push(`/${srlIgnoreFile.name}`);
|
|
19
|
+
}
|
|
20
|
+
fs.writeFileSync(join(folders.root, 'srl', '.gitignore'), srlIgnoreContent.join('\n'));
|
|
9
21
|
}
|
|
10
22
|
|
|
11
23
|
export default prepare;
|
package/srl/srl/colors.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
3
|
-
@use '
|
|
2
|
+
@forward '@simple-reporting/base/scss/colors';
|
|
3
|
+
@use '@simple-reporting/base/scss/colors';
|
package/srl/srl/config.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
5
|
-
@use '
|
|
6
|
-
@use '
|
|
7
|
-
@use '
|
|
1
|
+
@use '@simple-reporting/base/scss/system/variables' as systemVariables;
|
|
2
|
+
@use '@simple-reporting/base/scss/meta/variables' as metaVariables;
|
|
3
|
+
@use '@simple-reporting/base/scss/grid/variables' as gridVariables;
|
|
4
|
+
@use '@simple-reporting/base/scss/colors/variables' as colorsVariables;
|
|
5
|
+
@use '@simple-reporting/base/scss/typography/variables' as typographyVariables;
|
|
6
|
+
@use '@simple-reporting/base/scss/spacer/variables' as spacerVariables;
|
|
7
|
+
@use '@simple-reporting/base/scss/helpers/variables' as helpersVariables;
|
package/srl/srl/core-styles.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/core-styles';
|
package/srl/srl/fonts.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/fonts';
|
package/srl/srl/grid.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/grid';
|
package/srl/srl/helpers.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/helpers';
|
package/srl/srl/index.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@use 'config';
|
|
2
|
-
@forward 'system' as system-*;
|
|
3
|
-
@forward 'fonts' as fonts-*;
|
|
4
|
-
@forward 'grid' as grid-*;
|
|
5
|
-
@forward 'colors' as colors-*;
|
|
6
|
-
@forward 'typography' as typography-*;
|
|
7
|
-
@forward 'helpers' as helpers-*;
|
|
8
|
-
@forward 'spacer' as spacer-*;
|
|
9
|
-
@forward 'meta';
|
|
1
|
+
@use './config';
|
|
2
|
+
@forward './system' as system-*;
|
|
3
|
+
@forward './fonts' as fonts-*;
|
|
4
|
+
@forward './grid' as grid-*;
|
|
5
|
+
@forward './colors' as colors-*;
|
|
6
|
+
@forward './typography' as typography-*;
|
|
7
|
+
@forward './helpers' as helpers-*;
|
|
8
|
+
@forward './spacer' as spacer-*;
|
|
9
|
+
@forward './meta';
|
package/srl/srl/meta.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/meta';
|
package/srl/srl/pdf.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/pdf';
|
package/srl/srl/spacer.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/spacer';
|
package/srl/srl/system.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
2
|
+
@forward '@simple-reporting/base/scss/system';
|
package/srl/srl/typography.scss
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@use 'config';
|
|
2
|
-
@forward '
|
|
3
|
-
@use '
|
|
2
|
+
@forward '@simple-reporting/base/scss/typography';
|
|
3
|
+
@use '@simple-reporting/base/scss/typography';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|