bfg-common 1.6.31 → 1.6.32

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.
@@ -1,93 +1,93 @@
1
- <template>
2
- <div class="chart-legend">
3
- <span class="title">{{
4
- localization.inventoryMonitor.performanceChartLegend
5
- }}</span>
6
- <client-only>
7
- <atoms-table-data-grid
8
- v-model:selected-row="selectedRow"
9
- v-model:column-keys="columnKeys"
10
- v-model:page-size="pageSize"
11
- v-model:page="page"
12
- :head-items="headAInfo"
13
- :body-items="dataBody"
14
- :total-items="dataBody.length"
15
- :total-pages="1"
16
- type="checkbox"
17
- class="data-table"
18
- test-id="advances-table"
19
- hide-page-size
20
- >
21
- <template #col1="{ item }">
22
- <div
23
- :style="[{ backgroundColor: item.data.color }]"
24
- class="datagrid-column-color-block"
25
- ></div>
26
- </template>
27
- </atoms-table-data-grid>
28
- </client-only>
29
- </div>
30
- </template>
31
-
32
- <script setup lang="ts">
33
- import type { UI_I_Localization } from '~/lib/models/interfaces'
34
- import type {
35
- UI_I_HeadItem,
36
- UI_I_BodyItem,
37
- UI_I_ColumnKey,
38
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
39
- import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
40
- import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
41
-
42
- const localization = computed<UI_I_Localization>(() => useLocal())
43
-
44
- const props = defineProps<{
45
- data: UI_I_PerformanceItem[]
46
- }>()
47
- const emits = defineEmits<{
48
- (event: 'select', value: number[]): void
49
- }>()
50
-
51
- const selectedRow = ref<number[]>([])
52
- const pageSize = ref<number>(100)
53
- const page = ref<number>(1)
54
- const headAInfo = computed<UI_I_HeadItem[]>(() =>
55
- table.headItems(localization.value)
56
- )
57
- const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
58
- watch(localization, () => {
59
- columnKeys.value = table.columnKeys(localization.value)
60
- })
61
- const dataBody = ref<UI_I_BodyItem[][]>([])
62
-
63
- watch(
64
- () => props.data,
65
- (newValue) => {
66
- if (!newValue) return
67
-
68
- dataBody.value = table.bodyItems(newValue)
69
- },
70
- { immediate: true }
71
- )
72
- watch(
73
- selectedRow,
74
- (newValue) => {
75
- emits('select', newValue)
76
- },
77
- { deep: true }
78
- )
79
- </script>
80
-
81
- <style scoped lang="scss">
82
- .chart-legend {
83
- .title {
84
- font-weight: 700;
85
- height: 20px;
86
- }
87
-
88
- .datagrid-column-color-block {
89
- width: 16px;
90
- height: 16px;
91
- }
92
- }
93
- </style>
1
+ <template>
2
+ <div class="chart-legend">
3
+ <span class="title">{{
4
+ localization.inventoryMonitor.performanceChartLegend
5
+ }}</span>
6
+ <client-only>
7
+ <atoms-table-data-grid
8
+ v-model:selected-row="selectedRow"
9
+ v-model:column-keys="columnKeys"
10
+ v-model:page-size="pageSize"
11
+ v-model:page="page"
12
+ :head-items="headAInfo"
13
+ :body-items="dataBody"
14
+ :total-items="dataBody.length"
15
+ :total-pages="1"
16
+ type="checkbox"
17
+ class="data-table"
18
+ test-id="advances-table"
19
+ hide-page-size
20
+ >
21
+ <template #col1="{ item }">
22
+ <div
23
+ :style="[{ backgroundColor: item.data.color }]"
24
+ class="datagrid-column-color-block"
25
+ ></div>
26
+ </template>
27
+ </atoms-table-data-grid>
28
+ </client-only>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup lang="ts">
33
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
34
+ import type {
35
+ UI_I_HeadItem,
36
+ UI_I_BodyItem,
37
+ UI_I_ColumnKey,
38
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
39
+ import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
40
+ import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
41
+
42
+ const localization = computed<UI_I_Localization>(() => useLocal())
43
+
44
+ const props = defineProps<{
45
+ data: UI_I_PerformanceItem[]
46
+ }>()
47
+ const emits = defineEmits<{
48
+ (event: 'select', value: number[]): void
49
+ }>()
50
+
51
+ const selectedRow = ref<number[]>([])
52
+ const pageSize = ref<number>(100)
53
+ const page = ref<number>(1)
54
+ const headAInfo = computed<UI_I_HeadItem[]>(() =>
55
+ table.headItems(localization.value)
56
+ )
57
+ const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
58
+ watch(localization, () => {
59
+ columnKeys.value = table.columnKeys(localization.value)
60
+ })
61
+ const dataBody = ref<UI_I_BodyItem[][]>([])
62
+
63
+ watch(
64
+ () => props.data,
65
+ (newValue) => {
66
+ if (!newValue) return
67
+
68
+ dataBody.value = table.bodyItems(newValue)
69
+ },
70
+ { immediate: true }
71
+ )
72
+ watch(
73
+ selectedRow,
74
+ (newValue) => {
75
+ emits('select', newValue)
76
+ },
77
+ { deep: true }
78
+ )
79
+ </script>
80
+
81
+ <style scoped lang="scss">
82
+ .chart-legend {
83
+ .title {
84
+ font-weight: 700;
85
+ height: 20px;
86
+ }
87
+
88
+ .datagrid-column-color-block {
89
+ width: 16px;
90
+ height: 16px;
91
+ }
92
+ }
93
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.6.31",
4
+ "version": "1.6.32",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",