@infinite-table/infinite-react 4.3.8 → 4.4.0
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/index.css +84 -68
- package/index.d.ts +97 -22
- package/index.dev.js +351 -172
- package/index.dev.mjs +351 -172
- package/index.js +351 -172
- package/index.mjs +351 -172
- package/package.json +2 -2
package/index.dev.mjs
CHANGED
|
@@ -1220,7 +1220,8 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1220
1220
|
onContainerScroll,
|
|
1221
1221
|
className,
|
|
1222
1222
|
tabIndex,
|
|
1223
|
-
style: style2
|
|
1223
|
+
style: style2,
|
|
1224
|
+
autoFocus
|
|
1224
1225
|
} = props;
|
|
1225
1226
|
const domRef = ref != null ? ref : useRef3(null);
|
|
1226
1227
|
useOnScroll(domRef, onContainerScroll);
|
|
@@ -1229,6 +1230,7 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1229
1230
|
{
|
|
1230
1231
|
ref: domRef,
|
|
1231
1232
|
style: style2,
|
|
1233
|
+
autoFocus,
|
|
1232
1234
|
tabIndex,
|
|
1233
1235
|
className: join(
|
|
1234
1236
|
className,
|
|
@@ -1402,7 +1404,7 @@ var internalProps = {
|
|
|
1402
1404
|
};
|
|
1403
1405
|
|
|
1404
1406
|
// src/components/InfiniteTable/vars.css.ts
|
|
1405
|
-
var ThemeVars = { color: { accent: "var(--infinite-accent-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidth: "var(--infinite-runtime-total-visible-columns-width)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)" }, components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", selectedBackground: "var(--infinite-row-selected-background)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
|
|
1407
|
+
var ThemeVars = { color: { accent: "var(--infinite-accent-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidth: "var(--infinite-runtime-total-visible-columns-width)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
|
|
1406
1408
|
var columnHeaderHeightName = "column-header-height";
|
|
1407
1409
|
|
|
1408
1410
|
// src/components/InfiniteTable/utils/infiniteDOMUtils.ts
|
|
@@ -4124,7 +4126,7 @@ var ActiveCellIndicatorCls = { visible: "ActiveCellIndicator_ActiveCellIndicator
|
|
|
4124
4126
|
var ActiveIndicatorWrapperCls = "ActiveCellIndicator_ActiveIndicatorWrapperCls__nxbq1c0 utilities_pointerEvents_none__16lm1iwl utilities_position_sticky__16lm1iw4 utilities_left_0__16lm1iw1e utilities_top_0__16lm1iw1c utilities_height_0__16lm1iw18 utilities_zIndex_1000000__16lm1iwu";
|
|
4125
4127
|
|
|
4126
4128
|
// src/components/InfiniteTable/components/ActiveRowIndicator.css.ts
|
|
4127
|
-
var ActiveRowIndicatorCls = { visible: "ActiveRowIndicator_ActiveRowIndicatorCls_visible__j26lrx1 ActiveRowIndicator_ActiveRowIndicator__j26lrx0 utilities_pointerEvents_none__16lm1iwl utilities_position_absolute__16lm1iw2
|
|
4129
|
+
var ActiveRowIndicatorCls = { visible: "ActiveRowIndicator_ActiveRowIndicatorCls_visible__j26lrx1 ActiveRowIndicator_ActiveRowIndicator__j26lrx0 utilities_pointerEvents_none__16lm1iwl utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1c utilities_left_0__16lm1iw1e", hidden: "ActiveRowIndicator_ActiveRowIndicatorCls_hidden__j26lrx2 ActiveRowIndicator_ActiveRowIndicator__j26lrx0 utilities_pointerEvents_none__16lm1iwl utilities_position_absolute__16lm1iw2 utilities_top_0__16lm1iw1c utilities_left_0__16lm1iw1e" };
|
|
4128
4130
|
|
|
4129
4131
|
// src/components/InfiniteTable/components/ActiveRowIndicator.tsx
|
|
4130
4132
|
var { rootClassName: rootClassName3 } = internalProps;
|
|
@@ -4132,7 +4134,8 @@ var baseCls = `${rootClassName3}-ActiveRowIndicator`;
|
|
|
4132
4134
|
var ActiveStyle = {
|
|
4133
4135
|
[stripVar(InternalVars.activeCellOffsetY)]: InternalVars.activeCellRowOffset,
|
|
4134
4136
|
transform: `translate3d(0px, calc( ${InternalVars.activeCellOffsetY} + var(${stripVar(InternalVars.scrollTopForActiveRow)}, 0px)), 0px)`,
|
|
4135
|
-
height: InternalVars.activeCellRowHeight
|
|
4137
|
+
height: InternalVars.activeCellRowHeight,
|
|
4138
|
+
maxWidth: ThemeVars.runtime.totalVisibleColumnsWidth
|
|
4136
4139
|
};
|
|
4137
4140
|
var ActiveRowIndicatorFn = (props) => {
|
|
4138
4141
|
const { brain } = props;
|
|
@@ -4300,6 +4303,7 @@ function HeadlessTable(props) {
|
|
|
4300
4303
|
"activeCellIndex",
|
|
4301
4304
|
"onRenderUpdater"
|
|
4302
4305
|
]);
|
|
4306
|
+
const { autoFocus } = domProps;
|
|
4303
4307
|
const domRef = useRef7(null);
|
|
4304
4308
|
const [scrollSize, setTotalScrollSize] = useState3({
|
|
4305
4309
|
width: 0,
|
|
@@ -4316,6 +4320,9 @@ function HeadlessTable(props) {
|
|
|
4316
4320
|
if (!node) {
|
|
4317
4321
|
return;
|
|
4318
4322
|
}
|
|
4323
|
+
if (autoFocus && document.activeElement !== node) {
|
|
4324
|
+
node.focus();
|
|
4325
|
+
}
|
|
4319
4326
|
const onResize = () => {
|
|
4320
4327
|
const size = {
|
|
4321
4328
|
height: node.clientHeight,
|
|
@@ -5086,22 +5093,22 @@ var createRuntimeFn = (config) => {
|
|
|
5086
5093
|
|
|
5087
5094
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5088
5095
|
var CellCls = "cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
|
|
5089
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5096
|
+
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob122 utilities_height_100%__16lm1iw19 utilities_width_100%__16lm1iw1b utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_justifyContent_start__16lm1iw1v", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob123", true: "header_HeaderCellContentRecipe_filtered_true__12zfob124" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob125", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob126", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob127" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob128", end: "header_HeaderCellContentRecipe_align_end__12zfob129", center: "header_HeaderCellContentRecipe_align_center__12zfob12a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5090
5097
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
|
|
5091
|
-
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, firstRow: { false: "
|
|
5098
|
+
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, rowDisabled: { false: "header_HeaderCellRecipe_rowDisabled_false__12zfob1w", true: "header_HeaderCellRecipe_rowDisabled_true__12zfob1x" }, firstRow: { false: "header_HeaderCellRecipe_firstRow_false__12zfob1y", true: "header_HeaderCellRecipe_firstRow_true__12zfob1z" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob110", true: "header_HeaderCellRecipe_groupRow_true__12zfob111" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob112", true: "header_HeaderCellRecipe_groupCell_true__12zfob113" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob114", end: "header_HeaderCellRecipe_align_end__12zfob115", center: "header_HeaderCellRecipe_align_center__12zfob116" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob117", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob118", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob119" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob11a", even: "header_HeaderCellRecipe_zebra_even__12zfob11b", odd: "header_HeaderCellRecipe_zebra_odd__12zfob11c" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob11d", false: "header_HeaderCellRecipe_dragging_false__12zfob11e" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11f", false: "header_HeaderCellRecipe_first_false__12zfob11g" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11h", false: "header_HeaderCellRecipe_last_false__12zfob11i" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11j", false: "header_HeaderCellRecipe_groupByField_false__12zfob11k" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11l", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11m" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11n", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11o" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11p", end: "header_HeaderCellRecipe_pinned_end__12zfob11q", false: "header_HeaderCellRecipe_pinned_false__12zfob11r" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11s", false: "header_HeaderCellRecipe_filtered_false__12zfob11t" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11u"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11v"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob11w"]] });
|
|
5092
5099
|
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob19 utilities_display_block__16lm1iw12 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob1a", end: "header_HeaderClsRecipe_pinned_end__12zfob1b", false: "header_HeaderClsRecipe_pinned_false__12zfob1c" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1d", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1e" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1f", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1g" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1h", false: "header_HeaderClsRecipe_overflow_false__12zfob1i" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1j"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1k"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1l"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1m"]] });
|
|
5093
|
-
var HeaderFilterEditorCls = "
|
|
5100
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12k utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5094
5101
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5095
|
-
var HeaderFilterOperatorCls = "
|
|
5096
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5097
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5098
|
-
var HeaderGroupCls = "
|
|
5099
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5102
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5103
|
+
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12h utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1c", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12i", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12j" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5104
|
+
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterRecipe__12zfob12d utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_stretch__16lm1iw1r utilities_position_relative__16lm1iw1", variantClassNames: { active: { true: "header_HeaderFilterRecipe_active_true__12zfob12e", false: "header_HeaderFilterRecipe_active_false__12zfob12f" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5105
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12c utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5106
|
+
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob11x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_justifyContent_spaceAround__16lm1iw1u utilities_visibility_hidden__16lm1iw21", variantClassNames: { menuVisible: { true: "header_HeaderMenuIconCls_menuVisible_true__12zfob11y" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob11z", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob120" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob121"]] });
|
|
5100
5107
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5101
5108
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5102
5109
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5103
5110
|
var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "header__12zfob12", variantClassNames: { align: { start: "header_HeaderSortIconRecipe_align_start__12zfob13", center: "header_HeaderSortIconRecipe_align_center__12zfob14", end: "header_HeaderSortIconRecipe_align_end__12zfob15" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5104
|
-
var HeaderWrapperCls = "
|
|
5111
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12b utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5105
5112
|
|
|
5106
5113
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5107
5114
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6547,6 +6554,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6547
6554
|
rowActive: extraFlags.rowActive,
|
|
6548
6555
|
dragging: extraFlags.dragging,
|
|
6549
6556
|
firstRow: (_b = extraFlags.firstRow) != null ? _b : false,
|
|
6557
|
+
rowDisabled: extraFlags.rowDisabled,
|
|
6550
6558
|
groupRow: extraFlags.groupRow,
|
|
6551
6559
|
groupCell: extraFlags.groupCell,
|
|
6552
6560
|
verticalAlign: extraFlags.verticalAlign,
|
|
@@ -6579,6 +6587,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6579
6587
|
if (extraFlags.firstRow) {
|
|
6580
6588
|
result.push(...baseClasses.map((c) => `${c}--first-row`));
|
|
6581
6589
|
}
|
|
6590
|
+
if (extraFlags.rowDisabled) {
|
|
6591
|
+
result.push(...baseClasses.map((c) => `${c}--disabled`));
|
|
6592
|
+
}
|
|
6582
6593
|
if (extraFlags.groupRow) {
|
|
6583
6594
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6584
6595
|
result.push(
|
|
@@ -6633,6 +6644,10 @@ var publicRuntimeVars = {
|
|
|
6633
6644
|
visibleColumnsCount: {
|
|
6634
6645
|
name: stripVar(ThemeVars.runtime.visibleColumnsCount),
|
|
6635
6646
|
value: ""
|
|
6647
|
+
},
|
|
6648
|
+
browserScrollbarWidth: {
|
|
6649
|
+
name: stripVar(ThemeVars.runtime.browserScrollbarWidth),
|
|
6650
|
+
value: ""
|
|
6636
6651
|
}
|
|
6637
6652
|
};
|
|
6638
6653
|
var scrollbarWidthHorizontal = stripVar(
|
|
@@ -6716,6 +6731,9 @@ function useDOMProps(initialDOMProps) {
|
|
|
6716
6731
|
},
|
|
6717
6732
|
{}
|
|
6718
6733
|
);
|
|
6734
|
+
if (bodySize.width) {
|
|
6735
|
+
cssVars[publicRuntimeVars.browserScrollbarWidth.name] = `${getScrollbarWidth()}px`;
|
|
6736
|
+
}
|
|
6719
6737
|
cssVars[publicRuntimeVars.bodyWidth.name] = `calc(${InternalVars.bodyWidth} - ${InternalVars.scrollbarWidthVertical})`;
|
|
6720
6738
|
cssVars[publicRuntimeVars.totalVisibleColumnsWidth.name] = `${computedPinnedStartColumnsWidth + computedPinnedEndColumnsWidth + computedUnpinnedColumnsWidth}px`;
|
|
6721
6739
|
cssVars[publicRuntimeVars.visibleColumnsCount.name] = computedVisibleColumns.length;
|
|
@@ -7609,9 +7627,8 @@ var LoadingIcon = (props) => {
|
|
|
7609
7627
|
};
|
|
7610
7628
|
|
|
7611
7629
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7612
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "
|
|
7613
|
-
var
|
|
7614
|
-
var RowHoverCls = "row_RowHoverCls__7pupv01";
|
|
7630
|
+
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "row__7pupv01", variantClassNames: { align: { start: "row_GroupRowExpanderCls_align_start__7pupv02", center: "row_GroupRowExpanderCls_align_center__7pupv03", end: "row_GroupRowExpanderCls_align_end__7pupv04" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7631
|
+
var RowHoverCls = "row_RowHoverCls__7pupv00";
|
|
7615
7632
|
|
|
7616
7633
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7617
7634
|
function styleForGroupColumn({
|
|
@@ -7782,7 +7799,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7782
7799
|
|
|
7783
7800
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7784
7801
|
var ColumnCellCls = "cell_ColumnCellCls__1eexc2a6 cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
|
|
7785
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2ah", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ai", true: "cell_ColumnCellRecipe_dragging_true__1eexc2aj" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ak", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2al" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2am", end: "cell_ColumnCellRecipe_align_end__1eexc2an", center: "cell_ColumnCellRecipe_align_center__1eexc2ao" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2ap", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2aq", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ar" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2as", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2at" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2au", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2av" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2aw", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2ax" }, zebra: { false: "
|
|
7802
|
+
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2ah", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ai", true: "cell_ColumnCellRecipe_dragging_true__1eexc2aj" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ak", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2al" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2am", end: "cell_ColumnCellRecipe_align_end__1eexc2an", center: "cell_ColumnCellRecipe_align_center__1eexc2ao" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2ap", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2aq", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ar" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2as", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2at" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2au", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2av" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2aw", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2ax" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2ay", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2az" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a10", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a11", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a12" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a13", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a14", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a15" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a16", false: "cell_ColumnCellRecipe_first_false__1eexc2a17" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a18", false: "cell_ColumnCellRecipe_last_false__1eexc2a19" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1a", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1b" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1c", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1d" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1e", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1f" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1g", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1h" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1i", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1j", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1k" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1l", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1m" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_0__1eexc2a1n"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a1o"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a1p"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a1q"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_4__1eexc2a1r"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_5__1eexc2a1s"]] });
|
|
7786
7803
|
var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2a8", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2a9", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2aa" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ab", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ac" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2ad", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2ae" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2af", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2ag" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7787
7804
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7788
7805
|
|
|
@@ -8386,6 +8403,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8386
8403
|
api: imperativeApi,
|
|
8387
8404
|
dataSourceApi
|
|
8388
8405
|
};
|
|
8406
|
+
const rowDisabled = rowInfo.rowDisabled;
|
|
8389
8407
|
const visibleColumnsIds = computed.computedVisibleColumns.map((x) => x.id);
|
|
8390
8408
|
const colRenderingParams = getColumnRenderingParams({
|
|
8391
8409
|
column,
|
|
@@ -8427,14 +8445,16 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8427
8445
|
event
|
|
8428
8446
|
});
|
|
8429
8447
|
if (keyboardNavigation === "row") {
|
|
8430
|
-
|
|
8448
|
+
if (!rowDisabled) {
|
|
8449
|
+
componentActions.activeRowIndex = rowIndex;
|
|
8450
|
+
}
|
|
8431
8451
|
return;
|
|
8432
8452
|
}
|
|
8433
8453
|
if (keyboardNavigation === "cell") {
|
|
8434
8454
|
componentActions.activeCellIndex = [rowIndex, colIndex];
|
|
8435
8455
|
}
|
|
8436
8456
|
},
|
|
8437
|
-
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8457
|
+
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
8438
8458
|
);
|
|
8439
8459
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8440
8460
|
const cellSelected = renderParam.cellSelected;
|
|
@@ -8706,6 +8726,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8706
8726
|
zebra,
|
|
8707
8727
|
align: align2,
|
|
8708
8728
|
verticalAlign,
|
|
8729
|
+
rowDisabled,
|
|
8709
8730
|
rowActive,
|
|
8710
8731
|
cellSelected,
|
|
8711
8732
|
rowSelected,
|
|
@@ -9584,6 +9605,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9584
9605
|
verticalAlign,
|
|
9585
9606
|
rowSelected: false,
|
|
9586
9607
|
cellSelected: false,
|
|
9608
|
+
rowDisabled: false,
|
|
9587
9609
|
zebra: false,
|
|
9588
9610
|
rowActive: false,
|
|
9589
9611
|
firstRow: true,
|
|
@@ -10817,6 +10839,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10817
10839
|
//TODO improve this
|
|
10818
10840
|
collapsed: false,
|
|
10819
10841
|
dataSourceHasGrouping: true,
|
|
10842
|
+
rowDisabled: false,
|
|
10820
10843
|
isCellSelected: returnFalse,
|
|
10821
10844
|
hasSelectedCells: returnFalse,
|
|
10822
10845
|
selfLoaded,
|
|
@@ -10865,6 +10888,7 @@ function enhancedFlatten(param) {
|
|
|
10865
10888
|
withRowInfo,
|
|
10866
10889
|
toPrimaryKey,
|
|
10867
10890
|
groupRowsState,
|
|
10891
|
+
isRowDisabled,
|
|
10868
10892
|
isRowSelected,
|
|
10869
10893
|
rowSelectionState,
|
|
10870
10894
|
generateGroupRows,
|
|
@@ -10913,6 +10937,9 @@ function enhancedFlatten(param) {
|
|
|
10913
10937
|
enhancedGroupData.deselectedChildredCount = selectionCount.deselectedCount;
|
|
10914
10938
|
}
|
|
10915
10939
|
}
|
|
10940
|
+
if (isRowDisabled) {
|
|
10941
|
+
enhancedGroupData.rowDisabled = isRowDisabled(enhancedGroupData);
|
|
10942
|
+
}
|
|
10916
10943
|
const parent = parents[parents.length - 1];
|
|
10917
10944
|
const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
|
|
10918
10945
|
if (parentCollapsed) {
|
|
@@ -10960,6 +10987,7 @@ function enhancedFlatten(param) {
|
|
|
10960
10987
|
isGroupRow: false,
|
|
10961
10988
|
selfLoaded: !!item,
|
|
10962
10989
|
rowSelected: false,
|
|
10990
|
+
rowDisabled: false,
|
|
10963
10991
|
rootGroupBy: groupBy,
|
|
10964
10992
|
collapsed,
|
|
10965
10993
|
groupKeys,
|
|
@@ -10974,6 +11002,9 @@ function enhancedFlatten(param) {
|
|
|
10974
11002
|
if (isRowSelected) {
|
|
10975
11003
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
10976
11004
|
}
|
|
11005
|
+
if (isRowDisabled) {
|
|
11006
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
11007
|
+
}
|
|
10977
11008
|
if (withRowInfo) {
|
|
10978
11009
|
withRowInfo(rowInfo);
|
|
10979
11010
|
}
|
|
@@ -13281,7 +13312,7 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
13281
13312
|
function returnFalse2() {
|
|
13282
13313
|
return false;
|
|
13283
13314
|
}
|
|
13284
|
-
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
13315
|
+
function toRowInfo(data, id, index, isRowSelected, isRowDisabled, cellSelectionState) {
|
|
13285
13316
|
const rowInfo = {
|
|
13286
13317
|
dataSourceHasGrouping: false,
|
|
13287
13318
|
data,
|
|
@@ -13290,12 +13321,16 @@ function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
|
13290
13321
|
isGroupRow: false,
|
|
13291
13322
|
selfLoaded: true,
|
|
13292
13323
|
rowSelected: false,
|
|
13324
|
+
rowDisabled: false,
|
|
13293
13325
|
isCellSelected: returnFalse2,
|
|
13294
13326
|
hasSelectedCells: returnFalse2
|
|
13295
13327
|
};
|
|
13296
13328
|
if (isRowSelected) {
|
|
13297
13329
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
13298
13330
|
}
|
|
13331
|
+
if (isRowDisabled) {
|
|
13332
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
13333
|
+
}
|
|
13299
13334
|
if (cellSelectionState) {
|
|
13300
13335
|
rowInfo.isCellSelected = (colId) => {
|
|
13301
13336
|
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
@@ -13498,6 +13533,7 @@ function concludeReducer(params) {
|
|
|
13498
13533
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
13499
13534
|
);
|
|
13500
13535
|
} : void 0;
|
|
13536
|
+
const isRowDisabled = state.isRowDisabled || returnFalse2;
|
|
13501
13537
|
if (state.isRowSelected && state.selectionMode === "multi-row") {
|
|
13502
13538
|
isRowSelected = (rowInfo) => state.isRowSelected(
|
|
13503
13539
|
rowInfo,
|
|
@@ -13617,6 +13653,7 @@ function concludeReducer(params) {
|
|
|
13617
13653
|
data ? toPrimaryKey(data) : index,
|
|
13618
13654
|
index,
|
|
13619
13655
|
isRowSelected,
|
|
13656
|
+
isRowDisabled,
|
|
13620
13657
|
cellSelectionState
|
|
13621
13658
|
);
|
|
13622
13659
|
if (rowInfoReducerResults) {
|
|
@@ -14349,6 +14386,203 @@ var normalizeSortInfo = (initialSortInfo, weakMap3) => {
|
|
|
14349
14386
|
return result;
|
|
14350
14387
|
};
|
|
14351
14388
|
|
|
14389
|
+
// src/components/DataSource/BooleanCollectionState.ts
|
|
14390
|
+
var BooleanCollectionState = class {
|
|
14391
|
+
constructor(state) {
|
|
14392
|
+
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14393
|
+
//@ts-ignore
|
|
14394
|
+
state.getState()
|
|
14395
|
+
) : state;
|
|
14396
|
+
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14397
|
+
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14398
|
+
this.update({
|
|
14399
|
+
negativeItems,
|
|
14400
|
+
positiveItems
|
|
14401
|
+
});
|
|
14402
|
+
}
|
|
14403
|
+
getInitialState() {
|
|
14404
|
+
return this.initialState;
|
|
14405
|
+
}
|
|
14406
|
+
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14407
|
+
// return {
|
|
14408
|
+
// positiveItems: this.allPositive
|
|
14409
|
+
// ? true
|
|
14410
|
+
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14411
|
+
// negativeItems: this.allNegative
|
|
14412
|
+
// ? true
|
|
14413
|
+
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14414
|
+
// };
|
|
14415
|
+
// }
|
|
14416
|
+
destroy() {
|
|
14417
|
+
var _a, _b;
|
|
14418
|
+
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14419
|
+
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14420
|
+
delete this.positiveMap;
|
|
14421
|
+
delete this.negativeMap;
|
|
14422
|
+
}
|
|
14423
|
+
update(state) {
|
|
14424
|
+
const { positiveItems, negativeItems } = state;
|
|
14425
|
+
this.allNegative = negativeItems === true;
|
|
14426
|
+
this.allPositive = positiveItems === true;
|
|
14427
|
+
if (this.allNegative && this.allPositive) {
|
|
14428
|
+
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14429
|
+
}
|
|
14430
|
+
if (negativeItems && negativeItems !== true) {
|
|
14431
|
+
if (!this.negativeMap) {
|
|
14432
|
+
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14433
|
+
}
|
|
14434
|
+
this.negativeMap.clear();
|
|
14435
|
+
for (let k of negativeItems) {
|
|
14436
|
+
this.negativeMap.set(k, true);
|
|
14437
|
+
}
|
|
14438
|
+
if (this.positiveMap) {
|
|
14439
|
+
this.positiveMap.clear();
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
if (positiveItems && positiveItems !== true) {
|
|
14443
|
+
if (!this.positiveMap) {
|
|
14444
|
+
this.positiveMap = /* @__PURE__ */ new Map();
|
|
14445
|
+
}
|
|
14446
|
+
this.positiveMap.clear();
|
|
14447
|
+
for (let k of positiveItems) {
|
|
14448
|
+
this.positiveMap.set(k, true);
|
|
14449
|
+
}
|
|
14450
|
+
if (this.negativeMap) {
|
|
14451
|
+
this.negativeMap.clear();
|
|
14452
|
+
}
|
|
14453
|
+
}
|
|
14454
|
+
}
|
|
14455
|
+
isDefaultNegativeSelection() {
|
|
14456
|
+
return this.allNegative;
|
|
14457
|
+
}
|
|
14458
|
+
isDefaultPositiveSelection() {
|
|
14459
|
+
return this.allPositive;
|
|
14460
|
+
}
|
|
14461
|
+
areAllNegative() {
|
|
14462
|
+
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
14463
|
+
}
|
|
14464
|
+
areAllPositive() {
|
|
14465
|
+
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
14466
|
+
}
|
|
14467
|
+
makeAllNegative() {
|
|
14468
|
+
this.update({
|
|
14469
|
+
negativeItems: true,
|
|
14470
|
+
positiveItems: []
|
|
14471
|
+
});
|
|
14472
|
+
}
|
|
14473
|
+
makeAllPositive() {
|
|
14474
|
+
this.update({
|
|
14475
|
+
positiveItems: true,
|
|
14476
|
+
negativeItems: []
|
|
14477
|
+
});
|
|
14478
|
+
}
|
|
14479
|
+
isItemPositive(key) {
|
|
14480
|
+
var _a, _b;
|
|
14481
|
+
if (this.allPositive === true) {
|
|
14482
|
+
if (this.allNegative === true) {
|
|
14483
|
+
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
14484
|
+
}
|
|
14485
|
+
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
14486
|
+
}
|
|
14487
|
+
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
14488
|
+
}
|
|
14489
|
+
isItemNegative(key) {
|
|
14490
|
+
return !this.isItemPositive(key);
|
|
14491
|
+
}
|
|
14492
|
+
setItemValue(key, shouldMakePositive) {
|
|
14493
|
+
var _a;
|
|
14494
|
+
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
14495
|
+
return;
|
|
14496
|
+
}
|
|
14497
|
+
if (shouldMakePositive) {
|
|
14498
|
+
if (this.allNegative === true) {
|
|
14499
|
+
if (!this.positiveMap) {
|
|
14500
|
+
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
14501
|
+
}
|
|
14502
|
+
this.positiveMap.set(key, true);
|
|
14503
|
+
} else if (this.allPositive === true) {
|
|
14504
|
+
if (!this.negativeMap) {
|
|
14505
|
+
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
14506
|
+
}
|
|
14507
|
+
this.negativeMap.delete(key);
|
|
14508
|
+
}
|
|
14509
|
+
} else {
|
|
14510
|
+
if (this.allPositive === true) {
|
|
14511
|
+
if (!this.negativeMap) {
|
|
14512
|
+
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
14513
|
+
}
|
|
14514
|
+
this.negativeMap.set(key, true);
|
|
14515
|
+
} else if (this.allNegative === true) {
|
|
14516
|
+
if (!this.positiveMap) {
|
|
14517
|
+
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
14518
|
+
}
|
|
14519
|
+
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
14520
|
+
}
|
|
14521
|
+
}
|
|
14522
|
+
}
|
|
14523
|
+
makeItemNegative(key) {
|
|
14524
|
+
this.setItemValue(key, false);
|
|
14525
|
+
}
|
|
14526
|
+
makeItemPositive(key) {
|
|
14527
|
+
this.setItemValue(key, true);
|
|
14528
|
+
}
|
|
14529
|
+
toggleItem(key) {
|
|
14530
|
+
this.setItemValue(key, !this.isItemPositive(key));
|
|
14531
|
+
}
|
|
14532
|
+
};
|
|
14533
|
+
|
|
14534
|
+
// src/components/DataSource/RowDisabledState.ts
|
|
14535
|
+
var RowDisabledState = class extends BooleanCollectionState {
|
|
14536
|
+
constructor(state) {
|
|
14537
|
+
super(state);
|
|
14538
|
+
this.isRowEnabled = (key) => {
|
|
14539
|
+
return !!this.isItemPositive(key);
|
|
14540
|
+
};
|
|
14541
|
+
}
|
|
14542
|
+
getState() {
|
|
14543
|
+
var _a, _b, _c, _d;
|
|
14544
|
+
const enabledRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
|
|
14545
|
+
const disabledRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
|
|
14546
|
+
return {
|
|
14547
|
+
enabledRows,
|
|
14548
|
+
disabledRows
|
|
14549
|
+
};
|
|
14550
|
+
}
|
|
14551
|
+
getPositiveFromState(state) {
|
|
14552
|
+
return state.enabledRows;
|
|
14553
|
+
}
|
|
14554
|
+
getNegativeFromState(state) {
|
|
14555
|
+
return state.disabledRows;
|
|
14556
|
+
}
|
|
14557
|
+
areAllDisabled() {
|
|
14558
|
+
return this.areAllNegative();
|
|
14559
|
+
}
|
|
14560
|
+
areAllEnabled() {
|
|
14561
|
+
return this.areAllPositive();
|
|
14562
|
+
}
|
|
14563
|
+
disableAll() {
|
|
14564
|
+
this.makeAllNegative();
|
|
14565
|
+
}
|
|
14566
|
+
enableAll() {
|
|
14567
|
+
this.makeAllPositive();
|
|
14568
|
+
}
|
|
14569
|
+
isRowDisabled(key) {
|
|
14570
|
+
return !this.isRowEnabled(key);
|
|
14571
|
+
}
|
|
14572
|
+
setRowEnabled(key, shouldExpand) {
|
|
14573
|
+
return this.setItemValue(key, shouldExpand);
|
|
14574
|
+
}
|
|
14575
|
+
disableRow(key) {
|
|
14576
|
+
this.setRowEnabled(key, false);
|
|
14577
|
+
}
|
|
14578
|
+
enableRow(key) {
|
|
14579
|
+
this.setRowEnabled(key, true);
|
|
14580
|
+
}
|
|
14581
|
+
toggleRow(key) {
|
|
14582
|
+
this.toggleItem(key);
|
|
14583
|
+
}
|
|
14584
|
+
};
|
|
14585
|
+
|
|
14352
14586
|
// src/components/DataSource/state/getInitialState.ts
|
|
14353
14587
|
var DataSourceLogger = dbg("DataSource");
|
|
14354
14588
|
var defaultCursorId = Symbol("cursorId");
|
|
@@ -14389,7 +14623,8 @@ function initSetupState() {
|
|
|
14389
14623
|
cursorId: defaultCursorId,
|
|
14390
14624
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
14391
14625
|
propsCache: /* @__PURE__ */ new Map([
|
|
14392
|
-
["sortInfo", /* @__PURE__ */ new WeakMap()]
|
|
14626
|
+
["sortInfo", /* @__PURE__ */ new WeakMap()],
|
|
14627
|
+
["rowDisabledState", /* @__PURE__ */ new WeakMap()]
|
|
14393
14628
|
]),
|
|
14394
14629
|
rowInfoReducerResults: void 0,
|
|
14395
14630
|
pivotMappings: void 0,
|
|
@@ -14463,6 +14698,26 @@ var forwardProps3 = (setupState) => {
|
|
|
14463
14698
|
},
|
|
14464
14699
|
batchOperationDelay: 1,
|
|
14465
14700
|
isRowSelected: 1,
|
|
14701
|
+
isRowDisabled: 1,
|
|
14702
|
+
rowDisabledState: (rowDisabledState) => {
|
|
14703
|
+
var _a;
|
|
14704
|
+
if (!rowDisabledState) {
|
|
14705
|
+
return null;
|
|
14706
|
+
}
|
|
14707
|
+
if (rowDisabledState instanceof RowDisabledState) {
|
|
14708
|
+
return rowDisabledState;
|
|
14709
|
+
}
|
|
14710
|
+
const wMap = (_a = setupState.propsCache.get("rowDisabledState")) != null ? _a : weakMap;
|
|
14711
|
+
let cachedRowDisabledState = wMap.get(
|
|
14712
|
+
rowDisabledState
|
|
14713
|
+
);
|
|
14714
|
+
if (!cachedRowDisabledState) {
|
|
14715
|
+
cachedRowDisabledState = new RowDisabledState(rowDisabledState);
|
|
14716
|
+
wMap.set(rowDisabledState, cachedRowDisabledState);
|
|
14717
|
+
}
|
|
14718
|
+
rowDisabledState = cachedRowDisabledState;
|
|
14719
|
+
return rowDisabledState != null ? rowDisabledState : null;
|
|
14720
|
+
},
|
|
14466
14721
|
onDataArrayChange: 1,
|
|
14467
14722
|
onDataMutations: 1,
|
|
14468
14723
|
aggregationReducers: 1,
|
|
@@ -14600,6 +14855,19 @@ function deriveStateFromProps(params) {
|
|
|
14600
14855
|
const sortMode = props.sortFunction ? "local" : propsSortMode != null ? propsSortMode : controlledSort ? "remote" : "local";
|
|
14601
14856
|
const filterMode = typeof props.filterFunction === "function" ? "local" : propsFilterMode != null ? propsFilterMode : typeof props.data === "function" ? "remote" : "local";
|
|
14602
14857
|
const pivotMode = shouldReloadData.pivotBy ? "remote" : "local";
|
|
14858
|
+
const rowDisabledState = state.rowDisabledState;
|
|
14859
|
+
let isRowDisabled = props.isRowDisabled;
|
|
14860
|
+
if (!isRowDisabled && rowDisabledState) {
|
|
14861
|
+
const cachedIsRowDisabled = weakMap.get(rowDisabledState);
|
|
14862
|
+
if (cachedIsRowDisabled) {
|
|
14863
|
+
isRowDisabled = cachedIsRowDisabled;
|
|
14864
|
+
} else {
|
|
14865
|
+
isRowDisabled = (rowInfo) => {
|
|
14866
|
+
return rowDisabledState.isRowDisabled(rowInfo.id);
|
|
14867
|
+
};
|
|
14868
|
+
weakMap.set(rowDisabledState, isRowDisabled);
|
|
14869
|
+
}
|
|
14870
|
+
}
|
|
14603
14871
|
const result = {
|
|
14604
14872
|
selectionMode,
|
|
14605
14873
|
groupRowsState,
|
|
@@ -14616,6 +14884,7 @@ function deriveStateFromProps(params) {
|
|
|
14616
14884
|
groupBy: (_j = (_i = props.shouldReloadData) == null ? void 0 : _i.groupBy) != null ? _j : groupMode === "remote",
|
|
14617
14885
|
pivotBy: (_l = (_k = props.shouldReloadData) == null ? void 0 : _k.pivotBy) != null ? _l : pivotMode === "remote"
|
|
14618
14886
|
},
|
|
14887
|
+
isRowDisabled,
|
|
14619
14888
|
rowSelection: rowSelectionState,
|
|
14620
14889
|
cellSelection: cellSelectionState,
|
|
14621
14890
|
groupMode,
|
|
@@ -14915,151 +15184,6 @@ function useDataSourceInternal(props) {
|
|
|
14915
15184
|
};
|
|
14916
15185
|
}
|
|
14917
15186
|
|
|
14918
|
-
// src/components/DataSource/BooleanCollectionState.ts
|
|
14919
|
-
var BooleanCollectionState = class {
|
|
14920
|
-
constructor(state) {
|
|
14921
|
-
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14922
|
-
//@ts-ignore
|
|
14923
|
-
state.getState()
|
|
14924
|
-
) : state;
|
|
14925
|
-
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14926
|
-
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14927
|
-
this.update({
|
|
14928
|
-
negativeItems,
|
|
14929
|
-
positiveItems
|
|
14930
|
-
});
|
|
14931
|
-
}
|
|
14932
|
-
getInitialState() {
|
|
14933
|
-
return this.initialState;
|
|
14934
|
-
}
|
|
14935
|
-
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14936
|
-
// return {
|
|
14937
|
-
// positiveItems: this.allPositive
|
|
14938
|
-
// ? true
|
|
14939
|
-
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14940
|
-
// negativeItems: this.allNegative
|
|
14941
|
-
// ? true
|
|
14942
|
-
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14943
|
-
// };
|
|
14944
|
-
// }
|
|
14945
|
-
destroy() {
|
|
14946
|
-
var _a, _b;
|
|
14947
|
-
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14948
|
-
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14949
|
-
delete this.positiveMap;
|
|
14950
|
-
delete this.negativeMap;
|
|
14951
|
-
}
|
|
14952
|
-
update(state) {
|
|
14953
|
-
const { positiveItems, negativeItems } = state;
|
|
14954
|
-
this.allNegative = negativeItems === true;
|
|
14955
|
-
this.allPositive = positiveItems === true;
|
|
14956
|
-
if (this.allNegative && this.allPositive) {
|
|
14957
|
-
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14958
|
-
}
|
|
14959
|
-
if (negativeItems && negativeItems !== true) {
|
|
14960
|
-
if (!this.negativeMap) {
|
|
14961
|
-
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14962
|
-
}
|
|
14963
|
-
this.negativeMap.clear();
|
|
14964
|
-
for (let k of negativeItems) {
|
|
14965
|
-
this.negativeMap.set(k, true);
|
|
14966
|
-
}
|
|
14967
|
-
if (this.positiveMap) {
|
|
14968
|
-
this.positiveMap.clear();
|
|
14969
|
-
}
|
|
14970
|
-
}
|
|
14971
|
-
if (positiveItems && positiveItems !== true) {
|
|
14972
|
-
if (!this.positiveMap) {
|
|
14973
|
-
this.positiveMap = /* @__PURE__ */ new Map();
|
|
14974
|
-
}
|
|
14975
|
-
this.positiveMap.clear();
|
|
14976
|
-
for (let k of positiveItems) {
|
|
14977
|
-
this.positiveMap.set(k, true);
|
|
14978
|
-
}
|
|
14979
|
-
if (this.negativeMap) {
|
|
14980
|
-
this.negativeMap.clear();
|
|
14981
|
-
}
|
|
14982
|
-
}
|
|
14983
|
-
}
|
|
14984
|
-
isDefaultNegativeSelection() {
|
|
14985
|
-
return this.allNegative;
|
|
14986
|
-
}
|
|
14987
|
-
isDefaultPositiveSelection() {
|
|
14988
|
-
return this.allPositive;
|
|
14989
|
-
}
|
|
14990
|
-
areAllNegative() {
|
|
14991
|
-
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
14992
|
-
}
|
|
14993
|
-
areAllPositive() {
|
|
14994
|
-
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
14995
|
-
}
|
|
14996
|
-
makeAllNegative() {
|
|
14997
|
-
this.update({
|
|
14998
|
-
negativeItems: true,
|
|
14999
|
-
positiveItems: []
|
|
15000
|
-
});
|
|
15001
|
-
}
|
|
15002
|
-
makeAllPositive() {
|
|
15003
|
-
this.update({
|
|
15004
|
-
positiveItems: true,
|
|
15005
|
-
negativeItems: []
|
|
15006
|
-
});
|
|
15007
|
-
}
|
|
15008
|
-
isItemPositive(key) {
|
|
15009
|
-
var _a, _b;
|
|
15010
|
-
if (this.allPositive === true) {
|
|
15011
|
-
if (this.allNegative === true) {
|
|
15012
|
-
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
15013
|
-
}
|
|
15014
|
-
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
15015
|
-
}
|
|
15016
|
-
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
15017
|
-
}
|
|
15018
|
-
isItemNegative(key) {
|
|
15019
|
-
return !this.isItemPositive(key);
|
|
15020
|
-
}
|
|
15021
|
-
setItemValue(key, shouldMakePositive) {
|
|
15022
|
-
var _a;
|
|
15023
|
-
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
15024
|
-
return;
|
|
15025
|
-
}
|
|
15026
|
-
if (shouldMakePositive) {
|
|
15027
|
-
if (this.allNegative === true) {
|
|
15028
|
-
if (!this.positiveMap) {
|
|
15029
|
-
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
15030
|
-
}
|
|
15031
|
-
this.positiveMap.set(key, true);
|
|
15032
|
-
} else if (this.allPositive === true) {
|
|
15033
|
-
if (!this.negativeMap) {
|
|
15034
|
-
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
15035
|
-
}
|
|
15036
|
-
this.negativeMap.delete(key);
|
|
15037
|
-
}
|
|
15038
|
-
} else {
|
|
15039
|
-
if (this.allPositive === true) {
|
|
15040
|
-
if (!this.negativeMap) {
|
|
15041
|
-
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
15042
|
-
}
|
|
15043
|
-
this.negativeMap.set(key, true);
|
|
15044
|
-
} else if (this.allNegative === true) {
|
|
15045
|
-
if (!this.positiveMap) {
|
|
15046
|
-
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
15047
|
-
}
|
|
15048
|
-
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
15049
|
-
}
|
|
15050
|
-
}
|
|
15051
|
-
}
|
|
15052
|
-
makeItemNegative(key) {
|
|
15053
|
-
this.setItemValue(key, false);
|
|
15054
|
-
}
|
|
15055
|
-
makeItemPositive(key) {
|
|
15056
|
-
this.setItemValue(key, true);
|
|
15057
|
-
}
|
|
15058
|
-
toggleItem(key) {
|
|
15059
|
-
this.setItemValue(key, !this.isItemPositive(key));
|
|
15060
|
-
}
|
|
15061
|
-
};
|
|
15062
|
-
|
|
15063
15187
|
// src/components/DataSource/RowDetailState.ts
|
|
15064
15188
|
var RowDetailState = class extends BooleanCollectionState {
|
|
15065
15189
|
constructor(state) {
|
|
@@ -17219,6 +17343,7 @@ var MultiRowSelector = class {
|
|
|
17219
17343
|
constructor(options) {
|
|
17220
17344
|
this.multiSelectStartIndex = 0;
|
|
17221
17345
|
this.getIdForIndex = options.getIdForIndex;
|
|
17346
|
+
this.isRowDisabledAt = options.isRowDisabledAt;
|
|
17222
17347
|
}
|
|
17223
17348
|
set rowSelectionState(rowSelectionState) {
|
|
17224
17349
|
this._rowSelectionState = rowSelectionState;
|
|
@@ -17231,6 +17356,9 @@ var MultiRowSelector = class {
|
|
|
17231
17356
|
const rowSelectionState = this.rowSelectionState;
|
|
17232
17357
|
for (let i = start; i <= end; i++) {
|
|
17233
17358
|
const id = this.getIdForIndex(i);
|
|
17359
|
+
if (this.isRowDisabledAt(i)) {
|
|
17360
|
+
continue;
|
|
17361
|
+
}
|
|
17234
17362
|
rowSelectionState.selectRow(id);
|
|
17235
17363
|
}
|
|
17236
17364
|
}
|
|
@@ -17239,6 +17367,9 @@ var MultiRowSelector = class {
|
|
|
17239
17367
|
const rowSelectionState = this.rowSelectionState;
|
|
17240
17368
|
for (let i = start; i <= end; i++) {
|
|
17241
17369
|
const id = this.getIdForIndex(i);
|
|
17370
|
+
if (this.isRowDisabledAt(i)) {
|
|
17371
|
+
continue;
|
|
17372
|
+
}
|
|
17242
17373
|
rowSelectionState.deselectRow(id);
|
|
17243
17374
|
}
|
|
17244
17375
|
}
|
|
@@ -18680,6 +18811,11 @@ function useComputed() {
|
|
|
18680
18811
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
18681
18812
|
const [multiRowSelector] = useState17(() => {
|
|
18682
18813
|
const multiRowSelector2 = new MultiRowSelector({
|
|
18814
|
+
isRowDisabledAt: (index) => {
|
|
18815
|
+
var _a2;
|
|
18816
|
+
const dataItem = getDataSourceState().dataArray[index];
|
|
18817
|
+
return (_a2 = dataItem == null ? void 0 : dataItem.rowDisabled) != null ? _a2 : false;
|
|
18818
|
+
},
|
|
18683
18819
|
getIdForIndex: (index) => {
|
|
18684
18820
|
var _a2;
|
|
18685
18821
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -18916,7 +19052,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18916
19052
|
}
|
|
18917
19053
|
let valid2 = isValidLicense(licenseKey, {
|
|
18918
19054
|
publishedAt: 1624970570587,
|
|
18919
|
-
version: "4.
|
|
19055
|
+
version: "4.4.0"
|
|
18920
19056
|
});
|
|
18921
19057
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18922
19058
|
return true;
|
|
@@ -19073,6 +19209,10 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
19073
19209
|
if (groupBy.length) {
|
|
19074
19210
|
return false;
|
|
19075
19211
|
}
|
|
19212
|
+
const rowInfo = dataArray[rowIndex];
|
|
19213
|
+
if (rowInfo == null ? void 0 : rowInfo.rowDisabled) {
|
|
19214
|
+
return false;
|
|
19215
|
+
}
|
|
19076
19216
|
if (selectionMode === "multi-row") {
|
|
19077
19217
|
if (renderSelectionCheckBox && !event.key) {
|
|
19078
19218
|
return false;
|
|
@@ -19120,6 +19260,23 @@ function clamp(value, min, max) {
|
|
|
19120
19260
|
}
|
|
19121
19261
|
|
|
19122
19262
|
// src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts
|
|
19263
|
+
function getNextEnabledRowIndex(getDataSourceState, activeRowIndex, direction) {
|
|
19264
|
+
const dataArray = getDataSourceState().dataArray;
|
|
19265
|
+
const min = 0;
|
|
19266
|
+
const max = dataArray.length - 1;
|
|
19267
|
+
let i = activeRowIndex;
|
|
19268
|
+
do {
|
|
19269
|
+
i += direction;
|
|
19270
|
+
const rowInfo = dataArray[i];
|
|
19271
|
+
if (!rowInfo) {
|
|
19272
|
+
return i < min ? min : max;
|
|
19273
|
+
}
|
|
19274
|
+
if (!rowInfo.rowDisabled) {
|
|
19275
|
+
return i;
|
|
19276
|
+
}
|
|
19277
|
+
} while (i >= min && i <= max);
|
|
19278
|
+
return clamp(i, min, max);
|
|
19279
|
+
}
|
|
19123
19280
|
function handleRowNavigation(options, event) {
|
|
19124
19281
|
const { getState, getDataSourceState, actions, api } = options;
|
|
19125
19282
|
const { key } = event;
|
|
@@ -19141,10 +19298,18 @@ function handleRowNavigation(options, event) {
|
|
|
19141
19298
|
const max = arrLength - 1;
|
|
19142
19299
|
const KeyToFunction = {
|
|
19143
19300
|
ArrowDown: () => {
|
|
19144
|
-
activeRowIndex =
|
|
19301
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19302
|
+
getDataSourceState,
|
|
19303
|
+
activeRowIndex,
|
|
19304
|
+
1
|
|
19305
|
+
);
|
|
19145
19306
|
},
|
|
19146
19307
|
ArrowUp: () => {
|
|
19147
|
-
activeRowIndex =
|
|
19308
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19309
|
+
getDataSourceState,
|
|
19310
|
+
activeRowIndex,
|
|
19311
|
+
-1
|
|
19312
|
+
);
|
|
19148
19313
|
},
|
|
19149
19314
|
ArrowLeft: () => {
|
|
19150
19315
|
const rowInfo = dataArray[activeRowIndex];
|
|
@@ -22644,7 +22809,8 @@ function InfiniteTableBody() {
|
|
|
22644
22809
|
bodySize,
|
|
22645
22810
|
activeCellIndex,
|
|
22646
22811
|
rowDetailRenderer,
|
|
22647
|
-
showHoverRows
|
|
22812
|
+
showHoverRows,
|
|
22813
|
+
domProps
|
|
22648
22814
|
} = componentState;
|
|
22649
22815
|
const LoadMaskCmp = (_a = components2 == null ? void 0 : components2.LoadMask) != null ? _a : LoadMask;
|
|
22650
22816
|
const computed = getComputed();
|
|
@@ -22697,11 +22863,13 @@ function InfiniteTableBody() {
|
|
|
22697
22863
|
bodySize,
|
|
22698
22864
|
computed
|
|
22699
22865
|
});
|
|
22866
|
+
const { autoFocus, tabIndex } = domProps != null ? domProps : {};
|
|
22700
22867
|
return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
|
|
22701
22868
|
HeadlessTable,
|
|
22702
22869
|
{
|
|
22703
22870
|
debugId,
|
|
22704
|
-
tabIndex: 0,
|
|
22871
|
+
tabIndex: tabIndex != null ? tabIndex : 0,
|
|
22872
|
+
autoFocus: autoFocus != null ? autoFocus : void 0,
|
|
22705
22873
|
activeRowIndex: componentState.ready && keyboardNavigation === "row" ? activeRowIndex : null,
|
|
22706
22874
|
activeCellIndex: componentState.ready && keyboardNavigation === "cell" && // we want to hide the active cell indicator while column reodering is happening
|
|
22707
22875
|
!componentState.columnReorderDragColumnId ? activeCellIndex : null,
|
|
@@ -22719,6 +22887,7 @@ function InfiniteTableBody() {
|
|
|
22719
22887
|
}
|
|
22720
22888
|
var InfiniteTableComponent = React68.memo(
|
|
22721
22889
|
function InfiniteTableComponent2() {
|
|
22890
|
+
var _a;
|
|
22722
22891
|
const context = useInfiniteTable();
|
|
22723
22892
|
const masterContext = useMasterDetailContext();
|
|
22724
22893
|
const { state: componentState, api, children: initialChildren } = context;
|
|
@@ -22762,7 +22931,17 @@ var InfiniteTableComponent = React68.memo(
|
|
|
22762
22931
|
return brain.onVerticalRenderRangeChange(onChange);
|
|
22763
22932
|
}, [brain, scrollStopDelay]);
|
|
22764
22933
|
const licenseValid = useLicense(licenseKey);
|
|
22765
|
-
const
|
|
22934
|
+
const _b = (_a = componentState.domProps) != null ? _a : {}, {
|
|
22935
|
+
autoFocus: _,
|
|
22936
|
+
tabIndex: __
|
|
22937
|
+
} = _b, initialDOMProps = __objRest(_b, [
|
|
22938
|
+
// remove autoFocus and tabIndex from the domProps
|
|
22939
|
+
// that will be spread on the root DOM element
|
|
22940
|
+
// as they are meant for the scroller element
|
|
22941
|
+
"autoFocus",
|
|
22942
|
+
"tabIndex"
|
|
22943
|
+
]);
|
|
22944
|
+
const domProps = useDOMProps(initialDOMProps);
|
|
22766
22945
|
React68.useEffect(() => {
|
|
22767
22946
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
22768
22947
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|