@lt-ui/table 0.0.0-stage → 0.0.2

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.
Files changed (132) hide show
  1. package/cells/cells.module.css +481 -0
  2. package/cells/field-cells.d.ts +118 -0
  3. package/cells/field-cells.js +48 -0
  4. package/cells/index.d.ts +29 -0
  5. package/cells/index.js +15 -0
  6. package/cells/square-select.d.ts +19 -0
  7. package/cells/square-select.js +37 -0
  8. package/cells/square.d.ts +16 -0
  9. package/cells/square.js +78 -0
  10. package/cells/table-cell-actions.d.ts +32 -0
  11. package/cells/table-cell-actions.js +36 -0
  12. package/cells/table-cell-checkbox.d.ts +13 -0
  13. package/cells/table-cell-checkbox.js +13 -0
  14. package/cells/table-cell-copy.d.ts +18 -0
  15. package/cells/table-cell-copy.js +32 -0
  16. package/cells/table-cell-date.d.ts +20 -0
  17. package/cells/table-cell-date.js +15 -0
  18. package/cells/table-cell-expand.d.ts +18 -0
  19. package/cells/table-cell-expand.js +17 -0
  20. package/cells/table-cell-file-upload.d.ts +27 -0
  21. package/cells/table-cell-file-upload.js +22 -0
  22. package/cells/table-cell-file.d.ts +27 -0
  23. package/cells/table-cell-file.js +29 -0
  24. package/cells/table-cell-image.d.ts +22 -0
  25. package/cells/table-cell-image.js +12 -0
  26. package/cells/table-cell-input.d.ts +22 -0
  27. package/cells/table-cell-input.js +22 -0
  28. package/cells/table-cell-link.d.ts +14 -0
  29. package/cells/table-cell-link.js +28 -0
  30. package/cells/table-cell-select.d.ts +44 -0
  31. package/cells/table-cell-select.js +30 -0
  32. package/cells/table-cell-switch.d.ts +8 -0
  33. package/cells/table-cell-switch.js +5 -0
  34. package/cells/table-cell-textarea.d.ts +22 -0
  35. package/cells/table-cell-textarea.js +68 -0
  36. package/cjs/cells/cells.module.css +481 -0
  37. package/cjs/cells/field-cells.js +87 -0
  38. package/cjs/cells/index.js +36 -0
  39. package/cjs/cells/square-select.js +77 -0
  40. package/cjs/cells/square.js +117 -0
  41. package/cjs/cells/table-cell-actions.js +75 -0
  42. package/cjs/cells/table-cell-checkbox.js +19 -0
  43. package/cjs/cells/table-cell-copy.js +71 -0
  44. package/cjs/cells/table-cell-date.js +22 -0
  45. package/cjs/cells/table-cell-expand.js +23 -0
  46. package/cjs/cells/table-cell-file-upload.js +61 -0
  47. package/cjs/cells/table-cell-file.js +38 -0
  48. package/cjs/cells/table-cell-image.js +18 -0
  49. package/cjs/cells/table-cell-input.js +61 -0
  50. package/cjs/cells/table-cell-link.js +34 -0
  51. package/cjs/cells/table-cell-select.js +36 -0
  52. package/cjs/cells/table-cell-switch.js +12 -0
  53. package/cjs/cells/table-cell-textarea.js +107 -0
  54. package/cjs/column-settings.js +128 -0
  55. package/cjs/columns.js +67 -0
  56. package/cjs/context.js +14 -0
  57. package/cjs/corner-settings.js +24 -0
  58. package/cjs/empty-function.js +8 -0
  59. package/cjs/features.js +40 -0
  60. package/cjs/header-filter.js +93 -0
  61. package/cjs/index.js +44 -0
  62. package/cjs/layout.js +34 -0
  63. package/cjs/locale/index.js +8 -0
  64. package/cjs/locale/messages.js +63 -0
  65. package/cjs/locale/use-locale.js +10 -0
  66. package/cjs/row-loading-border.js +79 -0
  67. package/cjs/selection.js +34 -0
  68. package/cjs/sort-icon.js +18 -0
  69. package/cjs/styles.module.css +678 -0
  70. package/cjs/table-head.js +45 -0
  71. package/cjs/table-pagination.js +25 -0
  72. package/cjs/table-row.js +62 -0
  73. package/cjs/table-search.js +74 -0
  74. package/cjs/table-toolbar.js +22 -0
  75. package/cjs/table.js +95 -0
  76. package/cjs/tanstack.js +2 -0
  77. package/cjs/types.js +2 -0
  78. package/cjs/use-pointer-sort.js +116 -0
  79. package/cjs/use-table.js +23 -0
  80. package/column-settings.d.ts +59 -0
  81. package/column-settings.js +88 -0
  82. package/columns.d.ts +18 -0
  83. package/columns.js +59 -0
  84. package/context.d.ts +7 -0
  85. package/context.js +10 -0
  86. package/corner-settings.d.ts +11 -0
  87. package/corner-settings.js +16 -0
  88. package/empty-function.d.ts +1 -0
  89. package/empty-function.js +4 -0
  90. package/features.d.ts +38 -0
  91. package/features.js +37 -0
  92. package/header-filter.d.ts +29 -0
  93. package/header-filter.js +54 -0
  94. package/index.d.ts +22 -0
  95. package/index.js +12 -0
  96. package/layout.d.ts +5 -0
  97. package/layout.js +27 -0
  98. package/locale/index.d.ts +3 -0
  99. package/locale/index.js +2 -0
  100. package/locale/messages.d.ts +40 -0
  101. package/locale/messages.js +60 -0
  102. package/locale/use-locale.d.ts +9 -0
  103. package/locale/use-locale.js +7 -0
  104. package/package.json +33 -4
  105. package/row-loading-border.d.ts +7 -0
  106. package/row-loading-border.js +40 -0
  107. package/selection.d.ts +8 -0
  108. package/selection.js +31 -0
  109. package/sort-icon.d.ts +8 -0
  110. package/sort-icon.js +10 -0
  111. package/styles.module.css +678 -0
  112. package/table-head.d.ts +6 -0
  113. package/table-head.js +39 -0
  114. package/table-pagination.d.ts +16 -0
  115. package/table-pagination.js +19 -0
  116. package/table-row.d.ts +21 -0
  117. package/table-row.js +56 -0
  118. package/table-search.d.ts +28 -0
  119. package/table-search.js +38 -0
  120. package/table-toolbar.d.ts +18 -0
  121. package/table-toolbar.js +16 -0
  122. package/table.d.ts +15 -0
  123. package/table.js +56 -0
  124. package/tanstack.d.ts +9 -0
  125. package/tanstack.js +1 -0
  126. package/types.d.ts +161 -0
  127. package/types.js +1 -0
  128. package/use-pointer-sort.d.ts +32 -0
  129. package/use-pointer-sort.js +113 -0
  130. package/use-table.d.ts +46 -0
  131. package/use-table.js +19 -0
  132. package/README.md +0 -3
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.formatFileSize = exports.DownloadIcon = void 0;
8
+ exports.TableCellFile = TableCellFile;
9
+ const jsx_runtime_1 = require("react/jsx-runtime");
10
+ const react_1 = __importDefault(require("react"));
11
+ const clsx_1 = __importDefault(require("clsx"));
12
+ const uikit_1 = require("@lt-ui/uikit");
13
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
14
+ const locale_1 = require("../locale");
15
+ const DownloadIcon = () => ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": true, children: (0, jsx_runtime_1.jsx)("path", { d: "M12 4v11m0 0-4-4m4 4 4-4M5 19.5h14", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) }));
16
+ exports.DownloadIcon = DownloadIcon;
17
+ /** Размер файла: байты, килобайты или мегабайты с единицами из словаря языка */
18
+ const formatFileSize = (bytes, t) => {
19
+ if (bytes < 1024)
20
+ return `${bytes} ${t('table.fileSize.b')}`;
21
+ if (bytes < 1024 * 1024)
22
+ return `${Math.round(bytes / 1024)} ${t('table.fileSize.kb')}`;
23
+ return `${(bytes / 1024 / 1024).toFixed(1)} ${t('table.fileSize.mb')}`;
24
+ };
25
+ exports.formatFileSize = formatFileSize;
26
+ /**
27
+ * Файл в ячейке: иконка по расширению (как у `File`) и имя. Длинное имя сокращается посередине: начало и расширение
28
+ * остаются. Справа при наведении выезжает кнопка «Скачать» (как у копирования).
29
+ */
30
+ function TableCellFile({ name, href, size, onDownload, downloadLabel: downloadLabelProp, className, }) {
31
+ const { t } = (0, locale_1.useLocale)();
32
+ const downloadLabel = downloadLabelProp !== null && downloadLabelProp !== void 0 ? downloadLabelProp : t('table.cell.download');
33
+ const { base, ext, extWithDot } = (0, uikit_1.splitFileName)(name);
34
+ const title = size === undefined ? name : `${name}, ${(0, exports.formatFileSize)(size, t)}`;
35
+ const download = onDownload || href;
36
+ return ((0, jsx_runtime_1.jsxs)("span", { className: (0, clsx_1.default)(cells_module_scss_1.default.copyCell, cells_module_scss_1.default.file, className), title: title, children: [(0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.fileIcon, children: (0, uikit_1.getDefaultFileIconByExtension)(ext) }), (0, jsx_runtime_1.jsxs)("span", { className: cells_module_scss_1.default.fileName, children: [(0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.fileBase, children: base }), (0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.fileExt, children: extWithDot })] }), download &&
37
+ (onDownload ? ((0, jsx_runtime_1.jsx)("button", { type: "button", className: cells_module_scss_1.default.copyButton, "aria-label": downloadLabel, "data-table-ignore": true, onClick: onDownload, children: (0, jsx_runtime_1.jsx)(exports.DownloadIcon, {}) })) : ((0, jsx_runtime_1.jsx)("a", { className: cells_module_scss_1.default.copyButton, "aria-label": downloadLabel, href: href, download: name, "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)(exports.DownloadIcon, {}) })))] }));
38
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TableCellImage = TableCellImage;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const uikit_1 = require("@lt-ui/uikit");
10
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
11
+ /**
12
+ * Миниатюра в ячейке (по умолчанию 96×64, строка выше обычной). По клику сразу открывается просмотр на весь экран:
13
+ * если задан `previewSrc` или `loadPreview`, в окне крутится индикатор, пока грузится большая версия (запрос уходит только
14
+ * при открытии); `download` добавляет в просмотр кнопку «Скачать».
15
+ */
16
+ function TableCellImage({ width = 96, height = 64, disabled, rounding = 's', ...props }) {
17
+ return ((0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.imageCell, "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)(uikit_1.Image, { ...props, width: width, height: height, objectFit: "cover", rounding: rounding, preview: !disabled }) }));
18
+ }
@@ -0,0 +1,61 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.TableCellInput = void 0;
41
+ const jsx_runtime_1 = require("react/jsx-runtime");
42
+ const react_1 = __importStar(require("react"));
43
+ const uikit_1 = require("@lt-ui/uikit");
44
+ const context_1 = require("../context");
45
+ const square_1 = require("./square");
46
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
47
+ /**
48
+ * Редактируемая ячейка. В таблице `cells` — «квадратная»: поле без рамки на всю ячейку, фокус рамкой внутри ячейки,
49
+ * ошибка красной рамкой и уголком. В остальных таблицах — обычный `Input` во всю ширину колонки.
50
+ */
51
+ exports.TableCellInput = (0, react_1.forwardRef)(function TableCellInput({ error, align = 'start', value, onUpdate, onChange, disabled, ...props }, ref) {
52
+ const variant = (0, context_1.useTableVariant)();
53
+ if (variant === 'cells') {
54
+ const { 'aria-label': ariaLabel, placeholder, type, name, id, maxLength, endAdornment } = props;
55
+ return ((0, jsx_runtime_1.jsxs)(square_1.SquareFrame, { error: error, children: [(0, jsx_runtime_1.jsx)("input", { ref: ref, maxLength: maxLength, className: cells_module_scss_1.default.squareInput, style: { textAlign: align }, "aria-label": ariaLabel, "aria-invalid": error ? true : undefined, placeholder: placeholder, type: type !== null && type !== void 0 ? type : 'text', name: name, id: id, value: value !== null && value !== void 0 ? value : '', disabled: disabled, "data-table-ignore": true, onChange: (event) => {
56
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
57
+ onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(event.target.value);
58
+ } }), endAdornment && (0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.squareAdornment, children: endAdornment })] }));
59
+ }
60
+ return ((0, jsx_runtime_1.jsx)("div", { className: cells_module_scss_1.default.field, "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)(uikit_1.Input, { ...props, ref: ref, value: value, onUpdate: onUpdate, onChange: onChange, disabled: disabled, status: error ? 'error' : undefined, caption: typeof error === 'string' ? error : props.caption, size: "s", fullWidth: true }) }));
61
+ });
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TableCellLink = TableCellLink;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const clsx_1 = __importDefault(require("clsx"));
10
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
11
+ /**
12
+ * Ссылка в ячейке: текст с тонким подчёркиванием, которое на наведении становится яркой толстой линией, длинный
13
+ * текст обрезается многоточием. Клик по ней не считается кликом по строке.
14
+ */
15
+ function TableCellLink({ as: Tag, href, onClick, className, children, ...props }) {
16
+ const asButton = !href && !Tag && onClick;
17
+ const Element = Tag !== null && Tag !== void 0 ? Tag : (href ? 'a' : 'span');
18
+ const text = typeof children === 'string' ? children : undefined;
19
+ const handleKeyDown = (event) => {
20
+ if (asButton && (event.key === 'Enter' || event.key === ' ')) {
21
+ event.preventDefault();
22
+ onClick === null || onClick === void 0 ? void 0 : onClick();
23
+ }
24
+ };
25
+ return ((0, jsx_runtime_1.jsx)(Element, { ...props, href: href, title: text, role: asButton ? 'button' : undefined, tabIndex: asButton ? 0 : undefined, className: (0, clsx_1.default)(cells_module_scss_1.default.link, className), onClick: onClick
26
+ ? (event) => {
27
+ if (href && (event.ctrlKey || event.metaKey))
28
+ return;
29
+ if (href)
30
+ event.preventDefault();
31
+ onClick();
32
+ }
33
+ : undefined, onKeyDown: handleKeyDown, children: (0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.linkText, children: children }) }));
34
+ }
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TableCellSelect = TableCellSelect;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const react_1 = __importDefault(require("react"));
10
+ const uikit_1 = require("@lt-ui/uikit");
11
+ const context_1 = require("../context");
12
+ const square_1 = require("./square");
13
+ const square_select_1 = require("./square-select");
14
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
15
+ const locale_1 = require("../locale");
16
+ /**
17
+ * Ячейка выбора из списка. В таблице `cells` — «квадратная»: значение на всю ячейку, стрелка при наведении, список
18
+ * открывается под ячейкой; в остальных таблицах — компактный `Select`. Мультиселект, поиск, автокомплит и остальные
19
+ * варианты настраиваются через `selectProps` (это тот же `Select` / `useSelect`, а не отдельные компоненты).
20
+ */
21
+ function TableCellSelect(props) {
22
+ const { t } = (0, locale_1.useLocale)();
23
+ const variant = (0, context_1.useTableVariant)();
24
+ const { error } = props;
25
+ if (props.kind === 'tree') {
26
+ const { treeProps, placeholder, disabled, 'aria-label': ariaLabel } = props;
27
+ const tree = ((0, jsx_runtime_1.jsx)(uikit_1.TreeSelect, { ...treeProps, "aria-label": ariaLabel, placeholder: placeholder, disabled: disabled, status: error ? 'error' : undefined, caption: variant !== 'cells' && typeof error === 'string' ? error : undefined, size: "s", fullWidth: true }));
28
+ return variant === 'cells' ? ((0, jsx_runtime_1.jsx)(square_1.SquareFrame, { error: error, className: cells_module_scss_1.default.squareFlat, children: tree })) : ((0, jsx_runtime_1.jsx)("div", { className: cells_module_scss_1.default.field, "data-table-ignore": true, children: tree }));
29
+ }
30
+ const { error: _error, ...rest } = props;
31
+ if (variant !== 'cells') {
32
+ const { 'aria-label': ariaLabel, options, value, onUpdate, placeholder = t('table.cell.select'), disabled, selectProps, kind = 'select', } = props;
33
+ return ((0, jsx_runtime_1.jsx)("div", { className: cells_module_scss_1.default.field, "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)(uikit_1.Select, { ...selectProps, ...square_select_1.KIND_CONFIG[kind], "aria-label": ariaLabel, options: options, value: value, onUpdate: onUpdate, placeholder: placeholder, disabled: disabled, status: error ? 'error' : undefined, caption: typeof error === 'string' ? error : undefined, size: "s", fullWidth: true }) }));
34
+ }
35
+ return ((0, jsx_runtime_1.jsx)(square_1.SquareFrame, { error: error, children: (0, jsx_runtime_1.jsx)(square_select_1.SquareSelect, { ...rest }) }));
36
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TableCellSwitch = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = __importDefault(require("react"));
9
+ const uikit_1 = require("@lt-ui/uikit");
10
+ /** Переключатель в ячейке: включить или выключить параметр строки */
11
+ const TableCellSwitch = (props) => ((0, jsx_runtime_1.jsx)("span", { "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)(uikit_1.Switch, { ...props, size: "m" }) }));
12
+ exports.TableCellSwitch = TableCellSwitch;
@@ -0,0 +1,107 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.TableCellTextarea = TableCellTextarea;
41
+ const jsx_runtime_1 = require("react/jsx-runtime");
42
+ const react_1 = __importStar(require("react"));
43
+ const clsx_1 = __importDefault(require("clsx"));
44
+ const uikit_1 = require("@lt-ui/uikit");
45
+ const context_1 = require("../context");
46
+ const square_1 = require("./square");
47
+ const cells_module_scss_1 = __importDefault(require("./cells.module.css"));
48
+ /**
49
+ * Многострочный текст в ячейке. В покое — компактное значение по высоте строки таблицы (одна-две строки по размеру,
50
+ * лишнее обрезается многоточием в конце последней строки); при фокусе поле раскрывается поверх соседних строк и растёт
51
+ * по тексту, после ухода фокуса снова сворачивается. Высота строки таблицы не меняется.
52
+ */
53
+ function TableCellTextarea({ value, onUpdate, placeholder, disabled, error, maxRows = 6, 'aria-label': ariaLabel, }) {
54
+ const variant = (0, context_1.useTableVariant)();
55
+ const [editing, setEditing] = (0, react_1.useState)(false);
56
+ const area = (0, react_1.useRef)(null);
57
+ // При открытии курсор в конце текста, поле прокручено к нему. Поле лежит в портале и монтируется позже родителя,
58
+ // поэтому инициализация — в callback-ref, а не в эффекте
59
+ const mountArea = (element) => {
60
+ area.current = element;
61
+ if (!element)
62
+ return;
63
+ // Поповер ещё не вставлен в документ: фокус ставим в следующем кадре
64
+ requestAnimationFrame(() => {
65
+ element.focus();
66
+ element.setSelectionRange(element.value.length, element.value.length);
67
+ element.scrollTop = element.scrollHeight;
68
+ });
69
+ };
70
+ // Рост по тексту: высота = содержимое, но не больше `maxRows` строк
71
+ (0, react_1.useLayoutEffect)(() => {
72
+ const element = area.current;
73
+ if (!editing || !element)
74
+ return;
75
+ element.style.height = 'auto';
76
+ const line = Number.parseFloat(getComputedStyle(element).lineHeight) || 20;
77
+ element.style.height = `${Math.min(element.scrollHeight, line * maxRows + 16)}px`;
78
+ }, [editing, value, maxRows]);
79
+ const root = (0, react_1.useRef)(null);
80
+ const [height, setHeight] = (0, react_1.useState)(44);
81
+ const open = () => {
82
+ var _a, _b;
83
+ setHeight((_b = (_a = root.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) !== null && _b !== void 0 ? _b : 44);
84
+ setEditing(true);
85
+ };
86
+ // Поле редактирования лежит в поповере (портал): таблица с `overflow` его не обрежет, оно раскрывается поверх строк
87
+ // Закрытие снимает фокус заранее: при удалении элемента из DOM `blur` не срабатывает, и ячейка осталась бы «в фокусе»
88
+ const close = () => {
89
+ var _a;
90
+ (_a = area.current) === null || _a === void 0 ? void 0 : _a.blur();
91
+ setEditing(false);
92
+ };
93
+ // Клик вне поля закрывает его: `blur` не срабатывает, если фокус уже ушёл в портал (поповер) или на body
94
+ (0, react_1.useEffect)(() => {
95
+ if (!editing)
96
+ return undefined;
97
+ const onPointerDown = (event) => {
98
+ var _a;
99
+ if (!(event.target instanceof Node) || !((_a = area.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)))
100
+ close();
101
+ };
102
+ globalThis.document.addEventListener('pointerdown', onPointerDown, true);
103
+ return () => globalThis.document.removeEventListener('pointerdown', onPointerDown, true);
104
+ }, [editing]);
105
+ const body = ((0, jsx_runtime_1.jsx)(uikit_1.Popover, { open: editing, trigger: "manual", layer: false, returnFocus: false, arrow: false, matchWidth: true, flip: false, placement: "bottom-start", offset: -height, className: (0, clsx_1.default)(cells_module_scss_1.default.textareaPopover, variant !== 'cells' && cells_module_scss_1.default.textareaPopoverField), anchor: (0, jsx_runtime_1.jsx)("span", { ref: root, className: (0, clsx_1.default)(cells_module_scss_1.default.textarea, variant !== 'cells' && cells_module_scss_1.default.textareaField), "data-table-ignore": true, children: (0, jsx_runtime_1.jsx)("button", { type: "button", className: (0, clsx_1.default)(cells_module_scss_1.default.textareaView, !value && cells_module_scss_1.default.squarePlaceholder), "aria-label": ariaLabel, disabled: disabled, onFocus: open, onClick: open, children: (0, jsx_runtime_1.jsx)("span", { className: cells_module_scss_1.default.textareaText, children: value || placeholder }) }) }), children: (0, jsx_runtime_1.jsx)("textarea", { ref: mountArea, className: (0, clsx_1.default)(cells_module_scss_1.default.textareaEdit, variant !== 'cells' && cells_module_scss_1.default.textareaEditField), style: { minHeight: height }, "aria-label": ariaLabel, value: value, placeholder: placeholder, autoFocus: true, onChange: event => onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(event.target.value), onBlur: () => setEditing(false), onKeyDown: event => event.key === 'Escape' && close() }) }));
106
+ return variant === 'cells' ? (0, jsx_runtime_1.jsx)(square_1.SquareFrame, { error: error, children: body }) : body;
107
+ }
@@ -0,0 +1,128 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __importDefault = (this && this.__importDefault) || function (mod) {
37
+ return (mod && mod.__esModule) ? mod : { "default": mod };
38
+ };
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.useTableColumnSettings = useTableColumnSettings;
41
+ exports.TableColumnSettings = TableColumnSettings;
42
+ const jsx_runtime_1 = require("react/jsx-runtime");
43
+ const react_1 = __importStar(require("react"));
44
+ const uikit_1 = require("@lt-ui/uikit");
45
+ const columns_1 = require("./columns");
46
+ const use_pointer_sort_1 = require("./use-pointer-sort");
47
+ const styles_module_scss_1 = __importDefault(require("./styles.module.css"));
48
+ const locale_1 = require("./locale");
49
+ const EMPTY = { order: [], hidden: [] };
50
+ /**
51
+ * Состояние порядка и видимости колонок для `useTable`: возвращает `state` и обработчики, которые
52
+ * передаются в опции таблицы. Хранилище не навязывается: `value` и `onChange` — сериализуемый объект.
53
+ *
54
+ * @example ```tsx
55
+ * const settings = useTableColumnSettings({ value: saved, onChange: save });
56
+ * const table = useTable({ data, columns, ...settings.options });
57
+ * ```
58
+ */
59
+ function useTableColumnSettings({ value, defaultValue = EMPTY, onChange } = {}) {
60
+ const [inner, setInner] = (0, react_1.useState)(defaultValue);
61
+ const current = value !== null && value !== void 0 ? value : inner;
62
+ // Два обновления подряд (сброс порядка и видимости) должны накладываться друг на друга, а не перезаписывать
63
+ const latest = (0, react_1.useRef)(current);
64
+ latest.current = current;
65
+ const commit = (0, react_1.useCallback)((next) => {
66
+ latest.current = next;
67
+ setInner(next);
68
+ onChange === null || onChange === void 0 ? void 0 : onChange(next);
69
+ }, [onChange]);
70
+ const visibility = Object.fromEntries(current.hidden.map(id => [id, false]));
71
+ return {
72
+ value: current,
73
+ reset: () => commit(defaultValue),
74
+ options: {
75
+ state: { columnOrder: current.order, columnVisibility: visibility },
76
+ onColumnOrderChange: (updater) => {
77
+ const order = typeof updater === 'function' ? updater(latest.current.order) : updater;
78
+ commit({ ...latest.current, order });
79
+ },
80
+ onColumnVisibilityChange: (updater) => {
81
+ const hiddenNow = Object.fromEntries(latest.current.hidden.map(id => [id, false]));
82
+ const next = typeof updater === 'function' ? updater(hiddenNow) : updater;
83
+ commit({ ...latest.current, hidden: Object.keys(next).filter(id => next[id] === false) });
84
+ },
85
+ },
86
+ };
87
+ }
88
+ const GripIcon = () => ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 16 16", width: "16", height: "16", fill: "currentColor", "aria-hidden": true, children: [4, 8, 12].map(y => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: "6", cy: y, r: "1.1" }), (0, jsx_runtime_1.jsx)("circle", { cx: "10", cy: y, r: "1.1" })] }, y))) }));
89
+ const isService = (id) => id === columns_1.SELECTION_COLUMN_ID || id === columns_1.EXPAND_COLUMN_ID;
90
+ function columnTitle(column) {
91
+ const { header, meta } = column.columnDef;
92
+ if (meta === null || meta === void 0 ? void 0 : meta.title)
93
+ return meta.title;
94
+ return typeof header === 'string' ? header : column.id;
95
+ }
96
+ /**
97
+ * `<TableColumnSettings />` — порядок и видимость колонок: чекбокс показывает или скрывает столбец, ручку слева можно
98
+ * перетащить (или двигать стрелками с клавиатуры); перетаскивание написано без сторонних библиотек. Работает с `columnOrder` и `columnVisibility` таблицы,
99
+ * хранение — на стороне приложения (см. `useTableColumnSettings`). Служебные колонки (выбор, раскрытие) не показываются.
100
+ */
101
+ function TableColumnSettings({ table, label: labelProp, onReset, trigger, }) {
102
+ const { t } = (0, locale_1.useLocale)();
103
+ const label = labelProp !== null && labelProp !== void 0 ? labelProp : t('table.columns.label');
104
+ const [open, setOpen] = (0, react_1.useState)(false);
105
+ const columns = table.getAllLeafColumns().filter(column => !isService(column.id));
106
+ const ids = columns.map(column => column.id);
107
+ const service = table
108
+ .getAllLeafColumns()
109
+ .filter(column => isService(column.id))
110
+ .map(column => column.id);
111
+ const sort = (0, use_pointer_sort_1.usePointerSort)({
112
+ ids,
113
+ onSort: next => table.setColumnOrder([...service, ...next]),
114
+ });
115
+ let renderTrigger;
116
+ if (typeof trigger === 'function')
117
+ renderTrigger = trigger({ open });
118
+ else if (trigger)
119
+ renderTrigger = trigger;
120
+ else
121
+ renderTrigger = ((0, jsx_runtime_1.jsx)(uikit_1.Button, { variant: "outline", size: "s", "aria-haspopup": "dialog", "aria-expanded": open, children: label }));
122
+ const reset = () => {
123
+ table.resetColumnOrder();
124
+ table.resetColumnVisibility();
125
+ onReset === null || onReset === void 0 ? void 0 : onReset();
126
+ };
127
+ return ((0, jsx_runtime_1.jsx)(uikit_1.Popover, { open: open, onOpenChange: setOpen, placement: "bottom-end", arrow: false, anchor: renderTrigger, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.settings, role: "group", "aria-label": label, children: [columns.map(column => ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.settingsItem, ...sort.getItemProps(column.id), children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: styles_module_scss_1.default.settingsHandle, "aria-label": t('table.columns.move', { title: columnTitle(column) }), ...sort.getHandleProps(column.id), children: (0, jsx_runtime_1.jsx)(GripIcon, {}) }), (0, jsx_runtime_1.jsx)(uikit_1.Checkbox, { "aria-label": t('table.columns.show', { title: columnTitle(column) }), checked: column.getIsVisible(), disabled: !column.getCanHide(), animated: false, onUpdate: checked => column.toggleVisibility(checked) }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_scss_1.default.settingsLabel, children: columnTitle(column) })] }, column.id))), (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.settingsFooter, children: (0, jsx_runtime_1.jsx)(uikit_1.Button, { variant: "ghost", size: "s", onClick: reset, children: t('table.columns.reset') }) })] }) }));
128
+ }
package/cjs/columns.js ADDED
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.EXPAND_COLUMN_ID = exports.SELECTION_COLUMN_ID = void 0;
8
+ exports.selectionColumn = selectionColumn;
9
+ exports.expandColumn = expandColumn;
10
+ const jsx_runtime_1 = require("react/jsx-runtime");
11
+ const react_1 = __importDefault(require("react"));
12
+ const clsx_1 = __importDefault(require("clsx"));
13
+ const uikit_1 = require("@lt-ui/uikit");
14
+ const selection_1 = require("./selection");
15
+ const sort_icon_1 = require("./sort-icon");
16
+ const styles_module_scss_1 = __importDefault(require("./styles.module.css"));
17
+ const locale_1 = require("./locale");
18
+ exports.SELECTION_COLUMN_ID = '__select';
19
+ exports.EXPAND_COLUMN_ID = '__expand';
20
+ // Подписи берутся из словаря языка, а хуки нельзя вызывать в самой функции колонки: вынесено в компоненты
21
+ function SelectAllCheckbox({ table }) {
22
+ const { t } = (0, locale_1.useLocale)();
23
+ return ((0, jsx_runtime_1.jsx)(uikit_1.Checkbox, { "aria-label": t('table.selectAll'), checked: table.getIsAllRowsSelected(), indeterminate: table.getIsSomeRowsSelected(), disabled: table.getRowCount() === 0, animated: false, onUpdate: checked => table.toggleAllRowsSelected(checked) }));
24
+ }
25
+ function SelectRowCheckbox({ row, table }) {
26
+ const { t } = (0, locale_1.useLocale)();
27
+ return ((0, jsx_runtime_1.jsx)(uikit_1.Checkbox, { "aria-label": t('table.selectRow'), checked: row.getIsSelected(), disabled: !row.getCanSelect(), animated: false,
28
+ // С Shift выбирается диапазон от прошлой отмеченной строки
29
+ onChange: event => (0, selection_1.toggleRowSelection)(table, row, event.nativeEvent) }));
30
+ }
31
+ function ExpandButton({ row, icon, }) {
32
+ const { t } = (0, locale_1.useLocale)();
33
+ return ((0, jsx_runtime_1.jsx)("button", { type: "button", className: (0, clsx_1.default)(styles_module_scss_1.default.expander, row.getIsExpanded() && styles_module_scss_1.default.expanderOpen, icon && styles_module_scss_1.default.expanderCustom), "aria-expanded": row.getIsExpanded(), "aria-label": row.getIsExpanded() ? t('table.collapseRow') : t('table.expandRow'), onClick: row.getToggleExpandedHandler(), children: icon ? icon(row.getIsExpanded()) : (0, jsx_runtime_1.jsx)(sort_icon_1.ChevronIcon, {}) }));
34
+ }
35
+ /**
36
+ * Колонка с чекбоксами выбора строк и «выбрать все» в шапке. Клик с Shift выбирает диапазон. Состояние — `rowSelection`
37
+ * TanStack Table (`state` или `onRowSelectionChange`), недоступные строки задаёт опция `enableRowSelection`.
38
+ */
39
+ function selectionColumn() {
40
+ return {
41
+ id: exports.SELECTION_COLUMN_ID,
42
+ size: 52,
43
+ enableSorting: false,
44
+ enableHiding: false,
45
+ enableResizing: false,
46
+ meta: { align: 'center' },
47
+ header: ({ table }) => (0, jsx_runtime_1.jsx)(SelectAllCheckbox, { table: table }),
48
+ cell: ({ row, table }) => (0, jsx_runtime_1.jsx)(SelectRowCheckbox, { row: row, table: table }),
49
+ };
50
+ }
51
+ /**
52
+ * Колонка с кнопкой раскрытия строки: обычная кнопка с обводкой, как у меню действий. Ставьте её последней, там, где
53
+ * обычно действия строки. Нужны `getRowCanExpand` (или `getSubRows`) в опциях таблицы
54
+ * и `renderExpanded` у `Table` для содержимого.
55
+ */
56
+ function expandColumn({ icon, } = {}) {
57
+ return {
58
+ id: exports.EXPAND_COLUMN_ID,
59
+ size: 64,
60
+ enableSorting: false,
61
+ enableHiding: false,
62
+ enableResizing: false,
63
+ meta: { align: 'end' },
64
+ header: () => null,
65
+ cell: ({ row }) => (row.getCanExpand() ? (0, jsx_runtime_1.jsx)(ExpandButton, { row: row, icon: icon }) : null),
66
+ };
67
+ }
package/cjs/context.js ADDED
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableVariant = exports.TableVariantProvider = void 0;
5
+ const react_1 = require("react");
6
+ const VariantContext = (0, react_1.createContext)('rows');
7
+ // React 19 — `<Context value>`, React 18 — `<Context.Provider>`
8
+ exports.TableVariantProvider = Number.parseInt(react_1.version, 10) >= 19 ? VariantContext : VariantContext.Provider;
9
+ /**
10
+ * Вид таблицы, внутри которой рисуется ячейка. Готовые ячейки (`TableCellInput`, `TableCellSelect`...) по нему выбирают
11
+ * оформление: в таблице `cells` — «квадратные» ячейки как в электронных таблицах, в остальных — обычные компоненты.
12
+ */
13
+ const useTableVariant = () => (0, react_1.useContext)(VariantContext);
14
+ exports.useTableVariant = useTableVariant;
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ColumnSettingsIcon = void 0;
8
+ exports.TableCornerColumnSettings = TableCornerColumnSettings;
9
+ const jsx_runtime_1 = require("react/jsx-runtime");
10
+ const react_1 = __importDefault(require("react"));
11
+ const uikit_1 = require("@lt-ui/uikit");
12
+ const column_settings_1 = require("./column-settings");
13
+ const styles_module_scss_1 = __importDefault(require("./styles.module.css"));
14
+ const locale_1 = require("./locale");
15
+ /** Шестерёнка (контур иконки Gear из @lt-ui/icons) для триггера настроек в углу таблицы */
16
+ const ColumnSettingsIcon = () => ((0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 24 24", width: "24", height: "24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)("path", { d: "M12 16.5c2.49 0 4.5-2.01 4.5-4.5S14.49 7.5 12 7.5 7.5 9.51 7.5 12s2.01 4.5 4.5 4.5z" }), (0, jsx_runtime_1.jsx)("path", { d: "M17.22 6.1c.24.22.46.45.68.68l2.56.36c.41.73.73 1.5.95 2.31l-1.55 2.07s.02.64 0 .96l1.55 2.07c-.21.81-.54 1.58-.95 2.31l-2.56.36s-.44.46-.68.68l-.36 2.56c-.73.41-1.5.73-2.31.95l-2.07-1.55c-.32.02-.64.02-.96 0l-2.07 1.55c-.81-.21-1.58-.54-2.31-.95l-.36-2.56a21.8 21.8 0 0 1-.68-.68l-2.56-.36c-.41-.73-.73-1.5-.95-2.31l1.55-2.07s-.02-.64 0-.96L2.59 9.45c.21-.81.54-1.58.95-2.31l2.56-.36c.22-.23.45-.46.68-.68l.36-2.56c.73-.41 1.5-.73 2.31-.95l2.07 1.55c.32-.02.64-.02.96 0l2.07-1.55c.81.21 1.58.54 2.31.95l.36 2.56z" })] }));
17
+ exports.ColumnSettingsIcon = ColumnSettingsIcon;
18
+ /** Шестерёнка в правом верхнем углу таблицы: настройки столбцов без отдельной панели над таблицей */
19
+ function TableCornerColumnSettings({ table, options, }) {
20
+ var _a, _b;
21
+ const { t } = (0, locale_1.useLocale)();
22
+ const label = (_a = options.label) !== null && _a !== void 0 ? _a : t('table.columns.label');
23
+ return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.cornerSettings, children: (0, jsx_runtime_1.jsx)(column_settings_1.TableColumnSettings, { table: table, ...options, trigger: (_b = options.trigger) !== null && _b !== void 0 ? _b : ((0, jsx_runtime_1.jsx)(uikit_1.Button, { variant: "ghost", size: "s", iconOnly: true, compact: true, "aria-label": label, "aria-haspopup": "dialog", children: (0, jsx_runtime_1.jsx)(exports.ColumnSettingsIcon, {}) })) }) }));
24
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyFunction = void 0;
4
+ // Пустая функция для значений по умолчанию. Наружу из пакета не экспортируется.
5
+ const emptyFunction = () => {
6
+ // Намеренно пусто
7
+ };
8
+ exports.emptyFunction = emptyFunction;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultTableFeatures = void 0;
4
+ const react_table_1 = require("@tanstack/react-table");
5
+ /** Features required by the LT UI renderer. Pagination remains opt-in via manualPagination: false. */
6
+ exports.defaultTableFeatures = (0, react_table_1.tableFeatures)({
7
+ columnFilteringFeature: react_table_1.columnFilteringFeature,
8
+ columnOrderingFeature: react_table_1.columnOrderingFeature,
9
+ columnPinningFeature: react_table_1.columnPinningFeature,
10
+ columnResizingFeature: react_table_1.columnResizingFeature,
11
+ columnSizingFeature: react_table_1.columnSizingFeature,
12
+ columnVisibilityFeature: react_table_1.columnVisibilityFeature,
13
+ globalFilteringFeature: react_table_1.globalFilteringFeature,
14
+ rowExpandingFeature: react_table_1.rowExpandingFeature,
15
+ rowPaginationFeature: react_table_1.rowPaginationFeature,
16
+ rowSelectionFeature: react_table_1.rowSelectionFeature,
17
+ rowSortingFeature: react_table_1.rowSortingFeature,
18
+ filteredRowModel: (0, react_table_1.createFilteredRowModel)(),
19
+ sortedRowModel: (0, react_table_1.createSortedRowModel)(),
20
+ expandedRowModel: (0, react_table_1.createExpandedRowModel)(),
21
+ paginatedRowModel: (0, react_table_1.createPaginatedRowModel)(),
22
+ filterFns: {
23
+ includesString: react_table_1.filterFn_includesString,
24
+ includesStringSensitive: react_table_1.filterFn_includesStringSensitive,
25
+ equalsString: react_table_1.filterFn_equalsString,
26
+ arrIncludes: react_table_1.filterFn_arrIncludes,
27
+ equals: react_table_1.filterFn_equals,
28
+ weakEquals: react_table_1.filterFn_weakEquals,
29
+ inNumberRange: react_table_1.filterFn_inNumberRange,
30
+ },
31
+ sortFns: {
32
+ alphanumeric: react_table_1.sortFn_alphanumeric,
33
+ alphanumericCaseSensitive: react_table_1.sortFn_alphanumericCaseSensitive,
34
+ basic: react_table_1.sortFn_basic,
35
+ datetime: react_table_1.sortFn_datetime,
36
+ text: react_table_1.sortFn_text,
37
+ textCaseSensitive: react_table_1.sortFn_textCaseSensitive,
38
+ },
39
+ columnMeta: (0, react_table_1.metaHelper)(),
40
+ });