@alaarab/ogrid-react-fluent 2.1.2 → 2.1.4
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/dist/esm/index.css +1278 -0
- package/dist/esm/index.js +1166 -11
- package/dist/types/OGrid/OGrid.d.ts +1 -1
- package/dist/types/index.d.ts +40 -1
- package/package.json +4 -4
- package/dist/esm/ColumnChooser/ColumnChooser.js +0 -34
- package/dist/esm/ColumnChooser/ColumnChooser.module.css +0 -50
- package/dist/esm/ColumnHeaderFilter/ColumnHeaderFilter.js +0 -30
- package/dist/esm/ColumnHeaderFilter/ColumnHeaderFilter.module.css +0 -412
- package/dist/esm/ColumnHeaderFilter/MultiSelectFilterPopover.js +0 -17
- package/dist/esm/ColumnHeaderFilter/PeopleFilterPopover.js +0 -18
- package/dist/esm/ColumnHeaderFilter/TextFilterPopover.js +0 -11
- package/dist/esm/ColumnHeaderFilter/index.js +0 -1
- package/dist/esm/ColumnHeaderMenu/ColumnHeaderMenu.js +0 -12
- package/dist/esm/ColumnHeaderMenu/ColumnHeaderMenu.module.css +0 -46
- package/dist/esm/ColumnHeaderMenu/index.js +0 -1
- package/dist/esm/DataGridTable/DataGridTable.js +0 -116
- package/dist/esm/DataGridTable/DataGridTable.module.css +0 -845
- package/dist/esm/DataGridTable/DropIndicator.js +0 -6
- package/dist/esm/DataGridTable/EmptyState.js +0 -14
- package/dist/esm/DataGridTable/GridContextMenu.js +0 -13
- package/dist/esm/DataGridTable/InlineCellEditor.js +0 -6
- package/dist/esm/DataGridTable/LoadingOverlay.js +0 -12
- package/dist/esm/DataGridTable/StatusBar.js +0 -12
- package/dist/esm/OGrid/OGrid.js +0 -9
- package/dist/esm/OGrid/index.js +0 -1
- package/dist/esm/PaginationControls/PaginationControls.js +0 -26
- package/dist/esm/PaginationControls/PaginationControls.module.css +0 -74
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BaseDropIndicator } from '@alaarab/ogrid-react';
|
|
3
|
-
import styles from './DataGridTable.module.css';
|
|
4
|
-
export function DropIndicator({ dropIndicatorX, wrapperLeft }) {
|
|
5
|
-
return _jsx(BaseDropIndicator, { dropIndicatorX: dropIndicatorX, wrapperLeft: wrapperLeft, className: styles.dropIndicator });
|
|
6
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BaseEmptyState } from '@alaarab/ogrid-react';
|
|
3
|
-
import styles from './DataGridTable.module.css';
|
|
4
|
-
const classNames = {
|
|
5
|
-
emptyStateInGrid: styles.emptyStateInGrid,
|
|
6
|
-
emptyStateInGridInner: styles.emptyStateInGridMessageSticky,
|
|
7
|
-
emptyStateInGridIcon: styles.emptyStateInGridIcon,
|
|
8
|
-
emptyStateInGridTitle: styles.emptyStateInGridTitle,
|
|
9
|
-
emptyStateInGridMessage: styles.emptyStateInGridMessage,
|
|
10
|
-
emptyStateInGridLink: styles.emptyStateInGridLink,
|
|
11
|
-
};
|
|
12
|
-
export function EmptyState({ emptyState }) {
|
|
13
|
-
return _jsx(BaseEmptyState, { emptyState: emptyState, classNames: classNames, icon: '\uD83D\uDCCB' });
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { GridContextMenu as BaseGridContextMenu } from '@alaarab/ogrid-react';
|
|
3
|
-
import styles from './DataGridTable.module.css';
|
|
4
|
-
const classNames = {
|
|
5
|
-
contextMenu: styles.contextMenu,
|
|
6
|
-
contextMenuItem: styles.contextMenuItem,
|
|
7
|
-
contextMenuItemLabel: styles.contextMenuItemLabel,
|
|
8
|
-
contextMenuItemShortcut: styles.contextMenuItemShortcut,
|
|
9
|
-
contextMenuDivider: styles.contextMenuDivider,
|
|
10
|
-
};
|
|
11
|
-
export function GridContextMenu(props) {
|
|
12
|
-
return _jsx(BaseGridContextMenu, { ...props, classNames: classNames });
|
|
13
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Checkbox } from '@fluentui/react-components';
|
|
3
|
-
import { BaseInlineCellEditor } from '@alaarab/ogrid-react';
|
|
4
|
-
export function InlineCellEditor(props) {
|
|
5
|
-
return (_jsx(BaseInlineCellEditor, { ...props, renderCheckbox: (checked, onCommit, onCancel) => (_jsx(Checkbox, { checked: checked, onChange: (_, data) => onCommit(!!data.checked), onKeyDown: (e) => e.key === 'Escape' && (e.preventDefault(), onCancel()) })) }));
|
|
6
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BaseLoadingOverlay } from '@alaarab/ogrid-react';
|
|
3
|
-
import styles from './DataGridTable.module.css';
|
|
4
|
-
const classNames = {
|
|
5
|
-
loadingOverlay: styles.loadingOverlay,
|
|
6
|
-
loadingOverlayContent: styles.loadingOverlayContent,
|
|
7
|
-
spinner: styles.spinner,
|
|
8
|
-
loadingOverlayText: styles.loadingOverlayText,
|
|
9
|
-
};
|
|
10
|
-
export function LoadingOverlay({ message }) {
|
|
11
|
-
return _jsx(BaseLoadingOverlay, { message: message, classNames: classNames });
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StatusBar as BaseStatusBar } from '@alaarab/ogrid-react';
|
|
3
|
-
import styles from './DataGridTable.module.css';
|
|
4
|
-
const statusBarClassNames = {
|
|
5
|
-
statusBar: styles.statusBar,
|
|
6
|
-
statusBarItem: styles.statusBarItem,
|
|
7
|
-
statusBarLabel: styles.statusBarLabel,
|
|
8
|
-
statusBarValue: styles.statusBarValue,
|
|
9
|
-
};
|
|
10
|
-
export function StatusBar(props) {
|
|
11
|
-
return _jsx(BaseStatusBar, { ...props, classNames: statusBarClassNames });
|
|
12
|
-
}
|
package/dist/esm/OGrid/OGrid.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createOGrid } from '@alaarab/ogrid-react';
|
|
2
|
-
import { DataGridTable } from '../DataGridTable/DataGridTable';
|
|
3
|
-
import { ColumnChooser } from '../ColumnChooser/ColumnChooser';
|
|
4
|
-
import { PaginationControls } from '../PaginationControls/PaginationControls';
|
|
5
|
-
export const OGrid = createOGrid({
|
|
6
|
-
DataGridTable: DataGridTable,
|
|
7
|
-
ColumnChooser: ColumnChooser,
|
|
8
|
-
PaginationControls,
|
|
9
|
-
});
|
package/dist/esm/OGrid/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { OGrid } from './OGrid';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button, Select } from '@fluentui/react-components';
|
|
4
|
-
import { ChevronLeftRegular, ChevronRightRegular, ChevronDoubleLeftRegular, ChevronDoubleRightRegular, } from '@fluentui/react-icons';
|
|
5
|
-
import { usePaginationControls } from '@alaarab/ogrid-react';
|
|
6
|
-
import styles from './PaginationControls.module.css';
|
|
7
|
-
export const PaginationControls = React.memo((props) => {
|
|
8
|
-
const { currentPage, pageSize, totalCount, onPageChange, onPageSizeChange, pageSizeOptions, entityLabelPlural, className } = props;
|
|
9
|
-
const { labelPlural, vm, handlePageSizeChange } = usePaginationControls({
|
|
10
|
-
currentPage,
|
|
11
|
-
pageSize,
|
|
12
|
-
totalCount,
|
|
13
|
-
onPageChange,
|
|
14
|
-
onPageSizeChange,
|
|
15
|
-
pageSizeOptions,
|
|
16
|
-
entityLabelPlural,
|
|
17
|
-
});
|
|
18
|
-
const handlePageSizeChangeEvent = (_e, data) => {
|
|
19
|
-
handlePageSizeChange(Number(data.value));
|
|
20
|
-
};
|
|
21
|
-
if (!vm) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
const { pageNumbers, showStartEllipsis, showEndEllipsis, totalPages, startItem, endItem } = vm;
|
|
25
|
-
return (_jsxs("div", { className: `${styles.pagination} ${className || ''}`, role: "navigation", "aria-label": "Pagination", children: [_jsxs("div", { className: styles.paginationInfo, children: ["Showing ", startItem, " to ", endItem, " of ", totalCount.toLocaleString(), " ", labelPlural] }), _jsxs("div", { className: styles.paginationControls, children: [_jsx(Button, { appearance: "outline", shape: "circular", size: "small", icon: _jsx(ChevronDoubleLeftRegular, {}), onClick: () => onPageChange(1), disabled: currentPage === 1, "aria-label": "First page", className: styles.navBtn }), _jsx(Button, { appearance: "outline", shape: "circular", size: "small", icon: _jsx(ChevronLeftRegular, {}), onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, "aria-label": "Previous page", className: styles.navBtn }), _jsxs("div", { className: styles.pageNumbers, children: [showStartEllipsis && (_jsxs(_Fragment, { children: [_jsx(Button, { appearance: "outline", size: "small", shape: "rounded", onClick: () => onPageChange(1), "aria-label": "Page 1", className: styles.pageBtn, children: "1" }), _jsx("span", { className: styles.ellipsis, "aria-hidden": true, children: "\u2026" })] })), pageNumbers.map((pageNum) => (_jsx(Button, { appearance: currentPage === pageNum ? 'primary' : 'outline', size: "small", shape: "rounded", onClick: () => onPageChange(pageNum), "aria-label": `Page ${pageNum}`, "aria-current": currentPage === pageNum ? 'page' : undefined, className: styles.pageBtn, children: pageNum }, pageNum))), showEndEllipsis && (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.ellipsis, "aria-hidden": true, children: "\u2026" }), _jsx(Button, { appearance: "outline", size: "small", shape: "rounded", onClick: () => onPageChange(totalPages), "aria-label": `Page ${totalPages}`, className: styles.pageBtn, children: totalPages })] }))] }), _jsx(Button, { appearance: "outline", shape: "circular", size: "small", icon: _jsx(ChevronRightRegular, {}), onClick: () => onPageChange(currentPage + 1), disabled: currentPage >= totalPages, "aria-label": "Next page", className: styles.navBtn }), _jsx(Button, { appearance: "outline", shape: "circular", size: "small", icon: _jsx(ChevronDoubleRightRegular, {}), onClick: () => onPageChange(totalPages), disabled: currentPage >= totalPages, "aria-label": "Last page", className: styles.navBtn })] }), _jsxs("div", { className: styles.pageSizeSelector, children: [_jsx("span", { className: styles.pageSizeLabel, children: "Rows" }), _jsx(Select, { value: String(pageSize), onChange: handlePageSizeChangeEvent, size: "small", appearance: "outline", "aria-label": "Rows per page", className: styles.pageSizeSelect, children: vm.pageSizeOptions.map((n) => (_jsx("option", { value: n, children: n }, n))) })] })] }));
|
|
26
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
.pagination {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: space-between;
|
|
6
|
-
gap: 14px 24px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
min-width: 0;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
padding: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.paginationInfo {
|
|
14
|
-
font-size: 13px;
|
|
15
|
-
color: var(--colorNeutralForeground2, #605e5c);
|
|
16
|
-
flex-shrink: 0;
|
|
17
|
-
font-variant-numeric: tabular-nums;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.paginationControls {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
gap: 4px;
|
|
24
|
-
flex-wrap: wrap;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
min-width: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.navBtn {
|
|
31
|
-
min-width: 28px;
|
|
32
|
-
min-height: 28px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.pageNumbers {
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
gap: 4px;
|
|
39
|
-
margin: 0 8px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.pageBtn {
|
|
43
|
-
min-width: 28px;
|
|
44
|
-
min-height: 28px;
|
|
45
|
-
font-variant-numeric: tabular-nums;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.ellipsis {
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: center;
|
|
52
|
-
min-width: 24px;
|
|
53
|
-
font-size: 12px;
|
|
54
|
-
color: var(--colorNeutralForeground3, #8a8886);
|
|
55
|
-
user-select: none;
|
|
56
|
-
pointer-events: none;
|
|
57
|
-
letter-spacing: 0.02em;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.pageSizeSelector {
|
|
61
|
-
display: inline-flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
gap: 8px;
|
|
64
|
-
flex-shrink: 0;
|
|
65
|
-
}
|
|
66
|
-
.pageSizeSelector .pageSizeLabel {
|
|
67
|
-
font-size: 13px;
|
|
68
|
-
color: var(--colorNeutralForeground2, #605e5c);
|
|
69
|
-
user-select: none;
|
|
70
|
-
white-space: nowrap;
|
|
71
|
-
}
|
|
72
|
-
.pageSizeSelector .pageSizeSelect {
|
|
73
|
-
min-width: 72px;
|
|
74
|
-
}
|