@infinite-table/infinite-react 4.3.9 → 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 +82 -67
- package/index.d.ts +97 -22
- package/index.dev.js +341 -170
- package/index.dev.mjs +341 -170
- package/index.js +341 -170
- package/index.mjs +341 -170
- 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)", 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)", 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
|
|
@@ -4346,6 +4348,7 @@ function HeadlessTable(props) {
|
|
|
4346
4348
|
"activeCellIndex",
|
|
4347
4349
|
"onRenderUpdater"
|
|
4348
4350
|
]);
|
|
4351
|
+
const { autoFocus } = domProps;
|
|
4349
4352
|
const domRef = (0, import_react10.useRef)(null);
|
|
4350
4353
|
const [scrollSize, setTotalScrollSize] = (0, import_react10.useState)({
|
|
4351
4354
|
width: 0,
|
|
@@ -4362,6 +4365,9 @@ function HeadlessTable(props) {
|
|
|
4362
4365
|
if (!node) {
|
|
4363
4366
|
return;
|
|
4364
4367
|
}
|
|
4368
|
+
if (autoFocus && document.activeElement !== node) {
|
|
4369
|
+
node.focus();
|
|
4370
|
+
}
|
|
4365
4371
|
const onResize = () => {
|
|
4366
4372
|
const size = {
|
|
4367
4373
|
height: node.clientHeight,
|
|
@@ -5124,22 +5130,22 @@ var createRuntimeFn = (config) => {
|
|
|
5124
5130
|
|
|
5125
5131
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5126
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";
|
|
5127
|
-
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: [] });
|
|
5128
5134
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
|
|
5129
|
-
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"]] });
|
|
5130
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"]] });
|
|
5131
|
-
var HeaderFilterEditorCls = "
|
|
5137
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12k utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5132
5138
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5133
|
-
var HeaderFilterOperatorCls = "
|
|
5134
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5135
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5136
|
-
var HeaderGroupCls = "
|
|
5137
|
-
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"]] });
|
|
5138
5144
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5139
5145
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5140
5146
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5141
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: [] });
|
|
5142
|
-
var HeaderWrapperCls = "
|
|
5148
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12b utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5143
5149
|
|
|
5144
5150
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5145
5151
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6585,6 +6591,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6585
6591
|
rowActive: extraFlags.rowActive,
|
|
6586
6592
|
dragging: extraFlags.dragging,
|
|
6587
6593
|
firstRow: (_b = extraFlags.firstRow) != null ? _b : false,
|
|
6594
|
+
rowDisabled: extraFlags.rowDisabled,
|
|
6588
6595
|
groupRow: extraFlags.groupRow,
|
|
6589
6596
|
groupCell: extraFlags.groupCell,
|
|
6590
6597
|
verticalAlign: extraFlags.verticalAlign,
|
|
@@ -6617,6 +6624,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6617
6624
|
if (extraFlags.firstRow) {
|
|
6618
6625
|
result.push(...baseClasses.map((c) => `${c}--first-row`));
|
|
6619
6626
|
}
|
|
6627
|
+
if (extraFlags.rowDisabled) {
|
|
6628
|
+
result.push(...baseClasses.map((c) => `${c}--disabled`));
|
|
6629
|
+
}
|
|
6620
6630
|
if (extraFlags.groupRow) {
|
|
6621
6631
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6622
6632
|
result.push(
|
|
@@ -7654,9 +7664,8 @@ var LoadingIcon = (props) => {
|
|
|
7654
7664
|
};
|
|
7655
7665
|
|
|
7656
7666
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7657
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "
|
|
7658
|
-
var
|
|
7659
|
-
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";
|
|
7660
7669
|
|
|
7661
7670
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7662
7671
|
function styleForGroupColumn({
|
|
@@ -7827,7 +7836,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7827
7836
|
|
|
7828
7837
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7829
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";
|
|
7830
|
-
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"]] });
|
|
7831
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: [] });
|
|
7832
7841
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7833
7842
|
|
|
@@ -8431,6 +8440,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8431
8440
|
api: imperativeApi,
|
|
8432
8441
|
dataSourceApi
|
|
8433
8442
|
};
|
|
8443
|
+
const rowDisabled = rowInfo.rowDisabled;
|
|
8434
8444
|
const visibleColumnsIds = computed.computedVisibleColumns.map((x) => x.id);
|
|
8435
8445
|
const colRenderingParams = getColumnRenderingParams({
|
|
8436
8446
|
column,
|
|
@@ -8472,14 +8482,16 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8472
8482
|
event
|
|
8473
8483
|
});
|
|
8474
8484
|
if (keyboardNavigation === "row") {
|
|
8475
|
-
|
|
8485
|
+
if (!rowDisabled) {
|
|
8486
|
+
componentActions.activeRowIndex = rowIndex;
|
|
8487
|
+
}
|
|
8476
8488
|
return;
|
|
8477
8489
|
}
|
|
8478
8490
|
if (keyboardNavigation === "cell") {
|
|
8479
8491
|
componentActions.activeCellIndex = [rowIndex, colIndex];
|
|
8480
8492
|
}
|
|
8481
8493
|
},
|
|
8482
|
-
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8494
|
+
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
8483
8495
|
);
|
|
8484
8496
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8485
8497
|
const cellSelected = renderParam.cellSelected;
|
|
@@ -8751,6 +8763,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8751
8763
|
zebra,
|
|
8752
8764
|
align: align2,
|
|
8753
8765
|
verticalAlign,
|
|
8766
|
+
rowDisabled,
|
|
8754
8767
|
rowActive,
|
|
8755
8768
|
cellSelected,
|
|
8756
8769
|
rowSelected,
|
|
@@ -9629,6 +9642,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9629
9642
|
verticalAlign,
|
|
9630
9643
|
rowSelected: false,
|
|
9631
9644
|
cellSelected: false,
|
|
9645
|
+
rowDisabled: false,
|
|
9632
9646
|
zebra: false,
|
|
9633
9647
|
rowActive: false,
|
|
9634
9648
|
firstRow: true,
|
|
@@ -10862,6 +10876,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10862
10876
|
//TODO improve this
|
|
10863
10877
|
collapsed: false,
|
|
10864
10878
|
dataSourceHasGrouping: true,
|
|
10879
|
+
rowDisabled: false,
|
|
10865
10880
|
isCellSelected: returnFalse,
|
|
10866
10881
|
hasSelectedCells: returnFalse,
|
|
10867
10882
|
selfLoaded,
|
|
@@ -10910,6 +10925,7 @@ function enhancedFlatten(param) {
|
|
|
10910
10925
|
withRowInfo,
|
|
10911
10926
|
toPrimaryKey,
|
|
10912
10927
|
groupRowsState,
|
|
10928
|
+
isRowDisabled,
|
|
10913
10929
|
isRowSelected,
|
|
10914
10930
|
rowSelectionState,
|
|
10915
10931
|
generateGroupRows,
|
|
@@ -10958,6 +10974,9 @@ function enhancedFlatten(param) {
|
|
|
10958
10974
|
enhancedGroupData.deselectedChildredCount = selectionCount.deselectedCount;
|
|
10959
10975
|
}
|
|
10960
10976
|
}
|
|
10977
|
+
if (isRowDisabled) {
|
|
10978
|
+
enhancedGroupData.rowDisabled = isRowDisabled(enhancedGroupData);
|
|
10979
|
+
}
|
|
10961
10980
|
const parent = parents[parents.length - 1];
|
|
10962
10981
|
const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
|
|
10963
10982
|
if (parentCollapsed) {
|
|
@@ -11005,6 +11024,7 @@ function enhancedFlatten(param) {
|
|
|
11005
11024
|
isGroupRow: false,
|
|
11006
11025
|
selfLoaded: !!item,
|
|
11007
11026
|
rowSelected: false,
|
|
11027
|
+
rowDisabled: false,
|
|
11008
11028
|
rootGroupBy: groupBy,
|
|
11009
11029
|
collapsed,
|
|
11010
11030
|
groupKeys,
|
|
@@ -11019,6 +11039,9 @@ function enhancedFlatten(param) {
|
|
|
11019
11039
|
if (isRowSelected) {
|
|
11020
11040
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
11021
11041
|
}
|
|
11042
|
+
if (isRowDisabled) {
|
|
11043
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
11044
|
+
}
|
|
11022
11045
|
if (withRowInfo) {
|
|
11023
11046
|
withRowInfo(rowInfo);
|
|
11024
11047
|
}
|
|
@@ -13326,7 +13349,7 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
13326
13349
|
function returnFalse2() {
|
|
13327
13350
|
return false;
|
|
13328
13351
|
}
|
|
13329
|
-
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
13352
|
+
function toRowInfo(data, id, index, isRowSelected, isRowDisabled, cellSelectionState) {
|
|
13330
13353
|
const rowInfo = {
|
|
13331
13354
|
dataSourceHasGrouping: false,
|
|
13332
13355
|
data,
|
|
@@ -13335,12 +13358,16 @@ function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
|
13335
13358
|
isGroupRow: false,
|
|
13336
13359
|
selfLoaded: true,
|
|
13337
13360
|
rowSelected: false,
|
|
13361
|
+
rowDisabled: false,
|
|
13338
13362
|
isCellSelected: returnFalse2,
|
|
13339
13363
|
hasSelectedCells: returnFalse2
|
|
13340
13364
|
};
|
|
13341
13365
|
if (isRowSelected) {
|
|
13342
13366
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
13343
13367
|
}
|
|
13368
|
+
if (isRowDisabled) {
|
|
13369
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
13370
|
+
}
|
|
13344
13371
|
if (cellSelectionState) {
|
|
13345
13372
|
rowInfo.isCellSelected = (colId) => {
|
|
13346
13373
|
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
@@ -13543,6 +13570,7 @@ function concludeReducer(params) {
|
|
|
13543
13570
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
13544
13571
|
);
|
|
13545
13572
|
} : void 0;
|
|
13573
|
+
const isRowDisabled = state.isRowDisabled || returnFalse2;
|
|
13546
13574
|
if (state.isRowSelected && state.selectionMode === "multi-row") {
|
|
13547
13575
|
isRowSelected = (rowInfo) => state.isRowSelected(
|
|
13548
13576
|
rowInfo,
|
|
@@ -13662,6 +13690,7 @@ function concludeReducer(params) {
|
|
|
13662
13690
|
data ? toPrimaryKey(data) : index,
|
|
13663
13691
|
index,
|
|
13664
13692
|
isRowSelected,
|
|
13693
|
+
isRowDisabled,
|
|
13665
13694
|
cellSelectionState
|
|
13666
13695
|
);
|
|
13667
13696
|
if (rowInfoReducerResults) {
|
|
@@ -14394,6 +14423,203 @@ var normalizeSortInfo = (initialSortInfo, weakMap3) => {
|
|
|
14394
14423
|
return result;
|
|
14395
14424
|
};
|
|
14396
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
|
+
|
|
14397
14623
|
// src/components/DataSource/state/getInitialState.ts
|
|
14398
14624
|
var DataSourceLogger = dbg("DataSource");
|
|
14399
14625
|
var defaultCursorId = Symbol("cursorId");
|
|
@@ -14434,7 +14660,8 @@ function initSetupState() {
|
|
|
14434
14660
|
cursorId: defaultCursorId,
|
|
14435
14661
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
14436
14662
|
propsCache: /* @__PURE__ */ new Map([
|
|
14437
|
-
["sortInfo", /* @__PURE__ */ new WeakMap()]
|
|
14663
|
+
["sortInfo", /* @__PURE__ */ new WeakMap()],
|
|
14664
|
+
["rowDisabledState", /* @__PURE__ */ new WeakMap()]
|
|
14438
14665
|
]),
|
|
14439
14666
|
rowInfoReducerResults: void 0,
|
|
14440
14667
|
pivotMappings: void 0,
|
|
@@ -14508,6 +14735,26 @@ var forwardProps3 = (setupState) => {
|
|
|
14508
14735
|
},
|
|
14509
14736
|
batchOperationDelay: 1,
|
|
14510
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
|
+
},
|
|
14511
14758
|
onDataArrayChange: 1,
|
|
14512
14759
|
onDataMutations: 1,
|
|
14513
14760
|
aggregationReducers: 1,
|
|
@@ -14645,6 +14892,19 @@ function deriveStateFromProps(params) {
|
|
|
14645
14892
|
const sortMode = props.sortFunction ? "local" : propsSortMode != null ? propsSortMode : controlledSort ? "remote" : "local";
|
|
14646
14893
|
const filterMode = typeof props.filterFunction === "function" ? "local" : propsFilterMode != null ? propsFilterMode : typeof props.data === "function" ? "remote" : "local";
|
|
14647
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
|
+
}
|
|
14648
14908
|
const result = {
|
|
14649
14909
|
selectionMode,
|
|
14650
14910
|
groupRowsState,
|
|
@@ -14661,6 +14921,7 @@ function deriveStateFromProps(params) {
|
|
|
14661
14921
|
groupBy: (_j = (_i = props.shouldReloadData) == null ? void 0 : _i.groupBy) != null ? _j : groupMode === "remote",
|
|
14662
14922
|
pivotBy: (_l = (_k = props.shouldReloadData) == null ? void 0 : _k.pivotBy) != null ? _l : pivotMode === "remote"
|
|
14663
14923
|
},
|
|
14924
|
+
isRowDisabled,
|
|
14664
14925
|
rowSelection: rowSelectionState,
|
|
14665
14926
|
cellSelection: cellSelectionState,
|
|
14666
14927
|
groupMode,
|
|
@@ -14955,151 +15216,6 @@ function useDataSourceInternal(props) {
|
|
|
14955
15216
|
};
|
|
14956
15217
|
}
|
|
14957
15218
|
|
|
14958
|
-
// src/components/DataSource/BooleanCollectionState.ts
|
|
14959
|
-
var BooleanCollectionState = class {
|
|
14960
|
-
constructor(state) {
|
|
14961
|
-
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14962
|
-
//@ts-ignore
|
|
14963
|
-
state.getState()
|
|
14964
|
-
) : state;
|
|
14965
|
-
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14966
|
-
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14967
|
-
this.update({
|
|
14968
|
-
negativeItems,
|
|
14969
|
-
positiveItems
|
|
14970
|
-
});
|
|
14971
|
-
}
|
|
14972
|
-
getInitialState() {
|
|
14973
|
-
return this.initialState;
|
|
14974
|
-
}
|
|
14975
|
-
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14976
|
-
// return {
|
|
14977
|
-
// positiveItems: this.allPositive
|
|
14978
|
-
// ? true
|
|
14979
|
-
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14980
|
-
// negativeItems: this.allNegative
|
|
14981
|
-
// ? true
|
|
14982
|
-
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14983
|
-
// };
|
|
14984
|
-
// }
|
|
14985
|
-
destroy() {
|
|
14986
|
-
var _a, _b;
|
|
14987
|
-
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14988
|
-
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14989
|
-
delete this.positiveMap;
|
|
14990
|
-
delete this.negativeMap;
|
|
14991
|
-
}
|
|
14992
|
-
update(state) {
|
|
14993
|
-
const { positiveItems, negativeItems } = state;
|
|
14994
|
-
this.allNegative = negativeItems === true;
|
|
14995
|
-
this.allPositive = positiveItems === true;
|
|
14996
|
-
if (this.allNegative && this.allPositive) {
|
|
14997
|
-
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14998
|
-
}
|
|
14999
|
-
if (negativeItems && negativeItems !== true) {
|
|
15000
|
-
if (!this.negativeMap) {
|
|
15001
|
-
this.negativeMap = /* @__PURE__ */ new Map();
|
|
15002
|
-
}
|
|
15003
|
-
this.negativeMap.clear();
|
|
15004
|
-
for (let k of negativeItems) {
|
|
15005
|
-
this.negativeMap.set(k, true);
|
|
15006
|
-
}
|
|
15007
|
-
if (this.positiveMap) {
|
|
15008
|
-
this.positiveMap.clear();
|
|
15009
|
-
}
|
|
15010
|
-
}
|
|
15011
|
-
if (positiveItems && positiveItems !== true) {
|
|
15012
|
-
if (!this.positiveMap) {
|
|
15013
|
-
this.positiveMap = /* @__PURE__ */ new Map();
|
|
15014
|
-
}
|
|
15015
|
-
this.positiveMap.clear();
|
|
15016
|
-
for (let k of positiveItems) {
|
|
15017
|
-
this.positiveMap.set(k, true);
|
|
15018
|
-
}
|
|
15019
|
-
if (this.negativeMap) {
|
|
15020
|
-
this.negativeMap.clear();
|
|
15021
|
-
}
|
|
15022
|
-
}
|
|
15023
|
-
}
|
|
15024
|
-
isDefaultNegativeSelection() {
|
|
15025
|
-
return this.allNegative;
|
|
15026
|
-
}
|
|
15027
|
-
isDefaultPositiveSelection() {
|
|
15028
|
-
return this.allPositive;
|
|
15029
|
-
}
|
|
15030
|
-
areAllNegative() {
|
|
15031
|
-
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
15032
|
-
}
|
|
15033
|
-
areAllPositive() {
|
|
15034
|
-
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
15035
|
-
}
|
|
15036
|
-
makeAllNegative() {
|
|
15037
|
-
this.update({
|
|
15038
|
-
negativeItems: true,
|
|
15039
|
-
positiveItems: []
|
|
15040
|
-
});
|
|
15041
|
-
}
|
|
15042
|
-
makeAllPositive() {
|
|
15043
|
-
this.update({
|
|
15044
|
-
positiveItems: true,
|
|
15045
|
-
negativeItems: []
|
|
15046
|
-
});
|
|
15047
|
-
}
|
|
15048
|
-
isItemPositive(key) {
|
|
15049
|
-
var _a, _b;
|
|
15050
|
-
if (this.allPositive === true) {
|
|
15051
|
-
if (this.allNegative === true) {
|
|
15052
|
-
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
15053
|
-
}
|
|
15054
|
-
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
15055
|
-
}
|
|
15056
|
-
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
15057
|
-
}
|
|
15058
|
-
isItemNegative(key) {
|
|
15059
|
-
return !this.isItemPositive(key);
|
|
15060
|
-
}
|
|
15061
|
-
setItemValue(key, shouldMakePositive) {
|
|
15062
|
-
var _a;
|
|
15063
|
-
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
15064
|
-
return;
|
|
15065
|
-
}
|
|
15066
|
-
if (shouldMakePositive) {
|
|
15067
|
-
if (this.allNegative === true) {
|
|
15068
|
-
if (!this.positiveMap) {
|
|
15069
|
-
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
15070
|
-
}
|
|
15071
|
-
this.positiveMap.set(key, true);
|
|
15072
|
-
} else if (this.allPositive === true) {
|
|
15073
|
-
if (!this.negativeMap) {
|
|
15074
|
-
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
15075
|
-
}
|
|
15076
|
-
this.negativeMap.delete(key);
|
|
15077
|
-
}
|
|
15078
|
-
} else {
|
|
15079
|
-
if (this.allPositive === true) {
|
|
15080
|
-
if (!this.negativeMap) {
|
|
15081
|
-
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
15082
|
-
}
|
|
15083
|
-
this.negativeMap.set(key, true);
|
|
15084
|
-
} else if (this.allNegative === true) {
|
|
15085
|
-
if (!this.positiveMap) {
|
|
15086
|
-
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
15087
|
-
}
|
|
15088
|
-
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
15089
|
-
}
|
|
15090
|
-
}
|
|
15091
|
-
}
|
|
15092
|
-
makeItemNegative(key) {
|
|
15093
|
-
this.setItemValue(key, false);
|
|
15094
|
-
}
|
|
15095
|
-
makeItemPositive(key) {
|
|
15096
|
-
this.setItemValue(key, true);
|
|
15097
|
-
}
|
|
15098
|
-
toggleItem(key) {
|
|
15099
|
-
this.setItemValue(key, !this.isItemPositive(key));
|
|
15100
|
-
}
|
|
15101
|
-
};
|
|
15102
|
-
|
|
15103
15219
|
// src/components/DataSource/RowDetailState.ts
|
|
15104
15220
|
var RowDetailState = class extends BooleanCollectionState {
|
|
15105
15221
|
constructor(state) {
|
|
@@ -17255,6 +17371,7 @@ var MultiRowSelector = class {
|
|
|
17255
17371
|
constructor(options) {
|
|
17256
17372
|
this.multiSelectStartIndex = 0;
|
|
17257
17373
|
this.getIdForIndex = options.getIdForIndex;
|
|
17374
|
+
this.isRowDisabledAt = options.isRowDisabledAt;
|
|
17258
17375
|
}
|
|
17259
17376
|
set rowSelectionState(rowSelectionState) {
|
|
17260
17377
|
this._rowSelectionState = rowSelectionState;
|
|
@@ -17267,6 +17384,9 @@ var MultiRowSelector = class {
|
|
|
17267
17384
|
const rowSelectionState = this.rowSelectionState;
|
|
17268
17385
|
for (let i = start; i <= end; i++) {
|
|
17269
17386
|
const id = this.getIdForIndex(i);
|
|
17387
|
+
if (this.isRowDisabledAt(i)) {
|
|
17388
|
+
continue;
|
|
17389
|
+
}
|
|
17270
17390
|
rowSelectionState.selectRow(id);
|
|
17271
17391
|
}
|
|
17272
17392
|
}
|
|
@@ -17275,6 +17395,9 @@ var MultiRowSelector = class {
|
|
|
17275
17395
|
const rowSelectionState = this.rowSelectionState;
|
|
17276
17396
|
for (let i = start; i <= end; i++) {
|
|
17277
17397
|
const id = this.getIdForIndex(i);
|
|
17398
|
+
if (this.isRowDisabledAt(i)) {
|
|
17399
|
+
continue;
|
|
17400
|
+
}
|
|
17278
17401
|
rowSelectionState.deselectRow(id);
|
|
17279
17402
|
}
|
|
17280
17403
|
}
|
|
@@ -18716,6 +18839,11 @@ function useComputed() {
|
|
|
18716
18839
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
18717
18840
|
const [multiRowSelector] = (0, import_react49.useState)(() => {
|
|
18718
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
|
+
},
|
|
18719
18847
|
getIdForIndex: (index) => {
|
|
18720
18848
|
var _a2;
|
|
18721
18849
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -18952,7 +19080,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18952
19080
|
}
|
|
18953
19081
|
let valid2 = isValidLicense(licenseKey, {
|
|
18954
19082
|
publishedAt: 1624970570587,
|
|
18955
|
-
version: "4.
|
|
19083
|
+
version: "4.4.0"
|
|
18956
19084
|
});
|
|
18957
19085
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18958
19086
|
return true;
|
|
@@ -19109,6 +19237,10 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
19109
19237
|
if (groupBy.length) {
|
|
19110
19238
|
return false;
|
|
19111
19239
|
}
|
|
19240
|
+
const rowInfo = dataArray[rowIndex];
|
|
19241
|
+
if (rowInfo == null ? void 0 : rowInfo.rowDisabled) {
|
|
19242
|
+
return false;
|
|
19243
|
+
}
|
|
19112
19244
|
if (selectionMode === "multi-row") {
|
|
19113
19245
|
if (renderSelectionCheckBox && !event.key) {
|
|
19114
19246
|
return false;
|
|
@@ -19156,6 +19288,23 @@ function clamp(value, min, max) {
|
|
|
19156
19288
|
}
|
|
19157
19289
|
|
|
19158
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
|
+
}
|
|
19159
19308
|
function handleRowNavigation(options, event) {
|
|
19160
19309
|
const { getState, getDataSourceState, actions, api } = options;
|
|
19161
19310
|
const { key } = event;
|
|
@@ -19177,10 +19326,18 @@ function handleRowNavigation(options, event) {
|
|
|
19177
19326
|
const max = arrLength - 1;
|
|
19178
19327
|
const KeyToFunction = {
|
|
19179
19328
|
ArrowDown: () => {
|
|
19180
|
-
activeRowIndex =
|
|
19329
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19330
|
+
getDataSourceState,
|
|
19331
|
+
activeRowIndex,
|
|
19332
|
+
1
|
|
19333
|
+
);
|
|
19181
19334
|
},
|
|
19182
19335
|
ArrowUp: () => {
|
|
19183
|
-
activeRowIndex =
|
|
19336
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19337
|
+
getDataSourceState,
|
|
19338
|
+
activeRowIndex,
|
|
19339
|
+
-1
|
|
19340
|
+
);
|
|
19184
19341
|
},
|
|
19185
19342
|
ArrowLeft: () => {
|
|
19186
19343
|
const rowInfo = dataArray[activeRowIndex];
|
|
@@ -22670,7 +22827,8 @@ function InfiniteTableBody() {
|
|
|
22670
22827
|
bodySize,
|
|
22671
22828
|
activeCellIndex,
|
|
22672
22829
|
rowDetailRenderer,
|
|
22673
|
-
showHoverRows
|
|
22830
|
+
showHoverRows,
|
|
22831
|
+
domProps
|
|
22674
22832
|
} = componentState;
|
|
22675
22833
|
const LoadMaskCmp = (_a = components2 == null ? void 0 : components2.LoadMask) != null ? _a : LoadMask;
|
|
22676
22834
|
const computed = getComputed();
|
|
@@ -22723,11 +22881,13 @@ function InfiniteTableBody() {
|
|
|
22723
22881
|
bodySize,
|
|
22724
22882
|
computed
|
|
22725
22883
|
});
|
|
22884
|
+
const { autoFocus, tabIndex } = domProps != null ? domProps : {};
|
|
22726
22885
|
return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
|
|
22727
22886
|
HeadlessTable,
|
|
22728
22887
|
{
|
|
22729
22888
|
debugId,
|
|
22730
|
-
tabIndex: 0,
|
|
22889
|
+
tabIndex: tabIndex != null ? tabIndex : 0,
|
|
22890
|
+
autoFocus: autoFocus != null ? autoFocus : void 0,
|
|
22731
22891
|
activeRowIndex: componentState.ready && keyboardNavigation === "row" ? activeRowIndex : null,
|
|
22732
22892
|
activeCellIndex: componentState.ready && keyboardNavigation === "cell" && // we want to hide the active cell indicator while column reodering is happening
|
|
22733
22893
|
!componentState.columnReorderDragColumnId ? activeCellIndex : null,
|
|
@@ -22745,6 +22905,7 @@ function InfiniteTableBody() {
|
|
|
22745
22905
|
}
|
|
22746
22906
|
var InfiniteTableComponent = React68.memo(
|
|
22747
22907
|
function InfiniteTableComponent2() {
|
|
22908
|
+
var _a;
|
|
22748
22909
|
const context = useInfiniteTable();
|
|
22749
22910
|
const masterContext = useMasterDetailContext();
|
|
22750
22911
|
const { state: componentState, api, children: initialChildren } = context;
|
|
@@ -22788,7 +22949,17 @@ var InfiniteTableComponent = React68.memo(
|
|
|
22788
22949
|
return brain.onVerticalRenderRangeChange(onChange);
|
|
22789
22950
|
}, [brain, scrollStopDelay]);
|
|
22790
22951
|
const licenseValid = useLicense(licenseKey);
|
|
22791
|
-
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);
|
|
22792
22963
|
React68.useEffect(() => {
|
|
22793
22964
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
22794
22965
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|