pixelize-design-library 2.3.1-beta.1 → 2.3.1-beta.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.
- package/package.json +1 -1
- package/dist/App.d.ts +0 -4
- package/dist/App.js +0 -131
- package/dist/Components/Table/CompactSelect.d.ts +0 -15
- package/dist/Components/Table/CompactSelect.js +0 -69
- package/dist/Components/Table/Components/ActiveFilters.d.ts +0 -9
- package/dist/Components/Table/Components/ActiveFilters.js +0 -132
- package/dist/Components/Table/Components/TableFilters.d.ts +0 -7
- package/dist/Components/Table/Components/TableFilters.js +0 -89
- package/dist/Components/Table/Components/useDebounce.d.ts +0 -2
- package/dist/Components/Table/Components/useDebounce.js +0 -28
- package/dist/Components/Table/Components/useTable.d.ts +0 -47
- package/dist/Components/Table/Components/useTable.js +0 -219
- package/dist/Components/Table/LeftFilterPane.d.ts +0 -36
- package/dist/Components/Table/LeftFilterPane.js +0 -273
- package/dist/Components/Table/SelectOperationControls.d.ts +0 -8
- package/dist/Components/Table/SelectOperationControls.js +0 -15
- package/dist/Components/Table/TableSettings/ManageColumns.d.ts +0 -12
- package/dist/Components/Table/TableSettings/ManageColumns.js +0 -166
- package/dist/Components/Table/TableSettings/ManageColumns.test.d.ts +0 -1
- package/dist/Components/Table/TableSettings/ManageColumns.test.js +0 -146
- package/dist/Components/Table/TableSettings/TableFilters.d.ts +0 -10
- package/dist/Components/Table/TableSettings/TableFilters.js +0 -69
- package/dist/Components/Table/TableSettings/TableFilters.test.d.ts +0 -1
- package/dist/Components/Table/TableSettings/TableFilters.test.js +0 -109
- package/dist/Components/Table/TableSettings/TableSettings.d.ts +0 -8
- package/dist/Components/Table/TableSettings/TableSettings.js +0 -141
- package/dist/Components/Table/TableToDo.d.ts +0 -2
- package/dist/Components/Table/TableToDo.js +0 -291
- package/dist/Components/Table/TextOperationControls.d.ts +0 -12
- package/dist/Components/Table/TextOperationControls.js +0 -29
- package/dist/Layout.d.ts +0 -3
- package/dist/Layout.js +0 -292
- package/dist/Pages/TInput.d.ts +0 -3
- package/dist/Pages/TInput.js +0 -56
- package/dist/Pages/accordion.d.ts +0 -3
- package/dist/Pages/accordion.js +0 -42
- package/dist/Pages/alertdialog.d.ts +0 -3
- package/dist/Pages/alertdialog.js +0 -54
- package/dist/Pages/button.d.ts +0 -3
- package/dist/Pages/button.js +0 -46
- package/dist/Pages/card.d.ts +0 -3
- package/dist/Pages/card.js +0 -117
- package/dist/Pages/chart.d.ts +0 -4
- package/dist/Pages/chart.js +0 -40
- package/dist/Pages/checkbox.d.ts +0 -3
- package/dist/Pages/checkbox.js +0 -12
- package/dist/Pages/contactForm.d.ts +0 -3
- package/dist/Pages/contactForm.js +0 -16
- package/dist/Pages/datePick.d.ts +0 -3
- package/dist/Pages/datePick.js +0 -88
- package/dist/Pages/drawer.d.ts +0 -3
- package/dist/Pages/drawer.js +0 -58
- package/dist/Pages/dropdown.d.ts +0 -3
- package/dist/Pages/dropdown.js +0 -24
- package/dist/Pages/editor.d.ts +0 -3
- package/dist/Pages/editor.js +0 -14
- package/dist/Pages/feedback.d.ts +0 -2
- package/dist/Pages/feedback.js +0 -15
- package/dist/Pages/fileUpload.d.ts +0 -2
- package/dist/Pages/fileUpload.js +0 -82
- package/dist/Pages/input.d.ts +0 -3
- package/dist/Pages/input.js +0 -92
- package/dist/Pages/kanbanboard.d.ts +0 -3
- package/dist/Pages/kanbanboard.js +0 -224
- package/dist/Pages/modal.d.ts +0 -3
- package/dist/Pages/modal.js +0 -65
- package/dist/Pages/multiSelect.d.ts +0 -3
- package/dist/Pages/multiSelect.js +0 -55
- package/dist/Pages/noteArea.d.ts +0 -3
- package/dist/Pages/noteArea.js +0 -59
- package/dist/Pages/notification.d.ts +0 -3
- package/dist/Pages/notification.js +0 -25
- package/dist/Pages/numberInput.d.ts +0 -3
- package/dist/Pages/numberInput.js +0 -49
- package/dist/Pages/photoViewer.d.ts +0 -3
- package/dist/Pages/photoViewer.js +0 -12
- package/dist/Pages/pinInputs.d.ts +0 -3
- package/dist/Pages/pinInputs.js +0 -12
- package/dist/Pages/productCaard.d.ts +0 -3
- package/dist/Pages/productCaard.js +0 -311
- package/dist/Pages/productDetailCard.d.ts +0 -3
- package/dist/Pages/productDetailCard.js +0 -78
- package/dist/Pages/productFilter.d.ts +0 -3
- package/dist/Pages/productFilter.js +0 -202
- package/dist/Pages/progressbar.d.ts +0 -3
- package/dist/Pages/progressbar.js +0 -12
- package/dist/Pages/radioButton.d.ts +0 -3
- package/dist/Pages/radioButton.js +0 -54
- package/dist/Pages/search.d.ts +0 -3
- package/dist/Pages/search.js +0 -54
- package/dist/Pages/searchSelect.d.ts +0 -3
- package/dist/Pages/searchSelect.js +0 -133
- package/dist/Pages/select.d.ts +0 -3
- package/dist/Pages/select.js +0 -53
- package/dist/Pages/selectSearch.d.ts +0 -3
- package/dist/Pages/selectSearch.js +0 -103
- package/dist/Pages/skeleton.d.ts +0 -3
- package/dist/Pages/skeleton.js +0 -22
- package/dist/Pages/switch.d.ts +0 -3
- package/dist/Pages/switch.js +0 -50
- package/dist/Pages/table.d.ts +0 -3
- package/dist/Pages/table.js +0 -174
- package/dist/Pages/textArea.d.ts +0 -3
- package/dist/Pages/textArea.js +0 -15
- package/dist/Pages/timeline.d.ts +0 -3
- package/dist/Pages/timeline.js +0 -74
- package/dist/Pages/tooltip.d.ts +0 -3
- package/dist/Pages/tooltip.js +0 -12
- package/dist/Pages/toster.d.ts +0 -3
- package/dist/Pages/toster.js +0 -68
- package/dist/Pages/verifyEmail.d.ts +0 -3
- package/dist/Pages/verifyEmail.js +0 -18
- package/dist/Theme/Dark/palette.d.ts +0 -370
- package/dist/Theme/Dark/palette.js +0 -372
- package/dist/bootstrap.d.ts +0 -1
- package/dist/bootstrap.js +0 -14
- package/dist/components-v2/AlertDialog/AlertDialog.d.ts +0 -23
- package/dist/components-v2/AlertDialog/AlertDialog.js +0 -98
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.d.ts +0 -14
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.js +0 -66
- package/dist/components-v2/Charts/AreaChart.d.ts +0 -23
- package/dist/components-v2/Charts/AreaChart.js +0 -63
- package/dist/components-v2/Charts/BarChart.d.ts +0 -25
- package/dist/components-v2/Charts/BarChart.js +0 -57
- package/dist/components-v2/Charts/LineChart.d.ts +0 -23
- package/dist/components-v2/Charts/LineChart.js +0 -55
- package/dist/components-v2/Charts/PieChart.d.ts +0 -15
- package/dist/components-v2/Charts/PieChart.js +0 -54
- package/dist/components-v2/Charts/PolarChart.d.ts +0 -14
- package/dist/components-v2/Charts/PolarChart.js +0 -54
- package/dist/components-v2/Charts/chartOptions.d.ts +0 -7
- package/dist/components-v2/Charts/chartOptions.js +0 -41
- package/dist/components-v2/Charts/useChartTheme.d.ts +0 -22
- package/dist/components-v2/Charts/useChartTheme.js +0 -106
- package/dist/components-v2/ContactForm/ContactForm.d.ts +0 -25
- package/dist/components-v2/ContactForm/ContactForm.js +0 -116
- package/dist/components-v2/DatePicker/Calendar.d.ts +0 -19
- package/dist/components-v2/DatePicker/Calendar.js +0 -212
- package/dist/components-v2/DatePicker/DatePicker.d.ts +0 -46
- package/dist/components-v2/DatePicker/DatePicker.js +0 -189
- package/dist/components-v2/DatePicker/TimePicker.d.ts +0 -12
- package/dist/components-v2/DatePicker/TimePicker.js +0 -105
- package/dist/components-v2/DatePicker/utils.d.ts +0 -31
- package/dist/components-v2/DatePicker/utils.js +0 -109
- package/dist/components-v2/Drawer/Drawer.d.ts +0 -27
- package/dist/components-v2/Drawer/Drawer.js +0 -132
- package/dist/components-v2/FeedbackForm/FeedbackForm.d.ts +0 -26
- package/dist/components-v2/FeedbackForm/FeedbackForm.js +0 -112
- package/dist/components-v2/FileUploader/FileUploader.d.ts +0 -28
- package/dist/components-v2/FileUploader/FileUploader.js +0 -127
- package/dist/components-v2/Input/TextInput.d.ts +0 -41
- package/dist/components-v2/Input/TextInput.js +0 -169
- package/dist/components-v2/KanbanBoard/KanbanBoard.d.ts +0 -39
- package/dist/components-v2/KanbanBoard/KanbanBoard.js +0 -101
- package/dist/components-v2/Layout/AppLayout.d.ts +0 -22
- package/dist/components-v2/Layout/AppLayout.js +0 -53
- package/dist/components-v2/Loading/Loading.d.ts +0 -19
- package/dist/components-v2/Loading/Loading.js +0 -55
- package/dist/components-v2/Modal/Modal.d.ts +0 -30
- package/dist/components-v2/Modal/Modal.js +0 -82
- package/dist/components-v2/NavigationBar/NavigationBar.d.ts +0 -47
- package/dist/components-v2/NavigationBar/NavigationBar.js +0 -148
- package/dist/components-v2/Notification/Notification.d.ts +0 -22
- package/dist/components-v2/Notification/Notification.js +0 -113
- package/dist/components-v2/NumberInput/NumberInput.d.ts +0 -37
- package/dist/components-v2/NumberInput/NumberInput.js +0 -210
- package/dist/components-v2/PinInput/PinInput.d.ts +0 -26
- package/dist/components-v2/PinInput/PinInput.js +0 -138
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +0 -18
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.js +0 -91
- package/dist/components-v2/Select/Select.d.ts +0 -41
- package/dist/components-v2/Select/Select.js +0 -284
- package/dist/components-v2/Sidebar/Sidebar.d.ts +0 -41
- package/dist/components-v2/Sidebar/Sidebar.js +0 -182
- package/dist/components-v2/Slider/Slider.d.ts +0 -18
- package/dist/components-v2/Slider/Slider.js +0 -101
- package/dist/components-v2/Table/Table.d.ts +0 -7
- package/dist/components-v2/Table/Table.js +0 -172
- package/dist/components-v2/Table/TableProps.d.ts +0 -139
- package/dist/components-v2/Table/TableProps.js +0 -9
- package/dist/components-v2/Table/components/ActiveFilters.d.ts +0 -10
- package/dist/components-v2/Table/components/ActiveFilters.js +0 -70
- package/dist/components-v2/Table/components/BulkActionBar.d.ts +0 -11
- package/dist/components-v2/Table/components/BulkActionBar.js +0 -92
- package/dist/components-v2/Table/components/ColumnResizeHandle.d.ts +0 -7
- package/dist/components-v2/Table/components/ColumnResizeHandle.js +0 -41
- package/dist/components-v2/Table/components/Pagination.d.ts +0 -11
- package/dist/components-v2/Table/components/Pagination.js +0 -92
- package/dist/components-v2/Table/components/TableBody.d.ts +0 -23
- package/dist/components-v2/Table/components/TableBody.js +0 -69
- package/dist/components-v2/Table/components/TableCell.d.ts +0 -14
- package/dist/components-v2/Table/components/TableCell.js +0 -63
- package/dist/components-v2/Table/components/TableEmptyState.d.ts +0 -12
- package/dist/components-v2/Table/components/TableEmptyState.js +0 -55
- package/dist/components-v2/Table/components/TableErrorState.d.ts +0 -6
- package/dist/components-v2/Table/components/TableErrorState.js +0 -52
- package/dist/components-v2/Table/components/TableHeader.d.ts +0 -21
- package/dist/components-v2/Table/components/TableHeader.js +0 -94
- package/dist/components-v2/Table/components/TableRow.d.ts +0 -20
- package/dist/components-v2/Table/components/TableRow.js +0 -64
- package/dist/components-v2/Table/components/TableSearch.d.ts +0 -8
- package/dist/components-v2/Table/components/TableSearch.js +0 -47
- package/dist/components-v2/Table/filters/FilterChips.d.ts +0 -6
- package/dist/components-v2/Table/filters/FilterChips.js +0 -9
- package/dist/components-v2/Table/filters/LeftFilterPane.d.ts +0 -17
- package/dist/components-v2/Table/filters/LeftFilterPane.js +0 -105
- package/dist/components-v2/Table/filters/TableFilters.d.ts +0 -12
- package/dist/components-v2/Table/filters/TableFilters.js +0 -127
- package/dist/components-v2/Table/hooks/useColumnResize.d.ts +0 -15
- package/dist/components-v2/Table/hooks/useColumnResize.js +0 -104
- package/dist/components-v2/Table/hooks/useTable.d.ts +0 -58
- package/dist/components-v2/Table/hooks/useTable.js +0 -254
- package/dist/components-v2/Table/hooks/useTableKeyboard.d.ts +0 -25
- package/dist/components-v2/Table/hooks/useTableKeyboard.js +0 -112
- package/dist/components-v2/Table/hooks/useVirtualScroll.d.ts +0 -29
- package/dist/components-v2/Table/hooks/useVirtualScroll.js +0 -83
- package/dist/components-v2/Table/settings/ManageColumns.d.ts +0 -12
- package/dist/components-v2/Table/settings/ManageColumns.js +0 -59
- package/dist/components-v2/Table/settings/TableSettings.d.ts +0 -12
- package/dist/components-v2/Table/settings/TableSettings.js +0 -57
- package/dist/components-v2/Table/utils/filterUtils.d.ts +0 -7
- package/dist/components-v2/Table/utils/filterUtils.js +0 -149
- package/dist/components-v2/Table/utils/sortUtils.d.ts +0 -6
- package/dist/components-v2/Table/utils/sortUtils.js +0 -65
- package/dist/components-v2/Tag/Tag.d.ts +0 -15
- package/dist/components-v2/Tag/Tag.js +0 -87
- package/dist/components-v2/Timeline/Timeline.d.ts +0 -18
- package/dist/components-v2/Timeline/Timeline.js +0 -76
- package/dist/components-v2/Toaster/Toaster.d.ts +0 -61
- package/dist/components-v2/Toaster/Toaster.js +0 -63
- package/dist/components-v2/Toggle/Toggle.d.ts +0 -28
- package/dist/components-v2/Toggle/Toggle.js +0 -90
- package/dist/components-v2/ui/accordion.d.ts +0 -12
- package/dist/components-v2/ui/accordion.js +0 -104
- package/dist/components-v2/ui/alert.d.ts +0 -18
- package/dist/components-v2/ui/alert.js +0 -99
- package/dist/components-v2/ui/avatar.d.ts +0 -12
- package/dist/components-v2/ui/avatar.js +0 -80
- package/dist/components-v2/ui/badge.d.ts +0 -10
- package/dist/components-v2/ui/badge.js +0 -76
- package/dist/components-v2/ui/button.d.ts +0 -18
- package/dist/components-v2/ui/button.js +0 -97
- package/dist/components-v2/ui/checkbox.d.ts +0 -15
- package/dist/components-v2/ui/checkbox.js +0 -86
- package/dist/components-v2/ui/dialog.d.ts +0 -30
- package/dist/components-v2/ui/dialog.js +0 -115
- package/dist/components-v2/ui/dropdown-menu.d.ts +0 -26
- package/dist/components-v2/ui/dropdown-menu.js +0 -121
- package/dist/components-v2/ui/field.d.ts +0 -32
- package/dist/components-v2/ui/field.js +0 -62
- package/dist/components-v2/ui/form-field.d.ts +0 -25
- package/dist/components-v2/ui/form-field.js +0 -96
- package/dist/components-v2/ui/input.d.ts +0 -9
- package/dist/components-v2/ui/input.js +0 -73
- package/dist/components-v2/ui/label.d.ts +0 -10
- package/dist/components-v2/ui/label.js +0 -70
- package/dist/components-v2/ui/popover.d.ts +0 -9
- package/dist/components-v2/ui/popover.js +0 -60
- package/dist/components-v2/ui/progress.d.ts +0 -12
- package/dist/components-v2/ui/progress.js +0 -75
- package/dist/components-v2/ui/radio-group.d.ts +0 -17
- package/dist/components-v2/ui/radio-group.js +0 -91
- package/dist/components-v2/ui/select.d.ts +0 -24
- package/dist/components-v2/ui/select.js +0 -122
- package/dist/components-v2/ui/separator.d.ts +0 -5
- package/dist/components-v2/ui/separator.js +0 -55
- package/dist/components-v2/ui/skeleton.d.ts +0 -9
- package/dist/components-v2/ui/skeleton.js +0 -68
- package/dist/components-v2/ui/spinner.d.ts +0 -16
- package/dist/components-v2/ui/spinner.js +0 -64
- package/dist/components-v2/ui/switch.d.ts +0 -10
- package/dist/components-v2/ui/switch.js +0 -81
- package/dist/components-v2/ui/tabs.d.ts +0 -13
- package/dist/components-v2/ui/tabs.js +0 -95
- package/dist/components-v2/ui/textarea.d.ts +0 -10
- package/dist/components-v2/ui/textarea.js +0 -96
- package/dist/components-v2/ui/tooltip.d.ts +0 -17
- package/dist/components-v2/ui/tooltip.js +0 -75
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -8
- package/dist/theme-v2/ThemeProvider.d.ts +0 -19
- package/dist/theme-v2/ThemeProvider.js +0 -149
- package/dist/theme-v2/dark.css +0 -47
- package/dist/theme-v2/tokens.css +0 -72
- /package/dist/Components/Table/{Components → components}/HeaderActions.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/HeaderActions.js +0 -0
- /package/dist/Components/Table/{Components → components}/Pagination.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/Pagination.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableActions.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableActions.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableGroupRow.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableGroupRow.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableHeader.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableHeader.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableLoading.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableLoading.js +0 -0
- /package/dist/Components/Table/{Components → components}/TableSearch.d.ts +0 -0
- /package/dist/Components/Table/{Components → components}/TableSearch.js +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ActiveFilter, ColumnDef } from "../TableProps";
|
|
3
|
-
export interface ActiveFiltersProps<T> {
|
|
4
|
-
filters: ActiveFilter[];
|
|
5
|
-
columns: ColumnDef<T>[];
|
|
6
|
-
onRemove: (filter: ActiveFilter) => void;
|
|
7
|
-
onClearAll: () => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function ActiveFilters<T>({ filters, columns, onRemove, onClearAll, className, }: ActiveFiltersProps<T>): React.ReactElement | null;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ActiveFilters = ActiveFilters;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const lucide_react_1 = require("lucide-react");
|
|
39
|
-
const utils_1 = require("../../../lib/utils");
|
|
40
|
-
const badge_1 = require("../../ui/badge");
|
|
41
|
-
const button_1 = require("../../ui/button");
|
|
42
|
-
const filterUtils_1 = require("../utils/filterUtils");
|
|
43
|
-
function formatValue(value) {
|
|
44
|
-
if (value === null || value === undefined || value === "")
|
|
45
|
-
return "";
|
|
46
|
-
if (Array.isArray(value))
|
|
47
|
-
return value.map((v) => String(v)).join(", ");
|
|
48
|
-
if (value instanceof Date)
|
|
49
|
-
return value.toISOString().slice(0, 10);
|
|
50
|
-
return String(value);
|
|
51
|
-
}
|
|
52
|
-
function ActiveFilters({ filters, columns, onRemove, onClearAll, className, }) {
|
|
53
|
-
if (filters.length === 0)
|
|
54
|
-
return null;
|
|
55
|
-
return (React.createElement("div", { className: (0, utils_1.cn)("flex flex-wrap items-center gap-2 border-b border-border bg-card px-3 py-2 text-xs", className) },
|
|
56
|
-
React.createElement("span", { className: "text-muted-foreground" }, "Filters:"),
|
|
57
|
-
filters.map((filter, index) => {
|
|
58
|
-
const column = columns.find((c) => c.id === filter.columnId);
|
|
59
|
-
if (!column)
|
|
60
|
-
return null;
|
|
61
|
-
const valueLabel = formatValue(filter.value);
|
|
62
|
-
return (React.createElement(badge_1.Badge, { key: `${filter.columnId}-${index}`, variant: "secondary", size: "sm", className: "gap-1 pr-1" },
|
|
63
|
-
React.createElement("span", { className: "font-medium" }, column.header),
|
|
64
|
-
React.createElement("span", { className: "text-muted-foreground" }, filterUtils_1.OPERATOR_LABELS[filter.operator]),
|
|
65
|
-
valueLabel && React.createElement("span", null, valueLabel),
|
|
66
|
-
React.createElement("button", { type: "button", "aria-label": `Remove ${column.header} filter`, onClick: () => onRemove(filter), className: "ml-0.5 rounded-sm hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" },
|
|
67
|
-
React.createElement(lucide_react_1.X, { className: "h-3 w-3" }))));
|
|
68
|
-
}),
|
|
69
|
-
React.createElement(button_1.Button, { variant: "ghost", size: "sm", onClick: onClearAll, className: "ml-auto h-7 text-xs" }, "Clear all")));
|
|
70
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { BulkAction } from "../TableProps";
|
|
3
|
-
export interface BulkActionBarProps<T> {
|
|
4
|
-
selectedCount: number;
|
|
5
|
-
selectedKeys: (string | number)[];
|
|
6
|
-
selectedRows: T[];
|
|
7
|
-
actions: BulkAction<T>[];
|
|
8
|
-
onClear: () => void;
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function BulkActionBar<T>({ selectedCount, selectedKeys, selectedRows, actions, onClear, className, }: BulkActionBarProps<T>): React.ReactElement;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.BulkActionBar = BulkActionBar;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const framer_motion_1 = require("framer-motion");
|
|
39
|
-
const utils_1 = require("../../../lib/utils");
|
|
40
|
-
const button_1 = require("../../ui/button");
|
|
41
|
-
const dialog_1 = require("../../ui/dialog");
|
|
42
|
-
function BulkActionBar({ selectedCount, selectedKeys, selectedRows, actions, onClear, className, }) {
|
|
43
|
-
const [pending, setPending] = React.useState(null);
|
|
44
|
-
const runAction = (action) => {
|
|
45
|
-
action.onClick(selectedKeys, selectedRows);
|
|
46
|
-
};
|
|
47
|
-
const onClick = (action) => {
|
|
48
|
-
if (action.confirm) {
|
|
49
|
-
setPending({ action });
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
runAction(action);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
const confirmTitle = typeof (pending === null || pending === void 0 ? void 0 : pending.action.confirm) === "object" && (pending === null || pending === void 0 ? void 0 : pending.action.confirm.title)
|
|
56
|
-
? pending.action.confirm.title
|
|
57
|
-
: `Confirm ${pending === null || pending === void 0 ? void 0 : pending.action.label}`;
|
|
58
|
-
const confirmDescription = typeof (pending === null || pending === void 0 ? void 0 : pending.action.confirm) === "object"
|
|
59
|
-
? pending === null || pending === void 0 ? void 0 : pending.action.confirm.description
|
|
60
|
-
: `This will apply to ${selectedCount} ${selectedCount === 1 ? "row" : "rows"}.`;
|
|
61
|
-
return (React.createElement(React.Fragment, null,
|
|
62
|
-
React.createElement(framer_motion_1.AnimatePresence, { initial: false }, selectedCount > 0 && (React.createElement(framer_motion_1.motion.div, { key: "bulk-bar", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.18, ease: "easeOut" }, className: "overflow-hidden", role: "region", "aria-label": "Bulk actions" },
|
|
63
|
-
React.createElement("div", { "aria-live": "polite", className: (0, utils_1.cn)("flex flex-wrap items-center gap-3 border-b border-border bg-primary/10 px-3 py-2", className) },
|
|
64
|
-
React.createElement("span", { className: "text-sm font-medium text-foreground" },
|
|
65
|
-
selectedCount,
|
|
66
|
-
" ",
|
|
67
|
-
selectedCount === 1 ? "row" : "rows",
|
|
68
|
-
" selected"),
|
|
69
|
-
React.createElement("div", { className: "ml-auto flex flex-wrap items-center gap-2" },
|
|
70
|
-
actions.map((action) => (React.createElement(button_1.Button, { key: action.label, size: "sm", variant: action.variant === "destructive"
|
|
71
|
-
? "destructive"
|
|
72
|
-
: "outline", leftIcon: action.icon, onClick: () => onClick(action) }, action.label))),
|
|
73
|
-
React.createElement(button_1.Button, { size: "sm", variant: "ghost", onClick: onClear }, "Clear selection")))))),
|
|
74
|
-
React.createElement(dialog_1.Dialog, { open: pending !== null, onOpenChange: (open) => {
|
|
75
|
-
if (!open)
|
|
76
|
-
setPending(null);
|
|
77
|
-
} },
|
|
78
|
-
React.createElement(dialog_1.DialogContent, { size: "sm" },
|
|
79
|
-
React.createElement(dialog_1.DialogHeader, null,
|
|
80
|
-
React.createElement(dialog_1.DialogTitle, null, confirmTitle),
|
|
81
|
-
confirmDescription && (React.createElement(dialog_1.DialogDescription, null, confirmDescription))),
|
|
82
|
-
React.createElement(dialog_1.DialogFooter, null,
|
|
83
|
-
React.createElement(button_1.Button, { variant: "outline", onClick: () => setPending(null) }, "Cancel"),
|
|
84
|
-
React.createElement(button_1.Button, { variant: (pending === null || pending === void 0 ? void 0 : pending.action.variant) === "destructive"
|
|
85
|
-
? "destructive"
|
|
86
|
-
: "default", onClick: () => {
|
|
87
|
-
if (pending) {
|
|
88
|
-
runAction(pending.action);
|
|
89
|
-
setPending(null);
|
|
90
|
-
}
|
|
91
|
-
} }, pending === null || pending === void 0 ? void 0 : pending.action.label))))));
|
|
92
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface ColumnResizeHandleProps {
|
|
3
|
-
columnId: string;
|
|
4
|
-
isResizing: boolean;
|
|
5
|
-
onPointerDown: (columnId: string, event: React.PointerEvent<HTMLDivElement>) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function ColumnResizeHandle({ columnId, isResizing, onPointerDown, }: ColumnResizeHandleProps): React.ReactElement;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ColumnResizeHandle = ColumnResizeHandle;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const utils_1 = require("../../../lib/utils");
|
|
39
|
-
function ColumnResizeHandle({ columnId, isResizing, onPointerDown, }) {
|
|
40
|
-
return (React.createElement("div", { role: "separator", "aria-orientation": "vertical", "aria-label": "Resize column", onPointerDown: (event) => onPointerDown(columnId, event), onClick: (event) => event.stopPropagation(), className: (0, utils_1.cn)("absolute right-0 top-0 h-full w-1 cursor-col-resize select-none", "before:absolute before:inset-y-1 before:right-0 before:w-px before:bg-transparent", "hover:before:bg-primary", isResizing && "before:bg-primary") }));
|
|
41
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface PaginationProps {
|
|
3
|
-
pageIndex: number;
|
|
4
|
-
pageCount: number;
|
|
5
|
-
pageSize: number;
|
|
6
|
-
pageSizeOptions: number[];
|
|
7
|
-
totalRows: number;
|
|
8
|
-
onPageChange: (page: number) => void;
|
|
9
|
-
onPageSizeChange: (size: number) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare function Pagination({ pageIndex, pageCount, pageSize, pageSizeOptions, totalRows, onPageChange, onPageSizeChange, }: PaginationProps): React.ReactElement;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Pagination = Pagination;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const lucide_react_1 = require("lucide-react");
|
|
39
|
-
const utils_1 = require("../../../lib/utils");
|
|
40
|
-
const select_1 = require("../../ui/select");
|
|
41
|
-
const MAX_PAGE_NUMBERS = 7;
|
|
42
|
-
function pageNumbers(current, total) {
|
|
43
|
-
if (total <= MAX_PAGE_NUMBERS) {
|
|
44
|
-
return Array.from({ length: total }, (_, i) => i);
|
|
45
|
-
}
|
|
46
|
-
const result = [];
|
|
47
|
-
const left = Math.max(1, current - 1);
|
|
48
|
-
const right = Math.min(total - 2, current + 1);
|
|
49
|
-
result.push(0);
|
|
50
|
-
if (left > 1)
|
|
51
|
-
result.push("ellipsis");
|
|
52
|
-
for (let i = left; i <= right; i++)
|
|
53
|
-
result.push(i);
|
|
54
|
-
if (right < total - 2)
|
|
55
|
-
result.push("ellipsis");
|
|
56
|
-
result.push(total - 1);
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
function Pagination({ pageIndex, pageCount, pageSize, pageSizeOptions, totalRows, onPageChange, onPageSizeChange, }) {
|
|
60
|
-
const firstRow = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
|
|
61
|
-
const lastRow = Math.min(totalRows, (pageIndex + 1) * pageSize);
|
|
62
|
-
const numbers = pageNumbers(pageIndex, pageCount);
|
|
63
|
-
return (React.createElement("div", { className: "flex flex-wrap items-center justify-between gap-3 border-t border-border bg-card px-3 py-2 text-xs" },
|
|
64
|
-
React.createElement("div", { className: "flex items-center gap-2" },
|
|
65
|
-
React.createElement("span", { className: "text-muted-foreground" }, "Rows per page"),
|
|
66
|
-
React.createElement(select_1.SelectRoot, { value: String(pageSize), onValueChange: (value) => onPageSizeChange(Number(value)) },
|
|
67
|
-
React.createElement(select_1.SelectTrigger, { size: "sm", className: "h-7 w-[68px]" },
|
|
68
|
-
React.createElement(select_1.SelectValue, null)),
|
|
69
|
-
React.createElement(select_1.SelectContent, null, pageSizeOptions.map((option) => (React.createElement(select_1.SelectItem, { key: option, value: String(option) }, option)))))),
|
|
70
|
-
React.createElement("div", { className: "text-muted-foreground tabular-nums", "aria-live": "polite" }, totalRows === 0
|
|
71
|
-
? "No records"
|
|
72
|
-
: `Showing ${firstRow}–${lastRow} of ${totalRows.toLocaleString()}`),
|
|
73
|
-
React.createElement("nav", { className: "flex items-center gap-1", "aria-label": "Pagination" },
|
|
74
|
-
React.createElement(PageButton, { label: "First page", disabled: pageIndex === 0, onClick: () => onPageChange(0) },
|
|
75
|
-
React.createElement(lucide_react_1.ChevronsLeft, { className: "h-4 w-4" })),
|
|
76
|
-
React.createElement(PageButton, { label: "Previous page", disabled: pageIndex === 0, onClick: () => onPageChange(pageIndex - 1) },
|
|
77
|
-
React.createElement(lucide_react_1.ChevronLeft, { className: "h-4 w-4" })),
|
|
78
|
-
React.createElement("div", { className: "hidden items-center gap-1 sm:flex" }, numbers.map((value, index) => value === "ellipsis" ? (React.createElement("span", { key: `ellipsis-${index}`, className: "px-1 text-muted-foreground", "aria-hidden": "true" }, "\u2026")) : (React.createElement("button", { key: value, type: "button", "aria-current": value === pageIndex ? "page" : undefined, onClick: () => onPageChange(value), className: (0, utils_1.cn)("h-7 min-w-[28px] rounded-md px-2 text-xs transition-colors", "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", value === pageIndex &&
|
|
79
|
-
"bg-primary text-primary-foreground hover:bg-primary") }, value + 1)))),
|
|
80
|
-
React.createElement("span", { className: "text-muted-foreground sm:hidden" },
|
|
81
|
-
"Page ",
|
|
82
|
-
pageIndex + 1,
|
|
83
|
-
" of ",
|
|
84
|
-
pageCount),
|
|
85
|
-
React.createElement(PageButton, { label: "Next page", disabled: pageIndex >= pageCount - 1, onClick: () => onPageChange(pageIndex + 1) },
|
|
86
|
-
React.createElement(lucide_react_1.ChevronRight, { className: "h-4 w-4" })),
|
|
87
|
-
React.createElement(PageButton, { label: "Last page", disabled: pageIndex >= pageCount - 1, onClick: () => onPageChange(pageCount - 1) },
|
|
88
|
-
React.createElement(lucide_react_1.ChevronsRight, { className: "h-4 w-4" })))));
|
|
89
|
-
}
|
|
90
|
-
function PageButton({ label, disabled, onClick, children, }) {
|
|
91
|
-
return (React.createElement("button", { type: "button", "aria-label": label, disabled: disabled, onClick: onClick, className: (0, utils_1.cn)("inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors", "hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent") }, children));
|
|
92
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ColumnDef, RowKey } from "../TableProps";
|
|
3
|
-
import type { VirtualWindow } from "../hooks/useVirtualScroll";
|
|
4
|
-
export interface TableBodyProps<T> {
|
|
5
|
-
data: T[];
|
|
6
|
-
columns: ColumnDef<T>[];
|
|
7
|
-
rowKey: RowKey<T>;
|
|
8
|
-
columnWidths: Record<string, number>;
|
|
9
|
-
selectable: boolean;
|
|
10
|
-
selectedKeys: Set<string | number>;
|
|
11
|
-
onToggleSelect: (key: string | number, event: React.MouseEvent) => void;
|
|
12
|
-
onRowClick?: (row: T, event: React.MouseEvent) => void;
|
|
13
|
-
rowClassName?: (row: T) => string | undefined;
|
|
14
|
-
striped: boolean;
|
|
15
|
-
noBorders: boolean;
|
|
16
|
-
focusedRowIndex: number;
|
|
17
|
-
focusedColIndex: number;
|
|
18
|
-
onCellClick: (rowIndex: number, colIndex: number) => void;
|
|
19
|
-
isLoading: boolean;
|
|
20
|
-
loadingRowCount: number;
|
|
21
|
-
virtual: VirtualWindow;
|
|
22
|
-
}
|
|
23
|
-
export declare function TableBody<T>({ data, columns, rowKey, columnWidths, selectable, selectedKeys, onToggleSelect, onRowClick, rowClassName, striped, noBorders, focusedRowIndex, focusedColIndex, onCellClick, isLoading, loadingRowCount, virtual, }: TableBodyProps<T>): React.ReactElement;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TableBody = TableBody;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const utils_1 = require("../../../lib/utils");
|
|
39
|
-
const skeleton_1 = require("../../ui/skeleton");
|
|
40
|
-
const sortUtils_1 = require("../utils/sortUtils");
|
|
41
|
-
const TableRow_1 = require("./TableRow");
|
|
42
|
-
function TableBody({ data, columns, rowKey, columnWidths, selectable, selectedKeys, onToggleSelect, onRowClick, rowClassName, striped, noBorders, focusedRowIndex, focusedColIndex, onCellClick, isLoading, loadingRowCount, virtual, }) {
|
|
43
|
-
if (isLoading) {
|
|
44
|
-
return (React.createElement("tbody", null, Array.from({ length: loadingRowCount }).map((_, index) => (React.createElement("tr", { key: `skeleton-${index}` },
|
|
45
|
-
selectable && (React.createElement("td", { className: "h-[var(--row-height)] w-10 border-b border-border px-2 align-middle" },
|
|
46
|
-
React.createElement(skeleton_1.Skeleton, { variant: "rectangle", className: "h-4 w-4 rounded-sm" }))),
|
|
47
|
-
columns.map((column) => {
|
|
48
|
-
var _a;
|
|
49
|
-
return (React.createElement("td", { key: column.id, className: "h-[var(--row-height)] border-b border-border px-3 align-middle", style: { width: (_a = columnWidths[column.id]) !== null && _a !== void 0 ? _a : column.width } },
|
|
50
|
-
React.createElement(skeleton_1.Skeleton, { variant: "text", className: (0, utils_1.cn)("h-3", index % 3 === 0
|
|
51
|
-
? "w-1/2"
|
|
52
|
-
: index % 3 === 1
|
|
53
|
-
? "w-3/4"
|
|
54
|
-
: "w-2/5") })));
|
|
55
|
-
}))))));
|
|
56
|
-
}
|
|
57
|
-
const window = virtual.active ? data.slice(virtual.startIndex, virtual.endIndex) : data;
|
|
58
|
-
const offset = virtual.active ? virtual.startIndex : 0;
|
|
59
|
-
return (React.createElement("tbody", null,
|
|
60
|
-
virtual.active && virtual.paddingTop > 0 && (React.createElement("tr", { "aria-hidden": "true", style: { height: virtual.paddingTop } },
|
|
61
|
-
React.createElement("td", { colSpan: (selectable ? 1 : 0) + columns.length }))),
|
|
62
|
-
window.map((row, idx) => {
|
|
63
|
-
const rowIndex = offset + idx;
|
|
64
|
-
const key = (0, sortUtils_1.resolveRowKey)(row, rowKey);
|
|
65
|
-
return (React.createElement(TableRow_1.TableRow, { key: key, row: row, rowKey: key, rowIndex: rowIndex, columns: columns, columnWidths: columnWidths, selectable: selectable, selected: selectedKeys.has(key), onToggleSelect: onToggleSelect, onRowClick: onRowClick, rowClassName: rowClassName, focusedColIndex: focusedRowIndex === rowIndex ? focusedColIndex : -1, onCellClick: (colIndex) => onCellClick(rowIndex, colIndex), striped: striped, noBorders: noBorders }));
|
|
66
|
-
}),
|
|
67
|
-
virtual.active && virtual.paddingBottom > 0 && (React.createElement("tr", { "aria-hidden": "true", style: { height: virtual.paddingBottom } },
|
|
68
|
-
React.createElement("td", { colSpan: (selectable ? 1 : 0) + columns.length })))));
|
|
69
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ColumnDef } from "../TableProps";
|
|
3
|
-
export interface TableCellProps<T> {
|
|
4
|
-
column: ColumnDef<T>;
|
|
5
|
-
value: unknown;
|
|
6
|
-
row: T;
|
|
7
|
-
width?: number;
|
|
8
|
-
/** Sticky offset in px when the column is sticky. */
|
|
9
|
-
stickyOffset?: number;
|
|
10
|
-
isFocused?: boolean;
|
|
11
|
-
onClick?: (event: React.MouseEvent<HTMLTableCellElement>) => void;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const TableCell: <T>(props: TableCellProps<T>) => React.ReactElement;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TableCell = void 0;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const utils_1 = require("../../../lib/utils");
|
|
39
|
-
function TableCellImpl({ column, value, row, width, stickyOffset, isFocused, onClick, className, }) {
|
|
40
|
-
const content = column.cell ? column.cell(value, row) : formatPrimitive(value);
|
|
41
|
-
const isSticky = !!column.sticky;
|
|
42
|
-
const title = column.cell || typeof content !== "string"
|
|
43
|
-
? undefined
|
|
44
|
-
: content;
|
|
45
|
-
return (React.createElement("td", { "data-column-id": column.id, role: "gridcell", onClick: onClick, tabIndex: isFocused ? 0 : -1, title: title, style: Object.assign({ width, minWidth: width, maxWidth: width }, (isSticky
|
|
46
|
-
? {
|
|
47
|
-
position: "sticky",
|
|
48
|
-
[column.sticky === "left" ? "left" : "right"]: stickyOffset !== null && stickyOffset !== void 0 ? stickyOffset : 0,
|
|
49
|
-
zIndex: 1,
|
|
50
|
-
}
|
|
51
|
-
: {})), className: (0, utils_1.cn)("h-[var(--row-height)] truncate border-b border-border px-3 align-middle text-sm text-foreground", isSticky && "bg-card", column.align === "center" && "text-center", column.align === "right" && "text-right", isFocused && "outline outline-2 outline-ring outline-offset-[-2px]", className) }, content));
|
|
52
|
-
}
|
|
53
|
-
function formatPrimitive(value) {
|
|
54
|
-
if (value === null || value === undefined) {
|
|
55
|
-
return React.createElement("span", { className: "text-muted-foreground" }, "\u2014");
|
|
56
|
-
}
|
|
57
|
-
if (typeof value === "boolean")
|
|
58
|
-
return value ? "Yes" : "No";
|
|
59
|
-
if (value instanceof Date)
|
|
60
|
-
return value.toLocaleDateString();
|
|
61
|
-
return String(value);
|
|
62
|
-
}
|
|
63
|
-
exports.TableCell = React.memo(TableCellImpl);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface TableEmptyStateProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
hasActiveFilters?: boolean;
|
|
6
|
-
onClearFilters?: () => void;
|
|
7
|
-
action?: {
|
|
8
|
-
label: string;
|
|
9
|
-
onClick: () => void;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare function TableEmptyState({ title, description, hasActiveFilters, onClearFilters, action, }: TableEmptyStateProps): React.ReactElement;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TableEmptyState = TableEmptyState;
|
|
37
|
-
const React = __importStar(require("react"));
|
|
38
|
-
const lucide_react_1 = require("lucide-react");
|
|
39
|
-
const button_1 = require("../../ui/button");
|
|
40
|
-
function TableEmptyState({ title, description, hasActiveFilters = false, onClearFilters, action, }) {
|
|
41
|
-
if (hasActiveFilters) {
|
|
42
|
-
return (React.createElement("div", { role: "status", className: "flex flex-col items-center justify-center gap-3 px-6 py-12 text-center" },
|
|
43
|
-
React.createElement(lucide_react_1.SearchX, { "aria-hidden": "true", className: "h-10 w-10 text-muted-foreground" }),
|
|
44
|
-
React.createElement("div", { className: "space-y-1" },
|
|
45
|
-
React.createElement("p", { className: "text-sm font-medium text-foreground" }, "No results match your filters"),
|
|
46
|
-
React.createElement("p", { className: "text-sm text-muted-foreground" }, "Try adjusting or clearing the filters to see more rows.")),
|
|
47
|
-
onClearFilters && (React.createElement(button_1.Button, { variant: "outline", size: "sm", onClick: onClearFilters }, "Clear filters"))));
|
|
48
|
-
}
|
|
49
|
-
return (React.createElement("div", { role: "status", className: "flex flex-col items-center justify-center gap-3 px-6 py-12 text-center" },
|
|
50
|
-
React.createElement(lucide_react_1.Inbox, { "aria-hidden": "true", className: "h-10 w-10 text-muted-foreground" }),
|
|
51
|
-
React.createElement("div", { className: "space-y-1" },
|
|
52
|
-
React.createElement("p", { className: "text-sm font-medium text-foreground" }, title !== null && title !== void 0 ? title : "No data to display"),
|
|
53
|
-
description && (React.createElement("p", { className: "text-sm text-muted-foreground" }, description))),
|
|
54
|
-
action && (React.createElement(button_1.Button, { size: "sm", onClick: action.onClick }, action.label))));
|
|
55
|
-
}
|