bfg-common 1.4.787 → 1.4.789
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.
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export const generateCsvAndDownload = (rows:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
1
|
+
export const generateCsvAndDownload = (rows: HTMLElement[]): void => {
|
|
2
|
+
const content: string[] = []
|
|
3
|
+
rows.forEach((row: HTMLElement) => {
|
|
4
|
+
content.push(row.innerText.replaceAll(';', ',').replaceAll('\n', ';'))
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const csvContent = 'data:text/csv;charset=utf-8, sep=;' + content.join('\n')
|
|
8
|
+
|
|
9
|
+
const encodedUri = encodeURI(csvContent)
|
|
10
|
+
const link = document.createElement('a')
|
|
11
|
+
link.setAttribute('href', encodedUri)
|
|
12
|
+
link.setAttribute('download', 'my_data.csv')
|
|
13
|
+
document.body.appendChild(link)
|
|
14
|
+
|
|
15
|
+
link.click()
|
|
16
|
+
}
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
v-model="selectedZone"
|
|
6
6
|
:data="zoneOptionList"
|
|
7
7
|
:project="props.project"
|
|
8
|
-
|
|
8
|
+
/>
|
|
9
9
|
|
|
10
10
|
<common-pages-home-headline-old
|
|
11
11
|
v-else
|
|
12
12
|
v-model="selectedZone"
|
|
13
13
|
:data="zoneOptionList"
|
|
14
|
-
|
|
14
|
+
:project="props.project"
|
|
15
|
+
/>
|
|
15
16
|
</div>
|
|
16
17
|
</template>
|
|
17
18
|
|
|
@@ -36,7 +36,7 @@ const props = defineProps<{
|
|
|
36
36
|
|
|
37
37
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
38
38
|
|
|
39
|
-
const isProjectSphere =
|
|
39
|
+
const isProjectSphere = ref<boolean>(props.project === 'sphere')
|
|
40
40
|
|
|
41
41
|
const selectItems = computed<UI_I_Dropdown[]>(() => props.data)
|
|
42
42
|
</script>
|
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<h2 class="headline-title">
|
|
3
|
-
{{ localization.mainNavigation.home }}
|
|
4
|
-
</h2>
|
|
5
|
-
|
|
6
|
-
<atoms-select-the-select
|
|
7
|
-
v-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<h2 class="headline-title">
|
|
3
|
+
{{ localization.mainNavigation.home }}
|
|
4
|
+
</h2>
|
|
5
|
+
|
|
6
|
+
<atoms-select-the-select
|
|
7
|
+
v-if="isProjectSphere"
|
|
8
|
+
v-model="selectedZoneModel"
|
|
9
|
+
:options="props.data"
|
|
10
|
+
test-id="home-zone-select"
|
|
11
|
+
@update:model-value="emits('update')"
|
|
12
|
+
>
|
|
13
|
+
<span class="vsphere-icon-vcenter" />
|
|
14
|
+
</atoms-select-the-select>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script lang="ts" setup>
|
|
18
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
19
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
20
|
+
import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
|
|
21
|
+
|
|
22
|
+
const selectedZoneModel = defineModel<string>({ required: true })
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
project: UI_T_Project
|
|
25
|
+
data: UI_I_Option[]
|
|
26
|
+
}>()
|
|
27
|
+
const emits = defineEmits<{
|
|
28
|
+
(event: 'update'): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
32
|
+
|
|
33
|
+
const isProjectSphere = ref<boolean>(props.project === 'sphere')
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
.headline-title {
|
|
38
|
+
font-size: 28px;
|
|
39
|
+
font-weight: 200;
|
|
40
|
+
letter-spacing: normal;
|
|
41
|
+
}
|
|
42
|
+
</style>
|