bfg-common 1.4.624 → 1.4.625

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.
@@ -56,7 +56,7 @@ const props = defineProps<{
56
56
  const localization = computed<UI_I_Localization>(() => useLocal())
57
57
 
58
58
  const data = computed<UI_I_DataTable>(() => ({
59
- id: '0',
59
+ id: 'services',
60
60
  header: resentTaskHeadItems.value,
61
61
  body: resentTaskBodyItems.value,
62
62
  }))
@@ -56,7 +56,7 @@ const props = defineProps<{
56
56
  const localization = computed<UI_I_Localization>(() => useLocal())
57
57
 
58
58
  const data = computed<UI_I_DataTable>(() => ({
59
- id: '0',
59
+ id: 'warnings',
60
60
  header: resentTaskHeadItems.value,
61
61
  body: resentTaskBodyItems.value,
62
62
  }))
@@ -352,7 +352,7 @@ watch(
352
352
  )
353
353
 
354
354
  const data = computed<UI_I_DataTable>(() => ({
355
- id: '0',
355
+ id: 'attributes',
356
356
  selectedRows: [],
357
357
  isAllSelected: false,
358
358
  title: '',
@@ -220,7 +220,7 @@ const tagsAssignBodyItems = ref<UI_I_DataTableBody[]>(
220
220
  )
221
221
 
222
222
  const data = computed<UI_I_DataTable>(() => ({
223
- id: '0',
223
+ id: 'tags',
224
224
  selectedRows: [],
225
225
  isAllSelected: false,
226
226
  title: '',
@@ -230,7 +230,7 @@ const data = computed<UI_I_DataTable>(() => ({
230
230
  }))
231
231
 
232
232
  const assignData = computed<UI_I_DataTable>(() => ({
233
- id: '1',
233
+ id: 'tags-assign',
234
234
  selectedRows: [],
235
235
  isAllSelected: false,
236
236
  title: '',
@@ -1,74 +1,74 @@
1
- <template>
2
- <ui-data-table
3
- test-id="data-table-main"
4
- :data="data"
5
- :options="options"
6
- server-off
7
- class="network-table"
8
- @select-row="onSelect"
9
- >
10
- <template #icon="{ item }">
11
- <span class="flex-align-center">
12
- <span :class="['icon', item.data.icon]" />
13
-
14
- <span :data-id="item.data.testId">
15
- {{ item.text }}
16
- </span>
17
- </span>
18
- </template>
19
- </ui-data-table>
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import type {
24
- UI_I_DataTable,
25
- UI_I_DataTableHeader,
26
- UI_I_DataTableBody,
27
- } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
28
- import type { UI_I_Localization } from '~/lib/models/interfaces'
29
- import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
30
- import {
31
- options,
32
- getHeaderDataFunc,
33
- getBodyDataFunc,
34
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config'
35
-
36
- const props = defineProps<{
37
- networksTable: UI_I_NetworkTableItem[]
38
- }>()
39
- const emits = defineEmits<{
40
- (event: 'select', value: string): void
41
- }>()
42
-
43
- const localization = computed<UI_I_Localization>(() => useLocal())
44
-
45
- const data = computed<UI_I_DataTable>(() => ({
46
- id: '1',
47
- header: headItems.value,
48
- body: bodyItems.value,
49
- }))
50
-
51
- const headItems = computed<UI_I_DataTableHeader[]>(() =>
52
- getHeaderDataFunc(localization.value)
53
- )
54
-
55
- const bodyItems = ref<UI_I_DataTableBody[]>([])
56
- watch(
57
- () => props.networksTable,
58
- (newValue: UI_I_NetworkTableItem[]) => {
59
- if (!newValue?.length) return
60
-
61
- bodyItems.value = getBodyDataFunc(newValue)
62
- },
63
- { deep: true, immediate: true }
64
- )
65
- const onSelect = (value: UI_I_DataTableBody[]): void => {
66
- emits('select', value[0].data[0].text.toString())
67
- }
68
- </script>
69
-
70
- <style scoped lang="scss">
71
- .icon {
72
- margin-right: 4px;
73
- }
74
- </style>
1
+ <template>
2
+ <ui-data-table
3
+ test-id="data-table-main"
4
+ :data="data"
5
+ :options="options"
6
+ server-off
7
+ class="network-table"
8
+ @select-row="onSelect"
9
+ >
10
+ <template #icon="{ item }">
11
+ <span class="flex-align-center">
12
+ <span :class="['icon', item.data.icon]" />
13
+
14
+ <span :data-id="item.data.testId">
15
+ {{ item.text }}
16
+ </span>
17
+ </span>
18
+ </template>
19
+ </ui-data-table>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import type {
24
+ UI_I_DataTable,
25
+ UI_I_DataTableHeader,
26
+ UI_I_DataTableBody,
27
+ } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
28
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
29
+ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
30
+ import {
31
+ options,
32
+ getHeaderDataFunc,
33
+ getBodyDataFunc,
34
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config'
35
+
36
+ const props = defineProps<{
37
+ networksTable: UI_I_NetworkTableItem[]
38
+ }>()
39
+ const emits = defineEmits<{
40
+ (event: 'select', value: string): void
41
+ }>()
42
+
43
+ const localization = computed<UI_I_Localization>(() => useLocal())
44
+
45
+ const data = computed<UI_I_DataTable>(() => ({
46
+ id: 'new-network-location',
47
+ header: headItems.value,
48
+ body: bodyItems.value,
49
+ }))
50
+
51
+ const headItems = computed<UI_I_DataTableHeader[]>(() =>
52
+ getHeaderDataFunc(localization.value)
53
+ )
54
+
55
+ const bodyItems = ref<UI_I_DataTableBody[]>([])
56
+ watch(
57
+ () => props.networksTable,
58
+ (newValue: UI_I_NetworkTableItem[]) => {
59
+ if (!newValue?.length) return
60
+
61
+ bodyItems.value = getBodyDataFunc(newValue)
62
+ },
63
+ { deep: true, immediate: true }
64
+ )
65
+ const onSelect = (value: UI_I_DataTableBody[]): void => {
66
+ emits('select', value[0].data[0].text.toString())
67
+ }
68
+ </script>
69
+
70
+ <style scoped lang="scss">
71
+ .icon {
72
+ margin-right: 4px;
73
+ }
74
+ </style>
@@ -5,7 +5,7 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
5
5
  export const tableDataFunc = (
6
6
  localization: UI_I_Localization
7
7
  ): UI_I_DataTable => ({
8
- id: '0',
8
+ id: 'select-storage',
9
9
  header: [
10
10
  {
11
11
  col: 0,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.624",
4
+ "version": "1.4.625",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",