bfg-common 1.4.40 → 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 { UI_ColumnSettingsCategory } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
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?: UI_ColumnSettingsCategory
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
- // Проходим по ключам объекта name и ищем соответствие индекса i в значениях
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?: UI_ColumnSettingsCategory
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
- // Проходим по ключам объекта name и ищем соответствие индекса i в значениях
45
+ // Проходим по ключам объекта и ищем соответствие индекса i в значениях
46
46
  for (const key in strategy) {
47
47
  if (strategy[key].includes(i)) {
48
48
  col = key
@@ -53,7 +53,7 @@ export const defaultHeadItems = (
53
53
 
54
54
  result.push(
55
55
  constructHeadItem(
56
- `col${i}`,
56
+ col,
57
57
  item[0],
58
58
  item[3],
59
59
  false,
@@ -37,5 +37,5 @@ export interface UI_I_ColumnKey {
37
37
  testId?: string
38
38
  }
39
39
 
40
- export interface UI_ColumnSettingsCategory
40
+ export interface UI_ColumnSettingsStrategy
41
41
  extends UI_I_ArbitraryObject<number[]> {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.40",
4
+ "version": "1.4.42",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",