@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.
Files changed (123) hide show
  1. package/cli.js +4 -2
  2. package/dev/livingdocs.config.json +29 -16
  3. package/dev/package.json +1 -2
  4. package/dev/src/assets/scss/components/note/accordion.scss +4 -4
  5. package/dev/src/assets/scss/pdf.scss +3 -3
  6. package/dev/srl.config.json +6 -6
  7. package/livingdocs/010.Titles/020.title-h2/scss/general.scss +1 -1
  8. package/livingdocs/010.Titles/030.title-h3/scss/general.scss +1 -1
  9. package/livingdocs/010.Titles/040.title-h4/scss/general.scss +1 -1
  10. package/livingdocs/020.Text/010.lead/scss/general.scss +1 -1
  11. package/livingdocs/020.Text/050.quote/scss/general.scss +1 -1
  12. package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +2 -2
  13. package/livingdocs/020.Text/070.footnote-container/scss/general.scss +1 -0
  14. package/livingdocs/020.Text/070.footnote-container/scss/pdf.scss +9 -0
  15. package/livingdocs/040.Media/010.table/scss/general.scss +2 -2
  16. package/livingdocs/040.Media/020.image/scss/general.scss +1 -1
  17. package/livingdocs/040.Media/030.video/scss/web.scss +2 -2
  18. package/livingdocs/060.Buttons/010.button-container/scss/general.scss +1 -1
  19. package/livingdocs/090.Signatures/010.signature-container/scss/general.scss +1 -1
  20. package/livingdocs/090.Signatures/010.signature-container/scss/web.scss +1 -1
  21. package/package.json +1 -1
  22. package/scripts/beaver.js +5 -5
  23. package/scripts/build.d.ts +1 -1
  24. package/scripts/build.js +112 -95
  25. package/scripts/folders.js +1 -1
  26. package/scripts/prepare.js +13 -1
  27. package/srl/{tsconfig.srl.json → .srl/tsconfig.srl.json} +2 -2
  28. package/srl/srl/colors.scss +2 -2
  29. package/srl/srl/config.scss +7 -7
  30. package/srl/srl/core-styles.scss +1 -1
  31. package/srl/srl/fonts.scss +1 -1
  32. package/srl/srl/grid.scss +1 -1
  33. package/srl/srl/helpers.scss +1 -1
  34. package/srl/srl/index.scss +9 -9
  35. package/srl/srl/meta.scss +1 -1
  36. package/srl/srl/pdf.scss +1 -1
  37. package/srl/srl/spacer.scss +1 -1
  38. package/srl/srl/system.scss +1 -1
  39. package/srl/srl/typography.scss +2 -2
  40. /package/{srl/scss → scss}/colors/functions.scss +0 -0
  41. /package/{srl/scss → scss}/colors/index.scss +0 -0
  42. /package/{srl/scss → scss}/colors/mixins.scss +0 -0
  43. /package/{srl/scss → scss}/colors/variables.scss +0 -0
  44. /package/{srl/scss → scss}/config.scss +0 -0
  45. /package/{srl/scss → scss}/core-styles.scss +0 -0
  46. /package/{srl/scss → scss}/fonts/functions.scss +0 -0
  47. /package/{srl/scss → scss}/fonts/index.scss +0 -0
  48. /package/{srl/scss → scss}/fonts/mixins.scss +0 -0
  49. /package/{srl/scss → scss}/fonts/variables.scss +0 -0
  50. /package/{srl/scss → scss}/grid/functions.scss +0 -0
  51. /package/{srl/scss → scss}/grid/index.scss +0 -0
  52. /package/{srl/scss → scss}/grid/mixins.scss +0 -0
  53. /package/{srl/scss → scss}/grid/variables.scss +0 -0
  54. /package/{srl/scss → scss}/helpers/functions.scss +0 -0
  55. /package/{srl/scss → scss}/helpers/index.scss +0 -0
  56. /package/{srl/scss → scss}/helpers/mixins.scss +0 -0
  57. /package/{srl/scss → scss}/helpers/variables.scss +0 -0
  58. /package/{srl/scss → scss}/index.scss +0 -0
  59. /package/{srl/scss → scss}/meta/functions.scss +0 -0
  60. /package/{srl/scss → scss}/meta/index.scss +0 -0
  61. /package/{srl/scss → scss}/meta/mixins.scss +0 -0
  62. /package/{srl/scss → scss}/meta/variables.scss +0 -0
  63. /package/{srl/scss → scss}/spacer/functions.scss +0 -0
  64. /package/{srl/scss → scss}/spacer/index.scss +0 -0
  65. /package/{srl/scss → scss}/spacer/mixins.scss +0 -0
  66. /package/{srl/scss → scss}/spacer/variables.scss +0 -0
  67. /package/{srl/scss → scss}/system/functions.scss +0 -0
  68. /package/{srl/scss → scss}/system/index.scss +0 -0
  69. /package/{srl/scss → scss}/system/mixins.scss +0 -0
  70. /package/{srl/scss → scss}/system/root.scss +0 -0
  71. /package/{srl/scss → scss}/system/variables.scss +0 -0
  72. /package/{srl/scss → scss}/typography/functions.scss +0 -0
  73. /package/{srl/scss → scss}/typography/index.scss +0 -0
  74. /package/{srl/scss → scss}/typography/mixins.scss +0 -0
  75. /package/{srl/scss → scss}/typography/variables.scss +0 -0
  76. /package/{srl/scss → scss}/xbrl-core-styles.scss +0 -0
  77. /package/srl/{App.vue → .srl/App.vue} +0 -0
  78. /package/srl/{components → .srl/components}/Srl/Aria/TabChain.vue +0 -0
  79. /package/srl/{components → .srl/components}/Srl/Article/Autoload.vue +0 -0
  80. /package/srl/{components → .srl/components}/Srl/Article/Dialog/Button.vue +0 -0
  81. /package/srl/{components → .srl/components}/Srl/Article/Root.vue +0 -0
  82. /package/srl/{components → .srl/components}/Srl/Category/Accordion/Content.vue +0 -0
  83. /package/srl/{components → .srl/components}/Srl/Category/Accordion/Toggle.vue +0 -0
  84. /package/srl/{components → .srl/components}/Srl/Category/Accordion.vue +0 -0
  85. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon/After.vue +0 -0
  86. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon/Before.vue +0 -0
  87. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Icon.vue +0 -0
  88. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image/After.vue +0 -0
  89. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image/Before.vue +0 -0
  90. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Image.vue +0 -0
  91. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content/Text.vue +0 -0
  92. /package/srl/{components → .srl/components}/Srl/Menu/Item/Content.vue +0 -0
  93. /package/srl/{components → .srl/components}/Srl/Menu/Item.vue +0 -0
  94. /package/srl/{components → .srl/components}/Srl/Menu.vue +0 -0
  95. /package/srl/{components → .srl/components}/Srl/Page/Dialog.vue +0 -0
  96. /package/srl/{composables → .srl/composables}/article.ts +0 -0
  97. /package/srl/{composables → .srl/composables}/articles.ts +0 -0
  98. /package/srl/{composables → .srl/composables}/config.ts +0 -0
  99. /package/srl/{composables → .srl/composables}/cssStyles.ts +0 -0
  100. /package/srl/{composables → .srl/composables}/downloads.ts +0 -0
  101. /package/srl/{composables → .srl/composables}/index.ts +0 -0
  102. /package/srl/{composables → .srl/composables}/languageSwitch.ts +0 -0
  103. /package/srl/{composables → .srl/composables}/locale.ts +0 -0
  104. /package/srl/{composables → .srl/composables}/menu.ts +0 -0
  105. /package/srl/{composables → .srl/composables}/search.ts +0 -0
  106. /package/srl/{composables → .srl/composables}/settings.ts +0 -0
  107. /package/srl/{composables → .srl/composables}/viewPort.ts +0 -0
  108. /package/srl/{imports → .srl/imports}/app.scss +0 -0
  109. /package/srl/{imports → .srl/imports}/ldd.scss +0 -0
  110. /package/srl/{imports → .srl/imports}/pdf.scss +0 -0
  111. /package/srl/{imports → .srl/imports}/word.scss +0 -0
  112. /package/srl/{imports → .srl/imports}/xbrl.scss +0 -0
  113. /package/srl/{plugins → .srl/plugins}/asyncLdComponent.ts +0 -0
  114. /package/srl/{plugins → .srl/plugins}/asyncSrlComponents.ts +0 -0
  115. /package/srl/{plugins → .srl/plugins}/initProject.ts +0 -0
  116. /package/srl/{plugins → .srl/plugins}/vueSrlPlugin.ts +0 -0
  117. /package/srl/{types → .srl/types}/components.d.ts +0 -0
  118. /package/srl/{types → .srl/types}/global.d.ts +0 -0
  119. /package/srl/{types → .srl/types}/nswow.d.ts +0 -0
  120. /package/srl/{utils → .srl/utils}/camelCase.ts +0 -0
  121. /package/srl/{utils → .srl/utils}/html.ts +0 -0
  122. /package/srl/{utils → .srl/utils}/index.ts +0 -0
  123. /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
- .action(async (version) => {
83
- await build(version);
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": ["title-h2.number", "title-h3.number", "title-h4.number"]
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": ["title-h2.number", "title-h3.number", "title-h4.number"]
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": ["lead.text", "paragraph.text"]
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": ["image.desktop-image"]
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.17",
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(400);
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(300) 0;
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(400);
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(300);
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(300);
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(300);
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(300);
59
+ top: srl.spacer-get(400);
60
60
  right: $page-margin-right;
61
61
  @include srl.typography-pdf-header()
62
62
  }
@@ -2,7 +2,7 @@
2
2
  "meta": {
3
3
  "meta": {
4
4
  "title": {
5
- "number-width": 400,
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": "20pt",
158
- "line-height": 1.2
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
- "300": {
870
+ "400": {
871
871
  "size": 32,
872
872
  "media": {
873
873
  "print": {
@@ -875,7 +875,7 @@
875
875
  }
876
876
  }
877
877
  },
878
- "400": {
878
+ "800": {
879
879
  "size": 64,
880
880
  "media": {
881
881
  "print": {
@@ -883,7 +883,7 @@
883
883
  }
884
884
  }
885
885
  },
886
- "500": {
886
+ "1600": {
887
887
  "size": 128,
888
888
  "media": {
889
889
  "print": {
@@ -5,7 +5,7 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
5
5
 
6
6
  .srl-title-h2 {
7
7
  @include srl.typography-title-h2();
8
- @include srl.spacer-margin-top(400);
8
+ @include srl.spacer-margin-top(800);
9
9
  }
10
10
 
11
11
  .srl-title-h2__number-text-container {
@@ -5,7 +5,7 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
5
5
 
6
6
  .srl-title-h3 {
7
7
  @include srl.typography-title-h3();
8
- @include srl.spacer-margin-top(300);
8
+ @include srl.spacer-margin-top(400);
9
9
  }
10
10
 
11
11
  .srl-title-h3__number-text-container {
@@ -5,7 +5,7 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
5
5
 
6
6
  .srl-title-h4 {
7
7
  @include srl.typography-title-h4();
8
- @include srl.spacer-margin-top(300);
8
+ @include srl.spacer-margin-top(400);
9
9
  }
10
10
 
11
11
  .srl-title-h4__number-text-container {
@@ -2,5 +2,5 @@
2
2
 
3
3
  .srl-lead {
4
4
  @include srl.typography-lead();
5
- @include srl.spacer-margin-top(300);
5
+ @include srl.spacer-margin-top(400);
6
6
  }
@@ -1,7 +1,7 @@
1
1
  @use 'srl';
2
2
 
3
3
  .srl-quote {
4
- @include srl.spacer-margin-top(400);
4
+ @include srl.spacer-margin-top(800);
5
5
  }
6
6
 
7
7
  .srl-quote__quote {
@@ -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(300);
11
- @include srl.spacer-margin-top(400);
10
+ row-gap: srl.spacer-get(400);
11
+ @include srl.spacer-margin-top(800);
12
12
  }
13
13
 
14
14
  .srl-quote__quote {
@@ -1,5 +1,6 @@
1
1
  @use "srl";
2
2
 
3
3
  .srl-footnote-container {
4
+ overflow: hidden;
4
5
  @include srl.spacer-margin-top(200);
5
6
  }
@@ -0,0 +1,9 @@
1
+ @use 'srl';
2
+
3
+ .srl-footnote-container:not(.srl-grid) {
4
+ @include srl.grid-pdf-flex-col(6);
5
+
6
+ .srl-wide-width & {
7
+ @include srl.grid-pdf-flex-col(8);
8
+ }
9
+ }
@@ -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(300);
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(300);
213
+ padding-left: srl.spacer-get(400);
214
214
  }
215
215
  }
216
216
 
@@ -2,7 +2,7 @@
2
2
  @use "assets/scss/placeholders";
3
3
 
4
4
  .srl-image {
5
- @include srl.spacer-margin-top(400);
5
+ @include srl.spacer-margin-top(800);
6
6
  }
7
7
 
8
8
  .srl-grid--media {
@@ -45,8 +45,8 @@
45
45
 
46
46
  .srl-video__play {
47
47
  position: absolute;
48
- top: srl.spacer-get(300);
49
- left: srl.spacer-get(300);
48
+ top: srl.spacer-get(400);
49
+ left: srl.spacer-get(400);
50
50
  z-index: 5;
51
51
  opacity: 1;
52
52
  transition: opacity 0.3s ease;
@@ -2,5 +2,5 @@
2
2
 
3
3
  .srl-button-container__inner {
4
4
  display: flex;
5
- gap: srl.spacer-get(300);
5
+ gap: srl.spacer-get(400);
6
6
  }
@@ -1,5 +1,5 @@
1
1
  @use 'srl';
2
2
 
3
3
  .srl-signature {
4
- @include srl.spacer-margin-top(300);
4
+ @include srl.spacer-margin-top(400);
5
5
  }
@@ -3,5 +3,5 @@
3
3
  .srl-signature__content {
4
4
  display: grid;
5
5
  grid-template-columns: subgrid;
6
- row-gap: srl.spacer-get(300);
6
+ row-gap: srl.spacer-get(400);
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-reporting/base",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Manage srl templates, build and publish",
5
5
  "bin": {
6
6
  "srl": "cli.js"
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 "../scss/typography";`];
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 "../scss/typography";\n`);
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 "../scss/colors";`];
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 "../scss/colors";\n`);
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 "../scss/${file}/variables.scss" as ${file}Variables with (`,
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]) {
@@ -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('PDF folder has been copied to ' + lddPdfDir);
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 customerFolders = readdirSync(customerDir, { withFileTypes: true })
498
- .filter(dirent => dirent.isDirectory())
499
- .map(dirent => dirent.name);
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
- for (let i = 0; i < customerFolders.length; i++) {
503
- const customer = customerFolders[i];
504
- const customerFolder = join(customerDir, customer);
505
- const customerTarget = join(lddPdfDir, customer);
506
-
507
- const jsReferences = [
508
- 'pdf.js'
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
- base: './',
526
- build: {
527
- outDir: customerTarget,
528
- lib: {
529
- fileName: 'custom',
530
- entry: scssPath,
531
- formats: ['es'],
532
- },
533
- },
534
- publicDir: false,
535
- };
536
- await viteBuild(config)
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
- } catch (e) {}
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
- const files = await glob(join(customerFolder, '**', '*'), { withFileTypes: true });
552
- for (const file of files) {
553
- if (file.isFile()) {
554
- if (!file.name.endsWith('.scss') && !file.name.endsWith('.ts') && !file.name.endsWith('.tsx')) {
555
- const from = file.fullpath();
556
- const to = join(customerTarget, relative(customerFolder, file.fullpath()));
557
- await cpSync(from, to);
558
- console.log(`Copy /${relative(folders.root, from)} to /${relative(folders.root, to)}`);
559
- }
560
- if (file.name.endsWith('.css')) {
561
- cssReferences.push(`${relative(customerDir, file.fullpath())}`);
562
- }
563
- if (file.name.endsWith('.js')) {
564
- jsReferences.push(`${relative(customerDir, file.fullpath())}`);
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
- console.error(e)
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 "../scss/core-styles.scss" as *;\n`,
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 "../scss/core-styles.scss" as *;\n`,
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 "../scss/core-styles.scss" as *;\n`,
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 "../scss/core-styles.scss" as *;\n`,
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 "../scss/xbrl-core-styles.scss" as *;\n`,
890
+ : '' + `;\n@use "@simple-reporting/base/scss/xbrl-core-styles.scss" as *;\n`,
874
891
  );
875
892
 
876
893
  return true;
@@ -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(srlRoot, 'srl');
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');
@@ -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
- await fs.cpSync(folders.packageSrl, folders.srlRoot, { recursive: true });
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;
@@ -79,10 +79,10 @@
79
79
  "../src/assets/*"
80
80
  ],
81
81
  "srl": [
82
- "./srl"
82
+ "../srl"
83
83
  ],
84
84
  "srl/*": [
85
- "./srl/*"
85
+ "../srl/*"
86
86
  ]
87
87
  }
88
88
  }
@@ -1,3 +1,3 @@
1
1
  @use 'config';
2
- @forward '../scss/colors';
3
- @use '../scss/colors';
2
+ @forward '@simple-reporting/base/scss/colors';
3
+ @use '@simple-reporting/base/scss/colors';
@@ -1,7 +1,7 @@
1
- @use '../scss/system/variables' as systemVariables;
2
- @use '../scss/meta/variables' as metaVariables;
3
- @use '../scss/grid/variables' as gridVariables;
4
- @use '../scss/colors/variables' as colorsVariables;
5
- @use '../scss/typography/variables' as typographyVariables;
6
- @use '../scss/spacer/variables' as spacerVariables;
7
- @use '../scss/helpers/variables' as helpersVariables;
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;
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/core-styles';
2
+ @forward '@simple-reporting/base/scss/core-styles';
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/fonts';
2
+ @forward '@simple-reporting/base/scss/fonts';
package/srl/srl/grid.scss CHANGED
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/grid';
2
+ @forward '@simple-reporting/base/scss/grid';
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/helpers';
2
+ @forward '@simple-reporting/base/scss/helpers';
@@ -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 '../scss/meta';
2
+ @forward '@simple-reporting/base/scss/meta';
package/srl/srl/pdf.scss CHANGED
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/pdf';
2
+ @forward '@simple-reporting/base/scss/pdf';
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/spacer';
2
+ @forward '@simple-reporting/base/scss/spacer';
@@ -1,2 +1,2 @@
1
1
  @use 'config';
2
- @forward '../scss/system';
2
+ @forward '@simple-reporting/base/scss/system';
@@ -1,3 +1,3 @@
1
1
  @use 'config';
2
- @forward '../scss/typography';
3
- @use '../scss/typography';
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