@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.dev.mjs
CHANGED
|
@@ -1220,7 +1220,8 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1220
1220
|
onContainerScroll,
|
|
1221
1221
|
className,
|
|
1222
1222
|
tabIndex,
|
|
1223
|
-
style: style2
|
|
1223
|
+
style: style2,
|
|
1224
|
+
autoFocus
|
|
1224
1225
|
} = props;
|
|
1225
1226
|
const domRef = ref != null ? ref : useRef3(null);
|
|
1226
1227
|
useOnScroll(domRef, onContainerScroll);
|
|
@@ -1229,6 +1230,7 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1229
1230
|
{
|
|
1230
1231
|
ref: domRef,
|
|
1231
1232
|
style: style2,
|
|
1233
|
+
autoFocus,
|
|
1232
1234
|
tabIndex,
|
|
1233
1235
|
className: join(
|
|
1234
1236
|
className,
|
|
@@ -1402,7 +1404,7 @@ var internalProps = {
|
|
|
1402
1404
|
};
|
|
1403
1405
|
|
|
1404
1406
|
// src/components/InfiniteTable/vars.css.ts
|
|
1405
|
-
var ThemeVars = { color: { accent: "var(--infinite-accent-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidth: "var(--infinite-runtime-total-visible-columns-width)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", 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)" } } };
|
|
1407
|
+
var ThemeVars = { color: { accent: "var(--infinite-accent-color)", error: "var(--infinite-error-color)", color: "var(--infinite-color)" }, spacing: { "0": "var(--infinite-space-0)", "1": "var(--infinite-space-1)", "2": "var(--infinite-space-2)", "3": "var(--infinite-space-3)", "4": "var(--infinite-space-4)", "5": "var(--infinite-space-5)", "6": "var(--infinite-space-6)", "7": "var(--infinite-space-7)", "8": "var(--infinite-space-8)", "9": "var(--infinite-space-9)", "10": "var(--infinite-space-10)" }, fontSize: { "0": "var(--infinite-font-size-0)", "1": "var(--infinite-font-size-1)", "2": "var(--infinite-font-size-2)", "3": "var(--infinite-font-size-3)", "4": "var(--infinite-font-size-4)", "5": "var(--infinite-font-size-5)", "6": "var(--infinite-font-size-6)", "7": "var(--infinite-font-size-7)" }, fontFamily: "var(--infinite-font-family)", minHeight: "var(--infinite-min-height)", borderRadius: "var(--infinite-border-radius)", background: "var(--infinite-background)", iconSize: "var(--infinite-icon-size)", runtime: { bodyWidth: "var(--infinite-runtime-body-content-width)", totalVisibleColumnsWidth: "var(--infinite-runtime-total-visible-columns-width)", visibleColumnsCount: "var(--infinite-runtime-visible-columns-count)", browserScrollbarWidth: "var(--infinite-runtime-browser-scrollbar-width)" }, components: { LoadMask: { padding: "var(--infinite-load-mask-padding)", color: "var(--infinite-load-mask-color)", textBackground: "var(--infinite-load-mask-text-background)", overlayBackground: "var(--infinite-load-mask-overlay-background)", overlayOpacity: "var(--infinite-load-mask-overlay-opacity)", borderRadius: "var(--infinite-load-mask-border-radius)" }, Header: { background: "var(--infinite-header-background)", color: "var(--infinite-header-color)", columnHeaderHeight: "var(--infinite-column-header-height)" }, HeaderCell: { background: "var(--infinite-header-cell-background)", hoverBackground: "var(--infinite-header-cell-hover-background)", border: "var(--infinite-header-cell-border)", padding: "var(--infinite-header-cell-padding)", paddingX: "var(--infinite-header-cell-padding-x)", paddingY: "var(--infinite-header-cell-padding-y)", iconSize: "var(--infinite-header-cell-icon-size)", menuIconLineWidth: "var(--infinite-header-cell-menu-icon-line-width)", sortIconMargin: "var(--infinite-header-cell-sort-icon-margin)", borderRight: "var(--infinite-header-cell-border-right)", resizeHandleActiveAreaWidth: "var(--infinite-resize-handle-active-area-width)", resizeHandleWidth: "var(--infinite-resize-handle-width)", resizeHandleHoverBackground: "var(--infinite-resize-handle-hover-background)", resizeHandleConstrainedHoverBackground: "var(--infinite-resize-handle-constrained-hover-background)", filterOperatorPaddingX: "var(--infinite-filter-operator-padding-x)", filterEditorPaddingX: "var(--infinite-filter-editor-padding-x)", filterEditorMarginX: "var(--infinite-filter-editor-margin-x)", filterOperatorPaddingY: "var(--infinite-filter-operator-padding-y)", filterEditorPaddingY: "var(--infinite-filter-editor-padding-y)", filterEditorMarginY: "var(--infinite-filter-editor-margin-y)", filterEditorBackground: "var(--infinite-filter-editor-background)", filterEditorBorder: "var(--infinite-filter-editor-border)", filterEditorFocusBorderColor: "var(--infinite-filter-editor-focus-border-color)", filterEditorBorderRadius: "var(--infinite-filter-editor-border-radius)", filterEditorColor: "var(--infinite-filter-editor-color)" }, ActiveCellIndicator: { inset: "var(--infinite-active-cell-indicator-inset)" }, Cell: { padding: "var(--infinite-cell-padding)", borderWidth: "var(--infinite-cell-border-width)", border: "var(--infinite-cell-border)", borderLeft: "var(--infinite-cell-border-left)", borderRight: "var(--infinite-cell-border-right)", borderTop: "var(--infinite-cell-border-top)", borderInvisible: "var(--infinite-cell-border-invisible)", borderRadius: "var(--infinite-cell-border-radius)", reorderEffectDuration: "var(--infinite-column-reorder-effect-duration)", pinnedBorder: "var(--infinite-pinned-cell-border)", color: "var(--infinite-cell-color)", selectedBackground: "var(--infinite-selected-cell-background)", selectedBackgroundDefault: "var(--infinite-selected-cell-background-default)", selectedBackgroundAlpha: "var(--infinite-selected-cell-background-alpha)", selectedBackgroundAlphaWhenTableUnfocused: "var(--infinite-selected-cell-background-alpha--table-unfocused)", selectedBorderColor: "var(--infinite-selected-cell-border-color)", selectedBorderWidth: "var(--infinite-selected-cell-border-width)", selectedBorderStyle: "var(--infinite-selected-cell-border-style)", selectedBorder: "var(--infinite-selected-cell-border)", activeBackgroundAlpha: "var(--infinite-active-cell-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-cell-background-alpha--table-unfocused)", activeBackground: "var(--infinite-active-cell-background)", activeBackgroundDefault: "var(--infinite-active-cell-background-default)", activeBorderColor: "var(--infinite-active-cell-border-color)", activeBorderWidth: "var(--infinite-active-cell-border-width)", activeBorderStyle: "var(--infinite-active-cell-border-style)", activeBorder: "var(--infinite-active-cell-border)" }, SelectionCheckBox: { marginInline: "var(--infinite-selection-checkbox-margin-inline)" }, Menu: { background: "var(--infinite-menu-background)", color: "var(--infinite-menu-color)", separatorColor: "var(--infinite-menu-separator-color)", padding: "var(--infinite-menu-padding)", cellPaddingVertical: "var(--infinite-menu-cell-padding-vertical)", cellPaddingHorizontal: "var(--infinite-menu-cell-padding-horizontal)", cellMarginVertical: "var(--infinite-menu-cell-margin-vertical)", itemDisabledBackground: "var(--infinite-menu-item-disabled-background)", itemActiveBackground: "var(--infinite-menu-item-active-background)", itemActiveOpacity: "var(--infinite-menu-item-active-opacity)", itemPressedOpacity: "var(--infinite-menu-item-pressed-opacity)", itemPressedBackground: "var(--infinite-menu-item-pressed-background)", itemDisabledOpacity: "var(--infinite-menu-item-disabled-opacity)", borderRadius: "var(--infinite-menu-border-radius)", shadowColor: "var(--infinite-menu-shadow-color)" }, RowDetail: { background: "var(--infinite-rowdetail-background)", padding: "var(--infinite-rowdetail-padding)", gridHeight: "var(--infinite-rowdetail-grid-height)" }, Row: { background: "var(--infinite-row-background)", oddBackground: "var(--infinite-row-odd-background)", disabledBackground: "var(--infinite-row-disabled-background)", oddDisabledBackground: "var(--infinite-row-odd-disabled-background)", selectedBackground: "var(--infinite-row-selected-background)", disabledOpacity: "var(--infinite-row-disabled-opacity)", activeBackground: "var(--infinite-active-row-background)", activeBorderColor: "var(--infinite-active-row-border-color)", activeBorderWidth: "var(--infinite-active-row-border-width)", activeBorderStyle: "var(--infinite-active-row-border-style)", activeBorder: "var(--infinite-active-row-border)", activeBackgroundAlpha: "var(--infinite-active-row-background-alpha)", activeBackgroundAlphaWhenTableUnfocused: "var(--infinite-active-row-background-alpha--table-unfocused)", hoverBackground: "var(--infinite-row-hover-background)", selectedHoverBackground: "var(--infinite-row-selected-hover-background)", selectedDisabledBackground: "var(--infinite-row-selected-disabled-background)", groupRowBackground: "var(--infinite-group-row-background)", groupRowColumnNesting: "var(--infinite-group-row-column-nesting)", groupNesting: "var(--infinite-dont-override-group-row-nesting-length)", pointerEventsWhileScrolling: "var(--infinite-row-pointer-events-while-scrolling)" }, ColumnCell: { background: "var(--infinite-column-cell-bg-dont-override)" } } };
|
|
1406
1408
|
var columnHeaderHeightName = "column-header-height";
|
|
1407
1409
|
|
|
1408
1410
|
// src/components/InfiniteTable/utils/infiniteDOMUtils.ts
|
|
@@ -4301,6 +4303,7 @@ function HeadlessTable(props) {
|
|
|
4301
4303
|
"activeCellIndex",
|
|
4302
4304
|
"onRenderUpdater"
|
|
4303
4305
|
]);
|
|
4306
|
+
const { autoFocus } = domProps;
|
|
4304
4307
|
const domRef = useRef7(null);
|
|
4305
4308
|
const [scrollSize, setTotalScrollSize] = useState3({
|
|
4306
4309
|
width: 0,
|
|
@@ -4317,6 +4320,9 @@ function HeadlessTable(props) {
|
|
|
4317
4320
|
if (!node) {
|
|
4318
4321
|
return;
|
|
4319
4322
|
}
|
|
4323
|
+
if (autoFocus && document.activeElement !== node) {
|
|
4324
|
+
node.focus();
|
|
4325
|
+
}
|
|
4320
4326
|
const onResize = () => {
|
|
4321
4327
|
const size = {
|
|
4322
4328
|
height: node.clientHeight,
|
|
@@ -5087,22 +5093,22 @@ var createRuntimeFn = (config) => {
|
|
|
5087
5093
|
|
|
5088
5094
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5089
5095
|
var CellCls = "cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
|
|
5090
|
-
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "
|
|
5096
|
+
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob122 utilities_height_100%__16lm1iw19 utilities_width_100%__16lm1iw1b utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_justifyContent_start__16lm1iw1v", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob123", true: "header_HeaderCellContentRecipe_filtered_true__12zfob124" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob125", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob126", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob127" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob128", end: "header_HeaderCellContentRecipe_align_end__12zfob129", center: "header_HeaderCellContentRecipe_align_center__12zfob12a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5091
5097
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw23 utilities_textOverflow_ellipsis__16lm1iw24 utilities_overflow_hidden__16lm1iw1x";
|
|
5092
|
-
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, firstRow: { false: "
|
|
5098
|
+
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o utilities_display_block__16lm1iw12", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, rowDisabled: { false: "header_HeaderCellRecipe_rowDisabled_false__12zfob1w", true: "header_HeaderCellRecipe_rowDisabled_true__12zfob1x" }, firstRow: { false: "header_HeaderCellRecipe_firstRow_false__12zfob1y", true: "header_HeaderCellRecipe_firstRow_true__12zfob1z" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob110", true: "header_HeaderCellRecipe_groupRow_true__12zfob111" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob112", true: "header_HeaderCellRecipe_groupCell_true__12zfob113" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob114", end: "header_HeaderCellRecipe_align_end__12zfob115", center: "header_HeaderCellRecipe_align_center__12zfob116" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob117", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob118", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob119" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob11a", even: "header_HeaderCellRecipe_zebra_even__12zfob11b", odd: "header_HeaderCellRecipe_zebra_odd__12zfob11c" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob11d", false: "header_HeaderCellRecipe_dragging_false__12zfob11e" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11f", false: "header_HeaderCellRecipe_first_false__12zfob11g" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11h", false: "header_HeaderCellRecipe_last_false__12zfob11i" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11j", false: "header_HeaderCellRecipe_groupByField_false__12zfob11k" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11l", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11m" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11n", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11o" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11p", end: "header_HeaderCellRecipe_pinned_end__12zfob11q", false: "header_HeaderCellRecipe_pinned_false__12zfob11r" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11s", false: "header_HeaderCellRecipe_filtered_false__12zfob11t" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob11u"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob11v"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob11w"]] });
|
|
5093
5099
|
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob19 utilities_display_block__16lm1iw12 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob1a", end: "header_HeaderClsRecipe_pinned_end__12zfob1b", false: "header_HeaderClsRecipe_pinned_false__12zfob1c" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1d", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1e" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1f", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1g" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1h", false: "header_HeaderClsRecipe_overflow_false__12zfob1i" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1j"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1k"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1l"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1m"]] });
|
|
5094
|
-
var HeaderFilterEditorCls = "
|
|
5100
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12k utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5095
5101
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
5096
|
-
var HeaderFilterOperatorCls = "
|
|
5097
|
-
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "
|
|
5098
|
-
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "
|
|
5099
|
-
var HeaderGroupCls = "
|
|
5100
|
-
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "
|
|
5102
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5103
|
+
var HeaderFilterOperatorIconRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterOperatorIconRecipe__12zfob12h utilities_position_relative__16lm1iw1 utilities_top_0__16lm1iw1c", variantClassNames: { disabled: { true: "header_HeaderFilterOperatorIconRecipe_disabled_true__12zfob12i", false: "header_HeaderFilterOperatorIconRecipe_disabled_false__12zfob12j" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5104
|
+
var HeaderFilterRecipe = createRuntimeFn({ defaultClassName: "header_HeaderFilterRecipe__12zfob12d utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_stretch__16lm1iw1r utilities_position_relative__16lm1iw1", variantClassNames: { active: { true: "header_HeaderFilterRecipe_active_true__12zfob12e", false: "header_HeaderFilterRecipe_active_false__12zfob12f" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5105
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12c utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5106
|
+
var HeaderMenuIconCls = createRuntimeFn({ defaultClassName: "header_HeaderMenuIconCls__12zfob11x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_column__16lm1iw1m utilities_justifyContent_spaceAround__16lm1iw1u utilities_visibility_hidden__16lm1iw21", variantClassNames: { menuVisible: { true: "header_HeaderMenuIconCls_menuVisible_true__12zfob11y" }, reserveSpaceWhenHidden: { true: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_true__12zfob11z", false: "header_HeaderMenuIconCls_reserveSpaceWhenHidden_false__12zfob120" } }, defaultVariants: {}, compoundVariants: [[{ menuVisible: true, reserveSpaceWhenHidden: false }, "header_HeaderMenuIconCls_compound_0__12zfob121"]] });
|
|
5101
5107
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5102
5108
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5103
5109
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5104
5110
|
var HeaderSortIconRecipe = createRuntimeFn({ defaultClassName: "header__12zfob12", variantClassNames: { align: { start: "header_HeaderSortIconRecipe_align_start__12zfob13", center: "header_HeaderSortIconRecipe_align_center__12zfob14", end: "header_HeaderSortIconRecipe_align_end__12zfob15" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5105
|
-
var HeaderWrapperCls = "
|
|
5111
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12b utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5106
5112
|
|
|
5107
5113
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5108
5114
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6548,6 +6554,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6548
6554
|
rowActive: extraFlags.rowActive,
|
|
6549
6555
|
dragging: extraFlags.dragging,
|
|
6550
6556
|
firstRow: (_b = extraFlags.firstRow) != null ? _b : false,
|
|
6557
|
+
rowDisabled: extraFlags.rowDisabled,
|
|
6551
6558
|
groupRow: extraFlags.groupRow,
|
|
6552
6559
|
groupCell: extraFlags.groupCell,
|
|
6553
6560
|
verticalAlign: extraFlags.verticalAlign,
|
|
@@ -6580,6 +6587,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6580
6587
|
if (extraFlags.firstRow) {
|
|
6581
6588
|
result.push(...baseClasses.map((c) => `${c}--first-row`));
|
|
6582
6589
|
}
|
|
6590
|
+
if (extraFlags.rowDisabled) {
|
|
6591
|
+
result.push(...baseClasses.map((c) => `${c}--disabled`));
|
|
6592
|
+
}
|
|
6583
6593
|
if (extraFlags.groupRow) {
|
|
6584
6594
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6585
6595
|
result.push(
|
|
@@ -7617,9 +7627,8 @@ var LoadingIcon = (props) => {
|
|
|
7617
7627
|
};
|
|
7618
7628
|
|
|
7619
7629
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7620
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "
|
|
7621
|
-
var
|
|
7622
|
-
var RowHoverCls = "row_RowHoverCls__7pupv01";
|
|
7630
|
+
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "row__7pupv01", variantClassNames: { align: { start: "row_GroupRowExpanderCls_align_start__7pupv02", center: "row_GroupRowExpanderCls_align_center__7pupv03", end: "row_GroupRowExpanderCls_align_end__7pupv04" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7631
|
+
var RowHoverCls = "row_RowHoverCls__7pupv00";
|
|
7623
7632
|
|
|
7624
7633
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7625
7634
|
function styleForGroupColumn({
|
|
@@ -7790,7 +7799,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7790
7799
|
|
|
7791
7800
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7792
7801
|
var ColumnCellCls = "cell_ColumnCellCls__1eexc2a6 cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw22 utilities_whiteSpace_nowrap__16lm1iw23 utilities_userSelect_none__16lm1iw17";
|
|
7793
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2ah", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ai", true: "cell_ColumnCellRecipe_dragging_true__1eexc2aj" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ak", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2al" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2am", end: "cell_ColumnCellRecipe_align_end__1eexc2an", center: "cell_ColumnCellRecipe_align_center__1eexc2ao" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2ap", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2aq", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ar" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2as", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2at" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2au", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2av" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2aw", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2ax" }, zebra: { false: "
|
|
7802
|
+
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2ah", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ai", true: "cell_ColumnCellRecipe_dragging_true__1eexc2aj" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ak", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2al" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2am", end: "cell_ColumnCellRecipe_align_end__1eexc2an", center: "cell_ColumnCellRecipe_align_center__1eexc2ao" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2ap", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2aq", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2ar" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2as", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2at" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2au", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2av" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2aw", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2ax" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2ay", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2az" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a10", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a11", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a12" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a13", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a14", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a15" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a16", false: "cell_ColumnCellRecipe_first_false__1eexc2a17" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a18", false: "cell_ColumnCellRecipe_last_false__1eexc2a19" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1a", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1b" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1c", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1d" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1e", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1f" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1g", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1h" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1i", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1j", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1k" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1l", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1m" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_0__1eexc2a1n"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a1o"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a1p"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a1q"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_4__1eexc2a1r"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_5__1eexc2a1s"]] });
|
|
7794
7803
|
var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2a8", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2a9", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2aa" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ab", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ac" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2ad", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2ae" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2af", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2ag" } }, defaultVariants: {}, compoundVariants: [] });
|
|
7795
7804
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7796
7805
|
|
|
@@ -8394,6 +8403,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8394
8403
|
api: imperativeApi,
|
|
8395
8404
|
dataSourceApi
|
|
8396
8405
|
};
|
|
8406
|
+
const rowDisabled = rowInfo.rowDisabled;
|
|
8397
8407
|
const visibleColumnsIds = computed.computedVisibleColumns.map((x) => x.id);
|
|
8398
8408
|
const colRenderingParams = getColumnRenderingParams({
|
|
8399
8409
|
column,
|
|
@@ -8435,14 +8445,16 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8435
8445
|
event
|
|
8436
8446
|
});
|
|
8437
8447
|
if (keyboardNavigation === "row") {
|
|
8438
|
-
|
|
8448
|
+
if (!rowDisabled) {
|
|
8449
|
+
componentActions.activeRowIndex = rowIndex;
|
|
8450
|
+
}
|
|
8439
8451
|
return;
|
|
8440
8452
|
}
|
|
8441
8453
|
if (keyboardNavigation === "cell") {
|
|
8442
8454
|
componentActions.activeCellIndex = [rowIndex, colIndex];
|
|
8443
8455
|
}
|
|
8444
8456
|
},
|
|
8445
|
-
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8457
|
+
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
8446
8458
|
);
|
|
8447
8459
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8448
8460
|
const cellSelected = renderParam.cellSelected;
|
|
@@ -8714,6 +8726,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8714
8726
|
zebra,
|
|
8715
8727
|
align: align2,
|
|
8716
8728
|
verticalAlign,
|
|
8729
|
+
rowDisabled,
|
|
8717
8730
|
rowActive,
|
|
8718
8731
|
cellSelected,
|
|
8719
8732
|
rowSelected,
|
|
@@ -9592,6 +9605,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9592
9605
|
verticalAlign,
|
|
9593
9606
|
rowSelected: false,
|
|
9594
9607
|
cellSelected: false,
|
|
9608
|
+
rowDisabled: false,
|
|
9595
9609
|
zebra: false,
|
|
9596
9610
|
rowActive: false,
|
|
9597
9611
|
firstRow: true,
|
|
@@ -10825,6 +10839,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10825
10839
|
//TODO improve this
|
|
10826
10840
|
collapsed: false,
|
|
10827
10841
|
dataSourceHasGrouping: true,
|
|
10842
|
+
rowDisabled: false,
|
|
10828
10843
|
isCellSelected: returnFalse,
|
|
10829
10844
|
hasSelectedCells: returnFalse,
|
|
10830
10845
|
selfLoaded,
|
|
@@ -10873,6 +10888,7 @@ function enhancedFlatten(param) {
|
|
|
10873
10888
|
withRowInfo,
|
|
10874
10889
|
toPrimaryKey,
|
|
10875
10890
|
groupRowsState,
|
|
10891
|
+
isRowDisabled,
|
|
10876
10892
|
isRowSelected,
|
|
10877
10893
|
rowSelectionState,
|
|
10878
10894
|
generateGroupRows,
|
|
@@ -10921,6 +10937,9 @@ function enhancedFlatten(param) {
|
|
|
10921
10937
|
enhancedGroupData.deselectedChildredCount = selectionCount.deselectedCount;
|
|
10922
10938
|
}
|
|
10923
10939
|
}
|
|
10940
|
+
if (isRowDisabled) {
|
|
10941
|
+
enhancedGroupData.rowDisabled = isRowDisabled(enhancedGroupData);
|
|
10942
|
+
}
|
|
10924
10943
|
const parent = parents[parents.length - 1];
|
|
10925
10944
|
const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
|
|
10926
10945
|
if (parentCollapsed) {
|
|
@@ -10968,6 +10987,7 @@ function enhancedFlatten(param) {
|
|
|
10968
10987
|
isGroupRow: false,
|
|
10969
10988
|
selfLoaded: !!item,
|
|
10970
10989
|
rowSelected: false,
|
|
10990
|
+
rowDisabled: false,
|
|
10971
10991
|
rootGroupBy: groupBy,
|
|
10972
10992
|
collapsed,
|
|
10973
10993
|
groupKeys,
|
|
@@ -10982,6 +11002,9 @@ function enhancedFlatten(param) {
|
|
|
10982
11002
|
if (isRowSelected) {
|
|
10983
11003
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
10984
11004
|
}
|
|
11005
|
+
if (isRowDisabled) {
|
|
11006
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
11007
|
+
}
|
|
10985
11008
|
if (withRowInfo) {
|
|
10986
11009
|
withRowInfo(rowInfo);
|
|
10987
11010
|
}
|
|
@@ -13289,7 +13312,7 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
13289
13312
|
function returnFalse2() {
|
|
13290
13313
|
return false;
|
|
13291
13314
|
}
|
|
13292
|
-
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
13315
|
+
function toRowInfo(data, id, index, isRowSelected, isRowDisabled, cellSelectionState) {
|
|
13293
13316
|
const rowInfo = {
|
|
13294
13317
|
dataSourceHasGrouping: false,
|
|
13295
13318
|
data,
|
|
@@ -13298,12 +13321,16 @@ function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
|
13298
13321
|
isGroupRow: false,
|
|
13299
13322
|
selfLoaded: true,
|
|
13300
13323
|
rowSelected: false,
|
|
13324
|
+
rowDisabled: false,
|
|
13301
13325
|
isCellSelected: returnFalse2,
|
|
13302
13326
|
hasSelectedCells: returnFalse2
|
|
13303
13327
|
};
|
|
13304
13328
|
if (isRowSelected) {
|
|
13305
13329
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
13306
13330
|
}
|
|
13331
|
+
if (isRowDisabled) {
|
|
13332
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
13333
|
+
}
|
|
13307
13334
|
if (cellSelectionState) {
|
|
13308
13335
|
rowInfo.isCellSelected = (colId) => {
|
|
13309
13336
|
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
@@ -13506,6 +13533,7 @@ function concludeReducer(params) {
|
|
|
13506
13533
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
13507
13534
|
);
|
|
13508
13535
|
} : void 0;
|
|
13536
|
+
const isRowDisabled = state.isRowDisabled || returnFalse2;
|
|
13509
13537
|
if (state.isRowSelected && state.selectionMode === "multi-row") {
|
|
13510
13538
|
isRowSelected = (rowInfo) => state.isRowSelected(
|
|
13511
13539
|
rowInfo,
|
|
@@ -13625,6 +13653,7 @@ function concludeReducer(params) {
|
|
|
13625
13653
|
data ? toPrimaryKey(data) : index,
|
|
13626
13654
|
index,
|
|
13627
13655
|
isRowSelected,
|
|
13656
|
+
isRowDisabled,
|
|
13628
13657
|
cellSelectionState
|
|
13629
13658
|
);
|
|
13630
13659
|
if (rowInfoReducerResults) {
|
|
@@ -14357,6 +14386,203 @@ var normalizeSortInfo = (initialSortInfo, weakMap3) => {
|
|
|
14357
14386
|
return result;
|
|
14358
14387
|
};
|
|
14359
14388
|
|
|
14389
|
+
// src/components/DataSource/BooleanCollectionState.ts
|
|
14390
|
+
var BooleanCollectionState = class {
|
|
14391
|
+
constructor(state) {
|
|
14392
|
+
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14393
|
+
//@ts-ignore
|
|
14394
|
+
state.getState()
|
|
14395
|
+
) : state;
|
|
14396
|
+
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14397
|
+
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14398
|
+
this.update({
|
|
14399
|
+
negativeItems,
|
|
14400
|
+
positiveItems
|
|
14401
|
+
});
|
|
14402
|
+
}
|
|
14403
|
+
getInitialState() {
|
|
14404
|
+
return this.initialState;
|
|
14405
|
+
}
|
|
14406
|
+
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14407
|
+
// return {
|
|
14408
|
+
// positiveItems: this.allPositive
|
|
14409
|
+
// ? true
|
|
14410
|
+
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14411
|
+
// negativeItems: this.allNegative
|
|
14412
|
+
// ? true
|
|
14413
|
+
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14414
|
+
// };
|
|
14415
|
+
// }
|
|
14416
|
+
destroy() {
|
|
14417
|
+
var _a, _b;
|
|
14418
|
+
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14419
|
+
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14420
|
+
delete this.positiveMap;
|
|
14421
|
+
delete this.negativeMap;
|
|
14422
|
+
}
|
|
14423
|
+
update(state) {
|
|
14424
|
+
const { positiveItems, negativeItems } = state;
|
|
14425
|
+
this.allNegative = negativeItems === true;
|
|
14426
|
+
this.allPositive = positiveItems === true;
|
|
14427
|
+
if (this.allNegative && this.allPositive) {
|
|
14428
|
+
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14429
|
+
}
|
|
14430
|
+
if (negativeItems && negativeItems !== true) {
|
|
14431
|
+
if (!this.negativeMap) {
|
|
14432
|
+
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14433
|
+
}
|
|
14434
|
+
this.negativeMap.clear();
|
|
14435
|
+
for (let k of negativeItems) {
|
|
14436
|
+
this.negativeMap.set(k, true);
|
|
14437
|
+
}
|
|
14438
|
+
if (this.positiveMap) {
|
|
14439
|
+
this.positiveMap.clear();
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
if (positiveItems && positiveItems !== true) {
|
|
14443
|
+
if (!this.positiveMap) {
|
|
14444
|
+
this.positiveMap = /* @__PURE__ */ new Map();
|
|
14445
|
+
}
|
|
14446
|
+
this.positiveMap.clear();
|
|
14447
|
+
for (let k of positiveItems) {
|
|
14448
|
+
this.positiveMap.set(k, true);
|
|
14449
|
+
}
|
|
14450
|
+
if (this.negativeMap) {
|
|
14451
|
+
this.negativeMap.clear();
|
|
14452
|
+
}
|
|
14453
|
+
}
|
|
14454
|
+
}
|
|
14455
|
+
isDefaultNegativeSelection() {
|
|
14456
|
+
return this.allNegative;
|
|
14457
|
+
}
|
|
14458
|
+
isDefaultPositiveSelection() {
|
|
14459
|
+
return this.allPositive;
|
|
14460
|
+
}
|
|
14461
|
+
areAllNegative() {
|
|
14462
|
+
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
14463
|
+
}
|
|
14464
|
+
areAllPositive() {
|
|
14465
|
+
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
14466
|
+
}
|
|
14467
|
+
makeAllNegative() {
|
|
14468
|
+
this.update({
|
|
14469
|
+
negativeItems: true,
|
|
14470
|
+
positiveItems: []
|
|
14471
|
+
});
|
|
14472
|
+
}
|
|
14473
|
+
makeAllPositive() {
|
|
14474
|
+
this.update({
|
|
14475
|
+
positiveItems: true,
|
|
14476
|
+
negativeItems: []
|
|
14477
|
+
});
|
|
14478
|
+
}
|
|
14479
|
+
isItemPositive(key) {
|
|
14480
|
+
var _a, _b;
|
|
14481
|
+
if (this.allPositive === true) {
|
|
14482
|
+
if (this.allNegative === true) {
|
|
14483
|
+
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
14484
|
+
}
|
|
14485
|
+
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
14486
|
+
}
|
|
14487
|
+
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
14488
|
+
}
|
|
14489
|
+
isItemNegative(key) {
|
|
14490
|
+
return !this.isItemPositive(key);
|
|
14491
|
+
}
|
|
14492
|
+
setItemValue(key, shouldMakePositive) {
|
|
14493
|
+
var _a;
|
|
14494
|
+
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
14495
|
+
return;
|
|
14496
|
+
}
|
|
14497
|
+
if (shouldMakePositive) {
|
|
14498
|
+
if (this.allNegative === true) {
|
|
14499
|
+
if (!this.positiveMap) {
|
|
14500
|
+
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
14501
|
+
}
|
|
14502
|
+
this.positiveMap.set(key, true);
|
|
14503
|
+
} else if (this.allPositive === true) {
|
|
14504
|
+
if (!this.negativeMap) {
|
|
14505
|
+
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
14506
|
+
}
|
|
14507
|
+
this.negativeMap.delete(key);
|
|
14508
|
+
}
|
|
14509
|
+
} else {
|
|
14510
|
+
if (this.allPositive === true) {
|
|
14511
|
+
if (!this.negativeMap) {
|
|
14512
|
+
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
14513
|
+
}
|
|
14514
|
+
this.negativeMap.set(key, true);
|
|
14515
|
+
} else if (this.allNegative === true) {
|
|
14516
|
+
if (!this.positiveMap) {
|
|
14517
|
+
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
14518
|
+
}
|
|
14519
|
+
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
14520
|
+
}
|
|
14521
|
+
}
|
|
14522
|
+
}
|
|
14523
|
+
makeItemNegative(key) {
|
|
14524
|
+
this.setItemValue(key, false);
|
|
14525
|
+
}
|
|
14526
|
+
makeItemPositive(key) {
|
|
14527
|
+
this.setItemValue(key, true);
|
|
14528
|
+
}
|
|
14529
|
+
toggleItem(key) {
|
|
14530
|
+
this.setItemValue(key, !this.isItemPositive(key));
|
|
14531
|
+
}
|
|
14532
|
+
};
|
|
14533
|
+
|
|
14534
|
+
// src/components/DataSource/RowDisabledState.ts
|
|
14535
|
+
var RowDisabledState = class extends BooleanCollectionState {
|
|
14536
|
+
constructor(state) {
|
|
14537
|
+
super(state);
|
|
14538
|
+
this.isRowEnabled = (key) => {
|
|
14539
|
+
return !!this.isItemPositive(key);
|
|
14540
|
+
};
|
|
14541
|
+
}
|
|
14542
|
+
getState() {
|
|
14543
|
+
var _a, _b, _c, _d;
|
|
14544
|
+
const enabledRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
|
|
14545
|
+
const disabledRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
|
|
14546
|
+
return {
|
|
14547
|
+
enabledRows,
|
|
14548
|
+
disabledRows
|
|
14549
|
+
};
|
|
14550
|
+
}
|
|
14551
|
+
getPositiveFromState(state) {
|
|
14552
|
+
return state.enabledRows;
|
|
14553
|
+
}
|
|
14554
|
+
getNegativeFromState(state) {
|
|
14555
|
+
return state.disabledRows;
|
|
14556
|
+
}
|
|
14557
|
+
areAllDisabled() {
|
|
14558
|
+
return this.areAllNegative();
|
|
14559
|
+
}
|
|
14560
|
+
areAllEnabled() {
|
|
14561
|
+
return this.areAllPositive();
|
|
14562
|
+
}
|
|
14563
|
+
disableAll() {
|
|
14564
|
+
this.makeAllNegative();
|
|
14565
|
+
}
|
|
14566
|
+
enableAll() {
|
|
14567
|
+
this.makeAllPositive();
|
|
14568
|
+
}
|
|
14569
|
+
isRowDisabled(key) {
|
|
14570
|
+
return !this.isRowEnabled(key);
|
|
14571
|
+
}
|
|
14572
|
+
setRowEnabled(key, shouldExpand) {
|
|
14573
|
+
return this.setItemValue(key, shouldExpand);
|
|
14574
|
+
}
|
|
14575
|
+
disableRow(key) {
|
|
14576
|
+
this.setRowEnabled(key, false);
|
|
14577
|
+
}
|
|
14578
|
+
enableRow(key) {
|
|
14579
|
+
this.setRowEnabled(key, true);
|
|
14580
|
+
}
|
|
14581
|
+
toggleRow(key) {
|
|
14582
|
+
this.toggleItem(key);
|
|
14583
|
+
}
|
|
14584
|
+
};
|
|
14585
|
+
|
|
14360
14586
|
// src/components/DataSource/state/getInitialState.ts
|
|
14361
14587
|
var DataSourceLogger = dbg("DataSource");
|
|
14362
14588
|
var defaultCursorId = Symbol("cursorId");
|
|
@@ -14397,7 +14623,8 @@ function initSetupState() {
|
|
|
14397
14623
|
cursorId: defaultCursorId,
|
|
14398
14624
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
14399
14625
|
propsCache: /* @__PURE__ */ new Map([
|
|
14400
|
-
["sortInfo", /* @__PURE__ */ new WeakMap()]
|
|
14626
|
+
["sortInfo", /* @__PURE__ */ new WeakMap()],
|
|
14627
|
+
["rowDisabledState", /* @__PURE__ */ new WeakMap()]
|
|
14401
14628
|
]),
|
|
14402
14629
|
rowInfoReducerResults: void 0,
|
|
14403
14630
|
pivotMappings: void 0,
|
|
@@ -14471,6 +14698,26 @@ var forwardProps3 = (setupState) => {
|
|
|
14471
14698
|
},
|
|
14472
14699
|
batchOperationDelay: 1,
|
|
14473
14700
|
isRowSelected: 1,
|
|
14701
|
+
isRowDisabled: 1,
|
|
14702
|
+
rowDisabledState: (rowDisabledState) => {
|
|
14703
|
+
var _a;
|
|
14704
|
+
if (!rowDisabledState) {
|
|
14705
|
+
return null;
|
|
14706
|
+
}
|
|
14707
|
+
if (rowDisabledState instanceof RowDisabledState) {
|
|
14708
|
+
return rowDisabledState;
|
|
14709
|
+
}
|
|
14710
|
+
const wMap = (_a = setupState.propsCache.get("rowDisabledState")) != null ? _a : weakMap;
|
|
14711
|
+
let cachedRowDisabledState = wMap.get(
|
|
14712
|
+
rowDisabledState
|
|
14713
|
+
);
|
|
14714
|
+
if (!cachedRowDisabledState) {
|
|
14715
|
+
cachedRowDisabledState = new RowDisabledState(rowDisabledState);
|
|
14716
|
+
wMap.set(rowDisabledState, cachedRowDisabledState);
|
|
14717
|
+
}
|
|
14718
|
+
rowDisabledState = cachedRowDisabledState;
|
|
14719
|
+
return rowDisabledState != null ? rowDisabledState : null;
|
|
14720
|
+
},
|
|
14474
14721
|
onDataArrayChange: 1,
|
|
14475
14722
|
onDataMutations: 1,
|
|
14476
14723
|
aggregationReducers: 1,
|
|
@@ -14608,6 +14855,19 @@ function deriveStateFromProps(params) {
|
|
|
14608
14855
|
const sortMode = props.sortFunction ? "local" : propsSortMode != null ? propsSortMode : controlledSort ? "remote" : "local";
|
|
14609
14856
|
const filterMode = typeof props.filterFunction === "function" ? "local" : propsFilterMode != null ? propsFilterMode : typeof props.data === "function" ? "remote" : "local";
|
|
14610
14857
|
const pivotMode = shouldReloadData.pivotBy ? "remote" : "local";
|
|
14858
|
+
const rowDisabledState = state.rowDisabledState;
|
|
14859
|
+
let isRowDisabled = props.isRowDisabled;
|
|
14860
|
+
if (!isRowDisabled && rowDisabledState) {
|
|
14861
|
+
const cachedIsRowDisabled = weakMap.get(rowDisabledState);
|
|
14862
|
+
if (cachedIsRowDisabled) {
|
|
14863
|
+
isRowDisabled = cachedIsRowDisabled;
|
|
14864
|
+
} else {
|
|
14865
|
+
isRowDisabled = (rowInfo) => {
|
|
14866
|
+
return rowDisabledState.isRowDisabled(rowInfo.id);
|
|
14867
|
+
};
|
|
14868
|
+
weakMap.set(rowDisabledState, isRowDisabled);
|
|
14869
|
+
}
|
|
14870
|
+
}
|
|
14611
14871
|
const result = {
|
|
14612
14872
|
selectionMode,
|
|
14613
14873
|
groupRowsState,
|
|
@@ -14624,6 +14884,7 @@ function deriveStateFromProps(params) {
|
|
|
14624
14884
|
groupBy: (_j = (_i = props.shouldReloadData) == null ? void 0 : _i.groupBy) != null ? _j : groupMode === "remote",
|
|
14625
14885
|
pivotBy: (_l = (_k = props.shouldReloadData) == null ? void 0 : _k.pivotBy) != null ? _l : pivotMode === "remote"
|
|
14626
14886
|
},
|
|
14887
|
+
isRowDisabled,
|
|
14627
14888
|
rowSelection: rowSelectionState,
|
|
14628
14889
|
cellSelection: cellSelectionState,
|
|
14629
14890
|
groupMode,
|
|
@@ -14923,151 +15184,6 @@ function useDataSourceInternal(props) {
|
|
|
14923
15184
|
};
|
|
14924
15185
|
}
|
|
14925
15186
|
|
|
14926
|
-
// src/components/DataSource/BooleanCollectionState.ts
|
|
14927
|
-
var BooleanCollectionState = class {
|
|
14928
|
-
constructor(state) {
|
|
14929
|
-
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
14930
|
-
//@ts-ignore
|
|
14931
|
-
state.getState()
|
|
14932
|
-
) : state;
|
|
14933
|
-
const positiveItems = this.getPositiveFromState(stateObject);
|
|
14934
|
-
const negativeItems = this.getNegativeFromState(stateObject);
|
|
14935
|
-
this.update({
|
|
14936
|
-
negativeItems,
|
|
14937
|
-
positiveItems
|
|
14938
|
-
});
|
|
14939
|
-
}
|
|
14940
|
-
getInitialState() {
|
|
14941
|
-
return this.initialState;
|
|
14942
|
-
}
|
|
14943
|
-
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
14944
|
-
// return {
|
|
14945
|
-
// positiveItems: this.allPositive
|
|
14946
|
-
// ? true
|
|
14947
|
-
// : this.positiveMap?.topDownKeys() ?? [],
|
|
14948
|
-
// negativeItems: this.allNegative
|
|
14949
|
-
// ? true
|
|
14950
|
-
// : this.negativeMap?.topDownKeys() ?? [],
|
|
14951
|
-
// };
|
|
14952
|
-
// }
|
|
14953
|
-
destroy() {
|
|
14954
|
-
var _a, _b;
|
|
14955
|
-
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
14956
|
-
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
14957
|
-
delete this.positiveMap;
|
|
14958
|
-
delete this.negativeMap;
|
|
14959
|
-
}
|
|
14960
|
-
update(state) {
|
|
14961
|
-
const { positiveItems, negativeItems } = state;
|
|
14962
|
-
this.allNegative = negativeItems === true;
|
|
14963
|
-
this.allPositive = positiveItems === true;
|
|
14964
|
-
if (this.allNegative && this.allPositive) {
|
|
14965
|
-
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
14966
|
-
}
|
|
14967
|
-
if (negativeItems && negativeItems !== true) {
|
|
14968
|
-
if (!this.negativeMap) {
|
|
14969
|
-
this.negativeMap = /* @__PURE__ */ new Map();
|
|
14970
|
-
}
|
|
14971
|
-
this.negativeMap.clear();
|
|
14972
|
-
for (let k of negativeItems) {
|
|
14973
|
-
this.negativeMap.set(k, true);
|
|
14974
|
-
}
|
|
14975
|
-
if (this.positiveMap) {
|
|
14976
|
-
this.positiveMap.clear();
|
|
14977
|
-
}
|
|
14978
|
-
}
|
|
14979
|
-
if (positiveItems && positiveItems !== true) {
|
|
14980
|
-
if (!this.positiveMap) {
|
|
14981
|
-
this.positiveMap = /* @__PURE__ */ new Map();
|
|
14982
|
-
}
|
|
14983
|
-
this.positiveMap.clear();
|
|
14984
|
-
for (let k of positiveItems) {
|
|
14985
|
-
this.positiveMap.set(k, true);
|
|
14986
|
-
}
|
|
14987
|
-
if (this.negativeMap) {
|
|
14988
|
-
this.negativeMap.clear();
|
|
14989
|
-
}
|
|
14990
|
-
}
|
|
14991
|
-
}
|
|
14992
|
-
isDefaultNegativeSelection() {
|
|
14993
|
-
return this.allNegative;
|
|
14994
|
-
}
|
|
14995
|
-
isDefaultPositiveSelection() {
|
|
14996
|
-
return this.allPositive;
|
|
14997
|
-
}
|
|
14998
|
-
areAllNegative() {
|
|
14999
|
-
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
15000
|
-
}
|
|
15001
|
-
areAllPositive() {
|
|
15002
|
-
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
15003
|
-
}
|
|
15004
|
-
makeAllNegative() {
|
|
15005
|
-
this.update({
|
|
15006
|
-
negativeItems: true,
|
|
15007
|
-
positiveItems: []
|
|
15008
|
-
});
|
|
15009
|
-
}
|
|
15010
|
-
makeAllPositive() {
|
|
15011
|
-
this.update({
|
|
15012
|
-
positiveItems: true,
|
|
15013
|
-
negativeItems: []
|
|
15014
|
-
});
|
|
15015
|
-
}
|
|
15016
|
-
isItemPositive(key) {
|
|
15017
|
-
var _a, _b;
|
|
15018
|
-
if (this.allPositive === true) {
|
|
15019
|
-
if (this.allNegative === true) {
|
|
15020
|
-
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
15021
|
-
}
|
|
15022
|
-
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
15023
|
-
}
|
|
15024
|
-
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
15025
|
-
}
|
|
15026
|
-
isItemNegative(key) {
|
|
15027
|
-
return !this.isItemPositive(key);
|
|
15028
|
-
}
|
|
15029
|
-
setItemValue(key, shouldMakePositive) {
|
|
15030
|
-
var _a;
|
|
15031
|
-
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
15032
|
-
return;
|
|
15033
|
-
}
|
|
15034
|
-
if (shouldMakePositive) {
|
|
15035
|
-
if (this.allNegative === true) {
|
|
15036
|
-
if (!this.positiveMap) {
|
|
15037
|
-
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
15038
|
-
}
|
|
15039
|
-
this.positiveMap.set(key, true);
|
|
15040
|
-
} else if (this.allPositive === true) {
|
|
15041
|
-
if (!this.negativeMap) {
|
|
15042
|
-
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
15043
|
-
}
|
|
15044
|
-
this.negativeMap.delete(key);
|
|
15045
|
-
}
|
|
15046
|
-
} else {
|
|
15047
|
-
if (this.allPositive === true) {
|
|
15048
|
-
if (!this.negativeMap) {
|
|
15049
|
-
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
15050
|
-
}
|
|
15051
|
-
this.negativeMap.set(key, true);
|
|
15052
|
-
} else if (this.allNegative === true) {
|
|
15053
|
-
if (!this.positiveMap) {
|
|
15054
|
-
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
15055
|
-
}
|
|
15056
|
-
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
15057
|
-
}
|
|
15058
|
-
}
|
|
15059
|
-
}
|
|
15060
|
-
makeItemNegative(key) {
|
|
15061
|
-
this.setItemValue(key, false);
|
|
15062
|
-
}
|
|
15063
|
-
makeItemPositive(key) {
|
|
15064
|
-
this.setItemValue(key, true);
|
|
15065
|
-
}
|
|
15066
|
-
toggleItem(key) {
|
|
15067
|
-
this.setItemValue(key, !this.isItemPositive(key));
|
|
15068
|
-
}
|
|
15069
|
-
};
|
|
15070
|
-
|
|
15071
15187
|
// src/components/DataSource/RowDetailState.ts
|
|
15072
15188
|
var RowDetailState = class extends BooleanCollectionState {
|
|
15073
15189
|
constructor(state) {
|
|
@@ -17227,6 +17343,7 @@ var MultiRowSelector = class {
|
|
|
17227
17343
|
constructor(options) {
|
|
17228
17344
|
this.multiSelectStartIndex = 0;
|
|
17229
17345
|
this.getIdForIndex = options.getIdForIndex;
|
|
17346
|
+
this.isRowDisabledAt = options.isRowDisabledAt;
|
|
17230
17347
|
}
|
|
17231
17348
|
set rowSelectionState(rowSelectionState) {
|
|
17232
17349
|
this._rowSelectionState = rowSelectionState;
|
|
@@ -17239,6 +17356,9 @@ var MultiRowSelector = class {
|
|
|
17239
17356
|
const rowSelectionState = this.rowSelectionState;
|
|
17240
17357
|
for (let i = start; i <= end; i++) {
|
|
17241
17358
|
const id = this.getIdForIndex(i);
|
|
17359
|
+
if (this.isRowDisabledAt(i)) {
|
|
17360
|
+
continue;
|
|
17361
|
+
}
|
|
17242
17362
|
rowSelectionState.selectRow(id);
|
|
17243
17363
|
}
|
|
17244
17364
|
}
|
|
@@ -17247,6 +17367,9 @@ var MultiRowSelector = class {
|
|
|
17247
17367
|
const rowSelectionState = this.rowSelectionState;
|
|
17248
17368
|
for (let i = start; i <= end; i++) {
|
|
17249
17369
|
const id = this.getIdForIndex(i);
|
|
17370
|
+
if (this.isRowDisabledAt(i)) {
|
|
17371
|
+
continue;
|
|
17372
|
+
}
|
|
17250
17373
|
rowSelectionState.deselectRow(id);
|
|
17251
17374
|
}
|
|
17252
17375
|
}
|
|
@@ -18688,6 +18811,11 @@ function useComputed() {
|
|
|
18688
18811
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
18689
18812
|
const [multiRowSelector] = useState17(() => {
|
|
18690
18813
|
const multiRowSelector2 = new MultiRowSelector({
|
|
18814
|
+
isRowDisabledAt: (index) => {
|
|
18815
|
+
var _a2;
|
|
18816
|
+
const dataItem = getDataSourceState().dataArray[index];
|
|
18817
|
+
return (_a2 = dataItem == null ? void 0 : dataItem.rowDisabled) != null ? _a2 : false;
|
|
18818
|
+
},
|
|
18691
18819
|
getIdForIndex: (index) => {
|
|
18692
18820
|
var _a2;
|
|
18693
18821
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -18924,7 +19052,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18924
19052
|
}
|
|
18925
19053
|
let valid2 = isValidLicense(licenseKey, {
|
|
18926
19054
|
publishedAt: 1624970570587,
|
|
18927
|
-
version: "4.
|
|
19055
|
+
version: "4.4.0"
|
|
18928
19056
|
});
|
|
18929
19057
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18930
19058
|
return true;
|
|
@@ -19081,6 +19209,10 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
19081
19209
|
if (groupBy.length) {
|
|
19082
19210
|
return false;
|
|
19083
19211
|
}
|
|
19212
|
+
const rowInfo = dataArray[rowIndex];
|
|
19213
|
+
if (rowInfo == null ? void 0 : rowInfo.rowDisabled) {
|
|
19214
|
+
return false;
|
|
19215
|
+
}
|
|
19084
19216
|
if (selectionMode === "multi-row") {
|
|
19085
19217
|
if (renderSelectionCheckBox && !event.key) {
|
|
19086
19218
|
return false;
|
|
@@ -19128,6 +19260,23 @@ function clamp(value, min, max) {
|
|
|
19128
19260
|
}
|
|
19129
19261
|
|
|
19130
19262
|
// src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts
|
|
19263
|
+
function getNextEnabledRowIndex(getDataSourceState, activeRowIndex, direction) {
|
|
19264
|
+
const dataArray = getDataSourceState().dataArray;
|
|
19265
|
+
const min = 0;
|
|
19266
|
+
const max = dataArray.length - 1;
|
|
19267
|
+
let i = activeRowIndex;
|
|
19268
|
+
do {
|
|
19269
|
+
i += direction;
|
|
19270
|
+
const rowInfo = dataArray[i];
|
|
19271
|
+
if (!rowInfo) {
|
|
19272
|
+
return i < min ? min : max;
|
|
19273
|
+
}
|
|
19274
|
+
if (!rowInfo.rowDisabled) {
|
|
19275
|
+
return i;
|
|
19276
|
+
}
|
|
19277
|
+
} while (i >= min && i <= max);
|
|
19278
|
+
return clamp(i, min, max);
|
|
19279
|
+
}
|
|
19131
19280
|
function handleRowNavigation(options, event) {
|
|
19132
19281
|
const { getState, getDataSourceState, actions, api } = options;
|
|
19133
19282
|
const { key } = event;
|
|
@@ -19149,10 +19298,18 @@ function handleRowNavigation(options, event) {
|
|
|
19149
19298
|
const max = arrLength - 1;
|
|
19150
19299
|
const KeyToFunction = {
|
|
19151
19300
|
ArrowDown: () => {
|
|
19152
|
-
activeRowIndex =
|
|
19301
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19302
|
+
getDataSourceState,
|
|
19303
|
+
activeRowIndex,
|
|
19304
|
+
1
|
|
19305
|
+
);
|
|
19153
19306
|
},
|
|
19154
19307
|
ArrowUp: () => {
|
|
19155
|
-
activeRowIndex =
|
|
19308
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19309
|
+
getDataSourceState,
|
|
19310
|
+
activeRowIndex,
|
|
19311
|
+
-1
|
|
19312
|
+
);
|
|
19156
19313
|
},
|
|
19157
19314
|
ArrowLeft: () => {
|
|
19158
19315
|
const rowInfo = dataArray[activeRowIndex];
|
|
@@ -22652,7 +22809,8 @@ function InfiniteTableBody() {
|
|
|
22652
22809
|
bodySize,
|
|
22653
22810
|
activeCellIndex,
|
|
22654
22811
|
rowDetailRenderer,
|
|
22655
|
-
showHoverRows
|
|
22812
|
+
showHoverRows,
|
|
22813
|
+
domProps
|
|
22656
22814
|
} = componentState;
|
|
22657
22815
|
const LoadMaskCmp = (_a = components2 == null ? void 0 : components2.LoadMask) != null ? _a : LoadMask;
|
|
22658
22816
|
const computed = getComputed();
|
|
@@ -22705,11 +22863,13 @@ function InfiniteTableBody() {
|
|
|
22705
22863
|
bodySize,
|
|
22706
22864
|
computed
|
|
22707
22865
|
});
|
|
22866
|
+
const { autoFocus, tabIndex } = domProps != null ? domProps : {};
|
|
22708
22867
|
return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
|
|
22709
22868
|
HeadlessTable,
|
|
22710
22869
|
{
|
|
22711
22870
|
debugId,
|
|
22712
|
-
tabIndex: 0,
|
|
22871
|
+
tabIndex: tabIndex != null ? tabIndex : 0,
|
|
22872
|
+
autoFocus: autoFocus != null ? autoFocus : void 0,
|
|
22713
22873
|
activeRowIndex: componentState.ready && keyboardNavigation === "row" ? activeRowIndex : null,
|
|
22714
22874
|
activeCellIndex: componentState.ready && keyboardNavigation === "cell" && // we want to hide the active cell indicator while column reodering is happening
|
|
22715
22875
|
!componentState.columnReorderDragColumnId ? activeCellIndex : null,
|
|
@@ -22727,6 +22887,7 @@ function InfiniteTableBody() {
|
|
|
22727
22887
|
}
|
|
22728
22888
|
var InfiniteTableComponent = React68.memo(
|
|
22729
22889
|
function InfiniteTableComponent2() {
|
|
22890
|
+
var _a;
|
|
22730
22891
|
const context = useInfiniteTable();
|
|
22731
22892
|
const masterContext = useMasterDetailContext();
|
|
22732
22893
|
const { state: componentState, api, children: initialChildren } = context;
|
|
@@ -22770,7 +22931,17 @@ var InfiniteTableComponent = React68.memo(
|
|
|
22770
22931
|
return brain.onVerticalRenderRangeChange(onChange);
|
|
22771
22932
|
}, [brain, scrollStopDelay]);
|
|
22772
22933
|
const licenseValid = useLicense(licenseKey);
|
|
22773
|
-
const
|
|
22934
|
+
const _b = (_a = componentState.domProps) != null ? _a : {}, {
|
|
22935
|
+
autoFocus: _,
|
|
22936
|
+
tabIndex: __
|
|
22937
|
+
} = _b, initialDOMProps = __objRest(_b, [
|
|
22938
|
+
// remove autoFocus and tabIndex from the domProps
|
|
22939
|
+
// that will be spread on the root DOM element
|
|
22940
|
+
// as they are meant for the scroller element
|
|
22941
|
+
"autoFocus",
|
|
22942
|
+
"tabIndex"
|
|
22943
|
+
]);
|
|
22944
|
+
const domProps = useDOMProps(initialDOMProps);
|
|
22774
22945
|
React68.useEffect(() => {
|
|
22775
22946
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
22776
22947
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|