@snack-uikit/table 0.31.1-preview-79b4da89.0 → 0.31.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,16 @@
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.31.1 (2025-03-03)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@snack-uikit/chips@0.25.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
10
+ * [@snack-uikit/toolbar@0.11.8](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/toolbar/CHANGELOG.md)
11
+
12
+
13
+
14
+
15
+
6
16
  # 0.31.0 (2025-02-27)
7
17
 
8
18
 
package/README.md CHANGED
@@ -134,7 +134,7 @@ const columnDefinitions: ColumnDefinition<TableData>[] = [
134
134
  | suppressToolbar | `boolean` | - | Отключение тулбара |
135
135
  | suppressSearch | `boolean` | - | Отключение поиска |
136
136
  | bulkActions | `BulkAction[]` | - | Список действия для массовых операций |
137
- | moreActions | `any` | - | Элементы выпадающего списка кнопки с действиями |
137
+ | moreActions | `Action[]` | - | Элементы выпадающего списка кнопки с действиями |
138
138
  | toolbarAfter | `ReactNode` | - | Дополнительный слот в `Toolbar` после строки поиска |
139
139
  | exportSettings | `{ fileName: string; filterData?: boolean; exportToCSV?(args: ExportProps<TData>): void; exportToXLSX?(args: ExportProps<TData>): void; }` | - | Настройки экспорта в тулбаре |
140
140
  | manualSorting | `boolean` | - | |
@@ -178,7 +178,7 @@ const columnDefinitions: ColumnDefinition<TableData>[] = [
178
178
  | onChangePage* | `(offset: number, limit: number) => void` | - | |
179
179
  | columnDefinitions* | `ColumnDefinition<TData>[]` | - | Определение внешнего вида и функционала колонок |
180
180
  | onRefresh | `() => void` | - | Колбек обновления данных |
181
- | moreActions | `any` | - | Элементы выпадающего списка кнопки с действиями |
181
+ | moreActions | `Action[]` | - | Элементы выпадающего списка кнопки с действиями |
182
182
  | bulkActions | `BulkAction[]` | - | Список действия для массовых операций |
183
183
  | keepPinnedRows | `boolean` | false | Параметр отвечает за отображение закрепленных строк на всех страницах таблицы |
184
184
  | copyPinnedRows | `boolean` | false | Параметр отвечает за сохранение закрепленных строк в теле таблицы |
@@ -1,5 +1,4 @@
1
- import { PropsWithChildren } from 'react';
2
- export type CopyCellProps = PropsWithChildren<{
1
+ export type CopyCellProps = {
3
2
  value?: string | number;
4
- }>;
5
- export declare function CopyCell({ value, children }: CopyCellProps): import("react/jsx-runtime").JSX.Element;
3
+ };
4
+ export declare function CopyCell({ value }: CopyCellProps): import("react/jsx-runtime").JSX.Element;
@@ -18,8 +18,7 @@ const truncate_string_1 = require("@snack-uikit/truncate-string");
18
18
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
19
19
  function CopyCell(_ref) {
20
20
  let {
21
- value,
22
- children
21
+ value
23
22
  } = _ref;
24
23
  const [isChecked, setIsCheckedOpen] = (0, react_1.useState)(false);
25
24
  const timerId = (0, react_1.useRef)();
@@ -42,7 +41,7 @@ function CopyCell(_ref) {
42
41
  className: styles_module_scss_1.default.copyCell,
43
42
  onClick: handleClick,
44
43
  role: 'presentation',
45
- children: [children || (0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, {
44
+ children: [(0, jsx_runtime_1.jsx)(truncate_string_1.TruncateString, {
46
45
  text: String(value),
47
46
  maxLines: 1
48
47
  }), (0, jsx_runtime_1.jsx)(button_1.ButtonFunction, {
@@ -1,5 +1,4 @@
1
- import { PropsWithChildren } from 'react';
2
- export type CopyCellProps = PropsWithChildren<{
1
+ export type CopyCellProps = {
3
2
  value?: string | number;
4
- }>;
5
- export declare function CopyCell({ value, children }: CopyCellProps): import("react/jsx-runtime").JSX.Element;
3
+ };
4
+ export declare function CopyCell({ value }: CopyCellProps): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ import { ButtonFunction } from '@snack-uikit/button';
5
5
  import { CheckSVG, CopySVG } from '@snack-uikit/icons';
6
6
  import { TruncateString } from '@snack-uikit/truncate-string';
7
7
  import styles from './styles.module.css';
8
- export function CopyCell({ value, children }) {
8
+ export function CopyCell({ value }) {
9
9
  const [isChecked, setIsCheckedOpen] = useState(false);
10
10
  const timerId = useRef();
11
11
  const openChecked = () => setIsCheckedOpen(true);
@@ -21,5 +21,5 @@ export function CopyCell({ value, children }) {
21
21
  closeChecked();
22
22
  clearTimeout(timerId.current);
23
23
  }, []);
24
- return (_jsxs("div", { className: styles.copyCell, onClick: handleClick, role: 'presentation', children: [children || _jsx(TruncateString, { text: String(value), maxLines: 1 }), _jsx(ButtonFunction, { "data-test-id": 'button-copy-value', type: 'button', icon: isChecked ? _jsx(CheckSVG, {}) : _jsx(CopySVG, {}), size: 's', className: styles.copyButton })] }));
24
+ return (_jsxs("div", { className: styles.copyCell, onClick: handleClick, role: 'presentation', children: [_jsx(TruncateString, { text: String(value), maxLines: 1 }), _jsx(ButtonFunction, { "data-test-id": 'button-copy-value', type: 'button', icon: isChecked ? _jsx(CheckSVG, {}) : _jsx(CopySVG, {}), size: 's', className: styles.copyButton })] }));
25
25
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Table",
7
- "version": "0.31.1-preview-79b4da89.0",
7
+ "version": "0.31.1",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -37,7 +37,7 @@
37
37
  "scripts": {},
38
38
  "dependencies": {
39
39
  "@snack-uikit/button": "0.19.7",
40
- "@snack-uikit/chips": "0.25.3",
40
+ "@snack-uikit/chips": "0.25.4",
41
41
  "@snack-uikit/icon-predefined": "0.7.3",
42
42
  "@snack-uikit/icons": "0.24.2",
43
43
  "@snack-uikit/info-block": "0.6.13",
@@ -46,7 +46,7 @@
46
46
  "@snack-uikit/scroll": "0.9.3",
47
47
  "@snack-uikit/skeleton": "0.6.2",
48
48
  "@snack-uikit/toggles": "0.13.5",
49
- "@snack-uikit/toolbar": "0.11.7",
49
+ "@snack-uikit/toolbar": "0.11.8",
50
50
  "@snack-uikit/truncate-string": "0.6.9",
51
51
  "@snack-uikit/typography": "0.8.4",
52
52
  "@snack-uikit/utils": "3.7.0",
@@ -61,5 +61,5 @@
61
61
  "peerDependencies": {
62
62
  "@snack-uikit/locale": "*"
63
63
  },
64
- "gitHead": "13f93c20ebb8a672f7ac90b171d5a11bf4675519"
64
+ "gitHead": "b7485df8da9869f0fe2b2e22974a06d9a04e0835"
65
65
  }
@@ -1,5 +1,5 @@
1
1
  import copyToClipboard from 'copy-to-clipboard';
2
- import { MouseEventHandler, PropsWithChildren, useEffect, useRef, useState } from 'react';
2
+ import { MouseEventHandler, useEffect, useRef, useState } from 'react';
3
3
 
4
4
  import { ButtonFunction } from '@snack-uikit/button';
5
5
  import { CheckSVG, CopySVG } from '@snack-uikit/icons';
@@ -7,11 +7,11 @@ import { TruncateString } from '@snack-uikit/truncate-string';
7
7
 
8
8
  import styles from './styles.module.scss';
9
9
 
10
- export type CopyCellProps = PropsWithChildren<{
10
+ export type CopyCellProps = {
11
11
  value?: string | number;
12
- }>;
12
+ };
13
13
 
14
- export function CopyCell({ value, children }: CopyCellProps) {
14
+ export function CopyCell({ value }: CopyCellProps) {
15
15
  const [isChecked, setIsCheckedOpen] = useState(false);
16
16
  const timerId = useRef<NodeJS.Timeout>();
17
17
  const openChecked = () => setIsCheckedOpen(true);
@@ -35,7 +35,7 @@ export function CopyCell({ value, children }: CopyCellProps) {
35
35
 
36
36
  return (
37
37
  <div className={styles.copyCell} onClick={handleClick} role='presentation'>
38
- {children || <TruncateString text={String(value)} maxLines={1} />}
38
+ <TruncateString text={String(value)} maxLines={1} />
39
39
 
40
40
  <ButtonFunction
41
41
  data-test-id='button-copy-value'