@infinite-table/infinite-react 4.3.9 → 4.4.1
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 +106 -22
- package/index.dev.js +413 -172
- package/index.dev.mjs +412 -172
- package/index.js +413 -172
- package/index.mjs +412 -172
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -139,6 +139,7 @@ __export(src_exports, {
|
|
|
139
139
|
Menu: () => Menu,
|
|
140
140
|
RowDetailCache: () => RowDetailCache,
|
|
141
141
|
RowDetailState: () => RowDetailState,
|
|
142
|
+
RowDisabledState: () => RowDisabledState,
|
|
142
143
|
RowSelectionState: () => RowSelectionState,
|
|
143
144
|
WeakFixedSizeSet: () => WeakFixedSizeSet,
|
|
144
145
|
components: () => components,
|
|
@@ -1265,7 +1266,8 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1265
1266
|
onContainerScroll,
|
|
1266
1267
|
className,
|
|
1267
1268
|
tabIndex,
|
|
1268
|
-
style: style2
|
|
1269
|
+
style: style2,
|
|
1270
|
+
autoFocus
|
|
1269
1271
|
} = props;
|
|
1270
1272
|
const domRef = ref != null ? ref : (0, import_react4.useRef)(null);
|
|
1271
1273
|
useOnScroll(domRef, onContainerScroll);
|
|
@@ -1274,6 +1276,7 @@ var VirtualScrollContainer = React7.forwardRef(
|
|
|
1274
1276
|
{
|
|
1275
1277
|
ref: domRef,
|
|
1276
1278
|
style: style2,
|
|
1279
|
+
autoFocus,
|
|
1277
1280
|
tabIndex,
|
|
1278
1281
|
className: join(
|
|
1279
1282
|
className,
|
|
@@ -1447,7 +1450,7 @@ var internalProps = {
|
|
|
1447
1450
|
};
|
|
1448
1451
|
|
|
1449
1452
|
// 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)" } } };
|
|
1453
|
+
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
1454
|
var columnHeaderHeightName = "column-header-height";
|
|
1452
1455
|
|
|
1453
1456
|
// src/components/InfiniteTable/utils/infiniteDOMUtils.ts
|
|
@@ -4346,6 +4349,7 @@ function HeadlessTable(props) {
|
|
|
4346
4349
|
"activeCellIndex",
|
|
4347
4350
|
"onRenderUpdater"
|
|
4348
4351
|
]);
|
|
4352
|
+
const { autoFocus } = domProps;
|
|
4349
4353
|
const domRef = (0, import_react10.useRef)(null);
|
|
4350
4354
|
const [scrollSize, setTotalScrollSize] = (0, import_react10.useState)({
|
|
4351
4355
|
width: 0,
|
|
@@ -4362,6 +4366,9 @@ function HeadlessTable(props) {
|
|
|
4362
4366
|
if (!node) {
|
|
4363
4367
|
return;
|
|
4364
4368
|
}
|
|
4369
|
+
if (autoFocus && document.activeElement !== node) {
|
|
4370
|
+
node.focus();
|
|
4371
|
+
}
|
|
4365
4372
|
const onResize = () => {
|
|
4366
4373
|
const size = {
|
|
4367
4374
|
height: node.clientHeight,
|
|
@@ -5124,22 +5131,22 @@ var createRuntimeFn = (config) => {
|
|
|
5124
5131
|
|
|
5125
5132
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5126
5133
|
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: "
|
|
5134
|
+
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
5135
|
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: "
|
|
5136
|
+
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
5137
|
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 = "
|
|
5138
|
+
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12k utilities_width_100%__16lm1iw1b utilities_height_100%__16lm1iw19";
|
|
5132
5139
|
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: "
|
|
5140
|
+
var HeaderFilterOperatorCls = "header_HeaderFilterOperatorCls__12zfob12g utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q utilities_position_relative__16lm1iw1";
|
|
5141
|
+
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: [] });
|
|
5142
|
+
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: [] });
|
|
5143
|
+
var HeaderGroupCls = "header_HeaderGroupCls__12zfob12c utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o utilities_alignItems_center__16lm1iw1q";
|
|
5144
|
+
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
5145
|
var HeaderScrollbarPlaceholderCls = "header_HeaderScrollbarPlaceholderCls__12zfob18 utilities_position_absolute__16lm1iw2";
|
|
5139
5146
|
var HeaderSortIconCls = "utilities_position_relative__16lm1iw1";
|
|
5140
5147
|
var HeaderSortIconIndexCls = "header_HeaderSortIconIndexCls__12zfob16";
|
|
5141
5148
|
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 = "
|
|
5149
|
+
var HeaderWrapperCls = "header_HeaderWrapperCls__12zfob12b utilities_overflow_hidden__16lm1iw1x utilities_position_relative__16lm1iw1 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1o";
|
|
5143
5150
|
|
|
5144
5151
|
// src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts
|
|
5145
5152
|
var InfiniteTableIconClassName = "InfiniteTableIcon";
|
|
@@ -6585,6 +6592,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6585
6592
|
rowActive: extraFlags.rowActive,
|
|
6586
6593
|
dragging: extraFlags.dragging,
|
|
6587
6594
|
firstRow: (_b = extraFlags.firstRow) != null ? _b : false,
|
|
6595
|
+
rowDisabled: extraFlags.rowDisabled,
|
|
6588
6596
|
groupRow: extraFlags.groupRow,
|
|
6589
6597
|
groupCell: extraFlags.groupCell,
|
|
6590
6598
|
verticalAlign: extraFlags.verticalAlign,
|
|
@@ -6617,6 +6625,9 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
6617
6625
|
if (extraFlags.firstRow) {
|
|
6618
6626
|
result.push(...baseClasses.map((c) => `${c}--first-row`));
|
|
6619
6627
|
}
|
|
6628
|
+
if (extraFlags.rowDisabled) {
|
|
6629
|
+
result.push(...baseClasses.map((c) => `${c}--disabled`));
|
|
6630
|
+
}
|
|
6620
6631
|
if (extraFlags.groupRow) {
|
|
6621
6632
|
result.push(...baseClasses.map((c) => `${c}--group-row`));
|
|
6622
6633
|
result.push(
|
|
@@ -7654,9 +7665,8 @@ var LoadingIcon = (props) => {
|
|
|
7654
7665
|
};
|
|
7655
7666
|
|
|
7656
7667
|
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
7657
|
-
var GroupRowExpanderCls = createRuntimeFn({ defaultClassName: "
|
|
7658
|
-
var
|
|
7659
|
-
var RowHoverCls = "row_RowHoverCls__7pupv01";
|
|
7668
|
+
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: [] });
|
|
7669
|
+
var RowHoverCls = "row_RowHoverCls__7pupv00";
|
|
7660
7670
|
|
|
7661
7671
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
7662
7672
|
function styleForGroupColumn({
|
|
@@ -7827,7 +7837,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
7827
7837
|
|
|
7828
7838
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
7829
7839
|
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: "
|
|
7840
|
+
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
7841
|
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
7842
|
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
7833
7843
|
|
|
@@ -8431,6 +8441,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8431
8441
|
api: imperativeApi,
|
|
8432
8442
|
dataSourceApi
|
|
8433
8443
|
};
|
|
8444
|
+
const rowDisabled = rowInfo.rowDisabled;
|
|
8434
8445
|
const visibleColumnsIds = computed.computedVisibleColumns.map((x) => x.id);
|
|
8435
8446
|
const colRenderingParams = getColumnRenderingParams({
|
|
8436
8447
|
column,
|
|
@@ -8472,14 +8483,16 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8472
8483
|
event
|
|
8473
8484
|
});
|
|
8474
8485
|
if (keyboardNavigation === "row") {
|
|
8475
|
-
|
|
8486
|
+
if (!rowDisabled) {
|
|
8487
|
+
componentActions.activeRowIndex = rowIndex;
|
|
8488
|
+
}
|
|
8476
8489
|
return;
|
|
8477
8490
|
}
|
|
8478
8491
|
if (keyboardNavigation === "cell") {
|
|
8479
8492
|
componentActions.activeCellIndex = [rowIndex, colIndex];
|
|
8480
8493
|
}
|
|
8481
8494
|
},
|
|
8482
|
-
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
8495
|
+
[rowIndex, rowDisabled, column.computedVisibleIndex, keyboardNavigation]
|
|
8483
8496
|
);
|
|
8484
8497
|
const { selectionMode, cellSelection } = dataSourceState;
|
|
8485
8498
|
const cellSelected = renderParam.cellSelected;
|
|
@@ -8751,6 +8764,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
8751
8764
|
zebra,
|
|
8752
8765
|
align: align2,
|
|
8753
8766
|
verticalAlign,
|
|
8767
|
+
rowDisabled,
|
|
8754
8768
|
rowActive,
|
|
8755
8769
|
cellSelected,
|
|
8756
8770
|
rowSelected,
|
|
@@ -9629,6 +9643,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
9629
9643
|
verticalAlign,
|
|
9630
9644
|
rowSelected: false,
|
|
9631
9645
|
cellSelected: false,
|
|
9646
|
+
rowDisabled: false,
|
|
9632
9647
|
zebra: false,
|
|
9633
9648
|
rowActive: false,
|
|
9634
9649
|
firstRow: true,
|
|
@@ -10862,6 +10877,7 @@ function getEnhancedGroupData(options, deepMapValue) {
|
|
|
10862
10877
|
//TODO improve this
|
|
10863
10878
|
collapsed: false,
|
|
10864
10879
|
dataSourceHasGrouping: true,
|
|
10880
|
+
rowDisabled: false,
|
|
10865
10881
|
isCellSelected: returnFalse,
|
|
10866
10882
|
hasSelectedCells: returnFalse,
|
|
10867
10883
|
selfLoaded,
|
|
@@ -10910,6 +10926,7 @@ function enhancedFlatten(param) {
|
|
|
10910
10926
|
withRowInfo,
|
|
10911
10927
|
toPrimaryKey,
|
|
10912
10928
|
groupRowsState,
|
|
10929
|
+
isRowDisabled,
|
|
10913
10930
|
isRowSelected,
|
|
10914
10931
|
rowSelectionState,
|
|
10915
10932
|
generateGroupRows,
|
|
@@ -10958,6 +10975,9 @@ function enhancedFlatten(param) {
|
|
|
10958
10975
|
enhancedGroupData.deselectedChildredCount = selectionCount.deselectedCount;
|
|
10959
10976
|
}
|
|
10960
10977
|
}
|
|
10978
|
+
if (isRowDisabled) {
|
|
10979
|
+
enhancedGroupData.rowDisabled = isRowDisabled(enhancedGroupData);
|
|
10980
|
+
}
|
|
10961
10981
|
const parent = parents[parents.length - 1];
|
|
10962
10982
|
const parentCollapsed = (_b = parent == null ? void 0 : parent.collapsed) != null ? _b : false;
|
|
10963
10983
|
if (parentCollapsed) {
|
|
@@ -11005,6 +11025,7 @@ function enhancedFlatten(param) {
|
|
|
11005
11025
|
isGroupRow: false,
|
|
11006
11026
|
selfLoaded: !!item,
|
|
11007
11027
|
rowSelected: false,
|
|
11028
|
+
rowDisabled: false,
|
|
11008
11029
|
rootGroupBy: groupBy,
|
|
11009
11030
|
collapsed,
|
|
11010
11031
|
groupKeys,
|
|
@@ -11019,6 +11040,9 @@ function enhancedFlatten(param) {
|
|
|
11019
11040
|
if (isRowSelected) {
|
|
11020
11041
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
11021
11042
|
}
|
|
11043
|
+
if (isRowDisabled) {
|
|
11044
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
11045
|
+
}
|
|
11022
11046
|
if (withRowInfo) {
|
|
11023
11047
|
withRowInfo(rowInfo);
|
|
11024
11048
|
}
|
|
@@ -12924,6 +12948,203 @@ function getRowInfoArray(getState) {
|
|
|
12924
12948
|
return getState().dataArray;
|
|
12925
12949
|
}
|
|
12926
12950
|
|
|
12951
|
+
// src/components/DataSource/BooleanCollectionState.ts
|
|
12952
|
+
var BooleanCollectionState = class {
|
|
12953
|
+
constructor(state) {
|
|
12954
|
+
const stateObject = state instanceof Object.getPrototypeOf(this).constructor ? (
|
|
12955
|
+
//@ts-ignore
|
|
12956
|
+
state.getState()
|
|
12957
|
+
) : state;
|
|
12958
|
+
const positiveItems = this.getPositiveFromState(stateObject);
|
|
12959
|
+
const negativeItems = this.getNegativeFromState(stateObject);
|
|
12960
|
+
this.update({
|
|
12961
|
+
negativeItems,
|
|
12962
|
+
positiveItems
|
|
12963
|
+
});
|
|
12964
|
+
}
|
|
12965
|
+
getInitialState() {
|
|
12966
|
+
return this.initialState;
|
|
12967
|
+
}
|
|
12968
|
+
// protected getState(): BooleanCollectionStateObject<KeyType> {
|
|
12969
|
+
// return {
|
|
12970
|
+
// positiveItems: this.allPositive
|
|
12971
|
+
// ? true
|
|
12972
|
+
// : this.positiveMap?.topDownKeys() ?? [],
|
|
12973
|
+
// negativeItems: this.allNegative
|
|
12974
|
+
// ? true
|
|
12975
|
+
// : this.negativeMap?.topDownKeys() ?? [],
|
|
12976
|
+
// };
|
|
12977
|
+
// }
|
|
12978
|
+
destroy() {
|
|
12979
|
+
var _a, _b;
|
|
12980
|
+
(_a = this.positiveMap) == null ? void 0 : _a.clear();
|
|
12981
|
+
(_b = this.negativeMap) == null ? void 0 : _b.clear();
|
|
12982
|
+
delete this.positiveMap;
|
|
12983
|
+
delete this.negativeMap;
|
|
12984
|
+
}
|
|
12985
|
+
update(state) {
|
|
12986
|
+
const { positiveItems, negativeItems } = state;
|
|
12987
|
+
this.allNegative = negativeItems === true;
|
|
12988
|
+
this.allPositive = positiveItems === true;
|
|
12989
|
+
if (this.allNegative && this.allPositive) {
|
|
12990
|
+
throw `Cannot have both negativeItems and positiveItems be true!`;
|
|
12991
|
+
}
|
|
12992
|
+
if (negativeItems && negativeItems !== true) {
|
|
12993
|
+
if (!this.negativeMap) {
|
|
12994
|
+
this.negativeMap = /* @__PURE__ */ new Map();
|
|
12995
|
+
}
|
|
12996
|
+
this.negativeMap.clear();
|
|
12997
|
+
for (let k of negativeItems) {
|
|
12998
|
+
this.negativeMap.set(k, true);
|
|
12999
|
+
}
|
|
13000
|
+
if (this.positiveMap) {
|
|
13001
|
+
this.positiveMap.clear();
|
|
13002
|
+
}
|
|
13003
|
+
}
|
|
13004
|
+
if (positiveItems && positiveItems !== true) {
|
|
13005
|
+
if (!this.positiveMap) {
|
|
13006
|
+
this.positiveMap = /* @__PURE__ */ new Map();
|
|
13007
|
+
}
|
|
13008
|
+
this.positiveMap.clear();
|
|
13009
|
+
for (let k of positiveItems) {
|
|
13010
|
+
this.positiveMap.set(k, true);
|
|
13011
|
+
}
|
|
13012
|
+
if (this.negativeMap) {
|
|
13013
|
+
this.negativeMap.clear();
|
|
13014
|
+
}
|
|
13015
|
+
}
|
|
13016
|
+
}
|
|
13017
|
+
isDefaultNegativeSelection() {
|
|
13018
|
+
return this.allNegative;
|
|
13019
|
+
}
|
|
13020
|
+
isDefaultPositiveSelection() {
|
|
13021
|
+
return this.allPositive;
|
|
13022
|
+
}
|
|
13023
|
+
areAllNegative() {
|
|
13024
|
+
return this.allNegative && (this.positiveMap ? this.positiveMap.size === 0 : true);
|
|
13025
|
+
}
|
|
13026
|
+
areAllPositive() {
|
|
13027
|
+
return this.allPositive && (this.negativeMap ? this.negativeMap.size === 0 : true);
|
|
13028
|
+
}
|
|
13029
|
+
makeAllNegative() {
|
|
13030
|
+
this.update({
|
|
13031
|
+
negativeItems: true,
|
|
13032
|
+
positiveItems: []
|
|
13033
|
+
});
|
|
13034
|
+
}
|
|
13035
|
+
makeAllPositive() {
|
|
13036
|
+
this.update({
|
|
13037
|
+
positiveItems: true,
|
|
13038
|
+
negativeItems: []
|
|
13039
|
+
});
|
|
13040
|
+
}
|
|
13041
|
+
isItemPositive(key) {
|
|
13042
|
+
var _a, _b;
|
|
13043
|
+
if (this.allPositive === true) {
|
|
13044
|
+
if (this.allNegative === true) {
|
|
13045
|
+
throw 'Cannot have both positiveItems and negativeItems be "true"';
|
|
13046
|
+
}
|
|
13047
|
+
return !((_a = this.negativeMap) == null ? void 0 : _a.has(key));
|
|
13048
|
+
}
|
|
13049
|
+
return !!((_b = this.positiveMap) == null ? void 0 : _b.has(key));
|
|
13050
|
+
}
|
|
13051
|
+
isItemNegative(key) {
|
|
13052
|
+
return !this.isItemPositive(key);
|
|
13053
|
+
}
|
|
13054
|
+
setItemValue(key, shouldMakePositive) {
|
|
13055
|
+
var _a;
|
|
13056
|
+
if (shouldMakePositive === this.isItemPositive(key)) {
|
|
13057
|
+
return;
|
|
13058
|
+
}
|
|
13059
|
+
if (shouldMakePositive) {
|
|
13060
|
+
if (this.allNegative === true) {
|
|
13061
|
+
if (!this.positiveMap) {
|
|
13062
|
+
throw `No positiveMap found when trying to set item ${key} be positive`;
|
|
13063
|
+
}
|
|
13064
|
+
this.positiveMap.set(key, true);
|
|
13065
|
+
} else if (this.allPositive === true) {
|
|
13066
|
+
if (!this.negativeMap) {
|
|
13067
|
+
throw `No negativeMap found when trying to set item ${key} be positive`;
|
|
13068
|
+
}
|
|
13069
|
+
this.negativeMap.delete(key);
|
|
13070
|
+
}
|
|
13071
|
+
} else {
|
|
13072
|
+
if (this.allPositive === true) {
|
|
13073
|
+
if (!this.negativeMap) {
|
|
13074
|
+
throw `No negativeMap found when trying to set item ${key} be negative`;
|
|
13075
|
+
}
|
|
13076
|
+
this.negativeMap.set(key, true);
|
|
13077
|
+
} else if (this.allNegative === true) {
|
|
13078
|
+
if (!this.positiveMap) {
|
|
13079
|
+
throw `No positiveMap found when trying to set item ${key} be negative`;
|
|
13080
|
+
}
|
|
13081
|
+
(_a = this.positiveMap) == null ? void 0 : _a.delete(key);
|
|
13082
|
+
}
|
|
13083
|
+
}
|
|
13084
|
+
}
|
|
13085
|
+
makeItemNegative(key) {
|
|
13086
|
+
this.setItemValue(key, false);
|
|
13087
|
+
}
|
|
13088
|
+
makeItemPositive(key) {
|
|
13089
|
+
this.setItemValue(key, true);
|
|
13090
|
+
}
|
|
13091
|
+
toggleItem(key) {
|
|
13092
|
+
this.setItemValue(key, !this.isItemPositive(key));
|
|
13093
|
+
}
|
|
13094
|
+
};
|
|
13095
|
+
|
|
13096
|
+
// src/components/DataSource/RowDisabledState.ts
|
|
13097
|
+
var RowDisabledState = class extends BooleanCollectionState {
|
|
13098
|
+
constructor(state) {
|
|
13099
|
+
super(state);
|
|
13100
|
+
this.isRowEnabled = (key) => {
|
|
13101
|
+
return !!this.isItemPositive(key);
|
|
13102
|
+
};
|
|
13103
|
+
}
|
|
13104
|
+
getState() {
|
|
13105
|
+
var _a, _b, _c, _d;
|
|
13106
|
+
const enabledRows = this.allPositive ? true : [...(_b = (_a = this.positiveMap) == null ? void 0 : _a.keys()) != null ? _b : []];
|
|
13107
|
+
const disabledRows = this.allNegative ? true : [...(_d = (_c = this.negativeMap) == null ? void 0 : _c.keys()) != null ? _d : []];
|
|
13108
|
+
return {
|
|
13109
|
+
enabledRows,
|
|
13110
|
+
disabledRows
|
|
13111
|
+
};
|
|
13112
|
+
}
|
|
13113
|
+
getPositiveFromState(state) {
|
|
13114
|
+
return state.enabledRows;
|
|
13115
|
+
}
|
|
13116
|
+
getNegativeFromState(state) {
|
|
13117
|
+
return state.disabledRows;
|
|
13118
|
+
}
|
|
13119
|
+
areAllDisabled() {
|
|
13120
|
+
return this.areAllNegative();
|
|
13121
|
+
}
|
|
13122
|
+
areAllEnabled() {
|
|
13123
|
+
return this.areAllPositive();
|
|
13124
|
+
}
|
|
13125
|
+
disableAll() {
|
|
13126
|
+
this.makeAllNegative();
|
|
13127
|
+
}
|
|
13128
|
+
enableAll() {
|
|
13129
|
+
this.makeAllPositive();
|
|
13130
|
+
}
|
|
13131
|
+
isRowDisabled(key) {
|
|
13132
|
+
return !this.isRowEnabled(key);
|
|
13133
|
+
}
|
|
13134
|
+
setRowEnabled(key, enabled) {
|
|
13135
|
+
return this.setItemValue(key, enabled);
|
|
13136
|
+
}
|
|
13137
|
+
disableRow(key) {
|
|
13138
|
+
this.setRowEnabled(key, false);
|
|
13139
|
+
}
|
|
13140
|
+
enableRow(key) {
|
|
13141
|
+
this.setRowEnabled(key, true);
|
|
13142
|
+
}
|
|
13143
|
+
toggleRow(key) {
|
|
13144
|
+
this.toggleItem(key);
|
|
13145
|
+
}
|
|
13146
|
+
};
|
|
13147
|
+
|
|
12927
13148
|
// src/components/DataSource/getDataSourceApi.ts
|
|
12928
13149
|
function getDataSourceApi(param) {
|
|
12929
13150
|
return new DataSourceApiImpl(param);
|
|
@@ -13077,6 +13298,70 @@ var DataSourceApiImpl = class {
|
|
|
13077
13298
|
this.actions.sortInfo = sortInfo;
|
|
13078
13299
|
return;
|
|
13079
13300
|
};
|
|
13301
|
+
this.isRowDisabledAt = (rowIndex) => {
|
|
13302
|
+
var _a;
|
|
13303
|
+
const rowInfo = this.getRowInfoByIndex(rowIndex);
|
|
13304
|
+
return (_a = rowInfo == null ? void 0 : rowInfo.rowDisabled) != null ? _a : false;
|
|
13305
|
+
};
|
|
13306
|
+
this.isRowDisabled = (primaryKey) => {
|
|
13307
|
+
var _a;
|
|
13308
|
+
const rowInfo = this.getRowInfoByPrimaryKey(primaryKey);
|
|
13309
|
+
return (_a = rowInfo == null ? void 0 : rowInfo.rowDisabled) != null ? _a : false;
|
|
13310
|
+
};
|
|
13311
|
+
this.setRowEnabledAt = (rowIndex, enabled) => {
|
|
13312
|
+
const currentRowDisabledState = this.getState().rowDisabledState;
|
|
13313
|
+
const rowDisabledState = currentRowDisabledState ? new RowDisabledState(currentRowDisabledState) : new RowDisabledState({
|
|
13314
|
+
enabledRows: true,
|
|
13315
|
+
disabledRows: []
|
|
13316
|
+
});
|
|
13317
|
+
const rowInfo = this.getRowInfoByIndex(rowIndex);
|
|
13318
|
+
if (!rowInfo) {
|
|
13319
|
+
return;
|
|
13320
|
+
}
|
|
13321
|
+
rowDisabledState.setRowEnabled(rowInfo.id, enabled);
|
|
13322
|
+
this.actions.rowDisabledState = rowDisabledState;
|
|
13323
|
+
};
|
|
13324
|
+
this.setRowEnabled = (primaryKey, enabled) => {
|
|
13325
|
+
const rowInfo = this.getRowInfoByPrimaryKey(primaryKey);
|
|
13326
|
+
if (!rowInfo) {
|
|
13327
|
+
return;
|
|
13328
|
+
}
|
|
13329
|
+
this.setRowEnabledAt(rowInfo.indexInAll, enabled);
|
|
13330
|
+
};
|
|
13331
|
+
this.enableAllRows = () => {
|
|
13332
|
+
const currentRowDisabledState = this.getState().rowDisabledState;
|
|
13333
|
+
if (!currentRowDisabledState) {
|
|
13334
|
+
this.actions.rowDisabledState = new RowDisabledState({
|
|
13335
|
+
enabledRows: true,
|
|
13336
|
+
disabledRows: []
|
|
13337
|
+
});
|
|
13338
|
+
return;
|
|
13339
|
+
}
|
|
13340
|
+
const rowDisabledState = new RowDisabledState(currentRowDisabledState);
|
|
13341
|
+
rowDisabledState.enableAll();
|
|
13342
|
+
this.actions.rowDisabledState = rowDisabledState;
|
|
13343
|
+
};
|
|
13344
|
+
this.disableAllRows = () => {
|
|
13345
|
+
const currentRowDisabledState = this.getState().rowDisabledState;
|
|
13346
|
+
if (!currentRowDisabledState) {
|
|
13347
|
+
this.actions.rowDisabledState = new RowDisabledState({
|
|
13348
|
+
disabledRows: true,
|
|
13349
|
+
enabledRows: []
|
|
13350
|
+
});
|
|
13351
|
+
return;
|
|
13352
|
+
}
|
|
13353
|
+
const rowDisabledState = new RowDisabledState(currentRowDisabledState);
|
|
13354
|
+
rowDisabledState.disableAll();
|
|
13355
|
+
this.actions.rowDisabledState = rowDisabledState;
|
|
13356
|
+
};
|
|
13357
|
+
this.areAllRowsEnabled = () => {
|
|
13358
|
+
const rowDisabledState = this.getState().rowDisabledState;
|
|
13359
|
+
return rowDisabledState ? rowDisabledState.areAllEnabled() : true;
|
|
13360
|
+
};
|
|
13361
|
+
this.areAllRowsDisabled = () => {
|
|
13362
|
+
const rowDisabledState = this.getState().rowDisabledState;
|
|
13363
|
+
return rowDisabledState ? rowDisabledState.areAllDisabled() : false;
|
|
13364
|
+
};
|
|
13080
13365
|
this.getState = param.getState;
|
|
13081
13366
|
this.actions = param.actions;
|
|
13082
13367
|
}
|
|
@@ -13326,7 +13611,7 @@ var haveDepsChanged = (state1, state2, deps) => {
|
|
|
13326
13611
|
function returnFalse2() {
|
|
13327
13612
|
return false;
|
|
13328
13613
|
}
|
|
13329
|
-
function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
13614
|
+
function toRowInfo(data, id, index, isRowSelected, isRowDisabled, cellSelectionState) {
|
|
13330
13615
|
const rowInfo = {
|
|
13331
13616
|
dataSourceHasGrouping: false,
|
|
13332
13617
|
data,
|
|
@@ -13335,12 +13620,16 @@ function toRowInfo(data, id, index, isRowSelected, cellSelectionState) {
|
|
|
13335
13620
|
isGroupRow: false,
|
|
13336
13621
|
selfLoaded: true,
|
|
13337
13622
|
rowSelected: false,
|
|
13623
|
+
rowDisabled: false,
|
|
13338
13624
|
isCellSelected: returnFalse2,
|
|
13339
13625
|
hasSelectedCells: returnFalse2
|
|
13340
13626
|
};
|
|
13341
13627
|
if (isRowSelected) {
|
|
13342
13628
|
rowInfo.rowSelected = isRowSelected(rowInfo);
|
|
13343
13629
|
}
|
|
13630
|
+
if (isRowDisabled) {
|
|
13631
|
+
rowInfo.rowDisabled = isRowDisabled(rowInfo);
|
|
13632
|
+
}
|
|
13344
13633
|
if (cellSelectionState) {
|
|
13345
13634
|
rowInfo.isCellSelected = (colId) => {
|
|
13346
13635
|
return cellSelectionState.isCellSelected(rowInfo.id, colId);
|
|
@@ -13478,6 +13767,10 @@ function concludeReducer(params) {
|
|
|
13478
13767
|
const groupBy = state.groupBy;
|
|
13479
13768
|
const pivotBy = state.pivotBy;
|
|
13480
13769
|
const shouldGroup = groupBy.length > 0 || !!pivotBy;
|
|
13770
|
+
const rowDisabledStateDepsChanged = haveDepsChanged(previousState, state, [
|
|
13771
|
+
"rowDisabledState",
|
|
13772
|
+
"isRowDisabled"
|
|
13773
|
+
]);
|
|
13481
13774
|
const selectionDepsChanged = haveDepsChanged(previousState, state, [
|
|
13482
13775
|
"rowSelection",
|
|
13483
13776
|
"cellSelection",
|
|
@@ -13499,7 +13792,7 @@ function concludeReducer(params) {
|
|
|
13499
13792
|
const rowInfoReducersChanged = haveDepsChanged(previousState, state, [
|
|
13500
13793
|
"rowInfoReducers"
|
|
13501
13794
|
]);
|
|
13502
|
-
const shouldGroupAgain = shouldGroup && (groupsDepsChanged || !state.lastGroupDataArray || cacheAffectedParts.groupBy) || selectionDepsChanged || rowInfoReducersChanged;
|
|
13795
|
+
const shouldGroupAgain = shouldGroup && (groupsDepsChanged || !state.lastGroupDataArray || cacheAffectedParts.groupBy) || selectionDepsChanged || rowDisabledStateDepsChanged || rowInfoReducersChanged;
|
|
13503
13796
|
const now = Date.now();
|
|
13504
13797
|
let dataArray = state.originalDataArray;
|
|
13505
13798
|
if (!shouldFilter) {
|
|
@@ -13543,6 +13836,7 @@ function concludeReducer(params) {
|
|
|
13543
13836
|
rowInfo.dataSourceHasGrouping ? rowInfo.groupKeys : void 0
|
|
13544
13837
|
);
|
|
13545
13838
|
} : void 0;
|
|
13839
|
+
const isRowDisabled = state.isRowDisabled || returnFalse2;
|
|
13546
13840
|
if (state.isRowSelected && state.selectionMode === "multi-row") {
|
|
13547
13841
|
isRowSelected = (rowInfo) => state.isRowSelected(
|
|
13548
13842
|
rowInfo,
|
|
@@ -13643,7 +13937,7 @@ function concludeReducer(params) {
|
|
|
13643
13937
|
state.pivotColumns = void 0;
|
|
13644
13938
|
state.groupRowsIndexesInDataArray = void 0;
|
|
13645
13939
|
const arrayDifferentAfterSortStep = previousState.postSortDataArray != state.postSortDataArray;
|
|
13646
|
-
if (arrayDifferentAfterSortStep || groupsDepsChanged || selectionDepsChanged || rowInfoReducersChanged) {
|
|
13940
|
+
if (arrayDifferentAfterSortStep || groupsDepsChanged || selectionDepsChanged || rowDisabledStateDepsChanged || rowInfoReducersChanged) {
|
|
13647
13941
|
const rowInfoReducerKeys = Object.keys(
|
|
13648
13942
|
rowInfoReducers || {}
|
|
13649
13943
|
);
|
|
@@ -13662,6 +13956,7 @@ function concludeReducer(params) {
|
|
|
13662
13956
|
data ? toPrimaryKey(data) : index,
|
|
13663
13957
|
index,
|
|
13664
13958
|
isRowSelected,
|
|
13959
|
+
isRowDisabled,
|
|
13665
13960
|
cellSelectionState
|
|
13666
13961
|
);
|
|
13667
13962
|
if (rowInfoReducerResults) {
|
|
@@ -14434,7 +14729,8 @@ function initSetupState() {
|
|
|
14434
14729
|
cursorId: defaultCursorId,
|
|
14435
14730
|
showSeparatePivotColumnForSingleAggregation: false,
|
|
14436
14731
|
propsCache: /* @__PURE__ */ new Map([
|
|
14437
|
-
["sortInfo", /* @__PURE__ */ new WeakMap()]
|
|
14732
|
+
["sortInfo", /* @__PURE__ */ new WeakMap()],
|
|
14733
|
+
["rowDisabledState", /* @__PURE__ */ new WeakMap()]
|
|
14438
14734
|
]),
|
|
14439
14735
|
rowInfoReducerResults: void 0,
|
|
14440
14736
|
pivotMappings: void 0,
|
|
@@ -14508,6 +14804,26 @@ var forwardProps3 = (setupState) => {
|
|
|
14508
14804
|
},
|
|
14509
14805
|
batchOperationDelay: 1,
|
|
14510
14806
|
isRowSelected: 1,
|
|
14807
|
+
isRowDisabled: 1,
|
|
14808
|
+
rowDisabledState: (rowDisabledState) => {
|
|
14809
|
+
var _a;
|
|
14810
|
+
if (!rowDisabledState) {
|
|
14811
|
+
return null;
|
|
14812
|
+
}
|
|
14813
|
+
if (rowDisabledState instanceof RowDisabledState) {
|
|
14814
|
+
return rowDisabledState;
|
|
14815
|
+
}
|
|
14816
|
+
const wMap = (_a = setupState.propsCache.get("rowDisabledState")) != null ? _a : weakMap;
|
|
14817
|
+
let cachedRowDisabledState = wMap.get(
|
|
14818
|
+
rowDisabledState
|
|
14819
|
+
);
|
|
14820
|
+
if (!cachedRowDisabledState) {
|
|
14821
|
+
cachedRowDisabledState = new RowDisabledState(rowDisabledState);
|
|
14822
|
+
wMap.set(rowDisabledState, cachedRowDisabledState);
|
|
14823
|
+
}
|
|
14824
|
+
rowDisabledState = cachedRowDisabledState;
|
|
14825
|
+
return rowDisabledState != null ? rowDisabledState : null;
|
|
14826
|
+
},
|
|
14511
14827
|
onDataArrayChange: 1,
|
|
14512
14828
|
onDataMutations: 1,
|
|
14513
14829
|
aggregationReducers: 1,
|
|
@@ -14645,6 +14961,19 @@ function deriveStateFromProps(params) {
|
|
|
14645
14961
|
const sortMode = props.sortFunction ? "local" : propsSortMode != null ? propsSortMode : controlledSort ? "remote" : "local";
|
|
14646
14962
|
const filterMode = typeof props.filterFunction === "function" ? "local" : propsFilterMode != null ? propsFilterMode : typeof props.data === "function" ? "remote" : "local";
|
|
14647
14963
|
const pivotMode = shouldReloadData.pivotBy ? "remote" : "local";
|
|
14964
|
+
const rowDisabledState = state.rowDisabledState;
|
|
14965
|
+
let isRowDisabled = props.isRowDisabled;
|
|
14966
|
+
if (!isRowDisabled && rowDisabledState) {
|
|
14967
|
+
const cachedIsRowDisabled = weakMap.get(rowDisabledState);
|
|
14968
|
+
if (cachedIsRowDisabled) {
|
|
14969
|
+
isRowDisabled = cachedIsRowDisabled;
|
|
14970
|
+
} else {
|
|
14971
|
+
isRowDisabled = (rowInfo) => {
|
|
14972
|
+
return rowDisabledState.isRowDisabled(rowInfo.id);
|
|
14973
|
+
};
|
|
14974
|
+
weakMap.set(rowDisabledState, isRowDisabled);
|
|
14975
|
+
}
|
|
14976
|
+
}
|
|
14648
14977
|
const result = {
|
|
14649
14978
|
selectionMode,
|
|
14650
14979
|
groupRowsState,
|
|
@@ -14661,6 +14990,7 @@ function deriveStateFromProps(params) {
|
|
|
14661
14990
|
groupBy: (_j = (_i = props.shouldReloadData) == null ? void 0 : _i.groupBy) != null ? _j : groupMode === "remote",
|
|
14662
14991
|
pivotBy: (_l = (_k = props.shouldReloadData) == null ? void 0 : _k.pivotBy) != null ? _l : pivotMode === "remote"
|
|
14663
14992
|
},
|
|
14993
|
+
isRowDisabled,
|
|
14664
14994
|
rowSelection: rowSelectionState,
|
|
14665
14995
|
cellSelection: cellSelectionState,
|
|
14666
14996
|
groupMode,
|
|
@@ -14955,151 +15285,6 @@ function useDataSourceInternal(props) {
|
|
|
14955
15285
|
};
|
|
14956
15286
|
}
|
|
14957
15287
|
|
|
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
15288
|
// src/components/DataSource/RowDetailState.ts
|
|
15104
15289
|
var RowDetailState = class extends BooleanCollectionState {
|
|
15105
15290
|
constructor(state) {
|
|
@@ -17255,6 +17440,7 @@ var MultiRowSelector = class {
|
|
|
17255
17440
|
constructor(options) {
|
|
17256
17441
|
this.multiSelectStartIndex = 0;
|
|
17257
17442
|
this.getIdForIndex = options.getIdForIndex;
|
|
17443
|
+
this.isRowDisabledAt = options.isRowDisabledAt;
|
|
17258
17444
|
}
|
|
17259
17445
|
set rowSelectionState(rowSelectionState) {
|
|
17260
17446
|
this._rowSelectionState = rowSelectionState;
|
|
@@ -17267,6 +17453,9 @@ var MultiRowSelector = class {
|
|
|
17267
17453
|
const rowSelectionState = this.rowSelectionState;
|
|
17268
17454
|
for (let i = start; i <= end; i++) {
|
|
17269
17455
|
const id = this.getIdForIndex(i);
|
|
17456
|
+
if (this.isRowDisabledAt(i)) {
|
|
17457
|
+
continue;
|
|
17458
|
+
}
|
|
17270
17459
|
rowSelectionState.selectRow(id);
|
|
17271
17460
|
}
|
|
17272
17461
|
}
|
|
@@ -17275,6 +17464,9 @@ var MultiRowSelector = class {
|
|
|
17275
17464
|
const rowSelectionState = this.rowSelectionState;
|
|
17276
17465
|
for (let i = start; i <= end; i++) {
|
|
17277
17466
|
const id = this.getIdForIndex(i);
|
|
17467
|
+
if (this.isRowDisabledAt(i)) {
|
|
17468
|
+
continue;
|
|
17469
|
+
}
|
|
17278
17470
|
rowSelectionState.deselectRow(id);
|
|
17279
17471
|
}
|
|
17280
17472
|
}
|
|
@@ -18716,6 +18908,11 @@ function useComputed() {
|
|
|
18716
18908
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
18717
18909
|
const [multiRowSelector] = (0, import_react49.useState)(() => {
|
|
18718
18910
|
const multiRowSelector2 = new MultiRowSelector({
|
|
18911
|
+
isRowDisabledAt: (index) => {
|
|
18912
|
+
var _a2;
|
|
18913
|
+
const dataItem = getDataSourceState().dataArray[index];
|
|
18914
|
+
return (_a2 = dataItem == null ? void 0 : dataItem.rowDisabled) != null ? _a2 : false;
|
|
18915
|
+
},
|
|
18719
18916
|
getIdForIndex: (index) => {
|
|
18720
18917
|
var _a2;
|
|
18721
18918
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -18952,7 +19149,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18952
19149
|
}
|
|
18953
19150
|
let valid2 = isValidLicense(licenseKey, {
|
|
18954
19151
|
publishedAt: 1624970570587,
|
|
18955
|
-
version: "4.
|
|
19152
|
+
version: "4.4.1"
|
|
18956
19153
|
});
|
|
18957
19154
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18958
19155
|
return true;
|
|
@@ -19109,6 +19306,10 @@ function updateRowSelectionOnCellClick(context, event) {
|
|
|
19109
19306
|
if (groupBy.length) {
|
|
19110
19307
|
return false;
|
|
19111
19308
|
}
|
|
19309
|
+
const rowInfo = dataArray[rowIndex];
|
|
19310
|
+
if (rowInfo == null ? void 0 : rowInfo.rowDisabled) {
|
|
19311
|
+
return false;
|
|
19312
|
+
}
|
|
19112
19313
|
if (selectionMode === "multi-row") {
|
|
19113
19314
|
if (renderSelectionCheckBox && !event.key) {
|
|
19114
19315
|
return false;
|
|
@@ -19156,6 +19357,23 @@ function clamp(value, min, max) {
|
|
|
19156
19357
|
}
|
|
19157
19358
|
|
|
19158
19359
|
// src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts
|
|
19360
|
+
function getNextEnabledRowIndex(getDataSourceState, activeRowIndex, direction) {
|
|
19361
|
+
const dataArray = getDataSourceState().dataArray;
|
|
19362
|
+
const min = 0;
|
|
19363
|
+
const max = dataArray.length - 1;
|
|
19364
|
+
let i = activeRowIndex;
|
|
19365
|
+
do {
|
|
19366
|
+
i += direction;
|
|
19367
|
+
const rowInfo = dataArray[i];
|
|
19368
|
+
if (!rowInfo) {
|
|
19369
|
+
return i < min ? min : max;
|
|
19370
|
+
}
|
|
19371
|
+
if (!rowInfo.rowDisabled) {
|
|
19372
|
+
return i;
|
|
19373
|
+
}
|
|
19374
|
+
} while (i >= min && i <= max);
|
|
19375
|
+
return clamp(i, min, max);
|
|
19376
|
+
}
|
|
19159
19377
|
function handleRowNavigation(options, event) {
|
|
19160
19378
|
const { getState, getDataSourceState, actions, api } = options;
|
|
19161
19379
|
const { key } = event;
|
|
@@ -19177,10 +19395,18 @@ function handleRowNavigation(options, event) {
|
|
|
19177
19395
|
const max = arrLength - 1;
|
|
19178
19396
|
const KeyToFunction = {
|
|
19179
19397
|
ArrowDown: () => {
|
|
19180
|
-
activeRowIndex =
|
|
19398
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19399
|
+
getDataSourceState,
|
|
19400
|
+
activeRowIndex,
|
|
19401
|
+
1
|
|
19402
|
+
);
|
|
19181
19403
|
},
|
|
19182
19404
|
ArrowUp: () => {
|
|
19183
|
-
activeRowIndex =
|
|
19405
|
+
activeRowIndex = getNextEnabledRowIndex(
|
|
19406
|
+
getDataSourceState,
|
|
19407
|
+
activeRowIndex,
|
|
19408
|
+
-1
|
|
19409
|
+
);
|
|
19184
19410
|
},
|
|
19185
19411
|
ArrowLeft: () => {
|
|
19186
19412
|
const rowInfo = dataArray[activeRowIndex];
|
|
@@ -22670,7 +22896,8 @@ function InfiniteTableBody() {
|
|
|
22670
22896
|
bodySize,
|
|
22671
22897
|
activeCellIndex,
|
|
22672
22898
|
rowDetailRenderer,
|
|
22673
|
-
showHoverRows
|
|
22899
|
+
showHoverRows,
|
|
22900
|
+
domProps
|
|
22674
22901
|
} = componentState;
|
|
22675
22902
|
const LoadMaskCmp = (_a = components2 == null ? void 0 : components2.LoadMask) != null ? _a : LoadMask;
|
|
22676
22903
|
const computed = getComputed();
|
|
@@ -22723,11 +22950,13 @@ function InfiniteTableBody() {
|
|
|
22723
22950
|
bodySize,
|
|
22724
22951
|
computed
|
|
22725
22952
|
});
|
|
22953
|
+
const { autoFocus, tabIndex } = domProps != null ? domProps : {};
|
|
22726
22954
|
return /* @__PURE__ */ React68.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React68.createElement(
|
|
22727
22955
|
HeadlessTable,
|
|
22728
22956
|
{
|
|
22729
22957
|
debugId,
|
|
22730
|
-
tabIndex: 0,
|
|
22958
|
+
tabIndex: tabIndex != null ? tabIndex : 0,
|
|
22959
|
+
autoFocus: autoFocus != null ? autoFocus : void 0,
|
|
22731
22960
|
activeRowIndex: componentState.ready && keyboardNavigation === "row" ? activeRowIndex : null,
|
|
22732
22961
|
activeCellIndex: componentState.ready && keyboardNavigation === "cell" && // we want to hide the active cell indicator while column reodering is happening
|
|
22733
22962
|
!componentState.columnReorderDragColumnId ? activeCellIndex : null,
|
|
@@ -22745,6 +22974,7 @@ function InfiniteTableBody() {
|
|
|
22745
22974
|
}
|
|
22746
22975
|
var InfiniteTableComponent = React68.memo(
|
|
22747
22976
|
function InfiniteTableComponent2() {
|
|
22977
|
+
var _a;
|
|
22748
22978
|
const context = useInfiniteTable();
|
|
22749
22979
|
const masterContext = useMasterDetailContext();
|
|
22750
22980
|
const { state: componentState, api, children: initialChildren } = context;
|
|
@@ -22788,7 +23018,17 @@ var InfiniteTableComponent = React68.memo(
|
|
|
22788
23018
|
return brain.onVerticalRenderRangeChange(onChange);
|
|
22789
23019
|
}, [brain, scrollStopDelay]);
|
|
22790
23020
|
const licenseValid = useLicense(licenseKey);
|
|
22791
|
-
const
|
|
23021
|
+
const _b = (_a = componentState.domProps) != null ? _a : {}, {
|
|
23022
|
+
autoFocus: _,
|
|
23023
|
+
tabIndex: __
|
|
23024
|
+
} = _b, initialDOMProps = __objRest(_b, [
|
|
23025
|
+
// remove autoFocus and tabIndex from the domProps
|
|
23026
|
+
// that will be spread on the root DOM element
|
|
23027
|
+
// as they are meant for the scroller element
|
|
23028
|
+
"autoFocus",
|
|
23029
|
+
"tabIndex"
|
|
23030
|
+
]);
|
|
23031
|
+
const domProps = useDOMProps(initialDOMProps);
|
|
22792
23032
|
React68.useEffect(() => {
|
|
22793
23033
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
22794
23034
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
@@ -23369,6 +23609,7 @@ var components = {
|
|
|
23369
23609
|
Menu,
|
|
23370
23610
|
RowDetailCache,
|
|
23371
23611
|
RowDetailState,
|
|
23612
|
+
RowDisabledState,
|
|
23372
23613
|
RowSelectionState,
|
|
23373
23614
|
WeakFixedSizeSet,
|
|
23374
23615
|
components,
|