bfg-common 1.4.41 → 1.4.42
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,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UI_ColumnSettingsStrategy } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
2
2
|
import type {
|
|
3
3
|
UI_I_ColumnKey,
|
|
4
4
|
UI_I_HeadItem,
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
|
|
11
11
|
export const defaultColumnKeys = (
|
|
12
12
|
items: [string, boolean, string, string][],
|
|
13
|
-
strategy?:
|
|
13
|
+
strategy?: UI_ColumnSettingsStrategy
|
|
14
14
|
): UI_I_ColumnKey[] => {
|
|
15
15
|
const result: UI_I_ColumnKey[] = []
|
|
16
16
|
items.forEach((item, i) => {
|
|
17
17
|
let col: string = `col${i}` // Стандартное значение по умолчанию
|
|
18
18
|
|
|
19
19
|
if (strategy) {
|
|
20
|
-
// Проходим по ключам объекта
|
|
20
|
+
// Проходим по ключам объекта и ищем соответствие индекса i в значениях
|
|
21
21
|
for (const key in strategy) {
|
|
22
22
|
if (strategy[key].includes(i)) {
|
|
23
23
|
col = key
|
|
@@ -35,14 +35,14 @@ export const defaultColumnKeys = (
|
|
|
35
35
|
|
|
36
36
|
export const defaultHeadItems = (
|
|
37
37
|
items: [string, boolean, string, string][],
|
|
38
|
-
strategy?:
|
|
38
|
+
strategy?: UI_ColumnSettingsStrategy
|
|
39
39
|
): UI_I_HeadItem[] => {
|
|
40
40
|
const result: UI_I_HeadItem[] = []
|
|
41
41
|
items.forEach((item, i) => {
|
|
42
42
|
let col: string = `col${i}` // Стандартное значение по умолчанию
|
|
43
43
|
|
|
44
44
|
if (strategy) {
|
|
45
|
-
// Проходим по ключам объекта
|
|
45
|
+
// Проходим по ключам объекта и ищем соответствие индекса i в значениях
|
|
46
46
|
for (const key in strategy) {
|
|
47
47
|
if (strategy[key].includes(i)) {
|
|
48
48
|
col = key
|