@simple-reporting/base 1.0.15 → 1.0.16

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 (55) hide show
  1. package/dev/package.json +1 -1
  2. package/dev/src/App.vue +2 -7
  3. package/dev/src/components/{PageHeader.vue → Page/Header.vue} +1 -2
  4. package/dev/src/views/ArticleView.vue +2 -3
  5. package/package.json +1 -1
  6. package/plugins/viteSrlPlugin.js +3 -2
  7. package/scripts/build.js +17 -0
  8. package/scripts/ldd/mapLdd.js +2 -2
  9. package/scripts/vue/components.js +14 -15
  10. package/srl/components/Srl/Menu/Item.vue +7 -3
  11. package/srl/components/Srl/Menu.vue +1 -1
  12. package/srl/composables/config.ts +13 -14
  13. package/srl/composables/cssStyles.ts +1 -1
  14. package/srl/composables/menu.ts +5 -1
  15. package/srl/composables/viewPort.ts +4 -3
  16. package/srl/plugins/initProject.ts +1 -1
  17. package/srl/utils/html.ts +3 -3
  18. package/dev/src/components/SrlPage/KFCApplication/KFCApplication.vue +0 -715
  19. package/dev/src/components/SrlPage/KFCApplication/KFCDropdownCharts.vue +0 -112
  20. package/dev/src/components/SrlPage/KFCApplication/KFCDropdownPeriod.vue +0 -85
  21. package/dev/src/components/SrlPage/KFCApplication/KFCTable.vue +0 -63
  22. package/dev/src/components/SrlPage/KFCApplication/hooks/kfcData.ts +0 -9
  23. package/dev/src/components/SrlPage/KFCApplication/models/KFCApplication.ts +0 -183
  24. package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-basic.scss +0 -1136
  25. package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-custom.scss +0 -71
  26. package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-general.scss +0 -113
  27. package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison-dropdown.scss +0 -189
  28. package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison.scss +0 -151
  29. package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-loading.scss +0 -40
  30. package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-print.scss +0 -20
  31. package/dev/src/components/SrlPage/KFCApplication/scss/_srl-button-kfc.scss +0 -21
  32. package/dev/src/components/SrlPage/KFCApplication/scss/_variables.scss +0 -10
  33. package/dev/src/components/SrlPage/KFCApplication/services/xlsxParser.ts +0 -194
  34. package/dev/src/components/SrlPage/KFCApplication/theme/SvgColumnView.vue +0 -28
  35. package/dev/src/components/SrlPage/KFCApplication/theme/SvgDownloadChart.vue +0 -26
  36. package/dev/src/components/SrlPage/KFCApplication/theme/SvgDropdown.vue +0 -18
  37. package/dev/src/components/SrlPage/KFCApplication/theme/SvgIndexedValues.vue +0 -18
  38. package/dev/src/components/SrlPage/KFCApplication/theme/SvgLegendSwap.vue +0 -18
  39. package/dev/src/components/SrlPage/KFCApplication/theme/SvgLineView.vue +0 -28
  40. package/dev/src/components/SrlPage/KFCApplication/theme/SvgPDFChart.vue +0 -26
  41. package/dev/src/components/SrlPage/KFCApplication/theme/SvgPrintChart.vue +0 -33
  42. package/dev/src/components/SrlPage/KFCApplication/theme/SvgTableView.vue +0 -67
  43. package/dev/src/components/SrlPage/KFCApplication/utils/XDownloader.js +0 -455
  44. package/dev/src/components/SrlPage/KFCApplication/utils/XDownloaderStyle.js +0 -44
  45. package/dev/src/components/SrlPage/KFCApplication/utils/XTableNamer.js +0 -68
  46. /package/dev/src/components/{BypassLinks.vue → Page/BypassLinks.vue} +0 -0
  47. /package/dev/src/components/{PageFooter.vue → Page/Footer.vue} +0 -0
  48. /package/dev/src/components/{PageMain.vue → Page/Main.vue} +0 -0
  49. /package/dev/src/components/{MainNavigation.vue → Page/MainNavigation.vue} +0 -0
  50. /package/dev/src/components/{NavLanguages.vue → Page/NavLanguages.vue} +0 -0
  51. /package/dev/src/components/{PrevNext.vue → Page/PrevNext.vue} +0 -0
  52. /package/srl/{components/App.vue → App.vue} +0 -0
  53. /package/srl/components/Srl/{Note → Category}/Accordion/Content.vue +0 -0
  54. /package/srl/components/Srl/{Note → Category}/Accordion/Toggle.vue +0 -0
  55. /package/srl/components/Srl/{Note → Category}/Accordion.vue +0 -0
@@ -1,194 +0,0 @@
1
- import * as XLSX from 'xlsx'
2
-
3
- const reservedColumnKeywords = [
4
- 'CHART',
5
- 'SERIES',
6
- 'CATEGORY_COLOR',
7
- 'FOOTNOTE',
8
- 'YAXIS_NAME',
9
- 'TITLE'
10
- ]
11
-
12
- const languageIndexMap = {}
13
-
14
- async function generateKFCJson(languages) {
15
- const response = await fetch(`./downloads/de/mehrjahresvergleich.xlsx`)
16
- const arrayBuffer = await response.arrayBuffer()
17
- const parsedExcel = XLSX.readFile(arrayBuffer, { type: 'array', codepage: 65001 })
18
-
19
- const charts = []
20
-
21
- for (let index = 0; index < parsedExcel.SheetNames.length; index++) {
22
- const sheetName = parsedExcel.SheetNames[index]
23
- const sheet = parsedExcel.Sheets[sheetName]
24
- const sheetCSVData = XLSX.utils.sheet_to_csv(sheet, { blankrows: false, FS: ';' })
25
- const chart = sheetToJson(
26
- sheetName,
27
- sheetCSVData.split('\n').map((data) => data.split(';')),
28
- [...languages]
29
- )
30
- charts.push(chart)
31
- }
32
-
33
- return charts
34
- }
35
-
36
- function languageIndex(languages, chartConfiguration) {
37
- if (!chartConfiguration) return
38
- languages.forEach((language) => {
39
- chartConfiguration.find((value, languageIndex) => {
40
- if (value === `name_${language}`) {
41
- languageIndexMap[language] = languageIndex
42
- return true
43
- }
44
- return false
45
- })
46
- })
47
- }
48
-
49
- function parseFootnotes(csvData, footnoteStartIndex) {
50
- const footnotes = []
51
-
52
- for (let index = footnoteStartIndex + 1; index < csvData.length; index++) {
53
- const row = csvData[index]
54
- if (reservedColumnKeywords.includes(row[0])) {
55
- index = csvData.length
56
- } else {
57
- footnotes.push(row)
58
- }
59
- }
60
-
61
- return footnotes.map((footnote) => {
62
- const footnoteValues = {}
63
- Object.keys(languageIndexMap).forEach((key) => {
64
- footnoteValues[key] = footnote[languageIndexMap[key]]
65
- })
66
-
67
- return {
68
- key: footnote[0],
69
- value: footnoteValues
70
- }
71
- })
72
- }
73
-
74
- function parseSeries(csvData, seriesStartIndex) {
75
- const seriesRows = []
76
-
77
- for (let index = seriesStartIndex; index < csvData.length; index++) {
78
- const row = csvData[index]
79
- if (reservedColumnKeywords.includes(row[0]) && row[0] !== 'SERIES') {
80
- index = csvData.length
81
- } else {
82
- seriesRows.push(row)
83
- }
84
- }
85
-
86
- return seriesRows.map((row) => {
87
- const labelMap = {}
88
-
89
- const seriesData = row.filter((column, columnIndex) => {
90
- if (columnIndex > lastLanguageIndex()) return true
91
- return false
92
- })
93
-
94
- Object.keys(languageIndexMap).forEach((key) => {
95
- labelMap[key] = row[languageIndexMap[key]]
96
- })
97
-
98
- return {
99
- label: labelMap,
100
- data: seriesData.map((d) => parseFloat(d)),
101
- type: row[1],
102
- colorIndex: row[2],
103
- stack: parseInt(row[3]),
104
- yAxis: parseInt(row[4]),
105
- defaultVisible: row[5] === 'true'
106
- }
107
- })
108
- }
109
-
110
- function lastLanguageIndex() {
111
- return Math.max(...Object.keys(languageIndexMap).map((key) => languageIndexMap[key]))
112
- }
113
-
114
- function parseCategories(chartConfiguration) {
115
- return chartConfiguration.filter((column, columnIndex) => {
116
- return columnIndex > lastLanguageIndex()
117
- })
118
- }
119
-
120
- function parseChartColors(chartColorConfiguration) {
121
- return chartColorConfiguration.filter((column, columnIndex) => {
122
- return columnIndex > lastLanguageIndex()
123
- })
124
- }
125
-
126
- function parseChartTitle(titleConfiguration) {
127
- const titleMap = {}
128
-
129
- Object.keys(languageIndexMap).forEach((key) => {
130
- titleMap[key] = titleConfiguration[languageIndexMap[key]]
131
- })
132
-
133
- return titleMap
134
- }
135
-
136
- function parseYaxisLabels(csvData) {
137
- const yAxis = [{}, {}]
138
- const yAxisStartIndex = csvData.indexOf(csvData.find((r) => r[0] === 'YAXIS_NAME')) + 1
139
-
140
- for (let index = yAxisStartIndex; index < csvData.length; index++) {
141
- const row = csvData[index]
142
- if (reservedColumnKeywords.includes(row[0])) {
143
- index = csvData.length
144
- } else {
145
- yAxis[row[0]] = row
146
- }
147
- }
148
-
149
- return yAxis
150
- .sort((columnsA, columnsB) => {
151
- if (parseInt(columnsA[0]) < parseInt(columnsB[0])) return -1
152
- if (parseInt(columnsA[0]) > parseInt(columnsB[0])) return 1
153
- return 0
154
- })
155
- .map((d) => {
156
- const axis = {}
157
-
158
- Object.keys(languageIndexMap).forEach((key) => {
159
- axis[key] = d[languageIndexMap[key]]
160
- })
161
- return axis
162
- })
163
- }
164
-
165
- function sheetToJson(sheetName, csvData, languages) {
166
- const chartConfiguration = csvData.find((r) => r[0] === 'CHART')
167
- const categoryColorConfiguration = csvData.find((r) => r[0] === 'CATEGORY_COLOR')
168
- if (!chartConfiguration) return
169
- languageIndex(languages, chartConfiguration)
170
- const titleConfiguration = csvData[csvData.indexOf(csvData.find((r) => r[0] === 'TITLE')) + 1]
171
- const footnoteStartIndex = csvData.indexOf(csvData.find((r) => r[0] === 'FOOTNOTE'))
172
- const seriesStartIndex = csvData.indexOf(csvData.find((r) => r[0] === 'SERIES'))
173
-
174
- const series = parseSeries(csvData, seriesStartIndex)
175
- const categories = parseCategories(chartConfiguration)
176
- const yAxisLabels = parseYaxisLabels(csvData)
177
-
178
- return {
179
- id: sheetName.replaceAll(' ', ''),
180
- title: parseChartTitle(titleConfiguration),
181
- footnotes: parseFootnotes(csvData, footnoteStartIndex),
182
- swapColors: parseChartColors(categoryColorConfiguration),
183
- series: series,
184
- categories: categories,
185
- defaultActiveSeries: series
186
- .map((serie, serieIndex) => (serie.defaultVisible ? serieIndex : -1))
187
- .filter((d) => d >= 0),
188
- defaultActiveCategories: categories.map((c, i) => i),
189
- yAxisLabel0: yAxisLabels[0],
190
- yAxisLabel1: yAxisLabels[1] || {}
191
- }
192
- }
193
-
194
- export default generateKFCJson
@@ -1,28 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="col-chart"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 20px; height: 20px"
10
- xml:space="preserve"
11
- >
12
- <g id="Desktop_Mehrjahresvergleich" transform="translate(-307 -853)">
13
- <g id="Group-3" transform="translate(307 853)">
14
- <path
15
- id="Stroke-1"
16
- class="st0"
17
- style="fill: none; stroke: currentColor"
18
- d="M16 15.5H.5V0"
19
- ></path>
20
- </g>
21
- </g>
22
- <path
23
- class="st0"
24
- style="fill: none; stroke: currentColor"
25
- d="M8.5 0v15.5M4 7v8.5M13 2.9v12.6"
26
- ></path>
27
- </svg>
28
- </template>
@@ -1,26 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="chart-dl"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 20px; height: 20px"
10
- xml:space="preserve"
11
- >
12
- <path id="Stroke-3" class="st0" style="fill: none; stroke: currentColor" d="M8 12V0"></path>
13
- <path
14
- id="Stroke-5"
15
- class="st0"
16
- style="fill: none; stroke: currentColor"
17
- d="M12.4 8 8 12 3.6 8"
18
- ></path>
19
- <path
20
- id="Stroke-1"
21
- class="st0"
22
- style="fill: none; stroke: currentColor"
23
- d="M15.5 11.5v4H.5v-4"
24
- ></path>
25
- </svg>
26
- </template>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- width="11"
4
- height="7"
5
- viewBox="0 0 11 7"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- class="svg-kfc-dropdown"
9
- >
10
- <path
11
- d="M1.75 1.33331L5.75 5.33331L9.75 1.33331"
12
- stroke="currentColor"
13
- stroke-width="2"
14
- stroke-linecap="round"
15
- stroke-linejoin="round"
16
- />
17
- </svg>
18
- </template>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="kfc-svg-indexed-values"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 16px; height: 16px"
10
- xml:space="preserve"
11
- >
12
- <path
13
- class="st0"
14
- d="M3 8h10M8 .8v5.5M5.2 3.6 8 .8l2.8 2.8M8 15.2V9.7M10.8 12.5 8 15.3l-2.8-2.8"
15
- style="fill: none; stroke: currentColor"
16
- ></path>
17
- </svg>
18
- </template>
@@ -1,18 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="svg-kfc-legend-swap"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 16px; height: 16px"
10
- xml:space="preserve"
11
- >
12
- <path
13
- style="fill: none; stroke: currentColor"
14
- class="st0"
15
- d="M16 6.5H1.2l4.1-4M0 9.5h14.8l-4.1 4"
16
- ></path>
17
- </svg>
18
- </template>
@@ -1,28 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="line-chart"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 20px; height: 20px"
10
- xml:space="preserve"
11
- >
12
- <g id="Desktop_Mehrjahresvergleich" transform="translate(-307 -853)">
13
- <g id="Group-3" transform="translate(307 853)">
14
- <path
15
- id="Stroke-1"
16
- class="st0"
17
- style="fill: none; stroke: currentColor"
18
- d="M16 15.5H.5V0"
19
- ></path>
20
- </g>
21
- </g>
22
- <path
23
- class="st0"
24
- style="fill: none; stroke: currentColor"
25
- d="m.5 10.2 2.6-2.6 3.2 3.3 5.1-5 1.7 1.7 2.4-2.4"
26
- ></path>
27
- </svg>
28
- </template>
@@ -1,26 +0,0 @@
1
- <template>
2
- <svg
3
- id="svg-kfc-print"
4
- xmlns="http://www.w3.org/2000/svg"
5
- viewBox="0 0 16 16"
6
- style="enable-background: new 0 0 16 16; width: 16px; height: 16px"
7
- xml:space="preserve"
8
- >
9
- <path class="st0" style="fill: none; stroke: currentColor" d="M4 12H.5V4h15v8h-3.4"></path>
10
- <path
11
- class="st1"
12
- style="fill: none; stroke: currentColor; stroke-width: 0.9267"
13
- d="M4 9.5h8v6H4z"
14
- ></path>
15
- <path
16
- class="st2"
17
- style="fill: none; stroke: currentColor; stroke-width: 1.0025"
18
- d="M4 4.5v-4h6.6L12 2v2.5"
19
- ></path>
20
- <path
21
- class="st3"
22
- style="fill: none; stroke: currentColor; stroke-width: 0.9935"
23
- d="M6 12.5h4"
24
- ></path>
25
- </svg>
26
- </template>
@@ -1,33 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="svg-kfc-export"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; height: 20px; width: 20px"
10
- xml:space="preserve"
11
- >
12
- <g id="Group-17" transform="translate(866 776)">
13
- <path
14
- id="Stroke-1"
15
- class="st0"
16
- style="fill: none; stroke: currentColor"
17
- d="m-853-763.2-2.9-5.8-2.3 4.4-2.4-2.4-2.4 4"
18
- ></path>
19
- <path
20
- id="Stroke-2"
21
- class="st0"
22
- style="fill: none; stroke: currentColor"
23
- d="M-865.5-760.5h15v-15h-15z"
24
- ></path>
25
- <path
26
- id="Stroke-4"
27
- class="st0"
28
- style="fill: none; stroke: currentColor"
29
- d="M-860-771.5c0 .8-.7 1.5-1.5 1.5s-1.5-.7-1.5-1.5.7-1.5 1.5-1.5 1.5.7 1.5 1.5z"
30
- ></path>
31
- </g>
32
- </svg>
33
- </template>
@@ -1,67 +0,0 @@
1
- <template>
2
- <svg
3
- version="1.1"
4
- id="svg-kfc-table"
5
- xmlns="http://www.w3.org/2000/svg"
6
- x="0"
7
- y="0"
8
- viewBox="0 0 16 16"
9
- style="enable-background: new 0 0 16 16; width: 20px; height: 20px"
10
- xml:space="preserve"
11
- >
12
- <g id="Desktop">
13
- <g id="Desktop_Mehrjahresvergleich" transform="translate(-425 -851)">
14
- <g id="Group-11" transform="translate(426 851)">
15
- <path
16
- id="Line-12"
17
- class="st0"
18
- style="fill: none; stroke: currentColor; stroke-linecap: square"
19
- d="M6.1.5h8.4"
20
- ></path>
21
- <path
22
- id="Line-12-Copy"
23
- style="fill: none; stroke: currentColor; stroke-linecap: square"
24
- class="st0"
25
- d="M6.1 5.5h8.4"
26
- ></path>
27
- <path
28
- id="Line-12-Copy-2"
29
- style="fill: none; stroke: currentColor; stroke-linecap: square"
30
- class="st0"
31
- d="M6.1 10.5h8.4"
32
- ></path>
33
- <path
34
- id="Line-12-Copy-3"
35
- style="fill: none; stroke: currentColor; stroke-linecap: square"
36
- class="st0"
37
- d="M6.1 15.5h8.4"
38
- ></path>
39
- <path
40
- id="Line-12_1_"
41
- style="fill: none; stroke: currentColor; stroke-linecap: square"
42
- class="st0"
43
- d="M-.5.5h3.8"
44
- ></path>
45
- <path
46
- id="Line-12-Copy_1_"
47
- style="fill: none; stroke: currentColor; stroke-linecap: square"
48
- class="st0"
49
- d="M-.5 5.5h3.8"
50
- ></path>
51
- <path
52
- id="Line-12-Copy-2_1_"
53
- style="fill: none; stroke: currentColor; stroke-linecap: square"
54
- class="st0"
55
- d="M-.5 10.5h3.8"
56
- ></path>
57
- <path
58
- id="Line-12-Copy-3_1_"
59
- style="fill: none; stroke: currentColor; stroke-linecap: square"
60
- class="st0"
61
- d="M-.5 15.5h3.8"
62
- ></path>
63
- </g>
64
- </g>
65
- </g>
66
- </svg>
67
- </template>