bfg-common 1.5.95 → 1.5.96

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.
@@ -8,26 +8,22 @@
8
8
 
9
9
  <common-wizards-datastore-add-steps-name-and-device-table-old
10
10
  v-else
11
+ v-model="modelLunDisk"
11
12
  :data-table="props.lunDisksData?.items || []"
12
13
  :total-items="props.lunDisksData?.total_items || 0"
13
14
  :total-pages="props.lunDisksData?.total_pages || 1"
15
+ @main-filter="onMainFiltering"
14
16
  />
15
17
  </template>
16
18
 
17
19
  <script lang="ts" setup>
18
20
  import { useDebounceFn } from '@vueuse/core'
19
- import type {
20
- UI_I_HeadItem,
21
- UI_I_ColumnKey,
22
- UI_I_BodyItem,
23
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
24
21
  import { UI_I_Localization } from '~/lib/models/interfaces'
25
22
  import { UI_I_Pagination } from '~/lib/models/table/interfaces'
26
23
  import type {
27
24
  UI_I_CreateStorageLunDiskItem,
28
25
  UI_I_CreateStorageLunDisks,
29
26
  } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
30
- import * as lunDiskTable from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable'
31
27
 
32
28
  const modelLunDisk = defineModel<UI_I_CreateStorageLunDiskItem[]>()
33
29
  const props = defineProps<{
@@ -62,50 +58,16 @@ const onMainFiltering = (data: string): void => {
62
58
  sendFilter(data)
63
59
  }
64
60
 
65
- const pagination = ref<UI_I_Pagination>({
66
- page: 1,
67
- pageSize: 1,
68
- })
69
- watch(
70
- () => props.pagination,
71
- (newValue) => {
72
- pagination.value = newValue
73
- },
74
- { immediate: true }
75
- )
76
- watch(
77
- pagination,
78
- (newValue) => {
79
- emits('pagination', newValue)
80
- },
81
- { deep: true, immediate: true }
82
- )
83
-
84
- const columnKeys = ref<UI_I_ColumnKey[]>(
85
- lunDiskTable.columnKeys(localization.value)
86
- )
87
- const headItems = computed<UI_I_HeadItem[]>(() =>
88
- lunDiskTable.headItems(localization.value)
89
- )
90
- const bodyItems = computed<UI_I_BodyItem[][]>(() => {
91
- let result: UI_I_BodyItem[][] = []
92
- if (props.dataTable?.length) {
93
- result = lunDiskTable.bodyItems(props.dataTable)
94
- }
95
-
96
- return result
97
- })
98
-
99
- const selectedLunDiskLocal = ref<number[]>([])
100
- watch(
101
- selectedLunDiskLocal,
102
- (newValue: number[]) => {
103
- modelLunDisk.value = props.dataTable.filter((_: never, key: number) =>
104
- newValue.includes(key)
105
- )
106
- },
107
- { deep: true, immediate: true }
108
- )
61
+ // const selectedLunDiskLocal = ref<number[]>([])
62
+ // watch(
63
+ // selectedLunDiskLocal,
64
+ // (newValue: number[]) => {
65
+ // modelLunDisk.value = props.dataTable.filter((_: never, key: number) =>
66
+ // newValue.includes(key)
67
+ // )
68
+ // },
69
+ // { deep: true, immediate: true }
70
+ // )
109
71
  </script>
110
72
 
111
73
  <style lang="scss" scoped>
@@ -16,8 +16,8 @@
16
16
  :is-main-filter="props.isMainFilter"
17
17
  :main-filter-placeholder="localization.filter"
18
18
  hide-page-size
19
- @main-filter="onMainFiltering"
20
19
  @sorting="onSorting"
20
+ @main-filter="emits('main-filter', $event)"
21
21
  >
22
22
  <template #icon="{ item }">
23
23
  <span :class="['datagrid-cell-icon', item.data.iconClassName]" />
@@ -30,7 +30,6 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts" setup>
33
- import { useDebounceFn } from '@vueuse/core'
34
33
  import type {
35
34
  UI_I_HeadItem,
36
35
  UI_I_ColumnKey,
@@ -39,7 +38,7 @@ import type {
39
38
  import { UI_I_Localization } from '~/lib/models/interfaces'
40
39
  import { UI_I_Pagination } from '~/lib/models/table/interfaces'
41
40
  import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
42
- import * as lunDiskTable from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable'
41
+ import * as lunDiskTable from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/old/lib/config/lunDiskTable'
43
42
 
44
43
  const modelLunDisk = defineModel<UI_I_CreateStorageLunDiskItem[]>()
45
44
  const props = defineProps<{
@@ -66,12 +65,6 @@ const onSorting = (e: [number, boolean]): void => {
66
65
 
67
66
  emits('sort', sort)
68
67
  }
69
- const sendFilter = useDebounceFn((searchText: string) => {
70
- emits('main-filter', searchText)
71
- }, 1000)
72
- const onMainFiltering = (data: string): void => {
73
- sendFilter(data)
74
- }
75
68
 
76
69
  const pagination = ref<UI_I_Pagination>({
77
70
  page: 1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.95",
4
+ "version": "1.5.96",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",