@cloud-ru/uikit-product-mobile-table 0.13.0 → 0.13.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 0.13.1 (2025-11-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **FF-7578:** fix status column ([a1314f5](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/a1314f5c6017dc3ab34aa63067031ab466e7d7dc))
12
+
13
+
14
+
15
+
16
+
6
17
  # 0.13.0 (2025-11-23)
7
18
 
8
19
 
@@ -7,7 +7,7 @@ export type StatusColumnDefProps<TData extends object> = {
7
7
  /** Ключ для доступа к значению статуса в данных */
8
8
  accessorKey: keyof TData;
9
9
  /** Маппинг значений статусов на appearance */
10
- mapStatusToAppearance: Record<string, StatusAppearance>;
10
+ mapStatusToAppearance: (value: string | number) => StatusAppearance;
11
11
  /** Заголовок колонки */
12
12
  header?: string | ((ctx: HeaderContext<TData, unknown>) => React.ReactNode);
13
13
  /** Функция для рендеринга описания статуса (опционально) */
@@ -20,7 +20,7 @@ function getStatusColumnDef({ accessorKey, mapStatusToAppearance, header = 'Ст
20
20
  const statusValue = cell.getValue();
21
21
  if (!statusValue)
22
22
  return null;
23
- const appearance = mapStatusToAppearance[statusValue] || 'neutral';
23
+ const appearance = mapStatusToAppearance(statusValue) || 'neutral';
24
24
  const label = renderDescription ? renderDescription(statusValue) : statusValue;
25
25
  return ((0, jsx_runtime_1.jsx)(status_1.Status, { label: label, appearance: appearance, size: 's', hasBackground: true, "data-test-id": constants_1.TEST_IDS.statusLabel }));
26
26
  },
@@ -7,7 +7,7 @@ export type StatusColumnDefProps<TData extends object> = {
7
7
  /** Ключ для доступа к значению статуса в данных */
8
8
  accessorKey: keyof TData;
9
9
  /** Маппинг значений статусов на appearance */
10
- mapStatusToAppearance: Record<string, StatusAppearance>;
10
+ mapStatusToAppearance: (value: string | number) => StatusAppearance;
11
11
  /** Заголовок колонки */
12
12
  header?: string | ((ctx: HeaderContext<TData, unknown>) => React.ReactNode);
13
13
  /** Функция для рендеринга описания статуса (опционально) */
@@ -17,7 +17,7 @@ export function getStatusColumnDef({ accessorKey, mapStatusToAppearance, header
17
17
  const statusValue = cell.getValue();
18
18
  if (!statusValue)
19
19
  return null;
20
- const appearance = mapStatusToAppearance[statusValue] || 'neutral';
20
+ const appearance = mapStatusToAppearance(statusValue) || 'neutral';
21
21
  const label = renderDescription ? renderDescription(statusValue) : statusValue;
22
22
  return (_jsx(Status, { label: label, appearance: appearance, size: 's', hasBackground: true, "data-test-id": TEST_IDS.statusLabel }));
23
23
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-mobile-table",
3
3
  "title": "Mobile Table",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -60,5 +60,5 @@
60
60
  "devDependencies": {
61
61
  "@types/lodash.debounce": "4.0.9"
62
62
  },
63
- "gitHead": "8afcaf6d680d27642fc81efd26811cd0ddbb9739"
63
+ "gitHead": "cc31bd43bfbff65cd3db647895681383453d7d37"
64
64
  }
@@ -12,7 +12,7 @@ export type StatusColumnDefProps<TData extends object> = {
12
12
  /** Ключ для доступа к значению статуса в данных */
13
13
  accessorKey: keyof TData;
14
14
  /** Маппинг значений статусов на appearance */
15
- mapStatusToAppearance: Record<string, StatusAppearance>;
15
+ mapStatusToAppearance: (value: string | number) => StatusAppearance;
16
16
  /** Заголовок колонки */
17
17
  header?: string | ((ctx: HeaderContext<TData, unknown>) => React.ReactNode);
18
18
  /** Функция для рендеринга описания статуса (опционально) */
@@ -58,7 +58,7 @@ export function getStatusColumnDef<TData extends object, TFilters extends Filter
58
58
  const statusValue = cell.getValue<string>();
59
59
  if (!statusValue) return null;
60
60
 
61
- const appearance = mapStatusToAppearance[statusValue] || 'neutral';
61
+ const appearance = mapStatusToAppearance(statusValue) || 'neutral';
62
62
  const label = renderDescription ? renderDescription(statusValue) : statusValue;
63
63
 
64
64
  return (