bfg-common 1.4.462 → 1.4.464

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.
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div class="headline">
3
+ <common-pages-home-headline-new
4
+ v-if="isNewView"
5
+ :data="zoneOptionList"
6
+ ></common-pages-home-headline-new>
7
+
8
+ <common-pages-home-headline-old
9
+ v-else
10
+ :data="zoneOptionList"
11
+ ></common-pages-home-headline-old>
12
+ </div>
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import type { UI_I_ZoneList } from '~/components/common/home/lib/models/interfaces'
17
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
18
+ import { getZoneOptionItemsFunc } from '~/components/common/pages/home/headline/lib/config/panelTabList'
19
+
20
+ const props = defineProps<{
21
+ zoneList: UI_I_ZoneList
22
+ }>()
23
+
24
+ const { $store }: any = useNuxtApp()
25
+
26
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
27
+
28
+ const zoneOptionList = computed<UI_I_Option[]>(() =>
29
+ getZoneOptionItemsFunc(props.zoneList)
30
+ )
31
+ </script>
32
+
33
+ <style lang="scss" scoped></style>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div>
3
+ <h1>{{ localization.mainNavigation.home }}</h1>
4
+
5
+ <ui-select
6
+ v-model="selected"
7
+ :items="selectItems"
8
+ width="165px"
9
+ select-width="100%"
10
+ size="sm"
11
+ test-id="home-zone-select"
12
+ />
13
+ </div>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
18
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
19
+
20
+ const localization = computed<UI_I_Localization>(() => useLocal())
21
+
22
+ const selected = ref<any>()
23
+ const selectItems = computed<UI_I_Dropdown[]>(() => {
24
+ return []
25
+ })
26
+ </script>
27
+
28
+ <style lang="scss" scoped></style>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <h2 class="page-title">
3
+ {{ localization.mainNavigation.home }}
4
+ </h2>
5
+
6
+ <atoms-select-the-select
7
+ v-model="selectedItem"
8
+ :options="props.data"
9
+ test-id="home-zone-select"
10
+ @update:model-value="emits('update')"
11
+ >
12
+ <span :class="'vsphere-icon-vcenter'" />
13
+ </atoms-select-the-select>
14
+ </template>
15
+
16
+ <script lang="ts" setup>
17
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
18
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
19
+
20
+ const props = defineProps<{
21
+ data: UI_I_Option[]
22
+ }>()
23
+ const emits = defineEmits<{
24
+ (event: 'update'): void
25
+ }>()
26
+
27
+ const localization = computed<UI_I_Localization>(() => useLocal())
28
+
29
+ const selectedItem = ref<number>(0)
30
+ </script>
31
+
32
+ <style lang="scss" scoped></style>
@@ -0,0 +1,10 @@
1
+ import type { UI_I_ZoneList } from '~/components/common/home/lib/models/interfaces'
2
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
3
+ export const getZoneOptionItemsFunc = (list: UI_I_ZoneList[]): UI_I_Option[] => {
4
+ return list.map((zone: UI_I_ZoneList) => {
5
+ return {
6
+ value: zone.id,
7
+ text: zone.name,
8
+ }
9
+ })
10
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.462",
4
+ "version": "1.4.464",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",