@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.js
CHANGED
|
@@ -1265,7 +1265,8 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1265
1265
|
onContainerScroll,
|
|
1266
1266
|
className,
|
|
1267
1267
|
tabIndex,
|
|
1268
|
-
style: style2
|
|
1268
|
+
style: style2,
|
|
1269
|
+
autoFocus
|
|
1269
1270
|
} = props;
|
|
1270
1271
|
const domRef = ref != null ? ref : (0, import_react4.useRef)(null);
|
|
1271
1272
|
useOnScroll(domRef, onContainerScroll);
|
|
@@ -1274,6 +1275,7 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1274
1275
|
{
|
|
1275
1276
|
ref: domRef,
|
|
1276
1277
|
style: style2,
|
|
1278
|
+
autoFocus,
|
|
1277
1279
|
tabIndex,
|
|
1278
1280
|
className: join(
|
|
1279
1281
|
className,
|
|
@@ -1447,7 +1449,7 @@ var internalProps = {
|
|
|
1447
1449
|
};
|
|
1448
1450
|
|
|
1449
1451
|
// src/components/InfiniteTable/vars.css.ts
|
|
1450
|
-
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)" } } };
|
|
1452
|
+
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)" } } };
|
|
1451
1453
|
var columnHeaderHeightName = "column-header-height";
|
|
1452
1454
|
|
|
1453
1455
|
// src/components/InfiniteTable/utils/infiniteDOMUtils.ts
|
|
@@ -4169,7 +4171,7 @@ var ActiveCellIndicatorCls = { visible: "ActiveCellIndicator_ActiveCellIndicator
|
|
|
4169
4171
|
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";
|
|
4170
4172
|
|
|
4171
4173
|
// src/components/InfiniteTable/components/ActiveRowIndicator.css.ts
|
|
4172
|
-
var ActiveRowIndicatorCls = { visible: "ActiveRowIndicator_ActiveRowIndicatorCls_visible__j26lrx1 ActiveRowIndicator_ActiveRowIndicator__j26lrx0 utilities_pointerEvents_none__16lm1iwl utilities_position_absolute__16lm1iw2
|
|
4174
|
+
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" };
|
|
4173
4175
|
|
|
4174
4176
|
// src/components/InfiniteTable/components/ActiveRowIndicator.tsx
|
|
4175
4177
|
var { rootClassName: rootClassName3 } = internalProps;
|
|
@@ -4177,7 +4179,8 @@ var baseCls = `${rootClassName3}-ActiveRowIndicator`;
|
|
|
4177
4179
|
var ActiveStyle = {
|
|
4178
4180
|
[stripVar(InternalVars.activeCellOffsetY)]: InternalVars.activeCellRowOffset,
|
|
4179
4181
|
transform: `translate3d(0px, calc( ${InternalVars.activeCellOffsetY} + var(${stripVar(InternalVars.scrollTopForActiveRow)}, 0px)), 0px)`,
|
|
4180
|
-
height: InternalVars.activeCellRowHeight
|
|
4182
|
+
height: InternalVars.activeCellRowHeight,
|
|
4183
|
+
maxWidth: ThemeVars.runtime.totalVisibleColumnsWidth
|
|
4181
4184
|
};
|
|
4182
4185
|
var ActiveRowIndicatorFn = (props) => {
|
|
4183
4186
|
const { brain } = props;
|
|
@@ -4345,6 +4348,7 @@ function HeadlessTable(props) {
|
|
|
4345
4348
|
"activeCellIndex",
|
|
4346
4349
|
"onRenderUpdater"
|
|
4347
4350
|
]);
|
|
4351
|
+
const { autoFocus } = domProps;
|
|
4348
4352
|
const domRef = (0, import_react10.useRef)(null);
|
|
4349
4353
|
const [scrollSize, setTotalScrollSize] = (0, import_react10.useState)({
|
|
4350
4354
|
width: 0,
|
|
@@ -4361,6 +4365,9 @@ function HeadlessTable(props) {
|
|
|
4361
4365
|
if (!node) {
|
|
4362
4366
|
return;
|
|
4363
4367
|
}
|
|
4368
|
+
if (autoFocus && document.activeElement !== node) {
|
|
4369
|
+
node.focus();
|
|
4370
|
+
}
|
|
4364
4371
|
const onResize = () => {
|
|
4365
4372
|
const size = {
|
|
4366
4373
|
height: node.clientHeight,
|
|
@@ -5123,22 +5130,22 @@ var createRuntimeFn = (config) => {
|
|
|
5123
5130
|
|
|
5124
5131
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5125
5132
|
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";
|
|
5126
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5133
|
+
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: [] });
|
|
5127
5134
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
|
|
5128
|
-
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: "
|
|
5135
|
+
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"]] });
|
|
5129
5136
|
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"]] });
|
|
5130
|
-
var HeaderFilterEditorCls = "
|
|
5137
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12k utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5131
5138
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5132
|
-
var HeaderFilterOperatorCls = "
|
|
5133
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5134
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5135
|
-
var HeaderGroupCls = "
|
|
5136
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5139
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5140
|
+
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: [] });
|
|
5141
|
+
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: [] });
|
|
5142
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12c utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5143
|
+
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"]] });
|
|
5137
5144
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5138
5145
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5139
5146
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5140
5147
|
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: [] });
|
|
5141
|
-
var HeaderWrapperCls = "
|
|
5148
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12b utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5142
5149
|
|
|
5143
5150
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5144
5151
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6584,6 +6591,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6584
6591
|
rowActive: extraFlags.rowActive,
|
|
6585
6592
|
dragging: extraFlags.dragging,
|
|
6586
6593
|
firstRow: (_b = extraFlags.firstRow) != null ? _b : false,
|
|
6594
|
+
rowDisabled: extraFlags.rowDisabled,
|
|
6587
6595
|
groupRow: extraFlags.groupRow,
|
|
6588
6596
|
groupCell: extraFlags.groupCell,
|
|
6589
6597
|
verticalAlign: extraFlags.verticalAlign,
|
|
@@ -6616,6 +6624,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6616
6624
|
if (extraFlags.firstRow) {
|
|
6617
6625
|
result.push(...baseClasses.map((c) => `${c}--first-row`));
|
|
6618
6626
|
}
|
|
6627
|
+
if (extraFlags.rowDisabled) {
|
|
6628
|
+
result.push(...baseClasses.map((c) => `${c}--disabled`));
|
|
6629
|
+
}
|
|
6619
6630
|
if (extraFlags.groupRow) {
|
|
6620
6631
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6621
6632
|
result.push(
|
|
@@ -6670,6 +6681,10 @@ var publicRuntimeVars = {
|
|
|
6670
6681
|
visibleColumnsCount: {
|
|
6671
6682
|
name: stripVar(ThemeVars.runtime.visibleColumnsCount),
|
|
6672
6683
|
value: ""
|
|
6684
|
+
},
|
|
6685
|
+
browserScrollbarWidth: {
|
|
6686
|
+
name: stripVar(ThemeVars.runtime.browserScrollbarWidth),
|
|
6687
|
+
value: ""
|
|
6673
6688
|
}
|
|
6674
6689
|
};
|
|
6675
6690
|
var scrollbarWidthHorizontal = stripVar(
|
|
@@ -6753,6 +6768,9 @@ function useDOMProps(initialDOMProps) {
|
|
|
6753
6768
|
},
|
|
6754
6769
|
{}
|
|
6755
6770
|
);
|
|
6771
|
+
if (bodySize.width) {
|
|
6772
|
+
cssVars[publicRuntimeVars.browserScrollbarWidth.name] = `${getScrollbarWidth()}px`;
|
|
6773
|
+
}
|
|
6756
6774
|
cssVars[publicRuntimeVars.bodyWidth.name] = `calc(${InternalVars.bodyWidth} - ${InternalVars.scrollbarWidthVertical})`;
|
|
6757
6775
|
cssVars[publicRuntimeVars.totalVisibleColumnsWidth.name] = `${computedPinnedStartColumnsWidth + computedPinnedEndColumnsWidth + computedUnpinnedColumnsWidth}px`;
|
|
6758
6776
|
cssVars[publicRuntimeVars.visibleColumnsCount.name] = computedVisibleColumns.length;
|
|
@@ -7646,9 +7664,8 @@ var LoadingIcon = (props) => {
|
|
|
7646
7664
|
};
|
|
7647
7665
|
|
|
7648
7666
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7649
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "
|
|
7650
|
-
var
|
|
7651
|
-
var RowHoverCls = "row_RowHoverCls__7pupv01";
|
|
7667
|
+
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: [] });
|
|
7668
|
+
var RowHoverCls = "row_RowHoverCls__7pupv00";
|
|
7652
7669
|
|
|
7653
7670
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7654
7671
|
function styleForGroupColumn({
|
|
@@ -7819,7 +7836,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7819
7836
|
|
|
7820
7837
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7821
7838
|
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";
|
|
7822
|
-
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: "
|
|
7839
|
+
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"]] });
|
|
7823
7840
|
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: [] });
|
|
7824
7841
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7825
7842
|
|
|
@@ -8423,6 +8440,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8423
8440
|
api: imperativeApi,
|
|
8424
8441
|
dataSourceApi
|
|
8425
8442
|
};
|
|
8443
|
+
const rowDisabled = rowInfo.rowDisabled;
|
|
8426
8444
|
const visibleColumnsIds = computed.computedVisibleColumns.map((x) => x.id);
|
|
8427
8445
|
const colRenderingParams = getColumnRenderingParams({
|
|
8428
8446
|
column,
|
|
@@ -8464,14 +8482,16 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8464
8482
|
event
|
|
8465
8483
|
});
|
|
8466
8484
|
if (keyboardNavigation === "row") {
|
|
8467
|
-
|
|
8485
|
+
if (!rowDisabled) {
|
|
8486
|
+
componentActions.activeRowIndex = rowIndex;
|
|
8487
|
+
}
|
|
8468
8488
|
return;
|
|
8469
8489
|
}
|
|
8470
8490
|
if (keyboardNavigation === "cell") {
|
|
8471
8491
|
componentActions.activeCellIndex = [rowIndex, colIndex];
|
|
8472
8492
|
}
|
|
8473
8493
|
},
|
|
8474
|
-
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8494
|
+
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
8475
8495
|
);
|
|
8476
8496
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8477
8497
|
const cellSelected = renderParam.cellSelected;
|
|
@@ -8743,6 +8763,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8743
8763
|
zebra,
|
|
8744
8764
|
align: align2,
|
|
8745
8765
|
verticalAlign,
|
|
8766
|
+
rowDisabled,
|
|
8746
8767
|
rowActive,
|
|
8747
8768
|
cellSelected,
|
|
8748
8769
|
rowSelected,
|
|
@@ -9621,6 +9642,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9621
9642
|
verticalAlign,
|
|
9622
9643
|
rowSelected: false,
|
|
9623
9644
|
cellSelected: false,
|
|
9645
|
+
rowDisabled: false,
|
|
9624
9646
|
zebra: false,
|
|
9625
9647
|
rowActive: false,
|
|
9626
9648
|
firstRow: true,
|
|
@@ -10854,6 +10876,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10854
10876
|
//TODO improve this
|
|
10855
10877
|
collapsed: false,
|
|
10856
10878
|
dataSourceHasGrouping: true,
|
|
10879
|
+
rowDisabled: false,
|
|
10857
10880
|
isCellSelected: returnFalse,
|
|
10858
10881
|
hasSelectedCells: returnFalse,
|
|
10859
10882
|
selfLoaded,
|
|
@@ -10902,6 +10925,7 @@ function enhancedFlatten(param) {
|
|
|
10902
10925
|
withRowInfo,
|
|
10903
10926
|
toPrimaryKey,
|
|
10904
10927
|
groupRowsState,
|
|
10928
|
+
isRowDisabled,
|
|
10905
10929
|
isRowSelected,
|
|
10906
10930
|
rowSelectionState,
|
|
10907
10931
|
generateGroupRows,
|
|
@@ -10950,6 +10974,9 @@ function enhancedFlatten(param) {
|
|
|
10950
10974
|
enhancedGroupData.deselectedChildredCount = selectionCount.deselectedCount;
|
|
10951
10975
|
}
|
|
10952
10976
|
}
|
|
10977
|
+
if (isRowDisabled) {
|
|
10978
|
+
enhancedGroupData.rowDisabled = isRowDisabled(enhancedGroupData);
|
|
10979
|
+
}
|
|
10953
10980
|
const parent = parents[parents.length - 1];
|
|
10954
10981
|
const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
|
|
10955
10982
|
if (parentCollapsed) {
|
|
@@ -10997,6 +11024,7 @@ function enhancedFlatten(param) {
|
|
|
10997
11024
|
isGroupRow: false,
|
|
10998
11025
|
selfLoaded: !!item,
|
|
10999
11026
|
rowSelected: false,
|
|
11027
|
+
rowDisabled: false,
|
|
11000
11028
|
rootGroupBy: groupBy,
|
|
11001
11029
|
collapsed,
|
|
11002
11030
|
groupKeys,
|
|
@@ -11011,6 +11039,9 @@ function enhancedFlatten(param) {
|
|
|
11011
11039
|
if (isRowSelected) {
|
|
11012
11040
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
11013
11041
|
}
|
|
11042
|
+
if (isRowDisabled) {
|
|
11043
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
11044
|
+
}
|
|
11014
11045
|
if (withRowInfo) {
|
|
11015
11046
|
withRowInfo(rowInfo);
|
|
11016
11047
|
}
|
|
@@ -13318,7 +13349,7 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
13318
13349
|
function returnFalse2() {
|
|
13319
13350
|
return false;
|
|
13320
13351
|
}
|
|
13321
|
-
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
13352
|
+
function toRowInfo(data, id, index, isRowSelected, isRowDisabled, cellSelectionState) {
|
|
13322
13353
|
const rowInfo = {
|
|
13323
13354
|
dataSourceHasGrouping: false,
|
|
13324
13355
|
data,
|
|
@@ -13327,12 +13358,16 @@ function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
|
13327
13358
|
isGroupRow: false,
|
|
13328
13359
|
selfLoaded: true,
|
|
13329
13360
|
rowSelected: false,
|
|
13361
|
+
rowDisabled: false,
|
|
13330
13362
|
isCellSelected: returnFalse2,
|
|
13331
13363
|
hasSelectedCells: returnFalse2
|
|
13332
13364
|
};
|
|
13333
13365
|
if (isRowSelected) {
|
|
13334
13366
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
13335
13367
|
}
|
|
13368
|
+
if (isRowDisabled) {
|
|
13369
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
13370
|
+
}
|
|
13336
13371
|
if (cellSelectionState) {
|
|
13337
13372
|
rowInfo.isCellSelected = (colId) => {
|
|
13338
13373
|
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
@@ -13535,6 +13570,7 @@ function concludeReducer(params) {
|
|
|
13535
13570
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
13536
13571
|
);
|
|
13537
13572
|
} : void 0;
|
|
13573
|
+
const isRowDisabled = state.isRowDisabled || returnFalse2;
|
|
13538
13574
|
if (state.isRowSelected && state.selectionMode === "multi-row") {
|
|
13539
13575
|
isRowSelected = (rowInfo) => state.isRowSelected(
|
|
13540
13576
|
rowInfo,
|
|
@@ -13654,6 +13690,7 @@ function concludeReducer(params) {
|
|
|
13654
13690
|
data ? toPrimaryKey(data) : index,
|
|
13655
13691
|
index,
|
|
13656
13692
|
isRowSelected,
|
|
13693
|
+
isRowDisabled,
|
|
13657
13694
|
cellSelectionState
|
|
13658
13695
|
);
|
|
13659
13696
|
if (rowInfoReducerResults) {
|
|
@@ -14386,6 +14423,203 @@ var normalizeSortInfo = (initialSortInfo, weakMap3) => {
|
|
|
14386
14423
|
return result;
|
|
14387
14424
|
};
|
|
14388
14425
|
|
|
14426
|
+
// src/components/DataSource/BooleanCollectionState.ts
|
|
14427
|
+
var BooleanCollectionState = class {
|
|
14428
|
+
constructor(state) {
|
|
14429
|
+
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14430
|
+
//@ts-ignore
|
|
14431
|
+
state.getState()
|
|
14432
|
+
) : state;
|
|
14433
|
+
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14434
|
+
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14435
|
+
this.update({
|
|
14436
|
+
negativeItems,
|
|
14437
|
+
positiveItems
|
|
14438
|
+
});
|
|
14439
|
+
}
|
|
14440
|
+
getInitialState() {
|
|
14441
|
+
return this.initialState;
|
|
14442
|
+
}
|
|
14443
|
+
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14444
|
+
// return {
|
|
14445
|
+
// positiveItems: this.allPositive
|
|
14446
|
+
// ? true
|
|
14447
|
+
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14448
|
+
// negativeItems: this.allNegative
|
|
14449
|
+
// ? true
|
|
14450
|
+
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14451
|
+
// };
|
|
14452
|
+
// }
|
|
14453
|
+
destroy() {
|
|
14454
|
+
var _a, _b;
|
|
14455
|
+
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14456
|
+
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14457
|
+
delete this.positiveMap;
|
|
14458
|
+
delete this.negativeMap;
|
|
14459
|
+
}
|
|
14460
|
+
update(state) {
|
|
14461
|
+
const { positiveItems, negativeItems } = state;
|
|
14462
|
+
this.allNegative = negativeItems === true;
|
|
14463
|
+
this.allPositive = positiveItems === true;
|
|
14464
|
+
if (this.allNegative && this.allPositive) {
|
|
14465
|
+
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14466
|
+
}
|
|
14467
|
+
if (negativeItems && negativeItems !== true) {
|
|
14468
|
+
if (!this.negativeMap) {
|
|
14469
|
+
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14470
|
+
}
|
|
14471
|
+
this.negativeMap.clear();
|
|
14472
|
+
for (let k of negativeItems) {
|
|
14473
|
+
this.negativeMap.set(k, true);
|
|
14474
|
+
}
|
|
14475
|
+
if (this.positiveMap) {
|
|
14476
|
+
this.positiveMap.clear();
|
|
14477
|
+
}
|
|
14478
|
+
}
|
|
14479
|
+
if (positiveItems && positiveItems !== true) {
|
|
14480
|
+
if (!this.positiveMap) {
|
|
14481
|
+
this.positiveMap = /* @__PURE__ */ new Map();
|
|
14482
|
+
}
|
|
14483
|
+
this.positiveMap.clear();
|
|
14484
|
+
for (let k of positiveItems) {
|
|
14485
|
+
this.positiveMap.set(k, true);
|
|
14486
|
+
}
|
|
14487
|
+
if (this.negativeMap) {
|
|
14488
|
+
this.negativeMap.clear();
|
|
14489
|
+
}
|
|
14490
|
+
}
|
|
14491
|
+
}
|
|
14492
|
+
isDefaultNegativeSelection() {
|
|
14493
|
+
return this.allNegative;
|
|
14494
|
+
}
|
|
14495
|
+
isDefaultPositiveSelection() {
|
|
14496
|
+
return this.allPositive;
|
|
14497
|
+
}
|
|
14498
|
+
areAllNegative() {
|
|
14499
|
+
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
14500
|
+
}
|
|
14501
|
+
areAllPositive() {
|
|
14502
|
+
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
14503
|
+
}
|
|
14504
|
+
makeAllNegative() {
|
|
14505
|
+
this.update({
|
|
14506
|
+
negativeItems: true,
|
|
14507
|
+
positiveItems: []
|
|
14508
|
+
});
|
|
14509
|
+
}
|
|
14510
|
+
makeAllPositive() {
|
|
14511
|
+
this.update({
|
|
14512
|
+
positiveItems: true,
|
|
14513
|
+
negativeItems: []
|
|
14514
|
+
});
|
|
14515
|
+
}
|
|
14516
|
+
isItemPositive(key) {
|
|
14517
|
+
var _a, _b;
|
|
14518
|
+
if (this.allPositive === true) {
|
|
14519
|
+
if (this.allNegative === true) {
|
|
14520
|
+
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
14521
|
+
}
|
|
14522
|
+
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
14523
|
+
}
|
|
14524
|
+
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
14525
|
+
}
|
|
14526
|
+
isItemNegative(key) {
|
|
14527
|
+
return !this.isItemPositive(key);
|
|
14528
|
+
}
|
|
14529
|
+
setItemValue(key, shouldMakePositive) {
|
|
14530
|
+
var _a;
|
|
14531
|
+
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
14532
|
+
return;
|
|
14533
|
+
}
|
|
14534
|
+
if (shouldMakePositive) {
|
|
14535
|
+
if (this.allNegative === true) {
|
|
14536
|
+
if (!this.positiveMap) {
|
|
14537
|
+
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
14538
|
+
}
|
|
14539
|
+
this.positiveMap.set(key, true);
|
|
14540
|
+
} else if (this.allPositive === true) {
|
|
14541
|
+
if (!this.negativeMap) {
|
|
14542
|
+
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
14543
|
+
}
|
|
14544
|
+
this.negativeMap.delete(key);
|
|
14545
|
+
}
|
|
14546
|
+
} else {
|
|
14547
|
+
if (this.allPositive === true) {
|
|
14548
|
+
if (!this.negativeMap) {
|
|
14549
|
+
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
14550
|
+
}
|
|
14551
|
+
this.negativeMap.set(key, true);
|
|
14552
|
+
} else if (this.allNegative === true) {
|
|
14553
|
+
if (!this.positiveMap) {
|
|
14554
|
+
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
14555
|
+
}
|
|
14556
|
+
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
14557
|
+
}
|
|
14558
|
+
}
|
|
14559
|
+
}
|
|
14560
|
+
makeItemNegative(key) {
|
|
14561
|
+
this.setItemValue(key, false);
|
|
14562
|
+
}
|
|
14563
|
+
makeItemPositive(key) {
|
|
14564
|
+
this.setItemValue(key, true);
|
|
14565
|
+
}
|
|
14566
|
+
toggleItem(key) {
|
|
14567
|
+
this.setItemValue(key, !this.isItemPositive(key));
|
|
14568
|
+
}
|
|
14569
|
+
};
|
|
14570
|
+
|
|
14571
|
+
// src/components/DataSource/RowDisabledState.ts
|
|
14572
|
+
var RowDisabledState = class extends BooleanCollectionState {
|
|
14573
|
+
constructor(state) {
|
|
14574
|
+
super(state);
|
|
14575
|
+
this.isRowEnabled = (key) => {
|
|
14576
|
+
return !!this.isItemPositive(key);
|
|
14577
|
+
};
|
|
14578
|
+
}
|
|
14579
|
+
getState() {
|
|
14580
|
+
var _a, _b, _c, _d;
|
|
14581
|
+
const enabledRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
|
|
14582
|
+
const disabledRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
|
|
14583
|
+
return {
|
|
14584
|
+
enabledRows,
|
|
14585
|
+
disabledRows
|
|
14586
|
+
};
|
|
14587
|
+
}
|
|
14588
|
+
getPositiveFromState(state) {
|
|
14589
|
+
return state.enabledRows;
|
|
14590
|
+
}
|
|
14591
|
+
getNegativeFromState(state) {
|
|
14592
|
+
return state.disabledRows;
|
|
14593
|
+
}
|
|
14594
|
+
areAllDisabled() {
|
|
14595
|
+
return this.areAllNegative();
|
|
14596
|
+
}
|
|
14597
|
+
areAllEnabled() {
|
|
14598
|
+
return this.areAllPositive();
|
|
14599
|
+
}
|
|
14600
|
+
disableAll() {
|
|
14601
|
+
this.makeAllNegative();
|
|
14602
|
+
}
|
|
14603
|
+
enableAll() {
|
|
14604
|
+
this.makeAllPositive();
|
|
14605
|
+
}
|
|
14606
|
+
isRowDisabled(key) {
|
|
14607
|
+
return !this.isRowEnabled(key);
|
|
14608
|
+
}
|
|
14609
|
+
setRowEnabled(key, shouldExpand) {
|
|
14610
|
+
return this.setItemValue(key, shouldExpand);
|
|
14611
|
+
}
|
|
14612
|
+
disableRow(key) {
|
|
14613
|
+
this.setRowEnabled(key, false);
|
|
14614
|
+
}
|
|
14615
|
+
enableRow(key) {
|
|
14616
|
+
this.setRowEnabled(key, true);
|
|
14617
|
+
}
|
|
14618
|
+
toggleRow(key) {
|
|
14619
|
+
this.toggleItem(key);
|
|
14620
|
+
}
|
|
14621
|
+
};
|
|
14622
|
+
|
|
14389
14623
|
// src/components/DataSource/state/getInitialState.ts
|
|
14390
14624
|
var DataSourceLogger = dbg("DataSource");
|
|
14391
14625
|
var defaultCursorId = Symbol("cursorId");
|
|
@@ -14426,7 +14660,8 @@ function initSetupState() {
|
|
|
14426
14660
|
cursorId: defaultCursorId,
|
|
14427
14661
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
14428
14662
|
propsCache: /* @__PURE__ */ new Map([
|
|
14429
|
-
["sortInfo", /* @__PURE__ */ new WeakMap()]
|
|
14663
|
+
["sortInfo", /* @__PURE__ */ new WeakMap()],
|
|
14664
|
+
["rowDisabledState", /* @__PURE__ */ new WeakMap()]
|
|
14430
14665
|
]),
|
|
14431
14666
|
rowInfoReducerResults: void 0,
|
|
14432
14667
|
pivotMappings: void 0,
|
|
@@ -14500,6 +14735,26 @@ var forwardProps3 = (setupState) => {
|
|
|
14500
14735
|
},
|
|
14501
14736
|
batchOperationDelay: 1,
|
|
14502
14737
|
isRowSelected: 1,
|
|
14738
|
+
isRowDisabled: 1,
|
|
14739
|
+
rowDisabledState: (rowDisabledState) => {
|
|
14740
|
+
var _a;
|
|
14741
|
+
if (!rowDisabledState) {
|
|
14742
|
+
return null;
|
|
14743
|
+
}
|
|
14744
|
+
if (rowDisabledState instanceof RowDisabledState) {
|
|
14745
|
+
return rowDisabledState;
|
|
14746
|
+
}
|
|
14747
|
+
const wMap = (_a = setupState.propsCache.get("rowDisabledState")) != null ? _a : weakMap;
|
|
14748
|
+
let cachedRowDisabledState = wMap.get(
|
|
14749
|
+
rowDisabledState
|
|
14750
|
+
);
|
|
14751
|
+
if (!cachedRowDisabledState) {
|
|
14752
|
+
cachedRowDisabledState = new RowDisabledState(rowDisabledState);
|
|
14753
|
+
wMap.set(rowDisabledState, cachedRowDisabledState);
|
|
14754
|
+
}
|
|
14755
|
+
rowDisabledState = cachedRowDisabledState;
|
|
14756
|
+
return rowDisabledState != null ? rowDisabledState : null;
|
|
14757
|
+
},
|
|
14503
14758
|
onDataArrayChange: 1,
|
|
14504
14759
|
onDataMutations: 1,
|
|
14505
14760
|
aggregationReducers: 1,
|
|
@@ -14637,6 +14892,19 @@ function deriveStateFromProps(params) {
|
|
|
14637
14892
|
const sortMode = props.sortFunction ? "local" : propsSortMode != null ? propsSortMode : controlledSort ? "remote" : "local";
|
|
14638
14893
|
const filterMode = typeof props.filterFunction === "function" ? "local" : propsFilterMode != null ? propsFilterMode : typeof props.data === "function" ? "remote" : "local";
|
|
14639
14894
|
const pivotMode = shouldReloadData.pivotBy ? "remote" : "local";
|
|
14895
|
+
const rowDisabledState = state.rowDisabledState;
|
|
14896
|
+
let isRowDisabled = props.isRowDisabled;
|
|
14897
|
+
if (!isRowDisabled && rowDisabledState) {
|
|
14898
|
+
const cachedIsRowDisabled = weakMap.get(rowDisabledState);
|
|
14899
|
+
if (cachedIsRowDisabled) {
|
|
14900
|
+
isRowDisabled = cachedIsRowDisabled;
|
|
14901
|
+
} else {
|
|
14902
|
+
isRowDisabled = (rowInfo) => {
|
|
14903
|
+
return rowDisabledState.isRowDisabled(rowInfo.id);
|
|
14904
|
+
};
|
|
14905
|
+
weakMap.set(rowDisabledState, isRowDisabled);
|
|
14906
|
+
}
|
|
14907
|
+
}
|
|
14640
14908
|
const result = {
|
|
14641
14909
|
selectionMode,
|
|
14642
14910
|
groupRowsState,
|
|
@@ -14653,6 +14921,7 @@ function deriveStateFromProps(params) {
|
|
|
14653
14921
|
groupBy: (_j = (_i = props.shouldReloadData) == null ? void 0 : _i.groupBy) != null ? _j : groupMode === "remote",
|
|
14654
14922
|
pivotBy: (_l = (_k = props.shouldReloadData) == null ? void 0 : _k.pivotBy) != null ? _l : pivotMode === "remote"
|
|
14655
14923
|
},
|
|
14924
|
+
isRowDisabled,
|
|
14656
14925
|
rowSelection: rowSelectionState,
|
|
14657
14926
|
cellSelection: cellSelectionState,
|
|
14658
14927
|
groupMode,
|
|
@@ -14947,151 +15216,6 @@ function useDataSourceInternal(props) {
|
|
|
14947
15216
|
};
|
|
14948
15217
|
}
|
|
14949
15218
|
|
|
14950
|
-
// src/components/DataSource/BooleanCollectionState.ts
|
|
14951
|
-
var BooleanCollectionState = class {
|
|
14952
|
-
constructor(state) {
|
|
14953
|
-
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14954
|
-
//@ts-ignore
|
|
14955
|
-
state.getState()
|
|
14956
|
-
) : state;
|
|
14957
|
-
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14958
|
-
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14959
|
-
this.update({
|
|
14960
|
-
negativeItems,
|
|
14961
|
-
positiveItems
|
|
14962
|
-
});
|
|
14963
|
-
}
|
|
14964
|
-
getInitialState() {
|
|
14965
|
-
return this.initialState;
|
|
14966
|
-
}
|
|
14967
|
-
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14968
|
-
// return {
|
|
14969
|
-
// positiveItems: this.allPositive
|
|
14970
|
-
// ? true
|
|
14971
|
-
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14972
|
-
// negativeItems: this.allNegative
|
|
14973
|
-
// ? true
|
|
14974
|
-
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14975
|
-
// };
|
|
14976
|
-
// }
|
|
14977
|
-
destroy() {
|
|
14978
|
-
var _a, _b;
|
|
14979
|
-
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14980
|
-
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14981
|
-
delete this.positiveMap;
|
|
14982
|
-
delete this.negativeMap;
|
|
14983
|
-
}
|
|
14984
|
-
update(state) {
|
|
14985
|
-
const { positiveItems, negativeItems } = state;
|
|
14986
|
-
this.allNegative = negativeItems === true;
|
|
14987
|
-
this.allPositive = positiveItems === true;
|
|
14988
|
-
if (this.allNegative && this.allPositive) {
|
|
14989
|
-
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14990
|
-
}
|
|
14991
|
-
if (negativeItems && negativeItems !== true) {
|
|
14992
|
-
if (!this.negativeMap) {
|
|
14993
|
-
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14994
|
-
}
|
|
14995
|
-
this.negativeMap.clear();
|
|
14996
|
-
for (let k of negativeItems) {
|
|
14997
|
-
this.negativeMap.set(k, true);
|
|
14998
|
-
}
|
|
14999
|
-
if (this.positiveMap) {
|
|
15000
|
-
this.positiveMap.clear();
|
|
15001
|
-
}
|
|
15002
|
-
}
|
|
15003
|
-
if (positiveItems && positiveItems !== true) {
|
|
15004
|
-
if (!this.positiveMap) {
|
|
15005
|
-
this.positiveMap = /* @__PURE__ */ new Map();
|
|
15006
|
-
}
|
|
15007
|
-
this.positiveMap.clear();
|
|
15008
|
-
for (let k of positiveItems) {
|
|
15009
|
-
this.positiveMap.set(k, true);
|
|
15010
|
-
}
|
|
15011
|
-
if (this.negativeMap) {
|
|
15012
|
-
this.negativeMap.clear();
|
|
15013
|
-
}
|
|
15014
|
-
}
|
|
15015
|
-
}
|
|
15016
|
-
isDefaultNegativeSelection() {
|
|
15017
|
-
return this.allNegative;
|
|
15018
|
-
}
|
|
15019
|
-
isDefaultPositiveSelection() {
|
|
15020
|
-
return this.allPositive;
|
|
15021
|
-
}
|
|
15022
|
-
areAllNegative() {
|
|
15023
|
-
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
15024
|
-
}
|
|
15025
|
-
areAllPositive() {
|
|
15026
|
-
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
15027
|
-
}
|
|
15028
|
-
makeAllNegative() {
|
|
15029
|
-
this.update({
|
|
15030
|
-
negativeItems: true,
|
|
15031
|
-
positiveItems: []
|
|
15032
|
-
});
|
|
15033
|
-
}
|
|
15034
|
-
makeAllPositive() {
|
|
15035
|
-
this.update({
|
|
15036
|
-
positiveItems: true,
|
|
15037
|
-
negativeItems: []
|
|
15038
|
-
});
|
|
15039
|
-
}
|
|
15040
|
-
isItemPositive(key) {
|
|
15041
|
-
var _a, _b;
|
|
15042
|
-
if (this.allPositive === true) {
|
|
15043
|
-
if (this.allNegative === true) {
|
|
15044
|
-
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
15045
|
-
}
|
|
15046
|
-
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
15047
|
-
}
|
|
15048
|
-
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
15049
|
-
}
|
|
15050
|
-
isItemNegative(key) {
|
|
15051
|
-
return !this.isItemPositive(key);
|
|
15052
|
-
}
|
|
15053
|
-
setItemValue(key, shouldMakePositive) {
|
|
15054
|
-
var _a;
|
|
15055
|
-
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
15056
|
-
return;
|
|
15057
|
-
}
|
|
15058
|
-
if (shouldMakePositive) {
|
|
15059
|
-
if (this.allNegative === true) {
|
|
15060
|
-
if (!this.positiveMap) {
|
|
15061
|
-
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
15062
|
-
}
|
|
15063
|
-
this.positiveMap.set(key, true);
|
|
15064
|
-
} else if (this.allPositive === true) {
|
|
15065
|
-
if (!this.negativeMap) {
|
|
15066
|
-
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
15067
|
-
}
|
|
15068
|
-
this.negativeMap.delete(key);
|
|
15069
|
-
}
|
|
15070
|
-
} else {
|
|
15071
|
-
if (this.allPositive === true) {
|
|
15072
|
-
if (!this.negativeMap) {
|
|
15073
|
-
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
15074
|
-
}
|
|
15075
|
-
this.negativeMap.set(key, true);
|
|
15076
|
-
} else if (this.allNegative === true) {
|
|
15077
|
-
if (!this.positiveMap) {
|
|
15078
|
-
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
15079
|
-
}
|
|
15080
|
-
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
15081
|
-
}
|
|
15082
|
-
}
|
|
15083
|
-
}
|
|
15084
|
-
makeItemNegative(key) {
|
|
15085
|
-
this.setItemValue(key, false);
|
|
15086
|
-
}
|
|
15087
|
-
makeItemPositive(key) {
|
|
15088
|
-
this.setItemValue(key, true);
|
|
15089
|
-
}
|
|
15090
|
-
toggleItem(key) {
|
|
15091
|
-
this.setItemValue(key, !this.isItemPositive(key));
|
|
15092
|
-
}
|
|
15093
|
-
};
|
|
15094
|
-
|
|
15095
15219
|
// src/components/DataSource/RowDetailState.ts
|
|
15096
15220
|
var RowDetailState = class extends BooleanCollectionState {
|
|
15097
15221
|
constructor(state) {
|
|
@@ -17247,6 +17371,7 @@ var MultiRowSelector = class {
|
|
|
17247
17371
|
constructor(options) {
|
|
17248
17372
|
this.multiSelectStartIndex = 0;
|
|
17249
17373
|
this.getIdForIndex = options.getIdForIndex;
|
|
17374
|
+
this.isRowDisabledAt = options.isRowDisabledAt;
|
|
17250
17375
|
}
|
|
17251
17376
|
set rowSelectionState(rowSelectionState) {
|
|
17252
17377
|
this._rowSelectionState = rowSelectionState;
|
|
@@ -17259,6 +17384,9 @@ var MultiRowSelector = class {
|
|
|
17259
17384
|
const rowSelectionState = this.rowSelectionState;
|
|
17260
17385
|
for (let i = start; i <= end; i++) {
|
|
17261
17386
|
const id = this.getIdForIndex(i);
|
|
17387
|
+
if (this.isRowDisabledAt(i)) {
|
|
17388
|
+
continue;
|
|
17389
|
+
}
|
|
17262
17390
|
rowSelectionState.selectRow(id);
|
|
17263
17391
|
}
|
|
17264
17392
|
}
|
|
@@ -17267,6 +17395,9 @@ var MultiRowSelector = class {
|
|
|
17267
17395
|
const rowSelectionState = this.rowSelectionState;
|
|
17268
17396
|
for (let i = start; i <= end; i++) {
|
|
17269
17397
|
const id = this.getIdForIndex(i);
|
|
17398
|
+
if (this.isRowDisabledAt(i)) {
|
|
17399
|
+
continue;
|
|
17400
|
+
}
|
|
17270
17401
|
rowSelectionState.deselectRow(id);
|
|
17271
17402
|
}
|
|
17272
17403
|
}
|
|
@@ -18708,6 +18839,11 @@ function useComputed() {
|
|
|
18708
18839
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
18709
18840
|
const [multiRowSelector] = (0, import_react49.useState)(() => {
|
|
18710
18841
|
const multiRowSelector2 = new MultiRowSelector({
|
|
18842
|
+
isRowDisabledAt: (index) => {
|
|
18843
|
+
var _a2;
|
|
18844
|
+
const dataItem = getDataSourceState().dataArray[index];
|
|
18845
|
+
return (_a2 = dataItem == null ? void 0 : dataItem.rowDisabled) != null ? _a2 : false;
|
|
18846
|
+
},
|
|
18711
18847
|
getIdForIndex: (index) => {
|
|
18712
18848
|
var _a2;
|
|
18713
18849
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -18944,7 +19080,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18944
19080
|
}
|
|
18945
19081
|
let valid2 = isValidLicense(licenseKey, {
|
|
18946
19082
|
publishedAt: 1624970570587,
|
|
18947
|
-
version: "4.
|
|
19083
|
+
version: "4.4.0"
|
|
18948
19084
|
});
|
|
18949
19085
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18950
19086
|
return true;
|
|
@@ -19101,6 +19237,10 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
19101
19237
|
if (groupBy.length) {
|
|
19102
19238
|
return false;
|
|
19103
19239
|
}
|
|
19240
|
+
const rowInfo = dataArray[rowIndex];
|
|
19241
|
+
if (rowInfo == null ? void 0 : rowInfo.rowDisabled) {
|
|
19242
|
+
return false;
|
|
19243
|
+
}
|
|
19104
19244
|
if (selectionMode === "multi-row") {
|
|
19105
19245
|
if (renderSelectionCheckBox && !event.key) {
|
|
19106
19246
|
return false;
|
|
@@ -19148,6 +19288,23 @@ function clamp(value, min, max) {
|
|
|
19148
19288
|
}
|
|
19149
19289
|
|
|
19150
19290
|
// src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts
|
|
19291
|
+
function getNextEnabledRowIndex(getDataSourceState, activeRowIndex, direction) {
|
|
19292
|
+
const dataArray = getDataSourceState().dataArray;
|
|
19293
|
+
const min = 0;
|
|
19294
|
+
const max = dataArray.length - 1;
|
|
19295
|
+
let i = activeRowIndex;
|
|
19296
|
+
do {
|
|
19297
|
+
i += direction;
|
|
19298
|
+
const rowInfo = dataArray[i];
|
|
19299
|
+
if (!rowInfo) {
|
|
19300
|
+
return i < min ? min : max;
|
|
19301
|
+
}
|
|
19302
|
+
if (!rowInfo.rowDisabled) {
|
|
19303
|
+
return i;
|
|
19304
|
+
}
|
|
19305
|
+
} while (i >= min && i <= max);
|
|
19306
|
+
return clamp(i, min, max);
|
|
19307
|
+
}
|
|
19151
19308
|
function handleRowNavigation(options, event) {
|
|
19152
19309
|
const { getState, getDataSourceState, actions, api } = options;
|
|
19153
19310
|
const { key } = event;
|
|
@@ -19169,10 +19326,18 @@ function handleRowNavigation(options, event) {
|
|
|
19169
19326
|
const max = arrLength - 1;
|
|
19170
19327
|
const KeyToFunction = {
|
|
19171
19328
|
ArrowDown: () => {
|
|
19172
|
-
activeRowIndex =
|
|
19329
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19330
|
+
getDataSourceState,
|
|
19331
|
+
activeRowIndex,
|
|
19332
|
+
1
|
|
19333
|
+
);
|
|
19173
19334
|
},
|
|
19174
19335
|
ArrowUp: () => {
|
|
19175
|
-
activeRowIndex =
|
|
19336
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19337
|
+
getDataSourceState,
|
|
19338
|
+
activeRowIndex,
|
|
19339
|
+
-1
|
|
19340
|
+
);
|
|
19176
19341
|
},
|
|
19177
19342
|
ArrowLeft: () => {
|
|
19178
19343
|
const rowInfo = dataArray[activeRowIndex];
|
|
@@ -22662,7 +22827,8 @@ function InfiniteTableBody() {
|
|
|
22662
22827
|
bodySize,
|
|
22663
22828
|
activeCellIndex,
|
|
22664
22829
|
rowDetailRenderer,
|
|
22665
|
-
showHoverRows
|
|
22830
|
+
showHoverRows,
|
|
22831
|
+
domProps
|
|
22666
22832
|
} = componentState;
|
|
22667
22833
|
const LoadMaskCmp = (_a = components2 == null ? void 0 : components2.LoadMask) != null ? _a : LoadMask;
|
|
22668
22834
|
const computed = getComputed();
|
|
@@ -22715,11 +22881,13 @@ function InfiniteTableBody() {
|
|
|
22715
22881
|
bodySize,
|
|
22716
22882
|
computed
|
|
22717
22883
|
});
|
|
22884
|
+
const { autoFocus, tabIndex } = domProps != null ? domProps : {};
|
|
22718
22885
|
return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
|
|
22719
22886
|
HeadlessTable,
|
|
22720
22887
|
{
|
|
22721
22888
|
debugId,
|
|
22722
|
-
tabIndex: 0,
|
|
22889
|
+
tabIndex: tabIndex != null ? tabIndex : 0,
|
|
22890
|
+
autoFocus: autoFocus != null ? autoFocus : void 0,
|
|
22723
22891
|
activeRowIndex: componentState.ready && keyboardNavigation === "row" ? activeRowIndex : null,
|
|
22724
22892
|
activeCellIndex: componentState.ready && keyboardNavigation === "cell" && // we want to hide the active cell indicator while column reodering is happening
|
|
22725
22893
|
!componentState.columnReorderDragColumnId ? activeCellIndex : null,
|
|
@@ -22737,6 +22905,7 @@ function InfiniteTableBody() {
|
|
|
22737
22905
|
}
|
|
22738
22906
|
var InfiniteTableComponent = React68.memo(
|
|
22739
22907
|
function InfiniteTableComponent2() {
|
|
22908
|
+
var _a;
|
|
22740
22909
|
const context = useInfiniteTable();
|
|
22741
22910
|
const masterContext = useMasterDetailContext();
|
|
22742
22911
|
const { state: componentState, api, children: initialChildren } = context;
|
|
@@ -22780,7 +22949,17 @@ var InfiniteTableComponent = React68.memo(
|
|
|
22780
22949
|
return brain.onVerticalRenderRangeChange(onChange);
|
|
22781
22950
|
}, [brain, scrollStopDelay]);
|
|
22782
22951
|
const licenseValid = useLicense(licenseKey);
|
|
22783
|
-
const
|
|
22952
|
+
const _b = (_a = componentState.domProps) != null ? _a : {}, {
|
|
22953
|
+
autoFocus: _,
|
|
22954
|
+
tabIndex: __
|
|
22955
|
+
} = _b, initialDOMProps = __objRest(_b, [
|
|
22956
|
+
// remove autoFocus and tabIndex from the domProps
|
|
22957
|
+
// that will be spread on the root DOM element
|
|
22958
|
+
// as they are meant for the scroller element
|
|
22959
|
+
"autoFocus",
|
|
22960
|
+
"tabIndex"
|
|
22961
|
+
]);
|
|
22962
|
+
const domProps = useDOMProps(initialDOMProps);
|
|
22784
22963
|
React68.useEffect(() => {
|
|
22785
22964
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
22786
22965
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|