bfg-common 1.4.680 → 1.4.681

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.
@@ -17,24 +17,20 @@
17
17
 
18
18
  <script lang="ts" setup>
19
19
  import type { UI_I_ZoneList } from '~/components/common/pages/home/lib/models/interfaces'
20
- import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
21
20
  import type { UI_T_Project } from '~/lib/models/types'
22
- import { getZoneOptionItemsFunc } from '~/components/common/pages/home/headline/lib/config/panelTabList'
21
+
22
+ const selectedZone = defineModel<string>('selectedZone', { required: true })
23
23
 
24
24
  const props = defineProps<{
25
- zoneList: UI_I_ZoneList
25
+ zoneList: UI_I_ZoneList[]
26
26
  project: UI_T_Project
27
27
  }>()
28
28
 
29
29
  const { $store }: any = useNuxtApp()
30
30
 
31
- const selectedZone = ref<number>(0)
32
-
33
31
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
34
32
 
35
- const zoneOptionList = computed<UI_I_Option[]>(() =>
36
- getZoneOptionItemsFunc(props.zoneList)
37
- )
33
+ const zoneOptionList = computed<UI_I_ZoneList[]>(() => props.zoneList)
38
34
  </script>
39
35
 
40
36
  <style lang="scss">
@@ -26,19 +26,19 @@
26
26
  import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
27
27
  import type { UI_I_Localization } from '~/lib/models/interfaces'
28
28
  import type { UI_T_Project } from '~/lib/models/types'
29
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
29
30
 
31
+ const selectedZoneModel = defineModel<string>({ required: true })
30
32
  const props = defineProps<{
31
33
  project: UI_T_Project
34
+ data: UI_I_Option[]
32
35
  }>()
33
- const selectedZoneModel = defineModel<number>({ required: true })
34
36
 
35
37
  const localization = computed<UI_I_Localization>(() => useLocal())
36
38
 
37
39
  const isProjectSphere = computed<boolean>(() => props.project === 'sphere')
38
40
 
39
- const selectItems = computed<UI_I_Dropdown[]>(() => {
40
- return []
41
- })
41
+ const selectItems = computed<UI_I_Dropdown[]>(() => props.data)
42
42
  </script>
43
43
 
44
44
  <style lang="scss" scoped>
@@ -17,13 +17,13 @@
17
17
  import type { UI_I_Localization } from '~/lib/models/interfaces'
18
18
  import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
19
19
 
20
+ const selectedZoneModel = defineModel<string>({ required: true })
20
21
  const props = defineProps<{
21
22
  data: UI_I_Option[]
22
23
  }>()
23
24
  const emits = defineEmits<{
24
25
  (event: 'update'): void
25
26
  }>()
26
- const selectedZoneModel = defineModel<number>({ required: true })
27
27
 
28
28
  const localization = computed<UI_I_Localization>(() => useLocal())
29
29
  </script>
@@ -1,10 +1,8 @@
1
1
  import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
2
2
  import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
3
+ import type { UI_I_Option } from '~/components/atoms/select/lib/models/interfaces'
3
4
 
4
- export interface UI_I_ZoneList {
5
- name: string
6
- id: number
7
- }
5
+ export interface UI_I_ZoneList extends UI_I_Option {}
8
6
  export interface UI_I_Hosts {
9
7
  connected: number
10
8
  disconnected: number
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.680",
4
+ "version": "1.4.681",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,10 +0,0 @@
1
- import type { UI_I_ZoneList } from '~/components/common/pages/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
- }