@alaarab/ogrid-react-fluent 2.1.9 → 2.1.11
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 +278 -256
- package/dist/esm/index.js +122 -118
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './index.css';
|
|
1
2
|
import { useColumnHeaderFilterState, getColumnHeaderFilterStateParams, DateFilterContent, renderFilterContent, areGridRowPropsEqual, usePaginationControls, createOGrid, useListVirtualizer, STOP_PROPAGATION, useDataGridTableOrchestration, useColumnMeta, getCellRenderDescriptor, buildInlineEditorProps, buildPopoverEditorProps, POPOVER_ANCHOR_STYLE, resolveCellDisplayContent, resolveCellStyle, getCellInteractionProps, CURSOR_CELL_STYLE, CellErrorBoundary, GRID_ROOT_STYLE, PREVENT_DEFAULT, getHeaderFilterConfig, MarchingAntsOverlay, NOOP, useColumnChooserState, BaseInlineCellEditor, BaseDropIndicator, BaseEmptyState, GridContextMenu as GridContextMenu$1, BaseColumnHeaderMenu, StatusBar as StatusBar$1, BaseLoadingOverlay } from '@alaarab/ogrid-react';
|
|
2
3
|
export { BaseColumnHeaderMenu, BaseDropIndicator, BaseEmptyState, BaseInlineCellEditor, BaseLoadingOverlay, CELL_PADDING, CHECKBOX_COLUMN_WIDTH, COLUMN_HEADER_MENU_ITEMS, CURSOR_CELL_STYLE, CellErrorBoundary, DEFAULT_MIN_COLUMN_WIDTH, DateFilterContent, EmptyState, GRID_BORDER_RADIUS, GRID_CONTEXT_MENU_ITEMS, GRID_ROOT_STYLE, GridContextMenu, MAX_PAGE_BUTTONS, MarchingAntsOverlay, NOOP, OGridLayout, PAGE_SIZE_OPTIONS, POPOVER_ANCHOR_STYLE, PREVENT_DEFAULT, ROW_NUMBER_COLUMN_WIDTH, STOP_PROPAGATION, SideBar, StatusBar, UndoRedoStack, areGridRowPropsEqual, booleanParser, buildCsvHeader, buildCsvRows, buildHeaderRows, buildInlineEditorProps, buildPopoverEditorProps, clampSelectionToBounds, computeAggregations, computeAutoScrollSpeed, computeTabNavigation, createOGrid, currencyParser, dateParser, deriveFilterOptionsFromData, editorInputStyle, editorWrapperStyle, emailParser, escapeCsvValue, exportToCsv, findCtrlArrowTarget, flattenColumns, formatCellValueForTsv, formatSelectionAsTsv, formatShortcut, getCellInteractionProps, getCellRenderDescriptor, getCellValue, getColumnHeaderFilterStateParams, getColumnHeaderMenuItems, getContextMenuHandlers, getDataGridStatusBarConfig, getDateFilterContentProps, getFilterField, getHeaderFilterConfig, getMultiSelectFilterFields, getPaginationViewModel, getStatusBarParts, isInSelectionRange, isRowInRange, mergeFilter, normalizeSelectionRange, numberParser, parseTsvClipboard, parseValue, processClientSideData, rangesEqual, renderFilterContent, resolveCellDisplayContent, resolveCellStyle, richSelectDropdownStyle, richSelectNoMatchesStyle, richSelectOptionHighlightedStyle, richSelectOptionStyle, richSelectWrapperStyle, selectChevronStyle, selectDisplayStyle, selectEditorStyle, toUserLike, triggerCsvDownload, useActiveCell, useCellEditing, useCellSelection, useClipboard, useColumnChooserState, useColumnHeaderFilterState, useColumnMeta, useColumnReorder, useColumnResize, useContextMenu, useDataGridState, useDataGridTableOrchestration, useDateFilterState, useDebounce, useFillHandle, useFilterOptions, useInlineCellEditorState, useKeyboardNavigation, useLatestRef, useListVirtualizer, useMultiSelectFilterState, useOGrid, usePaginationControls, usePeopleFilterState, useRichSelectState, useRowSelection, useSelectState, useSideBarState, useTableLayout, useTextFilterState, useUndoRedo, useVirtualScroll } from '@alaarab/ogrid-react';
|
|
3
4
|
import * as React from 'react';
|
|
@@ -7,48 +8,46 @@ import { Popover, PopoverSurface, Button, Select, TableRow, TableCell, Checkbox,
|
|
|
7
8
|
import { FilterRegular, ChevronDoubleLeftRegular, ChevronLeftRegular, ChevronRightRegular, ChevronDoubleRightRegular, SearchRegular, ChevronUpRegular, ChevronDownRegular, TableSettingsRegular } from '@fluentui/react-icons';
|
|
8
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
|
-
// src/OGrid/OGrid.tsx
|
|
11
|
-
|
|
12
11
|
// src/ColumnHeaderFilter/ColumnHeaderFilter.module.scss
|
|
13
12
|
var ColumnHeaderFilter_module_default = {
|
|
14
|
-
columnHeader: "
|
|
15
|
-
headerContent: "
|
|
16
|
-
columnName: "
|
|
17
|
-
headerActions: "
|
|
18
|
-
filterIcon: "
|
|
19
|
-
filterActive: "
|
|
20
|
-
filterOpen: "
|
|
21
|
-
filterBadge: "
|
|
22
|
-
filterPopover: "
|
|
23
|
-
popoverHeader: "
|
|
24
|
-
popoverSearch: "
|
|
25
|
-
nativeInputWrapper: "
|
|
26
|
-
nativeInputIcon: "
|
|
27
|
-
nativeInput: "
|
|
28
|
-
resultCount: "
|
|
29
|
-
selectAllRow: "
|
|
30
|
-
selectAllButton: "
|
|
31
|
-
popoverOptions: "
|
|
32
|
-
popoverOption: "
|
|
33
|
-
nativeCheckbox: "
|
|
34
|
-
checkboxLabel: "
|
|
35
|
-
personOption: "
|
|
36
|
-
loadingContainer: "
|
|
37
|
-
filterSpinner: "
|
|
38
|
-
noResults: "
|
|
39
|
-
selectedUserSection: "
|
|
40
|
-
selectedUserLabel: "
|
|
41
|
-
selectedUser: "
|
|
42
|
-
userInfo: "
|
|
43
|
-
avatar: "
|
|
44
|
-
avatarImg: "
|
|
45
|
-
avatarInitials: "
|
|
46
|
-
userText: "
|
|
47
|
-
userSecondary: "
|
|
48
|
-
removeUserButton: "
|
|
49
|
-
popoverActions: "
|
|
50
|
-
clearButton: "
|
|
51
|
-
applyButton: "
|
|
13
|
+
"columnHeader": "ogrid-fluent__ColumnHeaderFilter-module__columnHeader",
|
|
14
|
+
"headerContent": "ogrid-fluent__ColumnHeaderFilter-module__headerContent",
|
|
15
|
+
"columnName": "ogrid-fluent__ColumnHeaderFilter-module__columnName",
|
|
16
|
+
"headerActions": "ogrid-fluent__ColumnHeaderFilter-module__headerActions",
|
|
17
|
+
"filterIcon": "ogrid-fluent__ColumnHeaderFilter-module__filterIcon",
|
|
18
|
+
"filterActive": "ogrid-fluent__ColumnHeaderFilter-module__filterActive",
|
|
19
|
+
"filterOpen": "ogrid-fluent__ColumnHeaderFilter-module__filterOpen",
|
|
20
|
+
"filterBadge": "ogrid-fluent__ColumnHeaderFilter-module__filterBadge",
|
|
21
|
+
"filterPopover": "ogrid-fluent__ColumnHeaderFilter-module__filterPopover",
|
|
22
|
+
"popoverHeader": "ogrid-fluent__ColumnHeaderFilter-module__popoverHeader",
|
|
23
|
+
"popoverSearch": "ogrid-fluent__ColumnHeaderFilter-module__popoverSearch",
|
|
24
|
+
"nativeInputWrapper": "ogrid-fluent__ColumnHeaderFilter-module__nativeInputWrapper",
|
|
25
|
+
"nativeInputIcon": "ogrid-fluent__ColumnHeaderFilter-module__nativeInputIcon",
|
|
26
|
+
"nativeInput": "ogrid-fluent__ColumnHeaderFilter-module__nativeInput",
|
|
27
|
+
"resultCount": "ogrid-fluent__ColumnHeaderFilter-module__resultCount",
|
|
28
|
+
"selectAllRow": "ogrid-fluent__ColumnHeaderFilter-module__selectAllRow",
|
|
29
|
+
"selectAllButton": "ogrid-fluent__ColumnHeaderFilter-module__selectAllButton",
|
|
30
|
+
"popoverOptions": "ogrid-fluent__ColumnHeaderFilter-module__popoverOptions",
|
|
31
|
+
"popoverOption": "ogrid-fluent__ColumnHeaderFilter-module__popoverOption",
|
|
32
|
+
"nativeCheckbox": "ogrid-fluent__ColumnHeaderFilter-module__nativeCheckbox",
|
|
33
|
+
"checkboxLabel": "ogrid-fluent__ColumnHeaderFilter-module__checkboxLabel",
|
|
34
|
+
"personOption": "ogrid-fluent__ColumnHeaderFilter-module__personOption",
|
|
35
|
+
"loadingContainer": "ogrid-fluent__ColumnHeaderFilter-module__loadingContainer",
|
|
36
|
+
"filterSpinner": "ogrid-fluent__ColumnHeaderFilter-module__filterSpinner",
|
|
37
|
+
"noResults": "ogrid-fluent__ColumnHeaderFilter-module__noResults",
|
|
38
|
+
"selectedUserSection": "ogrid-fluent__ColumnHeaderFilter-module__selectedUserSection",
|
|
39
|
+
"selectedUserLabel": "ogrid-fluent__ColumnHeaderFilter-module__selectedUserLabel",
|
|
40
|
+
"selectedUser": "ogrid-fluent__ColumnHeaderFilter-module__selectedUser",
|
|
41
|
+
"userInfo": "ogrid-fluent__ColumnHeaderFilter-module__userInfo",
|
|
42
|
+
"avatar": "ogrid-fluent__ColumnHeaderFilter-module__avatar",
|
|
43
|
+
"avatarImg": "ogrid-fluent__ColumnHeaderFilter-module__avatarImg",
|
|
44
|
+
"avatarInitials": "ogrid-fluent__ColumnHeaderFilter-module__avatarInitials",
|
|
45
|
+
"userText": "ogrid-fluent__ColumnHeaderFilter-module__userText",
|
|
46
|
+
"userSecondary": "ogrid-fluent__ColumnHeaderFilter-module__userSecondary",
|
|
47
|
+
"removeUserButton": "ogrid-fluent__ColumnHeaderFilter-module__removeUserButton",
|
|
48
|
+
"popoverActions": "ogrid-fluent__ColumnHeaderFilter-module__popoverActions",
|
|
49
|
+
"clearButton": "ogrid-fluent__ColumnHeaderFilter-module__clearButton",
|
|
50
|
+
"applyButton": "ogrid-fluent__ColumnHeaderFilter-module__applyButton"
|
|
52
51
|
};
|
|
53
52
|
var TextFilterPopover = ({
|
|
54
53
|
value,
|
|
@@ -365,6 +364,8 @@ var ColumnHeaderFilter = React.memo((props) => {
|
|
|
365
364
|
className: `${ColumnHeaderFilter_module_default.filterIcon} ${hasActiveFilter ? ColumnHeaderFilter_module_default.filterActive : ""} ${isFilterOpen ? ColumnHeaderFilter_module_default.filterOpen : ""}`,
|
|
366
365
|
onClick: handlers.handleFilterIconClick,
|
|
367
366
|
"aria-label": `Filter ${columnName}`,
|
|
367
|
+
"aria-expanded": isFilterOpen,
|
|
368
|
+
"aria-haspopup": "dialog",
|
|
368
369
|
title: `Filter ${columnName}`,
|
|
369
370
|
children: [
|
|
370
371
|
/* @__PURE__ */ jsx(FilterRegular, {}),
|
|
@@ -406,9 +407,9 @@ ColumnHeaderFilter.displayName = "ColumnHeaderFilter";
|
|
|
406
407
|
|
|
407
408
|
// src/ColumnHeaderMenu/ColumnHeaderMenu.module.scss
|
|
408
409
|
var ColumnHeaderMenu_module_default = {
|
|
409
|
-
content: "
|
|
410
|
-
item: "
|
|
411
|
-
separator: "
|
|
410
|
+
"content": "ogrid-fluent__ColumnHeaderMenu-module__content",
|
|
411
|
+
"item": "ogrid-fluent__ColumnHeaderMenu-module__item",
|
|
412
|
+
"separator": "ogrid-fluent__ColumnHeaderMenu-module__separator"
|
|
412
413
|
};
|
|
413
414
|
var getFluentPortalTarget = (anchorElement) => anchorElement.closest(".fui-FluentProvider") ?? document.body;
|
|
414
415
|
function ColumnHeaderMenu(props) {
|
|
@@ -440,58 +441,58 @@ function InlineCellEditor(props) {
|
|
|
440
441
|
|
|
441
442
|
// src/DataGridTable/DataGridTable.module.scss
|
|
442
443
|
var DataGridTable_module_default = {
|
|
443
|
-
tableScrollContent: "
|
|
444
|
-
tableWidthAnchor: "
|
|
445
|
-
tableWrapper: "
|
|
446
|
-
dataTable: "
|
|
447
|
-
groupHeaderCell: "
|
|
448
|
-
headerCellContent: "
|
|
449
|
-
headerMenuTrigger: "
|
|
450
|
-
dropIndicator: "
|
|
451
|
-
resizeHandle: "
|
|
452
|
-
pinnedColLeft: "
|
|
453
|
-
pinnedColRight: "
|
|
454
|
-
cellContent: "
|
|
455
|
-
activeCellContent: "
|
|
456
|
-
editingCellContent: "
|
|
457
|
-
cellInRange: "
|
|
458
|
-
cellCut: "
|
|
459
|
-
fillHandle: "
|
|
460
|
-
selectionHeaderCellInner: "
|
|
461
|
-
selectionCellInner: "
|
|
462
|
-
rowNumberHeaderCellInner: "
|
|
463
|
-
rowNumberCellInner: "
|
|
464
|
-
statusBar: "
|
|
465
|
-
statusBarItem: "
|
|
466
|
-
statusBarLabel: "
|
|
467
|
-
statusBarValue: "
|
|
468
|
-
contextMenu: "
|
|
469
|
-
contextMenuItem: "
|
|
470
|
-
contextMenuItemLabel: "
|
|
471
|
-
contextMenuItemShortcut: "
|
|
472
|
-
contextMenuDivider: "
|
|
473
|
-
loadingOverlay: "
|
|
474
|
-
loadingOverlayContent: "
|
|
475
|
-
loadingOverlayText: "
|
|
476
|
-
loadingDimmed: "
|
|
477
|
-
emptyStateInGrid: "
|
|
478
|
-
emptyStateInGridTitle: "
|
|
479
|
-
emptyStateInGridMessage: "
|
|
480
|
-
emptyStateInGridLink: "
|
|
481
|
-
spinner: "
|
|
482
|
-
"ogrid-spin": "
|
|
483
|
-
leafHeaderCellSpan: "
|
|
484
|
-
selectionHeaderCellWrapper: "
|
|
485
|
-
selectionCellWrapper: "
|
|
486
|
-
rowNumberHeaderCellWrapper: "
|
|
487
|
-
rowNumberCellWrapper: "
|
|
488
|
-
selectedRow: "
|
|
489
|
-
selectableGrid: "
|
|
490
|
-
stickyHeader: "
|
|
491
|
-
emptyStateInGridMessageSticky: "
|
|
492
|
-
emptyStateInGridIcon: "
|
|
493
|
-
"density-compact": "
|
|
494
|
-
"density-comfortable": "
|
|
444
|
+
"tableScrollContent": "ogrid-fluent__DataGridTable-module__tableScrollContent",
|
|
445
|
+
"tableWidthAnchor": "ogrid-fluent__DataGridTable-module__tableWidthAnchor",
|
|
446
|
+
"tableWrapper": "ogrid-fluent__DataGridTable-module__tableWrapper",
|
|
447
|
+
"dataTable": "ogrid-fluent__DataGridTable-module__dataTable",
|
|
448
|
+
"groupHeaderCell": "ogrid-fluent__DataGridTable-module__groupHeaderCell",
|
|
449
|
+
"headerCellContent": "ogrid-fluent__DataGridTable-module__headerCellContent",
|
|
450
|
+
"headerMenuTrigger": "ogrid-fluent__DataGridTable-module__headerMenuTrigger",
|
|
451
|
+
"dropIndicator": "ogrid-fluent__DataGridTable-module__dropIndicator",
|
|
452
|
+
"resizeHandle": "ogrid-fluent__DataGridTable-module__resizeHandle",
|
|
453
|
+
"pinnedColLeft": "ogrid-fluent__DataGridTable-module__pinnedColLeft",
|
|
454
|
+
"pinnedColRight": "ogrid-fluent__DataGridTable-module__pinnedColRight",
|
|
455
|
+
"cellContent": "ogrid-fluent__DataGridTable-module__cellContent",
|
|
456
|
+
"activeCellContent": "ogrid-fluent__DataGridTable-module__activeCellContent",
|
|
457
|
+
"editingCellContent": "ogrid-fluent__DataGridTable-module__editingCellContent",
|
|
458
|
+
"cellInRange": "ogrid-fluent__DataGridTable-module__cellInRange",
|
|
459
|
+
"cellCut": "ogrid-fluent__DataGridTable-module__cellCut",
|
|
460
|
+
"fillHandle": "ogrid-fluent__DataGridTable-module__fillHandle",
|
|
461
|
+
"selectionHeaderCellInner": "ogrid-fluent__DataGridTable-module__selectionHeaderCellInner",
|
|
462
|
+
"selectionCellInner": "ogrid-fluent__DataGridTable-module__selectionCellInner",
|
|
463
|
+
"rowNumberHeaderCellInner": "ogrid-fluent__DataGridTable-module__rowNumberHeaderCellInner",
|
|
464
|
+
"rowNumberCellInner": "ogrid-fluent__DataGridTable-module__rowNumberCellInner",
|
|
465
|
+
"statusBar": "ogrid-fluent__DataGridTable-module__statusBar",
|
|
466
|
+
"statusBarItem": "ogrid-fluent__DataGridTable-module__statusBarItem",
|
|
467
|
+
"statusBarLabel": "ogrid-fluent__DataGridTable-module__statusBarLabel",
|
|
468
|
+
"statusBarValue": "ogrid-fluent__DataGridTable-module__statusBarValue",
|
|
469
|
+
"contextMenu": "ogrid-fluent__DataGridTable-module__contextMenu",
|
|
470
|
+
"contextMenuItem": "ogrid-fluent__DataGridTable-module__contextMenuItem",
|
|
471
|
+
"contextMenuItemLabel": "ogrid-fluent__DataGridTable-module__contextMenuItemLabel",
|
|
472
|
+
"contextMenuItemShortcut": "ogrid-fluent__DataGridTable-module__contextMenuItemShortcut",
|
|
473
|
+
"contextMenuDivider": "ogrid-fluent__DataGridTable-module__contextMenuDivider",
|
|
474
|
+
"loadingOverlay": "ogrid-fluent__DataGridTable-module__loadingOverlay",
|
|
475
|
+
"loadingOverlayContent": "ogrid-fluent__DataGridTable-module__loadingOverlayContent",
|
|
476
|
+
"loadingOverlayText": "ogrid-fluent__DataGridTable-module__loadingOverlayText",
|
|
477
|
+
"loadingDimmed": "ogrid-fluent__DataGridTable-module__loadingDimmed",
|
|
478
|
+
"emptyStateInGrid": "ogrid-fluent__DataGridTable-module__emptyStateInGrid",
|
|
479
|
+
"emptyStateInGridTitle": "ogrid-fluent__DataGridTable-module__emptyStateInGridTitle",
|
|
480
|
+
"emptyStateInGridMessage": "ogrid-fluent__DataGridTable-module__emptyStateInGridMessage",
|
|
481
|
+
"emptyStateInGridLink": "ogrid-fluent__DataGridTable-module__emptyStateInGridLink",
|
|
482
|
+
"spinner": "ogrid-fluent__DataGridTable-module__spinner",
|
|
483
|
+
"ogrid-spin": "ogrid-fluent__DataGridTable-module__ogrid-spin",
|
|
484
|
+
"leafHeaderCellSpan": "ogrid-fluent__DataGridTable-module__leafHeaderCellSpan",
|
|
485
|
+
"selectionHeaderCellWrapper": "ogrid-fluent__DataGridTable-module__selectionHeaderCellWrapper",
|
|
486
|
+
"selectionCellWrapper": "ogrid-fluent__DataGridTable-module__selectionCellWrapper",
|
|
487
|
+
"rowNumberHeaderCellWrapper": "ogrid-fluent__DataGridTable-module__rowNumberHeaderCellWrapper",
|
|
488
|
+
"rowNumberCellWrapper": "ogrid-fluent__DataGridTable-module__rowNumberCellWrapper",
|
|
489
|
+
"selectedRow": "ogrid-fluent__DataGridTable-module__selectedRow",
|
|
490
|
+
"selectableGrid": "ogrid-fluent__DataGridTable-module__selectableGrid",
|
|
491
|
+
"stickyHeader": "ogrid-fluent__DataGridTable-module__stickyHeader",
|
|
492
|
+
"emptyStateInGridMessageSticky": "ogrid-fluent__DataGridTable-module__emptyStateInGridMessageSticky",
|
|
493
|
+
"emptyStateInGridIcon": "ogrid-fluent__DataGridTable-module__emptyStateInGridIcon",
|
|
494
|
+
"density-compact": "ogrid-fluent__DataGridTable-module__density-compact",
|
|
495
|
+
"density-comfortable": "ogrid-fluent__DataGridTable-module__density-comfortable"
|
|
495
496
|
};
|
|
496
497
|
var statusBarClassNames = {
|
|
497
498
|
statusBar: DataGridTable_module_default.statusBar,
|
|
@@ -557,6 +558,7 @@ function GridRowInner(props) {
|
|
|
557
558
|
className: isSelected ? DataGridTable_module_default.selectedRow : void 0,
|
|
558
559
|
"data-row-id": rowId,
|
|
559
560
|
onClick: handleSingleRowClick,
|
|
561
|
+
"aria-selected": isSelected || void 0,
|
|
560
562
|
children: [
|
|
561
563
|
hasCheckboxCol && /* @__PURE__ */ jsx(TableCell, { className: DataGridTable_module_default.selectionCellWrapper, children: /* @__PURE__ */ jsx(
|
|
562
564
|
"div",
|
|
@@ -623,11 +625,12 @@ function DataGridTableInner(props) {
|
|
|
623
625
|
rowHeight,
|
|
624
626
|
rowNumberOffset,
|
|
625
627
|
headerRows,
|
|
626
|
-
allowOverflowX,
|
|
628
|
+
allowOverflowX: _allowOverflowX,
|
|
627
629
|
fitToContent,
|
|
628
630
|
editCallbacks,
|
|
629
631
|
interactionHandlers,
|
|
630
632
|
cellDescriptorInputRef,
|
|
633
|
+
cellDescriptorCacheRef,
|
|
631
634
|
pendingEditorValueRef,
|
|
632
635
|
popoverAnchorElRef,
|
|
633
636
|
handleSingleRowClick,
|
|
@@ -685,7 +688,7 @@ function DataGridTableInner(props) {
|
|
|
685
688
|
});
|
|
686
689
|
const renderCellContent = useCallback(
|
|
687
690
|
(item, col, rowIndex, colIdx) => {
|
|
688
|
-
const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current);
|
|
691
|
+
const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current, cellDescriptorCacheRef.current);
|
|
689
692
|
const rowId = getRowId(item);
|
|
690
693
|
let content;
|
|
691
694
|
if (descriptor.mode === "editing-inline") {
|
|
@@ -744,7 +747,7 @@ function DataGridTableInner(props) {
|
|
|
744
747
|
}
|
|
745
748
|
return /* @__PURE__ */ jsx(CellErrorBoundary, { onError: onCellError, children: content }, `${rowId}-${col.columnId}`);
|
|
746
749
|
},
|
|
747
|
-
[editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, pendingEditorValueRef, popoverAnchorElRef]
|
|
750
|
+
[editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, cellDescriptorCacheRef, pendingEditorValueRef, popoverAnchorElRef]
|
|
748
751
|
);
|
|
749
752
|
return /* @__PURE__ */ jsxs("div", { style: GRID_ROOT_STYLE, children: [
|
|
750
753
|
/* @__PURE__ */ jsxs(
|
|
@@ -762,7 +765,7 @@ function DataGridTableInner(props) {
|
|
|
762
765
|
"data-empty": showEmptyInGrid ? "true" : void 0,
|
|
763
766
|
"data-loading": isLoading && items.length === 0 ? "true" : void 0,
|
|
764
767
|
"data-column-count": totalColCount,
|
|
765
|
-
"data-
|
|
768
|
+
"data-suppress-scroll": o.suppressHorizontalScroll ? "true" : void 0,
|
|
766
769
|
"data-container-width": containerWidth,
|
|
767
770
|
"data-min-table-width": Math.round(minTableWidth),
|
|
768
771
|
"data-has-selection": rowSelection !== "none" ? "true" : void 0,
|
|
@@ -770,9 +773,7 @@ function DataGridTableInner(props) {
|
|
|
770
773
|
onKeyDown: handleGridKeyDown,
|
|
771
774
|
style: {
|
|
772
775
|
["--data-table-column-count"]: totalColCount,
|
|
773
|
-
["--data-table-width"]: showEmptyInGrid ? "100%" :
|
|
774
|
-
["--data-table-min-width"]: showEmptyInGrid ? "100%" : allowOverflowX ? "max-content" : fitToContent ? "max-content" : "100%",
|
|
775
|
-
["--data-table-total-min-width"]: `${minTableWidth}px`,
|
|
776
|
+
["--data-table-width"]: showEmptyInGrid ? "100%" : fitToContent ? "fit-content" : "100%",
|
|
776
777
|
...rowHeight ? { ["--ogrid-row-height"]: `${rowHeight}px` } : {}
|
|
777
778
|
},
|
|
778
779
|
children: [
|
|
@@ -805,6 +806,7 @@ function DataGridTableInner(props) {
|
|
|
805
806
|
return /* @__PURE__ */ jsxs(
|
|
806
807
|
TableHeaderCell,
|
|
807
808
|
{
|
|
809
|
+
scope: "col",
|
|
808
810
|
"data-column-id": col.columnId,
|
|
809
811
|
className: columnMeta.hdrClasses[col.columnId] || void 0,
|
|
810
812
|
style: {
|
|
@@ -834,6 +836,8 @@ function DataGridTableInner(props) {
|
|
|
834
836
|
"div",
|
|
835
837
|
{
|
|
836
838
|
className: DataGridTable_module_default.resizeHandle,
|
|
839
|
+
role: "separator",
|
|
840
|
+
"aria-orientation": "vertical",
|
|
837
841
|
onMouseDown: (e) => {
|
|
838
842
|
setActiveCell(null);
|
|
839
843
|
interaction.setSelectionRange(null);
|
|
@@ -993,12 +997,12 @@ var DataGridTable = React.memo(DataGridTableInner);
|
|
|
993
997
|
|
|
994
998
|
// src/ColumnChooser/ColumnChooser.module.scss
|
|
995
999
|
var ColumnChooser_module_default = {
|
|
996
|
-
container: "
|
|
997
|
-
dropdown: "
|
|
998
|
-
header: "
|
|
999
|
-
optionsList: "
|
|
1000
|
-
optionItem: "
|
|
1001
|
-
actions: "
|
|
1000
|
+
"container": "ogrid-fluent__ColumnChooser-module__container",
|
|
1001
|
+
"dropdown": "ogrid-fluent__ColumnChooser-module__dropdown",
|
|
1002
|
+
"header": "ogrid-fluent__ColumnChooser-module__header",
|
|
1003
|
+
"optionsList": "ogrid-fluent__ColumnChooser-module__optionsList",
|
|
1004
|
+
"optionItem": "ogrid-fluent__ColumnChooser-module__optionItem",
|
|
1005
|
+
"actions": "ogrid-fluent__ColumnChooser-module__actions"
|
|
1002
1006
|
};
|
|
1003
1007
|
var ColumnChooser = (props) => {
|
|
1004
1008
|
const { columns, visibleColumns, onVisibilityChange, onSetVisibleColumns, className } = props;
|
|
@@ -1080,16 +1084,16 @@ var ColumnChooser = (props) => {
|
|
|
1080
1084
|
|
|
1081
1085
|
// src/PaginationControls/PaginationControls.module.scss
|
|
1082
1086
|
var PaginationControls_module_default = {
|
|
1083
|
-
pagination: "
|
|
1084
|
-
paginationInfo: "
|
|
1085
|
-
paginationControls: "
|
|
1086
|
-
navBtn: "
|
|
1087
|
-
pageNumbers: "
|
|
1088
|
-
pageBtn: "
|
|
1089
|
-
ellipsis: "
|
|
1090
|
-
pageSizeSelector: "
|
|
1091
|
-
pageSizeLabel: "
|
|
1092
|
-
pageSizeSelect: "
|
|
1087
|
+
"pagination": "ogrid-fluent__PaginationControls-module__pagination",
|
|
1088
|
+
"paginationInfo": "ogrid-fluent__PaginationControls-module__paginationInfo",
|
|
1089
|
+
"paginationControls": "ogrid-fluent__PaginationControls-module__paginationControls",
|
|
1090
|
+
"navBtn": "ogrid-fluent__PaginationControls-module__navBtn",
|
|
1091
|
+
"pageNumbers": "ogrid-fluent__PaginationControls-module__pageNumbers",
|
|
1092
|
+
"pageBtn": "ogrid-fluent__PaginationControls-module__pageBtn",
|
|
1093
|
+
"ellipsis": "ogrid-fluent__PaginationControls-module__ellipsis",
|
|
1094
|
+
"pageSizeSelector": "ogrid-fluent__PaginationControls-module__pageSizeSelector",
|
|
1095
|
+
"pageSizeLabel": "ogrid-fluent__PaginationControls-module__pageSizeLabel",
|
|
1096
|
+
"pageSizeSelect": "ogrid-fluent__PaginationControls-module__pageSizeSelect"
|
|
1093
1097
|
};
|
|
1094
1098
|
var PaginationControls = React.memo((props) => {
|
|
1095
1099
|
const { currentPage, pageSize, totalCount, onPageChange, onPageSizeChange, pageSizeOptions, entityLabelPlural, className } = props;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-react-fluent",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "OGrid React Fluent implementation – DataGrid-powered data table with sorting, filtering, pagination, column chooser, and CSV export.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@alaarab/ogrid-react": "2.1.
|
|
44
|
+
"@alaarab/ogrid-react": "2.1.11"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@fluentui/react-components": "^9.0.0",
|