bfg-common 1.4.679 → 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
@@ -6,8 +6,6 @@ import type {
6
6
  import type { UI_I_Localization } from '~/lib/models/interfaces'
7
7
  import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
8
8
  import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
9
- // import { E_NodeIconsByState } from '~/lib/models/enums'
10
- // import { UI_E_TabsByType } from '~/components/common/pages/tasks/table/lib/models/enums'
11
9
  import {
12
10
  UI_E_RTaskChipColor,
13
11
  UI_E_RTaskStatusIcon,
@@ -168,15 +166,11 @@ export const getBodyDataFunc = (
168
166
  const nav = taskConfig.navFunc(task.targetType)
169
167
  const type = taskConfig.typeFunc(task.targetType)
170
168
 
171
- // const iconClassName = E_NodeIconsByState[`${task.targetType}_Normal`]
172
- // const id = task.extra?.created_id || task.target
173
169
  const targetData = {
174
170
  id,
175
171
  nav,
176
172
  type,
177
173
  icon: iconClassName,
178
- // nav: UI_E_TabsByType[task.targetType],
179
- // type: task.targetType,
180
174
  isLink: !!iconClassName,
181
175
  testId: `${task.targetType}-item`,
182
176
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.679",
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
- }