bfg-common 1.2.144 → 1.2.145
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.
|
@@ -58,7 +58,7 @@ const setTriggerElementWidth = (): void => {
|
|
|
58
58
|
if (!id.value || !props.testId) return
|
|
59
59
|
|
|
60
60
|
const element = document.querySelector(
|
|
61
|
-
`#${id.value}
|
|
61
|
+
`#${id.value} #${props.testId}-container`
|
|
62
62
|
)
|
|
63
63
|
triggerElementWidth =
|
|
64
64
|
element && element?.style?.display !== 'none'
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
]"
|
|
83
83
|
@click="sortTable(item.sortColumn)"
|
|
84
84
|
>
|
|
85
|
-
<slot
|
|
85
|
+
<slot :key="key" name="th" :item="item">
|
|
86
86
|
<span
|
|
87
87
|
:title="item.text"
|
|
88
88
|
:style="{
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
},
|
|
205
205
|
]"
|
|
206
206
|
>
|
|
207
|
-
<slot
|
|
207
|
+
<slot :key="key" name="type" :item="item">
|
|
208
208
|
<div
|
|
209
209
|
:class="`clr-${props.type}-wrapper flex-justify-center flex-align-center`"
|
|
210
210
|
>
|
|
@@ -479,7 +479,7 @@ const emits = defineEmits<{
|
|
|
479
479
|
(event: 'update:selected-row', value: UI_T_SelectedRow): void
|
|
480
480
|
(event: 'update:page-size', value: number): void
|
|
481
481
|
(event: 'update:page', value: number): void
|
|
482
|
-
(event: 'filtering', value:
|
|
482
|
+
(event: 'filtering', value: string[][]): void
|
|
483
483
|
(event: 'sorting', value: [string, boolean]): void
|
|
484
484
|
(event: 'change', value: any): void
|
|
485
485
|
(event: 'row-detail', value: number): void
|
|
@@ -660,11 +660,10 @@ const sortTable = (sortName: string): void => {
|
|
|
660
660
|
const filterShow = ref<boolean[]>([])
|
|
661
661
|
const filterTerm = ref<string[]>([])
|
|
662
662
|
const filtering = (): void => {
|
|
663
|
-
const filter =
|
|
664
|
-
|
|
665
|
-
.
|
|
666
|
-
|
|
667
|
-
})
|
|
663
|
+
const filter: string[][] = []
|
|
664
|
+
headItemsPresent.value.forEach((item, key) => {
|
|
665
|
+
if (filterTerm.value[key]) filter.push([item.key, filterTerm.value[key]])
|
|
666
|
+
})
|
|
668
667
|
|
|
669
668
|
emits('filtering', filter)
|
|
670
669
|
}
|
|
@@ -81,9 +81,7 @@ let triggerElementWidth = 0
|
|
|
81
81
|
const setTriggerElementWidth = (): void => {
|
|
82
82
|
if (!id.value || !props.testId) return
|
|
83
83
|
|
|
84
|
-
const element = document.querySelector(
|
|
85
|
-
`#${id.value} [test-id="${props.testId}-item"]`
|
|
86
|
-
)
|
|
84
|
+
const element = document.querySelector(`#${id.value} #${props.testId}-item`)
|
|
87
85
|
if (
|
|
88
86
|
element &&
|
|
89
87
|
element?.style?.display !== 'none' &&
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { UI_I_ErrorMessage } from '~/components/common/vm/actions/common/models/interfaces'
|
|
2
|
+
|
|
3
|
+
export const showNotificationFunc = (
|
|
4
|
+
title: string,
|
|
5
|
+
messages: UI_I_ErrorMessage[],
|
|
6
|
+
status = 'error'
|
|
7
|
+
): void => {
|
|
8
|
+
const { $store } = useNuxtApp()
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
$store.dispatch('main/A_SHOW_NOTIFICATION', {
|
|
11
|
+
messages,
|
|
12
|
+
status,
|
|
13
|
+
headline: title,
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const clearNotificationsFromStore = (): void => {
|
|
18
|
+
const { $store } = useNuxtApp()
|
|
19
|
+
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
$store.dispatch('main/A_HIDE_NOTIFICATION', { id: -1, clear: true })
|
|
22
|
+
}
|